MCPcopy Create free account
hub / github.com/KDE/kdevelop / testProjectFileIcon

Method testProjectFileIcon

kdevplatform/project/tests/test_projectmodel.cpp:535–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

533}
534
535void TestProjectModel::testProjectFileIcon()
536{
537 QMimeDatabase db;
538
539 QScopedPointer<ProjectFileItem> item(new ProjectFileItem(nullptr, Path(QDir::tempPath() + "/foo.txt")));
540 const QString txtIcon = db.mimeTypeForUrl(item->path().toUrl()).iconName();
541 QCOMPARE(item->iconName(), txtIcon);
542 item->setPath(Path(QDir::tempPath() + "/bar.cpp"));
543 QCOMPARE(item->iconName(), db.mimeTypeForUrl(item->path().toUrl()).iconName());
544 QVERIFY(item->iconName() != txtIcon);
545}
546
547QTEST_MAIN(TestProjectModel)
548

Callers

nothing calls this directly

Calls 5

PathClass · 0.50
iconNameMethod · 0.45
toUrlMethod · 0.45
pathMethod · 0.45
setPathMethod · 0.45

Tested by

no test coverage detected