[SCM] ktp-contact-applet packaging branch, master, updated. debian/15.12.1-1-966-gde83ac5

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:18:27 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-desktop-applets.git;a=commitdiff;h=50c28cf

The following commit has been merged in the master branch:
commit 50c28cf984f5f37a6c9189661e6b16f5d6b2ddb1
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date:   Mon Mar 11 13:38:38 2013 +0100

    Don't block Plasma while showing join chat room dialog
    
    Reviewed-by: David Edmundson
    BUG: 316529
    FIXED-IN: 0.6.0
---
 presence/src/presence-applet.cpp | 38 ++++++++++++++++++++++----------------
 presence/src/presence-applet.h   |  1 +
 2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/presence/src/presence-applet.cpp b/presence/src/presence-applet.cpp
index d9baa81..7b52775 100644
--- a/presence/src/presence-applet.cpp
+++ b/presence/src/presence-applet.cpp
@@ -256,27 +256,33 @@ void TelepathyPresenceApplet::onAddContactRequest()
 
 void TelepathyPresenceApplet::onJoinChatRoomRequest()
 {
-    QWeakPointer<KTp::JoinChatRoomDialog> dialog = new KTp::JoinChatRoomDialog(m_accountManager);
+    KTp::JoinChatRoomDialog *dialog = new KTp::JoinChatRoomDialog(m_accountManager);
+    connect(dialog, SIGNAL(accepted()), this, SLOT(onJoinChatRoomSelected()));
+    dialog->setAttribute(Qt::WA_DeleteOnClose);
+    dialog->show();
+}
 
-    if (dialog.data()->exec() == QDialog::Accepted) {
-        Tp::AccountPtr account = dialog.data()->selectedAccount();
+void TelepathyPresenceApplet::onJoinChatRoomSelected()
+{
+    KTp::JoinChatRoomDialog *dialog = qobject_cast<KTp::JoinChatRoomDialog*>(sender());
+    if (!dialog) {
+        return;
+    }
 
-        // check account validity. Should NEVER be invalid
-        if (!account.isNull()) {
-            // ensure chat room
-            Tp::ChannelRequestHints hints;
-            hints.setHint("org.kde.telepathy","forceRaiseWindow", QVariant(true));
+    Tp::AccountPtr account = dialog->selectedAccount();
+    // check account validity. Should NEVER be invalid
+    if (!account.isNull()) {
+        // ensure chat room
+        Tp::ChannelRequestHints hints;
+        hints.setHint("org.kde.telepathy","forceRaiseWindow", QVariant(true));
 
-            Tp::PendingChannelRequest *channelRequest = account->ensureTextChatroom(dialog.data()->selectedChatRoom(),
-                                                                                    QDateTime::currentDateTime(),
-                                                                                    PREFERRED_TEXTCHAT_HANDLER,
-                                                                                    hints);
+        Tp::PendingChannelRequest *channelRequest = account->ensureTextChatroom(dialog->selectedChatRoom(),
+                                                                                QDateTime::currentDateTime(),
+                                                                                PREFERRED_TEXTCHAT_HANDLER,
+                                                                                hints);
 
-            connect(channelRequest, SIGNAL(finished(Tp::PendingOperation*)), SLOT(onGenericOperationFinished(Tp::PendingOperation*)));
-        }
+        connect(channelRequest, SIGNAL(finished(Tp::PendingOperation*)), SLOT(onGenericOperationFinished(Tp::PendingOperation*)));
     }
-
-    delete dialog.data();
 }
 
 void TelepathyPresenceApplet::onMakeCallRequest()
diff --git a/presence/src/presence-applet.h b/presence/src/presence-applet.h
index 3b0caf5..f4889d6 100644
--- a/presence/src/presence-applet.h
+++ b/presence/src/presence-applet.h
@@ -61,6 +61,7 @@ private Q_SLOTS:
     void onConnectionStatusChanged(Tp::ConnectionStatus connectionStatus);
     void onPresenceActionClicked();
     void onJoinChatRoomRequest();
+    void onJoinChatRoomSelected();
     void toolTipAboutToShow();
     void toolTipHidden();
 

-- 
ktp-contact-applet packaging



More information about the pkg-kde-commits mailing list