Hello community, here is the log from the commit of package kitemmodels for openSUSE:Factory checked in at 2016-02-24 18:55:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kitemmodels (Old) and /work/SRC/openSUSE:Factory/.kitemmodels.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kitemmodels" Changes: -------- --- /work/SRC/openSUSE:Factory/kitemmodels/kitemmodels.changes 2016-01-20 09:46:09.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kitemmodels.new/kitemmodels.changes 2016-02-24 18:55:49.000000000 +0100 @@ -1,0 +2,8 @@ +Sat Feb 6 18:04:28 UTC 2016 - [email protected] + +- Update to 5.19.0 (boo#967668) + * KRecursiveFilterProxyModel::match: Fix crash + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.19.0.php + +------------------------------------------------------------------- Old: ---- kitemmodels-5.18.0.tar.xz New: ---- kitemmodels-5.19.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kitemmodels.spec ++++++ --- /var/tmp/diff_new_pack.NIsbrf/_old 2016-02-24 18:55:50.000000000 +0100 +++ /var/tmp/diff_new_pack.NIsbrf/_new 2016-02-24 18:55:50.000000000 +0100 @@ -17,9 +17,9 @@ %define lname libKF5ItemModels5 -%define _tar_path 5.18 +%define _tar_path 5.19 Name: kitemmodels -Version: 5.18.0 +Version: 5.19.0 Release: 0 BuildRequires: cmake >= 2.8.12 BuildRequires: extra-cmake-modules >= %{_tar_path} ++++++ kitemmodels-5.18.0.tar.xz -> kitemmodels-5.19.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/CMakeLists.txt new/kitemmodels-5.19.0/CMakeLists.txt --- old/kitemmodels-5.18.0/CMakeLists.txt 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/CMakeLists.txt 2016-02-06 10:38:41.000000000 +0100 @@ -3,7 +3,7 @@ project(KItemModels) include(FeatureSummary) -find_package(ECM 5.18.0 NO_MODULE) +find_package(ECM 5.19.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -11,7 +11,7 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) include(KDEInstallDirs) -include(KDEFrameworkCompilerSettings) +include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) set(REQUIRED_QT_VERSION 5.3.0) @@ -23,7 +23,7 @@ include(ECMSetupVersion) include(ECMGenerateHeaders) -set(KF5_VERSION "5.18.0") # handled by release scripts +set(KF5_VERSION "5.19.0") # handled by release scripts ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KITEMMODELS VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kitemmodels_version.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/autotests/kconcatenaterowsproxymodeltest.cpp new/kitemmodels-5.19.0/autotests/kconcatenaterowsproxymodeltest.cpp --- old/kitemmodels-5.18.0/autotests/kconcatenaterowsproxymodeltest.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/autotests/kconcatenaterowsproxymodeltest.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -46,15 +46,15 @@ // Then the proxy should show 2 rows QCOMPARE(pm.rowCount(), 2); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); - QCOMPARE(extractRowTexts(&pm, 1), QString("DEF")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF")); // ... and correct headers - QCOMPARE(pm.headerData(0, Qt::Horizontal).toString(), QString("H1")); - QCOMPARE(pm.headerData(1, Qt::Horizontal).toString(), QString("H2")); - QCOMPARE(pm.headerData(2, Qt::Horizontal).toString(), QString("H3")); - QCOMPARE(pm.headerData(0, Qt::Vertical).toString(), QString("One")); - QCOMPARE(pm.headerData(1, Qt::Vertical).toString(), QString("Two")); + QCOMPARE(pm.headerData(0, Qt::Horizontal).toString(), QStringLiteral("H1")); + QCOMPARE(pm.headerData(1, Qt::Horizontal).toString(), QStringLiteral("H2")); + QCOMPARE(pm.headerData(2, Qt::Horizontal).toString(), QStringLiteral("H3")); + QCOMPARE(pm.headerData(0, Qt::Vertical).toString(), QStringLiteral("One")); + QCOMPARE(pm.headerData(1, Qt::Vertical).toString(), QStringLiteral("Two")); QVERIFY(!pm.canFetchMore(QModelIndex())); } @@ -108,15 +108,15 @@ // Then the proxy should show 2 rows QCOMPARE(pm.rowCount(), 2); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); - QCOMPARE(extractRowTexts(&pm, 1), QString("DEF")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF")); // ... and correct headers - QCOMPARE(pm.headerData(0, Qt::Horizontal).toString(), QString("H1")); - QCOMPARE(pm.headerData(1, Qt::Horizontal).toString(), QString("H2")); - QCOMPARE(pm.headerData(2, Qt::Horizontal).toString(), QString("H3")); - QCOMPARE(pm.headerData(0, Qt::Vertical).toString(), QString("One")); - QCOMPARE(pm.headerData(1, Qt::Vertical).toString(), QString("Two")); + QCOMPARE(pm.headerData(0, Qt::Horizontal).toString(), QStringLiteral("H1")); + QCOMPARE(pm.headerData(1, Qt::Horizontal).toString(), QStringLiteral("H2")); + QCOMPARE(pm.headerData(2, Qt::Horizontal).toString(), QStringLiteral("H3")); + QCOMPARE(pm.headerData(0, Qt::Vertical).toString(), QStringLiteral("One")); + QCOMPARE(pm.headerData(1, Qt::Vertical).toString(), QStringLiteral("Two")); QVERIFY(!pm.canFetchMore(QModelIndex())); } @@ -134,15 +134,15 @@ // Then the change should be notified to the proxy QCOMPARE(dataChangedSpy.count(), 1); - QCOMPARE(dataChangedSpy.at(0).at(0).value<QModelIndex>(), pm.index(0, 0)); - QCOMPARE(extractRowTexts(&pm, 0), QString("aBC")); + QCOMPARE(dataChangedSpy.at(0).at(0).toModelIndex(), pm.index(0, 0)); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("aBC")); // Same test with the other model mod2.item(0, 2)->setData("f", Qt::EditRole); QCOMPARE(dataChangedSpy.count(), 2); - QCOMPARE(dataChangedSpy.at(1).at(0).value<QModelIndex>(), pm.index(1, 2)); - QCOMPARE(extractRowTexts(&pm, 1), QString("DEf")); + QCOMPARE(dataChangedSpy.at(1).at(0).toModelIndex(), pm.index(1, 2)); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEf")); } void shouldHandleSetData() @@ -158,15 +158,15 @@ // Then the change should be notified to the proxy QCOMPARE(dataChangedSpy.count(), 1); - QCOMPARE(dataChangedSpy.at(0).at(0).value<QModelIndex>(), pm.index(0, 0)); - QCOMPARE(extractRowTexts(&pm, 0), QString("aBC")); + QCOMPARE(dataChangedSpy.at(0).at(0).toModelIndex(), pm.index(0, 0)); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("aBC")); // Same test with the other model pm.setData(pm.index(1, 2), "f", Qt::EditRole); QCOMPARE(dataChangedSpy.count(), 2); - QCOMPARE(dataChangedSpy.at(1).at(0).value<QModelIndex>(), pm.index(1, 2)); - QCOMPARE(extractRowTexts(&pm, 1), QString("DEf")); + QCOMPARE(dataChangedSpy.at(1).at(0).toModelIndex(), pm.index(1, 2)); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEf")); } void shouldHandleRowInsertionAndRemoval() @@ -186,12 +186,12 @@ mod2.insertRow(0, row); // Then the proxy should notify its users and show changes - QCOMPARE(rowSpyToText(rowATBISpy), QString("1,1")); - QCOMPARE(rowSpyToText(rowInsertedSpy), QString("1,1")); + QCOMPARE(rowSpyToText(rowATBISpy), QStringLiteral("1,1")); + QCOMPARE(rowSpyToText(rowInsertedSpy), QStringLiteral("1,1")); QCOMPARE(pm.rowCount(), 3); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); - QCOMPARE(extractRowTexts(&pm, 1), QString("123")); - QCOMPARE(extractRowTexts(&pm, 2), QString("DEF")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("123")); + QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("DEF")); // When removing that row QSignalSpy rowATBRSpy(&pm, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int))); @@ -206,8 +206,8 @@ QCOMPARE(rowRemovedSpy.at(0).at(1).toInt(), 1); QCOMPARE(rowRemovedSpy.at(0).at(2).toInt(), 1); QCOMPARE(pm.rowCount(), 2); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); - QCOMPARE(extractRowTexts(&pm, 1), QString("DEF")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF")); // When removing the last row from mod2 rowATBRSpy.clear(); @@ -222,7 +222,7 @@ QCOMPARE(rowRemovedSpy.at(0).at(1).toInt(), 1); QCOMPARE(rowRemovedSpy.at(0).at(2).toInt(), 1); QCOMPARE(pm.rowCount(), 1); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); } void shouldAggregateAnotherModelThenRemoveModels() @@ -243,13 +243,13 @@ pm.addSourceModel(&mod3); // Then the proxy should notify its users about the two rows inserted - QCOMPARE(rowSpyToText(rowATBISpy), QString("2,3")); - QCOMPARE(rowSpyToText(rowInsertedSpy), QString("2,3")); + QCOMPARE(rowSpyToText(rowATBISpy), QStringLiteral("2,3")); + QCOMPARE(rowSpyToText(rowInsertedSpy), QStringLiteral("2,3")); QCOMPARE(pm.rowCount(), 4); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); - QCOMPARE(extractRowTexts(&pm, 1), QString("DEF")); - QCOMPARE(extractRowTexts(&pm, 2), QString("123")); - QCOMPARE(extractRowTexts(&pm, 3), QString("456")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF")); + QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("123")); + QCOMPARE(extractRowTexts(&pm, 3), QStringLiteral("456")); // When removing that source model again QSignalSpy rowATBRSpy(&pm, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int))); @@ -264,8 +264,8 @@ QCOMPARE(rowRemovedSpy.at(0).at(1).toInt(), 2); QCOMPARE(rowRemovedSpy.at(0).at(2).toInt(), 3); QCOMPARE(pm.rowCount(), 2); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); - QCOMPARE(extractRowTexts(&pm, 1), QString("DEF")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF")); // When removing model 2 rowATBRSpy.clear(); @@ -278,7 +278,7 @@ QCOMPARE(rowRemovedSpy.at(0).at(1).toInt(), 1); QCOMPARE(rowRemovedSpy.at(0).at(2).toInt(), 1); QCOMPARE(pm.rowCount(), 1); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); // When removing model 1 rowATBRSpy.clear(); @@ -307,12 +307,12 @@ mod.setColumnCount(4); // Then the proxy should notify its users and show changes - QCOMPARE(rowSpyToText(colATBISpy), QString("3,3")); - QCOMPARE(rowSpyToText(colInsertedSpy), QString("3,3")); + QCOMPARE(rowSpyToText(colATBISpy), QStringLiteral("3,3")); + QCOMPARE(rowSpyToText(colInsertedSpy), QStringLiteral("3,3")); QCOMPARE(pm.rowCount(), 2); QCOMPARE(pm.columnCount(), 4); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC ")); - QCOMPARE(extractRowTexts(&pm, 1), QString("DEF ")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC ")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF ")); } void shouldPropagateLayoutChanged() @@ -337,9 +337,9 @@ qsfpm.setSourceModel(&mod3); pm.addSourceModel(&qsfpm); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); - QCOMPARE(extractRowTexts(&pm, 1), QString("123")); - QCOMPARE(extractRowTexts(&pm, 2), QString("456")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("123")); + QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("456")); // And a selection (row 1) QItemSelectionModel selection(&pm); @@ -358,9 +358,9 @@ qsfpm.sort(0, Qt::DescendingOrder); // Then the proxy should emit the layoutChanged signals, and show re-sorted data - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); - QCOMPARE(extractRowTexts(&pm, 1), QString("456")); - QCOMPARE(extractRowTexts(&pm, 2), QString("123")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("456")); + QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("123")); QCOMPARE(layoutATBCSpy.count(), 1); QCOMPARE(layoutChangedSpy.count(), 1); @@ -395,9 +395,9 @@ qsfpm.setSourceModel(&mod3); pm.addSourceModel(&qsfpm); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); - QCOMPARE(extractRowTexts(&pm, 1), QString("123")); - QCOMPARE(extractRowTexts(&pm, 2), QString("456")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("123")); + QCOMPARE(extractRowTexts(&pm, 2), QStringLiteral("456")); QSignalSpy rowATBRSpy(&pm, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int))); QSignalSpy rowRemovedSpy(&pm, SIGNAL(rowsRemoved(QModelIndex,int,int))); QSignalSpy rowATBISpy(&pm, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int))); @@ -407,12 +407,12 @@ qsfpm.setSourceModel(&mod2); // Then the proxy should emit the row removed/inserted signals, and show the new data - QCOMPARE(extractRowTexts(&pm, 0), QString("ABC")); - QCOMPARE(extractRowTexts(&pm, 1), QString("DEF")); - QCOMPARE(rowSpyToText(rowATBRSpy), QString("1,2")); - QCOMPARE(rowSpyToText(rowRemovedSpy), QString("1,2")); - QCOMPARE(rowSpyToText(rowATBISpy), QString("1,1")); - QCOMPARE(rowSpyToText(rowInsertedSpy), QString("1,1")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABC")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("DEF")); + QCOMPARE(rowSpyToText(rowATBRSpy), QStringLiteral("1,2")); + QCOMPARE(rowSpyToText(rowRemovedSpy), QStringLiteral("1,2")); + QCOMPARE(rowSpyToText(rowATBISpy), QStringLiteral("1,1")); + QCOMPARE(rowSpyToText(rowInsertedSpy), QStringLiteral("1,1")); } private: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/autotests/kextracolumnsproxymodeltest.cpp new/kitemmodels-5.19.0/autotests/kextracolumnsproxymodeltest.cpp --- old/kitemmodels-5.18.0/autotests/kextracolumnsproxymodeltest.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/autotests/kextracolumnsproxymodeltest.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -103,12 +103,12 @@ mod.item(1, 0)->appendRow(makeStandardItems(QStringList() << QStringLiteral("x") << QStringLiteral("y") << QStringLiteral("z") << QStringLiteral("."))); mod.setHorizontalHeaderLabels(QStringList() << QStringLiteral("H1") << QStringLiteral("H2") << QStringLiteral("H3") << QStringLiteral("H4")); - QCOMPARE(extractRowTexts(&mod, 0), QString("ABCD")); - QCOMPARE(extractRowTexts(&mod, 0, mod.index(0, 0)), QString("mnop")); - QCOMPARE(extractRowTexts(&mod, 1, mod.index(0, 0)), QString("qrst")); - QCOMPARE(extractRowTexts(&mod, 1), QString("EFGH")); - QCOMPARE(extractRowTexts(&mod, 0, mod.index(1, 0)), QString("xyz.")); - QCOMPARE(extractHorizontalHeaderTexts(&mod), QString("H1H2H3H4")); + QCOMPARE(extractRowTexts(&mod, 0), QStringLiteral("ABCD")); + QCOMPARE(extractRowTexts(&mod, 0, mod.index(0, 0)), QStringLiteral("mnop")); + QCOMPARE(extractRowTexts(&mod, 1, mod.index(0, 0)), QStringLiteral("qrst")); + QCOMPARE(extractRowTexts(&mod, 1), QStringLiteral("EFGH")); + QCOMPARE(extractRowTexts(&mod, 0, mod.index(1, 0)), QStringLiteral("xyz.")); + QCOMPARE(extractHorizontalHeaderTexts(&mod), QStringLiteral("H1H2H3H4")); // test code to see the model // showModel(&mod); @@ -136,12 +136,12 @@ } } - QCOMPARE(extractRowTexts(&pm, 0), QString("ABCD")); - QCOMPARE(extractRowTexts(&pm, 0, pm.index(0, 0)), QString("mnop")); - QCOMPARE(extractRowTexts(&pm, 1, pm.index(0, 0)), QString("qrst")); - QCOMPARE(extractRowTexts(&pm, 1), QString("EFGH")); - QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QString("xyz.")); - QCOMPARE(extractHorizontalHeaderTexts(&pm), QString("H1H2H3H4")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABCD")); + QCOMPARE(extractRowTexts(&pm, 0, pm.index(0, 0)), QStringLiteral("mnop")); + QCOMPARE(extractRowTexts(&pm, 1, pm.index(0, 0)), QStringLiteral("qrst")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("EFGH")); + QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QStringLiteral("xyz.")); + QCOMPARE(extractHorizontalHeaderTexts(&pm), QStringLiteral("H1H2H3H4")); } void shouldShowExtraColumns() @@ -153,21 +153,21 @@ pm.setSourceModel(&mod); // Then the proxy should show the extra column - QCOMPARE(extractRowTexts(&pm, 0), QString("ABCDZ0")); - QCOMPARE(extractRowTexts(&pm, 0, pm.index(0, 0)), QString("mnopZ0")); - QCOMPARE(extractRowTexts(&pm, 1, pm.index(0, 0)), QString("qrstZ1")); - QCOMPARE(extractRowTexts(&pm, 1), QString("EFGHZ1")); - QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QString("xyz.Z0")); - QCOMPARE(extractHorizontalHeaderTexts(&pm), QString("H1H2H3H4H5H6")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABCDZ0")); + QCOMPARE(extractRowTexts(&pm, 0, pm.index(0, 0)), QStringLiteral("mnopZ0")); + QCOMPARE(extractRowTexts(&pm, 1, pm.index(0, 0)), QStringLiteral("qrstZ1")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("EFGHZ1")); + QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QStringLiteral("xyz.Z0")); + QCOMPARE(extractHorizontalHeaderTexts(&pm), QStringLiteral("H1H2H3H4H5H6")); // Verify tree structure of proxy const QModelIndex secondParent = pm.index(1, 0); QVERIFY(!secondParent.parent().isValid()); QCOMPARE(indexToText(pm.index(0, 0, secondParent).parent()), indexToText(secondParent)); QCOMPARE(indexToText(pm.index(0, 3, secondParent).parent()), indexToText(secondParent)); - QVERIFY(indexToText(pm.index(0, 4)).startsWith("0,4,")); + QVERIFY(indexToText(pm.index(0, 4)).startsWith(QStringLiteral("0,4,"))); QCOMPARE(indexToText(pm.index(0, 4, secondParent).parent()), indexToText(secondParent)); - QVERIFY(indexToText(pm.index(0, 5)).startsWith("0,5,")); + QVERIFY(indexToText(pm.index(0, 5)).startsWith(QStringLiteral("0,5,"))); QCOMPARE(indexToText(pm.index(0, 5, secondParent).parent()), indexToText(secondParent)); QCOMPARE(pm.index(0, 0).sibling(0, 4).column(), 4); @@ -188,8 +188,8 @@ // Then the change should be notified to the proxy QCOMPARE(dataChangedSpy.count(), 1); - QCOMPARE(dataChangedSpy.at(0).at(0).value<QModelIndex>(), pm.index(0, 2)); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABcDZ0")); + QCOMPARE(dataChangedSpy.at(0).at(0).toModelIndex(), pm.index(0, 2)); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABcDZ0")); } void shouldHandleDataChangedInExtraColumn() @@ -203,9 +203,9 @@ pm.changeExtraColumnData(); // Then the change should be available and notified - QCOMPARE(extractRowTexts(&pm, 0), QString("ABCD<0")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABCD<0")); QCOMPARE(dataChangedSpy.count(), 1); - QCOMPARE(dataChangedSpy.at(0).at(0).value<QModelIndex>(), pm.index(0, 4)); + QCOMPARE(dataChangedSpy.at(0).at(0).toModelIndex(), pm.index(0, 4)); } void shouldHandleSetDataInNormalColumn() @@ -219,9 +219,9 @@ QVERIFY(pm.setData(pm.index(0, 2), "c", Qt::EditRole)); // Then the change should be available and notified - QCOMPARE(extractRowTexts(&pm, 0), QString("ABcDZ0")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABcDZ0")); QCOMPARE(dataChangedSpy.count(), 1); - QCOMPARE(dataChangedSpy.at(0).at(0).value<QModelIndex>(), pm.index(0, 2)); + QCOMPARE(dataChangedSpy.at(0).at(0).toModelIndex(), pm.index(0, 2)); } void shouldHandleSetDataInExtraColumn() @@ -235,9 +235,9 @@ QVERIFY(pm.setData(pm.index(0, 4), "-", Qt::EditRole)); // Then the change should be available and notified - QCOMPARE(extractRowTexts(&pm, 0), QString("ABCD-0")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABCD-0")); QCOMPARE(dataChangedSpy.count(), 1); - QCOMPARE(dataChangedSpy.at(0).at(0).value<QModelIndex>(), pm.index(0, 4)); + QCOMPARE(dataChangedSpy.at(0).at(0).toModelIndex(), pm.index(0, 4)); } void shouldHandleRowInsertion() @@ -253,16 +253,16 @@ mod.item(1, 0)->appendRow(makeStandardItems(QStringList() << QStringLiteral("1") << QStringLiteral("2") << QStringLiteral("3") << QStringLiteral("4"))); // Then the proxy should notify its users and show changes - QCOMPARE(rowSpyToText(rowATBISpy), QString("1,1")); - QCOMPARE(rowSpyToText(rowInsertedSpy), QString("1,1")); + QCOMPARE(rowSpyToText(rowATBISpy), QStringLiteral("1,1")); + QCOMPARE(rowSpyToText(rowInsertedSpy), QStringLiteral("1,1")); QCOMPARE(pm.rowCount(), 2); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABCDZ0")); - QCOMPARE(extractRowTexts(&pm, 0, pm.index(0, 0)), QString("mnopZ0")); - QCOMPARE(extractRowTexts(&pm, 1, pm.index(0, 0)), QString("qrstZ1")); - QCOMPARE(extractRowTexts(&pm, 1), QString("EFGHZ1")); - QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QString("xyz.Z0")); - QCOMPARE(extractRowTexts(&pm, 1, pm.index(1, 0)), QString("1234Z1")); - QCOMPARE(extractHorizontalHeaderTexts(&pm), QString("H1H2H3H4H5H6")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABCDZ0")); + QCOMPARE(extractRowTexts(&pm, 0, pm.index(0, 0)), QStringLiteral("mnopZ0")); + QCOMPARE(extractRowTexts(&pm, 1, pm.index(0, 0)), QStringLiteral("qrstZ1")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("EFGHZ1")); + QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QStringLiteral("xyz.Z0")); + QCOMPARE(extractRowTexts(&pm, 1, pm.index(1, 0)), QStringLiteral("1234Z1")); + QCOMPARE(extractHorizontalHeaderTexts(&pm), QStringLiteral("H1H2H3H4H5H6")); } void shouldHandleColumnInsertion() @@ -286,15 +286,15 @@ } // Then the proxy should notify its users and show changes - QCOMPARE(rowSpyToText(colATBISpy), QString("4,4;4,4;4,4")); // QStandardItemModel emits it for each parent - QCOMPARE(rowSpyToText(colInsertedSpy), QString("4,4;4,4;4,4")); + QCOMPARE(rowSpyToText(colATBISpy), QStringLiteral("4,4;4,4;4,4")); // QStandardItemModel emits it for each parent + QCOMPARE(rowSpyToText(colInsertedSpy), QStringLiteral("4,4;4,4;4,4")); QCOMPARE(pm.columnCount(), 7); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABCD Z0")); - QCOMPARE(extractRowTexts(&pm, 0, pm.index(0, 0)), QString("mnop Z0")); - QCOMPARE(extractRowTexts(&pm, 1, pm.index(0, 0)), QString("qrst Z1")); - QCOMPARE(extractRowTexts(&pm, 1), QString("EFGH Z1")); - QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QString("xyz. Z0")); - QCOMPARE(extractHorizontalHeaderTexts(&pm), QString("H1H2H3H45H5H6")); // '5' was inserted in there + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABCD Z0")); + QCOMPARE(extractRowTexts(&pm, 0, pm.index(0, 0)), QStringLiteral("mnop Z0")); + QCOMPARE(extractRowTexts(&pm, 1, pm.index(0, 0)), QStringLiteral("qrst Z1")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("EFGH Z1")); + QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QStringLiteral("xyz. Z0")); + QCOMPARE(extractHorizontalHeaderTexts(&pm), QStringLiteral("H1H2H3H45H5H6")); // '5' was inserted in there } // row removal, layoutChanged, modelReset -> same thing, works via QIdentityProxyModel @@ -310,7 +310,7 @@ QCOMPARE(proxy.columnCount(), 4); pm.setSourceModel(&proxy); QCOMPARE(pm.columnCount(), 6); - QCOMPARE(extractRowTexts(&pm, 0), QString("ABCDZ0")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("ABCDZ0")); // And a selection QItemSelectionModel selection(&pm); selection.select(pm.index(0, 0), QItemSelectionModel::Select | QItemSelectionModel::Rows); @@ -325,8 +325,8 @@ pm.sort(0, Qt::DescendingOrder); // Then the proxy should be sorted - QCOMPARE(extractRowTexts(&pm, 0), QString("EFGHZ0")); - QCOMPARE(extractRowTexts(&pm, 1), QString("ABCDZ1")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("EFGHZ0")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("ABCDZ1")); // And the selection should be updated accordingly const QModelIndexList lstAfter = selection.selectedIndexes(); QCOMPARE(lstAfter.count(), 6); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/autotests/krearrangecolumnsproxymodeltest.cpp new/kitemmodels-5.19.0/autotests/krearrangecolumnsproxymodeltest.cpp --- old/kitemmodels-5.18.0/autotests/krearrangecolumnsproxymodeltest.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/autotests/krearrangecolumnsproxymodeltest.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -54,12 +54,12 @@ mod.item(1, 0)->appendRow(makeStandardItems(QStringList() << QStringLiteral("x") << QStringLiteral("y") << QStringLiteral("z") << QStringLiteral(".") << QStringLiteral("-"))); mod.setHorizontalHeaderLabels(QStringList() << QStringLiteral("H1") << QStringLiteral("H2") << QStringLiteral("H3") << QStringLiteral("H4") << QStringLiteral("H5")); - QCOMPARE(extractRowTexts(&mod, 0), QString("ABCDE")); - QCOMPARE(extractRowTexts(&mod, 0, mod.index(0, 0)), QString("mnop-")); - QCOMPARE(extractRowTexts(&mod, 1, mod.index(0, 0)), QString("qrst-")); - QCOMPARE(extractRowTexts(&mod, 1), QString("EFGHI")); - QCOMPARE(extractRowTexts(&mod, 0, mod.index(1, 0)), QString("xyz.-")); - QCOMPARE(extractHorizontalHeaderTexts(&mod), QString("H1H2H3H4H5")); + QCOMPARE(extractRowTexts(&mod, 0), QStringLiteral("ABCDE")); + QCOMPARE(extractRowTexts(&mod, 0, mod.index(0, 0)), QStringLiteral("mnop-")); + QCOMPARE(extractRowTexts(&mod, 1, mod.index(0, 0)), QStringLiteral("qrst-")); + QCOMPARE(extractRowTexts(&mod, 1), QStringLiteral("EFGHI")); + QCOMPARE(extractRowTexts(&mod, 0, mod.index(1, 0)), QStringLiteral("xyz.-")); + QCOMPARE(extractHorizontalHeaderTexts(&mod), QStringLiteral("H1H2H3H4H5")); // test code to see the model // showModel(&mod); @@ -96,7 +96,7 @@ QCOMPARE(pm.mapFromSource(pm.mapToSource(pm.index(row, col))), pm.index(row, col)); } } - QCOMPARE(indexRowCol(pm.index(0, 0)), QString("0,0")); + QCOMPARE(indexRowCol(pm.index(0, 0)), QStringLiteral("0,0")); QCOMPARE(pm.rowCount(pm.index(0, 0)), 2); QCOMPARE(pm.index(0, 0).parent(), QModelIndex()); @@ -104,12 +104,12 @@ QCOMPARE(pm.mapToSource(pm.index(0, 0)).column(), 2); // column 0 points to C QCOMPARE(pm.mapToSource(pm.index(0, 1)).column(), 3); // column 1 points to D - QCOMPARE(extractRowTexts(&pm, 0), QString("CDBA")); - QCOMPARE(extractRowTexts(&pm, 0, pm.index(0, 0)), QString("opnm")); - QCOMPARE(extractRowTexts(&pm, 1, pm.index(0, 0)), QString("strq")); - QCOMPARE(extractRowTexts(&pm, 1), QString("GHFE")); - QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QString("z.yx")); - QCOMPARE(extractHorizontalHeaderTexts(&pm), QString("H3H4H2H1")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("CDBA")); + QCOMPARE(extractRowTexts(&pm, 0, pm.index(0, 0)), QStringLiteral("opnm")); + QCOMPARE(extractRowTexts(&pm, 1, pm.index(0, 0)), QStringLiteral("strq")); + QCOMPARE(extractRowTexts(&pm, 1), QStringLiteral("GHFE")); + QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QStringLiteral("z.yx")); + QCOMPARE(extractHorizontalHeaderTexts(&pm), QStringLiteral("H3H4H2H1")); // Verify tree structure of proxy const QModelIndex secondParent = pm.index(1, 0); @@ -134,9 +134,9 @@ // Then the change should be notified to the proxy QCOMPARE(dataChangedSpy.count(), 2); - QCOMPARE(indexToText(dataChangedSpy.at(0).at(0).value<QModelIndex>()), indexToText(pm.index(0, 0))); - QCOMPARE(indexToText(dataChangedSpy.at(1).at(0).value<QModelIndex>()), indexToText(pm.index(0, 1))); - QCOMPARE(extractRowTexts(&pm, 0), QString("cdBA")); + QCOMPARE(indexToText(dataChangedSpy.at(0).at(0).toModelIndex()), indexToText(pm.index(0, 0))); + QCOMPARE(indexToText(dataChangedSpy.at(1).at(0).toModelIndex()), indexToText(pm.index(0, 1))); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("cdBA")); } void shouldHandleDataChangedInChild() @@ -152,8 +152,8 @@ // Then the change should be notified to the proxy QCOMPARE(dataChangedSpy.count(), 1); - QCOMPARE(indexToText(dataChangedSpy.at(0).at(0).value<QModelIndex>()), indexToText(pm.index(1, 0).child(0, 1))); - QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QString("z,yx")); + QCOMPARE(indexToText(dataChangedSpy.at(0).at(0).toModelIndex()), indexToText(pm.index(1, 0).child(0, 1))); + QCOMPARE(extractRowTexts(&pm, 0, pm.index(1, 0)), QStringLiteral("z,yx")); } void shouldSupportSetData() @@ -166,11 +166,11 @@ // When changing data via the proxy const QModelIndex idx = pm.index(0, 2); - QCOMPARE(idx.data().toString(), QString("B")); + QCOMPARE(idx.data().toString(), QStringLiteral("B")); pm.setData(idx, QStringLiteral("Z")); - QCOMPARE(idx.data().toString(), QString("Z")); - QCOMPARE(extractRowTexts(&pm, 0), QString("CDZA")); - QCOMPARE(extractRowTexts(&mod, 0), QString("AZCDE")); + QCOMPARE(idx.data().toString(), QStringLiteral("Z")); + QCOMPARE(extractRowTexts(&pm, 0), QStringLiteral("CDZA")); + QCOMPARE(extractRowTexts(&mod, 0), QStringLiteral("AZCDE")); } private: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/autotests/krecursivefilterproxymodeltest.cpp new/kitemmodels-5.19.0/autotests/krecursivefilterproxymodeltest.cpp --- old/kitemmodels-5.18.0/autotests/krecursivefilterproxymodeltest.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/autotests/krecursivefilterproxymodeltest.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -219,12 +219,12 @@ // When changing the text on the item item_1_1_1->setText(QStringLiteral("ME")); - QCOMPARE(treeAsString(proxy), QString("[1[1.1[ME*]]]")); + QCOMPARE(treeAsString(proxy), QStringLiteral("[1[1.1[ME*]]]")); QCOMPARE(spy.mSignals, QStringList() - << QLatin1String("dataChanged(ME)") - << QLatin1String("dataChanged(1.1)") // ### yep, unneeded, but the proxy has no way to know that... - << QLatin1String("dataChanged(1)") // ### unneeded too + << QStringLiteral("dataChanged(ME)") + << QStringLiteral("dataChanged(1.1)") // ### yep, unneeded, but the proxy has no way to know that... + << QStringLiteral("dataChanged(1)") // ### unneeded too ); } @@ -411,10 +411,10 @@ QStandardItem *item_1_1_1_1 = new QStandardItem(QStringLiteral("1.1.1.1")); item_1_1_1_1->setData(true); item_1_1_1->appendRow(item_1_1_1_1); - QCOMPARE(treeAsString(proxy), QString("[1[1.1[1.1.1[1.1.1.1*]]]]")); + QCOMPARE(treeAsString(proxy), QStringLiteral("[1[1.1[1.1.1[1.1.1.1*]]]]")); - QCOMPARE(spy.mSignals, QStringList() << QLatin1String("rowsAboutToBeInserted(1)") - << QLatin1String("rowsInserted(1)")); + QCOMPARE(spy.mSignals, QStringList() << QStringLiteral("rowsAboutToBeInserted(1)") + << QStringLiteral("rowsInserted(1)")); } // Start from [1[1.1[1.1.1 1.1.2[1.1.2.1*]]]] @@ -429,7 +429,7 @@ QCOMPARE(treeAsString(model), sourceStr); TestModel proxy(&model); - QCOMPARE(treeAsString(proxy), QString("[1[1.1[1.1.2[1.1.2.1*]]]]")); + QCOMPARE(treeAsString(proxy), QStringLiteral("[1[1.1[1.1.2[1.1.2.1*]]]]")); ModelSignalSpy spy(proxy); { @@ -439,10 +439,10 @@ item_1_1_1->appendRow(item_1_1_1_1); } - QCOMPARE(treeAsString(proxy), QString("[1[1.1[1.1.1[1.1.1.1*] 1.1.2[1.1.2.1*]]]]")); + QCOMPARE(treeAsString(proxy), QStringLiteral("[1[1.1[1.1.1[1.1.1.1*] 1.1.2[1.1.2.1*]]]]")); QCOMPARE(spy.mSignals, QStringList() - << QLatin1String("rowsAboutToBeInserted(1.1.1)") - << QLatin1String("rowsInserted(1.1.1)")); + << QStringLiteral("rowsAboutToBeInserted(1.1.1)") + << QStringLiteral("rowsInserted(1.1.1)")); } void testInsertWithChildren() @@ -466,10 +466,10 @@ item_1_1->appendRow(item_1_1_1); } - QCOMPARE(treeAsString(proxy), QString("[1[1.1[1.1.1[1.1.1.1*]]]]")); + QCOMPARE(treeAsString(proxy), QStringLiteral("[1[1.1[1.1.1[1.1.1.1*]]]]")); QCOMPARE(spy.mSignals, QStringList() - << QLatin1String("rowsAboutToBeInserted(1)") - << QLatin1String("rowsInserted(1)")); + << QStringLiteral("rowsAboutToBeInserted(1)") + << QStringLiteral("rowsInserted(1)")); } void testInsertIntoVisibleWithChildren() @@ -493,10 +493,10 @@ item_1_1->appendRow(item_1_1_2); } - QCOMPARE(treeAsString(proxy), QString("[1[1.1[1.1.1* 1.1.2[1.1.2.1*]]]]")); + QCOMPARE(treeAsString(proxy), QStringLiteral("[1[1.1[1.1.1* 1.1.2[1.1.2.1*]]]]")); QCOMPARE(spy.mSignals, QStringList() - << QLatin1String("rowsAboutToBeInserted(1.1.2)") - << QLatin1String("rowsInserted(1.1.2)")); + << QStringLiteral("rowsAboutToBeInserted(1.1.2)") + << QStringLiteral("rowsInserted(1.1.2)")); } void testInsertHidden() // inserting filtered-out rows shouldn't emit anything diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/autotests/kselectionproxymodeltest.cpp new/kitemmodels-5.19.0/autotests/kselectionproxymodeltest.cpp --- old/kitemmodels-5.18.0/autotests/kselectionproxymodeltest.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/autotests/kselectionproxymodeltest.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -76,8 +76,8 @@ selectionModel.select(QItemSelection(strings.index(1, 0), strings.index(1, 0)), QItemSelectionModel::Select); QCOMPARE(proxy.rowCount(), 1); QCOMPARE(proxy.columnCount(), 1); - QCOMPARE(rowSpyToText(rowATBISpy), QString("0,0")); - QCOMPARE(rowSpyToText(rowInsertedSpy), QString("0,0")); + QCOMPARE(rowSpyToText(rowATBISpy), QStringLiteral("0,0")); + QCOMPARE(rowSpyToText(rowInsertedSpy), QStringLiteral("0,0")); } void KSelectionProxyModelTest::selectOnSourceReset() @@ -126,7 +126,7 @@ selectionModel.select(strings.index(0, 0), QItemSelectionModel::Select); QCOMPARE(proxy.rowCount(), 1); - QCOMPARE(proxy.index(0, 0).data().toString(), QString::fromLatin1("Monday")); + QCOMPARE(proxy.index(0, 0).data().toString(), QStringLiteral("Monday")); QStringListModel strings2({ @@ -139,7 +139,7 @@ selectionModel.select(strings2.index(0, 0), QItemSelectionModel::Select); QCOMPARE(proxy.rowCount(), 1); - QCOMPARE(proxy.index(0, 0).data().toString(), QString::fromLatin1("Today")); + QCOMPARE(proxy.index(0, 0).data().toString(), QStringLiteral("Today")); QSignalSpy spy(&proxy, SIGNAL(modelReset())); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp new/kitemmodels-5.19.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp --- old/kitemmodels-5.18.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -187,7 +187,7 @@ { Q_UNUSED(action); Q_UNUSED(_column); - QByteArray encoded = data->data(mimeTypes().first()); + QByteArray encoded = data->data(mimeTypes().at(0)); QHash<QModelIndex, QList<int> > movedItems; bool ok; @@ -334,7 +334,7 @@ itemData.append('\0'); } } - data->setData(mimeTypes().first(), itemData); + data->setData(mimeTypes().at(0), itemData); return data; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/autotests/proxymodeltestsuite/dynamictreewidget.cpp new/kitemmodels-5.19.0/autotests/proxymodeltestsuite/dynamictreewidget.cpp --- old/kitemmodels-5.18.0/autotests/proxymodeltestsuite/dynamictreewidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/autotests/proxymodeltestsuite/dynamictreewidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -245,7 +245,7 @@ connect(tabWidget, SIGNAL(currentChanged(int)), SLOT(currentChanged(int))); stringToModel( - QString(" - 1" + QLatin1String(" - 1" " - 2" " - - 3" " - - 4" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/autotests/proxymodeltestsuite/modelcommander.cpp new/kitemmodels-5.19.0/autotests/proxymodeltestsuite/modelcommander.cpp --- old/kitemmodels-5.18.0/autotests/proxymodeltestsuite/modelcommander.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/autotests/proxymodeltestsuite/modelcommander.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -47,7 +47,7 @@ } else if (dataTag == testData.at(2)) { // Insert 5 items, some of which are parents ins->interpret( - QString(" - 1" + QLatin1String(" - 1" " - - 2" " - 3" " - 4" @@ -138,7 +138,7 @@ ModelInsertCommand *ins = new ModelInsertCommand(m_model, this); ins->setStartRow(0); ins->interpret( - QString(" - 1" + QLatin1String(" - 1" " - 2" " - - 3" " - - 4" @@ -458,7 +458,7 @@ ins->setAncestorRowNumbers(rowAncestors); ins->setStartRow(0); ins->interpret( - QString(" - 1" + QLatin1String(" - 1" " - - 2" " - - - 3" " - - - - 4" @@ -469,7 +469,7 @@ ins->setAncestorRowNumbers(rowAncestors); ins->setStartRow(m_model->rowCount()); ins->interpret( - QString(" - 1" + QLatin1String(" - 1" " - - 2" " - - - 3" " - - - - 4" @@ -480,7 +480,7 @@ ins->setAncestorRowNumbers(rowAncestors); ins->setStartRow(4); ins->interpret( - QString(" - 1" + QLatin1String(" - 1" " - - 2" " - - - 3" " - - - - 4" @@ -491,7 +491,7 @@ ins->setAncestorRowNumbers(rowAncestors); ins->setStartRow(0); ins->interpret( - QString(" - 1" + QLatin1String(" - 1" " - - 2" " - 3" " - 4" @@ -507,7 +507,7 @@ ins->setAncestorRowNumbers(rowAncestors); ins->setStartRow(m_model->rowCount()); ins->interpret( - QString(" - 1" + QLatin1String(" - 1" " - - 2" " - 3" " - 4" @@ -523,7 +523,7 @@ ins->setAncestorRowNumbers(rowAncestors); ins->setStartRow(4); ins->interpret( - QString(" - 1" + QLatin1String(" - 1" " - - 2" " - 3" " - 4" @@ -549,7 +549,7 @@ ins->setAncestorRowNumbers(rowAncestors << 0); ins->setStartRow(0); ins->interpret( - QString(" - 1" + QLatin1String(" - 1" " - - 2" " - 3" " - 4" @@ -575,7 +575,7 @@ ins->setAncestorRowNumbers(rowAncestors << 9); ins->setStartRow(0); ins->interpret( - QString(" - 1" + QLatin1String(" - 1" " - - 2" " - 3" " - 4" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/autotests/proxymodeltestsuite/modelspy.cpp new/kitemmodels-5.19.0/autotests/proxymodeltestsuite/modelspy.cpp --- old/kitemmodels-5.18.0/autotests/proxymodeltestsuite/modelspy.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/autotests/proxymodeltestsuite/modelspy.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -206,7 +206,7 @@ QList< QPersistentModelIndex > ModelSpy::toPersistent(QModelIndexList list) { QList<QPersistentModelIndex > persistentList; - Q_FOREACH (QModelIndex idx, list) { + Q_FOREACH (const QModelIndex &idx, list) { persistentList << QPersistentModelIndex(idx); } return persistentList; @@ -221,7 +221,7 @@ QModelIndex idx = m_model->index(row, column, parent); Q_ASSERT(idx.isValid()); bool found = false; - Q_FOREACH (QItemSelectionRange range, ignoredRanges) { + Q_FOREACH (const QItemSelectionRange &range, ignoredRanges) { if (range.topLeft().parent() == parent && range.topLeft().row() == idx.row()) { row = range.bottomRight().row() + 1; found = true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/autotests/proxymodeltestsuite/proxymodeltest.cpp new/kitemmodels-5.19.0/autotests/proxymodeltestsuite/proxymodeltest.cpp --- old/kitemmodels-5.18.0/autotests/proxymodeltestsuite/proxymodeltest.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/autotests/proxymodeltestsuite/proxymodeltest.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -303,7 +303,7 @@ ModelInsertCommand *ins = new ModelInsertCommand(m_rootModel, this); ins->setStartRow(0); ins->interpret( - QString("- 1" + QLatin1String("- 1" "- 2" "- - 3" "- - 4" @@ -334,7 +334,7 @@ ModelInsertCommand *ins = new ModelInsertCommand(rootModel, this); ins->setStartRow(0); ins->interpret( - QString(" - 1" + QLatin1String(" - 1" " - 1" " - - 1" " - 1" @@ -479,8 +479,8 @@ m_modelSpy->stopSpying(); QVERIFY(m_modelSpy->size() == 2); - QVERIFY(m_modelSpy->takeFirst().first() == ModelAboutToBeReset); - QVERIFY(m_modelSpy->takeFirst().first() == ModelReset); + QVERIFY(m_modelSpy->takeFirst().at(0) == ModelAboutToBeReset); + QVERIFY(m_modelSpy->takeFirst().at(0) == ModelReset); QVERIFY(m_modelSpy->isEmpty()); testMappings(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/src/kconcatenaterowsproxymodel.cpp new/kitemmodels-5.19.0/src/kconcatenaterowsproxymodel.cpp --- old/kitemmodels-5.18.0/src/kconcatenaterowsproxymodel.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/src/kconcatenaterowsproxymodel.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -306,7 +306,7 @@ const QModelIndexList persistentIndexList = q->persistentIndexList(); layoutChangePersistentIndexes.reserve(persistentIndexList.size()); - foreach (QPersistentModelIndex proxyPersistentIndex, persistentIndexList) { + foreach (const QPersistentModelIndex &proxyPersistentIndex, persistentIndexList) { proxyIndexes << proxyPersistentIndex; Q_ASSERT(proxyPersistentIndex.isValid()); const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/src/krecursivefilterproxymodel.cpp new/kitemmodels-5.19.0/src/krecursivefilterproxymodel.cpp --- old/kitemmodels-5.18.0/src/krecursivefilterproxymodel.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/src/krecursivefilterproxymodel.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -318,6 +318,9 @@ } QModelIndexList list; + if (!sourceModel()) + return list; + QModelIndex proxyIndex; Q_FOREACH (const QModelIndex &idx, sourceModel()->match(mapToSource(start), role, value, hits, flags)) { proxyIndex = mapFromSource(idx); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/src/kselectionproxymodel.cpp new/kitemmodels-5.19.0/src/kselectionproxymodel.cpp --- old/kitemmodels-5.18.0/src/kselectionproxymodel.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/src/kselectionproxymodel.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -1726,7 +1726,7 @@ q->rootSelectionAboutToBeRemoved(selection); - Q_FOREACH (const QItemSelectionRange range, selection) { + Q_FOREACH (const QItemSelectionRange &range, selection) { removeRangeFromProxy(range); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/breadcrumbdirectionwidget.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/breadcrumbdirectionwidget.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/breadcrumbdirectionwidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/breadcrumbdirectionwidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -37,7 +37,7 @@ ModelInsertCommand ins(rootModel); ins.setStartRow(0); ins.interpret( - QString("- 1" + QLatin1String("- 1" "- 2" "- - 3" "- - 3" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/breadcrumbnavigationwidget.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/breadcrumbnavigationwidget.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/breadcrumbnavigationwidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/breadcrumbnavigationwidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -32,7 +32,7 @@ #include "kselectionproxymodel.h" #include "kbreadcrumbselectionmodel.h" -#define SON(object) object->setObjectName(#object) +#define SON(object) object->setObjectName(QStringLiteral(#object)) CurrentItemLabel::CurrentItemLabel(QAbstractItemModel *model, QWidget *parent, Qt::WindowFlags f) : QLabel(parent, f), m_model(model) @@ -209,7 +209,7 @@ DynamicTreeWidget *dynamicTree = new DynamicTreeWidget(rootModel, splitter); dynamicTree->treeView()->setSelectionMode(QAbstractItemView::SingleSelection); dynamicTree->setInitialTree( - QString("- 1" + QLatin1String("- 1" "- - 2" "- - 2" "- - - 3" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/breadcrumbswidget.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/breadcrumbswidget.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/breadcrumbswidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/breadcrumbswidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -65,7 +65,7 @@ DynamicTreeWidget *dynamicTree = new DynamicTreeWidget(rootModel, splitter); dynamicTree->treeView()->setSelectionMode(QAbstractItemView::SingleSelection); dynamicTree->setInitialTree( - QString("- 1" + QLatin1String("- 1" "- - 2" "- - 2" "- - - 3" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/checkablewidget.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/checkablewidget.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/checkablewidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/checkablewidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -41,7 +41,7 @@ ModelInsertCommand *insert = new ModelInsertCommand(rootModel, this); insert->setStartRow(0); insert->interpret( - QString("- 1" + QLatin1String("- 1" "- 1" "- 1" "- - 2" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/descendantpmwidget.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/descendantpmwidget.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/descendantpmwidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/descendantpmwidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -44,7 +44,7 @@ DynamicTreeWidget *dynTreeWidget = new DynamicTreeWidget(m_rootModel, vSplitter); dynTreeWidget->setInitialTree( - QString("- 1" + QLatin1String("- 1" "- 2" "- - 3" "- - 3" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/kidentityproxymodelwidget.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/kidentityproxymodelwidget.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/kidentityproxymodelwidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/kidentityproxymodelwidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -44,7 +44,7 @@ DynamicTreeWidget *treeWidget = new DynamicTreeWidget(rootModel, splitter); treeWidget->setInitialTree( - QString(" - 1" + QLatin1String(" - 1" " - 2" " - - 3" " - - 4" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/kreparentingproxymodel.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/kreparentingproxymodel.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/kreparentingproxymodel.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/kreparentingproxymodel.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -539,7 +539,7 @@ if (d->m_pendingRemovalChildIndexes.contains(sourceParent)) { // qDebug() << "#############"; - Q_FOREACH (KReparentingProxyModelPrivate::PendingRemoval pendingRemoval, d->m_pendingRemovals) { + Q_FOREACH (const KReparentingProxyModelPrivate::PendingRemoval &pendingRemoval, d->m_pendingRemovals) { // qDebug() << "In" << pendingRemoval.index << pendingRemoval.sourceIndex << sourceParent; if (pendingRemoval.sourceIndex == sourceParent) { // qDebug() << "Out" << pendingRemoval.sourceIndex << sourceParent; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/lessthanwidget.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/lessthanwidget.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/lessthanwidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/lessthanwidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -91,7 +91,7 @@ : QWidget(parent, f) { QLabel *explanation = new QLabel(this); - explanation->setText(QString("The yellow items are 'less than' the selected item according to QModelIndex::operator<().\n" + explanation->setText(QLatin1String("The yellow items are 'less than' the selected item according to QModelIndex::operator<().\n" "The red items are greater than the selected item (i.e, not less than and not equal).")); m_coloredTreeModel = new ColoredTreeModel(this); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/proxyitemselectionwidget.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/proxyitemselectionwidget.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/proxyitemselectionwidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/proxyitemselectionwidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -30,7 +30,7 @@ #include "dynamictreewidget.h" #include "klinkitemselectionmodel.h" -#define SON(object) object->setObjectName(#object) +#define SON(object) object->setObjectName(QStringLiteral(#object)) ProxyItemSelectionWidget::ProxyItemSelectionWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f) @@ -44,7 +44,7 @@ DynamicTreeWidget *dynamicTreeWidget = new DynamicTreeWidget(rootModel, splitter); dynamicTreeWidget->setInitialTree( - QString("- 1" + QLatin1String("- 1" "- 2" "- - 3" "- - - 4" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/reparentingpmwidget.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/reparentingpmwidget.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/reparentingpmwidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/reparentingpmwidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -40,7 +40,7 @@ DynamicTreeWidget *dynamicTreeWidget = new DynamicTreeWidget(m_rootModel, vSplitter); dynamicTreeWidget->setInitialTree( - QString("- 1" + QLatin1String("- 1" "- 2" "- - 3" "- - - 4" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/selectioninqmlwidget.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/selectioninqmlwidget.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/selectioninqmlwidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/selectioninqmlwidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -54,5 +54,5 @@ quickView->engine()->rootContext()->setContextProperty(QStringLiteral("_model"), m_rootModel); quickView->engine()->rootContext()->setContextProperty(QStringLiteral("_selectionModel"), selectionTree->selectionModel()); - quickView->setSource(QUrl::fromLocalFile(SRC_DIR "/selection.qml")); + quickView->setSource(QUrl::fromLocalFile(QLatin1String(SRC_DIR "/selection.qml"))); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.18.0/tests/proxymodeltestapp/selectionpmwidget.cpp new/kitemmodels-5.19.0/tests/proxymodeltestapp/selectionpmwidget.cpp --- old/kitemmodels-5.18.0/tests/proxymodeltestapp/selectionpmwidget.cpp 2016-01-01 20:59:11.000000000 +0100 +++ new/kitemmodels-5.19.0/tests/proxymodeltestapp/selectionpmwidget.cpp 2016-02-06 10:38:41.000000000 +0100 @@ -41,7 +41,7 @@ DynamicTreeWidget *dynTreeWidget = new DynamicTreeWidget(m_rootModel, splitter); dynTreeWidget->setInitialTree( - QString("- 1" + QLatin1String("- 1" "- 2" "- - 3" "- - 3"
