[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kinit
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2009-10-16 16:22:51
Message-ID: 1255710171.034601.18548.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1036111 by aseigo:
revert last commit; the autostart spec doesn't include merging. disappointing.
M +18 -23 autostart.cpp
M +1 -2 klauncher.cpp
--- trunk/KDE/kdelibs/kinit/autostart.cpp #1036110:1036111
@@ -20,8 +20,6 @@
#define QT_NO_CAST_FROM_ASCII
#include "autostart.h"
-#include <QtCore/QDir>
-
#include <kautostart.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -66,6 +64,17 @@
m_phasedone = true;
}
+static QString extractName(QString path) // krazy:exclude=passbyvalue
+{
+ int i = path.lastIndexOf(QLatin1Char('/'));
+ if (i >= 0)
+ path = path.mid(i+1);
+ i = path.lastIndexOf(QLatin1Char('.'));
+ if (i >= 0)
+ path = path.left(i);
+ return path;
+}
+
void
AutoStart::loadAutoStartList()
{
@@ -77,31 +86,17 @@
it != files.end();
++it)
{
- QString path = *it;
- KAutostart config(path);
-
- if (!config.autostarts(QString::fromLatin1("KDE"), KAutostart::CheckAll)) {
+ KAutostart config(*it);
+ if( !config.autostarts(QString::fromLatin1("KDE"), KAutostart::CheckAll))
continue;
- }
AutoStartItem *item = new AutoStartItem;
-
- // the service is the file name part of the path
- int i = path.lastIndexOf(QDir::separator());
- if (i >= 0) {
- path = path.mid(i+1);
- }
- item->service = path;
-
- // the name is part before the file name suffix of "*.desktop"
- i = path.lastIndexOf(QLatin1Char('.'));
- if (i >= 0) {
- path = path.left(i);
- }
- item->name = path;
-
+ item->name = extractName(*it);
+ item->service = *it;
item->startAfter = config.startAfter();
- item->phase = qBound(KAutostart::BaseDesktop, config.startPhase(), KAutostart::Applications);
+ item->phase = config.startPhase();
+ if (item->phase < 0)
+ item->phase = 0;
m_startList->append(item);
}
}
--- trunk/KDE/kdelibs/kinit/klauncher.cpp #1036110:1036111
@@ -539,8 +539,7 @@
}
return;
}
- KDesktopFile df("autostart", service);
- s = new KService(&df);
+ s = new KService(service);
}
while (!start_service(s, QStringList(), QStringList(), "0", false, true, QDBusMessage()));
// Loop till we find a service that we can start.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic