diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-04-02 20:09:58 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-04-11 06:44:20 +0000 |
commit | dbea118f120a781e1aed717856bb7ab3d3ec86f1 (patch) | |
tree | 0ced4d057fd6db269e588131b853be8efed3d305 | |
parent | e7493c8b54eed2b8eb5f7095de005bc46ae92dc4 (diff) |
gtk3: Mark the minimum version we support
This suppresses warnings for API that is deprecated. Gtk often marks API
like:
GDK_DEPRECATED_IN_3_22_FOR((gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect))
void gtk_menu_popup (GtkMenu *menu,
Which generates this (found with ICC, accidentally an error):
qgtk3menu.cpp(449): error #1786: function "gtk_menu_popup" (declared at line 138 of "/usr/include/gtk-3.0/gtk/gtkmenu.h") was declared deprecated ("Use '(gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect)' instead")
The warning is generated by GDK_DEPRECATED_IN_xxxx_FOR when
GDK_VERSION_MIN_REQUIRED is higher than xxxx. And by default,
unlike the Qt equivalent macros, the minimum version required
is equal to the current version.
The minimum version our support requires is 3.6, as we depend
on gtk_accel_label_set_accel, which was first introduced in
that version.
Change-Id: I27b55fdf514247549455fffd14b1c47e470510b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r-- | src/plugins/platformthemes/gtk3/gtk3.pro | 1 | ||||
-rw-r--r-- | src/widgets/configure.json | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/platformthemes/gtk3/gtk3.pro b/src/plugins/platformthemes/gtk3/gtk3.pro index c291ac56a0..cac6f7054d 100644 --- a/src/plugins/platformthemes/gtk3/gtk3.pro +++ b/src/plugins/platformthemes/gtk3/gtk3.pro @@ -9,6 +9,7 @@ QT += core-private gui-private theme_support-private CONFIG += X11 QMAKE_USE += gtk3 +DEFINES += GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6 HEADERS += \ qgtk3dialoghelpers.h \ diff --git a/src/widgets/configure.json b/src/widgets/configure.json index 13c7c774ed..ab8ced3849 100644 --- a/src/widgets/configure.json +++ b/src/widgets/configure.json @@ -20,9 +20,9 @@ "libraries": { "gtk3": { - "label": "GTK+", + "label": "GTK+ >= 3.6", "sources": [ - { "type": "pkgConfig", "args": "gtk+-3.0" } + { "type": "pkgConfig", "args": "gtk+-3.0 >= 3.6" } ] } }, |