Commit b043083f authored by Milian Wolff's avatar Milian Wolff
Browse files

Don't allow futher overrides for {Abstract,}ItemRepository API

I.e. mark the implementations in ItemRepository as final because
we don't want anyone else to mess with these functions. Sadly
the item repo itself cannot be final yet as the set repos (ab)use
this still. Maybe we can further clean that up eventually.
parent 4a01ac09
......@@ -1564,7 +1564,7 @@ public:
QString printStatistics() const override
QString printStatistics() const final
// lock for usage from ItemRepositoryRegistry, will be cleaned up in follow up patch
QMutexLocker lock(m_mutex);
......@@ -1701,14 +1701,14 @@ public:
QString repositoryName() const override { return m_repositoryName; }
QString repositoryName() const final { return m_repositoryName; }
Mutex* mutex() const { return m_mutex; }
///Synchronizes the state on disk to the one in memory, and does some memory-management.
///Should be called on a regular basis. Can be called centrally from the global item repository registry.
void store() override
void store() final
QMutexLocker lock(m_mutex);
if (m_file) {
......@@ -1765,7 +1765,7 @@ private:
bool open(const QString& path) override
bool open(const QString& path) final
QMutexLocker lock(m_mutex);
......@@ -1883,7 +1883,7 @@ private:
///@warning by default, this does not store the current state to disk.
void close(bool doStore = false) override
void close(bool doStore = false) final
QMutexLocker lock(m_mutex);
......@@ -1913,7 +1913,7 @@ private:
memset(m_firstBucketForHash, 0, bucketHashSize * sizeof(short unsigned int));
int finalCleanup() override
int finalCleanup() final
QMutexLocker lock(m_mutex);
int changed = 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment