Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-66043

GTK3 theme ignores command line options and terminates application

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.10.0, 5.9.4
    • Widgets: Styles
    • None

      1) Have GTK3 Qt platform theme installed,
      2) unset DISPLAY
      3) Run any Qt application with a proper -display option (for example: "qtpass -display :0")
      4) See that it terminates with "(qtpass:994954): Gtk-WARNING **: cannot open display:"

      This bug is caused by src/plugins/platformthemes/gtk3/qgtk3theme.cpp QGtk3Theme::QGtk3Theme() calling gtk_init(0, 0), that is, without passing any argc and argv
      arguments to the GTK toolkit.

      GTK docs say that "This function will terminate your program if it was unable to initialize the windowing system for some reason" and so it does.

      Expected result:
      GTK3 Qt platform theme should pass the necessary options to the GTK initialization.
      If that is not possible it should use gtk_init_check() instead of gtk_init().
      This function does not terminate the program if the windowing system can't be initialized and
      so in this case the theme plugin can simply be skipped.

      There was a similar bug QTBUG-41695 for Qt4.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            mhej Maciej Szmigiero
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes