Commit 610ff191 authored by Marco Bubke's avatar Marco Bubke Committed by David Schulz
Browse files

TextEditor: Move constructor has now noexcept



Otherwise the copy constructor will be used too and we get an error
because it is private.

Change-Id: Ibfe70939ebe34fa9a524b9844a20d962eb09bd97
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
parent 1c06cb1e
...@@ -78,5 +78,10 @@ ClangTextMark::ClangTextMark(const QString &fileName, int lineNumber, ClangBackE ...@@ -78,5 +78,10 @@ ClangTextMark::ClangTextMark(const QString &fileName, int lineNumber, ClangBackE
setIcon(iconForSeverity(severity)); setIcon(iconForSeverity(severity));
} }
ClangTextMark::ClangTextMark(ClangTextMark &&other) Q_DECL_NOEXCEPT
: TextMark(std::move(other))
{
}
} // namespace ClangCodeModel } // namespace ClangCodeModel
...@@ -41,6 +41,11 @@ class ClangTextMark : public TextEditor::TextMark ...@@ -41,6 +41,11 @@ class ClangTextMark : public TextEditor::TextMark
{ {
public: public:
ClangTextMark(const QString &fileName, int lineNumber, ClangBackEnd::DiagnosticSeverity severity); 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 } // namespace ClangCodeModel
......
...@@ -65,7 +65,7 @@ TextMark::~TextMark() ...@@ -65,7 +65,7 @@ TextMark::~TextMark()
m_baseTextDocument = 0; m_baseTextDocument = 0;
} }
TextMark::TextMark(TextMark &&other) TextMark::TextMark(TextMark &&other) Q_DECL_NOEXCEPT
: m_baseTextDocument(std::move(other.m_baseTextDocument)), : m_baseTextDocument(std::move(other.m_baseTextDocument)),
m_fileName(std::move(other.m_fileName)), m_fileName(std::move(other.m_fileName)),
m_lineNumber(std::move(other.m_lineNumber)), m_lineNumber(std::move(other.m_lineNumber)),
......
...@@ -57,7 +57,7 @@ public: ...@@ -57,7 +57,7 @@ public:
TextMark(const QString &fileName, int lineNumber, Core::Id category); TextMark(const QString &fileName, int lineNumber, Core::Id category);
virtual ~TextMark(); virtual ~TextMark();
TextMark(TextMark &&other); TextMark(TextMark &&other) Q_DECL_NOEXCEPT;
// determine order on markers on the same line. // determine order on markers on the same line.
enum Priority enum Priority
......
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