[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:07:08 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=4c0ed98

The following commit has been merged in the master branch:
commit 4c0ed98da330687d644f90ae6294825398e70709
Author: Dan Vrátil <dvratil at redhat.com>
Date:   Wed Sep 18 11:13:30 2013 +0200

    Delay emitting finished() signal from PendingLoggerOperations
    
    When the signal is emitted directly from operation constructor, it
    is never caught, because users connect to the signal after the Operation
    is constructed.
    
    REVIEW: 112790
    FIXED-IN: 0.7.0
    BUG: 325026
---
 KTp/Logger/pending-logger-operation.cpp | 25 ++++++++++++++++++++++---
 KTp/Logger/pending-logger-operation.h   |  2 ++
 2 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/KTp/Logger/pending-logger-operation.cpp b/KTp/Logger/pending-logger-operation.cpp
index c767a7c..b52e461 100644
--- a/KTp/Logger/pending-logger-operation.cpp
+++ b/KTp/Logger/pending-logger-operation.cpp
@@ -25,12 +25,30 @@ using namespace KTp;
 class PendingLoggerOperation::Private
 {
   public:
+    Private(PendingLoggerOperation *parent);
     QString error;
+
+    void __k__doEmitFinished();
+
+  private:
+    PendingLoggerOperation *q;
 };
 
+PendingLoggerOperation::Private::Private(PendingLoggerOperation *parent):
+    q(parent)
+{
+}
+
+void PendingLoggerOperation::Private::__k__doEmitFinished()
+{
+    Q_EMIT q->finished(q);
+    q->deleteLater();
+}
+
+
 PendingLoggerOperation::PendingLoggerOperation(QObject *parent):
     QObject(parent),
-    d(new Private)
+    d(new Private(this))
 {
 }
 
@@ -56,11 +74,12 @@ void PendingLoggerOperation::setError(const QString &error)
 
 void PendingLoggerOperation::emitFinished()
 {
-    Q_EMIT finished(this);
-    deleteLater();
+    QTimer::singleShot(0, this, SLOT(__k__doEmitFinished()));
 }
 
 QList<AbstractLoggerPlugin*> PendingLoggerOperation::plugins() const
 {
     return LogManager::instance()->d->plugins;
 }
+
+#include "pending-logger-operation.moc"
diff --git a/KTp/Logger/pending-logger-operation.h b/KTp/Logger/pending-logger-operation.h
index e6a46f2..6bc5229 100644
--- a/KTp/Logger/pending-logger-operation.h
+++ b/KTp/Logger/pending-logger-operation.h
@@ -52,6 +52,8 @@ class KTP_EXPORT PendingLoggerOperation : public QObject
   private:
     class Private;
     Private * const d;
+
+    Q_PRIVATE_SLOT(d, void __k__doEmitFinished());
 };
 }
 

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list