summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qgtkstyle_p.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-06-11 17:39:15 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-06-12 11:57:07 +0000
commit2cbd318f1da432024dc724a644da98da2b52692b (patch)
treeff6aa56d0a33324356382edaba09579f7d67c9af /src/widgets/styles/qgtkstyle_p.cpp
parent7f85fb4654f0d6f9058336af53148d81fc700497 (diff)
Don't try to load plugins if QT_NO_LIBRARY is set.
Any plugin loading is impossible then and the code won't even compile. Change-Id: I81e49ff87ae1a609521d526f5098a0d44cc28f7c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/widgets/styles/qgtkstyle_p.cpp')
-rw-r--r--src/widgets/styles/qgtkstyle_p.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/styles/qgtkstyle_p.cpp b/src/widgets/styles/qgtkstyle_p.cpp
index 0e119a11ae..00682c1c0f 100644
--- a/src/widgets/styles/qgtkstyle_p.cpp
+++ b/src/widgets/styles/qgtkstyle_p.cpp
@@ -326,6 +326,7 @@ void QGtkStylePrivate::gtkWidgetSetFocus(GtkWidget *widget, bool focus)
*/
void QGtkStylePrivate::resolveGtk() const
{
+#ifndef QT_NO_LIBRARY
// enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
@@ -427,6 +428,7 @@ void QGtkStylePrivate::resolveGtk() const
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");
+#endif // !QT_NO_LIBRARY
}
/* \internal
@@ -593,11 +595,13 @@ void QGtkStylePrivate::cleanupGtkWidgets()
static bool resolveGConf()
{
+#ifndef QT_NO_LIBRARY
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");
}
+#endif // !QT_NO_LIBRARY
return (QGtkStylePrivate::gconf_client_get_default !=0);
}