forked from qt-creator/qt-creator
ScriptConsole: Keep History
Keep History when view port is cleared. Change-Id: I6b2d3bdb2b7bbb78cbcb891820a355ba6b074e6f Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -77,10 +77,10 @@ public:
|
||||
lastKnownPosition(0),
|
||||
inferiorStopped(false)
|
||||
{
|
||||
resetCache();
|
||||
scriptHistory.append(QString());
|
||||
scriptHistoryIndex = scriptHistory.count();
|
||||
}
|
||||
|
||||
void resetCache();
|
||||
void appendToHistory(const QString &script);
|
||||
bool canEvaluateScript(const QString &script);
|
||||
|
||||
@@ -100,13 +100,6 @@ public:
|
||||
QFlags<QmlJSScriptConsole::DebugLevelFlag> debugLevel;
|
||||
};
|
||||
|
||||
void QmlJSScriptConsolePrivate::resetCache()
|
||||
{
|
||||
scriptHistory.clear();
|
||||
scriptHistory.append(QString());
|
||||
scriptHistoryIndex = scriptHistory.count();
|
||||
}
|
||||
|
||||
void QmlJSScriptConsolePrivate::appendToHistory(const QString &script)
|
||||
{
|
||||
scriptHistoryIndex = scriptHistory.count();
|
||||
@@ -348,8 +341,6 @@ void QmlJSScriptConsole::setDebugLevel(QFlags<DebugLevelFlag> level)
|
||||
|
||||
void QmlJSScriptConsole::clear()
|
||||
{
|
||||
d->resetCache();
|
||||
|
||||
QPlainTextEdit::clear();
|
||||
displayPrompt();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user