qt5base-lts/tests/auto
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
..
android Updated license headers 2016-01-21 18:55:18 +00:00
bic/data Add binary compatibility files for QtBase for 5.10 2018-01-04 16:26:32 +00:00
cmake Remove CMake code for CMake < 3.1 2018-03-24 22:31:18 +00:00
compilerwarnings/data Updated license headers 2016-01-21 18:55:18 +00:00
concurrent Merge remote-tracking branch 'origin/5.11' into dev 2018-02-16 08:54:58 +01:00
corelib Declare the operator| in the Qt namespace for QFlags in that namespaces 2018-04-08 14:24:27 +00:00
dbus Merge remote-tracking branch 'origin/5.9' into 5.11 2018-02-14 12:51:24 +01:00
gui Merge remote-tracking branch 'origin/5.11' into dev 2018-04-06 09:32:13 +02:00
guiapplauncher Fix path to examples part of tst_GuiAppLauncher 2015-02-13 07:28:15 +00:00
installed_cmake Add a unit test for testing Qt in its install location. 2013-07-02 23:08:54 +02:00
network tst_QSslSocket::signatureAlgorithm - fix for OpenSSL 1.1 2018-04-05 15:15:01 +00:00
opengl Remove tst_QGLThreads::textureUploadInThread 2018-03-02 07:20:32 +00:00
other Merge remote-tracking branch 'origin/5.11' into dev 2018-04-07 01:00:14 +02:00
printsupport Fix tst_QAbstractPrintDialog::setMinMax 2018-03-19 10:21:14 +00:00
shared Remove workaround for potentially unavailable pasteboard in macOS 2017-03-07 01:04:46 +00:00
sql oci: Use OCIBindByPos2 to accommodate data longer than USHRT_MAX 2018-04-06 12:44:37 +00:00
testlib testlib: Ignore line locations from TAP reporter when running selftests 2018-03-27 19:34:04 +00:00
tools qmake: make VFS aware of exact vs. cumulative evaluation 2018-03-29 18:15:10 +00:00
widgets Merge remote-tracking branch 'origin/5.11' into dev 2018-03-31 01:00:13 +02:00
xml Don't indefinitely wait for data if it was able to read some data 2018-01-24 05:54:31 +00:00
auto.pro tests/auto/auto.pro: Use correct null device for DBUS check 2017-12-01 09:53:07 +00:00
network-settings.h Merge remote-tracking branch 'origin/5.6' into 5.7 2016-05-06 15:36:44 +02:00