Add src/launcher.h
This commit is contained in:
parent
999da7ed86
commit
1140696700
17
src/launcher.h
Normal file
17
src/launcher.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <QObject>
|
||||||
|
#include <QVariantMap>
|
||||||
|
|
||||||
|
class Launcher : public QObject {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit Launcher(QObject* parent=nullptr);
|
||||||
|
|
||||||
|
Q_INVOKABLE bool launch(const QVariantMap& entry);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool launchDesktop(const QVariantMap& e);
|
||||||
|
bool launchUrl(const QString& url);
|
||||||
|
bool launchCommand(const QString& exec, const QStringList& args);
|
||||||
|
QString sanitizeDesktopExec(QString exec) const;
|
||||||
|
};
|
||||||
Loading…
x
Reference in New Issue
Block a user