From 6d241270b521c72f0f18085a11d0c35adef476f5 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 31 Dec 2010 12:31:58 +0000 Subject: [PATCH] Improve splash screen code --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 353b69ddf..573a5d197 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -263,9 +263,9 @@ int main(int argc, char *argv[]){ painter.setFont(QFont("Arial", 22, QFont::Black)); painter.drawText(224 - painter.fontMetrics().width(version), 270, version); splash = new QSplashScreen(splash_img, Qt::WindowStaysOnTopHint); + QTimer::singleShot(1500, splash, SLOT(deleteLater())); splash->show(); app.processEvents(); - QTimer::singleShot(2000, splash, SLOT(deleteLater())); } #endif // Set environment variable @@ -297,7 +297,7 @@ int main(int argc, char *argv[]){ #ifndef DISABLE_GUI MainWindow window(0, torrentCmdLine); if(!no_splash) - QObject::connect(splash, SIGNAL(destroyed()), &window, SLOT(raise())); + window.raise(); QObject::connect(&app, SIGNAL(messageReceived(const QString&)), &window, SLOT(processParams(const QString&))); app.setActivationWindow(&window);