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

List:       kde-commits
Subject:    kdenox/konq-embed/dropin/kio
From:       Eva Brucherseifer <eva () kde ! org>
Date:       2006-05-12 9:32:46
Message-ID: 1147426366.374650.26594.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 540004 by eva:

Qt2:
it seems qt2's moc has a problem with namespaces. So far I experiences
problems with:
- static variables
- signal/slot connections

This patch fixes the crash at exit in the Qt2 version for me.


 M  +3 -2      mimehandler.cpp  
 M  +12 -1     mimehandler.h  


--- trunk/kdenox/konq-embed/dropin/kio/mimehandler.cpp #540003:540004
@@ -180,9 +180,10 @@
     for ( ; pumpData(); );
 }
 
+#if (QT_VERSION >= 0x030000)
+QPtrList<MimeHandler> s_handlers;
+#endif
 
-QPtrList<MimeHandler> MimeHandler::s_handlers;
-
 const MimeHandler* MimeHandler::Find( const QString &type )
 {
     const MimeHandler* retval = 0;
--- trunk/kdenox/konq-embed/dropin/kio/mimehandler.h #540003:540004
@@ -4,9 +4,18 @@
 #include <kio/global.h>
 #include <kparts/factory.h>
 
+#if (QT_VERSION < 0x030000)
 namespace KIO
 {
+     class MimeHandler;
+}
+static QPtrList<KIO::MimeHandler> s_handlers;
+#endif
 
+
+namespace KIO
+{
+
     class DataFilter : public QObject
     {
         Q_OBJECT
@@ -83,7 +92,9 @@
 	virtual bool Matches( const QByteArray &/*data*/ ) const  { return false; }
 	QStringList m_types;
 
-	static QPtrList<MimeHandler> s_handlers;
+#if (QT_VERSION >= 0x030000)
+        static QPtrList<MimeHandler> s_handlers;
+#endif
     };
 
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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