Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/telegram/telegramplugin.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | 40 | public: | |||
---|---|---|---|---|---|
43 | {} | 43 | {} | ||
44 | 44 | | |||
45 | QStringList arrayToList(const QJsonArray& array) | 45 | QStringList arrayToList(const QJsonArray& array) | ||
46 | { | 46 | { | ||
47 | QStringList ret; | 47 | QStringList ret; | ||
48 | foreach(const QJsonValue& val, array) { | 48 | foreach(const QJsonValue& val, array) { | ||
49 | QUrl url(val.toString()); | 49 | QUrl url(val.toString()); | ||
50 | if(url.isLocalFile()) { | 50 | if(url.isLocalFile()) { | ||
51 | ret += url.toLocalFile(); | 51 | ret += KShell::quoteArg(url.toLocalFile()); | ||
52 | } | 52 | } | ||
53 | } | 53 | } | ||
54 | return ret; | 54 | return ret; | ||
55 | } | 55 | } | ||
56 | 56 | | |||
57 | void start() override | 57 | void start() override | ||
58 | { | 58 | { | ||
59 | for (const QString &desktopFile: {QStringLiteral("org.telegram.desktop.desktop"), QStringLiteral("telegramdesktop.desktop") }) { | 59 | for (const QString &desktopFile: {QStringLiteral("org.telegram.desktop.desktop"), QStringLiteral("telegramdesktop.desktop") }) { | ||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |