Remove binary compat sources for qbytearray and qstring

No longer needed in Qt6.

Change-Id: I29567e175e07cc3658f0619acfd604abf64f6459
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Allan Sandfeld Jensen 2020-08-12 15:16:17 +02:00
parent cced8c9005
commit 2df41e2c48
7 changed files with 2 additions and 142 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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 \