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

List:       kde-commits
Subject:    kdelibs/kwallet/client
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2004-01-15 9:31:53
Message-ID: 20040115093153.6A6C72509 () office ! kde ! org
[Download RAW message or body]

CVS commit by lunakl: 

Make the DCOP call for opening a wallet blocking again, and close
any open popup menus for #65978/#71048.


  M +7 -8      kwallet.cc   1.44


--- kdelibs/kwallet/client/kwallet.cc  #1.43:1.44
@@ -25,4 +25,6 @@
 #include <dcopclient.h>
 #include <dcopref.h>
+#include <qpopupmenu.h>
+#include <qapplication.h>
 
 #include <assert.h>
@@ -166,14 +168,11 @@ Wallet *Wallet::openWallet(const QString
         }
 
+        // avoid deadlock if the app has some popup open (#65978/#71048)
+        while( QWidget* widget = qApp->activePopupWidget())
+            widget->close();
+
         bool isPath = ot == Path;
         DCOPReply r;
 
-#if KDE_IS_VERSION(3,1,90)
-        if (isPath) {
-                r = DCOPRef("kded", "kwalletd").callExt("openPath", \
                DCOPRef::UseEventLoop, -1, name, uint(w));
-        } else {
-                r = DCOPRef("kded", "kwalletd").callExt("open", \
                DCOPRef::UseEventLoop, -1, name, uint(w));
-        }
-#else
         if (isPath) {
                 r = DCOPRef("kded", "kwalletd").call("openPath", name, uint(w));
@@ -181,5 +180,5 @@ Wallet *Wallet::openWallet(const QString
                 r = DCOPRef("kded", "kwalletd").call("open", name, uint(w));
         }
-#endif
+
         if (r.isValid()) {
                 int drc = -1;


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

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