Changeset View
Changeset View
Standalone View
Standalone View
ui/fileprinterpreview.cpp
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 85 | if (filename.endsWith(QStringLiteral(".ps"))) { | |||
---|---|---|---|---|---|
86 | /* Explicitly look for the Okular/Ghostview part: no other PostScript | 86 | /* Explicitly look for the Okular/Ghostview part: no other PostScript | ||
87 | parts are available now; other parts which handles text are not | 87 | parts are available now; other parts which handles text are not | ||
88 | suitable here (PostScript source code) */ | 88 | suitable here (PostScript source code) */ | ||
89 | offers = | 89 | offers = | ||
90 | KMimeTypeTrader::self()->query(QStringLiteral("application/postscript"), | 90 | KMimeTypeTrader::self()->query(QStringLiteral("application/postscript"), | ||
91 | QStringLiteral("KParts/ReadOnlyPart"), | 91 | QStringLiteral("KParts/ReadOnlyPart"), | ||
92 | QStringLiteral("[DesktopEntryName] == 'okularghostview'")); | 92 | QStringLiteral("[DesktopEntryName] == 'okularghostview'")); | ||
93 | } else { | 93 | } else { | ||
94 | offers = KMimeTypeTrader::self()->query("application/pdf", "KParts/ReadOnlyPart"); | 94 | offers = KMimeTypeTrader::self()->query(QStringLiteral("application/pdf"), QStringLiteral("KParts/ReadOnlyPart")); | ||
95 | } | 95 | } | ||
96 | 96 | | |||
97 | KService::List::ConstIterator it = offers.constBegin(); | 97 | KService::List::ConstIterator it = offers.constBegin(); | ||
98 | while (!factory && it != offers.constEnd()) { | 98 | while (!factory && it != offers.constEnd()) { | ||
99 | KPluginLoader loader(**it); | 99 | KPluginLoader loader(**it); | ||
100 | factory = loader.factory(); | 100 | factory = loader.factory(); | ||
101 | if (!factory) { | 101 | if (!factory) { | ||
102 | qCDebug(OkularUiDebug) << "Loading failed:" << loader.errorString(); | 102 | qCDebug(OkularUiDebug) << "Loading failed:" << loader.errorString(); | ||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |