forked from qt-creator/qt-creator
CppEditor: Add missing include and ifdefs
Change-Id: I34b1d0f4fb10c7fcba6e6b7bc1b3d964e154db3a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
#include <cplusplus/Lexer.h>
|
#include <cplusplus/Lexer.h>
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <QTextCharFormat>
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
#include <QTextLayout>
|
#include <QTextLayout>
|
||||||
|
|
||||||
@@ -460,6 +461,7 @@ void CppHighlighter::highlightDoxygenComment(const QString &text, int position,
|
|||||||
setFormatWithSpaces(text, initial, it - uc - initial, format);
|
setFormatWithSpaces(text, initial, it - uc - initial, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
CppHighlighterTest::CppHighlighterTest()
|
CppHighlighterTest::CppHighlighterTest()
|
||||||
{
|
{
|
||||||
@@ -541,6 +543,7 @@ void CppHighlighterTest::test()
|
|||||||
QCOMPARE(actualFormat, expectedFormat);
|
QCOMPARE(actualFormat, expectedFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
#endif // WITH_TESTS
|
||||||
|
|
||||||
} // namespace CppEditor
|
} // namespace CppEditor
|
||||||
|
@@ -9,7 +9,9 @@
|
|||||||
|
|
||||||
#include <cplusplus/Token.h>
|
#include <cplusplus/Token.h>
|
||||||
|
|
||||||
#include <QTextCharFormat>
|
#ifdef WITH_TESTS
|
||||||
|
#include <QTextDocument>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace CppEditor {
|
namespace CppEditor {
|
||||||
|
|
||||||
@@ -37,6 +39,7 @@ private:
|
|||||||
CPlusPlus::LanguageFeatures m_languageFeatures = CPlusPlus::LanguageFeatures::defaultFeatures();
|
CPlusPlus::LanguageFeatures m_languageFeatures = CPlusPlus::LanguageFeatures::defaultFeatures();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef WITH_TESTS
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
class CppHighlighterTest : public CppHighlighter
|
class CppHighlighterTest : public CppHighlighter
|
||||||
{
|
{
|
||||||
@@ -53,5 +56,6 @@ private:
|
|||||||
QTextDocument m_doc;
|
QTextDocument m_doc;
|
||||||
};
|
};
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
#endif // WITH_TESTS
|
||||||
|
|
||||||
} // namespace CppEditor
|
} // namespace CppEditor
|
||||||
|
Reference in New Issue
Block a user