From c6253fc025da8b961e0f7c53f789cf35b5f404b9 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Sat, 26 May 2012 16:45:59 +0200 Subject: [PATCH] Make copy constructor and assignment operator of singleton classes private. --- src/core/Config.h | 2 ++ src/core/DataPath.h | 2 ++ src/core/DatabaseIcons.h | 2 ++ src/gui/FileDialog.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/core/Config.h b/src/core/Config.h index 8b891ec0d..1f9278f47 100644 --- a/src/core/Config.h +++ b/src/core/Config.h @@ -34,6 +34,8 @@ private: QScopedPointer m_settings; + Q_DISABLE_COPY(Config) + friend Config* config(); }; diff --git a/src/core/DataPath.h b/src/core/DataPath.h index 78ca52e7b..470a31d4e 100644 --- a/src/core/DataPath.h +++ b/src/core/DataPath.h @@ -34,6 +34,8 @@ private: QString m_basePath; + Q_DISABLE_COPY(DataPath) + friend DataPath* dataPath(); }; diff --git a/src/core/DatabaseIcons.h b/src/core/DatabaseIcons.h index 935e77585..7e6c2979e 100644 --- a/src/core/DatabaseIcons.h +++ b/src/core/DatabaseIcons.h @@ -38,6 +38,8 @@ private: QVector m_iconCache; QVector m_pixmapCacheKeys; + Q_DISABLE_COPY(DatabaseIcons) + friend DatabaseIcons* databaseIcons(); }; diff --git a/src/gui/FileDialog.h b/src/gui/FileDialog.h index eeb8f8993..6dac4e4b7 100644 --- a/src/gui/FileDialog.h +++ b/src/gui/FileDialog.h @@ -40,6 +40,8 @@ private: FileDialog(); QString m_nextFileName; + Q_DISABLE_COPY(FileDialog) + friend FileDialog* fileDialog(); };