mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 07:57:19 +00:00
fix run
This commit is contained in:
parent
3193de1a85
commit
f7b7d5b6b4
@ -856,7 +856,7 @@ QList<ExtScript *> AwesomeWidget::initScripts()
|
|||||||
for (int i=0; i<dirs.count(); i++) {
|
for (int i=0; i<dirs.count(); i++) {
|
||||||
QStringList files = QDir(dirs[i]).entryList(QDir::Files, QDir::Name);
|
QStringList files = QDir(dirs[i]).entryList(QDir::Files, QDir::Name);
|
||||||
for (int j=0; j<files.count(); j++) {
|
for (int j=0; j<files.count(); j++) {
|
||||||
if (files[j].endsWith(QString(".conf"))) continue;
|
if (!files[j].endsWith(QString(".desktop"))) continue;
|
||||||
if (names.contains(files[j])) continue;
|
if (names.contains(files[j])) continue;
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Found file" << files[j] << "in" << dirs[i];
|
if (debug) qDebug() << PDEBUG << ":" << "Found file" << files[j] << "in" << dirs[i];
|
||||||
names.append(files[j]);
|
names.append(files[j]);
|
||||||
|
@ -248,13 +248,7 @@ ExtScript::ScriptData ExtScript::run(const int time)
|
|||||||
QStringList cmdList;
|
QStringList cmdList;
|
||||||
if (!_prefix.isEmpty())
|
if (!_prefix.isEmpty())
|
||||||
cmdList.append(_prefix);
|
cmdList.append(_prefix);
|
||||||
QString fullPath = fileName;
|
cmdList.append(_exec);
|
||||||
for (int i=0; i<dirs.count(); i++) {
|
|
||||||
if (!QDir(dirs[i]).entryList(QDir::Files).contains(fileName)) continue;
|
|
||||||
fullPath = dirs[i] + QDir::separator() + fileName;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
cmdList.append(fullPath);
|
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmdList.join(QChar(' '));
|
if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmdList.join(QChar(' '));
|
||||||
TaskResult process = runTask(cmdList.join(QChar(' ')));
|
TaskResult process = runTask(cmdList.join(QChar(' ')));
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
|
if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode;
|
||||||
|
@ -126,7 +126,7 @@ void ExtendedSysMon::initScripts()
|
|||||||
for (int i=0; i<dirs.count(); i++) {
|
for (int i=0; i<dirs.count(); i++) {
|
||||||
QStringList files = QDir(dirs[i]).entryList(QDir::Files, QDir::Name);
|
QStringList files = QDir(dirs[i]).entryList(QDir::Files, QDir::Name);
|
||||||
for (int j=0; j<files.count(); j++) {
|
for (int j=0; j<files.count(); j++) {
|
||||||
if (files[j].endsWith(QString(".conf"))) continue;
|
if (!files[j].endsWith(QString(".desktop"))) continue;
|
||||||
if (names.contains(files[j])) continue;
|
if (names.contains(files[j])) continue;
|
||||||
if (debug) qDebug() << PDEBUG << ":" << "Found file" << files[j] << "in" << dirs[i];
|
if (debug) qDebug() << PDEBUG << ":" << "Found file" << files[j] << "in" << dirs[i];
|
||||||
names.append(files[j]);
|
names.append(files[j]);
|
||||||
|
Loading…
Reference in New Issue
Block a user