be careful with d->runner
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805665
This commit is contained in:
parent
6019dc7b27
commit
57ce2ba858
@ -73,7 +73,9 @@ class QueryMatch::Private : public QSharedData
|
||||
QueryMatch::QueryMatch(AbstractRunner *runner)
|
||||
: d(new Private(runner))
|
||||
{
|
||||
d->id = runner->id();
|
||||
if (d->runner) {
|
||||
d->id = runner->id();
|
||||
}
|
||||
// kDebug() << "new match created";
|
||||
}
|
||||
|
||||
@ -86,6 +88,11 @@ QueryMatch::~QueryMatch()
|
||||
{
|
||||
}
|
||||
|
||||
bool QueryMatch::isValid() const
|
||||
{
|
||||
return d->runner != 0;
|
||||
}
|
||||
|
||||
QString QueryMatch::id() const
|
||||
{
|
||||
return d->id;
|
||||
@ -134,7 +141,10 @@ void QueryMatch::setData(const QVariant& data)
|
||||
|
||||
void QueryMatch::setId(const QString &id)
|
||||
{
|
||||
d->id = d->runner->id();
|
||||
if (d->runner) {
|
||||
d->id = d->runner->id();
|
||||
}
|
||||
|
||||
|
||||
if (!id.isEmpty()) {
|
||||
d->id.append('_').append(id);
|
||||
|
@ -77,6 +77,8 @@ class PLASMA_EXPORT QueryMatch
|
||||
|
||||
~QueryMatch();
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
/**
|
||||
* Sets the type of match this action represents.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user