main: Move GstStartup::Initialize after QApplication

This commit is contained in:
Jonas Kvinge 2024-11-14 18:56:23 +01:00
parent 6a60eff5cd
commit 544db75eb4
1 changed files with 2 additions and 2 deletions

View File

@ -193,8 +193,6 @@ int main(int argc, char *argv[]) {
QGuiApplication::setDesktopFileName(u"org.strawberrymusicplayer.strawberry"_s);
QGuiApplication::setQuitOnLastWindowClosed(false);
GstStartup::Initialize();
QApplication a(argc, argv);
KDSingleApplication single_app(QCoreApplication::applicationName(), KDSingleApplication::Option::IncludeUsernameInSocketName);
if (!single_app.isPrimaryInstance()) {
@ -215,6 +213,8 @@ int main(int argc, char *argv[]) {
qLog(Debug) << "Looking for resources in" << QCoreApplication::libraryPaths();
#endif
GstStartup::Initialize();
// Gnome on Ubuntu has menu icons disabled by default. I think that's a bad idea, and makes some menus in Strawberry look confusing.
QCoreApplication::setAttribute(Qt::AA_DontShowIconsInMenus, false);