summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/coreplugin/outputwindow.cpp13
-rw-r--r--src/plugins/studiowelcome/studiowelcomeplugin.cpp5
2 files changed, 10 insertions, 8 deletions
diff --git a/src/plugins/coreplugin/outputwindow.cpp b/src/plugins/coreplugin/outputwindow.cpp
index 9e20482113..e89f999a47 100644
--- a/src/plugins/coreplugin/outputwindow.cpp
+++ b/src/plugins/coreplugin/outputwindow.cpp
@@ -71,7 +71,7 @@ public:
Qt::MouseButton mouseButtonPressed = Qt::NoButton;
QTextCursor cursor;
QString filterText;
- QTextBlock lastFilteredBlock;
+ int lastFilteredBlockNumber = -1;
QPalette originalPalette;
OutputWindow::FilterModeFlags filterMode = OutputWindow::FilterModeFlag::Default;
};
@@ -279,7 +279,7 @@ void OutputWindow::updateFilterProperties(const QString &filterText,
.setFlag(FilterModeFlag::RegExp, isRegexp);
if (d->filterMode == flags && d->filterText == filterText)
return;
- d->lastFilteredBlock = {};
+ d->lastFilteredBlockNumber = -1;
if (d->filterText != filterText) {
const bool filterTextWasEmpty = d->filterText.isEmpty();
d->filterText = filterText;
@@ -311,12 +311,9 @@ void OutputWindow::filterNewContent()
{
bool atBottom = isScrollbarAtBottom();
- auto &lastBlock = d->lastFilteredBlock;
-
- if (!lastBlock.isValid() || lastBlock.blockNumber() >= document()->blockCount()
- || document()->findBlockByNumber(lastBlock.blockNumber()) != lastBlock) {
+ QTextBlock lastBlock = document()->findBlockByNumber(d->lastFilteredBlockNumber);
+ if (!lastBlock.isValid())
lastBlock = document()->begin();
- }
if (d->filterMode.testFlag(OutputWindow::FilterModeFlag::RegExp)) {
QRegularExpression regExp(d->filterText);
@@ -338,7 +335,7 @@ void OutputWindow::filterNewContent()
}
}
- lastBlock = document()->lastBlock();
+ d->lastFilteredBlockNumber = document()->lastBlock().blockNumber();
// FIXME: Why on earth is this necessary? We should probably do something else instead...
setDocument(document());
diff --git a/src/plugins/studiowelcome/studiowelcomeplugin.cpp b/src/plugins/studiowelcome/studiowelcomeplugin.cpp
index cc22057660..508ab20b83 100644
--- a/src/plugins/studiowelcome/studiowelcomeplugin.cpp
+++ b/src/plugins/studiowelcome/studiowelcomeplugin.cpp
@@ -243,6 +243,11 @@ void StudioWelcomePlugin::extensionsInitialized()
s_view->show();
s_view->raise();
+
+ QTimer::singleShot(15000, [](){
+ if (s_view)
+ s_view->close();
+ });
});
}
}