aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmakeprojectmanager/makefileparse.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2024-01-15 18:30:16 +0100
committerhjk <[email protected]>2024-01-16 09:53:43 +0000
commit2a02866787cd56aeb5c47031e75957e35a263119 (patch)
treecfc4f8c63d0c3792285b377f6c7ce991e9c00871 /src/plugins/qmakeprojectmanager/makefileparse.cpp
parentb1ec196c14894d1c0c1ce371c4780192623215d9 (diff)
QmakeProjectManager: Hide plugin class definition in .cpp
Change-Id: If813b4eef86084a126c1d4a45e53b056d55f7caf Reviewed-by: Jarek Kobus <[email protected]>
Diffstat (limited to 'src/plugins/qmakeprojectmanager/makefileparse.cpp')
-rw-r--r--src/plugins/qmakeprojectmanager/makefileparse.cpp36
1 files changed, 24 insertions, 12 deletions
diff --git a/src/plugins/qmakeprojectmanager/makefileparse.cpp b/src/plugins/qmakeprojectmanager/makefileparse.cpp
index de8ff427863..60a04cee0a8 100644
--- a/src/plugins/qmakeprojectmanager/makefileparse.cpp
+++ b/src/plugins/qmakeprojectmanager/makefileparse.cpp
@@ -18,8 +18,7 @@ using namespace ProjectExplorer;
using namespace QtSupport;
using namespace Utils;
-namespace QmakeProjectManager {
-namespace Internal {
+namespace QmakeProjectManager::Internal {
static QString findQMakeLine(const FilePath &makefile, const QString &key)
{
@@ -365,23 +364,26 @@ void MakeFileParse::parseCommandLine(const QString &command, const QString &proj
}
}
-} // Internal
-} // QmakeProjectManager
-
-// Unit tests:
+} // QmakeProjectManager::Internal
#ifdef WITH_TESTS
-#include "qmakeprojectmanagerplugin.h"
-
#include <projectexplorer/outputparser_test.h>
#include <QTest>
-using namespace QmakeProjectManager::Internal;
-using namespace ProjectExplorer;
+namespace QmakeProjectManager::Internal {
+
+class QmakeMakeFileParserTest final : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testMakefileParser_data();
+ void testMakefileParser();
+};
-void QmakeProjectManagerPlugin::testMakefileParser_data()
+void QmakeMakeFileParserTest::testMakefileParser_data()
{
QTest::addColumn<QString>("command");
QTest::addColumn<QString>("project");
@@ -478,7 +480,7 @@ void QmakeProjectManagerPlugin::testMakefileParser_data()
<< true << false << false << 2;
}
-void QmakeProjectManagerPlugin::testMakefileParser()
+void QmakeMakeFileParserTest::testMakefileParser()
{
QFETCH(QString, command);
QFETCH(QString, project);
@@ -502,4 +504,14 @@ void QmakeProjectManagerPlugin::testMakefileParser()
QCOMPARE(qmsc.useQtQuickCompiler == TriState::Enabled, useQtQuickCompiler);
QCOMPARE(qmsc.separateDebugInfo == TriState::Enabled, separateDebugInfo);
}
+
+QObject *createQmakeMakeFileParserTest()
+{
+ return new QmakeMakeFileParserTest;
+}
+
+} // QmakeProjectManager::Internal
+
#endif
+
+#include "makefileparse.moc"