Commit Graph

41309 Commits

Author SHA1 Message Date
Marc Mutz
6eaa1d07e1 Eliminate the last QList<QPoint> in QtBase production code
QList<QPoint> is horribly inefficient™ (on 32-bit platforms).

Fix by using a QVector instead.

Change-Id: Id85cb71404f329049c3e9997e51113035569e1b4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-13 10:47:24 +02:00
Marc Mutz
319c478603 QReadWriteLock: replace (QWaitCondition, QMutex) with std::(condition_variable, mutex)
It turns out that QWaitCondition is a std::condition_variable_any. The
_any variant works with any mutex type, but requires a native mutex
for the native condition variable. So, QWaitCondition and
std::condition_variable_any both require two different mutexes: the
one the user passes in, and an internal one.

std::condition_variable, however, only works with std::mutex, and
since both are backed by the native API, condition_variable can use
the mutex passed in by the user instead of having to use an internal
one.

So, port from 2 × QWaitCondition + QMutex (2 × native cond + 2 ×
native mutex + Qt mutex) to std::condition_variable + std::mutex (2 ×
native cond + native mutex), shaving the overhead of two additional
mutexes (one Qt, one native) as well as the memory allocation
performed by QWaitCondition (for its Private).

Speeds up the writeOnly case by ~1/8th:

  PASS   : tst_QReadWriteLock::writeOnly(QReadWriteLock)
  RESULT : tst_QReadWriteLock::writeOnly():"QReadWriteLock":
  -   39,703 msecs per iteration (total: 39,703, iterations: 1)
  +   34,950 msecs per iteration (total: 34,950, iterations: 1)

Change-Id: I196cb13a27242fc1cb99723dfab5b2e5f8522143
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-09-13 10:47:20 +02:00
Marc Mutz
68b30a23a8 Port QReadWriteLock from QMutexLocker to qt_unique_lock
Most of these are unique_locks because they call QWaitCondition::wait()
and it doesn't feel right to use qt_scoped_lock if the lock is dropped
within the scope.

Change-Id: I506eede63008dad135c21112e578da4f7684e528
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-13 10:47:17 +02:00
Marc Mutz
351c738fc4 QPointer: some simplifications
- don't write explicit meta functions, use std::conditional
- = default the default ctor

The class is already not trivially-copyable, so making the default
ctor trivial doesn't change the ABI.

Change-Id: I8e35bbbb35973c9ff8fc48dfbfc10061de4bfd30
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-09-13 10:47:13 +02:00
Qt Forward Merge Bot
908e80d8bb Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-09-13 01:00:28 +02:00
Qt Forward Merge Bot
104f0535a1 Merge remote-tracking branch 'origin/5.13' into 5.14
Change-Id: Idcf8fc1d79bcd84b494d7f43308e6fe82d60e1a4
2019-09-13 01:00:15 +02:00
Shawn Rutledge
117175a2f2 macOS dark mode: set the link color
Fixes: QTBUG-71740
Change-Id: I49f49338c7f3a28845de63c2a6bf2dc8495dd108
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-12 23:54:05 +02:00
Christian Ehrlicher
16da0b2cf8 QTranslator doc: use QCoreApplication::installTranslator()
The example snippet was using app.installTranslator() even
installTranslator() is a static function. And since app is a
QApplication instead a QCoreApplication this could lead to the
assumption that a QTranslator can only be used for gui applications.
Therefore use the correct static invocation
QCoreApplication::installTranslator().

Change-Id: Ia3ce00f25230c2fe2bdc159ec14c88c961924651
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-12 23:54:02 +02:00
Laszlo Agocs
3d7207414b rhi: metal: Configure the layer's opaque property as appropriate
Task-number: QTBUG-78089
Change-Id: I6cd95e24d38562cf1931c107bb6b719e340583a8
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-12 16:28:42 +02:00
Laszlo Agocs
ef78a2e8f9 rhi: Add a flag to indicate preferring a software adapter
...if there is one and the concept is applicable in the first place.

Change-Id: Iab202c1c1cdd229f4910159de4cae7ce30805ea9
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-12 14:28:23 +00:00
Timur Pocheptsov
f59f67287f QNetworkRequest: deprecate SPDY-related attributes for 5.15
As they will be removed in Qt 6. Also, two H2-related attributes
will be replaced by the new ones with their names corrected.
Docs updated.

Change-Id: I14eeb5fc077a101ca5d177c9369a088bdcb8297e
Task-number: QTBUG-78255
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-12 15:20:43 +02:00
Marc Mutz
d9919f1852 QFutureInterface: clean up mutex() method for Qt 6
Ditch the QMutex *mutex() method that we had to keep around for binary
compatibility and drop the disambiguation argument of QMutex
&mutex(int) now that we don't need it anymore.

The lock_guard lines now look dangerously close to C++'s Most Vexing
Parse, so use braced initialization to make sure it's parsed as a
definition, not a declaration.

Change-Id: Ie3d70f58c9878ab6d7da8f8bd72a4cb4aff83bb7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-09-12 11:35:36 +00:00
Laszlo Agocs
8fef0ffc16 rhi: vulkan: Report device lost
Typically caught in vkQueueSubmit().

The WaitIdles that can be hit upon cleanup must be guarded by
!deviceLost because they inexplicably cause an infinite blocking
wait when the device was already reported as lost. (with NVIDIA
at least)

Change-Id: I7142e2461e1aed9ee3068b2b963cdf2c678ca4e0
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-12 12:40:30 +02:00
Laszlo Agocs
0616e14de0 rhi: Better handling of device loss
Starting with D3D11. The other backends will follow later.

Change-Id: I4f165c9f1743df0fb00bdce1e898917575bf5f6e
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-12 10:40:16 +00:00
Laszlo Agocs
d39d1a9e67 rhi: Clarify the swapchain alpha flag docs
Change-Id: Iff0edf0ae40b830af0209403d899def922e6088c
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-12 10:40:02 +00:00
Laszlo Agocs
6f592ea300 rhi: gl: Avoid crash when reading back the swapchain backbuffer
Change-Id: I9a632c06d8b9e666d99d0f135d3396d2de03f92a
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-12 12:39:57 +02:00
Laszlo Agocs
1fbe3c2316 rhi: d3d11: Fix enabling alpha compositing
Task-number: QTBUG-78089
Change-Id: I4e33665947debe007abcb976641e515224fa8451
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-12 12:39:46 +02:00
Laszlo Agocs
1c63605c10 rhi: Make the clang code model happy as much as we can
When interfacing with reality (i.e. native platform APIs provided in C,
ObjC, or COM), each of the APIs has its own idea of what types it likes
to use for sizes, points, rects, etc.

Out of the hundreds of warnings Qt Creator throws at us with the default
clang check level when opening one of the rhi backends not a single one
is useful. Regardless, let's try getting rid of what we can. This mostly
involves throwing in int/uint conversions in order to get the signedness
change warnings to shut up. The things that are either unacceptable to
change or are beyond our control are left untouched.

Change-Id: I6e4cb7cd373bf48dc990eaf83344242bbf30bd66
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-12 12:39:39 +02:00
Tor Arne Vestbø
d1486e2982 Simplify QColorSpacePrivate initialization
QColorVector and QColorMatrix are default-constructed following the
Qt philosophy of types always being well-defined. The corner-case where
we need uninitialized versions of these types for performance reasons
is handled explicitly.

Change-Id: I629334d1ffc63563ec9fd1298c623946e0799d1d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-12 12:39:33 +02:00
Laszlo Agocs
f567129bb5 rhi: d3d11: Add the device lost testing machinery
The device can be lost when physically removing the graphics adapter,
disabling the driver (Device Manager), upgrading/uninstalling the
graphics driver, and when it is reset due to an error.

Some of these can (and should) be tested manually, but the last
one has a convenient, programmatic way of triggering: by triggering
the timeout detection and recovery (TDR) of WDDM. A compute shader
with an infinite loop should trigger this after 2 seconds by default.

All tests in tests/manual/rhi can now be started with a --curse <count>
argument where <count> specifies the number of frames to render before
breaking the device. Qt Quick will get an environment variable with
similar semantics in a separate patch.

Change-Id: I4b6f8d977a15b5b89d686b3973965df6435810ae
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-12 12:39:12 +02:00
Timur Pocheptsov
447ee95d5e QHttpThreadDelegate - remove unneeded code
Found while cleaning up SPDY remains: I've noticed that for H2 case
I never check if incomingSslConfiguration is nullptr or not, but
the code several lines below - does it, which looks kind of moronic.
This configuration is initialized when the delegate is created, so
no need to have this if-statement. Instead, assert, making this
behavior a requirement.

Change-Id: I90fb84337be925a3288252aa2491b4c23d6c6cbb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-12 11:15:31 +02:00
Marc Mutz
08ad96404b QCoreApplication: work towards replacing a QRecursiveMutex with a QMutex
At first glance, libraryPathMutex is only recursive because
setLibraryPaths(), addLibraryPath() and removeLibraryPath(), all of
which lock libraryPathMutex, may call libraryPaths(), which does, too.

This is easily fixed by splitting libraryPaths() into public
libraryPaths() and private libraryPathsLocked(), the latter expecting
to be called with the libraryPathMutex already held. And this is what
this patch does.

However, on second glance, the building of the initial app_libpaths
calls a monstrous amount of code, incl. QLibraryInfo, and some of
that code probably re-enters one of the library-path functions.

So while this patch is a step towards making libraryPathMutex
non-recursive, it's probably not the end.

Change-Id: I3ed83272ace6966980cf8e1db877f24c89789da3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-09-12 04:38:52 +00:00
Marc Mutz
333b1e9229 QReadWriteLock: add a check for writeOnly, too
Results on my machine:

  PASS   : tst_QReadWriteLock::writeOnly(QMutex)
  RESULT : tst_QReadWriteLock::writeOnly():QMutex:
     3,607 msecs per iteration (total: 3,607, iterations: 1)
  PASS   : tst_QReadWriteLock::writeOnly(QReadWriteLock)
  RESULT : tst_QReadWriteLock::writeOnly():QReadWriteLock:
     39,703 msecs per iteration (total: 39,703, iterations: 1)
  PASS   : tst_QReadWriteLock::writeOnly(std::mutex)
  RESULT : tst_QReadWriteLock::writeOnly():std::mutex:
     3,697 msecs per iteration (total: 3,697, iterations: 1)
  PASS   : tst_QReadWriteLock::writeOnly(std::shared_mutex)
  RESULT : tst_QReadWriteLock::writeOnly():std::shared_mutex:
     5,727 msecs per iteration (total: 5,727, iterations: 1)
  PASS   : tst_QReadWriteLock::writeOnly(std::shared_timed_mutex)
  RESULT : tst_QReadWriteLock::writeOnly():std::shared_timed_mutex:
     5,921 msecs per iteration (total: 5,921, iterations: 1)

(the 'nothing' test of course doesn't work with writing, as writing to
the same QString from different threads is UB)

Change-Id: Ia78b54963a51eaf6563ce0d243316a3337056a83
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-12 06:38:42 +02:00
Marc Mutz
0f219d2054 QReadWriteLock: use NSDMI to simplify the Private ctor
Change-Id: I7267dedb152186ad8c74cbf2eddd863c3bc0845f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-12 06:38:35 +02:00
Marc Mutz
e8bca8e763 QtGui: replace some QMutexLockers with (new) qt_{scoped,unique}_lock()
In QImageReader, also replace a QMutex with a QBasicMutex, making the
code similar to the corresponding code in QPicture.

Change-Id: Ia1cd546eccd3662837762e506235e350b7a08647
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-12 06:38:30 +02:00
Marc Mutz
72259e7186 Brush up QReadWriteLock benchmark
- add override
- tests C++17 shared_mutex in addition to C++14 shared_timed_mutex
- replace manual memory management with unique_ptr

Change-Id: If52df2097a4b92c10df4a7cdbb1c506d64b673e3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-12 06:38:23 +02:00
Andy Shaw
137cbd1c72 Cocoa: Set the accepted action to be the one from the response
By setting the accepted action to be the one from the response it will
enable the user to set the drop action in their code and this will be
reflected at the platform level.

Change-Id: I7b9459b228c00ef01d91649b3405316729713164
Fixes: QTBUG-77427
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-12 05:39:26 +02:00
Christian Ehrlicher
3fede6cb54 Cleanup QtWidgets (tools) examples
Cleanup QtWidgets tools examples:
 - use member-init (clang-tidy)
 - fix includes/don't include QtWidgets globally
 - include own header first
 - use nullptr (clang-tidy)
 - avoid c-style casts
 - use QVector instead QList
 - use QItemDelegate instead QStyledItemDelegate

Change-Id: Ibe9440cdf711e5cc2138c054864edebe1fc95731
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-09-11 20:36:17 +02:00
Allan Sandfeld Jensen
bc34784d05 Handle robustness with OpenGL < 4.0
We need to have the right idea of robustness, so check for extension.

Fixes: QTBUG-78107
Change-Id: I26987269e5c50bee20e2e3cc6d75f91a6c9af25e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-11 10:25:27 +02:00
Shawn Rutledge
78437ef0d2 Add qt.core.filesystemwatcher logging category
QFileSystemWatcher has open bugs, so users should be able to help
troubleshoot.

Change-Id: I6b703e25f294944469d20fd36012b6a55133732a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-11 10:02:37 +02:00
Timur Pocheptsov
0fd6595d5e Add a missing ConnectionTypeHttp2Direct in several if statements
Found while preparing SPDY retirement.

Change-Id: I30f923fdeb0f6f0b5e808a3e7b7d81ddb9c4ef12
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-11 05:16:18 +02:00
Qt Forward Merge Bot
0131462861 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-09-11 01:00:20 +02:00
Qt Forward Merge Bot
dc4ecf0641 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ie69d40d2efc5559b31e28ba71f88e3cda741e051
2019-09-11 01:00:09 +02:00
Alexandru Croitor
be21ff11b7 CMake: Fix usage of debug frameworks on macOS
If an app wants use a debug framework of Qt, it is still expected that
the app should link against the release version, and just set
DYLD_IMAGE_SUFFIX=_debug when running the app.

This was not the case before, where the CMake Config files told CMake
to link explicitly against the debug libraries. This caused crashes
due to the Qt plugin loader mechanism still trying to find a release
platform plugin, which in turn would load release libraries, and thus
the application would end up loading both debug and release plugins.

Make sure the Config files in a framework case always reference the
release libraries (even though this might be counter intuitive).
Otherwise users of the Debug Config files would always get
crashes.

Fixes: QTBUG-78131
Change-Id: I88b1dc421477ad186012ca67b328a891128eb568
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-10 16:48:47 +02:00
Friedemann Kleint
66a4001fa2 Fix qdoc warnings
src/corelib/global/qnamespace.qdoc:3279: (qdoc) warning: Can't link to 'QGuiApplication::setHighDdpiScaleFactorRoundingPolicy()'
src/corelib/time/qislamiccivilcalendar.cpp:49: (qdoc) warning: Can't link to 'QJijriCalendar'
src/network/ssl/qsslsocket.cpp:1510: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()'
src/network/access/qhttp2configuration.cpp:49: (qdoc) warning: '\brief' statement does not end with a full stop.
src/gui/text/qtextformat.cpp:532: (qdoc) warning: Undocumented enum item 'TableBorderCollapse' in QTextFormat::Property
src/gui/text/qtextdocument.cpp:2066: (qdoc) warning: Undocumented enum item 'UnknownResource' in QTextDocument::ResourceType
src/gui/kernel/qguiapplication.cpp:3500: (qdoc) warning: Undocumented parameter 'policy' in QGuiApplication::setHighDpiScaleFactorRoundingPolicy()

Change-Id: I3573ef98cf9b58d16525c356270fe009fdffcf45
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-09-10 13:57:06 +02:00
Christian Ehrlicher
f5f24731ec tst_QTableWidget: cleanup
Cleanup QTableWidget autotest:
 - use range-based for loops where possible
 - use nullptr
 - use member initialization
 - use new signal/slot syntax
 - remove a lot of C-style casts
 - use static invocations
 - use override
 - instantiate objects on stack instead of heap to avoid memleaks

Change-Id: I99ed144caab88d648d5ab987ce0963fbc6f1197d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-10 13:36:30 +02:00
Marc Mutz
b1698e9bc2 QWinRTUia*: remove anti-pattern passing new'ed QSharedPointer into lambdas
QSharedPointer is made for passing around by value. It is unclear why
in so many repeated cases a QSharedPointer is created on the stack,
then a copy of it is new'ed up, passed into a lambda to be deleted
inside it.

First, it requires an additional heap allocation. Because it's passed
as a raw pointer to QSharedPointer, however, there's also always the
danger that it's leaked by seemingly-innocuous changes such as adding
an early return from the lambda (and some of them could really use
one, with the ifs nesting several levels deep).

All this is not needed, though. It's perfectly ok to store a copy of a
QSharedPointer, by value, in a lambda, and keep one copy outside
it. Poor man's std::future, if you will.

So, do away with all that, just pass the shared pointer by value into
the lambda, and, as a drive-by, replace some ephemeral QLists with
QVLAs. In one case, replace a QPair<int, int> with a struct to make
the code using that type more accessible ('first' and 'second' are
really, really bad variable names if they, in fact, represent
'startOffset' and 'endOffset').

Also port directly to shared_ptr / make_shared. Saves one memory
allocation each, due to the co-allocation of payload and control
block, and even though there's QSharedPointer::create, which does
this, too, std::shared_ptr is simply much lighter on the use of
atomics (copying a QSP ups two ref counts, copying a std::shared_ptr
just one). Since these variables live behind the API boundary, there's
no reason not to prefer the more efficient alternative.

Change-Id: I4b9fe30e56df5106fc2ab7a0b55b2b8316cca5fe
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-10 12:51:51 +02:00
Friedemann Kleint
c0b3c06a7d QFileDialog: Fix volume name display on Windows
The volume names displayed did not match those of Windows
Explorer; for example "New Volume (X:)" would be displayed for
mapped network drives.

Replace GetVolumeInformation() and manual formatting by the
normal display name of IShellItem.

Fixes: QTBUG-78043
Change-Id: Ia742b7733e8ddc31e9506f15d90d065b985a111d
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
2019-09-10 12:47:49 +02:00
Sona Kurazyan
49362d064f Add a QSplashScreen constructor taking a QScreen
The constructor taking a QWidget is needed for specifying the screen
where the splash screen should be displayed.

Add a new constructor for specifying the target screen for the splash screen
directly, instead of "extracting" the screen information from a widget.
This removes the need for using the deprecated QDesktopWidget.

Deprecate the constructor taking a QWidget.

Task-number: QTBUG-76491
Change-Id: I1dde242ff5f7b53e52af308bb685f492d6266d33
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-10 07:34:03 +00:00
Frank Richter
e77877f207 Windows QPA: Also wrap DescribePixelFormat()
GDI and the software rendering opengl32sw.dll may have very different
pixel formats so use wglDescribePixelFormat() in that case. This mirrors
the existing behavior for SetPixelFormat().

Change-Id: I55e658ab69bad84bb10cc5a042d62e84c005c0e6
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-10 09:17:24 +02:00
Shawn Rutledge
648dac1ceb QMenu::popup(): don't change the menu's screen if called from exec()
Since b3fc5e1ea3,
topData()->initialScreenIndex has always been short-lived: it only
remembers the screen in case the widget parent is a QDesktopScreenWidget
(gotten from QDesktopWidget::screen()), only until the window is
created.  Then it is reset.  In the case of exec() we need to avoid
calling setScreen() twice, because that would set the screen once, then
forget which screen it was supposed to be on, then set the screen again
when exec() calls popup().  This is achieved by using the stored
eventLoop pointer to detect that popup() is being called from exec(),
and avoid calling setScreen() a second time in popup(), because exec()
already needed to call createWinId() before it created the event loop.

Amends 82da8306bc

Task-number: QTBUG-76162
Change-Id: I70da517b9d530630e59d103cb2a1ce11c897b2c8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
2019-09-10 08:54:45 +02:00
Mårten Nordheim
e5e8f1d67c Schannel: handle SEC_E_INCOMPLETE_DATA in acceptContext
It's not a failure state, we just need more data. It is handled properly
in other functions.

Change-Id: I9450a78c71a3f4fe9506a7a79de6efa2db08697c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-10 07:22:16 +02:00
Mårten Nordheim
97b9af1519 Schannel: unbreak renegotiation (and likely gracious shutdown)
The reason it wasn't working before was a couple of things:
1. Due to an extra 'else' it would not process the SEC_I_RENEGOTIATE
or SEC_I_CONTEXT_EXPIRED branch.
2. The peerCertVerified boolean was not only wrong, but also
broke renegotiation even if the 'else' wasn't there.

My previous attempt to fix it ended up being a noop, so:
Reverts e21fa577dd

Change-Id: Ifbad55d4bb066b7566bb88cead48e329cbd574f9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-09 22:19:47 +00:00
David Faure
e018d11600 Dpi settings: QT_SCREEN_SCALE_FACTORS enables scaling again
commit 900f2cb6f7 removed this from the condition, which breaks the
(common) case of having QT_AUTO_SCREEN_SCALE_FACTOR=0 and
QT_SCREEN_SCALE_FACTORS set. This used to obey the screen scale factors,
so it should still do so (despite the deprecation warning).
This is what the Plasma `kcmshell5 kscreen` module actually sets (via
startkde).

Change-Id: I5f4efed11b937498049ebf1b107954721cf54147
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-09-10 00:09:02 +02:00
Friedemann Kleint
8c41e25bea Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-09-09 19:03:43 +00:00
Christian Ehrlicher
5f570aa64d QComboBox: add documentation for textHighlighted/textActivated
The documentation for textHighlighted/textActivated was not added within
bdf1c4f671 so add it now.

Change-Id: Ifa7ad72af4490d4ce1d6de00d0963c0e76013f42
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-09 20:43:22 +02:00
Laszlo Agocs
7af6649e88 rhi: gl, metal, d3d: Reuse shader objects when source is the same
Now that Qt Quick's batch renderer misses one level of shader source
caching due to the nature of pipeline state objects, it can be useful
to keep and reuse shader objects when the hash of the source code
matches.

The goal here is to allow Qt Quick to be on par with what the direct
OpenGL path has when it comes to caching shader sources and compilation
results. The program binary disk cache is not in scope in this patch.

Also adds QRhi::releaseCachedResources(), similarly to what the scenegraph
has. This can be called to clear caches such as the shader object
cache we keep here.

Change-Id: Ie3d81d823f61fa65ec814439e882c498f7774d43
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-09 20:42:38 +02:00
Assam Boudjelthia
17032c4d64 Re-add tst_selftests "crashes old stdout txt" on QEMU
The test is not failing anymore on QEMU targets.

This partially reverts commit
71bd06d516.

Fixes: QTBUG-71915
Change-Id: I68593edf0ec245e14879833c8aa90661a3c2e227
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-09-09 11:19:38 +00:00
Friedemann Kleint
1d53b6d9f2 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp

Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
2019-09-09 07:51:49 +00:00
Frank Richter
82c6911d7d Windows QPA: Fix pixel format looping in describeFormats()
As per MSDN, pixel format indices are 1-based, not 0-based.

Change-Id: I6083144d3a95626e45bea21b50096b5f5f811c67
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-09 09:44:52 +02:00