OSDN Git Service

kcontrol: flush the QSettings changes before notifying applications about the changes
authorIvailo Monev <xakepa10@gmail.com>
Tue, 22 Nov 2022 00:16:34 +0000 (02:16 +0200)
committerIvailo Monev <xakepa10@gmail.com>
Tue, 22 Nov 2022 00:16:34 +0000 (02:16 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
kcontrol/krdb/krdb.cpp

index 8410248..be2dd3e 100644 (file)
@@ -442,13 +442,15 @@ void runRdb( uint flags )
   /* Katie exports */
   if ( exportQtColors || exportQtSettings )
   {
-    QSettings settings(QLatin1String("Katie"), QSettings::NativeFormat);
+    {
+      QSettings settings(QLatin1String("Katie"), QSettings::NativeFormat);
 
-    if ( exportQtColors )
-      applyQtColors( kglobalcfg, settings, newPal );    // For kcmcolors
+      if ( exportQtColors )
+        applyQtColors( kglobalcfg, settings, newPal );    // For kcmcolors
 
-    if ( exportQtSettings )
-      applyQtSettings( kglobalcfg, settings );          // For kcmstyle
+      if ( exportQtSettings )
+        applyQtSettings( kglobalcfg, settings );          // For kcmstyle
+    }
 
     QApplication::flush();
 #ifdef Q_WS_X11