diff --git a/src/plugins/clangcodemodel/clangtextmark.cpp b/src/plugins/clangcodemodel/clangtextmark.cpp index e6692487637..156f4c575db 100644 --- a/src/plugins/clangcodemodel/clangtextmark.cpp +++ b/src/plugins/clangcodemodel/clangtextmark.cpp @@ -78,5 +78,10 @@ ClangTextMark::ClangTextMark(const QString &fileName, int lineNumber, ClangBackE setIcon(iconForSeverity(severity)); } +ClangTextMark::ClangTextMark(ClangTextMark &&other) Q_DECL_NOEXCEPT + : TextMark(std::move(other)) +{ +} + } // namespace ClangCodeModel diff --git a/src/plugins/clangcodemodel/clangtextmark.h b/src/plugins/clangcodemodel/clangtextmark.h index fe55a9d56d3..5d7752ad437 100644 --- a/src/plugins/clangcodemodel/clangtextmark.h +++ b/src/plugins/clangcodemodel/clangtextmark.h @@ -41,6 +41,11 @@ class ClangTextMark : public TextEditor::TextMark { public: ClangTextMark(const QString &fileName, int lineNumber, ClangBackEnd::DiagnosticSeverity severity); + + ClangTextMark(ClangTextMark &&other) Q_DECL_NOEXCEPT; + + ClangTextMark(ClangTextMark &other) = delete; + ClangTextMark &operator=(ClangTextMark &other) = delete; }; } // namespace ClangCodeModel diff --git a/src/plugins/texteditor/textmark.cpp b/src/plugins/texteditor/textmark.cpp index e3a692e7355..f4984857726 100644 --- a/src/plugins/texteditor/textmark.cpp +++ b/src/plugins/texteditor/textmark.cpp @@ -65,7 +65,7 @@ TextMark::~TextMark() m_baseTextDocument = 0; } -TextMark::TextMark(TextMark &&other) +TextMark::TextMark(TextMark &&other) Q_DECL_NOEXCEPT : m_baseTextDocument(std::move(other.m_baseTextDocument)), m_fileName(std::move(other.m_fileName)), m_lineNumber(std::move(other.m_lineNumber)), diff --git a/src/plugins/texteditor/textmark.h b/src/plugins/texteditor/textmark.h index 468196138dd..f316ea06cd9 100644 --- a/src/plugins/texteditor/textmark.h +++ b/src/plugins/texteditor/textmark.h @@ -57,7 +57,7 @@ public: TextMark(const QString &fileName, int lineNumber, Core::Id category); virtual ~TextMark(); - TextMark(TextMark &&other); + TextMark(TextMark &&other) Q_DECL_NOEXCEPT; // determine order on markers on the same line. enum Priority