//globalSettings->setValue("foo","bar");
//Getting settings
globalSettings->beginGroup("General");
//line 6:
minimizeToTrayOnStartUp = globalSettings->value("minimizetotrayonstartup",false).toBool();
//line 7:
autoRestoreLastWidgets = globalSettings->value("autorestorelastwidgets",false).toBool();
if(autoRestoreLastWidgets) {
//QString *temp = new QString(globalSettings->value("General/lastshownwidgets").toString());
//lastShownWidgets = temp->split(',',QString::SkipEmptyParts);
qDebug() << "restoring modules from last session (" << __PRETTY_FUNCTION__ << ")";
//line 13:
qDebug() << "got last shown widgets:" << globalSettings->value("lastshownwidgets").toString();
lastShownWidgets
= new QStringList(globalSettings
->value
("lastshownwidgets").
toString().
split(',',
QString::SkipEmptyParts));
//delete temp;
}
else {
}
globalSettings->endGroup();
qDebug() << "minimizeToTrayOnStartUp:" << minimizeToTrayOnStartUp;
qDebug() << "autoRestoreLastWidgets:" << autoRestoreLastWidgets;
qDebug() << "lastShownWidgets:" << lastShownWidgets->join(",");
//Write-back settings
globalSettings->beginGroup("General");
globalSettings->setValue("minimizetotrayonstartup",minimizeToTrayOnStartUp);
globalSettings->setValue("autorestorelastwidgets",autoRestoreLastWidgets);
globalSettings->setValue("lastshownwidgets",lastShownWidgets->join(","));
globalSettings->endGroup();
globalSettings = new QSettings("./UnderClient.ini",QSettings::IniFormat,this);
//globalSettings->setValue("foo","bar");
//Getting settings
globalSettings->beginGroup("General");
//line 6:
minimizeToTrayOnStartUp = globalSettings->value("minimizetotrayonstartup",false).toBool();
//line 7:
autoRestoreLastWidgets = globalSettings->value("autorestorelastwidgets",false).toBool();
if(autoRestoreLastWidgets) {
//QString *temp = new QString(globalSettings->value("General/lastshownwidgets").toString());
//lastShownWidgets = temp->split(',',QString::SkipEmptyParts);
qDebug() << "restoring modules from last session (" << __PRETTY_FUNCTION__ << ")";
//line 13:
qDebug() << "got last shown widgets:" << globalSettings->value("lastshownwidgets").toString();
lastShownWidgets = new QStringList(globalSettings->value("lastshownwidgets").toString().split(',',QString::SkipEmptyParts));
//delete temp;
}
else {
lastShownWidgets = new QStringList;
}
globalSettings->endGroup();
qDebug() << "minimizeToTrayOnStartUp:" << minimizeToTrayOnStartUp;
qDebug() << "autoRestoreLastWidgets:" << autoRestoreLastWidgets;
qDebug() << "lastShownWidgets:" << lastShownWidgets->join(",");
//Write-back settings
globalSettings->beginGroup("General");
globalSettings->setValue("minimizetotrayonstartup",minimizeToTrayOnStartUp);
globalSettings->setValue("autorestorelastwidgets",autoRestoreLastWidgets);
globalSettings->setValue("lastshownwidgets",lastShownWidgets->join(","));
globalSettings->endGroup();
To copy to clipboard, switch view to plain text mode
Bookmarks