添加以管理员身份重启功能

This commit is contained in:
love-code-yeyixiao 2024-02-27 18:39:27 +08:00
parent 37cacdd781
commit b847e89643
2 changed files with 4 additions and 1 deletions

View File

@ -691,7 +691,7 @@ void CSandMan::CreateOldMenus()
m_pSetupWizard = NULL; m_pSetupWizard = NULL;
//m_pUpdateCore = NULL; //m_pUpdateCore = NULL;
} }
m_pRestart = m_pMenuFile->addAction(CSandMan::GetIcon("Exit"), tr("Restart As Admin"), this, SLOT(OnRestartAsAdmin()));
m_pExit = m_pMenuFile->addAction(CSandMan::GetIcon("Exit"), tr("Exit"), this, SLOT(OnExit())); m_pExit = m_pMenuFile->addAction(CSandMan::GetIcon("Exit"), tr("Exit"), this, SLOT(OnExit()));
m_pMenuView = m_pMenuBar->addMenu(tr("&View")); m_pMenuView = m_pMenuBar->addMenu(tr("&View"));

View File

@ -279,6 +279,8 @@ private slots:
void CheckForUpdates(bool bManual = true); void CheckForUpdates(bool bManual = true);
void OnRestartAsAdmin();
void OnExit(); void OnExit();
void OnHelp(); void OnHelp();
void OnAbout(); void OnAbout();
@ -366,6 +368,7 @@ private:
QHBoxLayout* m_pMenuLayout; QHBoxLayout* m_pMenuLayout;
QMenu* m_pMenuFile; QMenu* m_pMenuFile;
QAction* m_pRestart;
QAction* m_pRunBoxed; QAction* m_pRunBoxed;
QAction* m_pNewBox; QAction* m_pNewBox;
QAction* m_pNewGroup; QAction* m_pNewGroup;