┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-06-08 22:07:59 +0200
committerPeter Penz <[email protected]>2012-06-08 22:08:29 +0200
commitb2f5de974463f54023905e0979102d179eed0a00 (patch)
tree1e257594f43ea496aa3ac8c5f74a82d589844ac7 /src/tests
parent98a4aa10ef09087ce6498d09461036cb0ab9cb4d (diff)
Krazy fixes
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/kfileitemmodeltest.cpp10
-rw-r--r--src/tests/kitemlistcontrollertest.cpp6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp
index e6bcb906e..65c28ce75 100644
--- a/src/tests/kfileitemmodeltest.cpp
+++ b/src/tests/kfileitemmodeltest.cpp
@@ -419,7 +419,7 @@ void KFileItemModelTest::testExpandItems()
// Store the URLs of all folders in a set.
QSet<KUrl> allFolders;
- allFolders << KUrl(m_testDir->name() + "a") << KUrl(m_testDir->name() + "a/a") << KUrl(m_testDir->name() + "a/a-1");
+ allFolders << KUrl(m_testDir->name() + 'a') << KUrl(m_testDir->name() + "a/a") << KUrl(m_testDir->name() + "a/a-1");
m_model->loadDirectory(m_testDir->url());
QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout));
@@ -437,7 +437,7 @@ void KFileItemModelTest::testExpandItems()
QVERIFY(m_model->isExpanded(0));
QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout));
QCOMPARE(m_model->count(), 3); // 3 items: "a/", "a/a/", "a/a-1/"
- QCOMPARE(m_model->expandedDirectories(), QSet<KUrl>() << KUrl(m_testDir->name() + "a"));
+ QCOMPARE(m_model->expandedDirectories(), QSet<KUrl>() << KUrl(m_testDir->name() + 'a'));
QCOMPARE(spyInserted.count(), 1);
KItemRangeList itemRangeList = spyInserted.takeFirst().at(0).value<KItemRangeList>();
@@ -453,7 +453,7 @@ void KFileItemModelTest::testExpandItems()
QVERIFY(m_model->isExpanded(1));
QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout));
QCOMPARE(m_model->count(), 4); // 4 items: "a/", "a/a/", "a/a/1", "a/a-1/"
- QCOMPARE(m_model->expandedDirectories(), QSet<KUrl>() << KUrl(m_testDir->name() + "a") << KUrl(m_testDir->name() + "a/a"));
+ QCOMPARE(m_model->expandedDirectories(), QSet<KUrl>() << KUrl(m_testDir->name() + 'a') << KUrl(m_testDir->name() + "a/a"));
QCOMPARE(spyInserted.count(), 1);
itemRangeList = spyInserted.takeFirst().at(0).value<KItemRangeList>();
@@ -482,7 +482,7 @@ void KFileItemModelTest::testExpandItems()
m_model->setExpanded(0, false);
QVERIFY(!m_model->isExpanded(0));
QCOMPARE(m_model->count(), 1);
- QVERIFY(!m_model->expandedDirectories().contains(KUrl(m_testDir->name() + "a"))); // TODO: Make sure that child URLs are also removed
+ QVERIFY(!m_model->expandedDirectories().contains(KUrl(m_testDir->name() + 'a'))); // TODO: Make sure that child URLs are also removed
QCOMPARE(spyRemoved.count(), 1);
itemRangeList = spyRemoved.takeFirst().at(0).value<KItemRangeList>();
@@ -593,7 +593,7 @@ void KFileItemModelTest::testSorting()
m_model->loadDirectory(m_testDir->url());
QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout));
- int index = m_model->index(KUrl(m_testDir->url().url() + "c"));
+ int index = m_model->index(KUrl(m_testDir->url().url() + 'c'));
m_model->setExpanded(index, true);
QVERIFY(QTest::kWaitForSignal(m_model, SIGNAL(itemsInserted(KItemRangeList)), DefaultTimeout));
diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp
index 47b2b8b75..2085dead6 100644
--- a/src/tests/kitemlistcontrollertest.cpp
+++ b/src/tests/kitemlistcontrollertest.cpp
@@ -210,7 +210,7 @@ void KItemListControllerTest::testKeyboardNavigation_data()
groupingEnabledList.append(true);
groupingEnabledNames[true] = "grouping enabled";
- foreach (KFileItemListView::ItemLayout layout, layoutList) {
+ foreach (const KFileItemListView::ItemLayout& layout, layoutList) {
// The following settings depend on the layout.
// Note that 'columns' are actually 'rows' in
// Compact layout.
@@ -249,8 +249,8 @@ void KItemListControllerTest::testKeyboardNavigation_data()
}
foreach (int columnCount, columnCountList) {
- foreach (KItemListController::SelectionBehavior selectionBehavior, selectionBehaviorList) {
- foreach (bool groupingEnabled, groupingEnabledList) {
+ foreach (const KItemListController::SelectionBehavior& selectionBehavior, selectionBehaviorList) {
+ foreach (bool groupingEnabled, groupingEnabledList) { // krazy:exclude=foreach
QList<QPair<KeyPress, ViewState> > testList;
// First, key presses which should have the same effect