{
QSettings settings;
int config_ver = settings.value("config_version", 0).toInt();
- const int current_ver = 2;
+ const int current_ver = 3;
if(config_ver == current_ver) //config file up-to-date
return;
+ if(config_ver > current_ver) {
+ std::cout << "Warning: Config file was created by a newer version of Presence VNC. This may break things.\n";
+ return;
+ }
if(settings.allKeys().isEmpty()) { //no config file
settings.setValue("config_version", current_ver);
config_ver = 2;
}
+ if(config_ver == 2) {
+ bool rescale = settings.value("rescale", false).toBool();
+ settings.remove("rescale");
+
+ int zoomlevel;
+ if(rescale)
+ zoomlevel = 0;
+ else
+ zoomlevel = 95;
+
+ settings.setValue("zoomlevel", zoomlevel);
+
+ config_ver = 3;
+ }
Q_ASSERT(config_ver == current_ver);
settings.setValue("config_version", config_ver);
settings.sync();
layout2->addWidget(disable_tapping);
#endif
+ always_show_local_cursor = new QCheckBox(tr("Always show local cursor"), this);
+ always_show_local_cursor->setChecked(settings.value("always_show_local_cursor", false).toBool());
+ layout2->addWidget(always_show_local_cursor);
+
+ zoom_to_cursor = new QCheckBox(tr("Zoom to cursor"), this);
+ zoom_to_cursor->setChecked(settings.value("zoom_to_cursor", true).toBool());
+ layout2->addWidget(zoom_to_cursor);
+
QPushButton *ok = new QPushButton(tr("Done"));
ok->setMaximumWidth(100);
settings.setValue("right_zoom", rightzoom_selector->currentIndex());
settings.setValue("disable_tapping", disable_tapping->isChecked());
#endif
+ settings.setValue("always_show_local_cursor", always_show_local_cursor->isChecked());
+ settings.setValue("zoom_to_cursor", zoom_to_cursor->isChecked());
settings.sync();
}