diff options
author | Liang Qi <liang.qi@qt.io> | 2016-08-25 16:12:11 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-08-25 16:12:11 +0200 |
commit | c7cdf3aac7ef9571ce0c0cf25a2c8455c7604451 (patch) | |
tree | ff17379a7643d47224a500714d825d561172a282 /src/widgets/dialogs/qsidebar.cpp | |
parent | 3f64156e918a8cf5da1b68191a280f0daf3d954b (diff) | |
parent | 1e6630b54ce9a005c2cffac4dac95641838e8231 (diff) | |
download | qtbase-c7cdf3aac7ef9571ce0c0cf25a2c8455c7604451.tar.gz |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/corelib/mimetypes/qmimeprovider.cpp
src/corelib/mimetypes/qmimetype.cpp
Change-Id: Ib483ddb6bfc380e7c8f195feca535703814c3872
Diffstat (limited to 'src/widgets/dialogs/qsidebar.cpp')
-rw-r--r-- | src/widgets/dialogs/qsidebar.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qsidebar.cpp b/src/widgets/dialogs/qsidebar.cpp index d86cddab61..713ccb6556 100644 --- a/src/widgets/dialogs/qsidebar.cpp +++ b/src/widgets/dialogs/qsidebar.cpp @@ -198,7 +198,9 @@ void QUrlModel::setUrl(const QModelIndex &index, const QUrl &url, const QModelIn QIcon newIcon = qvariant_cast<QIcon>(dirIndex.data(Qt::DecorationRole)); if (!dirIndex.isValid()) { - newIcon = fileSystemModel->iconProvider()->icon(QFileIconProvider::Folder); + const QFileIconProvider *provider = fileSystemModel->iconProvider(); + if (provider) + newIcon = provider->icon(QFileIconProvider::Folder); newName = QFileInfo(url.toLocalFile()).fileName(); if (!invalidUrls.contains(url)) invalidUrls.append(url); |