qt5base-lts/tests/auto/corelib/global
Olivier Goffart e759d38d49 Declare the operator| in the Qt namespace for QFlags in that namespaces
This is a long overdue change so we don't break ADL of operator|.
I think will not break source or binary compatibility.

The problem is code like this:

  namespace Foo {
     struct MyStruct;
     MyStruct operator|(MyStruct, MyStruct);

     void someFunction() {
	fooLabel->setAlignement(Qt::AlignLeft | Qt::AlignTop)
     }

  }

This would be an error before as ADL would find only the Foo::operator| and not
the global one since the arguments are not in the global namespace.

After this change, ADL works fine and this code compiles

This bites people with misterious error, see questions on
https://stackoverflow.com/questions/10755058/qflags-enum-type-conversion-fails-all-of-a-sudden
https://stackoverflow.com/questions/39919142/broken-bitwise-or-operator-in-a-qt-project

[ChangeLog][QtCore] QFlags's operator| for enum types in the Qt namespace are
now declared in the Qt namespace itself.

Change-Id: I021bce11ec1521b4d8795a2cf3084a0be1960804
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-08 14:24:27 +00:00
..
q_func_info Updated license headers 2016-01-21 18:55:18 +00:00
qflags Declare the operator| in the Qt namespace for QFlags in that namespaces 2018-04-08 14:24:27 +00:00
qfloat16 Merge remote-tracking branch 'origin/5.10' into dev 2018-01-02 09:58:44 +01:00
qgetputenv Long live qEnvironmentVariable() 2017-08-04 11:19:13 +00:00
qglobal Fix thread_local test 2018-02-23 13:23:01 +00:00
qglobalstatic tests: Unify license to GPL-EXCEPT 2017-04-03 07:18:46 +00:00
qhooks tst_qhooks: test that it's possible to chain multiple hooks together 2016-11-18 15:22:32 +00:00
qlogging Use dependencies instead of CONFIG+=ordered 2017-12-02 11:09:15 +00:00
qnumeric Update the overflow functions to include qsizetype 2018-01-24 21:13:20 +00:00
qrand Updated license headers 2016-01-21 18:55:18 +00:00
qrandomgenerator Tests: Raise minimum supported MSVC version to 2015 2018-01-04 20:23:25 +00:00
qtendian Move qle_bitfield to qendian_p.h 2017-06-27 22:16:56 +00:00
global.pro Long live QRandomGenerator 2017-06-12 06:14:34 +00:00