Commit Graph

24119 Commits

Author SHA1 Message Date
Alexander Volkov
0636ec4ff5 Open menu on the third click on QMenuBar on X11
We don't replay mouse events after closing popups on X11.
This leads to the bug when the menu doesn't show after
clicking three times on the menu bar. It can be fixed by
reverting 78d7192338, but
then we need an alternative fix for QTBUG-32807 on Windows.
So don't replay mouse events for the menu bar on all
platforms.

Change-Id: I3db8e24a6de6f35b0a17dffac6a131f1cad42e6d
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-08-17 09:03:22 +00:00
Joerg Bornemann
734557bb84 tst_qprocess cleanup
Give setStandardOutputFile2 a sensible name, move it to where it
belongs and remove bogus Q_OS_WINCE ifdef.

Change-Id: I5c843e8b6cb626979966f3e61f7a7c720173bb28
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-17 08:25:24 +00:00
Joerg Bornemann
507625d984 fix assertion in QProcess/Win
Do not call bytesAvailableInChannel if the source pipe end is
invalid. This is the case when redirecting channels on Windows.
The assertions in bytesAvailableInChannel were triggered whenever
an output process or output file was set and waitForBytesWritten
was called.

Task-number: QTBUG-45548
Change-Id: I225dfea2c5e27e122f75008a3a06d425554e00fe
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-08-17 08:25:19 +00:00
Oliver Wolff
ec4426fada WinRT: Skip unsupported multicast UDP socket tests
Change-Id: I69f756ad829569060ae9931748b940842d23a6ea
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-17 08:07:49 +00:00
Oliver Wolff
265cda469f tst_qudpsocket: Do not crash if no testserver address could be found
Change-Id: Ica61974b20b848997c8ab101abde4b536814ba83
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-17 08:07:46 +00:00
David Faure
4ccf5c6f4a QMimeDatabase: adapt to changes in shared-mime-info 1.3
The generated xml file is now lowercase.
This was changed in shared-mime-info 3805d0bcf2.
It led to runtime warnings "No file found for ...", which helped notice the bug.

Change-Id: I31f0fc7f0fe8a098c3f79c0bcbeeb1909d2cc05a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-16 13:33:21 +00:00
Thiago Macieira
1ff66a7962 QProcess: Ensure that the stdin buffer is cleared on start()
The buffer may have been left dirty if we were unable to write all the
data to the child process in the previous run. So ensure we clear it
before starting a new one. We already did that for stdout and stderr,
for some reason.

Task-number: QTBUG-44517
Change-Id: I1a800c709d3543699131ffff13c419da3bbffacf
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-08-15 21:59:26 +00:00
Samuel Gaist
40a4105fae Fix QChar char constructors documentation
Reverts the wrongly added \internal and adds a warning for users that
the constructors will not be available if QT_NO_CAST_FROM_ASCII is
defined

Task-number: QTBUG-39862
Change-Id: I038eea3f4eef0b914b470309a2f515741eec35a9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2015-08-13 21:04:27 +00:00
Oswald Buddenhagen
e26a20fef9 fix up license references
Change-Id: Ie034902729bb3af498a69d077e50de360c54c051
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 11:13:09 +00:00
Andrew Knight
68c915f3df ANGLE: call flex/bison by their standard names
qt5.git now contains the winflexbison tools as flex/bison.

Task-number: QTBUG-46852
Change-Id: I8b86cd4211ae8fb120f955be1f423f94b10b318e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-08-13 10:24:53 +00:00
David Faure
109cdeda30 qprintdialog_unix.cpp: fix out-of-bounds when cwd is empty.
This happens when the cwd got deleted meanwhile; this warning is printed out:
QFileSystemEngine::currentPath: getcwd() failed
and currentPath() is empty. Not a problem in itself, but qprintdialog
should not assume it's not empty, then.

Change-Id: I5c89992b36ca58b6325ced399cff33aca9efb7ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 08:54:47 +00:00
Olivier Goffart
314c83c0c2 Do not use Q_GLOBAL_STATIC in the implementation of QMutex
Since Q_GLOBAL_STATIC might use QMutex and cause a stack overflow.

Task-number: QTBUG-47554
Change-Id: I4853c5e9b9168d4a417200e2a45a1bf9cb103a30
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 07:03:23 +00:00
Michael Klein
e3d7cf7c96 Cocoa: fix integer multiplication overflow in qt_gettime()
Task-number: QTBUG-24031
Change-Id: Iae00b10b6a7423508669ef173a80a03b3dd388c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-13 01:16:17 +00:00
Milian Wolff
af3152adee QMimeProvider: Do not crash when globPatterns is empty.
Change-Id: I351a533a1f03ac2e7bdec876b657a80fac60b2ed
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2015-08-12 13:20:20 +00:00
Oswald Buddenhagen
a47cd2cc82 Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5 2015-08-12 09:53:52 +00:00
David Faure
e7c17ce788 tst_qmimedatabase: check that QFile::remove() worked.
It failed on Windows due to readonly files copied from the resource,
until adding a setPermission call.

Change-Id: I1d42b53763583aca73d011e0f2bbf061ef6aa891
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-12 09:03:18 +00:00
David Faure
34130b9caf QMimeDatabase: use QElapsedTimer instead of QDateTime::currentDateTime()
This reduces the number of syscalls greatly, by avoiding the timezone
conversion every time.

Change-Id: I39a54def4b45f25c6e037ced6943b05ddc749c9d
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
2015-08-12 09:03:09 +00:00
Richard Moe Gustavsen
afaeecd4e8 iOS: ensure that we restore text selection with correct cursor and anchor pos
Qt keeps track of the selection direction since a selection anchor can be placed
both to the left or to the right of the cursor. On iOS, the selection should
instead always be specified from left to right (using a position together with a
positive length). So when restoring the selection after performing the
calculation of the text rect, we need to ensure that we follow this format.

Change-Id: Id8bea6c35e2781e1431ee963f601b6e9ef05dbf5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-11 10:13:38 +00:00
Richard Moe Gustavsen
0cf00efced iOS: support cut/copy/paste shortcuts when using Bluetooth keyboard
Change-Id: Iaa602771227f64c3a477a27656362a361f78e8dd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-11 10:13:32 +00:00
Eike Ziller
3dcabd8c64 QMimeDatabase: Run more tests on non-XDG/shared-mime-info platforms
On Windows and OS X, where QStandardPaths does not use XDG_DATA_DIRS/
_HOME and shared-mime-info is not installed, the tests that require
additional shared mime info xml files were never run.
Mend that by using QStandardPaths' test mode instead of setting
XDG_DATA_HOME.

Change-Id: I53b75c293c41c4dac63986dcb88972c2b54d5428
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2015-08-11 09:22:34 +00:00
Richard Moe Gustavsen
7f0f6380b1 QComboBox: make editable comboboxes usable with input methods
QComboBox uses a QLineEdit for text editing. But while editing, the
combobox is the widget having focus, not the line edit. Instead the
combobox forwards all the IM events to the line edit internally. This
causes a problem since the line edit will not be able to update the
platforms IM state in QWidget::updateMicroFocus() since it doesn't
have focus. The result will be that the platforms IM state will
get out of sync with the QLineEdit.

This patch will add the missing connections that lets QComboBox
update the platforms IM state when the inner QLineEdit signals
that its needed.

Change-Id: Ic3e0fdbf155d4dbeab31e2cd859f6e425ae87375
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-11 07:46:12 +00:00
Richard Moe Gustavsen
22e752bada QLineEdit: update IM status after selection change
As it stood, we only told the platform about a selection change if
the cursor also changed position. But if you have a selection, and
press key left, the selection will be cleared without moving the
cursor. And for those cases, we didn't report the selection change
back to the platform. The result was that the IM status in the platform
plugin got out of sync with the widget.

This patch will add the missing connection that updates the platform
whenever the selection changes.

Change-Id: Iab0848f27207b63ed4fb47f0d4f24a6d02e87db1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-11 07:46:08 +00:00
Thiago Macieira
bedbcb2faf Use /Zc:throwingNew by default with MSVC 2015
As recommended by MS in
http://blogs.msdn.com/b/vcblog/archive/2015/08/06/new-in-vs-2015-zc-throwingnew.aspx

Change-Id: Id3d5c7bf4d4c45069621ffff13f80cecc1141353
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-10 20:22:01 +00:00
Andy Shaw
d2f0f46c45 When the focus changes make sure that the IME finishes correctly
When clicking onto another widget while in the middle of composing should
cause it to be seen as an acceptance of the composed text so far instead
of just cancelling it outright.

This was validated against the Japanese, Korean and Chinese IMEs on
Windows 7.

Task-number: QTBUG-42344
Change-Id: I03be0cd099840f51a9550929f33e2afbbf31e85a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-10 12:30:48 +00:00
Allan Sandfeld Jensen
bec8c726bf Fix out-of-buffer read on image upscale
Avoid reading from the next pixel when the sample is fully based on the
current pixel. This is particular important for the last pixel in an
image when the next pixel might be outside the image buffer.

Change-Id: I3607f9c6c332d11ff944ca35d216d417368f9fd5
Task-number: QTBUG-47228
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-08-10 10:22:36 +00:00
Simon Hausmann
9fe0ff082c Extend QNetworkReply test exclusion on OS X
The test is very flakey in 5.5 integrations and the OS X CI machines have
notorious problems with networking stability. So the previously listed tests
are not really at fault, it's an infrastructure problem, that we choose to
ignore for the time being.

Change-Id: I7fbfa7b3778daa6b5e60d95b822847c92927122f
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-08-10 06:54:11 +00:00
Allan Sandfeld Jensen
01c15a9438 Always return grayscale indexed8 from QImage::alphaChannel()
We shouldn't short-cut alpha8 formats in alphaChannel, the method is
used under the assumption that the returned alpha map has encoded the
alphas as an indexed grayscale image. The method is also documented
as not returning alpha8.

Task-number: QTBUG-47138
Change-Id: I1cf16957d12e65d44f2b586d9f127fcb33c549b6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-08-09 09:13:30 +00:00
Tor Arne Vestbø
e92c2e119b Improve readability of QTextLine's handling of (negative) right bearing
- Helper functions in LineBreakHelper have been renamed from
    adjustFoo to calculateFoo, to signal that they do work, and
    are not adjusting something relative to something else.

  - The use of QFixed(1) and >= 0 has been replaced with an explicit
    constant for the case of the bearing not being calculated yet.

  - A helper function negativeRightBearing() has been added that
    returns the absolute value of any negative right bearing, making
    the width computations simpler.

  - Comments have been added and rewritten to make the logic clearer.

Change-Id: I1d3a0214cfa8b4fed4551f3444b43a37d55bd69b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-08-07 15:46:18 +00:00
Maurice Kalinowski
d7b847112a WinRT: Fix Visual Studio 2015 project generation
- ApplicationTypeRevision has been updated to 10.0 in the final VS2015
release
- For Universal App project one needs to specify
WindowsTargetPlatformVersion and WindowsTargetPlatformMinVersion
- Disable adding Qt libraries to the DeploymentFiles variable for
Universal Apps. Before an error occurred during build as windeployqt
asked to package the very same files. However, windeployqt also takes
care of plugins and hence we prefer to rely on windeployqt and disable
the link step parsing.

Change-Id: I5180519cabde60dbc7786ef27a6fbe0ef2ac44f3
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-07 10:33:07 +00:00
Maurice Kalinowski
c8d3f939b4 WinRT: Link against correct c-runtime
We need to move adding ucrt(d).lib out of the various qmake.conf as
qmake.conf is only parsed once by qmake and does not differentiate
between debug and release.

Hence use default_pre.prf which is the earliest prf to use. This one
also is being parsed multiple times and does what it is supposed to do.
This allows API certification tests for Win10 to suceed, another
sideeffect is that it is much cleaner at a single location now.

Change-Id: Id899f4bbd063a3191c8f139857abf90efa827ffc
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-07 10:33:01 +00:00
Tor Arne Vestbø
7c8e95612e Make tst_accessibility's characterRect match QAccessibleTextWidget::characterRect
The former didn't account for ascent and descent.

Change-Id: If741f22f7e79ac3c13e58f2966358010d9f9ec81
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-08-07 10:09:17 +00:00
Andy Shaw
4d572362e8 Fix link to QQ article
Change-Id: I04d373778b243fdeb281c98e292359996639c95e
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-07 08:00:27 +00:00
Samuel Gaist
63cd55b172 QTreeView: add size hint handling information to uniformRowHeights
Task-number: QTBUG-10802
Change-Id: I6aa60d8fd7678f02003a229e191a5ab4f93c4b9d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-08-06 20:50:02 +00:00
Samuel Gaist
141f03a814 Doc: mark private QChar constructors as internal
Task-number: QTBUG-39862
Change-Id: Ie0d533e3897200589248c803069c41661b15997e
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-06 20:49:53 +00:00
Samuel Gaist
32a9ef32df Doc: add documentation for QMAKE_HOST
Task-number: QTBUG-13745
Change-Id: Ieeecb0f2bb065fe2ec5a1112a25a7b83bf701bd1
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-08-06 20:49:49 +00:00
Samuel Gaist
64b53ddf56 Doc: add clarification about signals not being buffered when blocked
Task-number: QTBUG-15238
Change-Id: Id762007415245f104ffe5cdfd100889f9a73ae95
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-06 20:49:44 +00:00
Samuel Gaist
6e0a6be105 Doc: Fix wrong reference QApplication::setStandardPalette
Task-number: QTBUG-46078
Change-Id: Ifb1c650467a0fc30a0d11ad58708a64e5f9fabd5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-06 20:49:41 +00:00
Samuel Gaist
925822eca5 QProcessEnvironment documentation typo fix
Task-number: QTBUG-45985
Change-Id: I42de961ca6d57847c135abd8395494d0e416ab05
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2015-08-06 20:49:37 +00:00
Samuel Gaist
24dc597386 Add reference to QRegularExpression
Currently there's no mention of QRegularExpression in QRegExp's
documentation. This makes it hard to find QRegularExpression for user
used to QRegExp. This patch adds that missing reference.

Task-number: QTBUG-46816
Change-Id: If3a981d5759fbed3eecd07e046882e6da378cc4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2015-08-06 20:49:33 +00:00
Lorn Potter
51cf05c1bd Add env variable to control bearer backend polling timers.
Scanning and updating networks can cause transmission jitters
when scanning every 10 seconds.
setting QT_BEARER_POLL_TIMEOUT, in milliseconds will set
polling timer for those bearer backends that require
polling, such as generic and windows.

Task-number: QTBUG-46015
Change-Id: I0338cd34ad78488ebef250a0114d17ce190434e8
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-08-06 19:36:59 +00:00
Maurice Kalinowski
f43a2c20d3 WinRT: Fix build for Windows 10
The SDK Version has been updated, hence include and lib directories were
wrong. Luckily, Microsoft introduced an environment variable in the
final VS2015 release to identify the location. Also has the benefit to
reduce hardcoded paths.

Change-Id: I9726db031d87d119bc7326154b24554c4b685d57
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Mika Lindqvist <postmaster@raasu.org>
2015-08-06 19:36:17 +00:00
Morten Johan Sørvig
79ae2b3963 QMacStyle: Disable progress bar animations
Disable progress bar animations on 10.10 Yosemite
and higher - the native style does not animate them
any more. Keep the indeterminate progress bar animation.

Change-Id: If15fa0321e184101ef19b1050eb5e9d8f27480d8
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-08-06 19:30:41 +00:00
Simon Hausmann
f18dc91da5 Fix crash when mixing widgets with QtQuick 1 and Qt Quick 2
Apply the fix from commit 313a74cc4a also to
the QWidget and the QGraphicsObject destructor.

Task-number: QTCREATORBUG-10273
Change-Id: I47983b49cc4d9b75a2e1ee838e13403bc4b95a59
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-08-06 16:58:22 +00:00
Maurice Kalinowski
1f8220379c WinRT: Add Architecture flag to manifest
The architecture needs to be specified to be properly used inside Visual
Studio and for winrtrunner to parse dependencies.

Change-Id: I218100f33efcba9f78199cbd1e48089269648e61
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-06 07:43:09 +00:00
Maurice Kalinowski
b5662e3fce WinRT: Fix build for Windows 10
bf24838c33 introduced a hard dependency on
kernel32.lib, which needs to be added for the msvc2015 mkspecs.

As the library differs for Windows Phone / Windows 10 Mobile, this most
likely has the side-effect that we will need to introduce winphone-xxx-
msvc2015 at a later stage.

Change-Id: I8fa2a68d421345c14ba90efc6faa5eea1ad457e1
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-06 07:43:03 +00:00
Maurice Kalinowski
9bc8acc6cb WinRT: Add dependency support for Win10
So far the dependency keyword has been ignored for the new Windows 10
mkspecs. The difference to older manifest files is that there is already
a <Dependency> section and hence we embed dependencies inside this one,
as the format standard does not allow to have multiple of those.

Change-Id: I1bf25979cc28d5c153215de5bb9cd6f37e9c50aa
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-06 07:43:00 +00:00
Maurice Kalinowski
2b61b2d43c WinRT: Add manifest and assets to install rules
This enables to create fully functional packages from the output of
'nmake install'.

Change-Id: Ief83532cdfc4575f7c42f5bb6a3cee4c9f0ecbd3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-08-06 07:42:57 +00:00
Thiago Macieira
40cbf1927b Don't add qmutex_xxx.cpp to SOURCES, as qmutex.cpp #include's them
Normally qmake catches the #include and drops the source from SOURCES.
But the parser has bugs, so help it by never adding the files.

The false: SOURCES += is left so that the sources can be found by Qt
Creator.

Task-number: QTBUG-46582
Change-Id: I049a653beeb5454c9539ffff13e667877350346b
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-08-06 07:35:13 +00:00
Thiago Macieira
01f3530650 Don't check if Pentium's CPUID leaf 1 exists
It does. When CPUID was introduced in late 486, it already supported
leaf 1. That means all Pentium-class systems (including Intel's new
Quark systems) have CPUID and they have at least leaf 1.

Change-Id: Ib306f8f647014b399b87ffff13f1d5d2530d9ddd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-06 04:53:44 +00:00
Thiago Macieira
f549916d18 Doc: update QDebug documentation to talk about the escaping
Task-number: QTBUG-47316
Change-Id: Ib306f8f647014b399b87ffff13f303badb2a7a63
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-08-06 04:53:41 +00:00