mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
multi-account: compile with Qt4
This commit is contained in:
parent
984434c728
commit
e587c8e2dc
@ -222,7 +222,7 @@ bool FolderStatusModel::setData(const QModelIndex& index, const QVariant& value,
|
||||
}
|
||||
_dirty = true;
|
||||
emit dirtyChanged();
|
||||
dataChanged(index, index, QVector<int>() << role);
|
||||
emit dataChanged(index, index, QVector<int>() << role);
|
||||
return true;
|
||||
}
|
||||
return QAbstractItemModel::setData(index, value, role);
|
||||
|
||||
@ -19,10 +19,6 @@
|
||||
#include <QStandardItemModel>
|
||||
#include <accountfwd.h>
|
||||
|
||||
#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<int> &roles = QVector<int>())
|
||||
{ emit QAbstractItemModel::dataChanged(topLeft,bottomRight); }
|
||||
#endif
|
||||
|
||||
signals:
|
||||
void dirtyChanged();
|
||||
};
|
||||
|
||||
@ -166,7 +166,11 @@ void SettingsDialog::accountAdded(AccountState *s)
|
||||
_ui->stack->insertWidget(0 , accountSettings);
|
||||
_actions.insert(accountAction, accountSettings);
|
||||
|
||||
auto group = findChild<QActionGroup*>(QString(), Qt::FindDirectChildrenOnly);
|
||||
auto group = findChild<QActionGroup*>(
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
QString() , Qt::FindDirectChildrenOnly
|
||||
#endif
|
||||
);
|
||||
Q_ASSERT(group);
|
||||
group->addAction(accountAction);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user