Changeset View
Changeset View
Standalone View
Standalone View
src/service/plugins/runapplication/RunApplicationPlugin.cpp
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | |||||
114 | 114 | | |||
115 | void RunApplicationPlugin::executeIn(const QString &path) const | 115 | void RunApplicationPlugin::executeIn(const QString &path) const | ||
116 | { | 116 | { | ||
117 | QDir directory(path); | 117 | QDir directory(path); | ||
118 | for (const auto& item: directory.entryList(QDir::Files)) { | 118 | for (const auto& item: directory.entryList(QDir::Files)) { | ||
119 | QString filePath = directory.filePath(item); | 119 | QString filePath = directory.filePath(item); | ||
120 | KService service(filePath); | 120 | KService service(filePath); | ||
121 | if (service.isValid() && service.isApplication()) { | 121 | if (service.isValid() && service.isApplication()) { | ||
122 | qDebug() << "Starting: " << service.exec(); | 122 | qCDebug(KAMD_LOG_APPLICATION) << "Starting: " << service.exec(); | ||
123 | QProcess::startDetached(service.exec()); | 123 | QProcess::startDetached(service.exec()); | ||
124 | } else { | 124 | } else { | ||
125 | qDebug() << "Openning file: " << QUrl::fromLocalFile(filePath); | 125 | qCDebug(KAMD_LOG_APPLICATION) << "Openning file: " << QUrl::fromLocalFile(filePath); | ||
126 | QDesktopServices::openUrl(QUrl::fromLocalFile(filePath)); | 126 | QDesktopServices::openUrl(QUrl::fromLocalFile(filePath)); | ||
127 | } | 127 | } | ||
128 | } | 128 | } | ||
129 | } | 129 | } | ||
130 | 130 | | |||
131 | // void RunApplicationPlugin::activityRemoved(const QString &activity) | 131 | // void RunApplicationPlugin::activityRemoved(const QString &activity) | ||
132 | // { | 132 | // { | ||
133 | // // TODO: Clean up the directory | 133 | // // TODO: Clean up the directory | ||
134 | // } | 134 | // } | ||
135 | 135 | | |||
136 | #include "RunApplicationPlugin.moc" | 136 | #include "RunApplicationPlugin.moc" | ||
137 | 137 | |