kdelibs/win32 : kdecore patch

David Faure faure at kde.org
Thu Sep 2 17:44:39 BST 2004


On Thursday 02 September 2004 18:15, Jarosław Staniek wrote:
> 
> 2. http://www.iidea.pl/~js/qkw/upload/kdecore.diff.tar.gz
> 
> kdecore/ patches (about 100 files, not all)
> 
> Please review

-#if defined Q_WS_X11 && ! defined K_WS_QTONLY
+#if (defined Q_WS_X11 || defined Q_WS_WIN) && ! defined K_WS_QTONLY
 #include <kstartupinfo.h>
 #endif

Who introduced the K_WS_QTONLY? Ah, Holger. Holger: does it make any sense
to keep those? As shown above, they basically break things for others, since
e.g. kstartupinfo isn't really x11-dependent in itself....
js: you don't use K_WS_QTONLY, right? If nobody does, I think we should clean
this up.

-const int KAccelManagerAlgorithm::WANTED_ACCEL_EXTRA_WEIGHT = 150;
+const int KAccelManagerAlgorithm::WANTED_ACCEL_EXTRA_WEIGHT() { return 150; }

Wouldn't it be faster to use an enum instead? (That means defining all the values
in the .h)

   uint pos;
   [...]
-    c = s[pos];
+    c = s[(int)pos];
We discussed this on IRC and it seems to me that using QT_NO_ASCII_CAST
would prevent the compiler from resolving this the wrong way (js said it
casted 's' into a char*, but we can prevent that).

> "workaround for kdecore: stupid qmake's grammar doesn't accept two macros "
s/qmake/moc/ obviously.

(I also pointed out to js on IRC other issues, like the new broken public methods
in KStandardDirs, he'll make them internal; they are only for the *fallback* prefix)
(I also pointed out some discrepancies in the #defines)

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list