Commit Graph

30752 Commits

Author SHA1 Message Date
Friedemann Kleint
5a628fdb98 qt_targets.prf: Bump copyright year
Change-Id: I371fbc28abd6b0e3497e94b7d974fef5d20c7acc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-18 10:25:53 +00:00
Tasuku Suzuki
83583d7999 Fix build without feature.cssparser
Change-Id: Ib751a3d1ad37aae68d6a05aab493833fbcc0b53d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-18 03:59:24 +00:00
Aleksei Ilin
0243863382 Fix access incorrect index in QListView with batch layout
The size of flowPositions is larger by one than the number
of rows in the model so the last correct row number is
flowPositions.count()-2, not flowPositions.count()-1.

Change-Id: Idf8bbd155151d553947d5d299dd01ffaff0c95fa
Task-number: QTBUG-47694
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: David Faure <david.faure@kdab.com>
2017-01-17 14:00:31 +00:00
Friedemann Kleint
117b3e1b8f qt_targets.prf: Don't unconditionally set product and description
Check on QMAKE_TARGET_PRODUCT/QMAKE_TARGET_DESCRIPTION before assigning
values. This enables providing other values by for example the
Qt tool applications.

Change-Id: I62270ca38b7a9110185f6163b280409dbaf395f6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-17 13:58:55 +00:00
Andy Shaw
e12b9b0db3 QKeySequenceEdit: If the next key is Key_unknown then it should be ignored
When triggering a combination of keys which is causing a dead key then
it will send Key_unknown which is not a valid key to be used in a
shortcut so it should just skip past it as if it were a modifier key.

Task-number: QTBUG-57932
Change-Id: I16e004b84f3aa854f8f8f2bbdf86beb6d764de48
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-01-17 09:15:19 +00:00
Tasuku Suzuki
17515f1b62 Fix build without feature.imageformatplugin
Change-Id: I28c146bfa1795794ad27d27c458970c5127cca67
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-17 06:10:53 +00:00
Joerg Bornemann
f225a459a0 Fix unneeded recompiles of glslang_tab.cpp
To work around qmake deficiencies src/angle/src/compiler/translator.pro
contains a no-op extra compiler that "creates" glslang_tab.cpp and adds
a dependency to glslang_tab.h.

However, both files are created in one bison call, and for some reason
the .cpp file is created before the .h file. Then the dependency
glslang_tab.cpp -> glslang_tab.h results in recompiling glslang_tab.cpp
on every incremental build.

Ensure that glslang_tab.cpp is newer than glslang_tab.h.

Change-Id: I6f59e213c84af85c59c02d90ac220bd347faddd1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-16 15:20:27 +00:00
Tasuku Suzuki
ca7f67e82b Fix build without feature.animation
Change-Id: Ia1b9ae3a35cbc73d0bbf27db234d0cd120d0b601
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-16 14:12:50 +00:00
Laszlo Agocs
9ad4e651d2 Fully qualify enum arguments in input device manager signals
Otherwise queued connections may complain about DeviceType not being
registered.

Change-Id: I1f93f8b34e78919e72ea99000c42da7024b6bdf3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-16 10:17:59 +00:00
Liang Qi
7600cb6901 Merge "Merge remote-tracking branch 'origin/5.8.0' into 5.8" into refs/staging/5.8 2017-01-15 16:48:35 +00:00
Kavindra Palaraja
dbb4504f12 Add Q_CC_CLANG to the documentation page
Task-number: QTBUG-42247
Change-Id: I3f707df4d25cac12fabac863b4f6bb50bfac5e26
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-01-15 11:33:20 +00:00
Marc Mutz
0deca277d2 QtCore: fix GCC 7 warnings
GCC 7 warns about implicit fall-throughs now.

Fix by adding Q_FALLTHROUGH.

Change-Id: I482ab4c6adc469b11e1fd163516ff486b3b55ef7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-15 08:09:24 +00:00
Marc Mutz
4baf08653c QHostAddress: add missing docs
qHash(QHostAddress) was added in Qt 5.0 (at least the version with uint seed = 0).

op==(QHostAddress::SpecialAddress, QHostAddress) was there since QHostAddress was
added before public history. Since QHostAddress does not have a \since, the I did
not supply one for op==, either.

Since the equality operator did not have unit-tests, added one.

Change-Id: I954a0df02464338f08a12ca58d4cc0ceb013e67a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-15 08:07:22 +00:00
Tasuku Suzuki
21306bccc4 Fix build without feature.tabletevent
Change-Id: I13950e184453318671e4cac6dac844e76771f430
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-15 04:21:52 +00:00
Liang Qi
00935bf8c2 Merge remote-tracking branch 'origin/5.8.0' into 5.8
Conflicts:
	src/gui/painting/qcoregraphics.mm

Change-Id: I4d49535cd75f2cdf0151c1dbff312cce5e159760
2017-01-14 22:02:55 +01:00
Marc Mutz
6292ecdf6d QSystemTrayIcon: initialize all members
The 'showArrow' member was not init'ed.

Initialize it to true, which is the default value of the
QBalloonTip::showBalloon() function's argument of the same
purpose.

Reported as new by Coverity, but dating back all the way to
cc3875c2e4, so affects all
current branches.

Coverity-Id: 171482
Change-Id: Ica519ecda3a4ae413f606faab8c22f7072f412a8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-01-14 18:18:19 +00:00
Marc Mutz
7d898ae38e QGradientCache: fix a new/delete mismatch
Commit f839f536 fixed a data race in the gradient cache by
reference-counting the CacheInfo objects stored in the cache. To this
end, QSpanData gained a ref-counted pointer to the CacheInfo whose
members it references to keep the object alive for as long as the
QSpanData object needs it. However, since CacheInfo is only later
defined in qpaintengine_raster.cpp, the counted pointer's payload was
chosen as CacheInfo's base class, QSharedData.

As it turns out, e.g. in the QPainter test, the data race was real and
so QSpanData ends up being the entity that destroys (at least some)
CacheInfos, either in its destructor, or in the setup() method. Since
QSharedData's destructor is not virtual, and
QExplicitlySharedDataPointer<QSharedData> knows nothing of the
CacheInfo-ness of its payload, we end up calling the destructor of the
base class, and not the CacheInfo one.

Fix by using QSharedPointer instead, which stores the correct deleter
internally. Ideally, QSpanData would contain a QSharedPointer<const
void>, but QSharedPointer's implementation is deficient in that
respect and does not compile when instantiated with void, and we can't
use std::shared_ptr, yet, so introduce an arbitrary base class,
Pinnable, to be used instead.

Change-Id: I5573c599d5464278d3a8e4248d887ef9ffcd7b70
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-14 18:18:01 +00:00
Marc Mutz
610c7da075 Plug memleaks in tst_QStackedLayout
QLayout::replaceWidget() doesn't delete the affected item, but returns it.

Change-Id: Ibda96e4bf2432ad13ed2908c7d37547f46e29a37
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-01-14 18:17:47 +00:00
Marc Mutz
67f11a3199 QtNetwork: fix GCC 7 warnings
GCC 7 warns about implicit fall-throughs now.

Fix by adding the missing Q_FALLTHROUGH(), and, in one case, by
moving the existing suppressant into the correct position.

Change-Id: I7383f47e690b6334ef69c9df745c2205247ca7d0
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-01-14 06:28:09 +00:00
Thiago Macieira
5a1b4832a2 Adapt to the C++ SIC introduced by P0021: noexcept overloading
C++17 adopts P0021R1[1], which makes noexcept be part of the function
pointer's type and thus be overloadable. It contains some provisions for
allowing a noexcept function pointer to cast implicitly to a non-
noexcept function pointer, but that fails in the presence of templates
and additional overloads that could match the type in question.

Fortunately, the paper proposed a test macro, so we can change our
sources now and be compatible with both C++14 and C++17 rules.

This first failed with Clang 4.0 trunk. This source incompatibility is
not our fault, it's the language's doing.

[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0012r1.html

Task-number: QTBUG-58054
Change-Id: I2bc52f3c7a574209b213fffd14988cf0b875be63
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-14 03:24:30 +00:00
Maurice Kalinowski
cfd069181c winrt: Fix Qt5PrintSupport(d).lib generation
With QT_NO_PRINTER set via the feature system there is no symbol
exported at all in a packaging build. This implies that no .lib is
generated. When an application has QT+=printsupport the build will fail
due to a missing file.

For android and ios it only worked as there is no separation and linker
works against the .so file

Task-number: QTBUG-56321
Change-Id: I389adaca61669b302b6c431effed2ef6d1c499a3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-01-13 10:41:06 +00:00
Joerg Bornemann
be00e37bb3 Fix unnecessary regeneration of mocables in VS projects
Change dcd2f829 introduced fake files with the extension .cbt for custom
build tools that generate code from C++ source inputs. The moc_predefs.h
header file falls into this category, because it is generated from
dummy.cpp.

It turns out that these fake files have to exist. Otherwise the
custom build step is executed on every build. That means re-moccing all
mocables on every build.

Fix this by actually creating the fake .cbt files with some
explanatory comment in them.

Task-number: QTBUG-57695
Change-Id: I251294334425d9914677787d8ba6da1169b4cca5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
(cherry picked from commit 5fc2337d74)
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-01-13 10:40:58 +00:00
Paul Olav Tvete
635d0ae007 Fix typo in QT_REQUIRE_CONFIG error message
Change-Id: Iecfd398935f9c10aa456bd3452d34b31bc7eb4c9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-01-13 08:25:50 +00:00
Paul Olav Tvete
f3992dac6a Make QSimpleDrag work with highDPI scaling
Task-number: QTBUG-57863
Change-Id: I940179a694ce992245dabb77ef6e92e027427524
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-01-13 08:25:39 +00:00
Ulf Hermann
db226cbadc Put the features for platform plugins into their own section
Change-Id: Icde1555e6093c9d8dd38e0abee40004db85189de
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-12 16:26:26 +00:00
Giuseppe D'Angelo
d9cb064425 Doc: fix the datatype returned by Qt::TextAlignmentRole
It's supposed to be a full alignment (like Top | Right), not
just one flag.

Change-Id: I656adda83742d7e4f31955322e937e979b32747c
Reviewed-by: David Faure <david.faure@kdab.com>
2017-01-12 16:14:40 +00:00
Frederik Gladhorn
3ffc471385 Accessibility: make sure childAt calls isValid
Generally isValid should be called by the bridge, but in this case, we
must verify the validity internally since we derefernce the interface
internally.

Task-number: QTBUG-52536
Change-Id: I14950118e58d65135bc38d77c23b8a7fed8bf39a
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2017-01-12 08:09:57 +00:00
Joni Poikelin
483ee17419 xcb: Fix colormap memory leak
Change-Id: I54880c10dc089c2cd17184dcbab17fde3af6452c
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-01-12 05:05:41 +00:00
Oleg Yadrov
63baad4a3d macOS: convey correct mouse coordinates on drag release
Task-number: QTBUG-57129
Change-Id: I6eb60c35bfaf63199d0f637bf2d579fadab0a644
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-01-11 21:05:36 +00:00
Joerg Bornemann
5fbee2c223 Remove superfluous assignment
Change-Id: Ic37b5db8b031a3b10f8f98645a97265ca03a75e4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-11 16:12:52 +00:00
David Faure
2bb01172a7 QFont: fix fromString(toString()) when application font has styleName
The style name needs to be cleared if not present in the string,
otherwise the style name from qApp->font() (which propagates to
any default-constructed QFont) remains.

Change-Id: I9b6522a39a38526cced8a11ed02ae32582026480
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
2017-01-11 15:15:39 +00:00
David Faure
62882ad2fe tst_qfont: clear style name in test font
The test failed if qApp->font() had a styleName() set,
when testing old serialization formats which didn't serialize it.

Change-Id: If0236d354be144b3a990e074a22f796fffb1ed18
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
2017-01-11 15:15:36 +00:00
Andrew Patterson
8b64f93362 Ensure that RC_FILE is correctly handled in a single configuration
When generating the Visual Studio project XML, the filter "Root Files"
was not being output. Specifically, this means that even if RC_FILE was
specified, it would not be included properly as a resource compilation
target in the resultant Visual Studio project file.

This is essentially a rather belated cherry-pick of qt/d6de960b7f.

Task-number: QTBUG-57914
Change-Id: I7d03dc818df0cf36608012f1a71a3a476d8a9ff7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-11 14:30:01 +00:00
Dmitry Chmerev
c5332859c8 Fix QRect calculation in inputItemRectangle
Because of QRect's width and height are caluculated values, they got
spoiled after x and y values setting.

This bug affects, in particular, Android software keyboard appearance:
it could overlap focused input field.

Change-Id: I27ccca27111219818722951fe6f463388d76c702
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-01-11 14:08:34 +00:00
Sergio Martins
461549c35a Don't show bogus empty window when calling QMainWindow::restoreState()
Qt doesn't create the actual QDockWidgets when restoring, the user must
ensure they are created before restoring state. So lets not create an empty
QDockWidgetGroupWindow which you can't close and with no tabs.

Change-Id: If0a6aa7cf6f3932ff4274e03f787e27aef8fa53d
Task-Id: QTBUG-57492
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-11 10:52:16 +00:00
Andy Shaw
64666b9ee0 Windows: Check if the fallback key matches the shift modifier case too
There are some keyboard layouts where pressing shift will give something
different to what the expected key would be. For example, on a French
keyboard layout, pressing SHIFT+! gives 1 as opposed to SHIFT+1 giving
! on a US keyboard layout. Therefore it should check against both cases
to ensure it does not end up adding a new entry.

Task-number: QTBUG-57938
Change-Id: I11c52619c048b98500f2d79876bb912720af6e65
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-01-11 07:39:27 +00:00
Paul Olav Tvete
22138f5907 Correct initial window size with highDPI
Use the scaling factor when calculating the initial size of the
platform window.

Change-Id: Ie21f0da14e32ac437efbc304a3fd9722a7f8615e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-01-10 23:25:15 +00:00
Marc Mutz
f480196f1b tst_utf8: remove duplicate nonCharacters() data
The population of data rows was factored into a separate file, qutf8data.cpp, in
commit e20c4730. Merge commit 9bd03235 failed to track a conflicting change into
the new file, and brought the code back into the tst_utf8.cpp, where it has been
duplicating the utf8data data ever since.

Change-Id: I4282685b882448f927289468bd7ab340a21ea0b3
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-10 18:39:31 +00:00
Jason Erb
ae42bf0f9b Fixed Chinese language selection on iOS
For language "Traditional Chinese" on iOS with region "US",
the logic was formerly to attempt a match on country/language/script (fail),
followed by country/language (which would result in script defaulting to
"Simplified"). Now, the logic is to try language/script first if script is
specified. Failing that, language/country will be attempted.

Task-number: QTBUG-39639
Change-Id: I75a774b1e66686e95167ff221458a97a7ea2660d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jason Erb <jason.erb@sparist.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-10 17:35:35 +00:00
Rafael Roquetto
858c1afb7a QNX: Fix comments on qcompilerdetection.h
Change-Id: I75495b4ba3d8742419f824aa0e0b52694dbd42ed
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-10 17:33:57 +00:00
Ulf Hermann
cb1a4d8e06 Testlib: Exclude qtest_network.h when building without Qt Network
Change-Id: If085684ed5252a01a682222510f6849be974feea
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-01-10 16:52:41 +00:00
Ulf Hermann
eaa0063b70 Fix compilation with QT_NO_SHAREDMEMORY
If we use QLatin1String we should include qstring.h.

Change-Id: Iebd761b98e515e9cd9cd34b96a0f8a602d00f086
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-10 16:35:06 +00:00
Ulf Hermann
0979c5304c Drop unnecessary dependencies from some tests
The future tests don't need QtConcurrent as QFuture and friends are in
QtCore. The printdevice test doesn't use QtNetwork and the lancelot as
well as the testlib tests don't use QtXml.

Change-Id: I150ac99b36682aa23ad22ba943266eb0f0952838
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-10 16:34:52 +00:00
Ulf Hermann
0dc85f7808 Don't build SQL driver plugins if we are not building Qt SQL
Change-Id: I60fb0d7c05652fbad9884b19e612cfef6156d9ae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-10 16:14:38 +00:00
Andy Shaw
25b00c88b6 cocoa: Account for getting a keyboard using input methods correctly
When a keyboard is using an input method then the layout for it needs to
be retrieved with TISCopyInputMethodKeyboardLayoutOverride(). For cases
where it is not using an input method this will return null and in that
case we can use the original approach as before.

Task-number: QTBUG-53804
Task-number: QTBUG-57934
Change-Id: I6283785bf002602113e208bb38d5eb2a9a7ceb36
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-01-10 15:49:33 +00:00
Jesus Fernandez
2005b9fae1 Remove unreachable code
The unknown types are treated as strings by default.

Coverity-Id: 59489
Change-Id: Ib0eaf5c27d3afaf694c8a2acca42bef6808c8a9f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-01-10 15:32:16 +00:00
Jan Kundrát
7f12f94e48 Restore binary compatibility with pre-5.6 qt_handleMouseEvent
An internal, private symbol was changed in
beef975f92. However, this symbol was being
used by some inline functions in QtTest, and this therefore introduced a
BIC. This change simple adds back a symbol with the original signature.

I recall seeing this in my own work, and the KDE CI system hits this as
well:

  libKF5KDELibs4Support.so.5.25.0: undefined reference to
  `qt_handleMouseEvent(QWindow*, QPointF const&, QPointF const&,
  QFlags<Qt::MouseButton>, QFlags<Qt::KeyboardModifier>)'

Task-number: QTBUG-52205
Change-Id: I4e85996850cc436b6a31addca3a8f9829c0c5edd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-10 15:04:15 +00:00
Oswald Buddenhagen
ecb025e346 reduce nesting in configure.bat
for some inexplicable reason, configure.bat went into an endless loop
on win 8.1+ while attempting to parse the command line; this is clearly
a bug in cmd, so work around it.

amends 7af6e9bb.

Task-number: QTBUG-58019
Change-Id: I698a2a51891a4e7af75836c075888f70df865409
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-01-10 12:44:21 +00:00
Kavindra Palaraja
41d1785e13 Clarify that QString::toDouble does not have a fallback
QString::toDouble always uses the 'C' locale.

Task-number: QTBUG-44045
Change-Id: Ifb0c2f11c83c209907dd35bb39d1450022c8e85c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-10 06:38:03 +00:00
Kavindra Palaraja
dfa08d65a5 Replace non-existent signals with the correct ones
activated() is actually triggered(), highlighted() is actually hovered()

Task-number: QTBUG-50315
Change-Id: Ieefdc8376102d80d0885a6c7ca47a9380945afef
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-01-10 06:37:53 +00:00