diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-08-12 15:16:17 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-08-19 19:04:34 +0200 |
commit | 2df41e2c4876cb692bf575d9d0d1cc798e09237c (patch) | |
tree | 877ddfe165b3ec1d73a0389cc18de97d9724c406 /src | |
parent | cced8c900561684609203667c303884fef0ea758 (diff) |
Remove binary compat sources for qbytearray and qstring
No longer needed in Qt6.
Change-Id: I29567e175e07cc3658f0619acfd604abf64f6459
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/corelib/text/qbytearray.h | 12 | ||||
-rw-r--r-- | src/corelib/text/qstring.h | 12 | ||||
-rw-r--r-- | src/corelib/text/qstring_compat.cpp | 112 | ||||
-rw-r--r-- | src/corelib/text/text.pri | 3 | ||||
-rw-r--r-- | src/tools/bootstrap/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/tools/bootstrap/bootstrap.pro | 1 |
7 files changed, 2 insertions, 142 deletions
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index eef80acd2a..b4b65c9dbc 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -170,7 +170,6 @@ qt_add_module(Core text/qlocale_data_p.h text/qlocale_tools.cpp text/qlocale_tools_p.h text/qstring.cpp text/qstring.h - text/qstring_compat.cpp text/qstringalgorithms.h text/qstringalgorithms_p.h text/qstringbuilder.cpp text/qstringbuilder.h text/qstringconverter.cpp text/qstringconverter.h text/qstringconverter_p.h @@ -256,8 +255,6 @@ qt_add_module(Core Qt::GlobalConfigPrivate # special case PRECOMPILED_HEADER "global/qt_pch.h" - NO_PCH_SOURCES - "text/qstring_compat.cpp" PUBLIC_LIBRARIES # special case: Qt::Platform # special case: # special case begin diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h index c7101716c4..68945ec6c4 100644 --- a/src/corelib/text/qbytearray.h +++ b/src/corelib/text/qbytearray.h @@ -246,14 +246,7 @@ public: void truncate(int pos); void chop(int n); -#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP) && !defined(Q_CLANG_QDOC) -# if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL) && !__has_cpp_attribute(nodiscard) - // required due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61941 -# pragma push_macro("Q_REQUIRED_RESULT") -# undef Q_REQUIRED_RESULT -# define Q_REQUIRED_RESULT -# define Q_REQUIRED_RESULT_pushed -# endif +#if !defined(Q_CLANG_QDOC) Q_REQUIRED_RESULT QByteArray toLower() const & { return toLower_helper(*this); } Q_REQUIRED_RESULT QByteArray toLower() && @@ -270,9 +263,6 @@ public: { return simplified_helper(*this); } Q_REQUIRED_RESULT QByteArray simplified() && { return simplified_helper(*this); } -# ifdef Q_REQUIRED_RESULT_pushed -# pragma pop_macro("Q_REQUIRED_RESULT") -# endif #else Q_REQUIRED_RESULT QByteArray toLower() const; Q_REQUIRED_RESULT QByteArray toUpper() const; diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h index 6ad24b2b5f..57ac84f48f 100644 --- a/src/corelib/text/qstring.h +++ b/src/corelib/text/qstring.h @@ -475,14 +475,7 @@ public: Q_REQUIRED_RESULT QString leftJustified(qsizetype width, QChar fill = QLatin1Char(' '), bool trunc = false) const; Q_REQUIRED_RESULT QString rightJustified(qsizetype width, QChar fill = QLatin1Char(' '), bool trunc = false) const; -#if defined(Q_COMPILER_REF_QUALIFIERS) && !defined(QT_COMPILING_QSTRING_COMPAT_CPP) && !defined(Q_CLANG_QDOC) -# if defined(Q_CC_GNU) && !defined(Q_CC_CLANG) && !defined(Q_CC_INTEL) && !__has_cpp_attribute(nodiscard) - // required due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61941 -# pragma push_macro("Q_REQUIRED_RESULT") -# undef Q_REQUIRED_RESULT -# define Q_REQUIRED_RESULT -# define Q_REQUIRED_RESULT_pushed -# endif +#if !defined(Q_CLANG_QDOC) Q_REQUIRED_RESULT QString toLower() const & { return toLower_helper(*this); } Q_REQUIRED_RESULT QString toLower() && @@ -503,9 +496,6 @@ public: { return simplified_helper(*this); } Q_REQUIRED_RESULT QString simplified() && { return simplified_helper(*this); } -# ifdef Q_REQUIRED_RESULT_pushed -# pragma pop_macro("Q_REQUIRED_RESULT") -# endif #else Q_REQUIRED_RESULT QString toLower() const; Q_REQUIRED_RESULT QString toUpper() const; diff --git a/src/corelib/text/qstring_compat.cpp b/src/corelib/text/qstring_compat.cpp deleted file mode 100644 index 45bb816e4b..0000000000 --- a/src/corelib/text/qstring_compat.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Intel Corporation. -** 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$ -** -****************************************************************************/ - -#if defined(QSTRING_H) || defined(QBYTEARRAY_H) -# error "This file cannot be compiled with pre-compiled headers" -#endif -#define QT_COMPILING_QSTRING_COMPAT_CPP - -#include "qbytearray.h" -#include "qstring.h" - -QT_BEGIN_NAMESPACE - -// all these implementations must be the same as the inline versions in qstring.h -QString QString::trimmed() const -{ - return trimmed_helper(*this); -} - -QString QString::simplified() const -{ - return simplified_helper(*this); -} - -QString QString::toLower() const -{ - return toLower_helper(*this); -} - -QString QString::toCaseFolded() const -{ - return toCaseFolded_helper(*this); -} - -QString QString::toUpper() const -{ - return toUpper_helper(*this); -} - -QByteArray QString::toLatin1() const -{ - return toLatin1_helper(*this); -} - -QByteArray QString::toLocal8Bit() const -{ - return toLocal8Bit_helper(isNull() ? nullptr : constData(), size()); -} - -QByteArray QString::toUtf8() const -{ - return toUtf8_helper(*this); -} - -// ditto, for qbytearray.h (because we're lazy) -QByteArray QByteArray::toLower() const -{ - return toLower_helper(*this); -} - -QByteArray QByteArray::toUpper() const -{ - return toUpper_helper(*this); -} - -QByteArray QByteArray::trimmed() const -{ - return trimmed_helper(*this); -} - -QByteArray QByteArray::simplified() const -{ - return simplified_helper(*this); -} - -QT_END_NAMESPACE diff --git a/src/corelib/text/text.pri b/src/corelib/text/text.pri index 0d9a6af454..16d585cac7 100644 --- a/src/corelib/text/text.pri +++ b/src/corelib/text/text.pri @@ -50,9 +50,6 @@ SOURCES += \ text/qunicodetools.cpp \ text/qvsnprintf.cpp -NO_PCH_SOURCES += text/qstring_compat.cpp -false: SOURCES += $$NO_PCH_SOURCES # Hack for QtCreator - !nacl:darwin: { SOURCES += text/qlocale_mac.mm } diff --git a/src/tools/bootstrap/CMakeLists.txt b/src/tools/bootstrap/CMakeLists.txt index 2beab1bdfb..3510c130cc 100644 --- a/src/tools/bootstrap/CMakeLists.txt +++ b/src/tools/bootstrap/CMakeLists.txt @@ -103,7 +103,6 @@ qt_extend_target(Bootstrap ../../corelib/text/qlocale_tools.cpp ../../corelib/text/qregularexpression.cpp ../../corelib/text/qstring.cpp - ../../corelib/text/qstring_compat.cpp ../../corelib/text/qstringbuilder.cpp ../../corelib/text/qstringconverter.cpp ../../corelib/text/qstringlist.cpp diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 9e7d570def..11eb659f68 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -91,7 +91,6 @@ SOURCES += \ ../../corelib/text/qstring.cpp \ ../../corelib/text/qstringbuilder.cpp \ ../../corelib/text/qstringconverter.cpp \ - ../../corelib/text/qstring_compat.cpp \ ../../corelib/text/qstringlist.cpp \ ../../corelib/text/qvsnprintf.cpp \ ../../corelib/time/qcalendar.cpp \ |