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:
authorlouib <code@louib.net>2020-10-09 05:48:45 +0300
committerGitHub <noreply@github.com>2020-10-09 05:48:45 +0300
commit48d9fb3e796af368f2cf611136b3ab6fbc2bcae4 (patch)
tree0cbabcb8e0730ad3f5e1e8a9d235e0d8b309874e /src/core/Bootstrap.cpp
parentfb87b1c794f7e297ed42111514a0347d3f30151a (diff)
Remove GUI bootstraping from core/ (#5513)
Diffstat (limited to 'src/core/Bootstrap.cpp')
-rw-r--r--src/core/Bootstrap.cpp54
1 files changed, 1 insertions, 53 deletions
diff --git a/src/core/Bootstrap.cpp b/src/core/Bootstrap.cpp
index cdf5e334a..4845ef0b1 100644
--- a/src/core/Bootstrap.cpp
+++ b/src/core/Bootstrap.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2018 KeePassXC Team <team@keepassxc.org>
+ * Copyright (C) 2020 KeePassXC Team <team@keepassxc.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,7 +19,6 @@
#include "config-keepassx.h"
#include "core/Config.h"
#include "core/Translator.h"
-#include "gui/MessageBox.h"
#ifdef Q_OS_WIN
#include <aclapi.h> // for createWindowsDACL()
@@ -73,59 +72,8 @@ namespace Bootstrap
setupSearchPaths();
applyEarlyQNetworkAccessManagerWorkaround();
- }
- /**
- * Perform early application bootstrapping such as setting up search paths,
- * configuration OS security properties, and loading translators.
- * A QApplication object has to be instantiated before calling this function.
- */
- void bootstrapApplication()
- {
- bootstrap();
Translator::installTranslators();
-
-#ifdef Q_OS_WIN
- // Qt on Windows uses "MS Shell Dlg 2" as the default font for many widgets, which resolves
- // to Tahoma 8pt, whereas the correct font would be "Segoe UI" 9pt.
- // Apparently, some widgets are already using the correct font. Thanks, MuseScore for this neat fix!
- QApplication::setFont(QApplication::font("QMessageBox"));
-#endif
-
- MessageBox::initializeButtonDefs();
-
-#ifdef Q_OS_MACOS
- // Don't show menu icons on OSX
- QApplication::setAttribute(Qt::AA_DontShowIconsInMenus);
-#endif
- }
-
- /**
- * Restore the main window's state after launch
- *
- * @param mainWindow the main window whose state to restore
- */
- void restoreMainWindowState(MainWindow& mainWindow)
- {
- // start minimized if configured
- if (config()->get(Config::GUI_MinimizeOnStartup).toBool()) {
- mainWindow.hideWindow();
- } else {
- mainWindow.bringToFront();
- }
-
- if (config()->get(Config::OpenPreviousDatabasesOnStartup).toBool()) {
- const QStringList fileNames = config()->get(Config::LastOpenedDatabases).toStringList();
- for (const QString& filename : fileNames) {
- if (!filename.isEmpty() && QFile::exists(filename)) {
- mainWindow.openDatabase(filename);
- }
- }
- auto lastActiveFile = config()->get(Config::LastActiveDatabase).toString();
- if (!lastActiveFile.isEmpty()) {
- mainWindow.openDatabase(lastActiveFile);
- }
- }
}
// LCOV_EXCL_START