with DataContainer::store() now protected against bogus calls by checking to see if storage is enabled, we can unconditionally mark items as needed to be stored; this way if an item is later marked for storage, it will still work. this was a flaw in my last commit.

svn path=/trunk/KDE/kdelibs/; revision=1168014
This commit is contained in:
Aaron J. Seigo 2010-08-25 21:21:04 +00:00
parent 3af1f71492
commit d3a9a2fc52

View File

@ -58,12 +58,11 @@ void DataContainer::setData(const QString &key, const QVariant &value)
//If it is not set to be stored,then this is the first //If it is not set to be stored,then this is the first
//setData() since the last time it was stored. This //setData() since the last time it was stored. This
//gives us only one singleShot timer. //gives us only one singleShot timer.
if (isStorageEnabled()) { if (isStorageEnabled() || !needsToBeStored()) {
if (!needsToBeStored()) { QTimer::singleShot(180000, this, SLOT(store()));
QTimer::singleShot(180000, this, SLOT(store()));
}
setNeedsToBeStored(true);
} }
setNeedsToBeStored(true);
} }
void DataContainer::removeAllData() void DataContainer::removeAllData()