summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qsidebar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs/qsidebar.cpp')
-rw-r--r--src/widgets/dialogs/qsidebar.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/dialogs/qsidebar.cpp b/src/widgets/dialogs/qsidebar.cpp
index 2c8c66e1e2..4272b612ec 100644
--- a/src/widgets/dialogs/qsidebar.cpp
+++ b/src/widgets/dialogs/qsidebar.cpp
@@ -73,7 +73,7 @@ void QSideBarDelegate::initStyleOption(QStyleOptionViewItem *option,
Example usage: File dialog sidebar and combo box
*/
-QUrlModel::QUrlModel(QObject *parent) : QStandardItemModel(parent), showFullPath(false), fileSystemModel(0)
+QUrlModel::QUrlModel(QObject *parent) : QStandardItemModel(parent), showFullPath(false), fileSystemModel(nullptr)
{
}
@@ -163,7 +163,7 @@ bool QUrlModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
*/
bool QUrlModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
- if (value.type() == QVariant::Url) {
+ if (value.userType() == QMetaType::QUrl) {
QUrl url = value.toUrl();
QModelIndex dirIndex = fileSystemModel->index(url.toLocalFile());
//On windows the popup display the "C:\", convert to nativeSeparators
@@ -298,7 +298,7 @@ void QUrlModel::setFileSystemModel(QFileSystemModel *model)
{
if (model == fileSystemModel)
return;
- if (fileSystemModel != 0) {
+ if (fileSystemModel != nullptr) {
disconnect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(dataChanged(QModelIndex,QModelIndex)));
disconnect(model, SIGNAL(layoutChanged()),
@@ -307,7 +307,7 @@ void QUrlModel::setFileSystemModel(QFileSystemModel *model)
this, SLOT(layoutChanged()));
}
fileSystemModel = model;
- if (fileSystemModel != 0) {
+ if (fileSystemModel != nullptr) {
connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
this, SLOT(dataChanged(QModelIndex,QModelIndex)));
connect(model, SIGNAL(layoutChanged()),