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

View File

@@ -212,7 +212,6 @@ void StartupPostProcess::setLoadFromPythonModule(bool value)
void StartupPostProcess::execute()
{
showSplashScreen();
setWindowTitle();
setProcessMessages();
setAutoSaving();
@@ -421,7 +420,7 @@ bool StartupPostProcess::hiddenMainWindow() const
return hidden;
}
void StartupPostProcess::showSplashScreen()
void StartupPostProcess::showMainWindow()
{
bool hidden = hiddenMainWindow();
@@ -429,10 +428,7 @@ void StartupPostProcess::showSplashScreen()
if (!hidden && !loadFromPythonModule) {
mainWindow->startSplasher();
}
}
void StartupPostProcess::showMainWindow()
{
// running the GUI init script
try {
Base::Console().Log("Run Gui init script\n");

View File

@@ -74,7 +74,6 @@ private:
void setImportImageFormats();
bool hiddenMainWindow() const;
void showMainWindow();
void showSplashScreen();
void activateWorkbench();
void checkParameters();