make this a private slot

svn path=/trunk/KDE/kdelibs/; revision=1159724
This commit is contained in:
Aaron J. Seigo 2010-08-06 02:22:44 +00:00
parent 114c5373f3
commit 11c5c88c68
3 changed files with 16 additions and 13 deletions

View File

@ -228,12 +228,12 @@ void DataContainer::store()
}
}
void DataContainer::storeJobFinished(KJob* job)
void DataContainerPrivate::storeJobFinished(KJob* )
{
d->storeCount--;
if (d->storeCount == 0) {
d->store->deleteLater();
d->store = 0;
--storeCount;
if (storeCount < 1) {
store->deleteLater();
store = 0;
}
}

View File

@ -259,15 +259,11 @@ class PLASMA_EXPORT DataContainer : public QObject
*/
void populateFromStoredData(KJob *job);
/**
* Deletes the store member of DataContainerPrivate if
* there are no more references to it.
*/
void storeJobFinished(KJob *job);
private:
friend class SignalRelay;
DataContainerPrivate *const d;
Q_PRIVATE_SLOT(d, void storeJobFinished(KJob *job))
};
} // Plasma namespace

View File

@ -34,10 +34,10 @@ class DataContainerPrivate
{
public:
DataContainerPrivate()
: dirty(false),
: store(NULL),
dirty(false),
cached(false),
enableStorage(false),
store(NULL),
isStored(true),
storeCount(0)
{}
@ -49,6 +49,13 @@ public:
bool hasUpdates();
void populateFromStoredData(KJob *job);
/**
* Deletes the store member of DataContainerPrivate if
* there are no more references to it.
*/
void storeJobFinished(KJob *job);
DataEngine::Data data;
QMap<QObject *, SignalRelay *> relayObjects;
QMap<uint, SignalRelay *> relays;