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:
@@ -41,6 +41,7 @@ public:
|
||||
|
||||
bool event(QEvent* event) override;
|
||||
bool isAlreadyRunning() const;
|
||||
bool isDarkTheme() const;
|
||||
|
||||
bool sendFileNamesToRunningInstance(const QStringList& fileNames);
|
||||
|
||||
@@ -68,6 +69,7 @@ private:
|
||||
static int unixSignalSocket[2];
|
||||
#endif
|
||||
bool m_alreadyRunning;
|
||||
bool m_darkTheme = false;
|
||||
QLockFile* m_lockFile;
|
||||
QLocalServer m_lockServer;
|
||||
QString m_socketName;
|
||||
@@ -76,4 +78,6 @@ private:
|
||||
#endif
|
||||
};
|
||||
|
||||
#define kpxcApp qobject_cast<Application*>(Application::instance())
|
||||
|
||||
#endif // KEEPASSX_APPLICATION_H
|
||||
|
||||
Reference in New Issue
Block a user