[vlc-commits] [Git][videolan/vlc][master] qt: do not try using non-existent style at every start
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Jul 17 03:02:31 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
091f161e by Fatih Uzunoglu at 2026-07-17T02:42:59+00:00
qt: do not try using non-existent style at every start
- - - - -
1 changed file:
- modules/gui/qt/qt.cpp
Changes:
=====================================
modules/gui/qt/qt.cpp
=====================================
@@ -1290,9 +1290,20 @@ static void *Thread( void *obj )
app.setQuitOnLastWindowClosed( false );
/* Loads and tries to apply the preferred QStyle */
- QString s_style = getSettings()->value( "MainWindow/QtStyle", "" ).toString();
+#define QTSTYLE_KEY "MainWindow/QtStyle"
+ QString s_style = getSettings()->value( QTSTYLE_KEY, "" ).toString();
if( s_style.compare("") != 0 )
- QApplication::setStyle( s_style );
+ {
+ if ( !QApplication::setStyle( s_style ) )
+ {
+ // With VLC 3.0 we provide the Fusion style, but not with VLC 4.0.
+ // Since we use the same setting key, if the style is no longer
+ // available, we clear the setting so that we don't unnecessarily
+ // try the style at every start:
+ getSettings()->remove( QTSTYLE_KEY );
+ }
+ }
+#undef QTSTYLE_KEY
/* Launch */
app.exec();
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/091f161ebadeebee8d35686cd7a6195b613e2c43
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/091f161ebadeebee8d35686cd7a6195b613e2c43
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list