qsettings.cpp: really un-break -unity-build
The use of Space was still ambiguous. Says GCC 14:
qsettings.cpp: In static member function ‘static bool QConfFileSettingsPrivate::readIniLine(QByteArrayView, qsizetype&, qsizetype&, qsizetype&, qsizetype&)’:
qsettings.cpp:1564:82: error: reference to ‘Space’ is ambiguous
1564 | while (lineStart < dataLen && (charTraits[uint(uchar(data.at(lineStart)))] & Space))
| ^~~~~
In file included from unity_0_cxx.cxx:277:
qjsonparser.cpp:217:5: note: candidates are: ‘<unnamed enum> Space’
217 | Space = 0x20,
| ^~~~~
qsettings.cpp:1523:8: note: ‘SettingsImpl::<unnamed enum> SettingsImpl::Space’
1523 | enum { Space = 0x1, Special = 0x2 };
| ^~~~~
qsettings.cpp:1605:71: error: reference to ‘Space’ is ambiguous
1605 | while (i < dataLen && charTraits[uchar(data.at(i))] & Space)
| ^~~~~
qjsonparser.cpp:217:5: note: candidates are: ‘<unnamed enum> Space’
217 | Space = 0x20,
| ^~~~~
qsettings.cpp:1523:8: note: ‘SettingsImpl::<unnamed enum> SettingsImpl::Space’
1523 | enum { Space = 0x1, Special = 0x2 };
| ^~~~~
Fix by making Space and Special local aliases (contexpr variables)
instead of importing the whole SettingsImpl namespace.
Amends 4ff65f0e56.
Pick-to: 6.5
Change-Id: I9e8f2422885121fb02938261fbae6231e62ae46d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 057defe283f1db5fa9dfb1d8183b94d441c3707b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit e8605372bab15d0fd7cd1cdb7c9c010371ef8726)
bb10
parent
ab5e8bc678
commit
b41b64c534
|
|
@ -1554,7 +1554,8 @@ bool QConfFileSettingsPrivate::readIniLine(QByteArrayView data, qsizetype &dataP
|
|||
qsizetype &lineStart, qsizetype &lineLen,
|
||||
qsizetype &equalsPos)
|
||||
{
|
||||
using namespace SettingsImpl;
|
||||
constexpr auto Space = SettingsImpl::Space;
|
||||
constexpr auto Special = SettingsImpl::Special;
|
||||
qsizetype dataLen = data.size();
|
||||
bool inQuotes = false;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue