diff options
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r-- | src/widgets/itemviews/qabstractitemview.cpp | 29 | ||||
-rw-r--r-- | src/widgets/itemviews/qcolumnview_p.h | 4 | ||||
-rw-r--r-- | src/widgets/itemviews/qcolumnviewgrip_p.h | 4 | ||||
-rw-r--r-- | src/widgets/itemviews/qdirmodel.cpp | 4 | ||||
-rw-r--r-- | src/widgets/itemviews/qheaderview.cpp | 2 | ||||
-rw-r--r-- | src/widgets/itemviews/qheaderview_p.h | 2 | ||||
-rw-r--r-- | src/widgets/itemviews/qlistview.cpp | 16 | ||||
-rw-r--r-- | src/widgets/itemviews/qlistview_p.h | 2 | ||||
-rw-r--r-- | src/widgets/itemviews/qtableview.cpp | 56 | ||||
-rw-r--r-- | src/widgets/itemviews/qtableview_p.h | 11 | ||||
-rw-r--r-- | src/widgets/itemviews/qtreeview.h | 2 | ||||
-rw-r--r-- | src/widgets/itemviews/qtreeview_p.h | 4 | ||||
-rw-r--r-- | src/widgets/itemviews/qtreewidget_p.h | 4 |
13 files changed, 66 insertions, 74 deletions
diff --git a/src/widgets/itemviews/qabstractitemview.cpp b/src/widgets/itemviews/qabstractitemview.cpp index 95631ffa5f..6ff0fe8132 100644 --- a/src/widgets/itemviews/qabstractitemview.cpp +++ b/src/widgets/itemviews/qabstractitemview.cpp @@ -180,7 +180,7 @@ void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index QString statustip = model->data(index, Qt::StatusTipRole).toString(); if (parent && (shouldClearStatusTip || !statustip.isEmpty())) { QStatusTipEvent tip(statustip); - QApplication::sendEvent(parent, &tip); + QCoreApplication::sendEvent(parent, &tip); shouldClearStatusTip = !statustip.isEmpty(); } #endif @@ -189,7 +189,7 @@ void QAbstractItemViewPrivate::checkMouseMove(const QPersistentModelIndex &index if (parent && shouldClearStatusTip) { QString emptyString; QStatusTipEvent tip( emptyString ); - QApplication::sendEvent(parent, &tip); + QCoreApplication::sendEvent(parent, &tip); } #endif emit q->viewportEntered(); @@ -521,7 +521,7 @@ void QAbstractItemViewPrivate::_q_scrollerStateChanged() the mouse was pressed on is specified by \a index. The signal is only emitted when the index is valid. - Use the QApplication::mouseButtons() function to get the state + Use the QGuiApplication::mouseButtons() function to get the state of the mouse buttons. \sa activated(), clicked(), doubleClicked(), entered() @@ -1713,7 +1713,7 @@ bool QAbstractItemView::viewportEvent(QEvent *event) if (d->shouldClearStatusTip && d->parent) { QString empty; QStatusTipEvent tip(empty); - QApplication::sendEvent(d->parent, &tip); + QCoreApplication::sendEvent(d->parent, &tip); d->shouldClearStatusTip = false; } #endif @@ -2338,7 +2338,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event) if (d->model) variant = d->model->data(currentIndex(), Qt::DisplayRole); if (variant.type() == QVariant::String) - QApplication::clipboard()->setText(variant.toString()); + QGuiApplication::clipboard()->setText(variant.toString()); event->accept(); } #endif @@ -2845,7 +2845,7 @@ void QAbstractItemView::closeEditor(QWidget *editor, QAbstractItemDelegate::EndE } QPointer<QWidget> ed = editor; - QApplication::sendPostedEvents(editor, 0); + QCoreApplication::sendPostedEvents(editor, 0); editor = ed; if (!isPersistent && editor) @@ -3957,7 +3957,7 @@ QItemSelectionModel::SelectionFlags QAbstractItemView::selectionCommand(const QM keyModifiers = (static_cast<const QInputEvent*>(event))->modifiers(); break; default: - keyModifiers = QApplication::keyboardModifiers(); + keyModifiers = QGuiApplication::keyboardModifiers(); } } switch (d->selectionMode) { @@ -4015,7 +4015,7 @@ QItemSelectionModel::SelectionFlags QAbstractItemViewPrivate::multiSelectionComm QItemSelectionModel::SelectionFlags QAbstractItemViewPrivate::extendedSelectionCommand( const QModelIndex &index, const QEvent *event) const { - Qt::KeyboardModifiers modifiers = QApplication::keyboardModifiers(); + Qt::KeyboardModifiers modifiers = QGuiApplication::keyboardModifiers(); if (event) { switch (event->type()) { case QEvent::MouseMove: { @@ -4425,7 +4425,7 @@ bool QAbstractItemViewPrivate::openEditor(const QModelIndex &index, QEvent *even w->setFocus(); if (event) - QApplication::sendEvent(w->focusProxy() ? w->focusProxy() : w, event); + QCoreApplication::sendEvent(w->focusProxy() ? w->focusProxy() : w, event); return true; } @@ -4461,15 +4461,8 @@ QPixmap QAbstractItemViewPrivate::renderToPixmap(const QModelIndexList &indexes, if (paintPairs.isEmpty()) return QPixmap(); - qreal scale = 1.0f; - - Q_Q(const QAbstractItemView); - QWidget *window = q->window(); - if (window) { - QWindow *windowHandle = window->windowHandle(); - if (windowHandle) - scale = windowHandle->devicePixelRatio(); - } + QWindow *window = windowHandle(WindowHandleMode::Closest); + const qreal scale = window ? window->devicePixelRatio() : qreal(1); QPixmap pixmap(r->size() * scale); pixmap.setDevicePixelRatio(scale); diff --git a/src/widgets/itemviews/qcolumnview_p.h b/src/widgets/itemviews/qcolumnview_p.h index 7b36b1f3da..c60579255e 100644 --- a/src/widgets/itemviews/qcolumnview_p.h +++ b/src/widgets/itemviews/qcolumnview_p.h @@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE class QColumnViewPreviewColumn : public QAbstractItemView { public: - explicit QColumnViewPreviewColumn(QWidget *parent) : QAbstractItemView(parent), previewWidget(0) { + explicit QColumnViewPreviewColumn(QWidget *parent) : QAbstractItemView(parent), previewWidget(nullptr) { } void setPreviewWidget(QWidget *widget) { @@ -186,7 +186,7 @@ class QColumnViewDelegate : public QItemDelegate { public: - explicit QColumnViewDelegate(QObject *parent = 0) : QItemDelegate(parent) {} + explicit QColumnViewDelegate(QObject *parent = nullptr) : QItemDelegate(parent) {} ~QColumnViewDelegate() {} void paint(QPainter *painter, diff --git a/src/widgets/itemviews/qcolumnviewgrip_p.h b/src/widgets/itemviews/qcolumnviewgrip_p.h index 5eb8012204..4311edbeb4 100644 --- a/src/widgets/itemviews/qcolumnviewgrip_p.h +++ b/src/widgets/itemviews/qcolumnviewgrip_p.h @@ -68,12 +68,12 @@ Q_SIGNALS: void gripMoved(int offset); public: - explicit QColumnViewGrip(QWidget *parent = 0); + explicit QColumnViewGrip(QWidget *parent = nullptr); ~QColumnViewGrip(); int moveGrip(int offset); protected: - QColumnViewGrip(QColumnViewGripPrivate &, QWidget *parent = 0, Qt::WindowFlags f = 0); + QColumnViewGrip(QColumnViewGripPrivate &, QWidget *parent = nullptr, Qt::WindowFlags f = nullptr); void paintEvent(QPaintEvent *event) override; void mouseDoubleClickEvent(QMouseEvent *event) override; void mouseMoveEvent(QMouseEvent *event) override; diff --git a/src/widgets/itemviews/qdirmodel.cpp b/src/widgets/itemviews/qdirmodel.cpp index b94c31fb42..13a1bbd8eb 100644 --- a/src/widgets/itemviews/qdirmodel.cpp +++ b/src/widgets/itemviews/qdirmodel.cpp @@ -1086,7 +1086,7 @@ QString QDirModel::filePath(const QModelIndex &index) const if (d->indexValid(index)) { QFileInfo fi = fileInfo(index); if (d->resolveSymlinks && fi.isSymLink()) - fi = d->resolvedInfo(fi); + fi = QDirModelPrivate::resolvedInfo(fi); return QDir::cleanPath(fi.absoluteFilePath()); } return QString(); // root path @@ -1108,7 +1108,7 @@ QString QDirModel::fileName(const QModelIndex &index) const if (QFileSystemEntry::isRootPath(path)) return path; if (d->resolveSymlinks && info.isSymLink()) - info = d->resolvedInfo(info); + info = QDirModelPrivate::resolvedInfo(info); return info.fileName(); } diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index 1fcd5bdef2..be80843b07 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -2896,7 +2896,7 @@ bool QHeaderView::viewportEvent(QEvent *e) case QEvent::Wheel: { QAbstractScrollArea *asa = qobject_cast<QAbstractScrollArea *>(parentWidget()); if (asa) - return QApplication::sendEvent(asa->viewport(), e); + return QCoreApplication::sendEvent(asa->viewport(), e); break; } default: break; diff --git a/src/widgets/itemviews/qheaderview_p.h b/src/widgets/itemviews/qheaderview_p.h index d9fc1baec5..766adef36d 100644 --- a/src/widgets/itemviews/qheaderview_p.h +++ b/src/widgets/itemviews/qheaderview_p.h @@ -102,7 +102,7 @@ public: lastSectionLogicalIdx(-1), // Only trust when we stretch last section sectionIndicatorOffset(0), #if QT_CONFIG(label) - sectionIndicator(0), + sectionIndicator(nullptr), #endif globalResizeMode(QHeaderView::Interactive), sectionStartposRecalc(true), diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp index 568084640a..7d18c06def 100644 --- a/src/widgets/itemviews/qlistview.cpp +++ b/src/widgets/itemviews/qlistview.cpp @@ -810,24 +810,24 @@ void QListView::mouseReleaseEvent(QMouseEvent *e) void QListView::wheelEvent(QWheelEvent *e) { Q_D(QListView); - if (e->orientation() == Qt::Vertical) { + if (qAbs(e->angleDelta().y()) > qAbs(e->angleDelta().x())) { if (e->angleDelta().x() == 0 - && ((d->flow == TopToBottom && d->wrap) || (d->flow == LeftToRight && !d->wrap)) - && d->vbar->minimum() == 0 && d->vbar->maximum() == 0) { + && ((d->flow == TopToBottom && d->wrap) || (d->flow == LeftToRight && !d->wrap)) + && d->vbar->minimum() == 0 && d->vbar->maximum() == 0) { QPoint pixelDelta(e->pixelDelta().y(), e->pixelDelta().x()); QPoint angleDelta(e->angleDelta().y(), e->angleDelta().x()); - QWheelEvent hwe(e->pos(), e->globalPos(), pixelDelta, angleDelta, e->delta(), - Qt::Horizontal, e->buttons(), e->modifiers(), e->phase(), e->source(), e->inverted()); + QWheelEvent hwe(e->position(), e->globalPosition(), pixelDelta, angleDelta, + e->buttons(), e->modifiers(), e->phase(), e->inverted(), e->source()); if (e->spontaneous()) qt_sendSpontaneousEvent(d->hbar, &hwe); else - QApplication::sendEvent(d->hbar, &hwe); + QCoreApplication::sendEvent(d->hbar, &hwe); e->setAccepted(hwe.isAccepted()); } else { - QApplication::sendEvent(d->vbar, e); + QCoreApplication::sendEvent(d->vbar, e); } } else { - QApplication::sendEvent(d->hbar, e); + QCoreApplication::sendEvent(d->hbar, e); } } #endif // QT_CONFIG(wheelevent) diff --git a/src/widgets/itemviews/qlistview_p.h b/src/widgets/itemviews/qlistview_p.h index c6810f8fdc..86331bb862 100644 --- a/src/widgets/itemviews/qlistview_p.h +++ b/src/widgets/itemviews/qlistview_p.h @@ -248,7 +248,7 @@ private: class QIconModeViewBase : public QCommonListViewBase { public: - QIconModeViewBase(QListView *q, QListViewPrivate *d) : QCommonListViewBase(q, d), interSectingVector(0) {} + QIconModeViewBase(QListView *q, QListViewPrivate *d) : QCommonListViewBase(q, d), interSectingVector(nullptr) {} QBspTree tree; QVector<QListViewItem> items; diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp index d4a6433c4d..8860ef208d 100644 --- a/src/widgets/itemviews/qtableview.cpp +++ b/src/widgets/itemviews/qtableview.cpp @@ -58,6 +58,8 @@ #include <qaccessible.h> #endif +#include <algorithm> + QT_BEGIN_NAMESPACE /** \internal @@ -65,7 +67,7 @@ QT_BEGIN_NAMESPACE */ void QSpanCollection::addSpan(QSpanCollection::Span *span) { - spans.append(span); + spans.push_back(span); Index::iterator it_y = index.lowerBound(-span->top()); if (it_y == index.end() || it_y.key() != -span->top()) { //there is no spans that starts with the row in the index, so create a sublist for it. @@ -132,7 +134,7 @@ void QSpanCollection::updateSpan(QSpanCollection::Span *span, int old_height) } if (span->width() == 0 && span->height() == 0) { - spans.removeOne(span); + spans.remove(span); delete span; } } @@ -169,7 +171,7 @@ void QSpanCollection::clear() /** \internal * return a list to all the spans that spans over cells in the given rectangle */ -QList<QSpanCollection::Span *> QSpanCollection::spansInRect(int x, int y, int w, int h) const +QSet<QSpanCollection::Span *> QSpanCollection::spansInRect(int x, int y, int w, int h) const { QSet<Span *> list; Index::const_iterator it_y = index.lowerBound(-y); @@ -191,7 +193,7 @@ QList<QSpanCollection::Span *> QSpanCollection::spansInRect(int x, int y, int w, break; --it_y; } - return list.toList(); + return list; } #undef DEBUG_SPAN_UPDATE @@ -210,17 +212,16 @@ QDebug operator<<(QDebug str, const QSpanCollection::Span &span) void QSpanCollection::updateInsertedRows(int start, int end) { #ifdef DEBUG_SPAN_UPDATE - qDebug() << start << end << endl << index; + qDebug() << start << end << Qt::endl << index; #endif - if (spans.isEmpty()) + if (spans.empty()) return; int delta = end - start + 1; #ifdef DEBUG_SPAN_UPDATE qDebug("Before"); #endif - for (SpanList::iterator it = spans.begin(); it != spans.end(); ++it) { - Span *span = *it; + for (Span *span : spans) { #ifdef DEBUG_SPAN_UPDATE qDebug() << span << *span; #endif @@ -258,17 +259,16 @@ void QSpanCollection::updateInsertedRows(int start, int end) void QSpanCollection::updateInsertedColumns(int start, int end) { #ifdef DEBUG_SPAN_UPDATE - qDebug() << start << end << endl << index; + qDebug() << start << end << Qt::endl << index; #endif - if (spans.isEmpty()) + if (spans.empty()) return; int delta = end - start + 1; #ifdef DEBUG_SPAN_UPDATE qDebug("Before"); #endif - for (SpanList::iterator it = spans.begin(); it != spans.end(); ++it) { - Span *span = *it; + for (Span *span : spans) { #ifdef DEBUG_SPAN_UPDATE qDebug() << span << *span; #endif @@ -339,9 +339,9 @@ bool QSpanCollection::cleanSpanSubIndex(QSpanCollection::SubIndex &subindex, int void QSpanCollection::updateRemovedRows(int start, int end) { #ifdef DEBUG_SPAN_UPDATE - qDebug() << start << end << endl << index; + qDebug() << start << end << Qt::endl << index; #endif - if (spans.isEmpty()) + if (spans.empty()) return; SpanList spansToBeDeleted; @@ -377,7 +377,7 @@ void QSpanCollection::updateRemovedRows(int start, int end) if (span->m_top == span->m_bottom && span->m_left == span->m_right) span->will_be_deleted = true; if (span->will_be_deleted) { - spansToBeDeleted.append(span); + spansToBeDeleted.push_back(span); it = spans.erase(it); } else { ++it; @@ -389,7 +389,7 @@ void QSpanCollection::updateRemovedRows(int start, int end) foreach (QSpanCollection::Span *span, spans) qDebug() << span << *span; #endif - if (spans.isEmpty()) { + if (spans.empty()) { qDeleteAll(spansToBeDeleted); index.clear(); return; @@ -466,9 +466,9 @@ void QSpanCollection::updateRemovedRows(int start, int end) void QSpanCollection::updateRemovedColumns(int start, int end) { #ifdef DEBUG_SPAN_UPDATE - qDebug() << start << end << endl << index; + qDebug() << start << end << Qt::endl << index; #endif - if (spans.isEmpty()) + if (spans.empty()) return; SpanList toBeDeleted; @@ -504,7 +504,7 @@ void QSpanCollection::updateRemovedColumns(int start, int end) if (span->m_top == span->m_bottom && span->m_left == span->m_right) span->will_be_deleted = true; if (span->will_be_deleted) { - toBeDeleted.append(span); + toBeDeleted.push_back(span); it = spans.erase(it); } else { ++it; @@ -516,7 +516,7 @@ void QSpanCollection::updateRemovedColumns(int start, int end) foreach (QSpanCollection::Span *span, spans) qDebug() << span << *span; #endif - if (spans.isEmpty()) { + if (spans.empty()) { qDeleteAll(toBeDeleted); index.clear(); return; @@ -552,13 +552,13 @@ bool QSpanCollection::checkConsistency() const for (SubIndex::const_iterator it = subIndex.begin(); it != subIndex.end(); ++it) { int x = -it.key(); Span *span = it.value(); - if (!spans.contains(span) || span->left() != x - || y < span->top() || y > span->bottom()) + const bool contains = std::find(spans.begin(), spans.end(), span) != spans.end(); + if (!contains || span->left() != x || y < span->top() || y > span->bottom()) return false; } } - foreach (const Span *span, spans) { + for (const Span *span : spans) { if (span->width() < 1 || span->height() < 1 || (span->width() == 1 && span->height() == 1)) return false; @@ -863,19 +863,17 @@ void QTableViewPrivate::drawAndClipSpans(const QRegion &area, QPainter *painter, bool alternateBase = false; QRegion region = viewport->rect(); - QList<QSpanCollection::Span *> visibleSpans; + QSet<QSpanCollection::Span *> visibleSpans; bool sectionMoved = verticalHeader->sectionsMoved() || horizontalHeader->sectionsMoved(); if (!sectionMoved) { visibleSpans = spans.spansInRect(logicalColumn(firstVisualColumn), logicalRow(firstVisualRow), lastVisualColumn - firstVisualColumn + 1, lastVisualRow - firstVisualRow + 1); } else { - QSet<QSpanCollection::Span *> set; for(int x = firstVisualColumn; x <= lastVisualColumn; x++) for(int y = firstVisualRow; y <= lastVisualRow; y++) - set.insert(spans.spanAt(x,y)); - set.remove(0); - visibleSpans = set.toList(); + visibleSpans.insert(spans.spanAt(x,y)); + visibleSpans.remove(nullptr); } for (QSpanCollection::Span *span : qAsConst(visibleSpans)) { @@ -1925,7 +1923,7 @@ void QTableView::setSelection(const QRect &rect, QItemSelectionModel::SelectionF int right = qMax(d->visualColumn(tl.column()), d->visualColumn(br.column())); do { expanded = false; - foreach (QSpanCollection::Span *it, d->spans.spans) { + for (QSpanCollection::Span *it : d->spans.spans) { const QSpanCollection::Span &span = *it; int t = d->visualRow(span.top()); int l = d->visualColumn(span.left()); diff --git a/src/widgets/itemviews/qtableview_p.h b/src/widgets/itemviews/qtableview_p.h index d55462c28b..8f174351d2 100644 --- a/src/widgets/itemviews/qtableview_p.h +++ b/src/widgets/itemviews/qtableview_p.h @@ -53,12 +53,13 @@ #include <QtWidgets/private/qtwidgetsglobal_p.h> #include <QtCore/QList> -#include <QtCore/QLinkedList> #include <QtCore/QMap> #include <QtCore/QSet> #include <QtCore/QDebug> #include "private/qabstractitemview_p.h" +#include <list> + QT_REQUIRE_CONFIG(tableview); QT_BEGIN_NAMESPACE @@ -104,7 +105,7 @@ public: void updateSpan(Span *span, int old_height); Span *spanAt(int x, int y) const; void clear(); - QList<Span *> spansInRect(int x, int y, int w, int h) const; + QSet<Span *> spansInRect(int x, int y, int w, int h) const; void updateInsertedRows(int start, int end); void updateInsertedColumns(int start, int end); @@ -115,7 +116,7 @@ public: bool checkConsistency() const; #endif - typedef QLinkedList<Span *> SpanList; + typedef std::list<Span *> SpanList; SpanList spans; //lists of all spans private: //the indexes are negative so the QMap::lowerBound do what i need. @@ -137,7 +138,7 @@ public: : showGrid(true), gridStyle(Qt::SolidLine), rowSectionAnchor(-1), columnSectionAnchor(-1), columnResizeTimerID(0), rowResizeTimerID(0), - horizontalHeader(0), verticalHeader(0), + horizontalHeader(nullptr), verticalHeader(nullptr), sortingEnabled(false), geometryRecursionBlock(false), visualCursor(QPoint()) { @@ -210,7 +211,7 @@ public: return span(row, column).width(); } inline bool hasSpans() const { - return !spans.spans.isEmpty(); + return !spans.spans.empty(); } inline int rowSpanHeight(int row, int span) const { return sectionSpanSize(verticalHeader, row, span); diff --git a/src/widgets/itemviews/qtreeview.h b/src/widgets/itemviews/qtreeview.h index e9cc1beedb..bb00f1df07 100644 --- a/src/widgets/itemviews/qtreeview.h +++ b/src/widgets/itemviews/qtreeview.h @@ -158,7 +158,7 @@ public Q_SLOTS: void collapse(const QModelIndex &index); void resizeColumnToContents(int column); #if QT_DEPRECATED_SINCE(5, 13) - QT_DEPRECATED_X ("Use QTreeeView::sortByColumn(int column, Qt::SortOrder order) instead") + QT_DEPRECATED_X ("Use QTreeView::sortByColumn(int column, Qt::SortOrder order) instead") void sortByColumn(int column); #endif void sortByColumn(int column, Qt::SortOrder order); diff --git a/src/widgets/itemviews/qtreeview_p.h b/src/widgets/itemviews/qtreeview_p.h index 9666a9f8c2..836d8f0c2d 100644 --- a/src/widgets/itemviews/qtreeview_p.h +++ b/src/widgets/itemviews/qtreeview_p.h @@ -87,7 +87,7 @@ public: QTreeViewPrivate() : QAbstractItemViewPrivate(), - header(0), indent(20), lastViewedItem(0), defaultItemHeight(-1), + header(nullptr), indent(20), lastViewedItem(0), defaultItemHeight(-1), uniformRowHeights(false), rootDecoration(true), itemsExpandable(true), sortingEnabled(false), expandsOnDoubleClick(true), @@ -157,7 +157,7 @@ public: bool checkViewItems() const; #endif - int firstVisibleItem(int *offset = 0) const; + int firstVisibleItem(int *offset = nullptr) const; int lastVisibleItem(int firstVisual = -1, int offset = -1) const; int columnAt(int x) const; bool hasVisibleChildren( const QModelIndex& parent) const; diff --git a/src/widgets/itemviews/qtreewidget_p.h b/src/widgets/itemviews/qtreewidget_p.h index ee4a633468..81e7e86203 100644 --- a/src/widgets/itemviews/qtreewidget_p.h +++ b/src/widgets/itemviews/qtreewidget_p.h @@ -78,7 +78,7 @@ class QTreeModel : public QAbstractItemModel friend class QTreeWidgetItemIteratorPrivate; public: - explicit QTreeModel(int columns = 0, QTreeWidget *parent = 0); + explicit QTreeModel(int columns = 0, QTreeWidget *parent = nullptr); ~QTreeModel(); inline QTreeWidget *view() const @@ -140,7 +140,7 @@ public: { return createIndex(row, col, item); } protected: - QTreeModel(QTreeModelPrivate &, QTreeWidget *parent = 0); + QTreeModel(QTreeModelPrivate &, QTreeWidget *parent = nullptr); void emitDataChanged(QTreeWidgetItem *item, int column, const QVector<int> &roles); void beginInsertItems(QTreeWidgetItem *parent, int row, int count); void endInsertItems(); |