[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:25:07 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=64bee4e
The following commit has been merged in the master branch:
commit 64bee4e484d29f32f7c8542855ce2ff2c499738c
Author: Martin Klapetek <mklapetek at kde.org>
Date: Mon Jan 12 19:16:32 2015 +0100
[app] Port KGlobal::ref to QEventLoopLocker
---
app/telepathy-chat-ui.cpp | 13 ++++++++-----
app/telepathy-chat-ui.h | 2 ++
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/app/telepathy-chat-ui.cpp b/app/telepathy-chat-ui.cpp
index eb491b2..f6f287b 100644
--- a/app/telepathy-chat-ui.cpp
+++ b/app/telepathy-chat-ui.cpp
@@ -29,7 +29,8 @@
#include <KDebug>
#include <KConfigGroup>
#include <KWindowSystem>
-#include <KGlobal>
+
+#include <QEventLoopLocker>
#include <TelepathyQt/ChannelClassSpec>
#include <TelepathyQt/TextChannel>
@@ -52,6 +53,7 @@ TelepathyChatUi::TelepathyChatUi(int &argc, char *argv[])
AbstractClientHandler(channelClassList())
{
kDebug();
+ m_eventLoopLocker = 0;
m_notifyFilter = new NotifyFilter;
ChatWindow *window = createWindow();
window->show();
@@ -262,8 +264,8 @@ void TelepathyChatUi::takeChannel(const Tp::TextChannelPtr& channel, const Tp::A
connectChannelNotifications(channel, true);
connectAccountNotifications(account, true);
- if (ref) {
- KGlobal::ref();
+ if (ref && !m_eventLoopLocker) {
+ m_eventLoopLocker = new QEventLoopLocker();
}
}
@@ -276,8 +278,9 @@ void TelepathyChatUi::releaseChannel(const Tp::TextChannelPtr& channel, const Tp
connectAccountNotifications(account, false);
}
- if (unref) {
- KGlobal::deref();
+ if (unref && m_eventLoopLocker) {
+ delete m_eventLoopLocker;
+ m_eventLoopLocker = 0;
}
}
diff --git a/app/telepathy-chat-ui.h b/app/telepathy-chat-ui.h
index 0386cac..fdb454b 100644
--- a/app/telepathy-chat-ui.h
+++ b/app/telepathy-chat-ui.h
@@ -36,6 +36,7 @@ class ReceivedMessage;
class ChatTab;
class ChatWindow;
+class QEventLoopLocker;
class TelepathyChatUi : public KTp::TelepathyHandlerApplication, public Tp::AbstractClientHandler
{
@@ -77,6 +78,7 @@ private:
QHash<Tp::TextChannelPtr, Tp::AccountPtr> m_channelAccountMap;
KTp::AbstractMessageFilter *m_notifyFilter;
+ QEventLoopLocker *m_eventLoopLocker;
};
#endif // TELEPATHYCHATUI_H
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list