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

Consistently hide operator= & copy constructor with "= delete"

parent 165e962e
......@@ -176,6 +176,8 @@ public:
*/
InsertArtificialCodeRepresentation(const IndexedString& file, const QString& text);
~InsertArtificialCodeRepresentation();
InsertArtificialCodeRepresentation(const InsertArtificialCodeRepresentation&) = delete;
InsertArtificialCodeRepresentation& operator=(const InsertArtificialCodeRepresentation&) = delete;
void setText(const QString& text);
QString text() const;
......@@ -185,9 +187,6 @@ public:
IndexedString file();
private:
InsertArtificialCodeRepresentation(const InsertArtificialCodeRepresentation&);
InsertArtificialCodeRepresentation& operator=(const InsertArtificialCodeRepresentation&);
IndexedString m_file;
};
......
......@@ -49,6 +49,7 @@ public:
DUContextData();
~DUContextData();
DUContextData(const DUContextData& rhs);
DUContextData& operator=(const DUContextData&) = delete;
IndexedQualifiedIdentifier m_scopeIdentifier;
IndexedDeclaration m_owner;
......@@ -74,12 +75,6 @@ public:
bool m_inSymbolTable : 1;
bool m_anonymousInParent : 1; //Whether this context was added anonymously into the parent. This means that it cannot be found as child-context in the parent.
bool m_propagateDeclarations : 1;
private:
DUContextData& operator=(const DUContextData&)
{
return *this;
}
};
}
......
......@@ -55,6 +55,9 @@ public:
PersistentMovingRange(const KTextEditor::Range& range, const IndexedString& document, bool shouldExpand = false);
~PersistentMovingRange();
PersistentMovingRange(const PersistentMovingRange&) = delete;
PersistentMovingRange& operator=(const PersistentMovingRange& rhs) = delete;
IndexedString document() const;
/**
......@@ -85,9 +88,6 @@ public:
bool valid() const;
private:
PersistentMovingRange(const PersistentMovingRange&);
PersistentMovingRange& operator=(const PersistentMovingRange& rhs);
PersistentMovingRangePrivate* m_p;
};
}
......
......@@ -47,6 +47,9 @@ public:
/**Destructor.*/
~EditorContext() override;
EditorContext(const EditorContext&) = delete;
EditorContext& operator=(const EditorContext&) = delete;
int type() const override;
/**@return The url for the file which this context was invoked for.*/
......@@ -71,9 +74,6 @@ public:
private:
const QScopedPointer<class EditorContextPrivate> d;
EditorContext(const EditorContext&);
EditorContext& operator=(const EditorContext&);
};
}
......
......@@ -1063,6 +1063,8 @@ public:
rhs.m_start = nullptr;
}
DynamicItem& operator=(const DynamicItem&) = delete;
Item* operator->()
{
return m_item;
......@@ -1072,7 +1074,6 @@ public:
private:
mutable void* m_start;
DynamicItem& operator=(const DynamicItem&);
};
///@tparam Item See ExampleItem
......
......@@ -48,6 +48,9 @@ class KDEVPLATFORMUTIL_EXPORT ForegroundLock
public:
explicit ForegroundLock(bool lock = true);
~ForegroundLock();
ForegroundLock(const ForegroundLock& rhs) = delete;
ForegroundLock& operator=(const ForegroundLock& rhs) = delete;
void unlock();
void relock();
bool tryLock();
......@@ -58,8 +61,6 @@ public:
bool isLocked() const;
private:
ForegroundLock(const ForegroundLock& rhs);
ForegroundLock& operator=(const ForegroundLock& rhs);
bool m_locked = false;
};
......
......@@ -50,11 +50,6 @@ ClassSpecializationTypeData::~ClassSpecializationTypeData()
freeAppendedLists();
}
ClassSpecializationTypeData& ClassSpecializationTypeData::operator=(const ClassSpecializationTypeData&)
{
return *this;
}
ClassSpecializationType::ClassSpecializationType(const ClassSpecializationType& rhs)
: KDevelop::StructureType(copyData<ClassSpecializationType>(*rhs.d_func()))
{}
......
......@@ -39,12 +39,11 @@ struct ClassSpecializationTypeData : public KDevelop::StructureTypeData
~ClassSpecializationTypeData();
ClassSpecializationTypeData& operator=(const ClassSpecializationTypeData&) = delete;
START_APPENDED_LISTS_BASE(ClassSpecializationTypeData, StructureTypeData);
APPENDED_LIST_FIRST(ClassSpecializationTypeData, IndexedType, parameters);
END_APPENDED_LISTS(ClassSpecializationTypeData, parameters);
private:
ClassSpecializationTypeData& operator=(const ClassSpecializationTypeData&);
};
// This type represents a template class specialization.
......
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