MCPcopy Create free account
hub / github.com/KDE/labplot / exec

Method exec

src/backend/core/AbstractAspect.cpp:1017–1034  ·  view source on GitHub ↗

* \brief Execute the given command, pushing it on the undoStack() if available. */

Source from the content-addressed store, hash-verified

1015 * \brief Execute the given command, pushing it on the undoStack() if available.
1016 */
1017void AbstractAspect::exec(QUndoCommand* cmd) {
1018 Q_CHECK_PTR(cmd);
1019 if (d->m_undoAware && (project() && project()->isUndoAware())) {
1020 auto* stack = undoStack();
1021 if (stack)
1022 stack->push(cmd);
1023 else {
1024 cmd->redo();
1025 delete cmd;
1026 }
1027
1028 if (project())
1029 setProjectChanged(true);
1030 } else {
1031 cmd->redo();
1032 delete cmd;
1033 }
1034}
1035
1036/**
1037 * \brief Execute command and arrange for signals to be sent before/after it is redone or undone.

Callers 15

mainFunction · 0.80
contextMenuEventMethod · 0.80
contextMenuEventMethod · 0.80
contextMenuEventMethod · 0.80
customAboutDialogMethod · 0.80
initActionsMethod · 0.80
ifFunction · 0.80
historyDialogMethod · 0.80
importFileDialogMethod · 0.80
importSqlDialogMethod · 0.80
importProjectDialogMethod · 0.80

Calls 4

isUndoAwareMethod · 0.80
pushMethod · 0.80
redoMethod · 0.45
textMethod · 0.45

Tested by

no test coverage detected