qt5base-lts/tests/auto
Ahmad Samir 7779400ba6 Moc: fix generated code for nested enum class corner case
Fixes an issue with generated code where the name of an enclosing
namespace is identical to an enum class type, when Q_ENUM_NS is used.

Consider:
namespace a {
    Q_NAMESPACE
    namespace b {
        enum class b { Key, Key2 };
        Q_ENUM_NS(b);
    }
}

moc generated code such as:
Q_CONSTINIT const QMetaObject a:🅱️:staticMetaObject = { {
    ...
    qt_incomplete_metaTypeArray<qt_meta_stringdata_CLASSaSCOPEbENDCLASS_t,
        // enum 'TestEnum'
        QtPrivate::TypeAndForceComplete<b::b, std::true_type>,
        // Q_OBJECT / Q_GADGET
        QtPrivate::TypeAndForceComplete<void, std::true_type>
    >,
    nullptr
} };

which confused the compiler:
error: ‘b’ is not a member of ‘a:🅱️:b
   83 |         QtPrivate::TypeAndForceComplete<b::b, std::true_type>,

Fixes: QTBUG-112996
Pick-to: 6.6
Change-Id: I37aee83c32efe96cc9d6c2bd0bdb9ba80bb7b8a7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-18 21:28:58 +03:00
..
bic/data Add binary compatibility file built against 6.5.0 2023-04-19 15:40:36 +00:00
cmake Bump version to 6.7.0 2023-06-12 14:46:07 +01:00
concurrent QVariant::value/qvariant_cast: add rvalue optimization 2023-06-12 09:58:58 +02:00
corelib QProcess: add testUnixProcessParameters as a dep. for tst_qprocess 2023-06-18 20:32:30 +03:00
dbus QDBus: Fix typo in a function name 2023-05-26 15:46:34 +02:00
gui Consult QIcon::fallbackThemeName() even when theme name is empty 2023-06-18 20:28:58 +02:00
guiapplauncher Move Weather Anchor Layout example to manual tests 2023-03-02 05:55:57 +01:00
network Update public suffix list 2023-06-16 07:07:19 +00:00
opengl tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
other macOS: Extend accessibility testing of treeview 2023-05-23 19:42:16 +02:00
printsupport tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
shared tests: remove PlatformInputContext::filterEvent() 2023-01-18 13:21:06 +01:00
sql SQL: Make QSqlDatabase::DriverDict creation thread-safe 2023-05-24 17:27:55 +02:00
testlib Move the formatting of <chrono> durations to QDebug & QtTest 2023-05-06 17:54:23 +00:00
tools Moc: fix generated code for nested enum class corner case 2023-06-18 21:28:58 +03:00
wasm Support child windows on WASM 2023-06-15 09:41:06 +02:00
widgets QComboBox: scroll the popup to the top before positioning it 2023-06-15 13:04:56 +02:00
xml QDomDocument: no longer drop a provided 'standalone' attribute if 'no' 2023-04-24 21:49:29 +02:00
CMakeLists.txt tests: Remove remains of qmake conversion from CMakeLists.txt files 2023-02-17 21:56:49 +01:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00