Changeset View
Changeset View
Standalone View
Standalone View
src/core/desktopexecparser.cpp
Show First 20 Lines • Show All 302 Lines • ▼ Show 20 Line(s) | 298 | if (d->tempFiles && !appHasTempFileOption && d->urls.size()) { | |||
---|---|---|---|---|---|
303 | } | 303 | } | ||
304 | result += QUrl::toStringList(d->urls); | 304 | result += QUrl::toStringList(d->urls); | ||
305 | return result; | 305 | return result; | ||
306 | } | 306 | } | ||
307 | 307 | | |||
308 | // Check if we need kioexec | 308 | // Check if we need kioexec | ||
309 | bool useKioexec = false; | 309 | bool useKioexec = false; | ||
310 | if (!mx1.hasUrls) { | 310 | if (!mx1.hasUrls) { | ||
311 | Q_FOREACH (const QUrl &url, d->urls) | 311 | for (const QUrl &url : qAsConst(d->urls)) { | ||
312 | if (!url.isLocalFile() && !hasSchemeHandler(url)) { | 312 | if (!url.isLocalFile() && !hasSchemeHandler(url)) { | ||
313 | useKioexec = true; | 313 | useKioexec = true; | ||
314 | //qCDebug(KIO_CORE) << "non-local files, application does not support urls, using kioexec"; | 314 | //qCDebug(KIO_CORE) << "non-local files, application does not support urls, using kioexec"; | ||
315 | break; | 315 | break; | ||
316 | } | 316 | } | ||
317 | } | ||||
317 | } else { // app claims to support %u/%U, check which protocols | 318 | } else { // app claims to support %u/%U, check which protocols | ||
318 | QStringList appSupportedProtocols = supportedProtocols(d->service); | 319 | QStringList appSupportedProtocols = supportedProtocols(d->service); | ||
319 | Q_FOREACH (const QUrl &url, d->urls) { | 320 | for (const QUrl &url : qAsConst(d->urls)) { | ||
320 | if (!isProtocolInSupportedList(url, appSupportedProtocols) && !hasSchemeHandler(url)) { | 321 | if (!isProtocolInSupportedList(url, appSupportedProtocols) && !hasSchemeHandler(url)) { | ||
321 | useKioexec = true; | 322 | useKioexec = true; | ||
322 | //qCDebug(KIO_CORE) << "application does not support url, using kioexec:" << url; | 323 | //qCDebug(KIO_CORE) << "application does not support url, using kioexec:" << url; | ||
323 | break; | 324 | break; | ||
324 | } | 325 | } | ||
325 | } | 326 | } | ||
326 | } | 327 | } | ||
327 | if (useKioexec) { | 328 | if (useKioexec) { | ||
▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines |