remove settings and paths from Application

This commit is contained in:
fourtf
2018-08-12 12:56:28 +02:00
parent 1ec1ecd52b
commit f6414c9d7e
35 changed files with 125 additions and 152 deletions
+9 -12
View File
@@ -37,13 +37,13 @@ void HighlightModel::getRowFromItem(const HighlightPhrase &item,
void HighlightModel::afterInit()
{
std::vector<QStandardItem *> row = this->createRow();
setBoolItem(row[0], getApp()->settings->enableHighlightsSelf.getValue(),
true, false);
setBoolItem(row[0], getSettings()->enableHighlightsSelf.getValue(), true,
false);
row[0]->setData("Your username (automatic)", Qt::DisplayRole);
setBoolItem(row[1], getApp()->settings->enableHighlightTaskbar.getValue(),
true, false);
setBoolItem(row[2], getApp()->settings->enableHighlightSound.getValue(),
true, false);
setBoolItem(row[1], getSettings()->enableHighlightTaskbar.getValue(), true,
false);
setBoolItem(row[2], getSettings()->enableHighlightSound.getValue(), true,
false);
row[3]->setFlags(0);
this->insertCustomRow(row, 0);
}
@@ -55,20 +55,17 @@ void HighlightModel::customRowSetData(const std::vector<QStandardItem *> &row,
switch (column) {
case 0: {
if (role == Qt::CheckStateRole) {
getApp()->settings->enableHighlightsSelf.setValue(
value.toBool());
getSettings()->enableHighlightsSelf.setValue(value.toBool());
}
} break;
case 1: {
if (role == Qt::CheckStateRole) {
getApp()->settings->enableHighlightTaskbar.setValue(
value.toBool());
getSettings()->enableHighlightTaskbar.setValue(value.toBool());
}
} break;
case 2: {
if (role == Qt::CheckStateRole) {
getApp()->settings->enableHighlightSound.setValue(
value.toBool());
getSettings()->enableHighlightSound.setValue(value.toBool());
}
} break;
case 3: {