KIO
openfilemanagerwindowjob.cpp
105 OpenFileManagerWindowJob *highlightInFileManager(const QList<QUrl> &urls, const QByteArray &asn)
116 QObject::connect(KWindowSystem::self(), &KWindowSystem::xdgActivationTokenArrived, job, [launchedSerial, job](int serial, const QString &token) {
135 QDBusMessage msg = QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.FileManager1"),
144 QObject::connect(watcher, &QDBusPendingCallWatcher::finished, m_job, [=](QDBusPendingCallWatcher *watcher) {
161 KIO::OpenUrlJob *urlJob = new KIO::OpenUrlJob(urls.at(0).adjusted(QUrl::RemoveFilename), QStringLiteral("inode/directory"));
162 urlJob->setUiDelegate(KIO::createDefaultJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, KJobWidgets::window(m_job)));
bool isNull() const const
void finished(QDBusPendingCallWatcher *self)
QString fromUtf8(const char *str, int size)
virtual Q_SCRIPTABLE void start()=0
QStringList toStringList(const QList< QUrl > &urls, QUrl::FormattingOptions options)
OpenFileManagerWindowJob * highlightInFileManager(const QList< QUrl > &urls, const QByteArray &asn)
Convenience method for creating a job to highlight a certain file or folder.
Definition: openfilemanagerwindowjob.cpp:105
void result(KJob *job)
Q_SCRIPTABLE Q_NOREPLY void start()
bool isError() const const
QByteArray toLatin1() const const
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QList< QUrl > highlightUrls() const
The files and/or folders to highlight.
Definition: openfilemanagerwindowjob.cpp:74
OpenFileManagerWindowJob(QObject *parent=nullptr)
Creates an OpenFileManagerWindowJob.
Definition: openfilemanagerwindowjob.cpp:61
void setStartupId(const QByteArray &startupId)
Sets the platform-specific startup id of the file manager launch.
Definition: openfilemanagerwindowjob.cpp:89
void deleteLater()
QDBusConnection sessionBus()
RemoveFilename
void xdgActivationTokenArrived(int serial, const QString &token)
static Q_INVOKABLE quint32 lastInputSerial(QWindow *window)
const T & at(int i) const const
KIOCORE_EXPORT KJobUiDelegate * createDefaultJobUiDelegate()
Convenience method: use default factory, if there's one, to create a delegate and return it.
Definition: jobuidelegatefactory.cpp:23
~OpenFileManagerWindowJob() override
Destroys the OpenFileManagerWindowJob.
OpenUrlJob finds out the right way to "open" a URL. This includes finding out its MIME type,...
Definition: openurljob.h:41
QDBusMessage createMethodCall(const QString &service, const QString &path, const QString &interface, const QString &method)
static KWindowSystem * self()
static Q_INVOKABLE void requestXdgActivationToken(QWindow *win, uint32_t serial, const QString &app_id)
void setStartupId(const QByteArray &startupId)
Sets the platform-specific startup id of the application launch.
Definition: openurljob.cpp:115
AutoHandlingEnabled
void setUiDelegate(KJobUiDelegate *delegate)
QUrl adjusted(QUrl::FormattingOptions options) const const
void emitResult()
int error() const
KJOBWIDGETS_EXPORT QWidget * window(KJob *job)
@ NoValidUrlsError
No valid URLs to highlight have been specified.
Definition: openfilemanagerwindowjob.h:66
QDBusPendingCall asyncCall(const QDBusMessage &message, int timeout) const const
void setError(int errorCode)
void setHighlightUrls(const QList< QUrl > &highlightUrls)
Set the files and/or folders to highlight.
Definition: openfilemanagerwindowjob.cpp:79
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:00:36 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:00:36 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.