X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/f6b4f562167969365d4aae14d73060c6fdb8270f..e76bf5cb18ca46a0adc84ead3801726814cf6fd3:/src/tests/kstandarditemmodeltest.cpp diff --git a/src/tests/kstandarditemmodeltest.cpp b/src/tests/kstandarditemmodeltest.cpp index 93aaf3686..943a85214 100644 --- a/src/tests/kstandarditemmodeltest.cpp +++ b/src/tests/kstandarditemmodeltest.cpp @@ -1,35 +1,24 @@ -/*************************************************************************** - * Copyright (C) 2011 by Peter Penz * - * Copyright (C) 2011 by Frank Reininghaus * - * * - * 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 + * SPDX-FileCopyrightText: 2011 Frank Reininghaus + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ #include "dolphindebug.h" #include "kitemviews/kstandarditem.h" #include "kitemviews/kstandarditemmodel.h" +#include #include class KStandardItemModelTest : public QObject { Q_OBJECT -private slots: +private Q_SLOTS: + void initTestCase(); void init(); void cleanup(); @@ -43,6 +32,11 @@ private: KStandardItemModel* m_model; }; +void KStandardItemModelTest::initTestCase() +{ + QStandardPaths::setTestModeEnabled(true); +} + void KStandardItemModelTest::init() { m_model = new KStandardItemModel(); @@ -51,7 +45,7 @@ void KStandardItemModelTest::init() void KStandardItemModelTest::cleanup() { delete m_model; - m_model = 0; + m_model = nullptr; } void KStandardItemModelTest::testNewItems() @@ -114,6 +108,6 @@ bool KStandardItemModelTest::isModelConsistent() const return true; } -QTEST_MAIN(KStandardItemModelTest) +QTEST_GUILESS_MAIN(KStandardItemModelTest) #include "kstandarditemmodeltest.moc"