Debugger: Clear undo/redo stacks when debugging session is finished

Task-number: QTCREATORBUG-7645
Change-Id: I17df03c5765129c21f38df19ea90c04e937a7217
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Orgad Shaneh
2013-07-31 20:46:37 +03:00
committed by hjk
parent ef59179100
commit 71ff3a0a86
3 changed files with 16 additions and 0 deletions

View File

@@ -2660,6 +2660,7 @@ void DebuggerPluginPrivate::runControlFinished(DebuggerEngine *engine)
m_snapshotHandler->activateSnapshot(0); m_snapshotHandler->activateSnapshot(0);
} }
action(OperateByInstruction)->setValue(QVariant(false)); action(OperateByInstruction)->setValue(QVariant(false));
m_logWindow->clearUndoRedoStacks();
} }
void DebuggerPluginPrivate::remoteCommand(const QStringList &options, void DebuggerPluginPrivate::remoteCommand(const QStringList &options,

View File

@@ -198,6 +198,13 @@ public:
appendPlainText(text); appendPlainText(text);
} }
void clearUndoRedoStacks()
{
if (!isUndoRedoEnabled())
return;
setUndoRedoEnabled(false);
setUndoRedoEnabled(true);
}
private slots: private slots:
void saveContents(); void saveContents();
@@ -527,6 +534,12 @@ QString LogWindow::inputContents() const
return m_inputText->toPlainText(); return m_inputText->toPlainText();
} }
void LogWindow::clearUndoRedoStacks()
{
m_inputText->clearUndoRedoStacks();
m_combinedText->clearUndoRedoStacks();
}
QString LogWindow::logTimeStamp() QString LogWindow::logTimeStamp()
{ {
// Cache the last log time entry by ms. If time progresses, // Cache the last log time entry by ms. If time progresses,

View File

@@ -61,6 +61,8 @@ public:
QString combinedContents() const; QString combinedContents() const;
QString inputContents() const; QString inputContents() const;
void clearUndoRedoStacks();
static QString logTimeStamp(); static QString logTimeStamp();
static bool writeLogContents(const QPlainTextEdit *editor, QWidget *parent = 0); static bool writeLogContents(const QPlainTextEdit *editor, QWidget *parent = 0);