Revert 9b409da due to a regression in some platforms

This commit is contained in:
Frank Martinez
2024-09-27 15:46:24 +00:00
committed by Yorik van Havre
parent 1ceda88243
commit 47ecb6b401
3 changed files with 6 additions and 29 deletions

View File

@@ -1918,18 +1918,13 @@ void MainWindow::startSplasher()
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("General");
// first search for an external image file
if (hGrp->GetBool("ShowSplasher", true)) {
const auto isWayland = qGuiApp->platformName() == QLatin1String("wayland");
const auto flags = isWayland ? Qt::WindowFlags() : Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint;
d->splashscreen = new SplashScreen(this->splashImage(), flags);
d->splashscreen = new SplashScreen(this->splashImage());
if (!hGrp->GetBool("ShowSplasherMessages", false)) {
d->splashscreen->setShowMessages(false);
}
d->splashscreen->show();
if (!isWayland) {
QApplication::processEvents();
}
}
else {
d->splashscreen = nullptr;
@@ -1939,24 +1934,11 @@ void MainWindow::startSplasher()
void MainWindow::stopSplasher()
{
const auto isWayland = qGuiApp->platformName() == QLatin1String("wayland");
if (isWayland) {
if (d->splashscreen) {
d->splashscreen->finish(this);
d->splashscreen->deleteLater();
d->splashscreen = nullptr;
}
return;
if (d->splashscreen) {
d->splashscreen->finish(this);
delete d->splashscreen;
d->splashscreen = nullptr;
}
QApplication::processEvents();
QTimer::singleShot(3000, this, [this]() {
if (d->splashscreen) {
d->splashscreen->finish(this);
d->splashscreen->deleteLater();
d->splashscreen = nullptr;
}
});
}
QPixmap MainWindow::aboutImage() const