Commit Graph

23571 Commits

Author SHA1 Message Date
Friedemann Kleint
cba5556953 Skip tst_QFiledialog::directoryEnteredSignal() depending on side bar entry count.
The test relies on having at least 2 entries, which is not always the
case.

Change-Id: Ief812c598409fe829edb930e563740e5f2213580
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-21 11:11:41 +00:00
Aleix Pol
9286a8e5dd Understand file:/ url's as local
When making a QNetworkAccessManager query, don't require a network
session in case of file:/ queries, like we do when "localhost" is the
hostname or a loopback device.

Change-Id: I4faab7cf356ee53e6e13ab55b152365680af9446
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-04-21 11:09:33 +00:00
Marc Mutz
05d1693793 Add qHash(QMatrix) and qHash(QTransform)
QMatrix and QTransform can be compared for equality,
so qHash should be overloaded, too.

[ChangeLog][QtCore][QMatrix] Added qHash(QMatrix).
[ChangeLog][QtCore][QTransform] Added qHash(QTransform).

Change-Id: I1ce925ebe258c9d7e35b68e5ac5c3373f1460c58
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-21 07:28:14 +00:00
Frederik Gladhorn
299350f668 Remove unused function
Change-Id: I2f629ce9a414c822aba20000f36f06a18594c7a3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2015-04-20 20:07:47 +00:00
Sérgio Martins
84ad129440 Fix inconsistent overrides. [-Winconsistent-missing-override]
Change-Id: I7c27632cdda13ebc8ee5d2bc18d9ba64c1f4ec70
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-20 08:45:50 +00:00
Nikita Baryshnikov
ad03511256 QDir: fix int overflow
This caused reverse order of session items in qt creator. Introduced
in ba287c55ef.

Change-Id: I5c37ca6a1ef4753b6449eb9e87b4def5ea858677
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-20 07:43:58 +00:00
Milian Wolff
a91ac8d5a6 Optimize QXcbKeyboard::lookupString.
For the common case of strings smaller than 32 chars this removes a
temporary QByteArray allocation and the second call to
xkb_state_key_get_utf8.

Change-Id: I81cbbf2df683476b38c2ffb96119293cd5b09a90
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-20 07:43:39 +00:00
Marc Mutz
0495970631 Add qHash(QMimeType)
QMimeTypes can be compared for equality, so qHash should be overloaded, too.

[ChangeLog][QtCore][QMimeType] Added qHash(QMimeType).

Change-Id: I32608760cb7ef5e47f49192d0205cdca3d4e1765
Reviewed-by: David Faure <david.faure@kdab.com>
2015-04-20 07:42:09 +00:00
Marc Mutz
adfe9ea1e0 Add qHash(QVector)
QVectors can be compared for equality, so qHash should be overloaded, too.

[ChangeLog][QtCore][QVector] Added qHash(QVector).

Change-Id: I2aacce55d416abf2492631a504a02c6e8fc4ff1c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-20 07:42:03 +00:00
Marc Mutz
f9063758cb Add qHash(QUrlQuery)
QUrlQueries can be compared for equality, so qHash should be overloaded, too.

[ChangeLog][QtCore][QUrlQuery] Added qHash(QUrlQuery).

Change-Id: I626258a938359b49a0cae02012b6cba5ef1fe784
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-20 07:41:56 +00:00
Marc Mutz
5fdc64f566 Add qHash(QList)
QLists can be compared for equality, so qHash should be overloaded, too.

[ChangeLog][QtCore][QList] Added qHash(QList).

Change-Id: I9ad91811f12479764cc17d87192539612ceb0b4c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-20 07:41:44 +00:00
Marc Mutz
1b5f29e28a Remove <qhash.h> where it's not used
To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5)
in public headers.

Change-Id: I6117e8a6b11200d2f1a0a94a0e87d5c27538218e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-20 07:41:34 +00:00
Marc Mutz
103086e379 Replace <qhash.h> with <qhashfunctions.h> where applicable
To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5)
in public headers.

Change-Id: Ic3398f4f330e15a3b55065858add26b90fd70e6c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-20 07:41:27 +00:00
Shawn Rutledge
280084cf96 QFileDialog: save settings to FileDialog group instead of serialized
The byte array serialization needed versioning, whereas a collection
of separate settings is more robust and accessible.

Task-number: QTBUG-36888
Change-Id: I790b1d7574707261923a7a33ccd8bcc596a69de5
Reviewed-by: David Faure <david.faure@kdab.com>
2015-04-20 07:13:13 +00:00
Harald Hvaal
8fb881900c Enable checking for whether the system palette was explicitly set
In order to obey a palette set globally on QApplication, an application
attribute for checking if it's set at all is added.

Task-number: QTBUG-39800
Change-Id: I26b965e6e18e0e1ca4df03cf343b3527df3636b2
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-20 06:39:31 +00:00
Martin Smith
6526a4e136 qdoc: Remove #ifdef Q_QDOC for uses of QPrivateSignal
Signals marked with QPrivateSignal had the QPrivateSignal marker
ifdefed out for qdoc. This is no longer necessary, so the #ifdefs
are removed.

Change-Id: Idb334ed311c6ed6883d7b7b5a3fcdede60c4a1f8
Task-number: QTBUG-45535
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-04-20 06:25:20 +00:00
Oliver Wolff
d0c96c65ec Rework WinRT timer handling
The former way of timer handling caused heap corruptions
as the timer callbacks tried to access the event dispatcher
after it was freed.

So instead of accessing the timers inside the callbacks
we use native events to signal their expiration and also
to cancel them.

Task-number: QTBUG-44973
Change-Id: Ib9348651c0545cc4393f0396601f9a5bb183c996
Reviewed-by: Andrew Knight <qt@panimo.net>
2015-04-20 06:14:07 +00:00
Caroline Chao
848f01f9fb Tests: Use blacklist for failing tests in tst_macnativevents
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST
file. The tests blacklisted have been found using CI builds logs.

Change-Id: I1a963bdc24f7657731dc0374a8e2c3cbaa49f126
Task-number: QTBUG-22775
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-17 14:07:14 +00:00
Marc Mutz
ab8366b592 QList: remove (const_)iterator copy ctors
The compiler-generated ones are just fine.

Change-Id: I528431040552326dad043b3b8d0db6af8146d3d2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-17 09:46:15 +00:00
John Layt
92ea91836e QPrintDialog - Let OSX handle PDF printing
If the user selects to Save as PDF in the native print dialog, then let
OSX generate the PDF. Primarily this is to fix QTBUG-38820 where by
setting the output mode to PdfFormat we prevent the native print dialog
from being called again. This was a regression in 5.1. It also allows
for smaller, better quality PDFs with the ability to select text until
QTBUG-13826 / QTBUG-10094 fixes the font rendering. Once QTBUG-36112 is
also fixed we can consider changing back to Qt's internal PDF support.
See also QTBUG-36687 and QTBUG-26054 which are related.

Task-number: QTBUG-38820
Change-Id: I74bd885902860ac70068ab25e95765c7f0ee911c
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2015-04-17 05:22:36 +00:00
Milian Wolff
7f82b9258e Ensure the UTF-8 string for a xcb_keycode_t has the correct length.
On my platform (Archlinux, libxcb 1.11-1) and a recent build of Qt dev
I noticed that writing anything to a QLineEdit was broken, as not only
the character for the pressed key was inserted, but also what looks
like whitespace. A simple debug program showed that a "\u0000" is
appended to every character in the QString text associated with a
QKeyEvent, which brought me to QXcbKeyboard::lookupString.

The QByteArray to QString conversion using QString::fromUtf8 includes
the \x00 byte at the end of the buffer.

By leveraging the size returned by the xcb API and passing that to
QString::fromUtf8 we can prevent this problem from arising.

Change-Id: Ic1d4390e4154e9ed729cd23286811d6eecdf54f6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-04-17 01:08:49 +00:00
Thiago Macieira
6668f5becf Implement a more direct headersclean check
Test each include file directly, instead of doing a large #include. This
verifies that each header is compilable on its own. One big advantage of
doing it via a special compiler in qmake is that we skip pre-compiled
headers, which has hidden build errors in the past.

This solution is implemented by making syncqt produce a second list of
headers.  This list is the same as the list of headers in the source
code to be installed, minus the headers that declare themselves to be
unclean, via the pragma:
  #pragma qt_sync_skip_header_check

This mechanism is applied only for public libraries (skipping
QtPlatformSupport, an internal_module).

This test is enabled only for -developer-builds of Qt because it
increases the compilation time.

On QtTest: the library only links to QtCore, but it has two headers that
provide inline-only functionality by including QtGui and QtWidgets
headers (namely, qtest_gui.h and qtest_widget.h). If those two modules
aren't getting compiled due to -no-gui or -no-widgets to configure, we
need to remove the respective headers from the list of headers to be
checked. If they are being built, then we need to make QtTest's build
wait for the headers to be generated and that happens when qmake is
first run inside the src/gui and src/widgets directories.

Change-Id: I57d64bd697a92367c8464c073a42e4d142a9a15f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-17 00:54:45 +00:00
Allan Sandfeld Jensen
964ccc5853 Remove separate SSE4 unpremultiply function
Merges the SSE4 specific unpremultiply with the normal version, and
adds a SSE2 fallback. There was no reason to split the two since
compile time options will ensure the right version is inlined.

Also adds short-cut for 0 and 255 values.

Change-Id: Ie5aa262f6964219fd3062d4a498f697cf79a4595
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-16 19:24:06 +00:00
Gatis Paeglis
365c63e7b1 Fix regression in compose table parsing
Performance optimization from 1aab68648 revealed
that "composeValueEnd" needs adjustment for compose
sequences that result in a quotation mark, for example:

<dead_diaeresis> <space> : "\"" quotedbl # REVERSE SOLIDUS

Change-Id: I66bf83fbe62727f1ee245aae90f8d0eb53dea6d4
Task-number: QTBUG-45538
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-16 18:57:51 +00:00
Marc Mutz
28dcb7101e QFileSystemEngine: optimize from...(qgetenv())
Use the QByteArray overload, which no longer calls strlen(),
but uses the QByteArray length.

No danger of embedded NULs, because environment variables
cannot contain NULs.

Change-Id: I33fe479adfce2624c7042608e8e0a5c5b54a85db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-16 18:48:04 +00:00
Christoph Schleifenbaum
be6b27aaa1 Cocoa: Remove NSMenuItem setEnabled used in wrong way.
Whether menu items are enabled or not is not set via NSMenuItem's
enabled property but depends on the return value of CocoaMenu's
validateMenuItem.

Change-Id: I5673da18ab9eb3510b773e0ab520e5382a160844
Task-number: QTBUG-42511
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-16 18:13:08 +00:00
Laszlo Agocs
5744cbde42 Fix unused variable warning in graphicsview
Change-Id: I65ec4a7aefde3ac6682e44837cd8867fdf940070
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-16 16:48:06 +00:00
Laszlo Agocs
fd2e245edf Avoid signed-unsigned warning on OS X
Change-Id: I61db35a367b1a96b13af08a5102d6b2a55c68517
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-16 16:48:00 +00:00
Laszlo Agocs
b596acbefb Avoid warnings with clang 6
warning: 'this' pointer cannot be null in well-defined C++ code

The code tries to be smart but compilers warn about this unfortunately.

Change-Id: Ifb8deafe8834d580beef829a3079ae9222acfa8f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-16 16:47:56 +00:00
Laszlo Agocs
f3fad26bc9 Add matching by GL_VENDOR to QOpenGLConfig
This will be essential on Linux, especially Embedded where PCI IDs are
not that useful.

Change-Id: I2fa8ca07236e8aae203e21fe629d12aab092c7fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-16 16:47:43 +00:00
Laszlo Agocs
71e3ce7f0b The default wrap mode is REPEAT
As per spec, both for OpenGL and OpenGL ES. No wrap mode is
applied unless setWrapMode() is called so the default values
should be initialized to match OpenGL's default.

Correct the copy-paste mistake in the warning messages.

Change-Id: I094cc511dc7de4a214da61faadb1fc362270b2d4
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-04-16 16:46:35 +00:00
Allan Sandfeld Jensen
b7d7527720 Map X11 AudioPause button
Add a missing mapping for the X11 media key AudioPause.

Change-Id: I2888854a021192942c7e8d47d581d834e1f39736
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2015-04-16 16:06:37 +00:00
Laszlo Agocs
700eb7a2a5 windows: Add a version test to the Intel HD blacklist
The original rule was way too broad: it disabled desktop GL many
HD 4400 machines that have no problems with it at all.

While the rule with the version check is somewhat dubious, it is the
only thing we can do.

Task-number: QTBUG-45505
Task-number: QTBUG-43263
Change-Id: I217a96a2a9c7cc2d000a8f06493d0857626f2aaa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-16 13:14:28 +00:00
Michal Klocek
cbb918753c Fix crash when qt compiled with dbus support and no dbus interface.
Add check if interface exists before calling it.

Change-Id: I86762fd9b82131d12aac0281c86eca549752fdbd
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-04-16 13:01:45 +00:00
Timur Pocheptsov
c52c8e5e1e Fix compilation error (OS X 10.8, warnings as errors)
Failed to compile on my OS X 10.8 (unused variable warning treated as error)

Change-Id: I7ee881d4b905539361a10e93cff76b44ec08afbf
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-04-16 12:14:13 +00:00
Eike Ziller
5e8e04a29f OS X: Do not re-create tracking areas over and over again
NSTrackingInVisibleRect already makes sure that the tracking area
updates itself, so we only need to add our tracking area if it is
missing.

For some reason this also fixes that Qt mouse tracking was broken after
showing e.g. an embedded native WebView.

Task-number: QTBUG-21944
Change-Id: I8013517f474f18e44b1ddd411defe1b6e60f05bf
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-04-16 11:40:26 +00:00
Allan Sandfeld Jensen
a7303e45db Move composition out of qdrawhelper.c
Also changes the way the SSE2 composition modes are inserted into the table,
so it is handled like all the other tables and doesn't require duplicating most
of the table.

Change-Id: I8de383caece0367bc7466d7a1b145aa820c3bd6a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-16 11:23:20 +00:00
Marc Mutz
1ae657344c QScopedValueRollback: add two strategic qMove()s
Use moves instead of copies when the rhs is no longer needed
afterwards.

Change-Id: If053bfce03b886099688452ada74f6a6f36db5c2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-16 09:46:23 +00:00
Marc Mutz
fb144aabbf QScopedValueRollback: use ctor-init-list
Avoids calls to the default ctor for member 'oldValue'.

Change-Id: Ieb9570b74e4a46b28c04625fac3ce267074c4a76
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-16 09:46:15 +00:00
Marc Mutz
d3dfb8d8f1 QSignalBlocker: mark all functions as noexcept
Consequently, mark also QObject::isSignalsBlocked() and
QObject::blockSignals() as noexcept.

Change-Id: Iaf44674bbf54eeb2bb5f267eb7caa916eccbf7fb
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-16 09:46:09 +00:00
Marc Mutz
198190b76b QList: make QListSpecialMethods dtors protected
QList publicly inherits from QListSpecialMethods. Thus, any specialisation
of QListSpecialMethods should make their destructor protected, to avoid
deletion through a pointer to QListSpecialMethods invoking UB.

Change-Id: I7e317606f84826cc0faf1bfc05dee97da6eaf2eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-16 09:46:00 +00:00
Martin Smith
aea74dcaee qdoc: Properly document "private" signals
When a signal declaration is marked with QSignalPrivate,
This note is included in its documentation: "Note: This
is a private signal. It must not be emitted by the user."

For Notifier signals, [see note] is appended to the signature line,
and the Note is printed below the list.

Change-Id: Ie792894ace56cda47fd9a45af9c732f408ac45f6
Task-number: QTBUG-45535
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-04-16 09:36:39 +00:00
Alexander Volkov
6c3937c339 xcb: Remove unused qxlibconvenience.{h,cpp}
This is dead code since 05351b0cde.

Change-Id: I6ea37046f48bedf85730c5e5a6dc27e08de4de54
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2015-04-16 09:35:15 +00:00
Allan Sandfeld Jensen
528279febe Optimize non-native bilinear transforms
Reading directly from an array instead of calling a function pointer
is much faster.

Change-Id: I833b33448bad064d6f38d2f9ff44138d90206822
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-16 09:32:31 +00:00
Paul Olav Tvete
d4bc56cb42 Fix screen detection on configureNotify
If we got two rapid screen changes in a row, we would disregard
the second change. This happens because QPlatformScreen::screen()
is updated asynchronously, so if we got a screen change A --> B
immediately followed by B --> A, before the first screen change
event had been processed, we would compare with the old value
and conclude nothing had changed. This can happen on creation: if
the initial geometry of the window is outside all physical screens,
the window manager will immediately move it.

The solution is to compare the new screen to the locally cached
value.

Change-Id: I5440dc035cac4fba4f29ac563e36dfe3e2f82aea
Task-number: QTBUG-45076
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-04-16 09:32:19 +00:00
Kai Koehne
090002618f Fix compilation of xcb-qt without system xcb headers
Make sure the plugins are actually using the 3rdparty headers we ship,
not the system ones.

Change-Id: I5c857abee8e62c207843f9d29c369620be0d7da8
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-04-16 09:26:26 +00:00
Andy Shaw
4f81719983 Pass on the auto repeat information for key events
Task-number: QTBUG-45340
Change-Id: Iecc55987fa784e4bf14317d9d4a085a8f0b58451
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-04-15 21:04:45 +00:00
Allan Sandfeld Jensen
95f694682e Implement radial and conical gradients for rgb64 rendering
Adds the last two missing source types to rgb64 rendering.
Conical and radial gradients. At the same time linear
gradients are moved to a template form to increase code
sharing.

Change-Id: I30fdd0837b0da03e3447683856ebbe4d7f48df6c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-15 19:34:04 +00:00
Liang Qi
f98d125b29 Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5 2015-04-15 15:53:16 +00:00
Topi Reinio
c09ff1dbcb qdoc: Don't end sentences with a full stop in requisite tables
This is a minor visual change that stops QDoc from ending the
sentences with a full stop in the tables for class/QML type
requisites (Inherits, Inherited by, etc).

This ensures a uniform look for the table, as some of the
fields were already omitting the full stop.

Change-Id: I37b39ed0a5e273b40b24f24602042194d069ed00
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-04-15 13:14:17 +00:00