Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/Application.cpp')
-rw-r--r--src/gui/Application.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/Application.cpp b/src/gui/Application.cpp
index 273ab8763..31222401b 100644
--- a/src/gui/Application.cpp
+++ b/src/gui/Application.cpp
@@ -315,3 +315,15 @@ bool Application::isDarkTheme() const
{
return m_darkTheme;
}
+
+void Application::restart()
+{
+ // Disable single instance
+ m_lockServer.close();
+ if (m_lockFile) {
+ m_lockFile->unlock();
+ delete m_lockFile;
+ }
+
+ exit(RESTART_EXITCODE);
+}