FileView: Use QFileIconProvider instead of QAbstractFileIconProvider
Fixes compile with Qt 5
This commit is contained in:
parent
3454656207
commit
97a7637294
|
@ -21,9 +21,9 @@
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QUndoStack>
|
#include <QUndoStack>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileIconProvider>
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QFileSystemModel>
|
#include <QFileSystemModel>
|
||||||
|
#include <QFileIconProvider>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
@ -267,7 +267,7 @@ void FileView::showEvent(QShowEvent *e) {
|
||||||
if (model_) return;
|
if (model_) return;
|
||||||
|
|
||||||
model_ = new QFileSystemModel(this);
|
model_ = new QFileSystemModel(this);
|
||||||
if (!model_->iconProvider() || model_->iconProvider()->icon(QAbstractFileIconProvider::Folder).isNull()) {
|
if (!model_->iconProvider() || model_->iconProvider()->icon(QFileIconProvider::Folder).isNull()) {
|
||||||
file_icon_provider_ = std::make_unique<QFileIconProvider>();
|
file_icon_provider_ = std::make_unique<QFileIconProvider>();
|
||||||
model_->setIconProvider(file_icon_provider_.get());
|
model_->setIconProvider(file_icon_provider_.get());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue