diff --git a/debuggers/common/midebugjobs.cpp b/debuggers/common/midebugjobs.cpp --- a/debuggers/common/midebugjobs.cpp +++ b/debuggers/common/midebugjobs.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include diff --git a/debuggers/common/stty.cpp b/debuggers/common/stty.cpp --- a/debuggers/common/stty.cpp +++ b/debuggers/common/stty.cpp @@ -76,8 +76,6 @@ #define PTY_FILENO 3 #define BASE_CHOWN "konsole_grantpty" -#include - using namespace KDevMI; static int chownpty(int fd, int grant) diff --git a/debuggers/gdb/debugsession.cpp b/debuggers/gdb/debugsession.cpp --- a/debuggers/gdb/debugsession.cpp +++ b/debuggers/gdb/debugsession.cpp @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include @@ -178,15 +178,15 @@ } // Set the environment variables - EnvironmentGroupList l(KSharedConfig::openConfig()); - QString envgrp = iexec->environmentGroup(cfg); - if (envgrp.isEmpty()) { - qCWarning(DEBUGGERCOMMON) << i18n("No environment group specified, looks like a broken " + const EnvironmentProfileList environmentProfiles(KSharedConfig::openConfig()); + QString envProfileName = iexec->environmentProfileName(cfg); + if (envProfileName.isEmpty()) { + qCWarning(DEBUGGERCOMMON) << i18n("No environment profile specified, looks like a broken " "configuration, please check run configuration '%1'. " - "Using default environment group.", cfg->name()); - envgrp = l.defaultGroup(); + "Using default environment profile.", cfg->name()); + envProfileName = environmentProfiles.defaultProfileName(); } - for (const auto &envvar : l.createEnvironment(envgrp, {})) { + for (const auto &envvar : environmentProfiles.createEnvironment(envProfileName, {})) { addCommand(GdbSet, "environment " + envvar); } diff --git a/debuggers/gdb/gdbconfigpage.cpp b/debuggers/gdb/gdbconfigpage.cpp --- a/debuggers/gdb/gdbconfigpage.cpp +++ b/debuggers/gdb/gdbconfigpage.cpp @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/debuggers/gdb/unittests/test_gdb.cpp b/debuggers/gdb/unittests/test_gdb.cpp --- a/debuggers/gdb/unittests/test_gdb.cpp +++ b/debuggers/gdb/unittests/test_gdb.cpp @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include @@ -127,14 +127,14 @@ vc->watches()->clear(); } -class WritableEnvironmentGroupList : public KDevelop::EnvironmentGroupList +class WritableEnvironmentProfileList : public KDevelop::EnvironmentProfileList { public: - explicit WritableEnvironmentGroupList(KConfig* config) : EnvironmentGroupList(config) {} + explicit WritableEnvironmentProfileList(KConfig* config) : EnvironmentProfileList(config) {} - using EnvironmentGroupList::variables; - using EnvironmentGroupList::saveSettings; - using EnvironmentGroupList::removeGroup; + using EnvironmentProfileList::variables; + using EnvironmentProfileList::saveSettings; + using EnvironmentProfileList::removeProfile; }; class TestLaunchConfiguration : public KDevelop::ILaunchConfiguration @@ -314,12 +314,12 @@ cfg.config().writeEntry("EnvironmentGroup", "GdbTestGroup"); - WritableEnvironmentGroupList envGroups(cfg.rootConfig()); - envGroups.removeGroup("GdbTestGroup"); - auto &envs = envGroups.variables("GdbTestGroup"); + WritableEnvironmentProfileList envProfiles(cfg.rootConfig()); + envProfiles.removeProfile("GdbTestGroup"); + auto &envs = envProfiles.variables("GdbTestGroup"); envs["VariableA"] = "-A' \" complex --value"; envs["VariableB"] = "-B' \" complex --value"; - envGroups.saveSettings(cfg.rootConfig()); + envProfiles.saveSettings(cfg.rootConfig()); QSignalSpy outputSpy(session, &TestDebugSession::inferiorStdoutLines); diff --git a/debuggers/lldb/debugsession.cpp b/debuggers/lldb/debugsession.cpp --- a/debuggers/lldb/debugsession.cpp +++ b/debuggers/lldb/debugsession.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include @@ -224,17 +224,17 @@ raiseEvent(connected_to_program); // Set the environment variables has effect only after target created - const EnvironmentGroupList l(KSharedConfig::openConfig()); - QString envgrp = iexec->environmentGroup(cfg); - if (envgrp.isEmpty()) { - qCWarning(DEBUGGERCOMMON) << i18n("No environment group specified, looks like a broken " + const EnvironmentProfileList environmentProfiles(KSharedConfig::openConfig()); + QString envProfileName = iexec->environmentProfileName(cfg); + if (envProfileName.isEmpty()) { + qCWarning(DEBUGGERCOMMON) << i18n("No environment profile specified, looks like a broken " "configuration, please check run configuration '%1'. " - "Using default environment group.", cfg->name()); - envgrp = l.defaultGroup(); + "Using default environment profile.", cfg->name()); + envProfileName = environmentProfiles.defaultProfileName(); } QStringList vars; - for (auto it = l.variables(envgrp).constBegin(), - ite = l.variables(envgrp).constEnd(); + for (auto it = environmentProfiles.variables(envProfileName).constBegin(), + ite = environmentProfiles.variables(envProfileName).constEnd(); it != ite; ++it) { vars.append(QStringLiteral("%0=%1").arg(it.key(), Utils::quote(it.value()))); } diff --git a/debuggers/lldb/lldbdebugger.cpp b/debuggers/lldb/lldbdebugger.cpp --- a/debuggers/lldb/lldbdebugger.cpp +++ b/debuggers/lldb/lldbdebugger.cpp @@ -25,7 +25,7 @@ #include "dbgglobal.h" #include "debuglog.h" -#include +#include #include #include @@ -62,8 +62,8 @@ arguments.append(KShell::splitArgs(config.readEntry(Config::LldbArgumentsEntry, QString()))); // Get environment - const EnvironmentGroupList egl(config.config()); - const auto &envs = egl.variables(config.readEntry(Config::LldbEnvironmentEntry, egl.defaultGroup())); + const EnvironmentProfileList egl(config.config()); + const auto &envs = egl.variables(config.readEntry(Config::LldbEnvironmentEntry, egl.defaultProfileName())); QProcessEnvironment processEnv; if (config.readEntry(Config::LldbInheritSystemEnvEntry, true)) { processEnv = QProcessEnvironment::systemEnvironment(); diff --git a/debuggers/lldb/unittests/test_lldb.cpp b/debuggers/lldb/unittests/test_lldb.cpp --- a/debuggers/lldb/unittests/test_lldb.cpp +++ b/debuggers/lldb/unittests/test_lldb.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include @@ -82,14 +82,14 @@ using namespace KDevMI::LLDB; namespace { -class WritableEnvironmentGroupList : public EnvironmentGroupList +class WritableEnvironmentProfileList : public EnvironmentProfileList { public: - explicit WritableEnvironmentGroupList(KConfig* config) : EnvironmentGroupList(config) {} + explicit WritableEnvironmentProfileList(KConfig* config) : EnvironmentProfileList(config) {} - using EnvironmentGroupList::variables; - using EnvironmentGroupList::saveSettings; - using EnvironmentGroupList::removeGroup; + using EnvironmentProfileList::variables; + using EnvironmentProfileList::saveSettings; + using EnvironmentProfileList::removeProfile; }; class TestLaunchConfiguration : public ILaunchConfiguration @@ -262,12 +262,12 @@ cfg.config().writeEntry("EnvironmentGroup", "LldbTestGroup"); - WritableEnvironmentGroupList envGroups(cfg.rootConfig()); - envGroups.removeGroup("LldbTestGroup"); - auto &envs = envGroups.variables("LldbTestGroup"); + WritableEnvironmentProfileList envProfiles(cfg.rootConfig()); + envProfiles.removeProfile("LldbTestGroup"); + auto &envs = envProfiles.variables("LldbTestGroup"); envs["VariableA"] = "-A' \" complex --value"; envs["VariableB"] = "-B' \" complex --value"; - envGroups.saveSettings(cfg.rootConfig()); + envProfiles.saveSettings(cfg.rootConfig()); QSignalSpy outputSpy(session, &TestDebugSession::inferiorStdoutLines); diff --git a/kdeintegration/executeplasmoid/executeplasmoidplugin.h b/kdeintegration/executeplasmoid/executeplasmoidplugin.h --- a/kdeintegration/executeplasmoid/executeplasmoidplugin.h +++ b/kdeintegration/executeplasmoid/executeplasmoidplugin.h @@ -44,7 +44,7 @@ QUrl executable(KDevelop::ILaunchConfiguration* config, QString& error) const override; QStringList arguments(KDevelop::ILaunchConfiguration* config, QString& error) const override; KJob* dependencyJob(KDevelop::ILaunchConfiguration* config) const override; - QString environmentGroup(KDevelop::ILaunchConfiguration* config) const override; + QString environmentProfileName(KDevelop::ILaunchConfiguration* config) const override; QString nativeAppConfigTypeId() const override; QString terminal(KDevelop::ILaunchConfiguration* config) const override; bool useTerminal(KDevelop::ILaunchConfiguration* config) const override; diff --git a/kdeintegration/executeplasmoid/executeplasmoidplugin.cpp b/kdeintegration/executeplasmoid/executeplasmoidplugin.cpp --- a/kdeintegration/executeplasmoid/executeplasmoidplugin.cpp +++ b/kdeintegration/executeplasmoid/executeplasmoidplugin.cpp @@ -73,7 +73,7 @@ return QUrl::fromLocalFile(PlasmoidExecutionJob::workingDirectory(config)); } -QString ExecutePlasmoidPlugin::environmentGroup(ILaunchConfiguration* /*config*/) const +QString ExecutePlasmoidPlugin::environmentProfileName(ILaunchConfiguration* /*config*/) const { return QString(); } diff --git a/projectmanagers/cmake/cmakeimportjob.cpp b/projectmanagers/cmake/cmakeimportjob.cpp --- a/projectmanagers/cmake/cmakeimportjob.cpp +++ b/projectmanagers/cmake/cmakeimportjob.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include #include @@ -202,7 +202,7 @@ { m_manager->addWatcher(m_project, file); QString profile = CMake::currentEnvironment(m_project); - const KDevelop::EnvironmentGroupList env( KSharedConfig::openConfig() ); + const KDevelop::EnvironmentProfileList env(KSharedConfig::openConfig()); return CMakeParserUtils::includeScript( file, parent, &m_data, dir, env.variables(profile)); } diff --git a/projectmanagers/custom-buildsystem/custombuildjob.cpp b/projectmanagers/custom-buildsystem/custombuildjob.cpp --- a/projectmanagers/custom-buildsystem/custombuildjob.cpp +++ b/projectmanagers/custom-buildsystem/custombuildjob.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include @@ -144,7 +144,7 @@ exec = new KDevelop::CommandExecutor( cmd, this ); - auto env = KDevelop::EnvironmentGroupList( KSharedConfig::openConfig() ).createEnvironment( environment, QProcess::systemEnvironment() ); + auto env = KDevelop::EnvironmentProfileList(KSharedConfig::openConfig()).createEnvironment(environment, QProcess::systemEnvironment()); if (!installPrefix.isEmpty()) env.append("DESTDIR="+installPrefix.toDisplayString(QUrl::PreferLocalFile));