mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 18:04:32 +00:00
Merge pull request #4744 from Chocobo1/splash_scrn
Fix potential race condition in showSplashScreen()
This commit is contained in:
commit
f37aed868e
@ -354,8 +354,8 @@ void showSplashScreen()
|
|||||||
painter.setFont(QFont("Arial", 22, QFont::Black));
|
painter.setFont(QFont("Arial", 22, QFont::Black));
|
||||||
painter.drawText(224 - painter.fontMetrics().width(version), 270, version);
|
painter.drawText(224 - painter.fontMetrics().width(version), 270, version);
|
||||||
QSplashScreen *splash = new QSplashScreen(splash_img);
|
QSplashScreen *splash = new QSplashScreen(splash_img);
|
||||||
QTimer::singleShot(1500, splash, SLOT(deleteLater()));
|
|
||||||
splash->show();
|
splash->show();
|
||||||
|
QTimer::singleShot(1500, splash, SLOT(deleteLater()));
|
||||||
qApp->processEvents();
|
qApp->processEvents();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -355,7 +355,7 @@ void Preferences::setStartMinimized(bool b)
|
|||||||
|
|
||||||
bool Preferences::isSplashScreenDisabled() const
|
bool Preferences::isSplashScreenDisabled() const
|
||||||
{
|
{
|
||||||
return value("Preferences/General/NoSplashScreen", false).toBool();
|
return value("Preferences/General/NoSplashScreen", true).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::setSplashScreenDisabled(bool b)
|
void Preferences::setSplashScreenDisabled(bool b)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user