From 04b98a8737ecf8629fa15823495f9756a2f0eb0e Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 15 Jun 2011 14:20:46 +0200 Subject: Mac: switch raster off as default paint engine After discussing the state of the raster engine with many key devs in Oslo, we have concluded the following: Switching to raster as default is a big change for Qt-4.8. The posibilty of introducing regression for 3rd-party applications are high. From manual testing we can easily spot regressions ourselves, expecially for text rendering. And the overall drawing performance seems to drop slightly. So there seem to be no reason for us to take such a risk at this point in time for Qt-4.8, expecially since we have other tasks that should get our attention going forward, and the main person that did the implementation has left. Rev-By: Gunnar Sletta Rev-By: Fabien Freling --- src/gui/painting/qgraphicssystemfactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qgraphicssystemfactory.cpp b/src/gui/painting/qgraphicssystemfactory.cpp index 4309140..01ece09 100644 --- a/src/gui/painting/qgraphicssystemfactory.cpp +++ b/src/gui/painting/qgraphicssystemfactory.cpp @@ -74,7 +74,7 @@ QGraphicsSystem *QGraphicsSystemFactory::create(const QString& key) if (system.isEmpty()) { system = QLatin1String("runtime"); } -#elif defined (QT_GRAPHICSSYSTEM_RASTER) && !defined(Q_WS_WIN) && !defined(Q_OS_SYMBIAN) || defined(Q_WS_X11) || (defined (Q_WS_MAC) && defined(QT_MAC_USE_COCOA)) +#elif defined (QT_GRAPHICSSYSTEM_RASTER) && !defined(Q_WS_WIN) && !defined(Q_OS_SYMBIAN) || defined(Q_WS_X11) if (system.isEmpty()) { system = QLatin1String("raster"); } -- cgit v0.12 From 0f6853e9c775dd8fbb64f66119c2c9b2ea23da29 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 23 Sep 2010 14:14:18 +0200 Subject: Provide the resetInternalData slot to cleanly reset data in proxy subclasses. Direct subclasses of QAbstractItemModel are unnaffected as they can update internal data in a slot connected to the sourceModel's modelReset signal or layoutChanged signal. Rehabilitated for 4.8. Should be reverted again in Qt 5. Reviewed-by: gabi Merge-request: 694 --- .../code/src_corelib_kernel_qabstractitemmodel.cpp | 35 ++++++ src/corelib/kernel/qabstractitemmodel.cpp | 22 ++++ src/corelib/kernel/qabstractitemmodel.h | 3 + .../tst_qsortfilterproxymodel.cpp | 138 +++++++++++++++++++++ 4 files changed, 198 insertions(+) diff --git a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp index 5919c01..cf40f9a 100644 --- a/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp +++ b/doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp @@ -86,3 +86,38 @@ beginMoveRows(parent, 2, 2, parent, 0); //! [9] beginMoveRows(parent, 2, 2, parent, 4); //! [9] + + +//! [10] +class CustomDataProxy : public QSortFilterProxyModel +{ + Q_OBJECT +public: + CustomDataProxy(QObject *parent) + : QSortFilterProxyModel(parent) + { + } + + ... + + QVariant data(const QModelIndex &index, int role) + { + if (role != Qt::BackgroundRole) + return QSortFilterProxyModel::data(index, role); + + if (m_customData.contains(index.row())) + return m_customData.value(index.row()); + return QSortFilterProxyModel::data(index, role); + } + +private slots: + void resetInternalData() + { + m_customData.clear(); + } + +private: + QHash m_customData; +}; +//! [10] + diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index b7ac6aa..54cc301 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -1348,6 +1348,26 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent, */ /*! + \since 4.8 + + This slot is called just after the internal data of a model is cleared + while it is being reset. + + This slot is provided the convenience of subclasses of concrete proxy + models, such as subclasses of QSortFilterProxyModel which maintain extra + data. + + \snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 10 + + \sa modelAboutToBeReset(), modelReset() +*/ +void QAbstractItemModel::resetInternalData() +{ + +} + + +/*! Constructs an abstract item model with the given \a parent. */ QAbstractItemModel::QAbstractItemModel(QObject *parent) @@ -2888,6 +2908,7 @@ void QAbstractItemModel::reset() Q_D(QAbstractItemModel); emit modelAboutToBeReset(); d->invalidatePersistentIndexes(); + QMetaObject::invokeMethod(this, "resetInternalData"); emit modelReset(); } @@ -2930,6 +2951,7 @@ void QAbstractItemModel::endResetModel() { Q_D(QAbstractItemModel); d->invalidatePersistentIndexes(); + QMetaObject::invokeMethod(this, "resetInternalData"); emit modelReset(); } diff --git a/src/corelib/kernel/qabstractitemmodel.h b/src/corelib/kernel/qabstractitemmodel.h index c7af7a2..43d8ac2 100644 --- a/src/corelib/kernel/qabstractitemmodel.h +++ b/src/corelib/kernel/qabstractitemmodel.h @@ -303,6 +303,9 @@ protected: void setRoleNames(const QHash &roleNames); +protected slots: + void resetInternalData(); + private: Q_DECLARE_PRIVATE(QAbstractItemModel) Q_DISABLE_COPY(QAbstractItemModel) diff --git a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp index 613c611..30589a8 100644 --- a/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +++ b/tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp @@ -149,6 +149,7 @@ private slots: void testMultipleProxiesWithSelection(); void mapSelectionFromSource(); + void testResetInternalData(); void filteredColumns(); protected: @@ -3271,5 +3272,142 @@ void tst_QSortFilterProxyModel::taskQTBUG_17812_resetInvalidate() QCOMPARE(ok, works); } +/** + * A proxy which changes the background color for items ending in 'y' or 'r' + */ +class CustomDataProxy : public QSortFilterProxyModel +{ + Q_OBJECT + +public: + CustomDataProxy(QObject *parent = 0) + : QSortFilterProxyModel(parent) + { + setDynamicSortFilter(true); + } + + void setSourceModel(QAbstractItemModel *sourceModel) + { + // It would be possible to use only the modelReset signal of the source model to clear + // the data in *this, however, this requires that the slot is connected + // before QSortFilterProxyModel::setSourceModel is called, and even then depends + // on the order of invokation of slots being the same as the order of connection. + // ie, not reliable. +// connect(sourceModel, SIGNAL(modelReset()), SLOT(resetInternalData())); + QSortFilterProxyModel::setSourceModel(sourceModel); + // Making the connect after the setSourceModel call clears the data too late. +// connect(sourceModel, SIGNAL(modelReset()), SLOT(resetInternalData())); + + // This could be done in data(), but the point is to need to cache something in the proxy + // which needs to be cleared on reset. + for (int i = 0; i < sourceModel->rowCount(); ++i) + { + if (sourceModel->index(i, 0).data().toString().endsWith(QLatin1Char('y'))) + { + m_backgroundColours.insert(i, Qt::blue); + } else if (sourceModel->index(i, 0).data().toString().endsWith(QLatin1Char('r'))) + { + m_backgroundColours.insert(i, Qt::red); + } + } + } + + QVariant data(const QModelIndex &index, int role) const + { + if (role != Qt::BackgroundRole) + return QSortFilterProxyModel::data(index, role); + return m_backgroundColours.value(index.row()); + } + +private slots: + void resetInternalData() + { + m_backgroundColours.clear(); + } + +private: + QHash m_backgroundColours; +}; + +class ModelObserver : public QObject +{ + Q_OBJECT +public: + ModelObserver(QAbstractItemModel *model, QObject *parent = 0) + : QObject(parent), m_model(model) + { + connect(m_model, SIGNAL(modelAboutToBeReset()), SLOT(modelAboutToBeReset())); + connect(m_model, SIGNAL(modelReset()), SLOT(modelReset())); + } + +public slots: + void modelAboutToBeReset() + { + int reds = 0, blues = 0; + for (int i = 0; i < m_model->rowCount(); ++i) + { + QColor color = m_model->index(i, 0).data(Qt::BackgroundRole).value(); + if (color == Qt::blue) + ++blues; + if (color == Qt::red) + ++reds; + } + QCOMPARE(blues, 11); + QCOMPARE(reds, 4); + } + + void modelReset() + { + int reds = 0, blues = 0; + for (int i = 0; i < m_model->rowCount(); ++i) + { + QColor color = m_model->index(i, 0).data(Qt::BackgroundRole).value(); + if (color == Qt::blue) + ++blues; + if (color == Qt::red) + ++reds; + } + QCOMPARE(reds, 0); + QCOMPARE(blues, 0); + } + +private: + QAbstractItemModel * const m_model; + +}; + +void tst_QSortFilterProxyModel::testResetInternalData() +{ + + QStringListModel model(QStringList() << "Monday" + << "Tuesday" + << "Wednesday" + << "Thursday" + << "Friday" + << "January" + << "February" + << "March" + << "April" + << "May" + << "Saturday" + << "June" + << "Sunday" + << "July" + << "August" + << "September" + << "October" + << "November" + << "December"); + + CustomDataProxy proxy; + proxy.setSourceModel(&model); + + ModelObserver observer(&proxy); + + // Cause the source model to reset. + model.setStringList(QStringList() << "Spam" << "Eggs"); + +} + QTEST_MAIN(tst_QSortFilterProxyModel) #include "tst_qsortfilterproxymodel.moc" -- cgit v0.12 From b64b3193a39dc52c520fa74a268f068072468473 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 4 Dec 2010 19:48:57 +0100 Subject: Remove misleading and incorrect information from dropMimeData docs. It is not the responsibility of the view to insert data into the model after a dropMimeData call. --- src/corelib/kernel/qabstractitemmodel.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 54cc301..81cb5ff 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -1767,18 +1767,19 @@ QMimeData *QAbstractItemModel::mimeData(const QModelIndexList &indexes) const Returns true if the data and action can be handled by the model; otherwise returns false. - Although the specified \a row, \a column and \a parent indicate the - location of an item in the model where the operation ended, it is the - responsibility of the view to provide a suitable location for where the - data should be inserted. + The specified \a row, \a column and \a parent indicate the location of an + item in the model where the operation ended. It is the responsibility of + the model to complete the action at the correct location. For instance, a drop action on an item in a QTreeView can result in new items either being inserted as children of the item specified by \a row, \a column, and \a parent, or as siblings of the item. - When row and column are -1 it means that it is up to the model to decide - where to place the data. This can occur in a tree when data is dropped on - a parent. Models will usually append the data to the parent in this case. + When \a row and \a column are -1 it means that the dropped data should be + considered as dropped directly on \a parent. Usually this will mean + appending the data as child items of \a parent. If \a row and column are + greater than or equal zero, it means that the drop occured just before the + specified \a row and \a column in the specified \a parent. \sa supportedDropActions(), {Using drag and drop with item views} */ -- cgit v0.12 From 6b54dc34fdaebeb5d62ea42ab94d5e18679ae5b5 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 28 Jun 2011 12:56:30 +0200 Subject: Mac: respect WA_ShowWithoutActivating flag Seems like we just made any window key when showing it, regardless if WA_ShowWithoutActivating was set. This patch will fix this. Rev-By: msorvig --- src/gui/kernel/qwidget_mac.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 778f1f1..225a296 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -3490,7 +3490,10 @@ void QWidgetPrivate::show_sys() QWidget *top = 0; if (QApplicationPrivate::tryModalHelper(q, &top)) { - [window makeKeyAndOrderFront:window]; + if (q->testAttribute(Qt::WA_ShowWithoutActivating)) + [window orderFront:window]; + else + [window makeKeyAndOrderFront:window]; // If this window is app modal, we need to start spinning // a modal session for it. Interrupting // the event dispatcher will make this happend: -- cgit v0.12 From f067c2b3016182862e82805b13c7944ebe8671a9 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 20 Jun 2011 14:29:16 +0200 Subject: Fix typo in comment. --- src/gui/accessible/qaccessible_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/accessible/qaccessible_mac.mm b/src/gui/accessible/qaccessible_mac.mm index 432b536..a250730 100644 --- a/src/gui/accessible/qaccessible_mac.mm +++ b/src/gui/accessible/qaccessible_mac.mm @@ -2427,7 +2427,7 @@ void QAccessible::updateAccessibility(QObject *object, int child, Event reason) } // There is no equivalent Mac notification for ObjectShow/Hide, so we call HIObjectSetAccessibilityIgnored - // and isItIntersting which will mark the HIObject accociated with the element as ignored if the + // and isItInteresting which will mark the HIObject accociated with the element as ignored if the // QAccessible::Invisible state bit is set. QAInterface interface = accessibleHierarchyManager()->lookup(element); if (interface.isValid()) { -- cgit v0.12 From 276d16583b80da2838f9af47e15fe3a83cdb0485 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Tue, 28 Jun 2011 14:37:10 +0200 Subject: Fix a11y crash: dock doesn't always have a widget. Also return dock widget title. Reviewed-by: Gabriel de Dietrich --- src/plugins/accessible/widgets/qaccessiblewidgets.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp index c62624b..a0dde37 100644 --- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp +++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp @@ -73,6 +73,9 @@ QT_BEGIN_NAMESPACE using namespace QAccessible2; +QString Q_GUI_EXPORT qt_accStripAmp(const QString &text); +QString Q_GUI_EXPORT qt_accHotKey(const QString &text); + QList childWidgets(const QWidget *widget, bool includeTopLevel) { if (widget == 0) @@ -1139,8 +1142,8 @@ int QAccessibleTitleBar::childCount() const QString QAccessibleTitleBar::text(Text t, int child) const { if (!child) { - if (t == Value) { - return dockWidget()->windowTitle(); + if (t == Name || t == Value) { + return qt_accStripAmp(dockWidget()->windowTitle()); } } return QString(); @@ -1171,17 +1174,19 @@ QAccessible::State QAccessibleTitleBar::state(int child) const return state; } -QRect QAccessibleTitleBar::rect (int child ) const +QRect QAccessibleTitleBar::rect(int child) const { bool mapToGlobal = true; QRect rect; if (child == 0) { if (dockWidget()->isFloating()) { rect = dockWidget()->frameGeometry(); - QPoint globalPos = dockWidget()->mapToGlobal( dockWidget()->widget()->rect().topLeft() ); - globalPos.ry()--; - rect.setBottom(globalPos.y()); - mapToGlobal = false; + if (dockWidget()->widget()) { + QPoint globalPos = dockWidget()->mapToGlobal(dockWidget()->widget()->rect().topLeft()); + globalPos.ry()--; + rect.setBottom(globalPos.y()); + mapToGlobal = false; + } } else { QDockWidgetLayout *layout = qobject_cast(dockWidget()->layout()); rect = layout->titleArea(); -- cgit v0.12 From f1f37995238fd6b7dc5b65f6b2f9279021d4363d Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Tue, 28 Jun 2011 16:52:54 +0200 Subject: Use Q_SLOTS instead of slots in public headers. Reviewed-by: gabi --- src/corelib/kernel/qabstractitemmodel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qabstractitemmodel.h b/src/corelib/kernel/qabstractitemmodel.h index 43d8ac2..eab1475 100644 --- a/src/corelib/kernel/qabstractitemmodel.h +++ b/src/corelib/kernel/qabstractitemmodel.h @@ -303,7 +303,7 @@ protected: void setRoleNames(const QHash &roleNames); -protected slots: +protected Q_SLOTS: void resetInternalData(); private: -- cgit v0.12 From a4b4f2a5491b3df9cbe0c70616645bf0136520e0 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 29 Jun 2011 13:39:31 +0200 Subject: Cocoa: Fix qgraphicsproxywidget auto test This test fails for CoreGraphics graphics engine on Cocoa. The reason is that we less control over when Cocoa sends us updates, and the size of the region it tells us to update. Rev-By: msorvig --- tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp index 29c6591..8c52bb8 100644 --- a/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp +++ b/tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp @@ -1498,6 +1498,10 @@ void tst_QGraphicsProxyWidget::scrollUpdate() view.paintEventRegion = QRegion(); view.npaints = 0; QTimer::singleShot(0, widget, SLOT(updateScroll())); +#if defined(QT_MAC_USE_COCOA) + if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) + QEXPECT_FAIL(0, "Cocoa will send us one aggregated update", Abort); +#endif QTRY_COMPARE(view.npaints, 2); // QRect(0, 0, 200, 12) is the first update, expanded (-2, -2, 2, 2) // QRect(0, 12, 102, 10) is the scroll update, expanded (-2, -2, 2, 2), -- cgit v0.12 From a73b1aba6373639033fba771a059c4a2d3847d7e Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 29 Jun 2011 14:29:14 +0200 Subject: Cocoa: fix qwidget auto test failures Some of the test are bound to fail then using the native paint engine on Mac. They failed before as well, but were swiched on as a part of the raster engine implementation. But now that we decide not to go with raster as default after all, be skip some of the tests again Rev-By: msorvig --- tests/auto/qwidget/tst_qwidget.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 5550fe8..cf8d97e 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -4052,6 +4052,11 @@ public: */ void tst_QWidget::optimizedResizeMove() { +#if defined(QT_MAC_USE_COCOA) + if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) + QSKIP("WA_StaticContents in Cocoa/Native paint engine lacks support", SkipAll); +#endif + QWidget parent; parent.resize(400, 400); @@ -8258,6 +8263,10 @@ void tst_QWidget::doubleRepaint() QCOMPARE(widget.numPaintEvents, 0); widget.numPaintEvents = 0; +#if defined(QT_MAC_USE_COCOA) + if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) + QEXPECT_FAIL(0, "Cocoa will send us an update when showing the window", Continue); +#endif // Restore: Should not trigger a repaint. widget.showNormal(); QTest::qWaitForWindowShown(&widget); @@ -8367,6 +8376,11 @@ public slots: void tst_QWidget::setMaskInResizeEvent() { +#if defined(QT_MAC_USE_COCOA) + if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) + QSKIP("Updates on masked widgets are not optimized for Cocoa/native paint engine", SkipAll); +#endif + UpdateWidget w; w.reset(); w.resize(200, 200); @@ -9041,6 +9055,11 @@ void tst_QWidget::setClearAndResizeMask() void tst_QWidget::maskedUpdate() { +#if defined(QT_MAC_USE_COCOA) + if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) + QSKIP("Updates on masked widgets are not optimized for Cocoa/native paint engine", SkipAll); +#endif + UpdateWidget topLevel; topLevel.resize(200, 200); const QRegion topLevelMask(50, 50, 70, 70); -- cgit v0.12 From c9b588f419145caa6ab1d1040a3452783fc9577a Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 29 Jun 2011 15:01:52 +0200 Subject: Cocoa: fix qtabwidget auto test failure The fixed test fails when switching back to native paint engine as default, as opposed to raster. I'm not really sure why, and I hate just commenting the test out. But right now it is more important to 'revert' raster as default for Qt-4.8-beta, than to puzzle with update optimizations for tab widget. Rev-by: msorvig --- tests/auto/qtabwidget/tst_qtabwidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/auto/qtabwidget/tst_qtabwidget.cpp b/tests/auto/qtabwidget/tst_qtabwidget.cpp index cc3dfc1..77ae27f 100644 --- a/tests/auto/qtabwidget/tst_qtabwidget.cpp +++ b/tests/auto/qtabwidget/tst_qtabwidget.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -618,6 +619,10 @@ void tst_QTabWidget::paintEventCount() QTest::qWait(100); QCOMPARE(tab1->count, initalPaintCount); +#if defined(QT_MAC_USE_COCOA) + if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) + QEXPECT_FAIL(0, "Cocoa sends an extra updates when the view is shown", Abort); +#endif QCOMPARE(tab2->count, 1); tw->setCurrentIndex(0); -- cgit v0.12 From 680023c4921019614948c277cde5498645836cb9 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 29 Jun 2011 15:12:50 +0200 Subject: Fix typo in docs: occurred. Reviewed-by: gabi --- src/corelib/kernel/qabstractitemmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index 81cb5ff..ddf1fbb 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -1778,7 +1778,7 @@ QMimeData *QAbstractItemModel::mimeData(const QModelIndexList &indexes) const When \a row and \a column are -1 it means that the dropped data should be considered as dropped directly on \a parent. Usually this will mean appending the data as child items of \a parent. If \a row and column are - greater than or equal zero, it means that the drop occured just before the + greater than or equal zero, it means that the drop occurred just before the specified \a row and \a column in the specified \a parent. \sa supportedDropActions(), {Using drag and drop with item views} -- cgit v0.12