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:
Aurindam Jana
2012-01-18 15:02:33 +01:00
parent ab079b86cf
commit 79f7e6edfa

View File

@@ -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();
}