Commit Graph

35265 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
34e8cafa29 Document the new qfloat16 functions with the other qfloat16 functions
Change-Id: I82d3fcda44a9a49d9027d865f8ed200134d0f79e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-24 21:13:08 +00:00
Allan Sandfeld Jensen
933eac9645 Correct since value of QNetworkRequest::Http2DirectAttribute
It did not make it into 5.10 as far as I can tell.

Change-Id: I01f950c476f2c98f4ed40d2cafd15ecc112a3427
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-24 21:12:59 +00:00
Gabriel de Dietrich
1e905927f0 QMacStyle: CE_Splitter is HITheme-free
Change-Id: I96a5ba5d685d1b8f95fd11489e4e95096d0fa9a4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-01-24 21:12:25 +00:00
Gabriel de Dietrich
86821094a9 QMacStyle: declare block in drawNSViewInRect() as noescape
Change-Id: Ida67a963ab62c6b974eceeaf9d386b941f357798
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-01-24 21:12:17 +00:00
Gabriel de Dietrich
0c974c0169 QMacStyle: PE_FrameLineEdit is HITheme-free
CT_LineEdit is as well, so that makes QLineEdit free
of HITheme APIs.

Change-Id: Ia02ce9f1003e5ae9c8bf47dab9ada030feca98ba
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-01-24 21:12:11 +00:00
Gabriel de Dietrich
ce60d9965e QFusionStyle: Properly draw frameless editable combo boxes
Change-Id: If0b6f15dc0a1de38edec5b360b1b8b698d6ad5b8
Task-number: QTBUG-65728
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-01-24 21:11:51 +00:00
Albert Astals Cid
ae3a65122f cups: Clear cups options at the start of QPrintPropertiesDialog::setupPrinter
For some reason the cups options are kept globally instead of per printer at QCupsPrintEnginePrivate
so when setting the printer options on accepting the print dialog, we first need to clear them
and then call the other functions that set them, otherwise, we will "reuse" cups option set on
the previous print.

How to reproduce:
 * Open print dialog, set some advanced option to a non default value, easiest one is print in grayscale
 * Print
 * Check it prints in grayscale
 * Open print dialog, check the advanced options are all on default values
 * Print
 * Check it incorrectly prints in grayscale

Change-Id: I59aacaf30db844ad40887d6b771f9354557852b6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-01-24 21:10:09 +00:00
Liang Qi
c7170915c7 Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10 2018-01-24 18:36:41 +00:00
Konstantin Tokarev
d2b2511f88 QNAM should prepend Host header to the header list instead of appending
When original QNetworkRequest is missing "Host" header (which is the most
common case), it is provided automatically from request URL. However,
resulting header is appended to the list, i.e. after all headers specified
by user, which may include a big bunch of cookies.

To the contrary, RFC 7230 suggests: "However, it is good practice to send
header fields that contain control data first, such as Host on requests
and Date on responses, so that implementations can decide when not to
handle a message as early as possible". Many other user agents are
following this suggestion.

Task-number: QTBUG-51557
Change-Id: I1448ed3ae124f5ce86a8ca8ff35f5d05476a005d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-01-24 16:54:49 +00:00
Alexis Jeandet
b40e0e7233 Add -DQT_{module}_LIB in pkg-config cflags for each Qt module
Build systems such as Meson heavily rely on pkg-config to get build
flags.
-DQT_{module}_LIB isn't exported in .pc files which makes Meson unable
to build some codes out of the box.

Change-Id: I806998f19f815e05a47b60129977e52587b38d47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-24 16:08:22 +00:00
Friedemann Kleint
95a08a711e Windows QPA: Suppress bogus resize events when using native menus
Account for the (not yet created) native menu height when handling
the initial resize message.

Complements 7849aa6e96.

Task-number: QTBUG-65917
Task-number: QTBUG-55967
Change-Id: I65c75d796634ecf1a90a72fef8ff3e6e89de11c4
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2018-01-24 16:06:50 +00:00
Friedemann Kleint
cb142954c5 XCB: Implement native window dump for diaglib
Extract a helper function to determine the window title from QXcbConnection
and add an invokable function to the native interface that dumps the window
tree similar to existing functionality on Windows.

Change-Id: I5544d69ea2b801eb16d3b5b8d64021b3e567b0d8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-01-24 14:39:16 +00:00
Friedemann Kleint
b68dfa0348 QTestlib/selftests: Refactor the code printing output differences
Use qInfo() instead of qDebug() in case QDebug is turned off.

If the 'diff' tool is available, write the output to temporary files and
run diff on it. Otherwise, print the lines as was before, but onto one
stream to avoid indentation by the testlib handler.

Change-Id: Ib5a5dfb66ce481b493b85b915aa8c785ecb6b387
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-24 14:38:58 +00:00
Friedemann Kleint
8e3c6f165b Improve debug formatting of QInputMethodQueryEvent
Add more queries, output the query enumeration value
and output the hints as flags.

Change-Id: Icfc648a8d6e144074455ecebae1b25c3c3e1063e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-01-24 14:38:56 +00:00
Yulong Bai
2a3f226e32 QMenuBar::mouseReleaseEvent: fix triggering hidden actions
While menubar actions are hidden, as menubar was too narrow
to contain them, by clicking the blank area, where the action
was supposed to place, can still trigger the action.

Task-number: QTBUG-65488
Change-Id: I6b137e0717f634ebd3371dbcc2c1ce2089688374
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-01-24 14:24:41 +00:00
Andy Shaw
a5810375bf CoreText: Add Apple Symbols as a fallback to cover some symbols
Since braille characters are not included in Apple Unicode MS, we
extend the fallback to include Apple Symbols to cover those too.

Task-number: QTBUG-63510
Change-Id: I3977f1f9b7370a9fe9cfde643c86518e006c050a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-01-24 13:48:09 +00:00
Kai Koehne
c4b596fb79 Document licenses for all Qt modules
Follow the example of the other modules and explicitly mention
the valid licenses on each module landing page, optionally
combining it with trademark information.

Change-Id: I9f1fea0f002e0ab607da89a0cbfe7c53060582d7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-24 13:19:24 +00:00
Liang Qi
c97eb3e18e Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qrandom.cpp
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp

Change-Id: Icc10543a1f2db5d640d01796bfec70a63517a6b2
2018-01-24 13:38:25 +01:00
Mitch Curtis
aaacae8fe7 Document what the QT qmake variable does in more detail
Make it clearer what the variable actually does by mentioning
that it makes its headers available for inclusion and causes
it to be linked to the binary.

Change-Id: I72821d4bceea7a92e91175ba6c5acc4c3377d7b7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-24 11:52:31 +00:00
Val Doroshchuk
a966991b3a Fix a crash when QMovie::speed is set to 0
Setting speed to 0 means the current frame will continue to be shown,
the finished signal is not emitted, and state remains QMovie::Running.

Task-number: QTBUG-65758
Change-Id: I681d902e3211c5899b21043e5177b7c73d5d3fb5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-01-24 10:13:00 +00:00
Martin Storsjö
f7524d73e3 Don't set no_clang_integrated_as for the disabled pixman asm on clang/mingw
There's no external arm assembler to fall back on here. The
actual assembly is already disabled since 8072c36eeb,
but passing the empty assembly file to any random external
assembler could end up producing an empty object file for the
host environment instead of the target, in a cross build.

This wasn't an issue as long as the clang compiler only was identified
as g++ within mkspecs, making no_clang_integrated_as a no-op. If
the mkspec actually identifies it as clang, this config can't
be added here.

Change-Id: I0f20b9b2a8d13b5e7e1b654e391d88b639c031bf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-01-24 10:10:52 +00:00
Martin Smith
4ca0d76454 doc: clang-qdoc must not see certain function declarations
The macro Q_DECLARE_INTERFACE declared some qobject_cast() functions
that clang-qdoc must not see in the contexts where the macro is used.
This update prevents that from happening by ensuring that Q_CLANG_QDOC
is not defined when the macro is defined.

This update also adds a \fn command for a declaration of qobject_cast()
that was missing in the documentation. There are two versions of the
function, one with a const parameter and one with a non-const parameter,
and they both share one qdoc comment.

Change-Id: Ic74d0aaae62767cd0391474ee95ae3f4f820b06e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-24 10:02:08 +00:00
Martin Smith
f28d0d8ae8 doc: Add documentation for swap() functions
The functions had been added without documentation.
This update adds the documentation.

Change-Id: Ib29e9356b26c248b5fcc9f13ecf77371fbae054a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-24 10:01:58 +00:00
Martin Smith
f30d733d1c doc: Add more missing return types to \fn commands
Added missing return types to \fn commands and removed
some unnecessary \internal comments.

Change-Id: Ie6691f83a1c510134d1e83c3d98758360a67217e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-24 10:01:50 +00:00
Martin Smith
f53cbd2688 doc: Fix a property declaration for clang-qdoc
The * must be adjacent to the type for clang-qdoc.

Change-Id: Icc3dedcb2f4cd426993901b8f3003c942e753c68
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-24 10:01:42 +00:00
Martin Smith
43fbf30efa doc: Fix many qdoc warnings, mostly missing return types
Fixed many cases of missing return types in \fn commands.
Added a fake GLxxx typedef for a GL type that wasn't there
because the GL includes weren't accessible. Also added some
fake declarations for a few functions declared in namespace
Qt in QtWidgets that must be seen by qdoc in QtCore.

Change-Id: Id82476042d0563d32fa85c4ae81a58c1298a468a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-24 10:01:26 +00:00
Anton Kudryavtsev
d5aaa5635c QOffscreenIntegration: add missing override
Change-Id: I8165b44e28bd8da637e75e5b11bc429cdf2deb02
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-24 08:48:33 +00:00
Friedemann Kleint
43b9c9b993 QDockWidgetTitleButton: Limit icon size to dpiScaled(10) on Windows
Adding larger pixmaps to the icon caused the icon to grow.

Task-number: QTBUG-38776
Change-Id: I29148d70afa55e287f2ad254e449a98c4aa631fb
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-01-24 07:04:46 +00:00
Friedemann Kleint
d58162127a QCommonStyle: Add dock title bar icons
Add larger pixmaps for the dock title bar icons; override
them by the XPM in fusion style to maintain the behavior.

Task-number: QTBUG-38776
Change-Id: I7d0e022bbf620d2aad2b6ee011b8bb9a745d7c3b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-01-24 07:04:35 +00:00
Friedemann Kleint
f61304fc77 Rename existing dock title icons to contain "macstyle"
Make way for adding dock title icons to QCommonStyle.

Task-number: QTBUG-38776
Change-Id: If1729478f55f0bce5e04399d0cca98afd2facb31
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-01-24 07:04:32 +00:00
Andy Shaw
1d9547c9a4 Don't indefinitely wait for data if it was able to read some data
Passing -1 to waitForReadyRead() may cause it to wait for some time
but the data retrieved may be enough for processing. So if 0 is passed
from read, indicating that there is potentially more to come, then
it will do a waitForReadyRead() then for more data to come.

Change-Id: I75f270d1f124ecc12b18512cc20fb11f7a88f02e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-24 05:54:31 +00:00
Laszlo Agocs
a69a0e8254 glx: Avoid losing the stereo flag in QSurfaceFormat
Task-number: QTBUG-59636
Change-Id: I38394009993e92ab9db853a1450687fc48e471f5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2018-01-23 20:24:39 +00:00
Martin Storsjö
e39a9de330 pcre2: Disable JIT on windows on arm/arm64
sljit, the JIT in pcre2, doesn't quite fully work on windows on
arm yet (although the subset of functionality used by pcre2 might
mostly work). On arm64, it fails to compile (although working around
that failure is pretty easy), when using clang in MinGW mode
(where __GNUC__ is defined, making the JIT auto-enabled).

Disable it in these configurations until it has been fully tested
and fixed upstream first.

Change-Id: Ie9681cb7cdd1960586ba194c71e057eb918cb419
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-01-23 19:19:46 +00:00
Friedemann Kleint
5c0bd3961f Fix resize event flood when moving windows with High DPI scaling
Correctly scale the requested geometry in the constructor
of QWindowSystemInterfacePrivate::GeometryChangeEvent().
Amends 3a31c70879.

Task-number: QTBUG-57608
Task-number: QTBUG-65580
Change-Id: I0ef60deda69bb61ab57972e02c342b7773e1da6b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-01-23 18:40:09 +00:00
Gabriel de Dietrich
0236e3ab94 QStyleSheetsStyle: Avoid possible division by zero
Change-Id: I5a7588c07106227e2a8b5e1f180230ef5b0342d1
Task-number: QTBUG-65228
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-01-22 20:07:46 +00:00
Gabriel de Dietrich
631f68c972 QFusionStyle: Set alpha on color before creating pen
This affected PE_IndicatorCheckBox in some cases.

Change-Id: I6f10dabd2ca4093f4c1bdaa2bd0ebf73c02e8d12
Task-number: QTBUG-65737
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Yulong Bai <yulong.bai@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-01-22 20:07:35 +00:00
Alexander Shevchenko
41cdfbe3a4 unify windows mkspecs: delete redundants in 5.10
mingw-w64 toolchain:
- remove 'QMAKE_CFLAGS_AESNI' and 'QMAKE_CFLAGS_SHANI' definitions,
  which are already set in 'gcc-base.conf' toolchain; this is
  a continuation of 77347a36 relating variables, introduced in 5.10,
- remove 'gcc-base.conf' duplicate inclusion, left after eef2d1af
  was merged into 5.10.

Change-Id: I328def916ccfb93c3f6b8336eb8801defbac37ae
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-22 17:41:01 +00:00
Jeremy LUGAGNE
c561c3b8b4 Fix -developer-build due to missing Q_DECL_OVERRIDE
Change-Id: Ie7a2ff0e42131afef1bdec853d09c3b447f9748c
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2018-01-22 13:52:34 +00:00
Andy Shaw
efec288f58 itemviews: When an index widget gets focus, update the current index
By ensuring that the current index follows the focus of an index widget,
we can ensure that moving the cursor will happen in the way that is
expected from the focused widget.

Task-number: QTBUG-27793
Change-Id: Ia36891a94ce41c7d12fba678de23a6f3b69374ae
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2018-01-22 09:50:03 +00:00
Oliver Wolff
6c3f864ec0 examples: Fix notepad example for configurations without printsupport
Task-number: QTBUG-65735
Change-Id: I7e0d19de4ac92603f2fd033007343f20a408618a
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2018-01-22 08:27:26 +00:00
Anton Kudryavtsev
6f9c5c85ca QTextItemInt: replace 0 with nullptr
While touching the code, move initialization from
body of ctor to initializer list

Change-Id: Idfcb4fb771d1414268f8685874395ca54b20621a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-01-22 08:20:13 +00:00
Thiago Macieira
d80b0eb12c Doc: make a note about use of QStringLiteral with non-ASCII chars
Both ICC and MSVC have bugs concatenating strings and that's despite the
standard giving an example ([lex.string] table 9) that says that
  u"a" "b"
is the same as
  u"ab"

We can't change to preprocessor concatenation (u ## STR) because that
fails when QStringLiteral is used with a macro instead of an actual
string literal.

Task-number: QTBUG-65479
Change-Id: I39332e0a867442d58082fffd1504a0a868c291ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-22 08:09:25 +00:00
Yulong Bai
4d898a73e6 QMenuBar: Fix repetitive emission of triggered() when using addAction(QString)
The action which added by QMenuBar::addAction(const QString &text) already
connected relevant signals and slots implicitly, however, while
QMenuBarPrivate::updateGeometry -ing, it reconnects them
if there's a extension button associated with a hidden popup menu.
In that case the QMenuBar::triggered would be fired twice.
Since the QAction's ownership may be changed or added dynamically,
there are still very rare cases like several widgets share the same
QAction object to result in this problem.

[ChangeLog][QtWidgets][QMenu] Fixed a bug in QMenu that caused QMenuBar::triggered
to be fired multiple times.

Task-number: QTBUG-25669
Change-Id: I4d52e82a2136a992e0b37118e41237d96a2c5d22
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-01-21 17:54:47 +00:00
Liang Qi
b3e7e9b182 Merge "Merge remote-tracking branch 'origin/5.10' into dev" into refs/staging/dev 2018-01-21 15:39:37 +00:00
Frank Richter
2e5294883b Windows QPA: Avoid 'large' mouse cursors over RDP
On some combinations of RDP client and server a large mouse cursor
results in a hang of the RDP session. However, the 'touch' drag
facility (creating a transparent window) works just fine, so use
that when encountering a large cursor on RDP.
(The threshold of 96 for a 'large' cursor was extracted from the
spec, as that is the largest supported size mentioned.)

Change-Id: I9782c45e8bd6640f36bb5a392961681a99e214e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-21 11:08:12 +00:00
Liang Qi
50e8acd06b Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10 2018-01-20 22:51:18 +00:00
Liang Qi
65a97fccc6 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: If089d5010d15c33b3c1f13912d4386207456c1a9
2018-01-20 22:36:19 +01:00
Otto Ryynänen
6d50f746fe Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flags
The Embedded Android build (Boot to Qt Android injection) is defined by
having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined,
as well as having Qt config android-embedded.
This commit enables the possibility to build embedded Android builds.
(i.e. Qt build for Android baselayer only, without JNI)

Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2018-01-20 18:16:59 +00:00
Martin Smith
5e8bc07cb2 doc: Fix several minor qdoc warnings
The fixes included undocumented enum values, which are now
marked as omitted, adding a test for Q_CLANG_QDOC for a
couple windows enum values, adding \fn commands for a pair
of member functions in QLocale, and a \fn command for an
obsolete function in QSqlError.

Change-Id: I12a8ea7287039096b9cfe7870d2ab213a3d78dcf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-20 13:54:37 +00:00
Martin Smith
99dc25c686 doc: Fix all remaining non-link qdoc warnings
The fixes included adding missing '!' characters to qdoc comment
markers, correct misspelled words, adding documentation for an
anonymous enum type, and replacing Q_QDOC with Q_CLANG_QDOC.

There remain 12 qdoc link warnings in QtBase.

Change-Id: I00447722e6e029f5aed273b3cd571cef33c119b4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-20 13:54:22 +00:00