| 163 | } |
| 164 | |
| 165 | void KWin::Script::run() |
| 166 | { |
| 167 | if (running() || m_starting) { |
| 168 | return; |
| 169 | } |
| 170 | |
| 171 | if (calledFromDBus()) { |
| 172 | m_invocationContext = message(); |
| 173 | setDelayedReply(true); |
| 174 | } |
| 175 | |
| 176 | m_starting = true; |
| 177 | QFutureWatcher<QByteArray> *watcher = new QFutureWatcher<QByteArray>(this); |
| 178 | connect(watcher, &QFutureWatcherBase::finished, this, &Script::slotScriptLoadedFromFile); |
| 179 | watcher->setFuture(QtConcurrent::run(&KWin::Script::loadScriptFromFile, this, fileName())); |
| 180 | } |
| 181 | |
| 182 | QByteArray KWin::Script::loadScriptFromFile(const QString &fileName) |
| 183 | { |
no test coverage detected