From d0281da58d9b4a02c17ac5ce243970168d1ee67e Mon Sep 17 00:00:00 2001 From: Dvogonen Date: Tue, 7 Jan 2014 02:10:50 +0100 Subject: [PATCH] The part where the old companion9x settings are automatically transferred to companion settings is done. Tested on Linux. Should work on Windows/OSX. Now remains only to rename all the hundreds of seting references from companion9x to companion. This is blocked until Bertrand merges his reworked edit dialogs. --- companion/src/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/companion/src/main.cpp b/companion/src/main.cpp index 9cdbf430e..04a20ec84 100644 --- a/companion/src/main.cpp +++ b/companion/src/main.cpp @@ -76,6 +76,17 @@ class MyProxyStyle : public QProxyStyle int main(int argc, char *argv[]) { + // Start by borrowing any left over settings from companion9x + QSettings c9x_settings("companion9x", "companion9x"); + QSettings com_settings("companion", "companion"); + if (!com_settings.contains("pos")) { + QStringList keys = c9x_settings.allKeys(); + for( QStringList::iterator i = keys.begin(); i != keys.end(); i++ ) + { + com_settings.setValue( *i, c9x_settings.value( *i ) ); + } + } + Q_INIT_RESOURCE(companion9x); QApplication app(argc, argv); app.setApplicationName("Companion9x");