corelib: settings - make qsettings.cpp unity buildable
Both qsettings.cpp and qjsonparser.cpp defined Space in the global namespace. Hiding it in one of them in an implementation namespace resolves the name clash. Pick-to: 6.6 6.5 Change-Id: I8dd1244f80d87f3908597ed82c8e41b49b7b916c Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 4ff65f0e5615b1132ec13c6eeba3647162d8dd0f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
e31fef039d
commit
a4c158effe
@ -327,7 +327,6 @@ qt_internal_add_module(Core
|
||||
text/qstringconverter.cpp # enum Data
|
||||
tools/qcryptographichash.cpp # KeccakNISTInterface/Final
|
||||
io/qdebug.cpp # undef qDebug
|
||||
io/qsettings.cpp # Space (also in qjsonparser.cpp)
|
||||
NO_PCH_SOURCES
|
||||
compat/removed_api.cpp
|
||||
global/qsimd.cpp
|
||||
|
@ -1518,6 +1518,8 @@ void QConfFileSettingsPrivate::syncConfFile(QConfFile *confFile)
|
||||
}
|
||||
}
|
||||
|
||||
namespace SettingsImpl {
|
||||
|
||||
enum { Space = 0x1, Special = 0x2 };
|
||||
|
||||
static const char charTraits[256] =
|
||||
@ -1544,10 +1546,15 @@ static const char charTraits[256] =
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
} // namespace SettingsImpl
|
||||
|
||||
using SettingsImpl::charTraits;
|
||||
|
||||
bool QConfFileSettingsPrivate::readIniLine(QByteArrayView data, qsizetype &dataPos,
|
||||
qsizetype &lineStart, qsizetype &lineLen,
|
||||
qsizetype &equalsPos)
|
||||
{
|
||||
using namespace SettingsImpl;
|
||||
qsizetype dataLen = data.size();
|
||||
bool inQuotes = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user