add window icons in wayland (#4232)

Co-authored-by: Fabio Bas <fabio.bas@officineinformatiche.net>
This commit is contained in:
ctrlaltca 2021-01-28 21:21:11 +01:00 committed by GitHub
parent 3edb862561
commit 1bfcca91be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -151,6 +151,10 @@ int main(int argc, char *argv[])
qDebug("main(): MainWindow constructor finished");
ui.setWindowIcon(QPixmap("theme:cockatrice"));
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
// set name of the app desktop file; used by wayland to load the window icon
QGuiApplication::setDesktopFileName("cockatrice");
#endif
SettingsCache::instance().setClientID(generateClientID());

View file

@ -62,6 +62,10 @@ int main(int argc, char *argv[])
QIcon icon("theme:appicon.svg");
wizard.setWindowIcon(icon);
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
// set name of the app desktop file; used by wayland to load the window icon
QGuiApplication::setDesktopFileName("oracle");
#endif
wizard.show();