Commit Graph

41597 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
34e457e873 Parse PNG cHRM chunks
Used for setting primaries without a full ICC profile.

Change-Id: I6dd8e62ca15bf1f86e7bbc01aaf8e0bd85803071
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-07-19 16:29:26 +02:00
Tasuku Suzuki
f0f46ade9e Fix SOURCES duplication in tools/bootstrap on macOS
Three *_unix.cpp are added twice for unix and for mac

Makefile:14766: warning: overriding commands for target `.obj/
qfilesystemengine_unix.o'
Makefile:14037: warning: ignoring old commands for target `.obj/
qfilesystemengine_unix.o'
Makefile:14913: warning: overriding commands for target `.obj/
qfilesystemiterator_unix.o'
Makefile:14184: warning: ignoring old commands for target `.obj/
qfilesystemiterator_unix.o'
Makefile:15071: warning: overriding commands for target `.obj/
qfsfileengine_unix.o'
Makefile:14342: warning: ignoring old commands for target `.obj/
qfsfileengine_unix.o'

Change-Id: Ia5f9d2873f738081c2d1e763efbdfc64209aaf7d
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-07-19 23:18:53 +09:00
Thiago Macieira
89e0c2854a Fix QStorageInfo inability to parse really long mountinfo lines
Docker creates really long lines due to the multiple levels of overlays
in the overlayfs. Our limit of 1024 bytes was too short.

[ChangeLog][QtCore][QStorageInfo] Fixed a bug that caused QStorageInfo
to be unable to report all filesystems if the options to mounted
filesystems were too long (over 900 characters, roughly), such as those
found in Docker overlay mounts.

Fixes: QTBUG-77059
Change-Id: I6aed4df6a12e43c3ac8efffd15b1ba4231e60b4a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-19 05:18:23 -07:00
Tor Arne Vestbø
c5ab86976b macOS: Modernize and clarify transient parent window level inheritance
Task-number: QTBUG-71480
Change-Id: Ia026427844a674f6b36804571a897dc6f16364fa
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-07-19 11:02:11 +00:00
Allan Sandfeld Jensen
5c351da046 Protect against integer overflow in painting transformed images
Makes it safe to sample pixel coordinates above 32767.

Fixes: QTBUG-76829
Change-Id: I5965afef1bd65106fcfc130dd37572309eacbe42
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-07-19 11:55:50 +02:00
Tor Arne Vestbø
af683471bd macOS: Add QCocoaWindowManager for dealing with window levels
Moves and improves the logic for lowering splash screens to a dedicated
window manager, which will learn more tricks in patches to come.

Change-Id: I8b8fd1dd78fdaf6f106a59c84d2a59254f3539c3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-07-19 10:56:23 +02:00
Qt Forward Merge Bot
f07d5e4a78 Merge "Merge remote-tracking branch 'origin/5.13' into dev" 2019-07-19 10:45:40 +02:00
Qt Forward Merge Bot
8f0790dd90 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I999ba23a27cd897017d15c6ffe41ea8cd008ffb9
2019-07-19 01:00:41 +02:00
Eirik Aavitsland
82aabafada Fix loading of image files with wrong, but known, file name extension
If QImageReader recognized the suffix of a file, it would by default
not check if the file contents matched the claimed format. Hence, a
valid but misnamed image file would fail to load.
Fix by adding contents check for suffix-recognized files.

[ChangeLog][QtGui][Image] Loading of image files having a file name
suffix for a different image file type has been fixed. QImageReader
will now ask the suffix format handler to confirm the file contents
(canRead()), and fall back to normal file content recognition on
failure. This implies a slight behavior change in
QImageReader::loopCount(), ::imageCount() and ::nextImageDelay(): For
an unreadable file with a recognized suffix, they would earlier return
0, while they now will return -1, i.e. error as per the documentation.

Fixes: QTBUG-42540
Fixes: QTBUG-68787
Change-Id: I205e83f29ed7190cbcae95dab960232544d012f6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-07-18 16:05:57 +02:00
Tor Arne Vestbø
92563a2453 macOS: Allow overriding NSKeyValueObservingOptions for QMacKeyValueObserver
Change-Id: I6dc0f7c542ccfb768c1cd8688168c415e2c8a087
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-18 16:00:29 +02:00
Volker Hilsheimer
de775f2e62 macOS: activate correct object when using multiple QSystemTrayIcons
Since we need to set the delegate on the defaultUserNotificationCenter,
which is a gobal object, we have to update the delegate when we show
the message. Otherwise, the last delegate created and set will receive
the notification, and the last QSystemTrayIcon created will emit the
activated signal.

Before clearing the delegate upon destruction, make sure that it's
the right item first.

Also updating coding style in the respective parts of the code, and
plugging a memory leak.

Change-Id: Ife62ae0776a5a610a6fd735b2959b807c3a410c7
Fixes: QTBUG-77003
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-07-18 15:26:49 +02:00
Giuseppe D'Angelo
907923b7ca qmake: fix move semantics
ProFunctionDef is move-enabled, meaning its `m_pro` field can
become nullptr. Its usage in the assignment operator and the dtor
must therefore be protected with a check.

Amends 9c63ad562b.

Change-Id: I0c77b07dc83969565480bbb9d9fc80751d4246b1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-07-18 12:55:33 +00:00
Eirik Aavitsland
7f948d9eff Disable experimental xcb native painting config option by default
Saves 13% on the binary size.

Change-Id: I3be0957b80eec5d3c8b75b4d3f1784e4bd6b5e2a
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-07-18 13:44:48 +02:00
Marc Mutz
eaceabe9ac QHostInfo: port from recursive to non-recursive mutex
It turns out that the only reason a recursive mutex is used was
because work() was locking it. But work() was only ever called from
functions that already had locked the mutex themselves, and kept it
locked across the call to work(). Clearly mark work() as expecting to
be called with the mutex held (by renaming the function to
rescheduleWithMutexHeld(), then drop the mutex locking from it.

After this change, a non-recursive mutex suffices, so save the memory
allocation and extra complexity involved with recursive mutexes.

Looking at the non-QT_CONFIG(thread) code in rescheduleWithMutexHeld(),
one might be tempted to expect a recursive mutex, since that code
calls QHostInfoRunnable::run() directly, which, in turn, recurses into
QHostInfoLookupManager whence control came, under mutex lock. But in
non-QT_CONFIG(thread) builds, QMutex is but an empty shell, all of its
operations are no-ops, so no possibility for deadlock, either.

Change-Id: Ic01d90c2ed3995b66ccf946d146fdaa6f9af3d8b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-07-18 11:38:02 +00:00
Mårten Nordheim
d35aedc125 tst_qnetworkreply: Use object.connect() to get rid of warning
warning C4573: the usage of 'tst_QNetworkReply::connect' requires the
compiler to capture 'this' but the current default capture mode does not
allow it

Change-Id: Ic9fd526fedf7c52e53e2b1136834c10bf4cd0ea9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-07-18 12:30:02 +02:00
Mårten Nordheim
e0ea987994 tst_qnetworkreply: skip ssl session sharing tests with schannel
It's not implemented

Change-Id: I56abb0a5fe0e6d5c2f5f678adadafed395456902
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-18 12:28:12 +02:00
Marc Mutz
a7de860cfd QMovie: move-enable QFrameInfo
All users of the QPixmap ctor can pass rvalues, so take by rvalue-ref
and move into place. Adapt callers to actually pass rvalues.

Change-Id: Iacff2ed893ceaa1665b270ce466ffdc21ba800f1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-07-18 12:06:46 +02:00
Marc Mutz
8abef02777 QHostInfo: add nothrow move constructor
QHostInfo isn't implicitly shared. The more important to optimize away
copies by providing a move constructor.

Port from QScopedPointer to Q_DECLARE_PRIVATE, as otherwise the move
ctor can't be inline, and we don't implement move ctors out-of-line in
Qt.

[ChangeLog][QtNetwork][QHostInfo] Added move contructor.

Change-Id: I6b63a04e36f63e299205830fdc590ff7e2af338b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-07-18 12:05:28 +02:00
Marc Mutz
c187d58244 QtNetwork: ssl: port from QMutex::Recursive to QRecursiveMutex
Change-Id: I78913fee6720f6ad9b196824b35de189567340be
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-07-18 12:00:58 +02:00
Leander Beernaert
3212f1b866 Add special case handling for corelib mimetypes resources
We have to treat the resources from mimetypes in corelibs specially
as they are reused for two test cases. Since we no longer use the qrc
files, we have wrapped the relevant code in a function that can be
called for every target that depends on it.

This change also corrects formatting for the generate CMake code
regarding resource commands.

Change-Id: I50a05c81151d75aefc9ca165f5ffeb9f5cd77162
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-18 08:05:58 +00:00
Leander Beernaert
341ccc3b59 Enable recursive expansion of simple qmake variables
Allow _expand_value to expand variables that may have more than
one level of expansion when the regular expression covers all
of the input. E.g.:

A = Foo
B = $$A/Bar
scope.expand('$$B')

While the original code was able to expand the string '$$B/source.cpp' to
'Foo/Bar/source.cpp', it could not expand the string '$$B' completely.
The latter would always return '$$A/Bar' instead of the expected 'Foo/Bar'
string.

A test case has been added which coveres the above example.

Change-Id: Ie3b5739c24ecbeb67d408dd204b0f54bab1d0f3f
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-18 07:26:01 +00:00
Timur Pocheptsov
334f09b585 tst_http2 - make the test less rough in general
1. Use per-case QNAM objects
2. In a slots (connected to QNetworkReplies) - if an error detected - stop
   the event loop (no reason to continue waiting) and then do normal
   QVERIFY/QCOMPARE things.
3. In tests, check QTest::currentTestFailed after the event loop returned -
   if an error was detected by a slot, no need to continue with QCOMPARE/QVERIFY
   in the test itself.

Task-number: QTBUG-77053
Change-Id: I3827a629a2749becd3dc6eee7fd6994d96441e65
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-18 06:18:40 +02:00
Thiago Macieira
69ef6e8212 QStandardPaths: update docs to what $HOME is on iOS
It's not <APPROOT> (any more, or was ever).

Fixes: QTBUG-76911
Change-Id: I6aed4df6a12e43c3ac8efffd15aed22128862c23
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-07-17 22:41:47 -03:00
Qt Forward Merge Bot
d3de20d409 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-07-18 01:00:20 +02:00
Qt Forward Merge Bot
7576250b1c Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I685000c4f33fb3707b2102fae0b58092107dc8f0
2019-07-18 01:00:08 +02:00
Volker Hilsheimer
3966b571ff QDir: strip Windows' long-path markers when converting from native
Applications might receive paths with Windows' '\\?\' markers, which
indicates a long path to Win32 APIs, when the application is opened by
explorer via file association. Qt not ignoring those markers will fail
to open such files.

By stripping the marker in QDir::fromNativeSeparators, QFile, QFileInfo
etc automatically are able to handle such paths. QDir::cleanPath is
also documented to normalize separators, so it needs to be done there
as well.

[ChangeLog][QtCore][QDir] Remove Windows specific long path markers
when handling file paths with native separators.

Change-Id: I526a890614edee8c85b39fc12c98e7ddb6e0d793
Fixes: QTBUG-75117
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-17 20:07:15 +02:00
Marc Mutz
a7d7f71550 QWasmEventTranslator: return Key_unknown, not 0x00, when a key isn't found
This matches what translateDeadKey() returns for unhandled keys, and
processKeyboard() checks for when replacing qtKey with the result of
translateDeadKey().

Change-Id: I1500576b7b31047a7a35633a15cd6975b77d842d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-17 17:21:57 +00:00
Simon Hausmann
48fd425ea8 Fix build with private_tests enabled
Avoid recursing into a sub-directory that has not been converted yet.

Change-Id: I1abb345bc29aff84d6c596b61b469b6119513f12
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-07-17 14:26:37 +00:00
Leander Beernaert
1035374040 Fix qdbusmarshall test
Fix target name for qdbushmarshall and fix missing include paths and
unresolved symbols.

Change-Id: I770e190e33d1de9b9d95ee92e63d868e2337c322
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-17 13:25:28 +00:00
Edward Welbourne
1d8c9978fa QDateTime docs: don't encourage use of deprecated textdate functions
The textdate API methods are deprecated in favor of QLocale; so
suggest use of QLocale in place of them.  Don't credit the deprecated
methods as being used where they aren't.

Change-Id: I0abcb1f69729760ae1b86cb8088e4158c0ad6010
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io>
2019-07-17 14:25:13 +02:00
Qt Forward Merge Bot
eb9c5fd4f9 Merge "Merge remote-tracking branch 'origin/5.13' into dev" 2019-07-17 11:47:20 +02:00
Mårten Nordheim
19e45ee4c1 Win: qnetconmon: Use CoInitialize instead of CoInitializeEx
Somehow I didn't test using QNetwork{Status,Connection}Monitor together
with Gui. In qwindowstheme.cpp we call CoInitialize and as such we
cannot use CoInitializeEx with a different thread mode.

Change-Id: If4a4441cc2616371d8b7cda72cfad11187d8f153
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-07-17 11:42:46 +02:00
Qt Forward Merge Bot
64df0eda36 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/global/qlogging.cpp
	src/gui/painting/qtextureglyphcache_p.h
	src/gui/text/qfontengine.cpp
	src/widgets/widgets/qlineedit.cpp

Change-Id: Ic8798538df466b7141caa8bbf1fb7605eb56be37
2019-07-17 10:44:21 +02:00
Tor Arne Vestbø
d224c762bc macOS: Use correct virtual screen when resolving GL surface format
Change-Id: I8288db85c8e99bf9fccfcfbca7f9e3594d00fa48
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-07-17 09:56:15 +02:00
Tor Arne Vestbø
d2e4bde5d0 macOS: Use lambdas instead of Obj-C categories for GL helper functions
Allows us to reference captured variables and keeps the function
local to where it's used.

Change-Id: I609892888720202021862d26a74ceb50e232f356
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-07-17 09:55:57 +02:00
Tor Arne Vestbø
7a7fe9dbb3 macOS: Move QCocoaGLContext initialization into dedicated method
Change-Id: I9dc2c400c3d26e9fcfaac04b61c1503229f59dba
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-07-17 09:55:31 +02:00
Tor Arne Vestbø
e0a486c77d Tie QPlatformOpenGLContext to its QOpenGLContext before initializing
So that the context can be referenced during initialization.

Change-Id: I9ec69b2431ba1ac6256cb2e969a76f515497e247
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-07-17 09:00:57 +02:00
Thiago Macieira
6bd35e4708 Work around Apple Clang's -Wshadow warning
Well, yeah, it technically does...

 qcborstream.h:245:15: warning: declaration shadows a typedef in the global namespace [-Wshadow]
 /usr/include/libkern/OSTypes.h:36:26: note: previous declaration is here

Fixes: QTBUG-75825
Change-Id: Idce141629dd34287808bfffd159ee2a75428bf12
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-16 21:13:45 -07:00
Thiago Macieira
d80bd2f548 QResource: deprecate isCompressed()
Current codebases assume isCompressed() implies ZlibCompression, since
there was no compressionAlgorithm() getter. In order to force codebases
to change, deprecate isCompressed() and force handling of the algorithm.

The replacement API is being introduced in 5.14, which is why the
warning is being emitted in 5.15 only.

Change-Id: Ief874765cd7b43798de3fffd15a9f5d978951ea5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-16 22:36:27 -03:00
Thiago Macieira
a5da01c044 Remove useless null pointer checks
Cache can't be null, since it's a member of an extant object.

Change-Id: Id98140e1c2f0426cabbefffd157ed3cdd62a8bba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-07-16 17:34:56 -08:00
Thiago Macieira
9b8493314d Qt6: Fix uninitialized meta objects on Windows
Windows has a problem relating to cross-DLL variable relocations: they
are not supported. Since QMetaObject's link to the parent class is done
via a pointer, every QMetaObject in a DLL or in the EXE that derives
from a class from another DLL (such as QObject) will be dynamically
initialized.

This commit changes the meta object pointers in QMetaObject::d from raw
pointers to a wrapper class SuperData, which is almost entirely source-
compatible with the pointer itself. On all systems except for Windows
with Qt 6, it's binary compatible with the current implementation.

But for Windows with Qt 6, this commit will store both the raw pointer
and a pointer to a function that returns the QMetaObject, with one of
them non-null only. For all meta objects constructed by moc, we store
the function pointer, which allows the staticMetaObject to be statically
intialized. For dynamic meta objects (QMetaObjectBuilder, QtDBus, QtQml,
ActiveQt), we'll store the actual raw pointer.

[ChangeLog][QtCore][QMetaObject] Some internal members of the
QMetaObject class have changed types. Those members are not public API
and thus should not cause source incompatibilities.

The macro QT_NO_DATA_RELOCATION existed in Qt 4 but was called
Q_NO_DATA_RELOCATION and only applied to Symbian. It was removed in
commit 24a72c4efa ("qglobal: Remove
symbian specific features").

Task-number: QTBUG-38876
Fixes: QTBUG-69963
Change-Id: Id92f4a61915b49ddaee6fffd14ae1cf615525e92
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-16 18:34:41 -07:00
Thiago Macieira
8abbbb4c48 Fix regression causing QVector::fill w/ same size to not detach
Caused by commit 01301b0b34, which made
vector.resize(vector.size()) not to detach, which was used by fill() and
assumed that detaching happened. The test does not test the resize()
behavior, only that fill() is not broken anymore.

[ChangeLog][QtCore][QVector] Fixed a regression that caused fill() not
to detach, corrupting shared copies.

Fixes: QTBUG-77058
Change-Id: I6aed4df6a12e43c3ac8efffd15b1b527a8007bf3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-07-16 18:09:51 -07:00
Friedemann Kleint
05bb156aaa Windows QPA: Fix emitting of QScreen's changed signals
When changing the primary screen, the various changed signals of
QScreen were out of order. Most notably, the wrong DPI value was
emitted since QGuiApplicationPrivate::processScreenGeometryChange()
checks and emits DPI and orientation as well. Rearrange the code to
assign new the values and emit DPI first.

Task-number: QTBUG-76902
Change-Id: If4037108391c36ab3a8bfcb9b2989d5bea41202f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-07-16 22:07:11 +02:00
Marc Mutz
8b34296e6a Fix more implicit QAtomic<T> <-> T conversions
These were hidden in !QT_CONFIG(thread) code. The irony!

This patch does not change the semantics of the operations. It
just makes the implicit operations explicit.

Any fixes or optimizations are left for follow-up patches, if any.

Change-Id: I014eb71745532dae2efe7963aa87321f61b1bd7a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-07-16 10:37:30 +00:00
Marc Mutz
c563e5b3c7 QWasmEventTranslator: replace five QHash with constexpr C arrays
The mapping is static, but a dynamic (even mutable) container was
used.

Fix by using C tables and liner scan, which will be just as fast or
faster than a hash lookup, for the maximum of six entries of each
table.

Change-Id: I899d5b1428dc82cf58862f238595a266aef8279f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-07-16 12:37:18 +02:00
Marc Mutz
aeaf5d87ed QAbstractItemModel: don't inherit QHash just to add elements
Now that we can depend on C++11, use _WITH_ARGS and std::initializer_list.

Saves ~400B in text size on optimized AMD64 GCC 9.1 Linux LTO builds.

Change-Id: I37fce1c63a5f74f6dfc059febf0152ac93c8be7f
Reviewed-by: David Faure <david.faure@kdab.com>
2019-07-16 12:36:26 +02:00
Leander Beernaert
ec1546afc4 Handle TESTDATA for Qt Tests
These changes enable the support to handle test data and install or
package them as resources when appropriate.

This change does not handle the GENERATED_TESTDATA or
TEST_HELPER_INSTALLS since there are very few occurrences of these and
we can handle those as special cases.

Finally, in add_qt_test, only append CMAKE_CURRENT_SOURCE_DIR if
the path is not absolute.

Change-Id: Ic20b9749d10e2a09916f2797606116471c64850b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-16 06:48:56 +00:00
Paul Wicking
4f26f05869 Doc: Add trailing "." to all \brief commands in QLineEdit
Minor housekeeping.

Task-number: QTBUG-77063
Change-Id: I9c04dd4220c0c2ad2afa51f88df197f5992752ff
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-07-16 08:16:24 +02:00
Marc Mutz
c5d6b263c2 QProcessEnvironment: simplify locking
The mutex is only protecting 'nameMap'. Proof: it's only defined on
platforms on which there is a 'nameMap'. Also, nothing else is
mutable, so no lazy init going on here.

So, drop all the mutex protection, except where we access 'nameMap',
and draw the mutex as close as possible to the nameMap uses, iow: copy
ctor, prepareName() and nameToString().

As a consequence, the old (Ordered)MutexLocker class only needs to be
defined on Unix.

Change-Id: Ic969313bc48ad7ebf24c5dca7fd48359956b048d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-07-16 07:18:23 +02:00
Timur Pocheptsov
7a61cb46e6 tst_http2::flowControlServerSide
fix the bloody test for good - the idea to have a shared QNAM (shared
by test cases in this test) was somewhat wrong to start with.

Fixes: QTBUG-77053
Change-Id: I5755e96ec988e2dd546f527f3f902fc43914b0b7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-07-15 16:17:16 +02:00