mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Move theme detection into Application
* Add function to Application to quickly determine if in light or dark theme * Add kpxcApp symbol * Explicitly define main function for GUI tests to improve performance and use custom Application.
This commit is contained in:
@@ -47,7 +47,22 @@
|
||||
#include "gui/entry/EditEntryWidget.h"
|
||||
#include "gui/entry/EntryView.h"
|
||||
|
||||
QTEST_MAIN(TestGuiBrowser)
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#endif
|
||||
Application app(argc, argv);
|
||||
app.setApplicationName("KeePassXC");
|
||||
app.setApplicationVersion(KEEPASSXC_VERSION);
|
||||
app.setQuitOnLastWindowClosed(false);
|
||||
app.setAttribute(Qt::AA_Use96Dpi, true);
|
||||
QTEST_DISABLE_KEYPAD_NAVIGATION
|
||||
TestGuiBrowser tc;
|
||||
QTEST_SET_MAIN_SOURCE_PATH
|
||||
return QTest::qExec(&tc, argc, argv);
|
||||
}
|
||||
|
||||
void TestGuiBrowser::initTestCase()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user