[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Patch for kaboutdata
From:       Albert Astals Cid <tsdgeos () terra ! es>
Date:       2003-04-25 16:51:56
[Download RAW message or body]

This patch corrects a somewhat incorrect behaviour of kaboutdata.

If you create a kaboutdata without specificating a copyrightStatement, when 
clicking on the about menu. The application outputted to the shell an error 
saying that you were trying to i18n a string that only was "" (this behaviour 
happens in klines for example).

But that problem was inside kaboutdata that returned i18n(mcopyrightStatement) 
without cheking if mcopyrightStatement was null or not.

Here comes the patch:

? kaboutdata.diff
Index: kaboutdata.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kaboutdata.cpp,v
retrieving revision 1.16
diff -u -r1.16 kaboutdata.cpp
--- kaboutdata.cpp      14 Nov 2002 18:13:28 -0000      1.16
+++ kaboutdata.cpp      25 Apr 2003 16:46:20 -0000
@@ -336,3 +336,11 @@
   return result;
 }

+QString
+KAboutData::copyrightStatement() const
+{
+  if (mCopyrightStatement)
+     return i18n(mCopyrightStatement);
+  else
+     return QString::null;
+}
Index: kaboutdata.h
===================================================================
RCS file: /home/kde/kdelibs/kdecore/kaboutdata.h,v
retrieving revision 1.27
diff -u -r1.27 kaboutdata.h
--- kaboutdata.h        7 Feb 2003 13:23:26 -0000       1.27
+++ kaboutdata.h        25 Apr 2003 16:46:21 -0000
@@ -412,7 +412,7 @@
      * Returns the copyright statement.
      * @return the copyright statement. Can be QString::null if not set.
      */
-    QString copyrightStatement() const { return( i18n(mCopyrightStatement )); 
}
+    QString copyrightStatement() const;


   private:

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic