diff --git a/ReviveOverlay/main.cpp b/ReviveOverlay/main.cpp index 67a3ad51..148afafd 100644 --- a/ReviveOverlay/main.cpp +++ b/ReviveOverlay/main.cpp @@ -102,6 +102,6 @@ int main(int argc, char *argv[]) win_sparkle_set_can_shutdown_callback([]() { return (BOOL)!QApplication::startingUp(); }); win_sparkle_set_shutdown_request_callback([]() { CTrayIconController::SharedInstance()->quit(); }); win_sparkle_init(); - QObject::connect(&a, &QApplication::aboutToQuit, win_sparkle_cleanup); + QObject::connect(&a, &QApplication::aboutToQuit, CTrayIconController::SharedInstance(), &CTrayIconController::quit); return a.exec(); } diff --git a/ReviveOverlay/trayiconcontroller.cpp b/ReviveOverlay/trayiconcontroller.cpp index 63ab8421..217827c1 100644 --- a/ReviveOverlay/trayiconcontroller.cpp +++ b/ReviveOverlay/trayiconcontroller.cpp @@ -96,9 +96,8 @@ void CTrayIconController::ShowInformation(ETrayInfo info) void CTrayIconController::quit() { - if (!m_trayIcon) - return; - m_trayIcon->setVisible(false); + win_sparkle_cleanup(); + m_trayIcon.reset(); QCoreApplication::quit(); } diff --git a/ReviveOverlay/windowsservices.cpp b/ReviveOverlay/windowsservices.cpp index 50aefa36..95d23763 100644 --- a/ReviveOverlay/windowsservices.cpp +++ b/ReviveOverlay/windowsservices.cpp @@ -114,8 +114,8 @@ bool WindowsServices::PromptCredentials(QString& user, QString& password, bool f user.resize(userSize - 1); password.reserve(passwordSize); password.resize(passwordSize - 1); - Q_ASSERT(user.capacity() >= userSize); - Q_ASSERT(password.capacity() >= passwordSize); + Q_ASSERT((DWORD)user.capacity() >= userSize); + Q_ASSERT((DWORD)password.capacity() >= passwordSize); CredUnPackAuthenticationBufferW(0, authBuffer, authSize,