| 169 | } |
| 170 | |
| 171 | void TestCMakeManager::testKF6App() |
| 172 | { |
| 173 | IProject* project = loadProject(QStringLiteral("kf6_app")); |
| 174 | |
| 175 | Path mainCpp(project->path(), QStringLiteral("main.cpp")); |
| 176 | QVERIFY(QFile::exists(mainCpp.toLocalFile())); |
| 177 | const QList<ProjectBaseItem*> items = project->itemsForPath(IndexedString(mainCpp.pathOrUrl())); |
| 178 | QCOMPARE(items.size(), 2); // once the plain file, once the target |
| 179 | |
| 180 | bool foundCore = false, foundGui = false, foundWidgets = false, foundWidgetsAddons = false; |
| 181 | for (ProjectBaseItem* mainCppItem : items) { |
| 182 | const Path::List includeDirs = project->buildSystemManager()->includeDirectories(mainCppItem); |
| 183 | qDebug() << "xxxxxxxxx" << includeDirs; |
| 184 | for (const Path& include : includeDirs) { |
| 185 | QString filename = include.lastPathSegment(); |
| 186 | foundCore |= filename == QLatin1String("QtCore"); |
| 187 | foundGui |= filename == QLatin1String("QtGui"); |
| 188 | foundWidgets |= filename == QLatin1String("QtWidgets"); |
| 189 | foundWidgetsAddons |= filename == QLatin1String("KWidgetsAddons"); |
| 190 | } |
| 191 | } |
| 192 | QVERIFY(foundCore); |
| 193 | QVERIFY(foundGui); |
| 194 | QVERIFY(foundWidgets); |
| 195 | QVERIFY(foundWidgetsAddons); |
| 196 | } |
| 197 | |
| 198 | void TestCMakeManager::testDefines() |
| 199 | { |
nothing calls this directly
no test coverage detected