Commit Graph

38208 Commits

Author SHA1 Message Date
Joerg Bornemann
29d5a287ab Make the Makefile a dependency of default targets for nmake
If the user changes the .pro file, the Makefile is supposed to be
re-generated by calling qmake again. NMake however lacks a "Makefile
remake feature" like GNU make has.

The generated Makefiles for nmake however have already a proper
Makefile target that can be used to re-generate the Makefile. What was
missing is the dependency from an entry-target in the meta-Makefile.

Now changes in the .pro file trigger a re-generation of
Makefile.Debug/Makefile.Release when calling nmake without target
arguments or with "debug" or "release".

Fixes: QTBUG-29193
Change-Id: I9f2dd5deba4a043ab6c9502bb0b0ba83dc843612
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-02-04 08:10:25 +00:00
Yuhang Zhao
3bf895c8d5 qtmain_win.cpp: Remove unused header files
1. Removed all Qt header files and make it a pure win32 project because it doesn't use any Qt features.
2. According to MSDN, CommandLineToArgvW is in shellapi.h, so replace ShlObj.h with it.

Change-Id: I3daacb97f34664ac36f8e887a2c31d38f611b16e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-02-04 01:58:42 +00:00
Yuhang Zhao
aea357c6bd qtmain_win.cpp: Improve coding style
Change-Id: I08c722f4ff8a088d13af5b7d9cfbc88258d533ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-02-03 12:23:04 +00:00
Yuhang Zhao
fd1ebef13e qtmain_win.cpp: Replace NULL with nullptr
Change-Id: I727a07a3c56c97cf6f18929b2440f49f0cbb860d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-02-03 06:43:34 +00:00
Liang Qi
6666201a02 tests: require widgets explicitly
Task-number: QTQAINFRA-1975
Change-Id: I5ba4e230322dc0dbd063b48cadf9e4f96e0dc140
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2019-02-01 21:45:50 +00:00
Thiago Macieira
188eea0eb4 Fix race condition in getting the system locale data
QSharedDataPointer obeys the regular Qt container thread-safety rules:
it's thread-safe in const methods but not in mutating ones. QSDP::data()
is mutating, which causes a data race. For example, if the contained
QLocalePrivate has a refcount of 2 and two threads see that, both
threads will try to detach and then replace the pointer, but that
pointer replacement is not atomic.

Using QExplicitSharedDataPointer makes the race go away, since data() is
now non-mutating. QESDP is used only to destroy the QLocalePrivate on
program shutdown.

Note that there are still race conditions relating to *updating* the
locale private.

Fixes: QTBUG-73403
Change-Id: Id98140e1c2f0426cabbefffd157ed6ec30a3e08f
Reviewed-by: Thomas Sondergaard <thomas@sondergaard.cc>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-02-01 20:53:34 +00:00
Edward Welbourne
d84912838c Add some missing expected_*.tap files for the testlib selftest
Only for tests that have existing expected_*.* files for other
formats, though.

Change-Id: I34ca1900d88454f300e04d849a608c378009489b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-02-01 14:42:23 +00:00
Timur Pocheptsov
c306fdff77 http2: skip content-length for content-encoding: gzip/deflate
The protocol handler now matches HTTP/1.1's protocol handler.

Change-Id: Id55c10900e2bcd46e5dc65c63db77097eb4818b6
Fixes: QTBUG-73364
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-02-01 14:32:12 +00:00
BogDan Vatra
72b9574227 Remove "/data/local/tmp/qt/" support
Google removed this support long tima ago, also we removed it from QtCreator.

Change-Id: I326da09e9e57f655eecfd1f25f39b4bd9c6784d1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-01-31 16:10:39 +00:00
Allan Sandfeld Jensen
4513cf47f1 Fix merge mistake in 'Avoid picking worse formats when ...'
When spliting the patch the edit become an addition instead.

Task-number: QTBUG-72785
Change-Id: I92105d0e23e9b8426228f4202d46fa41f928fb94
Reviewed-by: Christian Andersen <csandersen3@gmail.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-01-31 15:18:45 +00:00
Albert Astals Cid
50447bb7a3 Initialize bit_depth
==12==WARNING: MemorySanitizer: use-of-uninitialized-value
   #0 0x6b90ea in setup_qt /src/qtbase/src/gui/image/qpnghandler.cpp:360:32

Change-Id: Idf04130e645dcf589dfb6260661be18a71b7bdc2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-01-31 12:08:34 +00:00
Edward Welbourne
e352ec4db4 Q(Date|Time)+::toString: correct account of format specifiers
Where non-format characters appear in the format string, they are not
"ignored" as claimed; they are passed through verbatim.  Formats
without separators between fields are in fact supported, although
results may be ambiguous.  Cleaned up phrasing in the process.

Fixes: QTBUG-51208
Change-Id: I7284a36c48aa0be29deaa16945ca0212e9e6f72c
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-31 12:07:41 +00:00
Edward Welbourne
7dd41b3267 generate_expected_output.py: placate FutureWarning from python
Regexes have long specified that a [ as the first character inside a
[...] is just a literal [, but apparently we need to escape it now, to
avoid a "nested set" FutureWarning.

Change-Id: I76a48c9aafb0684a1d6b0d5284fe9852c9ea0e43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2019-01-31 12:07:20 +00:00
Allan Sandfeld Jensen
fcba9fa861 Fix regression in QPlainTextEdit updating
It was incorrectly counting a block having more than one line as having
changed visibility.

Fixes: QTBUG-69310
Change-Id: I502cda1d3e8a4efb1c14122353cc0a4731d8581c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-01-31 11:59:23 +00:00
Eskil Abrahamsen Blomfeldt
02280535be Update bundled Freetype to 2.9.1
This is required to support the new emoji font on Android 9.

[ChangeLog][Freetype] Upgraded bundled Freetype version to 2.9.1.
This also adds support for the latest emoji font in use on
Android 9.

Fixes: QTBUG-70657
Change-Id: I99be72f0d23c20aca122b8fdadd4ded87b2edce1
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2019-01-31 10:40:41 +00:00
André Klitzing
93a803a6de Fix session resumption with OpenSSL 1.1
OpenSSL 1.1.0 and higher requires SSL_shutdown to mark a
session as resumable.

QHttpNetworkConnection/Channel tries to re-use one shared SSL
context (and the session) for its 'channels'. The session is
marked as non-resumable without shutdown sent/received.
This makes it useless for QHttpNetworkConnection.

See: https://github.com/openssl/openssl/issues/1550
Fixes: QTBUG-71967
Change-Id: Iaaceb18c4c5a090f997f9850981a27f04f1f8b06
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-01-31 10:36:50 +00:00
Timur Pocheptsov
8915904e2a QMacStyle - fix a weird NSBox geometry
For some reason, displayRectIgnoringOpacity renders NSBox with a
smaller height than we asked. So let's ask for more and translate.

Change-Id: I6e03ad99d1ccf746c89d58dd37d53d0087f15282
Fixes: QTBUG-71741
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-31 04:43:51 +00:00
Allan Sandfeld Jensen
d8d2025f06 Avoid picking worse formats when matching compatible formats
Like we do with fully matching format, pick the first matching one,
instead of the last matching one.

Fixes: QTBUG-72785
Change-Id: I466e0152a229348b6a3786d5464d1f8ab325d67a
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-01-30 23:17:05 +00:00
Jesus Fernandez
9501e92841 Replace executedQuery when executing a new query
Only the first successful query was stored in the variable. When a new
query is executed the function QSqlResult::setActive was not replacing
the last executed query.

Fixes: QTBUG-28883
Change-Id: Ib4938c42e6264f9edd0764b4a392da7988f68fc0
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-01-30 23:08:04 +00:00
Christian Ehrlicher
0bde49bd92 QPictureIO::read(): don't work on dangling pointer
QPictureIO::read() is using pictureFormat() when the format has to be
guessed. pictureFormat() returns a QByteArray which was implicit
casted into a char* and then pointed to uninitialized memory.
Fix it by using a QByteArray instead a plain char*.

Change-Id: If9ae286ed68134af597f0b0c779789e40f9efaed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-30 17:38:25 +00:00
Albert Astals Cid
f383fa4b9c png: initialize color_type to 0
Fixes
==12==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x6b8179 in setup_qt /src/qtbase/src/gui/image/qpnghandler.cpp:247:9
on fuzzed file

Change-Id: I772d536a0db91665dc16e94751ef507de1064376
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-01-30 10:13:27 +00:00
Tony Sarajärvi
5d885c8325 Blacklist qtimer/basic_chrono on macos due to flakiness
Task-number: QTBUG-73168
Change-Id: I56b45b7f474bdad73f6cd8514b42475e6107b6be
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-01-30 10:10:19 +00:00
Tony Sarajärvi
49ca66583a Expand blacklisting of qthreadpool to cover linux distros
Task-number: QTBUG-38594
Change-Id: I07dccf8ac6ab07e61ddf6090037ea344449724f8
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2019-01-30 10:10:17 +00:00
Allan Sandfeld Jensen
744be250bf Fix building offscreen QPA with Qt XCB
Only builds without XCB or with system XCB

Change-Id: I1161c5b78c92308ac63c2e2907b9a5d8477ab2f0
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-01-29 21:33:31 +00:00
Lars Schmertmann
aa98e6eabe Add a string to the Android manifest to fix a lint warning
Unused resources
----------------
Unused resources make applications larger and slow down builds.

Amends e3689949ba. The string
was introduced there but not added to the manifest.

Task-number: QTBUG-72895
Change-Id: Id07e02074feb15ace2c99e6ace51d8fe407877fa
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-01-29 20:08:46 +00:00
Morten Johan Sørvig
a4767bb9e0 Wasm: remove debug output.
Change-Id: Ieb9c06203626854f9b7c561563c3261510230803
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-01-29 18:52:03 +00:00
Morten Johan Sørvig
64e8e69d25 Cocoa: Don’t cache accessibility role
The object role may in some cases (e.g. when using
Qt Quick Loaders) be changed after construction, and
we don’t have RoleChanged events.

Change-Id: Idb246c1c1206221cacd93c83cbd07a0e3d98cb0e
Fixes: QTBUG-72967
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-01-29 18:39:31 +00:00
Jesus Fernandez
70b3e1fcc5 Fix unused parameters
Change-Id: Iafad6313fcf74e42c11628ce9ee0f797abfcb6ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-29 18:15:21 +00:00
Eskil Abrahamsen Blomfeldt
4514cf27b2 Fix default font properties when using raw fonts for text layouts
When a QRawFont is set explicitly on the layout, we would get certain
font properties from the QTextCharFormat instead. But when the properties
had not been set on the QTextCharFormat, we would get the default values
which were always 0/false, not the actual default values used in QFont.

Instead, we calculate a QFont query based on the format and use the
properties from this. This will give us the correct default values
in the cases where they are not overridden.

Change-Id: I53e5103739164c3d9eafaf76fcb4e8bda57bd12a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-01-29 17:36:24 +00:00
Oliver Wolff
9906cc57ed testlib: Add BXPASS and BXFAIL
Prioritize blacklisting over QEXPECT_FAIL so that a test that is
blacklisted no longer fails if QEXPECT_FAIL returns true unexpectedly. To
reflect this state properly, the two values of BXPASS and BXFAIL were
added to testlib's output.

[ChangeLog][Important Behavior Changes][QtTestLib] Blacklisting of tests
will be taken into account for XPASS and XFAIL. A blacklisted test that
causes an XPASS will no longer be a fail.

Task-number: QTBUG-72928
Change-Id: Ia2232fdc714d405fa3fd9aea6c89eb2836bc5950
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-29 12:18:15 +00:00
Nico Vertriest
3615e8aaa1 Doc: Correct minor link issue in qwidget.cpp
Change-Id: I3b69a18c65b75f3e0014a12284904af208ef058d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2019-01-29 11:49:42 +00:00
David Edmundson
6abed98e87 Fixups for GL_CONTEXT_LOST in QOpenGLExtensionMatcher
Fixes the rest of the places we use the pattern of emptying the OpenGL
error stack to be able to handle GL_CONTEXT_LOST.

Change-Id: Ic45024fc6df84d70d60c48831fa586f889af0c0b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-29 11:15:24 +00:00
Tor Arne Vestbø
cf53ed97a1 macOS: Apply alpha channel to surface format even when non-default
Relying on QSurfaceFormat() to check whether or not we should set
the alpha channel size makes it impossible to tweak other properties
of the surface format without also having to set the alpha. There's
no need to do such as broad comparison, we can check the alpha channel
size for its default value instead.

Change-Id: Iac31d37c9460eb3e7ec5ee15902f7e5addb48178
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-01-29 11:12:41 +00:00
Tor Arne Vestbø
5d181961ea macOS: Don't check for stale SDK unless target needs to be remade
Also catches some more variants of SDK mismatch, such as Xcode not
being installed at all, or the SDK missing.

Change-Id: I184aaa571ef0ea722ca64c54f665462dabc17533
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-29 11:08:31 +00:00
Tor Arne Vestbø
775b5e2631 Remove requirement to lock graphics buffer before getting total size
QPlatformGraphicsBuffer::byteCount() shouldn't need locking unless
bytesPerLine() is implemented in a way that requires it, in which
case the assert should be in the subclass.

Change-Id: I0fdb04c0a3ab042408d6d17b2759509853573d16
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-29 11:06:28 +00:00
Joerg Bornemann
c2b0bca984 configure: Respect -continue in qtConfParseCommandLine
If configure is called with -continue, it should not stop processing
command line arguments after encountering an invalid one.

Example:
  configure ... -continue -quack -no-feature-gui
would ignore everything after -quack.

Change-Id: Ia5f0cb13414c9c0c7246ff0c72f8e935fe6dca3c
Fixes: QTBUG-72912
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-01-29 10:51:19 +00:00
Joerg Bornemann
11ae0e772c Consume the -skip option in qtbase/configure
...and yield a warning that -skip has no effect in a qtbase build.

This is consistent with configure's help output and enables us to
always pass "-skip qtwhatnot", whether we're calling top-level or
qtbase configure.

Change-Id: Ie5b0791a6000d1d78b1367658ad86a92b2ec6a6a
Fixes: QTBUG-71253
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-01-29 10:51:10 +00:00
Kai Koehne
44cf8cea8e QtOpenGL: Unify license headers
Change-Id: Ia25b8f9833bd3d941ef73dcc7c6590063fe65329
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-01-29 10:41:46 +00:00
Kai Koehne
ee561f6fbc QtConcurrent: Unify license headers
Change-Id: I9492ca18805c9663d48820424557595b8bc7eaa0
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-01-29 10:41:39 +00:00
Kai Koehne
6358f8e302 QtGui: Unify license headers
Change-Id: I0a2553b95b099fdfa83d42e71bdf9a192a6588c7
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-01-29 10:41:31 +00:00
Friedemann Kleint
61d50cbc96 Windows/Direct2d QPA: Use nullptr
Change-Id: I6ce01caa58de78e0eb61e243ee1e7b05cc1f5568
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-01-28 21:14:58 +00:00
Andre de la Rocha
850858cce6 Windows QPA: handle pointer messages received during a drag and drop
It seems the pointer message handler was skipping the handling of touch
and pen messages during a drag and drop operation, preventing the
generation of events that quick was expecting and triggering a crash
inside MouseArea.

Fixes: QTBUG-73120
Change-Id: I2921e38dd7e44846607e6c614d7393cfa5664c69
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-01-28 16:42:30 +00:00
Morten Johan Sørvig
3a9240428c Wasm: disable resources_big
Errors out with “No data signature found”.

Change-Id: Ia9a38e8c71aef4e090494ed4754f4c14e913b092
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
2019-01-28 16:06:39 +00:00
Andy Shaw
cf184f1dd4 Android: If there is no surrounding text then don't try to delete it
If there is no surrounding text then we can save time by not sending an
event to delete it as there is nothing to be deleted. This prevents the
underlying widget from being confused as to where the cursor and anchor
is later on when entering in new text.

Fixes: QTBUG-65584
Change-Id: Ic6325c119327048dffd2baa68520871fb56370d5
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-01-28 15:26:33 +00:00
Andy Shaw
f92ca83230 Don't enable the input method for the QListView in a QInputDialog
As the listview in an input dialog is only used for selecting the entry
in place of a combobox, then we should prevent the input method from
being enabled. This ensures that it does not show an invalid text
cursor on devices like iOS and Android.

Change-Id: Ifb854e509573ec2d63d4cbcfa61335ae5b251ab5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-01-28 15:26:27 +00:00
Kai Koehne
112278d3d7 Avoid test failures in tst_qtimezone.cpp and Windows 10 1809
The test started to fail now also for latest Windows 10 Update
Restone 2. It's unclear why the test was succeeding before, since this
seems a generic Windows API issue.

Task-number: QTBUG-64985
Task-number: QTQAINFRA-2255
Change-Id: I804f6a61c63ea70157353d1aee9027d0735073ab
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-28 15:02:52 +00:00
Joni Poikelin
9bbeb7e6e8 Prevent QPixmap::load from touching QPixmapCache in non-gui threads
Change-Id: Ied0fec48c81298743f694f317dd60e58d356f69a
Fixes: QTBUG-72523
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-01-28 14:52:57 +00:00
Mikhail Svetkin
3b514f8535 qtlite: Fix build libs with -no-feature-regularexpression
Change-Id: I427ff1f8f4986fbf466aba60a9d3de614c1e006f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-01-27 21:01:53 +00:00
Friedemann Kleint
fc585d3821 Add doc note about Qt::MSWindowsFixedSizeDialogHint and High DPI
Add a note explaining that it should not be used in multi-monitor
environments.

Task-number: QTBUG-73232
Change-Id: I7b61cef74eac4082efe849b3d5bdbbe5f04fcdbb
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-27 20:54:01 +00:00
Friedemann Kleint
5557b69304 QColorDialog: Remove flag Qt::MSWindowsFixedSizeDialogHint
The flag causes issues with High DPI scaling (the OS maintains
the size in device pixels when moving across screens).

It does not really make a difference (apart from the resize handle
appearing) since the dialog uses QLayout::SetFixedSize.

Fixes: QTBUG-73232
Change-Id: Iad08427796890582ac05758678d24e3cd707e669
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-01-27 20:53:49 +00:00