diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index ec1b74c953..ad1226f338 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -222,7 +222,7 @@ bool FolderStatusModel::setData(const QModelIndex& index, const QVariant& value, } _dirty = true; emit dirtyChanged(); - dataChanged(index, index, QVector() << role); + emit dataChanged(index, index, QVector() << role); return true; } return QAbstractItemModel::setData(index, value, role); diff --git a/src/gui/folderstatusmodel.h b/src/gui/folderstatusmodel.h index 650a4aa5e9..2d8f713c42 100644 --- a/src/gui/folderstatusmodel.h +++ b/src/gui/folderstatusmodel.h @@ -19,10 +19,6 @@ #include #include -#ifndef Q_DECL_OVERRIDE -#define Q_DECL_OVERRIDE -#endif - namespace OCC { class Folder; @@ -96,6 +92,12 @@ private: AccountPtr _account; bool _dirty = false; // If the selective sync checkboxes were changed +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + //the roles argument was added in Qt5 + void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector &roles = QVector()) + { emit QAbstractItemModel::dataChanged(topLeft,bottomRight); } +#endif + signals: void dirtyChanged(); }; diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index a5bf908f7e..768995eb7e 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -166,7 +166,11 @@ void SettingsDialog::accountAdded(AccountState *s) _ui->stack->insertWidget(0 , accountSettings); _actions.insert(accountAction, accountSettings); - auto group = findChild(QString(), Qt::FindDirectChildrenOnly); + auto group = findChild( +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + QString() , Qt::FindDirectChildrenOnly +#endif + ); Q_ASSERT(group); group->addAction(accountAction);