mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
generic: remove unused X-KDE-autostart-after feature
klipper and kmix set it to "panel" in their .desktop files but that's not valid application/service Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a684811e80
commit
e851a35ee5
4 changed files with 2 additions and 66 deletions
|
@ -319,9 +319,4 @@ void KAutostart::removeFromExcludedEnvironments(const QString& environment)
|
|||
setExcludedEnvironments(envs);
|
||||
}
|
||||
|
||||
QString KAutostart::startAfter() const
|
||||
{
|
||||
return d->df->desktopGroup().readEntry("X-KDE-autostart-after");
|
||||
}
|
||||
|
||||
#include "moc_kautostart.cpp"
|
||||
|
|
|
@ -263,14 +263,6 @@ class KDECORE_EXPORT KAutostart : public QObject
|
|||
*/
|
||||
void removeFromExcludedEnvironments(const QString& environment);
|
||||
|
||||
/**
|
||||
* Returns the name of another service that should be autostarted
|
||||
* before this one (if that service would be autostarted).
|
||||
* @internal
|
||||
* @since 4.3
|
||||
*/
|
||||
QString startAfter() const;
|
||||
|
||||
/**
|
||||
* Checks whether autostart is allowed in the given environment,
|
||||
* depending on allowedEnvironments() and excludedEnvironments().
|
||||
|
|
|
@ -28,16 +28,6 @@ contain the following optional entries to control its autostart:
|
|||
'default' is 'true'.
|
||||
If the entry is not within a group, the group entry can be left empty.
|
||||
|
||||
X-KDE-autostart-after = desktop_name
|
||||
|
||||
desktop_name = the name of another .desktop file excluding path and
|
||||
the .desktop suffix. E.g. panel.desktop would appear
|
||||
as 'X-KDE-autostart-after=panel'
|
||||
|
||||
Waits until the .desktop file specified by 'desktop_name' has been
|
||||
autostarted. The entry is ignored if the specified application is not
|
||||
scheduled in the same autostart phase as this .desktop file.
|
||||
|
||||
X-KDE-autostart-phase = phase
|
||||
|
||||
phase = 1 or 2
|
||||
|
|
|
@ -29,7 +29,6 @@ class AutoStartItem
|
|||
public:
|
||||
QString name;
|
||||
QString service;
|
||||
QString startAfter;
|
||||
int phase;
|
||||
};
|
||||
|
||||
|
@ -91,7 +90,6 @@ AutoStart::loadAutoStartList()
|
|||
AutoStartItem *item = new AutoStartItem;
|
||||
item->name = extractName(it);
|
||||
item->service = it;
|
||||
item->startAfter = config.startAfter();
|
||||
item->phase = config.startPhase();
|
||||
if (item->phase < 0)
|
||||
item->phase = 0;
|
||||
|
@ -105,50 +103,11 @@ AutoStart::startService()
|
|||
if (m_startList->isEmpty())
|
||||
return QString();
|
||||
|
||||
while(!m_started.isEmpty())
|
||||
{
|
||||
|
||||
// Check for items that depend on previously started items
|
||||
QString lastItem = m_started[0];
|
||||
// Just start something in this phase
|
||||
QMutableListIterator<AutoStartItem *> it(*m_startList);
|
||||
while (it.hasNext())
|
||||
{
|
||||
AutoStartItem *item = it.next();
|
||||
if (item->phase == m_phase
|
||||
&& item->startAfter == lastItem)
|
||||
{
|
||||
m_started.prepend(item->name);
|
||||
QString service = item->service;
|
||||
it.remove();
|
||||
delete item;
|
||||
return service;
|
||||
}
|
||||
}
|
||||
m_started.removeFirst();
|
||||
}
|
||||
|
||||
// Check for items that don't depend on anything
|
||||
AutoStartItem *item;
|
||||
QMutableListIterator<AutoStartItem *> it(*m_startList);
|
||||
while (it.hasNext())
|
||||
{
|
||||
item = it.next();
|
||||
if (item->phase == m_phase
|
||||
&& item->startAfter.isEmpty())
|
||||
{
|
||||
m_started.prepend(item->name);
|
||||
QString service = item->service;
|
||||
it.remove();
|
||||
delete item;
|
||||
return service;
|
||||
}
|
||||
}
|
||||
|
||||
// Just start something in this phase
|
||||
it = *m_startList;
|
||||
while (it.hasNext())
|
||||
{
|
||||
item = it.next();
|
||||
if (item->phase == m_phase)
|
||||
{
|
||||
m_started.prepend(item->name);
|
||||
|
|
Loading…
Add table
Reference in a new issue