Commit Graph

26509 Commits

Author SHA1 Message Date
David Faure
2e1de7f3c4 QUrl: revert path-normalization in setPath().
Path normalization should happen only when NormalizePathSegments is set.
Use a less intrusive fix for the setPath("//path") issue that
commit aba336c2b4 was about.

This allows fromLocalFile("/tmp/.") to keep the "/." at the end,
which is useful for appending to the path later on (e.g. to get "/tmp/.hidden")

Change-Id: Ibc3d4d3276c1d3aaee1774e21e24d01af38fa880
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-22 09:56:27 +00:00
David Faure
5f03b48cb3 QStandardPaths: warn if $XDG_RUNTIME_DIR doesn't exist
If the environment variable is set, but points to a non-existing directory,
the user would get a warning about chmod failing. Better be clear and
warn about the fact that the directory itself doesn't exist.

Also warn if $XDG_RUNTIME_DIR points to a file rather than a directory.

Task-number: QTBUG-48771
Change-Id: If84e72d768528ea4b80260afbbc18709b7b738a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-22 09:56:23 +00:00
David Faure
4d9e06fa53 Docu: fix documentation of QHostAddress() default constructor.
In Qt3 this would indeed be equivalent to QHostAddress("0.0.0.0").
But since Qt4, it creates an address of type Null, and
QHostAddress()==QHostAddress("0.0.0.0") is no longer true.

Change-Id: I28025421e77c861783c612c2225be345dad5615a
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2015-12-22 09:56:20 +00:00
Marc Mutz
fc8711dece QGraphicsScene: don't build a temporary QList just to iterate over it
Iterate over the original list instead.

Change-Id: I7be154c0e19074033df6f6e01f68d21a8904d2ee
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2015-12-22 07:25:09 +00:00
Marc Mutz
e3e0240c77 QGraphicsScene: prevent lots of detaching d/t editing of copies
QTouchEvent::touchPoints() returns a const-&, but the old
code took a copy, over which it then iterated, modifying
the touch points, causing (necessary) detaches of both the
list and the touch points.

Befriend QTouchEvent and modify the list in-place, avoiding
all detaches in the likely case that QTouchPoint contains the
only copy of the touch point list.

This is all the more important as the function is called once
for every item-under-mouse in sendTouchBeginEvent().

Port to C++11 range-for as a drive-by.

Change-Id: I2f74d19845711d97e3566886123b5d18d55db74c
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2015-12-22 07:25:04 +00:00
Kevin Funk
feea236d92 Qt5CoreMacros: Sync with CMake project counterpart
Port of CMake commits:

commit 2622bc3f65162bf6d6cb5838da6999f8b5ca75cf
Author: Rolf Eike Beer <eike@sf-mail.de>
Date:   Sun Apr 6 21:30:00 2014 +0200

    Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)

commit 7beba98652212c7a44f291b51dd03681e5193c49
Author: Robert Maynard <robert.maynard@kitware.com>
Date:   Thu Apr 3 11:27:58 2014 -0400

    Qt4Macros: Make QT4_CREATE_MOC_COMMAND a function

Change-Id: I5b928d114adb393ed9370163609311b7486e4a36
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-21 22:42:19 +00:00
Sérgio Martins
b17e71dd08 QListViewItem: Remove pointless copy ctor
Fixes static analyzer warning.

Change-Id: I4f1bec1da5b2e90a1aeae699a9e3e329f1cc9199
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-21 22:18:28 +00:00
Marc Mutz
7facc281e5 QtWidgets: de-inline some more virtual dtors
Helps pinning the vtable to a single TU, which can
prevent false negative RTTI (incl. dynamic_cast and
catch()).

But mostly because it's rather pointless to have dtors
of polymophic function inline. Most of the time, the
code will be called through the vtable indirection,
anyway (which also means that an out-of-line copy of
the code needs to exist in any case). The inline
method will only be used when the compiler can prove
the dynamic type of an object.

Saves ~1.5KiB in text size on optimized GCC 4.9 Linux
AMD64 builds.

Change-Id: Ic4ce96da559252c8abc29d880530c84035db2306
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-12-21 22:16:19 +00:00
Marc Mutz
11c8823ff7 QtWidgets: de-inline some Private ctors
Saves ~7KiB text size on optimized GCC 4.9 Linux AMD64
builds.

Drive-by fix: properly init
QGraphicsProxyWidgetPrivate::proxyIsGivingFocus.

Change-Id: Iac923f0f2a9cdc0349f706c5760883a210be36f3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-21 22:16:14 +00:00
Gabriel de Dietrich
ac2e991675 QHeaderView: Reset cached section sizes on font and style change
Change-Id: I7ce88b7e43249499343a9aae6acb806dd9c41f31
Task-number: QTBUG-33855
Task-number: QTBUG-37153
Task-number: QTBUG-50010
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-21 18:31:47 +00:00
Gabriel de Dietrich
15163d1939 QHeaderView and others: Fix font lookup name
It should the the actual class name, without any suffix.

This also allows us to use the painter font when rendering
CE_HeaderLabel and, as a consequence, change QHeaderView's
font through the usual methods.

Change-Id: I0b13ee349f5fa505be66a9c884c26885f5fc468f
Task-number: QTBUG-33855
Task-number: QTBUG-37153
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-21 18:31:26 +00:00
Oswald Buddenhagen
e5f3b653f0 add enablers for printing project errors in cumulative mode
this doesn't actually do anything in qmake.

Change-Id: Ia14953a5a9dc31af56ad6c338017dd5b85bb4494
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/08d0cb6f8e90a818bf6d3bec7a6d00f16419b8c0)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-21 16:39:31 +00:00
Oswald Buddenhagen
86b2b5319d make CONFIG feature evaluation failure non-fatal in cumulative mode
while we evaluate the features themselves in precise mode (which is the
reason why they can error out), we do not want them to terminate
cumulative project evaluation.

Change-Id: I70f3e1bcb2ca04a70c74ff484749ca92c1cf6372
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
(cherry picked from qttools/90ee4094161b427c32581bca2f5286edb4fffdb1)
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-21 16:39:23 +00:00
Friedemann Kleint
75e45cc2df Add missing includes.
After 90e7cc172a, QStringList no longer
includes QDataStream.

This also reverts commit c1be0fbe7d, which
did the same in a worse way.

Change-Id: Ib10622b0da3b3450d29fc65dc5356fde75444a8f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
(cherry picked from qttools/376501ae5a86859821c0e89b2e8fbc9906d11e07)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-21 16:39:00 +00:00
Oswald Buddenhagen
57ca8d2698 make write_file() capable of making files (not) executable
Change-Id: I9ca96bc3408160261781697a3471c1f446c86c3a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-21 16:34:26 +00:00
Matt Hoosier
6f1b78c980 Fix version script generation when cross-compiling from Windows to QNX
Recent versions of Qt have apparently added sufficient numbers of
headers that the command lines used to spawn a custom header-
parsing tool, started overflowing Windows' maximum command-line
length.

This change restructures the mechanism to use a GCC-style command-
line arguments file rather than passing filenames all directly
in the argv[] vector.

Although QNX is the usual ELF target whose cross-build is supported
on Windows, the mechanics introduced in this patch happen to affect
all other ELF Unix systems' builds too.

Change-Id: I5a7383cf9f2ebf9dffde8dbfdcdeca888265e085
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-21 16:18:29 +00:00
Daniel Levin
a206583da1 Add DEPENDS option to qt5_wrap_cpp()
Currently the moc rule does not support dependency scanning, so after
successful moc file generation it will ignore implicit dependencies
in the header file.

Although this works in most typical scenarios, at least in one case
incremental builds become broken: when using Q_PLUGIN_METADATA() with
the FILE argument.

If FILE refers to a JSON file and latter was updated, then the expected
behavior is to regenerate the moc file. Since CMake add_custom_command()
does not support late dependency setup, all dependencies should be
explicitly listed in a DEPENDS section.

This patch adds the DEPENDS multiarg option to qt5_wrap_cpp(),
allowing to specify additional dependencies to the moc rule.

Task-number: QTBUG-44009
Change-Id: I2052ce23d3cb0c87c6bd99fcb7e8a71a7be9a330
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Daniel Levin <dendy.ua@gmail.com>
2015-12-21 16:05:36 +00:00
Thiago Macieira
32e4546cc3 qprocessordetection.h: Fix detection of 32-bit ARMv8
This is more future-proof. It fixes the detection of 32-bit on ARMv8-A
processors since it uses the __ARM_ARCH macro that GCC and Clang
define. For MSVC, we use _M_ARM, which also contains the architecture
version. MSVC does not currently support ARMv8 code, but when it does,
this commit should make the support automatic.

I don't know which compiler defines __TARGET_ARM_ARCH, but support it
too.

Change-Id: I8de47ed6c7be4847b99bffff141c8ede54a849eb
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-12-21 13:33:21 +00:00
Topi Reinio
f25298bd11 Doc: Update Qt Account url
Change-Id: I123ce085032eeb323f7c60548a9651c5188bb337
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-12-21 13:33:00 +00:00
John Brooks
b826672658 Fix visibility of bundled zlib symbols with mingw
When QT_VISIBILITY_AVAILABLE is defined, the zlib header would use
visibility("default") instead of Q_DECL_EXPORT, but Windows needs
dllexport for these symbols to be available to QtGui/QtNetwork.

In practice, Q_CORE_EXPORT always has the correct behavior for the
zlib symbols.

Change-Id: I7ab8080528e437260f822ac33e9e4334e2a0fdc8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-21 10:10:30 +00:00
Marc Mutz
ab4ddea4c1 Don't re-evaluate QTextCharFormat::font() all the time in QAccessibleTextWidget::attributes()
Saves ~100b in text size.

Change-Id: I144b8c1d02ce8a24f1654d54abad90ba1054be9a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Boris Dušek <me@dusek.me>
2015-12-21 09:31:04 +00:00
Marc Mutz
92398565fc Remove a use of a QMap in QAccessibleTextWidget::attributes()
The QMap<QByteArray, QString> was only used to hold key/value pairs
until they were serialized into a QString at the end of the function.

Serialize into QString directly instead, dropping the temporary QMap.

The problem is that we'd like to keep the line formatting central
while at the same time harnessing the power of QStringBuilder.

This is possible with a templated function with an input/output
parameter:

     format_attr(QString &result, const char *key, T &&value)
     format_attr(result, text-foo, str + str2 + str3);

Or with return type deduction:

     formatted(const char *key, T &&value) -> decltype((expr)) { return expr; }
     result += formatted(text-foo, str + str2 + str3);

I don't like out parameters, and we can't rely on auto return
type deduction, yet, so I opted for a miniature expression
template solution that can only match the expression

     attr[key] = value;

where 'key' is a const char* and 'value' can be anything that
QStringBuilder supports. This allows to keep the syntax of a map
while at the same time serializing to QString immediately.

The only behavioral difference to the old code is that the
attributes are no longer sorted, but order doesn't matter.

Saves more than 10KiB in text size on optimized GCC 4.9 Linux
AMD64 builds.

Change-Id: I7b3bec0466ef24156c693adaa95f0316007e0bfe
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-21 09:30:57 +00:00
Marc Mutz
6066af7f09 QLineEdit: hold SideWidgetEntry in std::vector, not QVector
This is private implementation, so there's no BC issue here.
The collections ported here also do not benefit from CoW,
because they are never copied.

Adapt to STL API and replace foreach with C++11 range-for
loops, because the former deep-copies STL containers.

Also replace index-based for loops with C++11 range-for,
to evade the int/size_t problem on MSVC.

Saves a bit more than 1KiB in text size on optimized GCC 4.9
Linux AMD64 builds, not all of which can be attributed to the
ports to range-for.

Change-Id: I240030180bd1b2ca40c002b03ab72319a99a87c3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-21 09:30:48 +00:00
Joerg Bornemann
7cde1c029e Remove superfluous ReleaseSemaphore/WFSO calls
Factor out the dispatching of IO results into a separate function.
Do not increment the semaphore count in waitForAnyNotified just to
decrement it again in _q_notified.

Change-Id: I7d4a04b679bb152ab3a5025513f885aee276d086
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-12-21 09:12:02 +00:00
Jędrzej Nowacki
55eaf11bb7 Stabilize tst_qtimeline::resume
Change-Id: Ife0ce27c680196ed1fe3d037ea0367e511560c96
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-21 08:53:21 +00:00
Jędrzej Nowacki
8dd84c6420 Speedup tst_qtimeline::finished
Change-Id: Id9ae42663d8830365d4dcfab92b48621eb1b409f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-21 08:53:13 +00:00
Jędrzej Nowacki
6606b151c4 Get rid of qWait in tst_qtimeline::restart to make it less flaky
Change-Id: Iba3a9e5dce6bd7ff6e241fae738cfc51386f0c75
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-21 08:53:00 +00:00
Jędrzej Nowacki
4e012cb083 Improve tst_qtimeline::value
The test was improved by:
 - Use QCOMPARE instead of QVERIFY
 - Use QTRY_ macro instead arbitrary qWait
 - Use longer time line

The test executes faster and it should be less vulnerable to
an unreliable timer.

Change-Id: I92675015a6251b47eaf20b0fc916f3a36b52d783
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-21 08:52:49 +00:00
Jędrzej Nowacki
266511401f Improve tst_qtimeline::currentFrame
The test run faster and it less vulnerable to an inaccurate time.

Change-Id: I19475095395dcf1e6d47fdbba5eeffabab1fc7b9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-21 08:52:40 +00:00
Jędrzej Nowacki
70e290411a Improve tst_qtimeline::currentTime
Now the test is less fragile to time and it executes 4s faster

Change-Id: Id3eb8ed2c03317e7d2f2c3cd17f889a8d8e7e5b4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-21 08:52:33 +00:00
Jędrzej Nowacki
229c03cd88 Make tst_qtimeline::range less prune to timing errors
Change-Id: I5fd84c58250a9dfa237fcb7fca4da50c35a9f57e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-21 08:52:27 +00:00
Jędrzej Nowacki
bcc23e7942 Make tst_qtimeline::duration less fragile to timings
The test still can fail because 1s is quite a short time.

Change-Id: I6f42c182f2932d5a053f6a69667210529c9a7697
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-21 08:52:13 +00:00
Frank Meerkoetter
64857434e2 Fix broken permission to mode mapping
Fixes coverity CID154258.

Change-Id: Ia958d24c533c4f0077abd363ee4c041cc2cdb6f0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-12-19 15:03:55 +00:00
Marc Mutz
66441d7a82 Make use of new QHash::erase(const_iterator) overload
Drive-by changes:
- use auto for iterators
- add Q_UNLIKELY for conditions leading to a qWarning etc

Change-Id: Iff8f36d67c96674d354a501b26640f73c15ce58d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sérgio Martins <iamsergio@gmail.com>
2015-12-19 07:41:50 +00:00
Marc Mutz
0f923a8ce4 QHash/QSet: add erase(const_iterator)
This is the signature the functions have in C++11. For the std
containers, this is just convenience, but for Qt containers
with their implicit sharing problem, the combination of erase()
with constFind() can delay a detach until absolutely necessary.

[ChangeLog][QtCore][QHash/QSet] Added erase(const_iterator).

Change-Id: I2fc841c664cd7515b0f56fd7210fcd17c37f9014
Reviewed-by: David Faure <david.faure@kdab.com>
2015-12-19 07:41:47 +00:00
Erik Verbruggen
90f79db90a Fix linux-clang build.
Clang's integrated assembler does not accept this assembler syntax, so
tell it to only run the preprocessor, and pipe everything through the
system assembler.

Change-Id: I6bd884473e634837b47480546a1d1d8d62e7a2b6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-12-19 07:40:48 +00:00
Erik Verbruggen
44bf45f396 Fix namespaced build on OSX.
Change-Id: I1fc2195792eeea1addcb262aca37e59107a131c5
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2015-12-19 07:40:45 +00:00
Sérgio Martins
a5a18819d8 Use qEnvironmentVariableIntValue() instead of qgetenv().toInt().
It's much faster.

Change-Id: I55e0a23f9086fe2e7872e81dc0f5e10105ed124a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-12-18 21:35:08 +00:00
Marc Mutz
1cf2620d5b De-duplicate QGraphicsItemPrivate vtable
By making the destructor (usually the first non-inline, non-pure,
virtual function, and therefore the trigger for most compilers to
emit the vtable and type_info structures for the class in that TU)
out-of-line, vtables and, more importantly, type_info structures for
the class are pinned to a single TU. This prevents false negative
dynamic_cast and catch evaluation.

Since QGraphicsItemPrivate is already exported, users of this class
are unaffected by the change, and since it's private API, we don't
need to avoid adding code to the out-of-line destructor until Qt 6.

Also saves ~2.5KiB in text size on optimized GCC 4.9 Linux AMD64
builds.

Task-number: QTBUG-45582
Change-Id: Ibb404a43d5464e8e280ccebd5f95719852f5a986
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-12-18 19:07:33 +00:00
Liang Qi
d44cd5334a Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2015-12-18 13:15:38 +00:00
Marc Mutz
8b1eb5f420 QFlickGestureRecognizer: hoist a constant subexpression out of a for loop
It's a virtual function call, followed by another out-of-line
function, so the compiler cannot hoist the expression out of
the loop itself.

But we can, so do it.

Change-Id: Icffa6fa9a667d566b0829a18fea7128625e85920
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-18 08:22:42 +00:00
Liang Qi
beb65dcd79 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/gui/painting/painting.pri
	src/plugins/platforms/xcb/qxcbconnection.cpp
	tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro
	tests/auto/corelib/tools/qlocale/test/test.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
	tools/configure/environment.cpp

Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
2015-12-18 08:37:31 +01:00
Louai Al-Khanji
3fc1002489 QAndroidEventDispatcher: Remove dependency on select(2)
Change-Id: I4c23816a3a665cf2fa40705efe721b6f43fa3146
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2015-12-18 02:13:25 +00:00
Tor Arne Vestbø
420438b5d3 iOS: Implement support for QApplication::beep()
Vibrates the device or plays an alert sound on devices
that do not support vibration.

The other implementations of beep() have been moved to
QPlatformIntegration as a proper API instead of having
them as invokables in QPlatformNativeInterface.

Change-Id: Ic597dbef04b46d49862b070e78ddfc0d763829a2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
2015-12-17 17:14:34 +00:00
Marc Mutz
a1bb00bece QScrollerPrivate: fix some const-incorrectnesses
Change-Id: Iad7ea926b90efa54ef94c04ac78e38254d9b5c98
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-17 16:48:31 +00:00
Marc Mutz
46ed6c058a QGraphicsScene: replace QList::prepend()s with appends()
Use the new reverse_iterator support in QList to
avoid building a QList with prepend()ing, using
append() instead.

Change-Id: Ia1f6d0ecc08a824f11d93a6fd4077b11b1b0f786
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-17 16:48:05 +00:00
Marc Mutz
bb7bc4a05e QApplication: replace QList::prepend()s with appends()
Use the new reverse_iterator support in QList to
avoid building a QList with prepend()ing, using
append() instead.

Change-Id: I6b9d9b1a9941cf2e6cc39ad2d9097fdc629c24bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-17 16:47:59 +00:00
Marc Mutz
404b1fd8b3 QFlickGestureRecognizer: remove a useless check
There's no point in checking isEmpty() to prevent a for loop from
executing, esp. if the checking involves copying the container
and calling an out-of-line function to get said copy.

Just fall through the for loop.

Change-Id: If6c689ff4bcd685bc645b4fb3f2c15ce5d5945af
Reviewed-by: Sérgio Martins <iamsergio@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-12-17 16:47:48 +00:00
Friedemann Kleint
e3288f246b Windows: Restore window geometry after normal->maximized->fullscreen->normal.
- Do not save geometry when going from maximized->fullscreen
- Use SW_SHOWNA instead SW_SHOWNOACTIVATE as otherwise the
  maximized geometry is restored.
- Add a test for Windows.

Task-number: QTBUG-49709
Change-Id: Ic81e7398ee90d499a50b02192a45cb09276a2105
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-12-17 14:58:29 +00:00
Friedemann Kleint
ac5c2aaf35 Windows: Clear key recorder when application becomes inactive.
When keys are pressed and the application becomes inactive before
they are released, the stored state becomes inconsistent.

Task-number: QTBUG-49930
Change-Id: Ide86b1d9052df060f30f7c02b81a4f2ae15d28e7
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-12-17 14:58:21 +00:00