Improve settings migration and management (#5107)

* Settings can now be optionally removed during uninstall (didn't find how to translate)

* Settings import from previous versions now optional

* Hopefully cleaner implementation

* This crashes (already on 2.2)

* Translation

* Remove broken settings import from companion9x

* Fixes for MainWindow
This commit is contained in:
Andre Bernet
2017-08-11 17:42:30 +02:00
committed by Bertrand Songis
parent 96f1a16744
commit b3e9d8d97d
4 changed files with 74 additions and 74 deletions
+14
View File
@@ -71,6 +71,20 @@ int main(int argc, char *argv[])
CustomDebug::setFilterRules();
if (!g.hasCurrentSettings()) {
QString previousVersion;
if (g.findPreviousVersionSettings(&previousVersion)) {
QMessageBox msgBox;
msgBox.setText(QObject::tr("We have found existing settings for Companion version: %1.\nDo you want to import them?").arg(previousVersion));
msgBox.setIcon(QMessageBox::Information);
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::Yes);
int ret = msgBox.exec();
if (ret == QMessageBox::Yes)
g.importSettings(previousVersion);
}
}
g.init();
QStringList strl = QApplication::arguments();