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 <QFile>
|
||||
#include <QTextCharFormat>
|
||||
#include <QTextDocument>
|
||||
#include <QTextLayout>
|
||||
|
||||
@@ -460,6 +461,7 @@ void CppHighlighter::highlightDoxygenComment(const QString &text, int position,
|
||||
setFormatWithSpaces(text, initial, it - uc - initial, format);
|
||||
}
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
namespace Internal {
|
||||
CppHighlighterTest::CppHighlighterTest()
|
||||
{
|
||||
@@ -541,6 +543,7 @@ void CppHighlighterTest::test()
|
||||
QCOMPARE(actualFormat, expectedFormat);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
#endif // WITH_TESTS
|
||||
|
||||
} // namespace CppEditor
|
||||
|
@@ -9,7 +9,9 @@
|
||||
|
||||
#include <cplusplus/Token.h>
|
||||
|
||||
#include <QTextCharFormat>
|
||||
#ifdef WITH_TESTS
|
||||
#include <QTextDocument>
|
||||
#endif
|
||||
|
||||
namespace CppEditor {
|
||||
|
||||
@@ -37,6 +39,7 @@ private:
|
||||
CPlusPlus::LanguageFeatures m_languageFeatures = CPlusPlus::LanguageFeatures::defaultFeatures();
|
||||
};
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
namespace Internal {
|
||||
class CppHighlighterTest : public CppHighlighter
|
||||
{
|
||||
@@ -53,5 +56,6 @@ private:
|
||||
QTextDocument m_doc;
|
||||
};
|
||||
} // namespace Internal
|
||||
#endif // WITH_TESTS
|
||||
|
||||
} // namespace CppEditor
|
||||
|
Reference in New Issue
Block a user