Commit Graph

24022 Commits

Author SHA1 Message Date
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
Thiago Macieira
644ac04af0 Change how QDebug escapes QStrings in the output
[ChangeLog][Important Behavior Changes] QDebug output for QStrings
changed compared to Qt 5.5.0 to more closely match the output of
previous Qt versions. Like Qt 5.5.0, QDebug will escape non-printable
characters, the backslash and quote characters, but will no longer
escape the printable characters.

Task-number: QTBUG-47316
Change-Id: I52dd43c12685407bb9a6ffff13f62ef68cbc80c5
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-08-06 04:53:38 +00:00
Thiago Macieira
007ad9e859 FreeBSD has pipe2, so enable it in forkfd.c
Change-Id: Ib056b47dde3341ef9a52ffff13efd1a15748e44d
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2015-08-06 04:53:35 +00:00
Thiago Macieira
84e1bb4951 Fix warnings about unused variables
Found by ICC
qglengineshadermanager.cpp(427): warning #177: variable "none" was declared but never referenced

Change-Id: Id3d5c7bf4d4c45069621ffff13f758ffaf1744d7
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-08-06 04:53:33 +00:00
Thiago Macieira
5f1a0cb42a Seed the random number generator before using QTemporaryDir
Otherwise, on some systems (Windows), we'll always create the same dirs.

Change-Id: Id3d5c7bf4d4c45069621ffff13f79ba91e0f974b
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
2015-08-06 04:53:21 +00:00
Frederik Gladhorn
4067bbc24c Fix shortcut handling with modifiers
Since d7ca800a87 the shortcut events were
only sent once. The one sent by QGuiApplication did not create a
QKeyEvent with the full native modifier state - basically the extended
key event expected everywhere.
That means that shortcuts on some keyboard layouts - like ctrl-shift-7 on
the German keyboard (resulting in ctrl+/) - would not work when the
shortcut override was tested from QGuiApplication, but then the same shortcut was
sent from QApplication with the full information, so it worked the
second time. Shortcuts of this type in Qt Quick were broken before.

Task-number: QTBUG-47062
Change-Id: I8390b9a96d0d998a2a538ac65503702e0d299cc7
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2015-08-05 16:15:05 +00:00
Laszlo Agocs
771235285c Allow sharing contexts in QOpenGLTexture::destroy()
Checking for the exact same context is too strict. The texture is valid
in sharing contexts too.

Task-number: QTBUG-47521
Change-Id: Ifdf329ef5361b48abcb7c69e08acd7e35d624a08
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-08-04 10:28:07 +00:00
Christian Strømme
a416647e38 Android: Manually detach the thread after calling quitApp.
On Android 5.0 ART will complain when we don't detach the thread before
the application is about to quit (non-fatal). This is because we
re-attach to call quitApp and then leave it attached.

Change-Id: I4571ef5f38d92afcaf91cb920ebe121a7be7835a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-08-03 14:55:26 +00:00
Alex Merry
8fdd1e3867 QLoggingCategory: fix default severity in Q_LOGGING_CATEGORY macro
[ChangeLog][QtCore][QLoggingCategory] Fixed behavior of default
severity passed to constructor or Q_LOGGING_CATEGORY with regards to
QtInfoMsg, which was previously treated as being more severe than
QtFatalMsg.

This is because the code was using the numeric value of QtMsgType as a
proxy for severity (via the <= operator), but the value of QtInfoMsg is
greater than QtFatalMsg. Instead, the severity ordering must be dealt
with explicitly.

Change-Id: I5f178afc735221b00cb67c2cea4fa964bd9079ce
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-08-03 14:40:19 +00:00
Oswald Buddenhagen
5ba3309703 fix build with no built-in image handlers
the handlers' .pri files added $$PWD to INCLUDEPATH to make the files
self-contained when used externally, but this polluted the include path
of the gui module itself, thus hiding incorrect use of QPA includes.

Task-number: QTBUG-47400
Change-Id: I576469a71e8ded0b409d62687999c0fa884613f9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-08-03 14:13:58 +00:00
Joerg Bornemann
fd10b40da2 do not warn about "untested" Windows versions
Remove the qWarning that was printed when running a Qt application on
desktop Windows versions that Qt doesn't know about.
This warning isn't helpful, it's only visible for command line
applications and it can only be turned off by rebuilding the application
with a newer Qt version.
Removing the warning is also consistent with all other platforms - even
non-Desktop Windows.

Change-Id: If1cac92ce99974335319d0b9a74f1006069abd7a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-08-03 13:51:16 +00:00
Kai Koehne
563df05723 QSslSocket: Update error string in setSocketDescriptor()
Change-Id: I03cd3886c0e2dbb07ef8d37e75df36308ee5fea5
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-08-03 07:13:36 +00:00
Kai Koehne
561ccd7ca3 Disable #pragma diagnostic [push|pop] for gcc 4.5
Fix warnings like

qalgorithms.h:40:16: warning: expected [error|warning|ignored] after `#pragma GCC diagnostic`

As the comment below also indicates, #pragma GCC diagnostic [push|pop]
is only supported from gcc 4.6 upwards. See also the GCC 4.6
changelog: https://gcc.gnu.org/gcc-4.6/changes.html

[ChangeLog][Compiler specific Changes] GCC: Fixed a regression introduced Qt 5.5.0
that generated lots of compiler warnings in Qt public headers when using
the (deprecated) version 4.5 of GCC.

Change-Id: I425388b61cd5fbf464a0f7dd46ce403d35c532a4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-08-03 07:12:41 +00:00
Friedemann Kleint
d57c661115 MSVC2015: Disable warning C4577 ('noexcept' used with no exception handling mode specified).
Fix the flood of warnings:

src/corelib/global/qflags.h(52): warning C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc

now occurring since we don't have exception handling enabled.

Change-Id: I05d12ee6303b4f9fceb48507fadfd7d1a5604ea4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-08-02 22:35:46 +00:00
Konstantin Ritt
c57c89b3c1 Don't expose qt_setQtEnableTestFont(bool) by default
Build it only in -developer-build mode for tests that might depend
on exact-matching font behavior.
Return earlier to avoid doing any useless job.

Change-Id: I966ee5689f03403e45f4c957b63e3113f0467803
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-31 09:50:17 +00:00
Konstantin Ritt
073f4f9bb2 [QBasicFontDatabase] Minor code clean-up
We do not use supportedWritingSystems anymore -> simply remove.

Change-Id: I8c8b4b0614bf396c943d810c396d18e2d0201eff
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-31 09:53:20 +00:00
Konstantin Ritt
839af2268e Micro optimization to Basic/Android FDB::populateFontDatabase()
Re-use QDir to check if dir exists
(QDir::exists() also returns false if path specifies a file),
and use somewhat faster QDir::entryInfoList() to iterate the font files.

Change-Id: Iea3a6e5548928a01db71037425adf170cb722151
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-31 09:52:49 +00:00
Konstantin Ritt
5e3e34731b Default implementation for QPlatformFontDatabase::fallbacksForFamily()
...mainly for platforms that do not provide a native/unified way
to obtain system-defined font fallbacks list
(ie !CoreText && !FontConfig).

Change-Id: I23c5589d79ddecb6311ccc52ec8b29977f06d408
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-31 09:51:35 +00:00
Konstantin Ritt
735cd0ccf3 [QFontDatabase] Defer the fallback families list initialization
Use the same trick the WebKit related path has used for years:
if there is no explicit list that takes a precedence over the
default one (i.e. QFont("Arial,SimHei")), then defer the fallback
families list initialization until it gets requested.

Change-Id: If5a74294bdebb24865c619bc0d7328b3e706de76
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-31 09:49:21 +00:00
Jeremy Lainé
76ce564674 ssl: add support for EC keys to non-OpenSSL backends
Adds basic support for QSslKey reading / writing Elliptic Curve keys on
backends other than OpenSSL (i.e. WinRT / SecureTransport for now).

Change-Id: I67012dbe6b844a3ed5b22b63e0cdbacf0497a74a
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-31 09:08:47 +00:00
Thiago Macieira
0aedca2f97 Revert "Fix performance of recursive read-write locks"
This reverts commit 666486b3ef, which
removed the QHash that protected against reader recursion
deadlocks. Without this hash, a reader will block on
d->readerWait.wait() until the writer finishes its task. However, the
writer never starts because there's a reader that hasn't released the
lock. That's a deadlock.

Change-Id: I792373bb361db35eb9e5504229c099008821a665
Task-number: QTBUG-47530
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-31 07:38:17 +00:00
Topi Reinio
590d305f99 qdoc: Fix incorrect keyword details written to .qhp for QML properties
QDoc tried to refer to an non-existing node (a parent of a parent) of a
QML property when writing the unique ID of a QML property keyword.

Change-Id: I90ab92b6ac95cfa688ca79a2c4d6c72f0e30d018
Task-number: QTCREATORBUG-3708
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-31 07:28:50 +00:00
Topi Reinio
7a1045b647 qdoc: Fix string used in compatibility members page
Add a missing space in the comment generated at the top of the
compatibility members page.

Change-Id: I21e010f9fca41346bb50c4b400325b18ff672738
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-31 07:28:43 +00:00
Topi Reinio
f80143a69a Doc: Add a \target for license information within QImage documentation
This allows us to link to it from the Qt licensing information page.
Also, replace the \legalese command with \badcode in order to
keep the license text formatting intact.

Task-number: QTBUG-46478
Change-Id: I1b5100ca0373a533bd56852ab2a8f18e72404334
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
2015-07-31 07:28:37 +00:00
Topi Reinio
8f3e7e3b47 qdoc: Add images used in examples into .qhp
Images used as resources in examples were missing from the generated
.qch files.

Change-Id: I7cdfc65b646a418e3de0b22d9a075e9a413aca29
Task-number: QTBUG-46635
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-31 07:28:25 +00:00
André Klitzing
0d3c8feeeb Fix SNI for TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater
Since SslV3, SslV2 and UnknownProtocol do not support it we can
invert the IF clause here.

Change-Id: I42e942337d01f3a8c97885b268bffa568e40d335
Task-number: QTBUG-47528
Reviewed-by: Mikkel Krautz <mikkel@krautz.dk>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-30 19:50:59 +00:00
Jeremy Lainé
d113073203 ssl: add test certificates with DSA and EC keys
The QSslCertificate tests only covered certificates with RSA keys, this
extends the test coverage to DSA and EC keys.

Change-Id: Ibee26f449cf6c1d97cbac6b511972eb44d6f0bd2
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-30 11:31:40 +00:00
Martin Koller
0617834e0c xcb: Make it compile on systems with xinput2 < 2.2
Change-Id: I7e98d3540cd7717ac8af8d1993618d18320f811a
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-07-30 07:50:07 +00:00
BogDan Vatra
d800047dc5 QLineEdit should inherit the input methods from QComboBox.
Task-number: QTBUG-39088
Change-Id: I4dfe9a052c20a4cb0a9d6b0d3337cb5095a3694f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-07-30 07:06:27 +00:00
BogDan Vatra
17caa94190 Android: Start the application when we know the screen geometry.
Until now we'se set the screenGemetry to 0,0 until the layout is
created, but some controls needs it before that.

Task-number: QTBUG-44271
Change-Id: I7d00e2a142572e27fc77e46566bb2cdb37f58035
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-30 07:06:18 +00:00
Leena Miettinen
332d41d025 Doc: QFileDialog::ShowDirsOnly not supported on Windows
The native Windows file dialog does not support displaying
files in the directory chooser.

Task-number: QTBUG-46982
Change-Id: Ib58f3d888df564d42044b81ad8e67b8aeae5f3c6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-30 06:15:30 +00:00
Joerg Bornemann
edb5f22b0a consistently handle empty program string in QProcess::start overloads
All overloads of QProcess::start will now check whether the program
string is empty and in that case
  - set error to FailedToStart,
  - set errorString to "No program defined",
  - emit error.

Until now only one of the three overloads behaved like this.

As a side effect, start(QString(), QStringList()) will not crash on
Windows anymore.

Task-number: QTBUG-47404
Change-Id: I2f93657204fe3643b1d74a74817843c05fc4a96b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-07-30 05:33:28 +00:00
Samuel Gaist
2a38265571 Fix typo in test results report for android
Change-Id: Ibb2319b1e96ce34d4c61c8504b7700a78462c56c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-07-28 21:16:19 +00:00
Samuel Gaist
454690c6a6 Fix typo in filterAcceptsColumn docs: row is used in place of column
Change-Id: Ic0ec62e4d5c4a4b1d71f14c5d3133657341d4fe3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-07-28 21:16:10 +00:00
Thiago Macieira
3a63bb0ea7 Let the linker find xcb_poll_for_queued_event for us
It's more efficient than we are. This also enables the code to work in
the unlikely case of an ELF platform without RTLD_DEFAULT.

Change-Id: Ib306f8f647014b399b87ffff13f12f8aeeb2589a
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2015-07-28 21:12:35 +00:00
Thiago Macieira
0d7af31e83 Make the function pointer to xcb_poll_for_queued_event not a member
In the normal case, this change is a no-op. In case RTLD_DEFAULT isn't
defined, this makes the job of the optimizer easier to detect that the
static variable is never modified and that it can do a lot of dead code
elimination.

This also enables the optimization in the next commit.

Change-Id: Ib306f8f647014b399b87ffff13f12f40a359233b
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2015-07-28 21:12:31 +00:00
Andrew Knight
2bcb2ce8c9 xcb: Fix build with QT_NO_CURSOR
Change-Id: I2391c2921274b7a178fbdde1d0f59f7fbaa3048e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-28 20:46:27 +00:00
Thiago Macieira
5cc734e0a3 forkfd: Fix build with uClibc <= 0.9.33
That version of uClibc has neither pipe2 nor eventfd.

There were two problems with our detection. First, it checked for glibc
incorrectly, so the comparison was always true as
	__GLIBC__ << 16 = 0x20000

Second, we needed to check for uClibc's version.

Task-number: QTBUG-47337
Change-Id: Ib306f8f647014b399b87ffff13f3023b7f8d6d4a
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2015-07-28 20:16:08 +00:00
Jeremy Lainé
ce87d82d4a ssl: fix comment typo in QSslSocket tests
The comment about non-OpenSSL backends not reproting a specific error
for self-signed certificates contained a typo, this fixes it.

Change-Id: I3010981d5d87d68ebf5e984c003b8bbbfb019b96
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-07-28 19:06:05 +00:00
Jeremy Lainé
2d43f8b79b ssl: fix QNAM self-signed certificate test for non-OpenSSL backends
Non-OpenSSL backends are not able to report a specific error code
for self-signed certificates.

Change-Id: I56bf130335b2afa65cf2bd5248a40ac0e32f74c2
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-07-28 19:05:55 +00:00
Leena Miettinen
c2406341fc Doc: uiplugin in the qmake variable reference
Task-number: QTBUG-47180
Change-Id: Ia563445e36b0abb0ef7707e7a0e4241d70e60cfd
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2015-07-28 12:17:57 +00:00
Shawn Rutledge
7e89c7b855 xcb: fix tablet proximity again
Patch 53d289ec4c caused it not to select
property change events, which are needed separately for each tablet
device.  It's not enough to select them on the master device.

Change-Id: Ibb6c7990d2edd865019eacfa7eed4bf818f7557e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-07-28 12:03:20 +00:00
Richard Moe Gustavsen
8d6ef359c8 iOS: ensure we don't overwrite a projects qmake variables
Consider a project that does the following:

launch_images.files = $$PWD/LaunchImage.xib
QMAKE_BUNDLE_DATA += launch_images

In that case we end up overwriting launch_images.files in default_post, and
at the same time, add launch_images a second time to QMAKE_BUNDLE_DATA.
The result will be that we copy our own launch image twize into the bundle.

To prevent this, prepend our internal variables with qmake_

Change-Id: I24f870874017b5388248e3bfadecd461422ffe35
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-07-28 11:02:13 +00:00
Laszlo Agocs
56a4a34eb3 Fix the internal compositing flag for QOpenGL/QuickWidget
Compositing stays active for the window even when all such widgets get destroyed.

Task-number: QTBUG-46937
Change-Id: Ib4acc90689151fd7de234806c4b5c0c472c13a5c
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-07-28 10:05:56 +00:00
Jeremy Lainé
cb05a4e8be ssl: fix native parsing of certificates with DSA keys
Fixes a typo which breaks the parsing of certificates with DSA public keys
when using a non-OpenSSL backend (WinRT, SecureTransport).

Change-Id: I250ba9948d5bd7739e281d7cd1b95cfbcb10e402
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-07-28 05:26:00 +00:00
Friedemann Kleint
4ef3d985dd Windows: Split code paths for touch/native gesture events.
Fix up 2b5df245d6 which routed
WM_GESTURE through QWindowsMouseHandler::translateTouchEvent()
causing asserts on missing touch devices.

Task-number: QTBUG-47184
Change-Id: Ie843ebb343e34487bcac9c9dbea88de641d51e28
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-27 18:03:29 +00:00
Friedemann Kleint
17c236ad05 Clear qt_tablet_target only when all buttons are released.
Task-number: QTBUG-46694
Change-Id: Ie95a452dfffd6685dd2a32068872dc18f727c288
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-07-27 18:03:21 +00:00
Richard Moe Gustavsen
5f276d7a5f iOS: add missing Q_DECL_OVERRIDE
Add missing Q_DECL_OVERRIDE to silence clang.

Change-Id: I57261a39f0dcf4e0ffd8d9c079a95f2d3347d34a
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-07-27 09:36:01 +00:00