clean out unused experience settings
This commit is contained in:
parent
e282036294
commit
3bee40ad8e
@ -75,28 +75,6 @@ QStringList StyleController::allStyles() const
|
||||
return dir.entryList(QDir::Dirs);
|
||||
}
|
||||
|
||||
QString StyleController::currentExperience() const
|
||||
{
|
||||
QSettings settings;
|
||||
return settings.value("experience", "Default").toString();
|
||||
}
|
||||
|
||||
void StyleController::setCurrentExperience(const QString ¤tExperience)
|
||||
{
|
||||
QSettings settings;
|
||||
if (settings.value("experience").toString() != currentExperience) {
|
||||
settings.setValue("experience", currentExperience);
|
||||
emit currentExperienceChanged();
|
||||
}
|
||||
}
|
||||
|
||||
QStringList StyleController::allExperiences() const
|
||||
{
|
||||
QDir dir(":/ui/experiences");
|
||||
qDebug() << "experiences:" << dir.entryList();
|
||||
return QStringList() << "Default" << dir.entryList();
|
||||
}
|
||||
|
||||
void StyleController::setSystemFont(const QFont &font)
|
||||
{
|
||||
QApplication::setFont(font);
|
||||
|
||||
@ -39,9 +39,6 @@ class StyleController : public QObject
|
||||
Q_PROPERTY(QString currentStyle READ currentStyle WRITE setCurrentStyle NOTIFY currentStyleChanged)
|
||||
Q_PROPERTY(QStringList allStyles READ allStyles CONSTANT)
|
||||
|
||||
Q_PROPERTY(QString currentExperience READ currentExperience WRITE setCurrentExperience NOTIFY currentExperienceChanged)
|
||||
Q_PROPERTY(QStringList allExperiences READ allExperiences CONSTANT)
|
||||
|
||||
public:
|
||||
explicit StyleController(QObject *parent = nullptr);
|
||||
|
||||
@ -50,17 +47,10 @@ public:
|
||||
|
||||
QStringList allStyles() const;
|
||||
|
||||
QString currentExperience() const;
|
||||
void setCurrentExperience(const QString ¤tExperience);
|
||||
|
||||
QStringList allExperiences() const;
|
||||
|
||||
Q_INVOKABLE void setSystemFont(const QFont &font);
|
||||
|
||||
signals:
|
||||
void currentStyleChanged();
|
||||
void currentExperienceChanged();
|
||||
|
||||
};
|
||||
|
||||
#endif // STYLECONTROLLER_H
|
||||
|
||||
@ -120,25 +120,6 @@ SettingsPageBase {
|
||||
onClicked: settings.showConnectionTabs = checked
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
Layout.leftMargin: app.margins
|
||||
Layout.rightMargin: app.margins
|
||||
visible: settings.showHiddenOptions
|
||||
|
||||
Label {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Experience mode")
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
currentIndex: model.indexOf(styleController.currentExperience)
|
||||
model: styleController.allExperiences
|
||||
onActivated: {
|
||||
styleController.currentExperience = model[index]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SettingsPageSectionHeader {
|
||||
text: qsTr("Regional")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user