• Michael Pyne's avatar
    Simplify shutdown handling. · a951caf3
    Michael Pyne authored
    JuK would fail to shutdown properly under Plasma 5 when the system tray
    was disabled and you used the 'X' from the window manager title bar to
    try to close JuK.  May have failed under other WMs or desktops as well,
    I haven't tested that.
    The shutdown code hasn't been reworked since KDE 3 times and for all I
    know I introduced this bug with the setQuitOnLastWindowClosed setting in
    main.cpp years ago and never realized.
    But this way, any way you destroy the main application class (JuK), you
    end up shutting down.  Continuing to use setQuitOnLastWindowClosed
    appears to be necessary since Qt will remove the queued quit signal to
    qApp once JuK is destructed and I don't trust running qApp->quit within
    the JuK dtor itself.
    Hopefully this fixes a crash-on-quit bug, but if not just reopen and
    I'll figure it out somehow...