3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/qt-5/5.4/0001-dlopen-gtkstyle.patch
Thomas Tuegel 2e38240c95 add qt-5.4
2015-02-21 11:39:18 -06:00

64 lines
3.7 KiB
Diff

From 35d5995a58c86a6addbf0aaf0d1be64d39182872 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Mon, 1 Dec 2014 17:21:58 -0600
Subject: [PATCH] dlopen-gtkstyle
---
qtbase/src/widgets/styles/qgtk2painter.cpp | 2 +-
qtbase/src/widgets/styles/qgtkstyle_p.cpp | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/qtbase/src/widgets/styles/qgtk2painter.cpp b/qtbase/src/widgets/styles/qgtk2painter.cpp
index 7b9bd97..075947a 100644
--- a/qtbase/src/widgets/styles/qgtk2painter.cpp
+++ b/qtbase/src/widgets/styles/qgtk2painter.cpp
@@ -104,7 +104,7 @@ static void initGtk()
static bool initialized = false;
if (!initialized) {
// enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
- QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
+ QLibrary libgtk(QLS("@gtk@/lib/libgtk-x11-2.0"), 0, 0);
QGtk2PainterPrivate::gdk_pixmap_new = (Ptr_gdk_pixmap_new)libgtk.resolve("gdk_pixmap_new");
QGtk2PainterPrivate::gdk_pixbuf_get_from_drawable = (Ptr_gdk_pixbuf_get_from_drawable)libgtk.resolve("gdk_pixbuf_get_from_drawable");
diff --git a/qtbase/src/widgets/styles/qgtkstyle_p.cpp b/qtbase/src/widgets/styles/qgtkstyle_p.cpp
index 2c64225..3343d32 100644
--- a/qtbase/src/widgets/styles/qgtkstyle_p.cpp
+++ b/qtbase/src/widgets/styles/qgtkstyle_p.cpp
@@ -334,7 +334,7 @@ void QGtkStylePrivate::gtkWidgetSetFocus(GtkWidget *widget, bool focus)
void QGtkStylePrivate::resolveGtk() const
{
// enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
- QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
+ QLibrary libgtk(QLS("@gtk@/lib/libgtk-x11-2.0"), 0, 0);
gtk_init = (Ptr_gtk_init)libgtk.resolve("gtk_init");
gtk_window_new = (Ptr_gtk_window_new)libgtk.resolve("gtk_window_new");
@@ -432,8 +432,8 @@ void QGtkStylePrivate::resolveGtk() const
pango_font_description_get_family = (Ptr_pango_font_description_get_family)libgtk.resolve("pango_font_description_get_family");
pango_font_description_get_style = (Ptr_pango_font_description_get_style)libgtk.resolve("pango_font_description_get_style");
- gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("gnomeui-2"), 0, "gnome_icon_lookup_sync");
- gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("gnomevfs-2"), 0, "gnome_vfs_init");
+ gnome_icon_lookup_sync = (Ptr_gnome_icon_lookup_sync)QLibrary::resolve(QLS("@libgnomeui@/lib/libgnomeui-2"), 0, "gnome_icon_lookup_sync");
+ gnome_vfs_init= (Ptr_gnome_vfs_init)QLibrary::resolve(QLS("@gnome_vfs@/lib/libgnomevfs-2"), 0, "gnome_vfs_init");
}
/* \internal
@@ -601,9 +601,9 @@ void QGtkStylePrivate::cleanupGtkWidgets()
static bool resolveGConf()
{
if (!QGtkStylePrivate::gconf_client_get_default) {
- QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_default");
- QGtkStylePrivate::gconf_client_get_string = (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_string");
- QGtkStylePrivate::gconf_client_get_bool = (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("gconf-2"), 4, "gconf_client_get_bool");
+ QGtkStylePrivate::gconf_client_get_default = (Ptr_gconf_client_get_default)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_default");
+ QGtkStylePrivate::gconf_client_get_string = (Ptr_gconf_client_get_string)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_string");
+ QGtkStylePrivate::gconf_client_get_bool = (Ptr_gconf_client_get_bool)QLibrary::resolve(QLS("@gconf@/lib/libgconf-2"), 4, "gconf_client_get_bool");
}
return (QGtkStylePrivate::gconf_client_get_default !=0);
}
--
2.1.3