make it assignable

svn path=/trunk/KDE/kdelibs/; revision=1044541
This commit is contained in:
Aaron J. Seigo 2009-11-04 00:21:55 +00:00
parent 2cd3295e69
commit db3d20e4d0
2 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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();