Changeset View
Changeset View
Standalone View
Standalone View
src/util/externalcommand.h
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Line(s) | 70 | public: | |||
---|---|---|---|---|---|
96 | /**< @return the command output */ | 96 | /**< @return the command output */ | ||
97 | const QString output() const; | 97 | const QString output() const; | ||
98 | /**< @return the command output */ | 98 | /**< @return the command output */ | ||
99 | const QByteArray& rawOutput() const; | 99 | const QByteArray& rawOutput() const; | ||
100 | 100 | | |||
101 | /**< @return pointer to the Report or nullptr */ | 101 | /**< @return pointer to the Report or nullptr */ | ||
102 | Report* report(); | 102 | Report* report(); | ||
103 | 103 | | |||
104 | void emitReport(const QVariantMap& report) { emit reportSignal(report); } | | |||
105 | | ||||
106 | // KAuth | 104 | // KAuth | ||
107 | /**< start ExternalCommand Helper */ | 105 | /**< start ExternalCommand Helper */ | ||
108 | bool startHelper(); | 106 | bool startHelper(); | ||
109 | 107 | | |||
110 | /**< stop ExternalCommand Helper */ | 108 | /**< stop ExternalCommand Helper */ | ||
111 | static void stopHelper(); | 109 | static void stopHelper(); | ||
112 | 110 | | |||
113 | /**< Sets a parent widget for the authentication dialog. | 111 | /**< Sets a parent widget for the authentication dialog. | ||
114 | * @param p parent widget | 112 | * @param p parent widget | ||
115 | */ | 113 | */ | ||
116 | static void setParentWidget(QWidget *p) { | 114 | static void setParentWidget(QWidget *p) { | ||
117 | parent = p; | 115 | parent = p; | ||
118 | } | 116 | } | ||
119 | 117 | | |||
120 | Q_SIGNALS: | 118 | Q_SIGNALS: | ||
121 | void progress(int); | 119 | void progress(int); | ||
122 | void reportSignal(const QVariantMap&); | 120 | void reportSignal(const QVariantMap&); | ||
123 | 121 | | |||
124 | public Q_SLOTS: | 122 | public Q_SLOTS: | ||
125 | void emitProgress(KJob*, unsigned long percent) { emit progress(percent); }; | 123 | void emitProgress(KJob*, unsigned long percent) { emit progress(percent); }; | ||
124 | void emitReport(const QVariantMap& report) { emit reportSignal(report); } | ||||
126 | 125 | | |||
127 | private: | 126 | private: | ||
128 | void setExitCode(int i); | 127 | void setExitCode(int i); | ||
129 | 128 | | |||
130 | void onReadOutput(); | 129 | void onReadOutput(); | ||
131 | static quint64 getNonce(QDBusInterface& iface); | 130 | static quint64 getNonce(QDBusInterface& iface); | ||
132 | 131 | | |||
133 | private: | 132 | private: | ||
Show All 12 Lines |