[PATCH] KConfig*::checkConfigFilesWritable()

Oswald Buddenhagen ossi at kde.org
Tue Nov 18 02:35:21 GMT 2003


moin,

this patch fixes the completely messed up (afaiu) i18n stuff and adds
the missing @sinces to the docs.

for separate evaluation: i also fixed a typo in one string. and once a
string is touched, it (and the surrounding strings) can be "kdialogized"
as well. :)

ok to commit?

greetings

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
-------------- next part --------------
Index: kconfigbackend.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kconfigbackend.cpp,v
retrieving revision 1.87
diff -U2 -r1.87 kconfigbackend.cpp
--- kconfigbackend.cpp	6 Oct 2003 07:58:51 -0000	1.87
+++ kconfigbackend.cpp	18 Nov 2003 02:23:24 -0000
@@ -945,9 +945,9 @@
   // WARNING: Do NOT use the event loop as it may not exist at this time.
   bool allWritable = true;
-  QString errorMsg( I18N_NOOP("Will not save configuration.\n") );
+  QString errorMsg( i18n("Will not save configuration.\\n") );
   if ( !mLocalFileName.isEmpty() && !bFileImmutable && !checkAccess(mLocalFileName,W_OK) )
   {
     allWritable = false;
-    errorMsg = errorMsg + QString(I18N_NOOP("Configuration file \"%1\" not writable.\n")).arg(mLocalFileName);
+    errorMsg += i18n("Configuration file \"%1\" not writable.\\n").arg(mLocalFileName);
   }
   // We do not have an immutability flag for kdeglobals. However, making kdeglobals mutable while making
@@ -955,5 +955,5 @@
   if ( !mGlobalFileName.isEmpty() && useKDEGlobals && !bFileImmutable && !checkAccess(mGlobalFileName,W_OK) )
   {
-    errorMsg = errorMsg + QString(I18N_NOOP("Configuration file \"%1\" not writable.\n")).arg(mGlobalFileName);
+    errorMsg += i18n("Configuration file \"%1\" not writable.\\n").arg(mGlobalFileName);
     allWritable = false;
   }
@@ -962,5 +962,5 @@
   {
     // Note: We don't ask the user if we should not ask this question again because we can't save the answer.
-    errorMsg = errorMsg + QString(I18N_NOOP("Please contact your systems administrator.\n"));
+    errorMsg += i18n("Please contact your system administrator.");
     QString cmdToExec = KStandardDirs::findExe(QString("kdialog"));
     KApplication *app = kapp;
@@ -968,5 +968,5 @@
     {
       KProcess lprocess;
-      lprocess << cmdToExec << "--title" << app->instanceName() << "--msgbox" << errorMsg;
+      lprocess << cmdToExec << "--title" << app->instanceName() << "--msgbox" << errorMsg.local8Bit();
       lprocess.start( KProcess::Block );
     }
Index: kconfigbackend.h
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kconfigbackend.h,v
retrieving revision 1.31
diff -U2 -r1.31 kconfigbackend.h
--- kconfigbackend.h	9 Sep 2003 19:39:07 -0000	1.31
+++ kconfigbackend.h	18 Nov 2003 02:23:24 -0000
@@ -141,4 +141,5 @@
    * @param warnUser Warn the user if the configuration files are not writable.
    * @return Indicates that all of the configuration files used are writable.
+   * @since 3.2
    */
   bool checkConfigFilesWritable(bool warnUser);
Index: kconfigbase.h
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kconfigbase.h,v
retrieving revision 1.103
diff -U2 -r1.103 kconfigbase.h
--- kconfigbase.h	9 Oct 2003 12:45:04 -0000	1.103
+++ kconfigbase.h	18 Nov 2003 02:23:25 -0000
@@ -1808,4 +1808,5 @@
    * @param warnUser Warn the user if the configuration files are not writable.
    * @return Indicates that all of the configuration files used are writable.
+   * @since 3.2
    */
   bool checkConfigFilesWritable(bool warnUser);


More information about the kde-core-devel mailing list