diff --git a/kdecore/util/kautostart.cpp b/kdecore/util/kautostart.cpp index f0ee4a75..4314c021 100644 --- a/kdecore/util/kautostart.cpp +++ b/kdecore/util/kautostart.cpp @@ -130,35 +130,9 @@ bool KAutostart::autostarts(const QString& environment, Conditions check) const starts = starts && d->df->tryExec(); } - if (check & CheckCondition) { - starts = starts && checkStartCondition(); - } - return starts; } -bool KAutostart::checkStartCondition() const -{ - QString condition = d->df->desktopGroup().readEntry("X-KDE-autostart-condition"); - if (condition.isEmpty()) - return true; - - const QStringList list = condition.split(QLatin1Char(':')); - if (list.count() < 4) { - return true; - } - - if (list[0].isEmpty() || list[2].isEmpty()) { - return true; - } - - KConfig config(list[0], KConfig::NoGlobals); - KConfigGroup cg(&config, list[1]); - - const bool defaultValue = (list[3].toLower() == QLatin1String("true")); - return cg.readEntry(list[2], defaultValue); -} - bool KAutostart::checkAllowedEnvironment(const QString& environment) const { const QStringList allowed = allowedEnvironments(); diff --git a/kdecore/util/kautostart.h b/kdecore/util/kautostart.h index 8d50ebf3..f850f920 100644 --- a/kdecore/util/kautostart.h +++ b/kdecore/util/kautostart.h @@ -84,11 +84,6 @@ class KDECORE_EXPORT KAutostart : public QObject * an executable that is checked for existence by name */ CheckCommand = 0x1, - /** - * autostart condition will be checked too (KDE-specific) - * @since 4.3 - */ - CheckCondition = 0x2, /** * all necessary conditions will be checked * @since 4.3 @@ -271,7 +266,6 @@ class KDECORE_EXPORT KAutostart : public QObject bool checkAllowedEnvironment( const QString& environment ) const; private: - bool checkStartCondition() const; class Private; Private* const d; }; diff --git a/kinit/README.autostart b/kinit/README.autostart index 62dc61b5..f0735368 100644 --- a/kinit/README.autostart +++ b/kinit/README.autostart @@ -15,19 +15,6 @@ application's .desktop file must be located in a KDE autostart directory such as $KDEDIR/share/autostart or $KDEHOME/share/autostart. The .desktop file can contain the following optional entries to control its autostart: - X-KDE-autostart-condition = rcfile:group:entry:default - - rcfile = name of a config file (including path if necessary) - group = name of a group within the config file - entry = name of a boolean entry within the group - default = true or false - - Starts the application only if the specified boolean entry in the - specified config file has the value 'true'. If the specified entry is - missing from the config file, the application will only be started if - 'default' is 'true'. - If the entry is not within a group, the group entry can be left empty. - X-KDE-autostart-phase = phase phase = 1 or 2 diff --git a/kinit/klauncher_adaptor.cpp b/kinit/klauncher_adaptor.cpp index a5afd612..cd6f7644 100644 --- a/kinit/klauncher_adaptor.cpp +++ b/kinit/klauncher_adaptor.cpp @@ -256,7 +256,7 @@ void KLauncherAdaptor::autoStart(int phase) } } -void KLauncherAdaptor::exec_blind(const QString &name, const QStringList &arg_list) +void KLauncherAdaptor::exec_blind(const QString &name, const QStringList &args) { const QString appexe = findExe(name); if (appexe.isEmpty()) { @@ -265,17 +265,17 @@ void KLauncherAdaptor::exec_blind(const QString &name, const QStringList &arg_li } const QStringList envlist = m_environment.toStringList(); - kDebug() << "blind starting" << appexe << arg_list << envlist; + kDebug() << "blind starting" << appexe << args << envlist; const QString envexe = findExe("env"); if (envexe.isEmpty()) { kWarning() << "env program not found"; - QProcess::startDetached(appexe, arg_list); + QProcess::startDetached(appexe, args); return; } QStringList envargs = envlist; envargs += appexe; - envargs += arg_list; + envargs += args; QProcess::startDetached(envexe, envargs); } diff --git a/kinit/klauncher_adaptor.h b/kinit/klauncher_adaptor.h index 6f7df070..d305793e 100644 --- a/kinit/klauncher_adaptor.h +++ b/kinit/klauncher_adaptor.h @@ -73,7 +73,7 @@ public Q_SLOTS: void autoStart(int phase); // used by plasma-desktop and klauncher itself - void exec_blind(const QString &name, const QStringList &arg_list); + void exec_blind(const QString &name, const QStringList &args); void cleanup(); // used by KToolInvocation