comparison widgets/CommandHistory.cpp @ 1610:bd1a7c84da8c

Profiling point
author Chris Cannam
date Thu, 14 May 2020 16:38:09 +0100
parents c8a6fd3f9dff
children
comparison
equal deleted inserted replaced
1609:705d1d979ae4 1610:bd1a7c84da8c
23 */ 23 */
24 24
25 #include "CommandHistory.h" 25 #include "CommandHistory.h"
26 26
27 #include "base/Command.h" 27 #include "base/Command.h"
28 #include "base/Profiler.h"
28 29
29 #include "IconLoader.h" 30 #include "IconLoader.h"
30 31
31 #include <QRegExp> 32 #include <QRegExp>
32 #include <QMenu> 33 #include <QMenu>
468 } 469 }
469 470
470 void 471 void
471 CommandHistory::clearStack(CommandStack &stack) 472 CommandHistory::clearStack(CommandStack &stack)
472 { 473 {
474 Profiler profiler("CommandHistory::clearStack");
475
473 while (!stack.empty()) { 476 while (!stack.empty()) {
474 Command *command = stack.top(); 477 Command *command = stack.top();
475 // Not safe to call getName() on a command about to be deleted 478 // Not safe to call getName() on a command about to be deleted
476 #ifdef DEBUG_COMMAND_HISTORY 479 #ifdef DEBUG_COMMAND_HISTORY
477 cerr << "CommandHistory::clearStack: About to delete command " << command << endl; 480 cerr << "CommandHistory::clearStack: About to delete command " << command << endl;