Commit Graph

26496 Commits

Author SHA1 Message Date
Oswald Buddenhagen
a5ec7163f9 unhack qt_install_headers vs. lib_bundle
instead of unsetting the flag later on, don't set it in the first place.

Change-Id: Id448500b02b5c3e1dc7c332cc178a84c7fd2cfdc
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-19 17:09:02 +00:00
Oswald Buddenhagen
5260c01bbe load qt_common in qt_helper_lib
this has multiple consequences:
- we do sane DESTDIR replacement for debug_and_release builds, fixing
  QTBUG-47313
- we don't create debug/release subdirectories, fixing QTBUG-47639. this
  only makes sense given the complementary call of $$qt5LibraryTarget()
- we patch up the .prl files upon installation

Task-number: QTBUG-47313
Task-number: QTBUG-47639
Change-Id: Id409bbd26781a773409b94835ab6b97e71569322
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-19 17:08:56 +00:00
Oswald Buddenhagen
1c87c3bdc6 remove dead code re CONFIG+=generate_pbxbuild_makefile
evidently, nothing and nobody sets this option, as it's been completely
broken since 6234dec41f (qt 5.5) and apparently nobody noticed.

Change-Id: I5a82ebd963a292af4689397875dde096f63d751a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-02-19 17:08:50 +00:00
Shawn Rutledge
9868d8af83 xcb: include <cmath>
Fix trouble compiling with gcc 4.4.7 on Centos 6

Change-Id: Id81bd570e896507a07388257c4f75f80b4b468fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-02-19 17:08:43 +00:00
Marc Mutz
13034e67c0 Make public headers compile with -Wzero-as-null-pointer-constant
... or similar.

This amends previous commits that converted the majority of
cases.

Task-number: QTBUG-45291
Change-Id: I219cdeddca7063a56efeb4fee0e5bb2cbdc7732b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-19 16:37:33 +00:00
Shawn Rutledge
3f4eba746d xcb: properly initialize size in millimeters if XRandR is not supported
QXcbScreen did not set the m_sizeMillimeters if the xcb connection does
not support XRandR. This caused physicalSize() to return an invalid QSize.

This change fixes a regression compared to Qt 5.4 discovered by a
broken unit test for KWin on KDE's CI system, which uses Xvfb and by
that no XRandR support.

Task-number: QTBUG-49885
Change-Id: Ie472a194ba410f0748ccfda8aa467727fafa10a3
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-19 16:35:29 +00:00
Alexander Volkov
7cd23a7d5f xcb: Properly initialize available geometry when XRandR is missing
Take an intersection of the screen geometry and the work area.

Change-Id: Ia61d090ac103cb4d13d656ec09037f642b255a79
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-19 16:35:24 +00:00
BogDan Vatra
aa85ebc266 Android: Fix immersive mode
The activity exits immersive mode when displaying a dialog. To fix the
problem we must use onWindowFocusChanged to update updateFullScreen
every time when we've gotten the focus.

Task-number: QTBUG-38759
Change-Id: I9f11a82dba484dbec6daba7cbf116f16fe2ba372
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-02-19 11:42:05 +00:00
Eskil Abrahamsen Blomfeldt
7906255ef2 doc: Clean up old references to QApplication for GUI application
Since Qt 5.0, there's been a separation between QGuiApplication
for generic GUI applications, and QApplication for applications
using Qt Widgets. The docs in QCoreApplication has not reflected
this, however, and was still recommending QApplication for
any GUI app.

Change-Id: I7b2b166170d1e20755889767cda3d555fbbc666a
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Nico Vertriest <nico.vertriest@theqtcompany.com>
2016-02-19 11:35:52 +00:00
Friedemann Kleint
b20548f999 Windows QPA: Fix warnings as shown by Qt Creator's Clang based code model.
Code except font, accessibility and file qwindowswindow.cpp.

Task-number: QTBUG-50804
Change-Id: I40848264f9fa16eea00cf70d7be009c484c49e92
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-19 11:11:08 +00:00
Eskil Abrahamsen Blomfeldt
342c909b34 Qt Quick: Fix selection when mixing line breaks and line wraps
The enabler for finding selection ranges in Qt Quick had two bugs
which caused some selected text to disappear. Specifically, this
was the case for selected text where a line contained both an
explicit break and a break due to line wrapping.

First of all, the glyphsEnd that is passed into glyphRunsWithInfo()
is expected to be inclusive, since we are actually searching for
its index in the log cluster array. We would in certain cases
not find the glyph at all in the log clusters, thus the glyph
run would be set to overlap with any glyph run coming after it
in the same item.

Second of all, we need to start searching at the correct position
in the log clusters when searching for the correct rangeStart,
since rangeStart is initialized with textPosition. Otherwise, we
would in some cases never reach the start of the range, and
rangeStart would be set to textPosition + textLength, which is the
end of the range.

Task-number: QTBUG-49596
Change-Id: I436ba3f1c7414d4f5044d9b70aa04c60b01755e4
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-19 10:47:57 +00:00
Eskil Abrahamsen Blomfeldt
fef629cd91 Disable unneeded ligatures when letter spacing is set
For writing systems where glyph substitutions are purely
cosmetic, we should disable them when letter spacing is set,
otherwise we get ligatures where the spacing is not applied.

To avoid changing Harfbuzz-NG upstream, we detect this
case when fetching the GSUB table and return an empty
blob instead.

Task-number: QTBUG-44393
Change-Id: Ie5f6b2d795d7fecbba0ece3941fb70ba7f04c395
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-19 10:47:54 +00:00
Paolo Angelelli
67ced1d9c4 OpenGL: Fix for incorrect GL enum in getter
QOpenGLShaderProgram::defaultInnerTessellationLevels() uses the wrong
GL enum. This patch fixes it.

Change-Id: I2d7ebfad27f7b36d3047d80bfacba65c43c68165
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2016-02-19 10:37:20 +00:00
Friedemann Kleint
11cd0902e6 Re-enable tst_QTreeView::setSortingEnabled on Windows.
The test was made insignificant for Windows in change
f3939d943e. As the failure is not
reproduceable locally, re-enable it. Also split apart the test.

Task-number: QTBUG-51149
Change-Id: I6a06bdf2369bc3bdbc73dfe4fa416e9d644f8b01
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-02-18 22:54:19 +00:00
Friedemann Kleint
8917cdf13b Windows QPA/font code: Fix warnings as shown by Qt Creator's Clang based code model.
Introduce C++ casts and add some conversions. Where possible, increase
const-correctness.

Task-number: QTBUG-50804
Change-Id: Idd73730ae83b837c065c8c80f500d5336570f228
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-18 22:54:02 +00:00
Friedemann Kleint
bb8f01c601 QRasterPaintEngine::penChanged(): Assert on painter state.
Task-number: QTBUG-48823
Task-number: QTCREATORBUG-14888
Change-Id: I043a777da6b4e3dfdc58770fb136240a57707cb7
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-02-18 22:53:37 +00:00
Friedemann Kleint
5d2068b912 Prospective fix to stabilize tst_QMdiArea::subWindowActivated2()/xcb.
Ensure that the window is active (as otherwise
QMdiArea::activeSubWindow() returns 0) and add a QTRY_COMPARE.

Change-Id: I7edb01d43fd2635864266614ef9a0e844f76edbf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-02-18 22:53:22 +00:00
Błażej Szczygieł
78ad8f208d xcb: Fix drag and drop between xcb screens
Set the proper screen before creating a shaped pixmap window in
QBasicDrag::startDrag(). Grab mouse again when D&D window is
recreated.

Task-number: QTBUG-51215
Change-Id: I5cb47d3b11672b56d17b32072d84a722bdcdcd9a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-18 20:08:07 +00:00
Lars Knoll
4889269ff0 Fix quadratic behavior when converting from QVariant
The old code called insert for each item, leading to constant
reallocation of the data structure. Instead rely on the fact
that a QVariantMap (as well as the variant list) is sorted, so
we can convert to the QJson data structure in one go without
lots of reallocations.

Task-number: QTBUG-44737
Change-Id: Id2d38d278fb9afa5e062c7353b4d4215bdfb993c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-02-18 07:38:37 +00:00
Lars Knoll
03f1a69e9c Avoid size overflows when inserting into very large JSON objects
QJson has a size limitation for arrays and objects. Make sure we
don't go over that size limit and create corrupt objects when
inserting data.

Change-Id: I45be3caefc282d8041f38acd120b985ed4389b8c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-02-18 07:38:28 +00:00
Oswald Buddenhagen
6342fb2c3e Bump version
Change-Id: I62b55dde4a21a46470cafcc0e0b46bc70c097052
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2016-02-18 07:38:22 +00:00
Jake Petroules
cf47e2e181 Fix build when QMacStyle is disabled.
Change-Id: Ica66ab2b48266590b14d16a323b572f63168a580
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-02-18 07:38:17 +00:00
Jake Petroules
de82352d28 Wrap legacy APIs in a QT_MAC_DEPLOYMENT_TARGET_BELOW macro.
If the deployment target is OS X >= 10.10 or iOS >= 8.0, we always have
the NSProcessInfo API available and do not need to compile-in this code
at all.

Change-Id: I8470a5be475a82e7b88d62f4558925f62527b6f6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-02-18 07:38:06 +00:00
Vyacheslav Grigoryev
34472e946a QSqlDriver: use table prefix in WHERE clauses
If the WHERE clause is used in a query involving multiple tables,
such as generated by QSqlRelationalTableModel, the table prefix
may be necessary to disambiguate column references. It is harmless
if not needed.

Task-number: QTBUG-43320
Change-Id: I39e1ab7359bf748afa8bcd8578220e3abb3ee24a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2016-02-17 23:13:58 +00:00
Friedemann Kleint
ed4ef55ec5 QtNetwork: Silence Clang on Windows.
Remove dead code and fix override.

Task-number: QTBUG-50804
Change-Id: I9cc28507e549d56a1f15fcc54bb6f7465beef644
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-02-17 18:58:18 +00:00
Ariel Molina
42b39f9827 Add source device information to qDebug output of QTouchEvent
This is a simplistic patch to make it easier to debug touch input when
using multiple physical or virtual devices.

Change-Id: I996237cdce5e0ff0c4a0660dabb0d190679ab585
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-02-17 05:07:14 +00:00
Gabriel de Dietrich
049fad42a2 QWindow: Make screen warning more informative
Change-Id: Icd7933422e272434370ae6080348de6159d2e725
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-02-17 04:57:53 +00:00
Gabriel de Dietrich
9212727813 QOpenGLExtensionMatcher: Fix possible use of unintialized memory
Some drivers don't support GL_NUM_EXTENSIONS, so we may be reading
random bits from numExtensions.

Change-Id: Ibe61fa6d7c379f3f1428458edd3e0ddba0eb04d7
Task-number: QTBUG-48943
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-02-17 04:57:21 +00:00
Anton Kudryavtsev
a3b8e355fc QListView: fix skipping indexes in selectedIndexes().
Remove spurious increment of i.

Task-number: QTBUG-51086
Change-Id: I4307a6728de1e7f25c8afa31fe2066f92373f3fc
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-17 04:53:16 +00:00
Maurice Kalinowski
5b727576b1 winrt: add logging to platform plugin
Task-number: QTBUG-38114
Change-Id: I24c96bb2e29e1bbfe93dfe45aa764451aa9ddde8
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-17 04:52:41 +00:00
Maurice Kalinowski
e7a06c9843 winrt: Fix clipboard
Native implementation was missing and so far it only used the Qt
internal fallback mode.

Unfortunately this does not apply to Windows Phone 8.1.

Task-number: QTBUG-49766
Change-Id: I8cbbb0c843d077d7df1396d673fedeab2799b5a6
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-17 04:51:46 +00:00
Maurice Kalinowski
ad16703fa8 Update testdata
Some entries were not updated and tests failed to succeed on platforms
which need to deploy content/testdata.

Change-Id: Ieb2b44c375b04cbaaecc1fb2303cc2478b86a100
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-17 04:50:50 +00:00
Maurice Kalinowski
8b0dc80294 winrt: Fix usage of testdata
testdata needs to be deployed to temp and current directory
needs to be set to that directory for the test to succeed.

Change-Id: I2dd023af9073d90afbb4ad60fcfb50bb1af4e159
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-17 04:50:14 +00:00
Maurice Kalinowski
6c7c34f219 winrt: Disable tests which connect to localhost
WinRT does not allow do connect to the localhost due to security
constraints and sandboxing. Hence we need to disable those
currently.

Change-Id: Idb8c71397a41e5fa5bad9d618dba1bb389e71b9c
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-16 19:35:10 +00:00
Liang Qi
e19fc4324b Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2016-02-16 19:20:37 +00:00
Liang Qi
0d239d1d92 Merge remote-tracking branch 'origin/5.5' into 5.6
Change-Id: Ic011149c50dcbff3468d8fbdd3069a51ecd8f21c
2016-02-15 19:04:06 +01:00
Friedemann Kleint
bfb47b39f6 Windows QPA: Fix the signature of the font enumeration callbacks.
Instead of casting the function in the calls to EnumFontFamiliesEx(),
use the correct signature and cast inside the callbacks. Also
avoid unconditionally casting the TEXTMETRIC parameter to
NEWTEXTMETRICEX since according to documentation
NEWTEXTMETRICEX is passed for TrueType fonts only.

Task-number: QTBUG-50804
Change-Id: I0393474ac06000fc3f12d2dbc2a5aa37a6b44849
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-02-15 14:53:49 +00:00
Samuel Gaist
58141642b6 Doc: Fixed Qt::TextWordBreak to Qt::TextWordWrap
Change-Id: I0c50eab22c7ffaa7f39111b37979b92fd5c7f35f
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2016-02-15 14:22:29 +00:00
Samuel Gaist
018e670a26 OS X: Implement download folder display name query
Up to now, the download folder display name was queried using
FSFindFolder and kDesktopFolderType. Now that NSFileManager can be used
unconditionnaly, the query has been replaced to use NSFileManager.

[ChangeLog][QtCore][OS X] QStandardPaths now returns the correct
display name for the download folder.

Task-number: QTBUG-50262
Change-Id: Ie16c8daea3261a4dd5ca051956fc08d51656e0fa
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2016-02-15 14:22:14 +00:00
Heiko Becker
c689bcafd3 Search for libsystemd first, fall back to libsystemd-journal
systemd >= 209 merged the individual libraries libsystemd-journal,
libsystemd-login, libsystemd-id128 and libsystemd-daemon into
a single library, libsystemd. To ease the transition one could pass
an option to its build to generate stub libraries and matching
pkg-config files. With systemd >= 229 this option has now been
removed, causing the build to fail when the journald option is
enabled.

Change-Id: I26670f207f1a9e79c16be5ce8c8a49353143c5ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2016-02-15 13:32:21 +00:00
Liang Qi
80bf4bfe3d Merge remote-tracking branch 'origin/5.6.0' into 5.6
Change-Id: I0b190005377a23a91da3563428e223b8a3b18333
2016-02-15 08:09:50 +01:00
Friedemann Kleint
ac8a3b948d QtGui: Use QImage::constBits()/constScanLine() in non-const contexts.
Prevent potential detaching by using constBits()/constScanLine() instead
of bits()/scanLine().

Change-Id: If03f8d4d3b8ed4c07aed5eff7f580e57ca771919
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-13 08:17:00 +00:00
Friedemann Kleint
9915630d08 QPlatformWindow::screenForGeometry(): Use mapToGlobal().
QPlatformWindow::mapToGlobal() should be used to obtain global coordinates
for foreign/embedded windows. They do not have a parent QWindow, but the
geometry passed in might be local to their native parent window.
For normal top-level windows, this is a no-op.

Task-number: QTBUG-50206
Task-number: QTBUG-41186
Change-Id: I00889b28db69ae65057f48b9e74bd4d8cfffa136
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-02-12 18:57:19 +00:00
Friedemann Kleint
966e893151 Windows QPA: Prefer const-versions of API where applicable.
Ensure no detaching occurs by using Container::constFirst()
and QImage::constScanLine().

Change-Id: Ie197d795d9329de8be76ed388ba2c71ccf201f5c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-02-12 18:57:00 +00:00
Maurice Kalinowski
62984d8918 Fix input pane usage on Windows 10 IoT Core
Running on Raspberry Pi casting to IInputPane2 fails with E_NO_INTERFACE
as there is no input pane available for the device.
However, if E_NO_INTERFACE is returned from the lambda, then deletion of
the ComPtr holding the AsyncAction in runOnXamlThread() crashes
somewhere deep internally of Release().

As we do not check for the return value anywhere, avoid the crash by
returning S_OK instead.

Change-Id: Icd38ec482b365285a482e5ff792ec1b4f13317d5
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-02-12 18:03:53 +00:00
Sérgio Martins
70fb36e4bd docs: State that QMap::equal_range() returns an open-ended interval
Change-Id: If31dd078aeb92e479db8c1f0a5e58e56b549b5f6
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-02-12 17:26:55 +00:00
Joerg Bornemann
707068bd66 Remove Windows CE build hacks from QWindowsPipeWriter
Those were added in ancient times to make QWindowsPipeWriter compile
on Windows CE. It was never used though.

Change-Id: Ica71b182f7ee4e47d9e33638d78475842b2ecdff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-12 16:46:16 +00:00
Joerg Bornemann
3cf4c492c2 Document QWinOverlappedIoNotifier restrictions
Change-Id: I13cd14c29ddaf4c7423d672b0551081f87d8726b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-02-12 16:46:10 +00:00
Marc Mutz
448e9fdb57 Enable NRVO in QJsonObject::keys()
... for poor compilers (such as GCC).

The test (!d) was changed to match what other
member functions test for, e.g. toVariantHash().

Change-Id: I85aee0df6e50da3623ad0afce24abb586e0bd1bc
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-02-12 16:33:04 +00:00
Błażej Szczygieł
8dc55367ca QtGui: Avoid rgba64->rgba32 conversion on every pixel in gradient
Convert rgba64 color table to a new rgb32 color table only once. Use
this cache when required.

This patch can 2x speed up gradient painting using 32bit color format.

Task-number: QTBUG-50930
Change-Id: I9212e01e397c2e0127cdf3070cc49880a2d8df88
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2016-02-12 16:20:36 +00:00