mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Remove redundant _guiAppInstance
Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
parent
b34f639fff
commit
71b610eee3
2 changed files with 2 additions and 14 deletions
|
@ -111,22 +111,12 @@ public:
|
|||
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) {
|
||||
const auto msg = static_cast<MSG *>(message);
|
||||
if(msg->message == WM_SYSCOLORCHANGE || msg->message == WM_SETTINGCHANGE) {
|
||||
if(!_guiAppInstance) {
|
||||
const auto ptr = qobject_cast<QGuiApplication *>(QGuiApplication::instance());
|
||||
if(ptr) {
|
||||
_guiAppInstance.reset(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
if(_guiAppInstance) {
|
||||
emit _guiAppInstance->paletteChanged(_guiAppInstance->palette());
|
||||
if (const auto ptr = qobject_cast<QGuiApplication *>(QGuiApplication::instance())) {
|
||||
emit ptr->paletteChanged(ptr->palette());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
QScopedPointer<QGuiApplication> _guiAppInstance;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
@ -120,8 +120,6 @@ private:
|
|||
QPointer<QQmlApplicationEngine> _trayEngine;
|
||||
|
||||
AccessManagerFactory _accessManagerFactory;
|
||||
|
||||
QScopedPointer<QGuiApplication> _guiAppInstance;
|
||||
};
|
||||
|
||||
} // namespace OCC
|
||||
|
|
Loading…
Reference in a new issue