Commit 9210262d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Don't use nullptr for flags

parent 6ea0eaa7
...@@ -41,7 +41,7 @@ class TimeLabels : public QFrame ...@@ -41,7 +41,7 @@ class TimeLabels : public QFrame
public: public:
typedef QList<TimeLabels *> List; typedef QList<TimeLabels *> List;
TimeLabels(const QTimeZone &zone, int rows, TimeLabelsZone *parent = nullptr, Qt::WindowFlags f = nullptr); TimeLabels(const QTimeZone &zone, int rows, TimeLabelsZone *parent = nullptr, Qt::WindowFlags f = {});
/** updates widget's internal state */ /** updates widget's internal state */
void updateConfig(); void updateConfig();
......
...@@ -795,7 +795,7 @@ bool TodoModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int r ...@@ -795,7 +795,7 @@ bool TodoModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int r
Qt::ItemFlags TodoModel::flags(const QModelIndex &index) const Qt::ItemFlags TodoModel::flags(const QModelIndex &index) const
{ {
if (!index.isValid()) { if (!index.isValid()) {
return nullptr; return Qt::NoItemFlags;
} }
Qt::ItemFlags ret = QAbstractItemModel::flags(index); Qt::ItemFlags ret = QAbstractItemModel::flags(index);
...@@ -807,7 +807,7 @@ Qt::ItemFlags TodoModel::flags(const QModelIndex &index) const ...@@ -807,7 +807,7 @@ Qt::ItemFlags TodoModel::flags(const QModelIndex &index) const
Q_ASSERT(mapToSource(index).isValid()); Q_ASSERT(mapToSource(index).isValid());
qCWarning(CALENDARVIEW_LOG) << "Item is invalid " << index; qCWarning(CALENDARVIEW_LOG) << "Item is invalid " << index;
Q_ASSERT(false); Q_ASSERT(false);
return nullptr; return Qt::NoItemFlags;
} }
ret |= Qt::ItemIsDragEnabled; ret |= Qt::ItemIsDragEnabled;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment