summaryrefslogtreecommitdiffstats
path: root/qmake/library/proitems.h
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/library/proitems.h')
-rw-r--r--qmake/library/proitems.h41
1 files changed, 10 insertions, 31 deletions
diff --git a/qmake/library/proitems.h b/qmake/library/proitems.h
index 590b976937..2de982034c 100644
--- a/qmake/library/proitems.h
+++ b/qmake/library/proitems.h
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the qmake application 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef PROITEMS_H
#define PROITEMS_H
@@ -190,7 +165,7 @@ private:
friend QString operator+(const ProString &one, const ProString &two);
friend class ProKey;
};
-Q_DECLARE_TYPEINFO(ProString, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(ProString, Q_RELOCATABLE_TYPE);
class ProKey : public ProString {
@@ -222,7 +197,7 @@ public:
private:
ProKey(const ProString &other);
};
-Q_DECLARE_TYPEINFO(ProKey, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(ProKey, Q_RELOCATABLE_TYPE);
template <> struct QConcatenable<ProString> : private QAbstractConcatenable
{
@@ -233,6 +208,8 @@ template <> struct QConcatenable<ProString> : private QAbstractConcatenable
static inline void appendTo(const ProString &a, QChar *&out)
{
const auto n = a.size();
+ if (!n)
+ return;
memcpy(out, a.toQStringView().data(), sizeof(QChar) * n);
out += n;
}
@@ -247,6 +224,8 @@ template <> struct QConcatenable<ProKey> : private QAbstractConcatenable
static inline void appendTo(const ProKey &a, QChar *&out)
{
const auto n = a.size();
+ if (!n)
+ return;
memcpy(out, a.toQStringView().data(), sizeof(QChar) * n);
out += n;
}
@@ -343,7 +322,7 @@ public:
{ return contains(ProString(str), cs); }
bool contains(const char *str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const;
};
-Q_DECLARE_TYPEINFO(ProStringList, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(ProStringList, Q_RELOCATABLE_TYPE);
inline ProStringList operator+(const ProStringList &one, const ProStringList &two)
{ ProStringList ret = one; ret += two; return ret; }
@@ -496,7 +475,7 @@ private:
int m_offset;
};
-Q_DECLARE_TYPEINFO(ProFunctionDef, Q_MOVABLE_TYPE);
+Q_DECLARE_TYPEINFO(ProFunctionDef, Q_RELOCATABLE_TYPE);
struct ProFunctionDefs {
QHash<ProKey, ProFunctionDef> testFunctions;