Commit Graph

26336 Commits

Author SHA1 Message Date
Marc Mutz
95a6dc1cb9 QStyleOption*V<N>: mark as Q_DECL_DEPRECATED
Change-Id: If9c5ec8193e51b2a8b091f46916fc74d2d03f1df
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-12-11 11:01:56 +00:00
Jake Petroules
e298ae3a5e Use modern APIs for accessing system palette.
Change-Id: I7ac88007be50963deaa43aac46566781696b55f6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-12-11 10:55:39 +00:00
Jake Petroules
2f549d61ec Add some functions to convert an NSColor to a QBrush.
NSColors can be quite complex and store patterns, gradients, dynamic
system colors that change based on global state (!), etc. QBrush is a
better equivalent to it than QColor.

Change-Id: I4b66a1ab85342bbb9efcf78011965ec74e5fc738
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-12-11 10:55:33 +00:00
Louai Al-Khanji
1bf1d0f493 qt_safe_poll: fix Windows to QNX/Android cross compiles
Task-number: QTBUG-49875
Change-Id: I8820f28351dff385d12a4c469ed689914f87b924
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-12-11 10:44:58 +00:00
Maurice Kalinowski
cf6d671a11 winrt: Use Windows 10 features when available
OpenFileMappingFromApp has been added for Windows 10. Using it,
QSharedMemory autotests succeed without any failure.

Change-Id: I5a4fbec004f121f41909ae13f3db02c384810645
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-12-11 07:39:18 +00:00
Oswald Buddenhagen
604ef6d4a7 automatically put TESTDATA into RESOURCES on android/ios/winrt
QFINDTESTDATA is already prepared to find it there.

Change-Id: I467392786ce6bcfbf1bd0b6079f60c9df06834b1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-12-11 07:39:06 +00:00
Giuseppe D'Angelo
4a318a6182 QJsonObject::(const_)iterator: add pointer typedef
Otherwise they're unusable with std::algorithms or anything else
that requires iterator_traits.

Change-Id: Ia29c1e7c1778844e37d43eaa8aef2871afe3c991
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-11 00:43:33 +00:00
Tor Arne Vestbø
2e8ff4ba1b Fix broken QIOSContext setup due to missing 0-initialization of EAGLContext
Change-Id: Ia4dbb2e3b055a7899c4a3e02698c5776ea7f73ea
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-12-10 22:29:47 +00:00
Giuseppe D'Angelo
824af4aac9 QFileDialog test: make the right subwidget visible
It makes little sense to give focus to a hidden widget; in order
to make the treeview visible, we need to set the view mode to Detail.

Change-Id: I453111e83593a790a656651b603a9c9b1a78dd9d
Task-number: QTBUG-7690
Reviewed-by: Jan Blumschein <jan@jan-blumschein.de>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-10 22:26:01 +00:00
BogDan Vatra
e3689949ba Android: Remove support for API < 16
Starting with Qt 5.7 we removed support for API < 16 (Android v4.1)

[ChangeLog][Android] Support for Android API < 16 was removed.

Change-Id: I8bf396a9d70ab0996965e0c9f629800aa1fa6a45
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-12-10 19:53:36 +00:00
Sérgio Martins
53697fe078 Don't allocate memory when creating an invalid QDateTime
Task-Id: QTBUG-47779
Change-Id: I5aad835c9fbf50962d64d14519ec31cf38cf9e3b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-12-10 19:17:18 +00:00
Erik Verbruggen
74c0416c99 Fix inconsistent override warnings.
For example:

../../include/QtGui/5.7.0/QtGui/private/../../../../../../../../qt5-dev/qtbase/src/gui/painting/qpaintengine_blitter_p.h:67:18: warning: 'end' overrides a
      member function but is not marked 'override' [-Winconsistent-missing-override]

Change-Id: I2845d8e4b5a7e11c57ac1933a6d152df1ef5d07f
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-12-10 18:28:26 +00:00
Tor Arne Vestbø
56f6252e72 xcb: compare to previous state when sending geometry and expose events
By calculating the previous geometry and passing it on when calling
handleGeometryChange we can detect cases where setGeometry() on a
QWindow didn't result in the expected geometry. The new (actual)
geometry is delivered as a resize event.

This also allows us to only send expose events when the size of the
window has actually changed (instead of also sending when the window
has just moved).

Due to the async delivery of geometry changes on the xcb platform we
need to avoid using QWindowPrivate's cached state of the geometry, as
that will result in duplicate resize events when events are not flushed
in between two system resize events coming in with the same size.

Change-Id: I3d4abe4a1095dd96e6e354288d5b646c623c30dd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-12-10 17:27:00 +00:00
Giuseppe D'Angelo
40c927e733 XCB: prevent a fp division by zero
For certain devices vci->resolution is zero, which causes a SIGFPE
if FE_INVALID exceptions are enabled. Try to prevent that.

Task-number: QTBUG-42717
Change-Id: I388735f5dfb6218496787dbb74cf0c0f43cc928f
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-12-10 17:07:56 +00:00
Giuseppe D'Angelo
0d54b0f4dd QFileSystemModel: do not unwatch directories if removal fails
... otherwise we would not detect subsequent file/directories added
into the non-removed one.

Change-Id: I43018dfb9a9c6c0399190800da3f0d572ec5d8d8
Task-number: QTBUG-49307
Reviewed-by: David Faure <david.faure@kdab.com>
2015-12-10 17:07:48 +00:00
Liang Qi
f0c75bb050 QPlatformTheme: added TabButtonFont and GroupBoxTitleFont
Which is needed by Qt Labs Controls.

Change-Id: I2f91a1cbe8218170f894189b56f3fef77207eaec
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2015-12-10 17:06:50 +00:00
Joerg Bornemann
068baa9bb6 add a way to modify CreateProcess parameters
[ChangeLog][QtCore][QProcess] Added method
setCreateProcessArgumentsModifier to QProcess on Windows to enable
users to intercept and modify CreateProcess parameters.

With such a modifier, calling code can decide whether to inherit
handles, modify the STARTUPINFO struct, and pass its own
combination of process flags to CreateProcess.

Task-number: QTBUG-390
Task-number: QTBUG-6917
Task-number: QTBUG-9350
Task-number: QTBUG-24619
Change-Id: I14757dbbacfebb1c89f52402d36fba0ba9c45f3a
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-10 16:29:33 +00:00
Anton Kudryavtsev
4ae0b655b2 QCosmeticStroker: fix misleading use of & on bool operands
Change-Id: I0e885391b220c30fc1482446d1dc9a2be035d45a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-12-10 15:44:10 +00:00
Jake Petroules
f157babbed Move a reusable image conversion function into QCocoaHelpers.
Change-Id: I5fc8f84bd504e405968e212b3125179a2273ae79
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2015-12-10 14:38:46 +00:00
Konstantin Ritt
c79396fc4a configureapp: Print FontConfig in "Third Party Libraries" section
...just like in config.summary

Change-Id: Idb34cdd39f706d7a7e75dfc0388d0a1fdb1f2317
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-10 11:33:00 +00:00
Konstantin Ritt
8e07227f82 configureapp: Add missing empty line between paragraphs
Change-Id: I0f6424471d64976a6c93876e18da3c77000d6390
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-10 11:32:54 +00:00
Konstantin Ritt
784167fb51 Fix swapped descriptions for [-no]-optimized-tools
Change-Id: I5953b83ec2b4adee953caea0cb1e39d54b78bebb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-10 11:32:48 +00:00
Ulf Hermann
1f2734b82b Xcb: Fix debugging code
We need to pass the correct connection and we need a specialization for
reply pointers. Also, there is not much of a point in first creating
a QString from a QByteArray, only to retrieve a QByteArray again.

Change-Id: Ia1bb5655f6229638e3bd2339acadeffc80561b9e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-12-10 10:28:56 +00:00
Tor Arne Vestbø
4c29eba248 Don't write absolute TargetSpec/HostSpec paths to qt.conf
Change-Id: Ifc25a26c5e59a214bdd8dc9398b4d0047fbb5ca2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-10 07:23:00 +00:00
Friedemann Kleint
1289bc8172 Tests: Remove empty init/cleanup slots, constructors and destructors.
Move some code (like registrations of meta types) from init() to
initTestCase() in the process.

Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-12-10 05:26:05 +00:00
Giuseppe D'Angelo
872b9b231e QLineEdit: fix the shortcut override events on a readonly line edit
When a QLineEdit is readonly there's a discrepancy between key press
events and shortcut override events. For instance, presses Ctrl+C
copies the text unless there's also a shortcut for the same key sequence.
In this case, the shortcut override event is not handled, and no text
is copied. Fix it by splitting the handling of shortcut override
events between "read only" access (copy, select, etc.), which still
makes sense on a read only line edit, and write access (paste, ...)
which doesn't.

[ChangeLog][Important Behavior Changes][QLineEdit] QLineEdit will
now accept certain shortcut override events even if it is read only.

Change-Id: Ie5b048259b99a1eff0581129e3ad97f27a88fe86
Task-number: QTBUG-21217
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-12-09 19:04:59 +00:00
J-P Nurmi
b8922c35ba Register QPA Menu, Dialog & SysTray enums & flags
This allows QML Menu, Dialog & SystemTrayIcon to use the same enums
without having to duplicate them.

Change-Id: I1401583d3ae2ef07cdc795d2765fba07c9b30f2f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-12-09 19:00:03 +00:00
Thorbjørn Lund Martsum
410aa20f07 QAIV - allow users to control single step in ScrollPerPixel mode
The documentation says that we scroll one pixel, but changing the
behavior in 934f062203 to do that
was not well received.

People were relying on the undocumented behavior - and the new behavior
was considered to be a regression. (Nobody called setSingleStep since
Qt in many cases provide a reasonable singleStep - which implied that their
programs scrolled with 1 pixel which was quite slow). Furthermore getting
the old behavior (auto set of single step) was nearly impossible.

However the revert (done in 0e69230d02)
gets us back to QScrollbar::setSingleStep not working in pixel scroll mode
(even without it being documented - but we should also have a working API
rather than documenting that it is not working)

The previous approach was directly prevented Qt from changing
single step (on e.g resize) at all. This patch only prevents Qt from
changing when a user explicitly has called the function
QScrollBar::setSingleStep (in pixel scroll mode).

That is we expect that calls to setSingleStep means that the user actually
wants to set the singleStep and doesn't want Qt to control that value.

Furthermore it is possible to switch back to the automatically adjusted
singlestep with QScrollBar::setSingleStep(-1).

[ChangeLog][QtWidgets][QAbstractItemView] QTBUG-7232 - In ItemViews
when scrollMode is set to scrollPerPixel, it is now possible to
change the single step. Qt will automatically adjust the single step
until setSingleStep is called. When setSingleStep is called it will
however respect the set and stop doing automatic changes of the value.
Calling setSingleStep(-1) will switch mode back to automatic adjust.

Task-number: QTBUG-7232
Change-Id: Ibfe0caa9751d3bcc11bfc6e0654a3d1ac35ac8ae
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-12-09 17:53:59 +00:00
Tor Arne Vestbø
49568df954 iOS: Enable non-pixman NEON drawhelpers for both 32 and 64-bit
The pixman drawhelpers are implemented using GAS syntax, which the
Clang assembler doesn't handle, nor do they work on 64-bit ARM, so
we disable them selectively. They are only used for 16-bit surfaces
anyways, so it not a big deal on iOS.

Change-Id: I78417fabd7f671f9c5d94b6e5fa5ce10d3fc1d27
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-12-09 17:48:55 +00:00
Topi Reinio
e8c7f77854 Doc: Online style: CSS fixes for image alignment
- Remove duplicated rules
    - Add a rule for class centerAlign
    - Remove width restriction from paragraphs in table cells

These fixes enable proper horizontal center-align of images in
table cells.

Change-Id: I68a4863fe642a552260dfd6dbbb5d9675a8d2b4d
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-12-09 13:54:27 +00:00
Edward Welbourne
ea8a92c9c9 Clarify what time-zone "transitions" are.
Change-Id: Idad5b841c3c693e2040ca606894187988615c9b0
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-09 12:55:32 +00:00
Maurice Kalinowski
0ea3d630b1 winrt: Store exit code in pid file
We have to call Exit() to successfully close an application as done in
25dcc90d79. Unfortunately Exit() always
sets the exit code to 1 and this cannot be changed programmatically.

Hence write the exit code into the pid file which is created when
launched via winrtrunner. winrtrunner then fetches the content and
passes the exit code to its callee. This implies that the pidFile is
not deleted by the app itself anymore.

Task-number: QTBUG-38654
Change-Id: Ib9b6ae4a0d61c9bf7e530e984aae3ad6204c39a0
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-12-09 12:41:27 +00:00
Timur Pocheptsov
7d2c87311e QProcessPrivate::startProcess - fix invalid encodedProgramName (OS X)
CFBundleCopyExecutableURL returns different URLs (can be absolute or relative)
for the same bundle (caching) - and this results in an
invalid encodedProgramName (in case we try to start the same process twice),
for example, if we start: QProcess p; p.start("nestedDir/nested.app")
twice, the second time we'll have an error trying to start something like
nestedDir/nested.app/_and_here_absolute_url.

Change-Id: I8ac42e20fe3b9fe8b80d5b5c663672e77d88269d
Task-number: QTBUG-49837
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-12-09 12:29:13 +00:00
Christian Stromme
bf4b281099 Add generic g++ spec for arm devices.
A minimal device spec that can be used to build for arm devices.

Change-Id: I4c9949d8cc59ad534fc7617034f6beb40d6a987e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-09 12:18:36 +00:00
Christian Stromme
6e6f27b6ec Use CROSS_COMPILE when setting PKG_CONFIG.
If CROSS_COMPILE is set on a Debian multiarch platform, then PKG_CONFIG
should be set the same way as the other cross compilation tools.

Change-Id: Id359a6bbdcbf8a136a0268a82301fc086a2adcfe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-09 12:18:32 +00:00
Giuseppe D'Angelo
b4d3f9bd82 Check for any existing file in XCOMPOSEFILE.
Before this change, it was checked if the path ends with "Compose", which was
an invalid assumption as the file can have any name (see [1])

This replaces the check with a check for any existing file (which wasn't
checked before).

[1] http://www.x.org/releases/X11R7.7/doc/man/man5/Compose.5.xhtml

Done-with: Florian Bruhin <git@the-compiler.org>
Task-number: QTBUG-41557
Change-Id: If4fb58d4c1ed695f2d611236abfe97964b548678
Reviewed-by: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
2015-12-09 11:47:22 +00:00
Topi Reinio
b64c11f464 Doc: Online template: dynamically load footer content
Add a line to load footer content from the global style folder.

Change-Id: If57f13c2301e6145a26b3a4d04c7cb4695fe55fe
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-12-09 11:47:49 +00:00
Friedemann Kleint
b880b7e1ac Standarddialogs example: Adapt layout for fullscreen platforms.
Insert a group box depending on style hints.

Change-Id: I1b49dc31d5bd32c92d88f95be0683d5223329c11
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-12-09 10:22:55 +00:00
Friedemann Kleint
fcedf8998e fortuneserver/fortuneclient: Fix layout for WinRT.
Use the new API QStyleHints::showIsMaximized().

Change-Id: I1342b3c29ef4ccfcf635a32d403f9aa7ce0cb4e4
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-12-09 10:19:48 +00:00
Friedemann Kleint
893f2ade85 Fix debug operator for QRegion.
Use QDebugStateSaver, drop the multiline format, check for null, empty and
output rectangular regions as:

QRegion(0,0 252x188)

and complicated regions as:

QRegion(size=4, bounds=(0,0 278x262) - [(0,0 278x13), (0,13 13x188), (265,13 13x188), (0,201 278x61)])

Change-Id: I82b8f58af08f7128e6cf2c2c8b06c4684fc6a9c8
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-12-09 10:18:42 +00:00
Friedemann Kleint
5ac2b39133 Fix URL to "The Microsoft Windows User Experience".
Task-number: QTBUG-49799
Change-Id: Ie03ac06966ed97888c0a348a3f2195fd7cbd299a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-09 10:15:54 +00:00
Mitch Curtis
3414be909d Fix QAction::menuRole() documentation
Change-Id: I9299948ba99634ea92f8b5cd4405e814e86f6aa6
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-09 09:38:48 +00:00
Mitch Curtis
01fe8906f3 Fix QAction MenuRole documentation
Change-Id: Ib5e5353480b640f5bcc0e21682de168fadde78fc
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-09 09:38:45 +00:00
Laszlo Agocs
1b61390856 Reduce flushes with repaint() when GL-based compositing is active
Task-number: QTBUG-49655
Change-Id: I7a5d08f681a7d87709aac745154730764040e922
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-12-09 09:36:20 +00:00
Nico Vertriest
8f74fe1b66 Doc: Circumvented qdoc parsing by removing '!'
Qdoc gave warning "Cannot link this to anything"

Task-number: QTBUG-43810
Change-Id: Id903040ed7b2860a2ec64a52f7fbe8269c6927b0
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-09 09:36:17 +00:00
Joerg Bornemann
7afc139e08 Doc: do not claim that SUBDIRS.depends is only available for Makefiles
This information is outdated.

Change-Id: Ic2e10f7c858eed6f1b7c550995cb29004b4bd280
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-09 09:36:14 +00:00
Liang Qi
b1f553b68e doc: fix the shortcut for QListWidget::itemActivated
Task-number: QTBUG-49805
Change-Id: Ia7317e9c6ad5b5f6c17ff1e197ec690ebc20da3d
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-09 09:36:11 +00:00
Maurice Kalinowski
7ee0415d27 Align signature with generic native socket engine
This allows to use readDatagram on WinRT like on
any other platform, ie using two arguments.

Fixes compilation in auto-tests.

Change-Id: I4a6e34dc72d2845faab9067ce67800d8b386c344
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-12-09 09:36:08 +00:00
Richard Moe Gustavsen
7bee5fa2ce iOS: filter edit menu actions depending on selection state
When showing an edit menu on iOS, UIKit will always populate
the menu with actions according to what the current first
responder supports. But it doesn't make sense to show all the
actions every time the menu opens, so introduce some filtering
depending on selection state.

Change-Id: I943a09928233a3a10de003fe15ed8fd8b6fc1e18
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-12-09 09:36:05 +00:00
Richard Moe Gustavsen
e98922bbde iOS: support edit action 'select'
Now that we don't populate the edit menu from qtquickcontrols
anymore (because of shortcut issues), report to UIKit that
we support select so that the action shows in the menu.

Change-Id: I92508da4e1789c361d778cc6c1c77c86308f4c73
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-12-09 09:36:02 +00:00