diff --git a/runnercontext.cpp b/runnercontext.cpp index 729aa5fa4..a610301f4 100644 --- a/runnercontext.cpp +++ b/runnercontext.cpp @@ -249,6 +249,16 @@ RunnerContext::~RunnerContext() { } +RunnerContext &RunnerContext::operator=(const RunnerContext &other) +{ + LOCK_FOR_WRITE(this) + LOCK_FOR_READ((&other)) + d = other.d; + UNLOCK((&other)) + UNLOCK(this) + return *this; +} + void RunnerContext::reset() { // We will detach if we are a copy of someone. But we will reset diff --git a/runnercontext.h b/runnercontext.h index d862f5a22..3dd218b5b 100644 --- a/runnercontext.h +++ b/runnercontext.h @@ -67,7 +67,13 @@ class PLASMA_EXPORT RunnerContext : public QObject /** * Copy constructor */ - explicit RunnerContext(RunnerContext &other, QObject *parent = 0); + RunnerContext(RunnerContext &other, QObject *parent = 0); + + /** + * Assignment operator + * @since 4.4 + */ + RunnerContext &operator=(const RunnerContext &other); ~RunnerContext();