-/***************************************************************************
- * Copyright (C) 2011 by Peter Penz <peter.penz19@gmail.com> *
- * Copyright (C) 2013 by Frank Reininghaus <frank78ac@googlemail.com> *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
- ***************************************************************************/
+/*
+ * SPDX-FileCopyrightText: 2011 Peter Penz <peter.penz19@gmail.com>
+ * SPDX-FileCopyrightText: 2013 Frank Reininghaus <frank78ac@googlemail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
#include <QTest>
#include <QSignalSpy>
-#include <algorithm>
#include <random>
#include "kitemviews/kfileitemmodel.h"
#include "kitemviews/private/kfileitemmodelsortalgorithm.h"
-#include "testdir.h"
-
void myMessageOutput(QtMsgType type, const QMessageLogContext& context, const QString& msg)
{
- Q_UNUSED(context);
+ Q_UNUSED(context)
switch (type) {
case QtDebugMsg:
QTest::addColumn<KItemRangeList>("expectedItemsRemoved");
QList<int> sizes;
- sizes << 1000 << 4000 << 16000 << 64000 << 256000;
- //sizes << 50000 << 100000 << 150000 << 200000 << 250000;
+ sizes << 100000;
foreach (int n, sizes) {
QStringList allStrings;
model.m_naturalSorting = false;
model.setRoles({"text"});
- QSignalSpy spyItemsInserted(&model, SIGNAL(itemsInserted(KItemRangeList)));
- QSignalSpy spyItemsRemoved(&model, SIGNAL(itemsRemoved(KItemRangeList)));
+ QSignalSpy spyItemsInserted(&model, &KFileItemModel::itemsInserted);
+ QSignalSpy spyItemsRemoved(&model, &KFileItemModel::itemsRemoved);
QBENCHMARK {
model.slotClear();