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);
|
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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user