[rkward-cvs] rkward/rkward rkwatch.cpp, 1.47, 1.48 rkwatch.h, 1.23, 1.24
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Wed Sep 13 10:32:29 UTC 2006
Update of /cvsroot/rkward/rkward/rkward
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19857/rkward
Modified Files:
rkwatch.cpp rkwatch.h
Log Message:
Use id instead of pointer to track commands in watch. Pointer might get recycled too soon
Index: rkwatch.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkwatch.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** rkwatch.cpp 13 Sep 2006 10:28:48 -0000 1.47
--- rkwatch.cpp 13 Sep 2006 10:32:25 -0000 1.48
***************
*** 73,77 ****
void RKwatch::addInputNoCheck (RCommand *command) {
RK_TRACE (APP);
! if (command == command_input_shown) return; // already shown
// TODO: make colors/styles configurable
--- 73,77 ----
void RKwatch::addInputNoCheck (RCommand *command) {
RK_TRACE (APP);
! if (command->id () == command_input_shown) return; // already shown
// TODO: make colors/styles configurable
***************
*** 93,97 ****
watch->setItalic (false);
! command_input_shown = command;
}
--- 93,97 ----
watch->setItalic (false);
! command_input_shown = command->id ();
}
***************
*** 120,128 ****
void RKwatch::checkRaiseWatch (RCommand *command) {
// called during output. do not trace
! if (command == last_raised_command) return;
if (!RKSettingsModuleWatch::shouldRaiseWindow (command)) return;
if (command->type () & RCommand::Console) return;
! last_raised_command = command;
emit (raiseWatch ());
}
--- 120,128 ----
void RKwatch::checkRaiseWatch (RCommand *command) {
// called during output. do not trace
! if (command->id () == last_raised_command) return;
if (!RKSettingsModuleWatch::shouldRaiseWindow (command)) return;
if (command->type () & RCommand::Console) return;
! last_raised_command = command->id ();
emit (raiseWatch ());
}
Index: rkwatch.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/rkwatch.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** rkwatch.h 13 Sep 2006 10:28:48 -0000 1.23
--- rkwatch.h 13 Sep 2006 10:32:25 -0000 1.24
***************
*** 62,69 ****
/** internal helper function, called whenever a line/lines have been added. Check whether log is longer than maximum setting. Scroll to the bottom */
void linesAdded ();
! /** A pointer to the last command the input (i.e. the command itself) was shown for. Used to keep track of whether a command's input should be shown or not */
! RCommand *command_input_shown;
/** On a given command, the watch should not be raised more than once */
! RCommand *last_raised_command;
QTextEdit *watch;
--- 62,69 ----
/** internal helper function, called whenever a line/lines have been added. Check whether log is longer than maximum setting. Scroll to the bottom */
void linesAdded ();
! /** Id of last command the input (i.e. the command itself) was shown for. Used to keep track of whether a command's input should be shown or not */
! int command_input_shown;
/** On a given command, the watch should not be raised more than once */
! int last_raised_command;
QTextEdit *watch;
More information about the rkward-tracker
mailing list