Commit 5a1ffe6f authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppTools: Remove ProjectInfo::operator bool()

This one does not buy us much...

Change-Id: I1d6c4667c038d319d2c16166505a386653a9f066
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@theqtcompany.com>
parent 3f0aa880
......@@ -137,11 +137,6 @@ ProjectInfo::ProjectInfo(QPointer<ProjectExplorer::Project> project)
: m_project(project)
{}
ProjectInfo::operator bool() const
{
return isValid();
}
bool ProjectInfo::isValid() const
{
return !m_project.isNull();
......
......@@ -140,7 +140,6 @@ public:
ProjectInfo();
ProjectInfo(QPointer<ProjectExplorer::Project> project);
operator bool() const;
bool isValid() const;
QPointer<ProjectExplorer::Project> project() const;
......
......@@ -107,7 +107,7 @@ void GenericProjectPlugin::test_simple()
const QByteArray mainFile("testdata_simpleproject/main.cpp");
ProjectInfo pInfo(
setupProject("testdata_simpleproject/simpleproject.creator", mainFile, pHelper));
QVERIFY(pInfo);
QVERIFY(pInfo.isValid());
QCOMPARE(pInfo.projectParts().size(), 1);
ProjectPart::Ptr pPart = pInfo.projectParts().first();
......@@ -138,7 +138,7 @@ void GenericProjectPlugin::test_mixed1()
setupProject("testdata_mixedproject1/mixedproject1.creator",
"testdata_mixedproject1/main.cpp",
pHelper));
QVERIFY(pInfo);
QVERIFY(pInfo.isValid());
QCOMPARE(pInfo.projectParts().size(), 3);
QList<ProjectPart::Ptr> parts = pInfo.projectParts();
......@@ -183,7 +183,7 @@ void GenericProjectPlugin::test_mixed2()
setupProject("testdata_mixedproject2/mixedproject2.creator",
"testdata_mixedproject2/main.cpp",
pHelper));
QVERIFY(pInfo);
QVERIFY(pInfo.isValid());
QCOMPARE(pInfo.projectParts().size(), 2);
QList<ProjectPart::Ptr> parts = pInfo.projectParts();
......
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