Store GUI customizations at system place.

This commit is contained in:
Klaas Freitag 2012-07-25 18:47:31 +03:00
parent 64e83cb287
commit 0c89dd9555
3 changed files with 11 additions and 2 deletions

View file

@ -35,6 +35,9 @@
#define DEFAULT_LOCAL_POLL_INTERVAL 10000 // default local poll time in milliseconds
#define DEFAULT_POLL_TIMER_EXEED 10
#define OC_ORGANIZATION QLatin1String("ownCloud")
#define OC_APPLICATION QLatin1String("ownCloudClient")
namespace Mirall {
QString MirallConfigFile::_passwd;
@ -446,7 +449,10 @@ QVariant MirallConfigFile::customMedia( customMediaType type )
}
if( !key.isEmpty() ) {
QSettings settings( configFile(), QSettings::IniFormat );
QSettings settings( QSettings::IniFormat, QSettings::SystemScope, OC_ORGANIZATION, OC_APPLICATION );
QString cfg = settings.fileName();
qDebug() << "Trying to read config ini file at " << cfg;
settings.setIniCodec( "UTF-8" );
settings.beginGroup(QLatin1String("GUICustomize"));
QString val = settings.value( key, QString() ).toString();

View file

@ -34,7 +34,7 @@
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<widget class="QLabel" name="serverAddressLabel">
<property name="text">
<string>Server &amp;address:</string>
</property>

View file

@ -102,6 +102,9 @@ void OwncloudSetupPage::setupCustomization()
setOCUrl( fixUrl );
_ui.leUrl->setEnabled( false );
_ui.cbSecureConnect->hide();
_ui.leUrl->hide();
_ui.protocolLabel->hide();
_ui.serverAddressLabel->hide();
}
}