Commit Graph

35437 Commits

Author SHA1 Message Date
Konstantin Tokarev
089969540f Remove traces of Growl in QSystemTrayIcon code and documentation
Growl support was removed in Qt 5.8.

Change-Id: I00a36cd955194ca8ceee52841a89ca579da01284
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2018-01-26 17:26:39 +00:00
Friedemann Kleint
0901d4290f QFileSystemModel/Win: Fix file system operations failing due to watchers
File system operations like renaming/removing may fail on Windows when
file system watchers are present. Add functions to
QFileSystemModelPrivate to temporarily remove the watchers prior to such
operations and to restore them in case of failure. Use them for
rename/remove (within a feature check for QFileSystemWatcher
and Q_OS_WIN).

Task-number: QTBUG-65683
Change-Id: I90142901892fbf9b1e1206a3397a95ffd3c8f010
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-01-26 11:36:30 +00:00
Lars Schmertmann
f55c73ede2 Introduce QSslConfiguration::backendConfig
With this change it is possible to use all supported
configurations in different backends without any new interfaces.

Change-Id: Ib233539a970681d30ae3907258730e491f8d3531
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-01-26 11:34:02 +00:00
Andy Shaw
e4fc098a53 Make it easier to specify test databases on a per system level
Instead of having to modify the tst_databases.h file whenever you want
to add a test database, this will now read from a file to find what
databases are available. This defaults to dbs.json in the same directory
or the QT_TEST_DATABASES_FILE environment variable can be set to point
to the file that contains the databases. The latter makes it easier for
CI then to have something set up on a per configuration basis.

The SQLite database stays hardcoded so this will continue to be tested as
before without any additional changes.

Change-Id: I7e7ccde6a6be3e490dd640b1590e3b691a6b2ab3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-26 11:33:07 +00:00
Eskil Abrahamsen Blomfeldt
f5b1b10a11 Android: Fix compilation with warnings-are-errors
Variable was added in e2e874415e
but is not used anywhere.

Change-Id: Iff1e7c20317bb489978eb77d24b8da12493d7e45
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-01-26 11:18:43 +00:00
Friedemann Kleint
b0310ddd16 hellogles3 example: Fix start-up crash when using dynamic GL
Move the instantiation of QGuiApplication to the top since it is
required by QOpenGLContext::openGLModuleType().

Task-number: QTBUG-55671
Change-Id: I506cee193fe2ba48400851588a8ef079848bc2f4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-01-26 09:47:45 +00:00
Liang Qi
9f065554ff Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I7bfb75083f60190aa1def82d153f89925a92fd56
2018-01-26 10:09:06 +01:00
Oliver Wolff
dcfb6f9d18 tst_qvarlengtharray: Add missing include
The include is needed for std::unique_ptr on winrt.

Change-Id: I72a28bd0951cc947ac65877ccc35f464c757c444
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-01-26 06:55:15 +00:00
Joerg Bornemann
6dbf357609 Fix asserts and crashes in QWinEventNotifier activation loop
The backwards iteration was done under the assumption that the only
valid modification of the winEventNotifierList in a slot connected to
activated() would be the removal of the notifier itself. This is wrong.

Instead, iterate forwards, like before 85403d0a, and check the index
against the current list size in every iteration. This ensures that we
do not run out of bounds while the list is modified.

Also, retry the activation loop if the list was modified by a slot
connected to activated(). This ensures that all notifiers with signaled
handles are activated.

Task-number: QTBUG-65940
Change-Id: I25f305463b9234f391abc51fe0628d02f49b6931
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-26 06:14:01 +00:00
Alexey Safronov
e5c02b2579 Doc: fix wrong link to the example snippet in QApplication class
Change-Id: Ib9a1b107dd8d2cd4bf541c3edf19a602fde6356f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-01-25 22:41:00 +00:00
Thiago Macieira
ab1e507574 QVariant: convert QDateTime and QTime to string with milliseconds
This way, it's lossless.

Change-Id: I5e421e32396d44e4b39efffd150b744e40fff3a1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-01-25 22:40:40 +00:00
André Klitzing
7f310be85b Update bundled libjpeg-turbo to version 1.5.3
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 1.5.3

Change-Id: I8c0caec3c92ba199b1a3baac9a523cc399c8001f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-01-25 21:50:35 +00:00
Thiago Macieira
9061b7bde0 qsimd_p.h: Reorganize and simplify the x86 intrinsics #includes
All of our compilers support #include <immintrin.h>, so we don't need
the legacy code that includes the earlier versions.

Change-Id: I938b024e38bf4aac9154fffd14f80214d1d744c8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-01-25 21:19:25 +00:00
Ville Voutilainen
342bb5b03a Do a static_cast in bit-blasts that are UB
Without this, building Qt and Qt applications fails with GCC 8.
The errors look like this:
writing to an object of type ‘class QPointer<QQuickPointerHandler>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]

Task-number: QTBUG-65691
Change-Id: Ie5a30814125deca7a160b9a61f5aa3f944ee1ac9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-25 18:20:20 +00:00
Jake Petroules
7b94f1f53b Fix build of applications on iOS
The PRODUCT_BUNDLE_IDENTIFIER property was not defined in the Xcode
project file and therefore the build would fail.

This fixes a regression introduced by 0749ba2c5e.

Task-number: QTBUG-65673
Change-Id: I8089b36d86588223ec34859af7388c99a3574d8b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-25 16:12:47 +00:00
Morten Johan Sørvig
f0b8d90402 Cocoa: Make dialogs non-resizable again
Fix regression from commit 8b3a120a where also dialogs
got NSResizableWindowMask, making them have a Zoom
button.

Task-number: QTBUG-65668
Change-Id: I21054b3aa6fc11eab3d93f78ede44ae771522e2c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-01-25 15:03:10 +00:00
Joni Poikelin
a87b549edf Fix compilation with -no-feature-regularexpression
Change-Id: I4d213a266034d388af723337deeeb4cdd1f5cbdb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-25 14:47:46 +00:00
Joerg Bornemann
91732818e5 Remove dead code from tst_qwineventnotifier.cpp
The idx member of EventWithNotifier is unused.

Change-Id: I0f5aacaaad4b4e82c57ff7bb020586944014f139
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-25 13:37:15 +00:00
Allan Sandfeld Jensen
5927acaf65 Add support for converting from std::variant
Adds inline handling of the C++17 type std::variant, so the type will
be resolved if converted into a QVariant.

Change-Id: I31809d70d7f347277389d42a3695836ec7a32d02
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-25 11:21:32 +00:00
Andy Shaw
965bcca6d4 Cocoa: Explicitly hide popup windows when the application is hidden
When the application is hidden then Qt will hide the popup
windows associated with it when it has lost the activation
for the application. However, when it gets to this point it
believes the popup windows to be hidden already due to the
fact that the application itself is hidden. As a result,
when the application is restored it causes a problem with
the still visible popup window as it is taking the input
events without responding to them.

Therefore we need to explicitly hide the windows right before the
application is hidden to ensure that they are actually hidden
correctly.

Task-number: QTBUG-58727
Change-Id: I4be1e1c0b1388d0c9ec872e7732185670998b7af
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-01-25 06:40:18 +00:00
Thiago Macieira
7d6bf37049 MSVC: Don't set a DLL base address for 64-bit
The linker complains:

 LINK : warning LNK4281: undesirable base address 0x67000000 for x64 image; set base address above 4GB for best ASLR optimization

And it's not really required anymore, as the recommended /DYNAMICBASE is
the default.

Change-Id: I56b444f9d6274221a3b7fffd150caab1beecfd43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-24 21:20:47 +00:00
Thiago Macieira
43c44d05ca Update the overflow functions to include qsizetype
Commit 29bc68cf16 added support for
unsigned and commit 5ff7a3d96e later added
support for int. This commit adds support for qsizetype, which isn't int
on 64-bit platforms.

We do this by reorganizing the code and using the generic version of
__builtin_{add,sub,mul}_overflow from GCC 5 and Clang 3.8, which ICC 18
seems to support now too on Linux. That leaves older versions of GCC and
Clang, as well as MSVC, ICC on Windows, and the GHS compiler, to use the
generic implementations, as I've removed the assembly code those
versions of GCC and Clang on x86 are now uncommon.

Note: any older version of ICC probably breaks. We only support the
latest.

Change-Id: I9e2892cb6c374e93bcb7fffd14fc11bcd5f067a7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-01-24 21:13:20 +00:00
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