Commit aa5613b0 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Explicitly disable copies for more classes (using Q_DISABLE_COPY)

parent 409e81f9
......@@ -41,6 +41,8 @@ public:
~UrlParseLock();
private:
Q_DISABLE_COPY(UrlParseLock)
IndexedString m_url;
};
}
......
......@@ -67,6 +67,8 @@ public:
QString templateContents(const QString& name) const;
private:
Q_DISABLE_COPY(ArchiveTemplateLocation)
const KArchiveDirectory* m_directory;
};
}
......
......@@ -72,6 +72,9 @@ struct EditorDisableReplaceTabs
return QStringLiteral("replace-tabs");
}
private:
Q_DISABLE_COPY(EditorDisableReplaceTabs)
KTextEditor::ConfigInterface* m_iface;
int m_count;
QVariant m_oldReplaceTabs;
......
......@@ -195,6 +195,9 @@ private:
item->clear(); ///@todo make this a template specialization that only does this for containers
}
Q_DISABLE_COPY(TemporaryDataManager)
private:
QVector<T*> m_items; /// note: non-shared, ref count of 1 when accessed with non-const methods => no detach
Stack<int> m_freeIndicesWithData;
Stack<int> m_freeIndices;
......
......@@ -134,6 +134,8 @@ public:
bool locked() const;
private:
Q_DISABLE_COPY(DUChainReadLocker)
///This class does not use a d-pointer for performance reasons (allocation+deletion in every high frequency is expensive)
DUChainLock* m_lock;
bool m_locked;
......@@ -165,6 +167,8 @@ public:
bool locked() const;
private:
Q_DISABLE_COPY(DUChainWriteLocker)
///This class does not use a d-pointer for performance reasons (allocation+deletion in every high frequency is expensive)
DUChainLock* m_lock;
bool m_locked;
......
......@@ -213,6 +213,8 @@ struct DUChainItemRegistrator
{
DUChainItemSystem::self().unregisterTypeClass<T, Data>();
}
private:
Q_DISABLE_COPY(DUChainItemRegistrator)
};
///You must add this into your source-files for every DUChainBase based class
......
......@@ -205,6 +205,8 @@ struct TypeSystemRegistrator
{
TypeSystem::self().unregisterTypeClass<T, Data>();
}
private:
Q_DISABLE_COPY(TypeSystemRegistrator)
};
///You must add this into your source-files for every AbstractType based class
......
......@@ -992,6 +992,9 @@ private:
*reinterpret_cast<unsigned short*>(m_data + index) = size;
}
private:
Q_DISABLE_COPY(Bucket)
int m_monsterBucketExtent = 0; //If this is a monster-bucket, this contains the count of follower-buckets that belong to this one
unsigned int m_available = 0;
char* m_data = nullptr; //Structure of the data: <Position of next item with same hash modulo ItemRepositoryBucketSize>(2 byte), <Item>(item.size() byte)
......@@ -1026,6 +1029,10 @@ struct Locker<true>
{
m_mutex->unlock();
}
private:
Q_DISABLE_COPY(Locker)
QMutex* m_mutex;
};
......
......@@ -71,10 +71,13 @@ struct SourceFormatter
}
return supported;
}
SourceFormatter() = default;
~SourceFormatter()
{
qDeleteAll(styles);
};
private:
Q_DISABLE_COPY(SourceFormatter)
};
/** \short A singleton class managing all source formatter plugins
......
......@@ -194,6 +194,9 @@ struct DisableMainWindowUpdatesFromArea
}
}
private:
Q_DISABLE_COPY(DisableMainWindowUpdatesFromArea)
Sublime::Area* m_area;
QSet<Sublime::MainWindow*> wasUpdatesEnabled;
};
......
......@@ -766,6 +766,9 @@ private:
return true;
}
Q_DISABLE_COPY(EmbeddedTreeAddItem)
private:
const Data& m_add;
Data* m_items;
uint m_itemCount;
......
......@@ -240,4 +240,6 @@ static struct StaticLock
{
unlockForegroundMutexInternal(true);
}
private:
Q_DISABLE_COPY(StaticLock)
} staticLock;
......@@ -88,6 +88,8 @@ public:
}
private:
Q_DISABLE_COPY(ScopedDialog)
QPointer<DialogType> ptr;
};
......
......@@ -45,6 +45,7 @@ public:
private:
explicit CheckGroup(const QString& name, CheckGroup* superGroup = nullptr);
CheckGroup() = default;
Q_DISABLE_COPY(CheckGroup)
public:
const QString& prefix() const;
......
......@@ -59,6 +59,8 @@ public:
const QMap<QString, Check*>& checks() const;
private:
Q_DISABLE_COPY(ChecksDB)
QString m_error;
QMap<QString, Check*> m_checks;
......
......@@ -44,6 +44,8 @@ class KDEVCMAKECOMMON_EXPORT CMakeExtraArgumentsHistory
QStringList list() const;
private:
Q_DISABLE_COPY(CMakeExtraArgumentsHistory)
KComboBox* m_arguments;
};
......
......@@ -245,6 +245,9 @@ namespace KDevMI { namespace MI {
QString variable;
Value *value = nullptr;
private:
Q_DISABLE_COPY(Result)
};
struct StringLiteralValue : public Value
......
......@@ -55,6 +55,9 @@ private:
void removeStackListUpdates();
void dumpQueue() const;
private:
Q_DISABLE_COPY(CommandQueue)
QList<MICommand*> m_commandList;
int m_immediatelyCounter = 0;
uint32_t m_tokenCounter = 0;
......
......@@ -44,6 +44,9 @@ struct FileSymbol
inline FileSymbol() {}
inline ~FileSymbol();
private:
Q_DISABLE_COPY(FileSymbol)
};
struct TokenStream
......
......@@ -177,6 +177,9 @@ struct MIBreakpointController::IgnoreChanges {
}
MIBreakpointController& controller;
private:
Q_DISABLE_COPY(IgnoreChanges)
};
MIBreakpointController::MIBreakpointController(MIDebugSession * parent)
......
Markdown is supported
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