]> sigrok.org Git - pulseview.git/blobdiff - pv/globalsettings.cpp
Rework decoder infrastructure
[pulseview.git] / pv / globalsettings.cpp
index b648d5da4e6d1fe388eb69052272dd3044edd0ae..f7df48021f481eafd062bb0f5ad653fb6aaa83c8 100644 (file)
@@ -68,13 +68,13 @@ const QString GlobalSettings::Key_Log_NotifyOfStacktrace = "Log_NotifyOfStacktra
 
 vector<GlobalSettingsInterface*> GlobalSettings::callbacks_;
 bool GlobalSettings::tracking_ = false;
+bool GlobalSettings::is_dark_theme_ = false;
 map<QString, QVariant> GlobalSettings::tracked_changes_;
 QString GlobalSettings::default_style_;
 QPalette GlobalSettings::default_palette_;
 
 GlobalSettings::GlobalSettings() :
-       QSettings(),
-       is_dark_theme_(false)
+       QSettings()
 {
        beginGroup("Settings");
 }
@@ -130,8 +130,10 @@ void GlobalSettings::set_defaults_where_needed()
        if (!contains(Key_View_SnapDistance))
                setValue(Key_View_SnapDistance, 15);
 
-       if (!contains(Key_Dec_ExportFormat))
-               setValue(Key_Dec_ExportFormat, "%s %d: %c: %1");
+       // %c was used for the row name in the past so we need to transition such users
+       if (!contains(Key_Dec_ExportFormat) ||
+               value(Key_Dec_ExportFormat).toString() == "%s %d: %c: %1")
+               setValue(Key_Dec_ExportFormat, "%s %d: %r: %1");
 
        // Default to 500 lines of backlog
        if (!contains(Key_Log_BufferSize))