Commit Graph

30469 Commits

Author SHA1 Message Date
Edward Welbourne
aa06ea0d8b tst_QTimeZone: tidy up handling of debug member
Make it const, initialize it instead of assigning, consolidate testing
of it round some #if-ery.

Change-Id: I2efbf58292a0edd2ceb3da8d3cc16246e84a3bac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-12 13:58:58 +00:00
Edward Welbourne
772b12c436 QTzTimeZonePrivate::init() fix for DST start as standard time changes
Europe/Samara reduced its standard offset at the same time as it
started DST in March 2010, so the transition didn't change net offset.
Our interpretation of the TZ database assumed the prior standard
offset still applied; as this was equal to the new offset with DST, it
marked the dst offset as zero, so we interpreted the next few months
as being without DST, although the TZ database marks it as with.

Generally, if a DST period has an odd DST offset, it's possible it's
due to a change to standard offset at its start.  Deem the offset odd
if it's not what we last saw (or, on the first DST, not an hour); in
that case, check the DST period's end, to see if it offers a less odd
DST offset.  Positive DST offsets are less odd than zero or negative;
otherwise, expect what we saw last, one hour is not odd and closer to
what we saw last is less odd than further from it.  This suffices to
fix Samara in 2010, at least.

Task-number: QTBUG-56345
Change-Id: I9f0ee4e9cd6901c28a8ec1558aec5d26a21152f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-12 13:58:45 +00:00
Edward Welbourne
6e3f58cbbe QDateTime, QTimeZone: fix mappings from zone time to UTC
Such mappings are ill-defined in the presence of daylight-savings time
(DST); at its transitions, you need information about whether DST is
active or not to determine the correct UTC value.  Existing code did
not have a way to be told that hint, so could not be correct.

Fixing this required changing the (thankfully private) APIs by which
QDateTime accessed QTimeZone's information stipulated by zone time.
In QDateTime, this required propagating the needed hint, when DST
status was known.

QAndroidTimeZonePrivate overloaded QTimeZonePrivate::dataForLocalTime
with an implementation that works whenever !hasTransitions(); the base
implementation handled this case lamely, so I've moved the Android
implementation there, to have only one place for both re-writes.

Amended tst_QDateTime's expected failures; passing a date and time to
the constructor *is* ambiguous when the moment indicated is in a
transition.  I have changed which way we resolve that ambiguity.

Added round-trip test of QDateTime's fromMSecs/toMSecs (but as a
QTimeZone test, since that's what's actually getting tested), based on
a test-case from Marko Kangas.  Initially failed for various zones,
each at one hour-offset; and, on some platforms, for some zones, at
all offsets.  These last revealed that a platform may claim to have
zone information yet, for some zones, lack it (or have very incomplete
information).  In each case, despite this, the platform does give
offsetFromUtc().  (The test also found another pre-existing bug on
Linux; fixed in an earlier commit.)

To accommodate these gaps in transition data, the transition-based
code now falls back to the offsetFromUtc()-based code (used when there
are no transitions) if it can't find a previous transition (which, in
any case, it needs to do its job).

Task-number: QTBUG-56460
Task-number: QTBUG-56397
Task-number: QTBUG-52284
Change-Id: I2f7422a9e9d3767940b1901d887c6a2c1f36ac9f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-12 13:58:26 +00:00
Dmitry Shachnev
57b0f54bb6 GTK+ theme: Map some GtkSettings properties to QPlatformTheme hints
Change-Id: If2525e7db0fa496805901174e62f382dd97b2846
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2016-12-12 13:51:29 +00:00
Giuseppe D'Angelo
742a65a4d3 PCRE2: import of PCRE2 10.22
Change-Id: Ib2c6210568e8d2f313c5cfcdfdf0a2f09ee356db
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-11 11:57:35 +00:00
Giuseppe D'Angelo
69ea2d6b95 PCRE2: create a config.h
Change-Id: I9417a29d14def4b5ac4be82ba99023bff7393102
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-11 11:57:31 +00:00
Giuseppe D'Angelo
8793433d8b PCRE2: add import script from tarball
Change-Id: I09e2622ca2c78b290ecba97ae9fa7274bb7f67b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-11 11:57:24 +00:00
Giuseppe D'Angelo
e5e26294f2 foreach: do not use operators that trigger non-evaluated contexts
Namely: decltype(). Ideally we'd want C++17's template constructor
argument deduction, but instead use the C++11 solution: a factory
function. This enables using things such as lambdas in the container
argument.

Change-Id: Idba64d8069d15bbafe54cfdebe24b1fba1eb8d0a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-10 18:11:38 +00:00
Andrew Hayzen
4aebbef8ab Add support for selecting the printer plugin via the env var
Task-number: QTBUG-57260
Change-Id: I046c8ce5af242cdc7efd23468bbe670d782bdfc0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-12-09 14:36:56 +00:00
Alexander Volkov
e51173a2b2 moc: Use nullptr instead of Q_NULLPTR in the generated code
nullptr can be used directly in the Qt code since Qt 5.7.
Use it in the generated code for consistency.

Change-Id: Ic2c37e2757c9cebb3bccb8eb0f2c808fc0e83e35
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2016-12-09 14:15:42 +00:00
Shawn Rutledge
201f89f463 QTouchEvent::TouchPoint: replace ellipse diameters with QSizeF
It makes assignment a bit more succinct and efficient since they
are usually set together.

Since we store the diameters and the points separately, we
no longer need to worry about updating rects by moving their centers.
QGuiApplication and QApplication don't need to alter the diameters:
they are set once when the event is constructed.

Also fix the initialization of pressure and rotation:
418b6f6899 did it by casting a
double to qreal, whereas a plain integer constant will be
auto-converted by the compiler anyway.

Change-Id: Ib9956d2def21278b8ae042147d917da156e77e52
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2016-12-09 13:44:55 +00:00
Allan Sandfeld Jensen
a30fca8711 Use RGB64 qdrawhelper routines for unpremultiplied formats
The ARGB32PM code-path doesn't have enough precision to accurately
render ARGB32 images, but the RGB64 code-path does. Since this is
already a slow configuration and the most costly part is the conversion
we can switch to the more accurate code-path for little cost.

Task-number: QTBUG-55720
Change-Id: Ifa0afba8d8cc0c2f699bb91f51726f4ee5228f3e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2016-12-09 13:06:50 +00:00
Friedemann Kleint
713cc6f3a8 qnativesocketengine_win.cpp: Fix comparison of OS version
Rewrite code to assume Windows 7 as minimum supported version
and check using the operators of QOperatingSystemVersion.

Amends change e26c59e564.

Change-Id: I47cdd4f53ef55441ac7c1f6b1c15f8d4983d70b1
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-09 09:35:46 +00:00
Allan Sandfeld Jensen
7c401397a4 Cleanup memrotate functions
Throw out unused code and simply format table to only care about bpp
and use it consistently for all bpp.

Also makes QImage use the 180 degree memrotate, and fixes the tiled
packed qt_memrotate270 so it can be put to use.

Change-Id: If4ef1666fca960ce8e4ce32d85dc5f347b6986f4
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-12-08 22:25:50 +00:00
Tor Arne Vestbø
7a93d98f29 Add QWindow::AncestorMode overload of QWindow::parent()
Simplifies code that traverses the parent hierarchy, including transient
parents. For Qt6 we should merge the two parent() functions, adding a
default value for the mode, probably ExcludeTransients.

Change-Id: Ic9cdae3e31a3a8e140a5b175160f3b934d2b6e00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-12-08 15:57:18 +00:00
Alexander Volkov
6604d79a21 Windows: Replace Q_DECL_OVERRIDE by override
We can use 'override' directly since Qt 5.7.
Also remove redundant 'virtual'.

Change-Id: Ib478f19381d53642e1ed1c2a589d6b9c4d663e3c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-12-08 11:03:46 +00:00
Shawn Rutledge
92672198ed QGuiApplicationPrivate::processTouchEvent: add explanatory comments
It was very confusing to debug a problem involving detached touchpoints
and not very clear how startPos is stored in activeTouchPoints.

Change-Id: I5c04fb6b5647493a731774e0a1765404cbc8c7d6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2016-12-07 23:25:56 +00:00
Alexander Volkov
964d9e8f8a eglfs: Replace Q_DECL_OVERRIDE by override
We can use 'override' directly since Qt 5.7.
Also remove redundant 'virtual'.

Change-Id: I4c1d5d8a69bf51a7f31077f7cdc74ba06da0bc11
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-12-07 19:12:08 +00:00
Ashish Kulkarni
b5c273cb1a generate PDF CreationDate in local time as per PDF specification
According to section 3.8.2, pg 100 of the PDF 1.4 reference [1]:

    PDF defines a standard date format, which closely
    follows that of the international standard ASN.1
    (Abstract Syntax Notation One), defined in ISO/IEC
    8824 (see the Bibliography). A date is a string of
    the form

        (D:YYYYMMDDHHmmSSOHH'mm')

    Whether or not the time zone is known, the rest of
    the date should be specified in local time.

[1] https://partners.adobe.com/public/developer/en/pdf/PDFReference.pdf

Change-Id: Ib375d587f983d9c70d995157f95d6a59dca037a5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-07 09:53:17 +00:00
Erik Verbruggen
062be10228 Mark qt_addObject/qt_removeObject for removal in Qt6
We now have qtHookData, which is a better (and cheaper) way to add hooks
for object creation and deletion. For binary-compatibility reasons we
cannot remove it in Qt5.

Change-Id: Iecd9f4e1195f90279c395845fa26c6301b67b9a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-07 09:15:10 +00:00
Tobias Hunger
1f87726980 MimeTypeParser: Make sure errorMessage is set
Other methods that call this method check for errorMessage to be
nullptr, so better check here, too.

Change-Id: I8cf4e9d4f5eaafcfc8309dc351ae3b7027c40a98
Reviewed-by: David Faure <david.faure@kdab.com>
2016-12-07 08:40:05 +00:00
Shawn Rutledge
3c159957f8 TouchPoint: add horizontalDiameter, verticalDiameter; deprecate rects
The contact patch of a finger on a touchscreen tends to be roughly
elliptical.  If we model it as a QRectF, it's not clear whether the
ellipse should be considered to be inscribed in the rectangle and then
rotated, or whether the rectangle represents the outer bounds of the
rotated ellipse.  In practice, since most touchscreens can't measure
rotation, it is effectively the latter.  But modeling it that way means
information is lost if the touchscreen can measure rotation: you can
determine the bounds of a rotated ellipse, but you cannot derive the
rotated ellipse from its bounds.  So it's better to model the axes
of the ellipse explicitly.  This has the added benefit of saving a
little storage space: we replace 3 QRectF instances, whose width
and height will normally be the same, with 3 positions (bringing the
total to 12 QPointF's) and one set of axes.  Further, most applications
only care about the center of each contact patch, so it's better to
store that explicitly instead of calculating QRectF::center() repeatedly.

In the past there may have been an assumption that the width of the rect is
the same as the horizontalDiameter of the ellipse, so the rect could be
considered to be rotated, and the ellipse to be inscribed.  But in
d0b1c646b4 and
40e4949674 the point was made that the rect
is actually the bounding box of the rotated ellipse.

[ChangeLog][QtGui][QTouchEvent] TouchPoint::rect(), sceneRect() and
screenRect() are deprecated; a touchpoint is now modeled as an ellipse,
so please use pos(), scenePos(), screenPos(), horizontalDiameter()
and verticalDiameter() instead.

Change-Id: Ic06f6165e2d90fc9d4cc19cf4938d4faf5766bb4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2016-12-07 08:33:35 +00:00
Jake Petroules
f7253b2568 Don't advertise deprecated members of QSysInfo in the documentation
Provide appropriate alternative documentation where applicable.

Change-Id: I73d810938bb961a74d06d8cedb05c38675363ef0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-06 22:02:38 +00:00
Jake Petroules
2da89b8fb2 Complete QOperatingSystemVersion documentation
This adds documentation for QOperatingSystemVersion::OSType and cleans
up some extraneous quotes.

Change-Id: Idaeb163caded9a51ce0fbcc812eb622b4227844e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-06 22:02:33 +00:00
Milko Leporis
bbdcc4ec8e Introduce CI20 mips32 mkspec
[ChangeLog][Platform Specific Changes][Linux] Added support for
cross-compilation for the MIPS CI20.

Task-number: QTBUG-57411
Change-Id: I5be2f53323b1d3c2323cd51064397590c143af1b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-12-05 11:59:31 +00:00
Martin Smith
c27750ea2b qdoc: Ignore Q_COMPILER_REF_QUALIFIERS for now
Q_COMPILER_REF_QUALIFIERS is not yet supported
on all platforms, so clangqdoc must ignore
functions that are defined only when it is
defined. This change adds  && !defined(Q_CLANG_QDOC)
to some #if defined(Q_COMPILER_REF_QUALIFIERS) tests
to allow clangqdoc to use old declarations.

Note that Q_CLANG_QDOC should also be used instead
of Q_QDOC from now on, so that we know that uses
of Q_QDOC have been examined to see if they are
still required for clangqdoc.

Change-Id: I910be70df63eca09985728c7b9eba473aed141ba
Reviewed-by: Martin Smith <martin.smith@qt.io>
2016-12-04 12:28:35 +00:00
Martin Smith
128748d6fe doc: make Q_OS_WIN code available to qdoc
Some declarations in QProcess are declared only
for Windows. This change uses the Q_CLANG_QDOC
macro so that #if defined(Q_OS_WIN) becomes
This ensures that Windows-specific documentation
always gets generated. The macro is added in
both .h and .cpp files.

Change-Id: I632fc52d010cd7c0399fd191f44cbacf6ed25aff
Reviewed-by: Martin Smith <martin.smith@qt.io>
2016-12-04 12:28:24 +00:00
Martin Smith
bf2af6af68 doc: Upgrade QDeadlineTimer for clang-qdoc
Duplicate qdoc comments removed for setPreciseRemainingTime(),
remainingTime(), and deadline(). Added qdoc comments for swap(),
and two new assignment operators. Also added a few parameter names.

Change-Id: I5c19ca3bdef876019c5742397249ea9e0c066bf3
Reviewed-by: Martin Smith <martin.smith@qt.io>
2016-12-04 12:28:05 +00:00
Martin Smith
f27a1ae9a8 doc: Always declare GL types for clangqdoc
GLint, GLuint, GLfloat, and GLenum must be declared for
clangqdoc because it must generate the documentation for
opengl support whether or not opengl support is provided.

Change-Id: I1dccac86fe72a30509bc563dda0b60bcb156bc0b
Reviewed-by: Martin Smith <martin.smith@qt.io>
2016-12-03 19:17:53 +00:00
Marc Mutz
5497e6de89 QItemSelectionRange: de-inline op<
It's a bit large for an inline function.

Note for Qt 6 that this function is nonsense.

Change-Id: If6af5d3538aac86d55313ba6accdb13f892e6564
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-12-02 20:22:20 +00:00
Gabriel de Dietrich
2c634a1326 Introducing QSplitter::replaceWidget()
This new API addresses the use case where we want to replace
a widget by another one inside the splitter. Up to now, the
way of doing would include removing one widget and add the
new one at the same place. However, this triggers a series
of resize and paint events because of the successive changes
in the splitter's children leading to a relayout of the
remaining children.

The new widget inherits the same properties as in the previous
slot: geometry, visibility, and collapsed states. The previous
widget, returned by the function, loses its parent and is hidden.

Change-Id: I3dddf6b582d5ce2db8cff3c40bc46084263123ac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2016-12-02 16:15:58 +00:00
Morten Johan Sørvig
9f2f3cb90b QPA style cleanup: no space after ampersand
QPointF & global ->  QPointF &global

Change-Id: I35e54ad190bb35662abde59e786a0327c83806b7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2016-12-02 11:28:06 +00:00
Morten Johan Sørvig
aa76c85b49 QPA: Consistent QWindow variable names
Use “window” everywhere instead of “w”.

Change-Id: I4d5d4348906528be0138a4116de38ffc544f3c7b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2016-12-02 11:28:01 +00:00
Morten Johan Sørvig
1c03984efc QPA: Consistent QWindow variable names
“tlw” suggests that the API accepts top-level QWindows
only, which is not the case. Use “window” instead.

Change-Id: I9f58c638c33b33c3333c52a3cf291f311d799fe2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2016-12-02 11:27:55 +00:00
Allan Sandfeld Jensen
d133bbf02a Optimized LCD text blending
Make a QRGba64 helper function for LCD blending following our standard
form.

Change-Id: Ib29cf8e780a042ed46554c55c67a698a0e3eddcd
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-12-01 19:22:11 +00:00
Allan Sandfeld Jensen
5d35eea3e1 Optimize RGBA64 toArgb32
Adds NEON and SSE2 optimized toArgb32 functions.

Change-Id: Icfd280a353bfc2ac5d6983dc37aae5ed03e05ad5
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2016-12-01 15:05:04 +00:00
Gabriel de Dietrich
ce14439ecb QMenuBar tests: Ignore shortcut related test on Mac
Also remove references to WinCE in comments.

Change-Id: I175e0ba5f9597b09532c507497a51a55f9e0b5c0
Task-number: QTBUG-56853
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-30 22:05:59 +00:00
Friedemann Kleint
9ef93fa153 Windows QPA plugin: Use member initialization
Use C++ 11 member initialization in value-type structs.

Task-number: QTBUG-51673
Change-Id: I668389b4a0ad1d862a505b740d67357cb9c2a3dc
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-11-30 14:45:17 +00:00
Eric Lemanissier
39fc377bf1 MinGW: reuse gcc-base.conf and g++-base.conf
it allows using optimize_full, ltcg and sanitizers

Change-Id: I3ccf8257145c7d8800c2ebe98c5ac5adcec0dc9d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-29 16:23:58 +00:00
Friedemann Kleint
4499667799 QCommonStyle::sizeFromContents(): Increase height of CT_ItemViewItem
Prevent icons from overlapping by adding a small margin (as does
QWindowsVistaStyle) should the total height equal the icon size.

Task-number: QTBUG-52353
Change-Id: Iad0b7374a22129ee92ff3cc4479118c10db377aa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-11-29 16:20:24 +00:00
Samuel Gaist
58e1465cb0 Add configurable connect timeout for QAbstractSocket
The aim of this patch is to allow the configuration of the connect
timeout used by QAbstractSocket that is currently hardcoded to 30
seconds.
Using QNetworkConfiguration for this allows to adapt the timeout per
network configuration (e.g. 2G vs wired lan)

[ChangeLog][QtNetwork] The connect timeout from QAbstractSocket
is now configurable through QNetworkConfiguration.

Change-Id: I1dc4051be2c74f925f7a9e0a9ccef332efc2e370
Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
2016-11-29 14:01:47 +00:00
Friedemann Kleint
a0551ae610 qopenglprogrambinarycache_p.h: Add "We mean it" comment
Fix
QtGui: WARNING: qtbase/src/gui/opengl/qopenglprogrambinarycache_p.h does not have the "We mean it." warning

Amends change 85f868e73e.

Change-Id: Id2e8c3e7ac4fa732c0a3d99faab91f08121fba96
Task-number: QTBUG-55496
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-25 16:30:15 +00:00
Friedemann Kleint
e26c59e564 qnativesocketengine_win.cpp: Use QOperatingSystemVersion to detect OS
Fix warning:
socket\qnativesocketengine_win.cpp: In member function 'bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType, QAbstractSocket::NetworkLayerProtocol&)':
socket\qnativesocketengine_win.cpp:337:26: warning: 'WinVersion' is deprecated: Use QOperatingSystemVersion [-Wdeprecated-declarations]
     QSysInfo::WinVersion osver = QSysInfo::windowsVersion();
                          ^
In file included from ..\..\include/QtCore/qsysinfo.h:1:0,
                 from ..\..\include\QtCore/../../src/corelib/global/qglobal.h:1150,
                 from ..\..\include\QtCore/qglobal.h:1,
                 from ..\corelib\global\qt_pch.h:56:
     enum QT_DEPRECATED_X("Use QOperatingSystemVersion") WinVersion {

Change-Id: I9b060d886af3b627ac4b6eeb3321629734cc1e46
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-25 16:30:06 +00:00
Andy Nichols
26e2c6b74f eglfs: Add device integration for Qt Simulator for Embedded Linux
To support multiple displays in the emulator, it is necessary that an
additional EGLFS device integration be added to query information about
the available screens, and to help associate a window surface with a
screen.

Change-Id: I852c27bd66f5f32a92c4ff876838ac2f6fbde86a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-25 16:26:13 +00:00
Laszlo Agocs
f0e60aefa4 Use QSaveFile for more robust shader disk cache
Task-number: QTBUG-55496
Change-Id: Ie9bd4390e7bb7bf22dbe597a6a01fecec7a6b404
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-25 16:25:57 +00:00
Friedemann Kleint
7cdc6c9942 qwindowsnativeinterface.cpp: Add missing enumeration OpenVGSurface
Fixes MinGW developer build:
qwindowsnativeinterface.cpp: In member function 'virtual void* QWindowsNativeInterface::nativeResourceForWindow(const QByteArray&, QWindow*)':
qwindowsnativeinterface.cpp💯12: error: enumeration value 'OpenVGSurface' not handled in switch [-Werror=switch]
     switch (window->surfaceType()) {            ^
cc1plus.exe: all warnings being treated as errors

Amends change dafd0955c6.

Change-Id: I43f7148281fcf47613958427e25a784f42920806
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-25 11:33:21 +00:00
Friedemann Kleint
fa4fb4ccf7 Platform support/Windows classes: Use member initialization
Use C++ 11 member initialization in value-type structs.

Task-number: QTBUG-51673
Change-Id: Ic45ab21c738ec7b7d526e30a1de2e19206da89ed
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-24 20:27:17 +00:00
Tor Arne Vestbø
5ea88ae239 Replace manual parent traversal in isWindowBlocked with use of isAncestorOf
Change-Id: I208d70a61e407069277339b3997c82921ab1b39b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-24 13:45:00 +00:00
Laszlo Agocs
1f81ba45ee linuxfb: add experimental support for DRM dumb buffers
Add a QFbScreen implementation that uses DRM dumb buffers and page
flipping, thus implementing a vsynced, double (triple) buffered plain
software platform plugin. Besides better supporting systems that by
now only do fbdev via (possibly buggy) emulation, this can also be an
enabler for implementing certain types of 2D accelerated compositors
e.g. for Wayland.

Enable with QT_QPA_FB_DRM=1. Right now there is no good way to
autodetect the support for dumb buffers early enough so the default is
always the traditional fbdev path.

Long-term this will also enable proper multi-display support like with
eglfs' DRM backends. Multiple QScreens are not yet reported currently
due to the single-screen limitations of fbconvenience.

The generic DRM code is shared with eglfs, meaning configuration
happens via the JSON file specified in QT_QPA_(EGLFS_)KMS_CONFIG. This
allows changing the screen resolution, disabling outputs, etc.

[ChangeLog][Platform Specific Changes][linuxfb] Added experimental
support for DRM dumb buffers. Enable by setting the environment
variable QT_QPA_FB_DRM to 1.

Task-number: QTBUG-56306
Change-Id: I4bdcf16fff67412183220dffa0c4ea235c5cad3d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-24 12:08:21 +00:00
Shawn Rutledge
705e3f68df add TouchDoubleTapDistance platform theme hint
Double-tapping on a touchscreen typically requires a higher threshold
than double-clicking with a mouse, because it's harder to hit the
same point twice with your finger.  This is intended for use in
QtQuick's new TapHandler.

[ChangeLog][QtGui] environment variable QT_DBL_TAP_DIST customizes
the amount of movement allowed when detecting a double tap via touch.

Change-Id: I83a9be363f22c1086fd39580aa95055f2b3ff5c7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2016-11-24 11:56:50 +00:00