summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2017-04-25 12:58:13 +0200
committerPaul Lemire <paul.lemire@kdab.com>2017-04-25 15:00:01 +0000
commit5e87e5beee5cfeffaa344ea165fba59ea46f4c57 (patch)
treebdb0a7c60a6b4a9c94070bc97cf6ad95e559c768
parent0f8e09748c8724350c2e353b7b849e062316992c (diff)
Remove last bits of qsortcriterion
QSortCriterion was replaced with QSortPolicy, somehow some files were still around. Change-Id: Ic41fe557eb77c0b8d9d701a875598a7850a92b62 Task-number: QTBUG-55952 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
-rw-r--r--src/render/framegraph/qsortcriterion.cpp82
-rw-r--r--src/render/framegraph/qsortcriterion.h85
-rw-r--r--tests/auto/render/qsortcriterion/tst_qsortcriterion.cpp138
3 files changed, 0 insertions, 305 deletions
diff --git a/src/render/framegraph/qsortcriterion.cpp b/src/render/framegraph/qsortcriterion.cpp
deleted file mode 100644
index f5252b1f7..000000000
--- a/src/render/framegraph/qsortcriterion.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qsortcriterion.h"
-#include "qsortcriterion_p.h"
-#include <Qt3DCore/qnodepropertychange.h>
-
-QT_BEGIN_NAMESPACE
-
-namespace Qt3DRender {
-
-QSortCriterionPrivate::QSortCriterionPrivate()
- : QNodePrivate()
- , m_sort(QSortCriterion::StateChangeCost)
-{
-}
-
-QSortCriterion::QSortCriterion(QNode *parent)
- : QNode(*new QSortCriterionPrivate, parent)
-{
-}
-
-QSortCriterion::SortType QSortCriterion::sort() const
-{
- Q_D(const QSortCriterion);
- return d->m_sort;
-}
-
-void QSortCriterion::setSort(QSortCriterion::SortType sort)
-{
- Q_D(QSortCriterion);
- if (d->m_sort != sort) {
- d->m_sort = sort;
- emit sortChanged(sort);
- }
-}
-
-/*! \internal */
-QSortCriterion::QSortCriterion(QSortCriterionPrivate &dd, QNode *parent)
- : QNode(dd, parent)
-{
-}
-
-} // namespace Qt3DRender
-
-QT_END_NAMESPACE
diff --git a/src/render/framegraph/qsortcriterion.h b/src/render/framegraph/qsortcriterion.h
deleted file mode 100644
index 230f111f9..000000000
--- a/src/render/framegraph/qsortcriterion.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt3D module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QT3DRENDER_QSORTCRITERION_H
-#define QT3DRENDER_QSORTCRITERION_H
-
-#include <Qt3DCore/qnode.h>
-#include <Qt3DRender/qt3drender_global.h>
-
-QT_BEGIN_NAMESPACE
-
-namespace Qt3DRender {
-
-class QSortCriterionPrivate;
-
-class QT3DRENDERSHARED_EXPORT QSortCriterion : public Qt3DCore::QNode
-{
- Q_OBJECT
- Q_PROPERTY(Qt3DRender::QSortCriterion::SortType sort READ sort WRITE setSort NOTIFY sortChanged)
-public:
- explicit QSortCriterion(Qt3DCore::QNode *parent = Q_NULLPTR);
-
- enum SortType {
- StateChangeCost = (1 << 0),
- BackToFront = (1 << 1),
- Material = (1 << 2)
- };
- Q_ENUM(SortType) // LCOV_EXCL_LINE
-
- SortType sort() const;
-
-public Q_SLOTS:
- void setSort(SortType sort);
-
-Q_SIGNALS:
- void sortChanged(SortType sort);
-
-protected:
- QSortCriterion(QSortCriterionPrivate &dd, Qt3DCore::QNode *parent = Q_NULLPTR);
-
-private:
- Q_DECLARE_PRIVATE(QSortCriterion)
-};
-
-} // namespace Qt3DRender
-
-QT_END_NAMESPACE
-
-#endif // QSORTCRITERION_H
diff --git a/tests/auto/render/qsortcriterion/tst_qsortcriterion.cpp b/tests/auto/render/qsortcriterion/tst_qsortcriterion.cpp
deleted file mode 100644
index bac9fb3e8..000000000
--- a/tests/auto/render/qsortcriterion/tst_qsortcriterion.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the S module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtTest/QTest>
-#include <Qt3DCore/private/qnode_p.h>
-#include <Qt3DCore/private/qscene_p.h>
-#include <Qt3DCore/private/qnodecreatedchangegenerator_p.h>
-
-#include <Qt3DRender/qsortcriterion.h>
-#include <Qt3DRender/private/qsortcriterion_p.h>
-
-#include "testpostmanarbiter.h"
-
-class tst_QSortCriterion: public QObject
-{
- Q_OBJECT
-
-private Q_SLOTS:
-
- void checkCloning_data()
- {
- QTest::addColumn<Qt3DRender::QSortCriterion *>("sortCriterion");
- QTest::addColumn<Qt3DRender::QSortCriterion::SortType>("sortType");
-
- Qt3DRender::QSortCriterion *defaultConstructed = new Qt3DRender::QSortCriterion();
- QTest::newRow("defaultConstructed") << defaultConstructed << Qt3DRender::QSortCriterion::StateChangeCost;
-
- Qt3DRender::QSortCriterion *backToFrontSort = new Qt3DRender::QSortCriterion();
- backToFrontSort->setSort(Qt3DRender::QSortCriterion::BackToFront);
- QTest::newRow("backToFrontSort") << backToFrontSort << Qt3DRender::QSortCriterion::BackToFront;
-
- Qt3DRender::QSortCriterion *materialSort = new Qt3DRender::QSortCriterion();
- materialSort->setSort(Qt3DRender::QSortCriterion::Material);
- QTest::newRow("materialSort") << materialSort << Qt3DRender::QSortCriterion::Material;
- }
-
- void checkCloning()
- {
- // GIVEN
- QFETCH(Qt3DRender::QSortCriterion *, sortCriterion);
- QFETCH(Qt3DRender::QSortCriterion::SortType, sortType);
-
- // THEN
- QCOMPARE(sortCriterion->sort(), sortType);
-
-// TO DO: Add creation change
-// // WHEN
-// Qt3DCore::QNodeCreatedChangeGenerator creationChangeGenerator(sortCriterion);
-// QVector<Qt3DCore::QNodeCreatedChangeBasePtr> creationChanges = creationChangeGenerator.creationChanges();
-
-// // THEN
-// QCOMPARE(creationChanges.size(), 1);
-
-// const Qt3DCore::QNodeCreatedChangePtr<Qt3DRender::QCameraSelectorData> creationChangeData =
-// qSharedPointerCast<Qt3DCore::QNodeCreatedChange<Qt3DRender::QSortCriterion>>(creationChanges.first());
-// const Qt3DRender::QCameraSelectorData &cloneData = creationChangeData->data;
-
-
-// // THEN
-// QCOMPARE(sortCriterion->id(), creationChangeData->subjectId());
-// QCOMPARE(sortCriterion->isEnabled(), creationChangeData->isNodeEnabled());
-// QCOMPARE(sortCriterion->metaObject(), creationChangeData->metaObject());
-// QCOMPARE(sortCriterion->sort(), cloneData.sort);
-
- delete sortCriterion;
- }
-
- void checkPropertyUpdates()
- {
- // GIVEN
- QScopedPointer<Qt3DRender::QSortCriterion> sortCriterion(new Qt3DRender::QSortCriterion());
- TestArbiter arbiter(sortCriterion.data());
-
- // WHEN
- sortCriterion->setSort(Qt3DRender::QSortCriterion::BackToFront);
- QCoreApplication::processEvents();
-
- // THEN
- QCOMPARE(arbiter.events.size(), 1);
- Qt3DCore::QNodePropertyChangePtr change = arbiter.events.first().staticCast<Qt3DCore::QNodePropertyChange>();
- QCOMPARE(change->propertyName(), "sort");
- QCOMPARE(change->subjectId(), sortCriterion->id());
- QCOMPARE(change->value().value<Qt3DRender::QSortCriterion::SortType>(), Qt3DRender::QSortCriterion::BackToFront);
- QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
-
- arbiter.events.clear();
-
- // WHEN
- sortCriterion->setSort(Qt3DRender::QSortCriterion::BackToFront);
- QCoreApplication::processEvents();
-
- // THEN
- QCOMPARE(arbiter.events.size(), 0);
-
- // WHEN
- sortCriterion->setSort(Qt3DRender::QSortCriterion::Material);
- QCoreApplication::processEvents();
-
- // THEN
- QCOMPARE(arbiter.events.size(), 1);
- change = arbiter.events.first().staticCast<Qt3DCore::QNodePropertyChange>();
- QCOMPARE(change->propertyName(), "sort");
- QCOMPARE(change->subjectId(), sortCriterion->id());
- QCOMPARE(change->value().value<Qt3DRender::QSortCriterion::SortType>(), Qt3DRender::QSortCriterion::Material);
- QCOMPARE(change->type(), Qt3DCore::NodeUpdated);
-
- arbiter.events.clear();
- }
-};
-
-QTEST_MAIN(tst_QSortCriterion)
-
-#include "tst_qsortcriterion.moc"