Commit Graph

32812 Commits

Author SHA1 Message Date
Andy Shaw
689606de91 Cocoa: Update the known menu items when the QCocoaMenuBar is deleted
If an application has more than one menubar, for instance, one for each
mainwindow it has visible then once one is deleted it needs to ensure
the application menu items are updated as appropriate.

To do this the resetting of the known menu items is extended to cover
all the application specific ones so that they can all be updated
correctly.

Task-number: QTBUG-62193
Change-Id: I61f46a4745f4e40b9283d40fa5a7473f2721c354
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-09-08 17:45:54 +00:00
Andy Shaw
452ad2bb13 Add documentation about not having QSqlDatabase objects kept around
Task-number: QTBUG-35977
Change-Id: I8601b3f7379a5fe94898a2f5ff63558a896a4de2
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-09-08 17:31:03 +00:00
Andy Shaw
202d3ba3e6 Cocoa: Check if charactersIgnoringModifiers is not empty too
If a dead key occurs as a result of pressing a key combination then
characters will have 0 length, but charactersIgnoringModifiers will
have a valid character in it. This enables key combinations such as
ALT+E to be used as a shortcut with an English keyboard even though
pressing ALT+E will give a dead key while doing normal text input.

Task-number: QTBUG-57933
Change-Id: I52fe9edacefe7298a96af5430831f805626bacd2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-09-08 17:30:10 +00:00
BogDan Vatra
82ed3b8ca5 Android: Use unified headers if available
Fix compile with ndkr16+

Change-Id: I52a52b787e88c8fd74f86d98dcd3c9d44fcf56a9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-09-07 14:16:41 +00:00
Joerg Bornemann
3fe0809796 Set the CROSS_COMPILE variable in Android mkspecs
All cross-target makespecs should set this variable.

Change-Id: I176fa79e639b09c4c1134b66635c66d6e351d805
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-09-06 10:41:43 +00:00
Friedemann Kleint
3b6fb8f22e Use QTRY_COMPARE in tst_qwidget::activation() (Windows only)
Speeds up the test from approximately 770ms to 180ms.

Change-Id: I2e5479fd5190b841b44d4a66380d27b1c3b55162
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-09-06 10:28:02 +00:00
Stephan Binner
d332a2d3cc Convert features.networkdiskcache to QT_[REQUIRE_]CONFIG
Change-Id: I8ba76ba1c7210169df14ffab7dabf4b4be086fb9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-06 06:51:00 +00:00
Stephan Binner
c6b9c6e5f2 Convert features.socks5 to QT_[REQUIRE_]CONFIG
The sources were already added conditionally in the project file since
179fe5981f.

Change-Id: I0baaec2e772f3e596d311c1973b9745aa2b80423
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-06 06:50:54 +00:00
Stephan Binner
029e5cde33 Convert features.ftp to QT_[REQUIRE_]CONFIG
QUrlInfo is used only by the FTP implementation, so it uses the same
conditionals.

Change-Id: Ia15abf44d2a538e90b792a31c65926cc9e16aecf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-06 06:50:47 +00:00
Jani Heikkinen
68b8f2d408 Add change file for Qt 5.6.3
Task-number: QTBUG-62722
Change-Id: Ibb2f27774b3080eceead5c2228cf59db382205e3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-09-05 14:54:38 +00:00
Mitch Curtis
30609e684f testlib: Print event coordinates and window size when event is outside of window
This gives the user a much clearer understanding of which part of the
test caused the warning.

Old warning:

WARNING: tst_controls::Default::Dial::test_linearInputMode(mouse) Mouse event occurs outside of target window.

New warning:

WARNING: tst_controls::Default::Dial::test_linearInputMode(mouse) Mouse event at 501, 179 occurs outside of target window (450x450).

Change-Id: I2943d79bab5a808e9b5b721758db216b91a07bbd
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-09-05 11:45:46 +00:00
Friedemann Kleint
9d8a4d16c6 Windows QPA: Do not call EnableNonClientDpiScaling() on Desktop GL Windows
It causes artifacts when moving the windows between monitors.
Amends e8ecde99df.

Task-number: QTBUG-53255
Task-number: QTBUG-62901
Change-Id: Ia8b0f760370887a75efa05bc9736075afebfe069
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-09-05 11:02:40 +00:00
Friedemann Kleint
e29b72384b Hello GL2 example: Fix exit crash
Bail out of cleanup() when run 2nd time.

Task-number: QTBUG-60626
Change-Id: I8a9be2fcfb0e8a5584ce8ed7952affff24bd2a33
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-09-05 10:55:11 +00:00
Friedemann Kleint
b3717fc7f0 OpenGL examples: Introduce QCommandLineParser
Task-number: QTBUG-60626
Change-Id: I6d102327c89206fcdce10f3ac04e112270b11ad2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-09-05 10:54:15 +00:00
Tor Arne Vestbø
d64940891d Add qmake feature and configure option to use ccache
Enabled via configure --ccache, or CONFIG += ccache in 3rd party
projects.

Ensures that we use the right sloppiness and other ccache options
during compilation.

Task-number: QTBUG-31034
Change-Id: I696b3d3f0398873a29b93d1bc2b4d4e06ef23dc9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-05 10:47:35 +00:00
Morten Johan Sørvig
0adc14d8db macOS: Don’t color convert the backing store
The backing store was assigned the sRGB color profile
as an unintended side effect of the QImage -> CGImage
conversion function refactoring in ac899f6d. This
caused Core Graphics to add a color convert step, which
in some cases caused performance issues.

Restore fast, previous behavior by assigning the target
display color profile to the backing store image.

Color correctness is still a goal, but we’ll add API
for it and make it opt-in.

Task-number: QTBUG-61384
Change-Id: I107f06a881a34fa711b386265d8dc2edfb246624
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-09-05 09:32:32 +00:00
Giuseppe D'Angelo
c7766a41e3 PCRE2: remove pcre2_printint.c from the imported sources
Follow up of fc37e03699:
while the file is #included from pcre2_compile.c, it's never
actually compiled (seems to be about a debugging aid for developing
PCRE2). So it's safe to get rid of it.

Change-Id: I0affaad730e8c5678d3431e47d5fee0dbedc0e78
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-09-05 07:12:55 +00:00
Giuseppe D'Angelo
e8e0895a33 PCRE2: disable JIT on all UIKit platforms
Both iOS and tvOS need to have JIT disabled, so use the uikit qmake
scope for that. This was already done for PCRE 1, but the corresponding
change was lost for PCRE 2 (probably due to a bad merge).

Change-Id: Iac7997880c13b34ced46c63b748980c6fb700a0f
Task-number: QTBUG-62993
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-09-05 07:12:49 +00:00
Àlex Fiestas
7d32339762 Pass m_drag_icon_window to getNativeMousePos instead of Event QObject
The QWindow passed to eventFilter is static so it might be in a
different screen when we call getNativeMousePos, resulting in negative
position and all sorts of glitches.

Change-Id: Ibc848c6d85d8b6932ee379aa77851094212a0db2
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-09-04 14:35:18 +00:00
Eskil Abrahamsen Blomfeldt
52bda430af macOS: Reset composition when focus object changes inside window
When the focus object inside a window changes and we are
currently composing text, we have to cancel composition to avoid
getting into an inconsistent state. This is what already happens
if you switch to a different top level window.

Note: Because we limit the user's ability to change focus inside
a window when composing text, this would only happen under
certain circumstances, such as creating a new MDI window with
an editor while still composing text in a previous one.

[ChangeLog][macOS] Switching focus objects inside a top level window
while composing text using dead keys or input method events would
leave the application in an inconsistent state. The composition
now automatically cancels when the focus object changes.

Task-number: QTBUG-59222
Change-Id: I06792a7db1441dcc5c87e4bf0861b422a25f7f7c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-09-04 13:51:19 +00:00
Tony Sarajärvi
f9fea20c10 Extend blacklisting of tst_QWidget::maskedUpdate to openSUSE 42.3
Task-number: QTBUG-51399
Change-Id: I7fcc52da2ce539251f6bad0394c4580dd76439a7
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2017-09-04 12:11:47 +00:00
Tony Sarajärvi
a2dbf1e779 Blacklist tst_QItemDelegate::enterKey tests on openSUSE 42.3
Task-number: QTBUG-62967
Change-Id: I42f25120f1a9e2ef6a9a147e4f36edcdff2922a6
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2017-09-04 12:11:44 +00:00
Stephan Binner
093064fdeb Convert features.completer to QT_[REQUIRE_]CONFIG
Change-Id: If45a46c08b37d245229a39f3d6ffbb34154934f2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-04 11:28:02 +00:00
Stephan Binner
66d9a2b997 Convert features.buttongroup to QT_[REQUIRE_]CONFIG
Change-Id: Id5df397d0aa4cad7f586ef7303902d8ee7b88f1d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-04 07:53:34 +00:00
Stephan Binner
6380729c48 Convert features.effects to QT_[REQUIRE_]CONFIG
Change-Id: I8421b5e81dc21e8f9f6bdd9f714fb3f535618a3c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-04 07:53:26 +00:00
Stephan Binner
8a93f50695 Convert features.resizehandler to QT_[REQUIRE_]CONFIG
Change-Id: I44ed1be0cf56daf7dc2a7e4bbd3402419a04a530
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-04 07:53:17 +00:00
Stephan Binner
dab49434d8 Convert features.scrollarea to QT_[REQUIRE_]CONFIG
Change-Id: Ifc7b0a6b025c282234b4aeaf23daecff8a558236
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-04 07:53:08 +00:00
Stephan Binner
135da45318 Convert features.keysequenceedit to QT_[REQUIRE_]CONFIG
Change-Id: Id8ffd7f0e6ef4bdc43959179c26342ecee75b280
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-04 07:52:52 +00:00
Orgad Shaneh
ced0f54ec3 Fix resolution of relative links on Windows
[ChangeLog][QtCore][QFileInfo] Relative symbolic links on Windows are
now resolved to their absolute path by symLinkTarget().

Task-number: QTBUG-62802
Change-Id: I5826517130bd389aef994bf3f4b6d99b2a91b409
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-09-04 07:35:09 +00:00
Stephan Binner
314a591461 Convert features.menubar to QT_[REQUIRE_]CONFIG
Change-Id: Idbd4978852fa280dd18a5684469d499da3892126
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-04 06:40:14 +00:00
Stephan Binner
b649717784 Convert features.stackedwidget to QT_[REQUIRE_]CONFIG
Change-Id: I06b7fb9736620dcdfda21fc0a06e13cb02f9a1e7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-04 06:40:02 +00:00
Giuseppe D'Angelo
fc37e03699 PCRE2: remove a source file from the .pro
pcre2_printint.c does not need to be compliled as a standalone source
file, as it's #included from pcre2_compile.c. Apparently qmake does not
detect this in all cases, and sometimes tries to compile pcre2_printint.c,
resulting in compile errors.

Change-Id: If494e5853b52ff1387bfb24f3847b73edcc837b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-09-01 17:03:42 +00:00
Giuseppe D'Angelo
f71a99c0eb QModelIndex: use std::less to compare pointers
Comparing pointers not belonging to the same array requires using
std::less.

Change-Id: I2725aa0899f6b9fece73dadd9ee5c10242d50ae1
Reviewed-by: David Faure <david.faure@kdab.com>
2017-09-01 17:03:33 +00:00
Thiago Macieira
541a031552 tst_QMutex: produce less noise with MSVC
Since MSVC doesn't have <chrono> (according to QT_HAS_INCLUDE), the QSKIP
in the test was printed for every line in the table. Instead, add the
skip in the _data() function.

Change-Id: I6e9274c1e7444ad48c81fffd14dbcee5e5a322aa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-01 16:36:17 +00:00
Albert Astals Cid
6e18293299 Forward the readChannelFinished from the plain socket to the ssl socket
Task-number: QTBUG-62257
Change-Id: I12632b7ffd2012adc99b4784892cbb6f79e065f7
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2017-09-01 15:09:14 +00:00
Friedemann Kleint
a72513cab7 Windows QPA: Hardcode a limit for the default point size
Windows uses deprecated API to obtain the default font which
has been observed to return bogus sizes in multi monitor setups.
Apply a limit in this case and add fixme comment for Qt 6.

Task-number: QTBUG-49374
Task-number: QTBUG-58610
Change-Id: I6e805ec792a3f425961a48ef4c4329c3cdf302b6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-09-01 09:15:32 +00:00
Joni Jäntti
e938150412 Revert "tst_qwidget::activation expect fail on Win 10"
This reverts commit 8561281768.

This change needs to be reverted because Windows 10 Creator's
Update doesn't fail on this test anymore during CI runs.
Reason for this is unknown.

Change-Id: Ice250ecedb14ac96fb3693b2d9884ef452a91cc2
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-08-30 12:49:02 +00:00
Peter Seiderer
b7722c251c Fix error attribute(target("+crc")) is unknown
Task-number: QTBUG-61975
Change-Id: I0b1b55c0737dad485b5ace8e6eb7cb842589453d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-08-29 20:30:59 +00:00
Peter Seiderer
6ce4b680cd examples: fix compile without opengl support
Compile examples/opengl only in case opengl support is available.

Task-number: QTBUG-62372
Change-Id: I742a1eb7b7639a5a722c4d5e9b4ee070b629b02e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-29 20:30:45 +00:00
Allan Sandfeld Jensen
789f9d0d56 Avoid assert on large clips in qt_alphamapblit_generic
It is (end - start) that represent the number of pixels being worked on
and needs to be smaller than the buffer size.

Change-Id: I75a22bc2656ac1c7d231278c3a1931758090f8ce
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-08-29 13:56:59 +00:00
Dongmei Wang
63002b2f37 QFbVtHandler: Remove unused sys/signalfd.h include
Change-Id: Ia9fa3c4de0a1dbdd1b36730c82f5180c2128cbcf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-08-29 13:43:17 +00:00
Timur Pocheptsov
0270651dda Cocoa integration: do not use released session
QTBUG_10735_crashWithDialog started to show flakyness recently - it crashes,
but not every time (which fits the definition of UB perfectly).

While the test itself is doing weird things and puts our event dispatcher
into a weird state, our API allows to:

1. Using QDialog to enter event loop (with runModalSession under the hood), then ...
2. to call from a slot (e.g. timer-attached) QApplication::closeAllWindows() while ...
3. we are still inside that special loop and using the 'session' object, thus ...
4. on the next iteration with [NSApp runModalSession:session] we'll re-use already released
   session (released by endModalSession which in turn was called indirectly by closeAllWindows).

And Cocoa gives us a warning/hint: "Use of freed session detected. Do not call
runModalSession: after calling endModalSesion:."

Task-number: QTBUG-62589
Change-Id: Ie651cee1fba43cfd2b0fc44af5eddc5fd52e2907
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-08-29 12:49:58 +00:00
Joni Jäntti
de6d6eb13e Revert "tst_qgraphicswidget expect fail on Win 10"
This reverts commit 3d5bf00f18.

This change needs to be reverted because Windows 10 Creator's
Update doesn't fail on this test anymore during CI runs.
Reason for this is unknown.

Change-Id: I9f1c88606c97afc5952af34e04310612b783a9c2
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2017-08-29 11:59:23 +00:00
Alessandro Portale
c827afa282 QWidgets/CommonStyle: Fix tooltip drawing under HighDPI
Delegating the border painting to qDrawPlainRect ensures that there are
no off-by-one pixel issues.

Task-number: QTBUG-61849
Change-Id: I56dc849da80fad00d02a0f9c60dbb621e6de7c48
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-08-29 11:53:03 +00:00
Eirik Aavitsland
01af6771c3 Fix: WebP missing from QMovie::supportedFormats()
Use QImageReader::supportsOption() instead of ::supportsAnimation(),
since the former checks what the handler supports in general, not just
the particular device.

Task-number: QTBUG-61642
Change-Id: I57db24425b4fd8821446659936e6a8ca55008921
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-08-29 11:38:37 +00:00
Eike Ziller
3b962d16db Fix jumping to anchors with offline style
If the style changes after the browser already jumped to an anchor,
the resulting browser position will be messed up.
So, after we changed the style we need to make sure that we jump
to the anchor again.
Since browsers do not jump to anchors that they already jumped to,
that means first jumping to the top, then to the actual anchor.

Task-number: QTCREATORBUG-18448
Change-Id: I86c736adab6940903276f8a896b4054ddae11ebe
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-08-29 11:25:27 +00:00
Friedemann Kleint
041df6e2ae QFileInfo: Clarify documentation on symlinks
Explain symbolic links vs shortcuts.

Change-Id: I12176616be72c97607ee1f441d1ea05af5e9e549
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-29 11:15:42 +00:00
Robert Loehning
e81f430e30 Doc: Fix example
Change-Id: Ic678b69c6c9820701c4cc10c7797f599e5d71b7a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2017-08-28 14:36:49 +00:00
Gabriel de Dietrich
48784486a3 QCocoaMenu: Stop update timer
This amends patch f27d1ccbb2.

Change-Id: I4c7a390a5f2cdd3307007c7b6708692c36f861b4
Task-number: QTBUG-62396
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-08-28 13:45:41 +00:00
Joerg Bornemann
ea168ead1a Remove unused mkspecs variable QMAKE_LIBS_NIS
Change-Id: I09a161fe4706c19eba4ff54cdb03a10edc34871a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-28 13:10:44 +00:00