Skip to content

Commit

Permalink
Splash Screen window: renamed our closeAndDeleteAfter() to deleteLate…
Browse files Browse the repository at this point in the history
…r().

... since we don't close and delete anymore, but only delete.
  • Loading branch information
agarny committed Dec 21, 2019
1 parent e146b5f commit adc6df3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main.cpp
Expand Up @@ -295,7 +295,7 @@ int main(int pArgC, char *pArgV[])
// are not in debug mode

#ifndef QT_DEBUG
splashScreen->closeAndDeleteAfter(win);
splashScreen->deleteLater(win);

// Make sure that our main window is in the foreground, unless the user
// decided to close our main window while we were showing our splash screen
Expand Down
4 changes: 2 additions & 2 deletions src/splashscreenwindow.cpp
Expand Up @@ -119,7 +119,7 @@ SplashScreenWindow::~SplashScreenWindow()

//==============================================================================

void SplashScreenWindow::closeAndDeleteAfter(QWidget *pWindow)
void SplashScreenWindow::deleteLater(QWidget *pWindow)
{
// Wait for our window to expose itself

Expand Down Expand Up @@ -155,7 +155,7 @@ void SplashScreenWindow::closeAndDeleteAfter(QWidget *pWindow)

// Have ourselves deleted, but with a bit of a delay

QTimer::singleShot(500, this, &SplashScreenWindow::deleteLater);
QTimer::singleShot(500, this, &QObject::deleteLater);
}

//==============================================================================
Expand Down
2 changes: 1 addition & 1 deletion src/splashscreenwindow.h
Expand Up @@ -48,7 +48,7 @@ class SplashScreenWindow : public QWidget
explicit SplashScreenWindow();
~SplashScreenWindow() override;

void closeAndDeleteAfter(QWidget *pWindow);
void deleteLater(QWidget *pWindow);

protected:
void closeEvent(QCloseEvent *pEvent) override;
Expand Down

0 comments on commit adc6df3

Please sign in to comment.