diff options
-rw-r--r-- | src/gui/itemviews/qheaderview.cpp | 2 | ||||
-rw-r--r-- | src/gui/styles/gtksymbols.cpp | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index a754579..0045bd5 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -524,8 +524,6 @@ QSize QHeaderView::sizeHint() const Q_D(const QHeaderView); if (d->cachedSizeHint.isValid()) return d->cachedSizeHint; - int width = 0; - int height = 0; const int sectionCount = count(); d->executePostedLayout(); diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp index d62f717..6ec5796 100644 --- a/src/gui/styles/gtksymbols.cpp +++ b/src/gui/styles/gtksymbols.cpp @@ -984,15 +984,18 @@ QIcon QGtk::getFilesystemIcon(const QFileInfo &info) if (QGtk::gnome_vfs_init && QGtk::gnome_icon_lookup_sync) { QGtk::gnome_vfs_init(); GtkIconTheme *theme = QGtk::gtk_icon_theme_get_default(); - QString fileurl = QUrl::fromLocalFile(info.absoluteFilePath()).toEncoded(); + QByteArray fileurl = QUrl::fromLocalFile(info.absoluteFilePath()).toEncoded(); char * icon_name = QGtk::gnome_icon_lookup_sync(theme, NULL, - qPrintable(fileurl), + fileurl.data(), NULL, GNOME_ICON_LOOKUP_FLAGS_NONE, NULL); - return QIcon::fromTheme(icon_name); + QString iconName = QString::fromUtf8(icon_name); g_free(icon_name); + if (iconName.startsWith(QLatin1Char('/'))) + return QIcon(iconName); + return QIcon::fromTheme(iconName); } return icon; } |