+void Settings::notify(const QString &key, QObject *receiver, const char *slot) {
+ QObject::connect(notifier(normalizedKey(group, key)), SIGNAL(valueChanged(const QVariant &)),
+ receiver, slot);
+}
+
+void Settings::initAndNotify(const QString &key, QObject *receiver, const char *slot, const QVariant &defaultValue) {
+ notify(key, receiver, slot);
+ emit notifier(normalizedKey(group, key))->valueChanged(localValue(key, defaultValue));
+}
+
+uint Settings::version() {
+ // we don't cache this value, and we ignore the group
+ create_qsettings;
+ uint ver = s.value("Config/Version", 0).toUInt();
+ if(!ver) {
+ // No version, so create one
+ s.setValue("Config/Version", VERSION);
+ return VERSION;
+ }
+ return ver;
+}
+