From da888ba53904af75c462af9f753191f25840e51f Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Tue, 11 Feb 2014 17:49:26 +0100 Subject: Only query for the theme if it is available in the GTKStyle If the theme is not available then it should not try to use it when getting the file system icon as it will cause a number of messages to be outputted to the console as it is an invalid call. Change-Id: I33003568f6785ee423c4a6e079a6c62c95145cbc Reviewed-by: J-P Nurmi --- src/widgets/styles/qgtkstyle_p.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/styles/qgtkstyle_p.cpp b/src/widgets/styles/qgtkstyle_p.cpp index 2bd978bcb8..2c64225c70 100644 --- a/src/widgets/styles/qgtkstyle_p.cpp +++ b/src/widgets/styles/qgtkstyle_p.cpp @@ -855,7 +855,7 @@ QFont QGtkStylePrivate::getThemeFont() QIcon QGtkStylePrivate::getFilesystemIcon(const QFileInfo &info) { QIcon icon; - if (gnome_vfs_init && gnome_icon_lookup_sync) { + if (isThemeAvailable() && gnome_vfs_init && gnome_icon_lookup_sync) { gnome_vfs_init(); GtkIconTheme *theme = gtk_icon_theme_get_default(); QByteArray fileurl = QUrl::fromLocalFile(info.absoluteFilePath()).toEncoded(); -- cgit v1.2.3