diff options
author | Albert Astals Cid <aacid@kde.org> | 2019-01-10 20:47:08 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2019-01-10 21:03:36 +0100 |
commit | 601faf2ad9d4c4ed94c5b753461388a1da32ddf3 (patch) | |
tree | 2a7a8cada01be95ae477f1e0f8ab9ab92362b842 /src | |
parent | 78da515c5deb984452524069cf7c62a6a68be626 (diff) | |
download | kconfig-601faf2ad9d4c4ed94c5b753461388a1da32ddf3.tar.gz kconfig-601faf2ad9d4c4ed94c5b753461388a1da32ddf3.tar.bz2 |
kconfig_compiler: delete the assignment operator and copy constructor
Summary:
of the generated class that has a pointer and raw copy would be bad.
Those generated classes are internal and nobody would probably have this, but being safe never hurts
Reviewers: vkrause
Reviewed By: vkrause
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D18136
Diffstat (limited to 'src')
-rw-r--r-- | src/kconfig_compiler/kconfig_compiler.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kconfig_compiler/kconfig_compiler.cpp b/src/kconfig_compiler/kconfig_compiler.cpp index b6b4dade..f04d0bd5 100644 --- a/src/kconfig_compiler/kconfig_compiler.cpp +++ b/src/kconfig_compiler/kconfig_compiler.cpp @@ -2300,6 +2300,8 @@ int main(int argc, char **argv) cpp << " public:" << endl; cpp << " " << cfg.className << "Helper() : q(nullptr) {}" << endl; cpp << " ~" << cfg.className << "Helper() { delete q; }" << endl; + cpp << " " << cfg.className << "Helper(const " << cfg.className << "Helper&) = delete;" << endl; + cpp << " " << cfg.className << "Helper& operator=(const " << cfg.className << "Helper&) = delete;" << endl; cpp << " " << cfg.className << " *q;" << endl; cpp << "};" << endl; endNamespaces(cfg.nameSpace, cpp); |