Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/krun.cpp
Show First 20 Lines • Show All 767 Lines • ▼ Show 20 Line(s) | 766 | if ((flags & DeleteTemporaryFiles) == 0) { | |||
---|---|---|---|---|---|
768 | for (const QUrl &url : urls) { | 768 | for (const QUrl &url : urls) { | ||
769 | KRecentDocument::add(url, service.desktopEntryName()); | 769 | KRecentDocument::add(url, service.desktopEntryName()); | ||
770 | } | 770 | } | ||
771 | } | 771 | } | ||
772 | 772 | | |||
773 | return runApplicationImpl(service, urls, window, flags, suggestedFileName, asn); | 773 | return runApplicationImpl(service, urls, window, flags, suggestedFileName, asn); | ||
774 | } | 774 | } | ||
775 | 775 | | |||
776 | #ifndef KIOWIDGETS_NO_DEPRECATED | ||||
776 | qint64 KRun::runService(const KService &_service, const QList<QUrl> &_urls, QWidget *window, | 777 | qint64 KRun::runService(const KService &_service, const QList<QUrl> &_urls, QWidget *window, | ||
777 | bool tempFiles, const QString &suggestedFileName, const QByteArray &asn) | 778 | bool tempFiles, const QString &suggestedFileName, const QByteArray &asn) | ||
778 | { | 779 | { | ||
779 | if (!_service.entryPath().isEmpty() && | 780 | if (!_service.entryPath().isEmpty() && | ||
780 | !KDesktopFile::isAuthorizedDesktopFile(_service.entryPath()) && | 781 | !KDesktopFile::isAuthorizedDesktopFile(_service.entryPath()) && | ||
781 | !::makeServiceExecutable(_service, window)) { | 782 | !::makeServiceExecutable(_service, window)) { | ||
782 | return 0; | 783 | return 0; | ||
783 | } | 784 | } | ||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 844 | if (i != 0) { | |||
844 | //qDebug() << error; | 845 | //qDebug() << error; | ||
845 | KMessageBox::sorry(window, error); | 846 | KMessageBox::sorry(window, error); | ||
846 | return 0; | 847 | return 0; | ||
847 | } | 848 | } | ||
848 | 849 | | |||
849 | //qDebug() << "startServiceByDesktopPath worked fine"; | 850 | //qDebug() << "startServiceByDesktopPath worked fine"; | ||
850 | return pid; | 851 | return pid; | ||
851 | } | 852 | } | ||
853 | #endif | ||||
852 | 854 | | |||
853 | bool KRun::run(const QString &_exec, const QList<QUrl> &_urls, QWidget *window, const QString &_name, | 855 | bool KRun::run(const QString &_exec, const QList<QUrl> &_urls, QWidget *window, const QString &_name, | ||
854 | const QString &_icon, const QByteArray &asn) | 856 | const QString &_icon, const QByteArray &asn) | ||
855 | { | 857 | { | ||
856 | KService::Ptr service(new KService(_name, _exec, _icon)); | 858 | KService::Ptr service(new KService(_name, _exec, _icon)); | ||
857 | 859 | | |||
858 | return runApplication(*service, _urls, window, RunFlags{}, QString(), asn); | 860 | return runApplication(*service, _urls, window, RunFlags{}, QString(), asn); | ||
859 | } | 861 | } | ||
▲ Show 20 Lines • Show All 821 Lines • Show Last 20 Lines |