MCPcopy Create free account
hub / github.com/KDE/kdevelop / initializeStartupInfo

Method initializeStartupInfo

plugins/debuggercommon/midebugjobs.cpp:152–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void MIDebugJob::initializeStartupInfo(IExecutePlugin* execute, ILaunchConfiguration* launchConfiguration)
153{
154 QString errorString;
155 const auto detectError = [&errorString, this](int errorCode) {
156 if (errorString.isEmpty()) {
157 return false;
158 }
159 setError(errorCode);
160 setErrorText(errorString);
161 return true;
162 };
163
164 auto executable = execute->executable(launchConfiguration, errorString).toLocalFile();
165 if (detectError(InvalidExecutable)) {
166 return;
167 }
168 if (!QFileInfo{executable}.isExecutable()) {
169 setError(ExecutableIsNotExecutable);
170 setErrorText(i18n("'%1' is not an executable", executable));
171 return;
172 }
173
174 auto arguments = execute->arguments(launchConfiguration, errorString);
175 if (detectError(InvalidArguments)) {
176 return;
177 }
178
179 QStringList terminal;
180 if (execute->useTerminal(launchConfiguration)) {
181 terminal = execute->terminal(launchConfiguration, errorString);
182 if (detectError(InvalidExternalTerminal)) {
183 return;
184 }
185 }
186
187 m_startupInfo.reset(new InferiorStartupInfo{execute, launchConfiguration, std::move(executable),
188 std::move(arguments), std::move(terminal)});
189}
190
191MIExamineCoreJob::MIExamineCoreJob(MIDebuggerPlugin* plugin, CoreInfo coreInfo, QObject* parent)
192 : MIDebugJobBase(plugin, parent)

Callers

nothing calls this directly

Calls 7

toLocalFileMethod · 0.80
isEmptyMethod · 0.45
executableMethod · 0.45
argumentsMethod · 0.45
useTerminalMethod · 0.45
terminalMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected