Commit a8a10e9b authored by Igor Kushnir's avatar Igor Kushnir
Browse files

Make EnvironmentInformation[List]Item noncopyable

When a copy assignment operator is deleted, a copy constructor is still
generated. But this generation is deprecated since C++11 => disable it.

Remove the default argument from EnvironmentInformationListItem's
pseudo-copy-constructor and pass the second argument explicitly to fix
the following compilation error after EnvironmentInformationListItem
becomes noncopyable:
kdevplatform/language/duchain/duchain.cpp:560:83: error: call of overloaded ‘EnvironmentInformationListItem(const KDevelop::EnvironmentInformationListItem&)’ is ambiguous
parent a24275b9
Pipeline #192618 passed with stage
in 17 minutes and 40 seconds
......@@ -97,7 +97,7 @@ public:
EnvironmentInformationItem& operator=(const EnvironmentInformationItem& rhs) = delete;
unsigned int hash() const
......@@ -193,7 +193,7 @@ public:
EnvironmentInformationListItem(const EnvironmentInformationListItem& rhs, bool dynamic = true)
explicit EnvironmentInformationListItem(const EnvironmentInformationListItem& rhs, bool dynamic)
m_file = rhs.m_file;
......@@ -205,7 +205,7 @@ public:
EnvironmentInformationListItem& operator=(const EnvironmentInformationListItem& rhs) = delete;
unsigned int hash() const
......@@ -557,7 +557,7 @@ public:
const uint index = repo.findIndex(request);
if (index) {
EnvironmentInformationListItem item(*repo.itemFromIndex(index));
EnvironmentInformationListItem item(*repo.itemFromIndex(index), true);
if (item.itemsList().removeOne(infoIndex)) {
if (!item.itemsList().empty()) {
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