]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/tests/kstandarditemmodeltest.cpp
Build with QT_NO_KEYWORDS
[dolphin.git] / src / tests / kstandarditemmodeltest.cpp
index f7e61ce900f3d571d33ddc820c6159da478b0dc6..c04e71524b057eb58c1f50aca49b6a156e552a33 100644 (file)
@@ -1,33 +1,22 @@
-/***************************************************************************
- *   Copyright (C) 2011 by Peter Penz <peter.penz19@gmail.com>             *
- *   Copyright (C) 2011 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            *
- ***************************************************************************/
-
-#include <qtest.h>
+/*
+ * SPDX-FileCopyrightText: 2011 Peter Penz <peter.penz19@gmail.com>
+ * SPDX-FileCopyrightText: 2011 Frank Reininghaus <frank78ac@googlemail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "dolphindebug.h"
 
 #include "kitemviews/kstandarditem.h"
 #include "kitemviews/kstandarditemmodel.h"
 
+#include <QTest>
+
 class KStandardItemModelTest : public QObject
 {
     Q_OBJECT
 
-private slots:
+private Q_SLOTS:
     void init();
     void cleanup();
 
@@ -49,7 +38,7 @@ void KStandardItemModelTest::init()
 void KStandardItemModelTest::cleanup()
 {
     delete m_model;
-    m_model = 0;
+    m_model = nullptr;
 }
 
 void KStandardItemModelTest::testNewItems()
@@ -98,13 +87,13 @@ bool KStandardItemModelTest::isModelConsistent() const
     for (int i = 0; i < m_model->count(); ++i) {
         const KStandardItem* item = m_model->item(i);
         if (!item) {
-            qWarning() << "Item" << i << "is null";
+            qCWarning(DolphinDebug) << "Item" << i << "is null";
             return false;
         }
 
         const int itemIndex = m_model->index(item);
         if (itemIndex != i) {
-            qWarning() << "Item" << i << "has a wrong index:" << itemIndex;
+            qCWarning(DolphinDebug) << "Item" << i << "has a wrong index:" << itemIndex;
             return false;
         }
     }
@@ -112,6 +101,6 @@ bool KStandardItemModelTest::isModelConsistent() const
     return true;
 }
 
-QTEST_MAIN(KStandardItemModelTest)
+QTEST_GUILESS_MAIN(KStandardItemModelTest)
 
 #include "kstandarditemmodeltest.moc"