don't really need our own copy ctor here, as that was just so i could see when it was getting called; also be more careful in operator=. still getting an odd crash in there though from krunner
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805669
This commit is contained in:
parent
61ae3df3fc
commit
b97d911e56
@ -44,20 +44,6 @@ class QueryMatch::Private : public QSharedData
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Private(const Private &other)
|
|
||||||
{
|
|
||||||
kDebug() << "copy";
|
|
||||||
runner = other.runner;
|
|
||||||
type = other.type;
|
|
||||||
id = other.id;
|
|
||||||
text = other.text;
|
|
||||||
subtext = other.subtext;
|
|
||||||
icon = other.icon;
|
|
||||||
data = other.data;
|
|
||||||
enabled = other.enabled;
|
|
||||||
relevance = other.relevance;
|
|
||||||
}
|
|
||||||
|
|
||||||
QPointer<AbstractRunner> runner;
|
QPointer<AbstractRunner> runner;
|
||||||
QueryMatch::Type type;
|
QueryMatch::Type type;
|
||||||
QString id;
|
QString id;
|
||||||
@ -73,7 +59,7 @@ class QueryMatch::Private : public QSharedData
|
|||||||
QueryMatch::QueryMatch(AbstractRunner *runner)
|
QueryMatch::QueryMatch(AbstractRunner *runner)
|
||||||
: d(new Private(runner))
|
: d(new Private(runner))
|
||||||
{
|
{
|
||||||
if (d->runner) {
|
if (runner) {
|
||||||
d->id = runner->id();
|
d->id = runner->id();
|
||||||
}
|
}
|
||||||
// kDebug() << "new match created";
|
// kDebug() << "new match created";
|
||||||
@ -193,8 +179,11 @@ bool QueryMatch::operator<(const QueryMatch& other) const
|
|||||||
|
|
||||||
QueryMatch& QueryMatch::operator=(const QueryMatch &other)
|
QueryMatch& QueryMatch::operator=(const QueryMatch &other)
|
||||||
{
|
{
|
||||||
|
if (d != other.d) {
|
||||||
kDebug();
|
kDebug();
|
||||||
d = other.d;
|
d = other.d;
|
||||||
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user