KIO
kprocessrunner.cpp
104 if (!notYetSupportedOpenActivationNeeded && DBusActivationRunner::activationPossible(service, flags, suggestedFileName)) {
106 auto action = std::find_if(actions.cbegin(), actions.cend(), [service](const KServiceAction &action) {
118 instance->emitDelayedError(i18n("The desktop entry file\n%1\nis not valid.", serviceEntryPath));
171 if (cmd.startsWith(QLatin1String("wt.exe")) || cmd.startsWith(QLatin1String("pwsh.exe")) || cmd.startsWith(QLatin1String("powershell.exe"))) {
172 instance->m_process->setCreateProcessArgumentsModifier([](QProcess::CreateProcessArguments *args) {
231void KProcessRunner::init(const KService::Ptr &service, const QString &serviceEntryPath, const QString &userVisibleName, const QByteArray &asn)
234 if (service && !serviceEntryPath.isEmpty() && !KDesktopFile::isAuthorizedDesktopFile(serviceEntryPath)) {
268 const bool startup_notify = (asn != "0" && KIOGuiPrivate::checkStartupNotify(service.data(), &silent, &wmclass));
274 // When it comes from a desktop file, m_executable can be a full shell command, so <bin> here is not 100% reliable.
341 connect(m_process.get(), &QProcess::started, this, &ForkingProcessRunner::slotProcessStarted, Qt::QueuedConnection);
342 connect(m_process.get(), &QProcess::errorOccurred, this, &ForkingProcessRunner::slotProcessError);
360 // This is unlikely to happen while the ApplicationLauncherJob is still connected to the KProcessRunner.
404 data.addPid(static_cast<int>(m_pid)); // announce this pid for the startup notification has finished
422 if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == ':' || c == '_' || c == '.') {
464 emitDelayedError(xi18nc("@info", "The command <command>%1</command> could not be found.", args[0])); // Calls deleteLater().
471bool KIOGuiPrivate::checkStartupNotify(const KService *service, bool *silent_arg, QByteArray *wmclass_arg)
static bool isAuthorizedDesktopFile(const QString &path)
@ DeleteTemporaryFiles
the URLs passed to the service will be deleted when it exits (if the URLs are local files)
Definition applicationlauncherjob.h:106
Parses the Exec= line from a .desktop file, and process all the '%' placeholders, e....
static QString executablePath(const QString &execLine)
Given a full command line (e.g. the Exec= line from a .desktop file), extract the name of the executa...
Definition desktopexecparser.cpp:589
static QString executableName(const QString &execLine)
Given a full command line (e.g. the Exec= line from a .desktop file), extract the name of the executa...
Definition desktopexecparser.cpp:582
static void add(const QUrl &url)
Add a new item to the Recent Document menu.
Definition krecentdocument.cpp:485
QString desktopEntryName() const
QList< KServiceAction > actions() const
QString genericName() const
T property(const QString &name) const
static Ptr serviceByDesktopName(const QString &_name)
QString menuId() const
QString exec() const
QString icon() const
QString workingDirectory() const
std::optional< bool > startupNotify() const
bool isApplication() const
bool runOnDiscreteGpu() const
void setHostname(const QByteArray &hostname=QByteArray())
const QString & name() const
void addPid(pid_t pid)
void setName(const QString &name)
void setWMClass(const QByteArray &wmclass)
void setIcon(const QString &icon)
void setBin(const QString &bin)
void setDescription(const QString &descr)
void setSilent(TriState state)
void setApplicationId(const QString &desktop)
static bool sendStartup(const KStartupInfoId &id, const KStartupInfoData &data)
static bool sendChange(const KStartupInfoId &id, const KStartupInfoData &data)
static void resetStartupEnv()
static bool sendFinish(const KStartupInfoId &id)
bool isValid() const
QString name() const
QString entryPath() const
void xdgActivationTokenArrived(int serial, const QString &token)
static Q_INVOKABLE void requestXdgActivationToken(QWindow *win, uint32_t serial, const QString &app_id)
static Q_INVOKABLE quint32 lastInputSerial(QWindow *window)
static bool isPlatformWayland()
QString xi18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
void init(KXmlGuiWindow *window, KGameDifficulty *difficulty=nullptr)
QString name(GameStandardAction id)
QWidget * window(QObject *job)
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
bool isEmpty() const const
int exec(ProcessEventsFlags flags)
void quit()
QString absoluteFilePath() const const
QString canonicalPath() const const
platformName
T & first()
bool isEmpty() const const
bool invokeMethod(QObject *context, Functor &&function, FunctorReturnType *ret)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
ExitStatus
ProcessError
NotRunning
void errorOccurred(QProcess::ProcessError error)
void finished(int exitCode, QProcess::ExitStatus exitStatus)
QProcessEnvironment processEnvironment() const const
void setProcessEnvironment(const QProcessEnvironment &environment)
void started()
void stateChanged(QProcess::ProcessState newState)
void insert(const QProcessEnvironment &e)
bool isEmpty() const const
QProcessEnvironment systemEnvironment()
QString findExecutable(const QString &executableName, const QStringList &paths)
QString arg(Args &&... args) const const
QString fromUtf8(QByteArrayView str)
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString left(qsizetype n) const const
QString mid(qsizetype position, qsizetype n) const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QByteArray toUtf8() const const
SingleShotConnection
QTextStream & bin(QTextStream &stream)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:50:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:50:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.