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

Method addUserCommand

plugins/debuggercommon/midebugsession.cpp:779–797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

777}
778
779void MIDebugSession::addUserCommand(const QString& cmd)
780{
781 auto adjustedCommand = cmd;
782 if (!cmd.isEmpty() && cmd[0].isDigit()) {
783 // Add a space to the beginning so debugger won't get confused if the
784 // command starts with a number (won't mix it up with command token added).
785 adjustedCommand.prepend(QLatin1Char{' '});
786 }
787 queueCmd(std::make_unique<UserCommand>(MI::NonMI, adjustedCommand));
788
789 // User command can theoretically modify absolutely everything,
790 // so need to force a reload.
791
792 // We can do it right now, and don't wait for user command to finish
793 // since commands used to reload all view will be executed after
794 // user command anyway.
795 if (!debuggerStateIsOn(s_appNotStarted) && !debuggerStateIsOn(s_programExited))
796 raiseEvent(program_state_changed);
797}
798
799std::unique_ptr<MICommand> MIDebugSession::createCommand(CommandType type, const QString& arguments,
800 CommandFlags flags) const

Callers 3

testQListContainerMethod · 0.80
testUpdateBreakpointMethod · 0.80

Calls 2

isDigitMethod · 0.80
isEmptyMethod · 0.45

Tested by 3

testQListContainerMethod · 0.64
testUpdateBreakpointMethod · 0.64