summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qtransposeproxymodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/itemmodels/qtransposeproxymodel.cpp')
-rw-r--r--src/corelib/itemmodels/qtransposeproxymodel.cpp46
1 files changed, 6 insertions, 40 deletions
diff --git a/src/corelib/itemmodels/qtransposeproxymodel.cpp b/src/corelib/itemmodels/qtransposeproxymodel.cpp
index 558ec45b73..621b54782e 100644
--- a/src/corelib/itemmodels/qtransposeproxymodel.cpp
+++ b/src/corelib/itemmodels/qtransposeproxymodel.cpp
@@ -1,47 +1,12 @@
-/****************************************************************************
-**
-** Copyright (C) 2018 Luca Beldi <v.ronin@yahoo.it>
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtCore 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$
-**
-****************************************************************************/
+// Copyright (C) 2018 Luca Beldi <v.ronin@yahoo.it>
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qtransposeproxymodel.h"
#include <private/qtransposeproxymodel_p.h>
#include <QtCore/qlist.h>
#include <QtCore/qmetaobject.h>
#include <QtCore/qsize.h>
+#include <QtCore/qmap.h>
QT_BEGIN_NAMESPACE
@@ -67,7 +32,7 @@ void QTransposeProxyModelPrivate::onLayoutChanged(const QList<QPersistentModelIn
Q_ASSERT(layoutChangeProxyIndexes.size() == layoutChangePersistentIndexes.size());
QModelIndexList toList;
toList.reserve(layoutChangePersistentIndexes.size());
- for (const QPersistentModelIndex &persistIdx : qAsConst(layoutChangePersistentIndexes))
+ for (const QPersistentModelIndex &persistIdx : std::as_const(layoutChangePersistentIndexes))
toList << q->mapFromSource(persistIdx);
q->changePersistentIndexList(layoutChangeProxyIndexes, toList);
layoutChangeProxyIndexes.clear();
@@ -170,6 +135,7 @@ void QTransposeProxyModelPrivate::onRowsAboutToBeMoved(const QModelIndex &source
/*!
\since 5.13
\class QTransposeProxyModel
+ \inmodule QtCore
\brief This proxy transposes the source model.
This model will make the rows of the source model become columns of the proxy model and vice-versa.
@@ -206,7 +172,7 @@ void QTransposeProxyModel::setSourceModel(QAbstractItemModel* newSourceModel)
return;
beginResetModel();
if (d->model) {
- for (const QMetaObject::Connection& discIter : qAsConst(d->sourceConnections))
+ for (const QMetaObject::Connection& discIter : std::as_const(d->sourceConnections))
disconnect(discIter);
}
d->sourceConnections.clear();