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

List:       kde-commits
Subject:    kdelibs/dcop
From:       Jaroslaw Staniek <js () iidea ! pl>
Date:       2004-09-21 17:11:39
Message-ID: 20040921171139.A1C07126B7 () office ! kde ! org
[Download RAW message or body]

CVS commit by staniek: 

- dcopidl2cpp: **_EXPORT macros are now passed to *_stub.h
  (required, because e.g. KDirNotify_stub from kdeui/ is used by kparts)

- tests updated for **_EXPORT macros

(reviewed by dfaure)


  M +4 -0      dcopclient.cpp   1.184
  M +1 -1      dcopidl/dcopidl_test.h   1.21
  M +1 -1      dcopidl2cpp/dcopidl_test.h   1.7
  M +19 -12    dcopidl2cpp/stub.cpp   1.20


--- kdelibs/dcop/dcopclient.cpp  #1.183:1.184
@@ -689,4 +689,8 @@ void DCOPClient::resume()
 bool DCOPClient::isSuspended() const
 {
+#ifdef Q_WS_WIN //TODO: REMOVE
+    if (!d->notifier)
+        return false;
+#endif
     return !d->notifier->isEnabled();
 }

--- kdelibs/dcop/dcopidl/dcopidl_test.h  #1.20:1.21
@@ -23,5 +23,5 @@ class Test3;
  * blah di blah
  **/
-class Test : public MyNamespace::MyParentClass, virtual public DCOPObject,
+class KDEUI_EXPORT Test : public MyNamespace::MyParentClass, virtual public DCOPObject,
              public QValueList<QString>
 {

--- kdelibs/dcop/dcopidl2cpp/dcopidl_test.h  #1.6:1.7
@@ -9,5 +9,5 @@
 //    - includes to super relationship, a bit much to test, needs multiple files?
 
-class DefaultTest : public QObject, virtual public DCOPObject
+class KDEUI_EXPORT DefaultTest : public QObject, virtual public DCOPObject
 {
    Q_OBJECT

--- kdelibs/dcop/dcopidl2cpp/stub.cpp  #1.19:1.20
@@ -92,10 +92,17 @@ void generateStub( const QString& idl, c
         QString className = n.firstChild().toText().data() + ( "_stub" );
     
+        //add link scope, if available
+        n = n.nextSibling().toElement();
+        QString linkScope;
+        if (n.tagName()=="LINK_SCOPE") {
+                linkScope = n.firstChild().toText().data() + " ";
+                n = n.nextSibling().toElement();
+        }
+
         // find dcop parent ( rightmost super class )
         QString DCOPParent;
-        QDomElement s = n.nextSibling().toElement();
-        for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
-            if ( s.tagName() == "SUPER" )
-                DCOPParent = s.firstChild().toText().data();
+        for( ; !n.isNull(); n = n.nextSibling().toElement() ) {
+            if ( n.tagName() == "SUPER" )
+                DCOPParent = n.firstChild().toText().data();
         }
 
@@ -135,5 +142,5 @@ void generateStub( const QString& idl, c
 
         // Stub class definition
-        str << "class " << className;
+        str << "class " << linkScope << className;
 
         // Parent : inherited interface stub or dcopstub
@@ -154,9 +161,9 @@ void generateStub( const QString& idl, c
         str << "    explicit " << className << "( const DCOPRef& ref );" << endl;
 
-        s = e.firstChild().toElement();
-        for( ; !s.isNull(); s = s.nextSibling().toElement() ) {
-            if (s.tagName() != "FUNC")
+        n = e.firstChild().toElement();
+        for( ; !n.isNull(); n = n.nextSibling().toElement() ) {
+            if (n.tagName() != "FUNC")
                 continue;
-            QDomElement r = s.firstChild().toElement();
+            QDomElement r = n.firstChild().toElement();
             str << "    virtual "; // KDE4 - I really don't think these need to be virtual
             writeType( str, r );
@@ -186,6 +193,6 @@ void generateStub( const QString& idl, c
 
             //const methods stubs can't compile, they need to call setStatus().
-            //if ( s.hasAttribute("qual") )
-            //  str << " " << s.attribute("qual");
+            //if ( n.hasAttribute("qual") )
+            //  str << " " << n.attribute("qual");
             str << ";" << endl;
         }


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

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