diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2021-08-27 16:00:33 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2021-08-30 08:22:10 +0000 |
commit | 49211c4a5ce165a40825672c744c1511ad3db334 (patch) | |
tree | 207db1b1d71f80cb213804de645cc1642b4fdeab | |
parent | 5fe3ead73ef730fa1659bd17af206ec94a428159 (diff) |
CppEditor: Move FollowSymbolTest into the Tests namespace
This is now possible, as there is no ambiguity anymore regarding the
TestDocument class.
Change-Id: I6f736a5790d2eab1c82f5429a9292aa9d7bcda56
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
3 files changed, 8 insertions, 14 deletions
diff --git a/src/plugins/cppeditor/cppeditorplugin.cpp b/src/plugins/cppeditor/cppeditorplugin.cpp index d325766666b..041f2ca3be1 100644 --- a/src/plugins/cppeditor/cppeditorplugin.cpp +++ b/src/plugins/cppeditor/cppeditorplugin.cpp @@ -402,10 +402,10 @@ QVector<QObject *> CppEditorPlugin::createTestObjects() const { return { #ifdef WITH_TESTS - new FollowSymbolTest, new Tests::AutoCompleterTest, new Tests::DoxygenTest, new Tests::FileAndTokenActionsTest, + new Tests::FollowSymbolTest, new Tests::IncludeHierarchyTest, new Tests::InsertVirtualMethodsTest, new Tests::QuickfixTest, diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp index fd25211090d..10c78edc8a0 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.cpp @@ -123,8 +123,7 @@ QT_END_NAMESPACE typedef QByteArray _; -namespace CppEditor { -namespace Internal { +namespace CppEditor::Internal::Tests { /// A fake virtual functions assist provider that runs processor->perform() already in configure() class VirtualFunctionTestAssistProvider : public VirtualFunctionAssistProvider @@ -546,13 +545,11 @@ TestDocumentPtr F2TestCase::testFileWithTargetCursorMarker(const QList<TestDocum return TestDocumentPtr(); } -} // namespace Internal -} // namespace CppEditor +} // namespace CppEditor::Internal::Tests -Q_DECLARE_METATYPE(QList<CppEditor::Internal::TestDocumentPtr>) +Q_DECLARE_METATYPE(QList<CppEditor::Internal::Tests::TestDocumentPtr>) -namespace CppEditor { -namespace Internal { +namespace CppEditor::Internal::Tests { void FollowSymbolTest::initTestCase() { @@ -2080,8 +2077,7 @@ void FollowSymbolTest::testFollowVirtualFunctionCallMultipleDocuments() F2TestCase(F2TestCase::FollowSymbolUnderCursorAction, testFiles, finalResults); } -} // namespace Internal -} // namespace CppEditor +} // namespace CppEditor::Internal::Tests /* Potential test cases improving name lookup. diff --git a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.h b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.h index 0fec2d8751d..ce34d8a1ab7 100644 --- a/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.h +++ b/src/plugins/cppeditor/followsymbol_switchmethoddecldef_test.h @@ -27,9 +27,7 @@ #include <QObject> -// Can't use Tests namespace because someone had the clever idea to create two -// non-local TestDocument classes in this plugin. -namespace CppEditor::Internal { +namespace CppEditor::Internal::Tests { class FollowSymbolTest : public QObject { @@ -71,4 +69,4 @@ private slots: void testFollowVirtualFunctionCallMultipleDocuments(); }; -} // namespace CppEditor::Internal +} // namespace CppEditor::Internal::Tests |