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>
bb10
Thiago Macieira 2017-04-02 20:09:58 -07:00
parent e7493c8b54
commit dbea118f12
2 changed files with 3 additions and 2 deletions

View File

@ -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 \

View File

@ -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" }
]
}
},