projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Well, if we check for a settings version, maybe we should set it too...
[quassel.git]
/
src
/
core
/
core.cpp
diff --git
a/src/core/core.cpp
b/src/core/core.cpp
index
9c92faf
..
38272e3
100644
(file)
--- a/
src/core/core.cpp
+++ b/
src/core/core.cpp
@@
-71,7
+71,7
@@
Core::Core() : storage(0) {
QSettings newSettings(newFilePath, format);
#endif /* Q_WS_MAC */
QSettings newSettings(newFilePath, format);
#endif /* Q_WS_MAC */
- if(newSettings.value("Config/Version").toUInt()
!= 1
) {
+ if(newSettings.value("Config/Version").toUInt()
== 0
) {
qWarning() << "\n\n*** IMPORTANT: Config and data file locations have changed. Attempting to auto-migrate your core settings...";
# ifdef Q_WS_MAC
QString org = "quassel-irc.org";
qWarning() << "\n\n*** IMPORTANT: Config and data file locations have changed. Attempting to auto-migrate your core settings...";
# ifdef Q_WS_MAC
QString org = "quassel-irc.org";
@@
-122,6
+122,14
@@
Core::Core() : storage(0) {
#endif /* !Q_WS_MAC */
// MIGRATION end
#endif /* !Q_WS_MAC */
// MIGRATION end
+ // check settings version
+ // so far, we only have 1
+ CoreSettings s;
+ if(s.version() != 1) {
+ qCritical() << "Invalid core settings version, terminating!";
+ exit(EXIT_FAILURE);
+ }
+
// Register storage backends here!
registerStorageBackend(new SqliteStorage(this));
// Register storage backends here!
registerStorageBackend(new SqliteStorage(this));