setShowStyleButtons(s.value("ShowStyleButtons", true));
s.notify("EnablePerChatHistory", this, SLOT(setEnablePerChatHistory(QVariant)));
- setEnablePerChatHistory(s.value("EnablePerChatHistory", false));
+ setEnablePerChatHistory(s.value("EnablePerChatHistory", true));
s.notify("MaxNumLines", this, SLOT(setMaxLines(QVariant)));
setMaxLines(s.value("MaxNumLines", 5));
setScrollBarsEnabled(s.value("EnableScrollBars", true));
s.notify("EnableLineWrap", this, SLOT(setLineWrapEnabled(QVariant)));
- setLineWrapEnabled(s.value("EnableLineWrap", false));
+ setLineWrapEnabled(s.value("EnableLineWrap", true));
s.notify("EnableMultiLine", this, SLOT(setMultiLineEnabled(QVariant)));
setMultiLineEnabled(s.value("EnableMultiLine", true));
// --------
// Check minor settings version, handling upgrades/downgrades as needed
// Current minor version
- const uint VERSION_MINOR_CURRENT = 2;
+ const uint VERSION_MINOR_CURRENT = 3;
// Stored minor version
uint versionMinor = s.versionMinor();
// oldest version. Ignore those, start from 2 and higher.
// Each missed version will be called in sequence. E.g. to upgrade from '1' to '3', this
// function will be called with '2', then '3'.
- case 2:
+ // Use explicit scope via { ... } to avoid cross-initialization
+ case 3:
{
- // Use explicit scope via { ... } to avoid cross-initialization
+ // New default changes: per-chat history and line wrapping enabled by default. Preserve
+ // the older default values for keys that haven't been saved.
+
+ // --------
+ // InputWidget settings
+ UiSettings settingsInputWidget("InputWidget");
+ const QString enableInputPerChatId = "EnablePerChatHistory";
+ if (!settingsInputWidget.valueExists(enableInputPerChatId)) {
+ // New default value is true, preserve previous behavior by setting to false
+ settingsInputWidget.setValue(enableInputPerChatId, false);
+ }
+
+ const QString enableInputLinewrap = "EnableLineWrap";
+ if (!settingsInputWidget.valueExists(enableInputLinewrap)) {
+ // New default value is true, preserve previous behavior by setting to false
+ settingsInputWidget.setValue(enableInputLinewrap, false);
+ }
+ // --------
+ // Migration complete!
+ return true;
+ }
+ case 2:
+ {
// New default changes: sender <nick> brackets disabled, sender colors and sender CTCP
// colors enabled. Preserve the older default values for keys that haven't been saved.