Changeset View
Changeset View
Standalone View
Standalone View
autotests/kdesktopfiletest.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 39 | { | |||
---|---|---|---|---|---|
57 | QCOMPARE(df.readName(), QString::fromLatin1("My Application")); | 57 | QCOMPARE(df.readName(), QString::fromLatin1("My Application")); | ||
58 | QCOMPARE(df.readIcon(), QString::fromLatin1("foo")); | 58 | QCOMPARE(df.readIcon(), QString::fromLatin1("foo")); | ||
59 | QCOMPARE(df.readMimeTypes(), QStringList() << QString::fromLatin1("text/plain") | 59 | QCOMPARE(df.readMimeTypes(), QStringList() << QString::fromLatin1("text/plain") | ||
60 | << QString::fromLatin1("image/png")); | 60 | << QString::fromLatin1("image/png")); | ||
61 | QVERIFY(!df.hasLinkType()); | 61 | QVERIFY(!df.hasLinkType()); | ||
62 | QCOMPARE(df.fileName(), QFileInfo(fileName).canonicalFilePath()); | 62 | QCOMPARE(df.fileName(), QFileInfo(fileName).canonicalFilePath()); | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | #ifndef KDE_NO_DEPRECATED | 65 | #if KCONFIGCORE_ENABLE_DEPRECATED_SINCE(5, 0) | ||
66 | void KDesktopFileTest::testReadDirectory() | 66 | void KDesktopFileTest::testReadDirectory() | ||
67 | { | 67 | { | ||
68 | QTemporaryFile file("testReadDirectoryXXXXXX.directory"); | 68 | QTemporaryFile file("testReadDirectoryXXXXXX.directory"); | ||
69 | QVERIFY(file.open()); | 69 | QVERIFY(file.open()); | ||
70 | const QString fileName = file.fileName(); | 70 | const QString fileName = file.fileName(); | ||
71 | QTextStream ts(&file); | 71 | QTextStream ts(&file); | ||
72 | ts << | 72 | ts << | ||
73 | "[Desktop Entry]\n" | 73 | "[Desktop Entry]\n" | ||
▲ Show 20 Lines • Show All 236 Lines • Show Last 20 Lines |