Skip to content

Commit

Permalink
ReviveOverlay: Delete the tray icon when quitting.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Jan 30, 2020
1 parent 88a0f69 commit 0064129
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ReviveOverlay/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
5 changes: 2 additions & 3 deletions ReviveOverlay/trayiconcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
4 changes: 2 additions & 2 deletions ReviveOverlay/windowsservices.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0064129

Please sign in to comment.