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

List:       kde-commits
Subject:    [kdelibs/ksecretsservice] /: Avoid the common mistake of calling
From:       Michael Leupold <lemma () confuego ! org>
Date:       2011-09-04 15:26:47
Message-ID: 20110904152647.5F1B0A60C6 () git ! kde ! org
[Download RAW message or body]

Git commit 3d51a886369fd5e0ba6ddc2e4f6de2c71052bfd5 by Michael Leupold.
Committed on 18/09/2010 at 16:10.
Pushed by vrusu into branch 'ksecretsservice'.

Avoid the common mistake of calling QueuedJob::start() directly instead of calling \
QueuedJob::enqueue() by making start() protected and only accessible to \
JobQueue(Private).

svn path=/trunk/playground/base/ksecretservice/; revision=1176747

M  +4    -2    queuedjob.h

http://commits.kde.org/kdelibs/3d51a886369fd5e0ba6ddc2e4f6de2c71052bfd5

diff --git a/queuedjob.h b/queuedjob.h
index b9e5520..25f2630 100644
--- a/queuedjob.h
+++ b/queuedjob.h
@@ -24,6 +24,7 @@
 #include <QtCore/QObject>
 
 // forward declaration
+class JobQueuePrivate;
 class JobQueue;
 class QueuedJobPrivate;
 
@@ -86,7 +87,8 @@ public:
     *       as finished and call deleteLater().
     */
    virtual void exec() = 0;
-   
+
+protected:
    /**
     * Start the job asynchronously.
     *
@@ -94,7 +96,6 @@ public:
     */
    virtual void start() = 0;
 
-protected:
    /**
     * Emit the result of this job, notifying every object listening that
     * it's finished.
@@ -113,6 +114,7 @@ Q_SIGNALS:
    void result(QueuedJob *job);
    
 private:
+   friend class JobQueuePrivate;
    QueuedJobPrivate *d;
 };
 


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

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