@@ -72,42 +72,6 @@ QString getDefaultLanguageCode()
72
72
73
73
74
74
75
- /* *
76
- * Returns a string containing the application's version number.
77
- *
78
- * @return The application's version number in string form.
79
- */
80
- QString Settings::getAppVersion ()
81
- {
82
- return QString (" %1.%2.%3" )
83
- .arg (APP_VERSION_MAJOR)
84
- .arg (APP_VERSION_MINOR)
85
- .arg (APP_VERSION_PATCH);
86
- }
87
-
88
- /* *
89
- * Compares two version strings and determines whether the first one is older than the second one.
90
- *
91
- * @param settingsVersion The version of the application that saved the settings file.
92
- * @param minimalVersion The version of the application with which to compare the settings file version.
93
- * @return True if the settings file is older than the given version, false otherwise.
94
- */
95
- bool Settings::isBelowVersion (QString settingsVersion, QString minimalVersion)
96
- {
97
- QStringList settingsSplit = settingsVersion.split (' .' );
98
- QStringList minimalSplit = minimalVersion.split (' .' );
99
- assert (settingsSplit.size () == 3 && minimalSplit.size () == 3 );
100
- for (int i = 0 ; i < 3 ; i++) {
101
- bool conversionOk = false ;
102
- int settingsNumber = settingsSplit.at (i).toInt (&conversionOk);
103
- assert (conversionOk);
104
- int minimalNumber = minimalSplit.at (i).toInt (&conversionOk);
105
- assert (conversionOk);
106
- if (settingsNumber < minimalNumber) return true ;
107
- }
108
- return false ;
109
- }
110
-
111
75
/* *
112
76
* Determines whether the settings file was last saved by a version of the application that is
113
77
* older than the current version.
@@ -162,6 +126,46 @@ void Settings::checkForVersionChange()
162
126
163
127
164
128
129
+ /* *
130
+ * Returns a string containing the application's version number.
131
+ *
132
+ * @return The application's version number in string form.
133
+ */
134
+ QString getAppVersion ()
135
+ {
136
+ return QString (" %1.%2.%3" )
137
+ .arg (APP_VERSION_MAJOR)
138
+ .arg (APP_VERSION_MINOR)
139
+ .arg (APP_VERSION_PATCH);
140
+ }
141
+
142
+ /* *
143
+ * Compares two version strings and determines whether the first one is older than the second one.
144
+ *
145
+ * @param settingsVersion The version of the application that saved the settings file.
146
+ * @param minimalVersion The version of the application with which to compare the settings file version.
147
+ * @return True if the settings file is older than the given version, false otherwise.
148
+ */
149
+ bool isBelowVersion (QString versionToCheck, QString minimalVersion)
150
+ {
151
+ QStringList checkSplit = versionToCheck.split (' .' );
152
+ QStringList minimalSplit = minimalVersion.split (' .' );
153
+ assert (checkSplit.size () == 3 && minimalSplit.size () == 3 );
154
+ for (int i = 0 ; i < 3 ; i++) {
155
+ bool conversionOk = false ;
156
+ int settingsNumber = checkSplit.at (i).toInt (&conversionOk);
157
+ assert (conversionOk);
158
+ int minimalNumber = minimalSplit.at (i).toInt (&conversionOk);
159
+ assert (conversionOk);
160
+ if (settingsNumber < minimalNumber) return true ;
161
+ }
162
+ return false ;
163
+ }
164
+
165
+
166
+
167
+
168
+
165
169
/* *
166
170
* Stores implicit settings about position and geometry for the given dialog.
167
171
*
0 commit comments