forked from qt-creator/qt-creator
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:
@@ -2660,6 +2660,7 @@ void DebuggerPluginPrivate::runControlFinished(DebuggerEngine *engine)
|
||||
m_snapshotHandler->activateSnapshot(0);
|
||||
}
|
||||
action(OperateByInstruction)->setValue(QVariant(false));
|
||||
m_logWindow->clearUndoRedoStacks();
|
||||
}
|
||||
|
||||
void DebuggerPluginPrivate::remoteCommand(const QStringList &options,
|
||||
|
||||
@@ -198,6 +198,13 @@ public:
|
||||
appendPlainText(text);
|
||||
}
|
||||
|
||||
void clearUndoRedoStacks()
|
||||
{
|
||||
if (!isUndoRedoEnabled())
|
||||
return;
|
||||
setUndoRedoEnabled(false);
|
||||
setUndoRedoEnabled(true);
|
||||
}
|
||||
|
||||
private slots:
|
||||
void saveContents();
|
||||
@@ -527,6 +534,12 @@ QString LogWindow::inputContents() const
|
||||
return m_inputText->toPlainText();
|
||||
}
|
||||
|
||||
void LogWindow::clearUndoRedoStacks()
|
||||
{
|
||||
m_inputText->clearUndoRedoStacks();
|
||||
m_combinedText->clearUndoRedoStacks();
|
||||
}
|
||||
|
||||
QString LogWindow::logTimeStamp()
|
||||
{
|
||||
// Cache the last log time entry by ms. If time progresses,
|
||||
|
||||
@@ -61,6 +61,8 @@ public:
|
||||
QString combinedContents() const;
|
||||
QString inputContents() const;
|
||||
|
||||
void clearUndoRedoStacks();
|
||||
|
||||
static QString logTimeStamp();
|
||||
|
||||
static bool writeLogContents(const QPlainTextEdit *editor, QWidget *parent = 0);
|
||||
|
||||
Reference in New Issue
Block a user