Commit Graph

23549 Commits

Author SHA1 Message Date
Erik Verbruggen
e2405dd63f QStateMachine: replaced Q_FOREACH with foreach.
Change-Id: I2bd0f9d7ef1d6f236e2afa9fc5b75c5a6f61a250
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-04-22 10:16:26 +00:00
Erik Verbruggen
7d84eb7025 Cocoa: Stop using deprecated -convertBaseToScreen:.
Replaced by -convertRectToScreen:.

Change-Id: I38e2b5918a5ee528d6ce65f676e542e365d610a3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:16:16 +00:00
Erik Verbruggen
1fe2349762 Cocoa: stop using the deprecated NSInputManager.
Replaced by NSTextInputContext.

Change-Id: I694b28b766f8bf1d37e0ee87ff503e33d205f8ab
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:16:12 +00:00
Erik Verbruggen
5350ee7ad5 Cocoa: fix compiler warning.
/Users/erik/dev/qt5-stable/qtbase/src/plugins/platforms/cocoa/qcocoaapplication.mm:137:18: warning: case value not in enumerated type 'NSEventSubtype'
      [-Wswitch]
            case QtCocoaEventSubTypePostMessage:
                 ^

Change-Id: Ib496e61a6939f021c90234fef3689b1643003ddd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:16:08 +00:00
Erik Verbruggen
56cdd12649 Cocoa: fix compiler warning.
/Users/erik/dev/qt5-stable/qtbase/src/plugins/platforms/cocoa/qnsview.mm:702:22: warning: incompatible pointer types assigning to 'QNSView_QtNS *' from
      'NSView *' [-Wincompatible-pointer-types]
        targetView = popup->contentView();
                     ^~~~~~~~~~~~~~~~~~~~

Change-Id: I9e7e25ee9b6dc80ee6f438dc85417838039d440a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-22 10:16:04 +00:00
Stephan Binner
a40379de1a fix build with -warnings-are-errors
Change-Id: Ic8929ed77f0f2fa8ca7a8d7a91cfbe48918c2043
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-22 09:57:01 +00:00
Liang Qi
b31e98d477 Don't use anonymous types declared in an anonymous union
At least clang is unhappy with them when -Wnested-anon-types is enabled.

Change-Id: Ia9869fecb836b27be69f7b9715fd614f384bb912
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-04-22 08:49:39 +00:00
Frederik Gladhorn
fe7f4a6d85 Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-04-22 10:20:55 +00:00
Olivier Goffart
0ad05259a5 QWindowsStyle: Do not rely on the widget to draw the dock title
There is no need to query widget->isWindow when this information
is present in the QStyleOption state (it is even set using isWindow
in QStyleOption::init)

Change-Id: I4f3bbdd9c70d6253e9301bc168d61c7ecdbfdc06
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2015-04-22 08:13:51 +00:00
Liang Qi
aed5a71683 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/statemachine/qstatemachine.cpp
	src/corelib/statemachine/qstatemachine_p.h
	src/gui/painting/qdrawhelper.cpp
	src/plugins/platforms/xcb/qxcbnativeinterface.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/plugins/platforms/xcb/qxcbwindow.h
	src/testlib/qtestblacklist.cpp
	src/tools/qdoc/node.cpp
	src/tools/qdoc/node.h
	tests/auto/gui/painting/qcolor/tst_qcolor.cpp

Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
2015-04-22 09:25:54 +02:00
Gatis Paeglis
628fa13ea4 Fix "Unsupported extension used" error
This error message was a result of calling *_randr_* functions
in QXcbWindow::updateGeometry without checking if the X server
provides the XRandR extension.

Change-Id: I165f201c32ca0f4976f9ff9b9f17323098940511
Task-number: QTBUG-45624
Task-number: QTBUG-45388
Task-number: QTBUG-45312
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jan Kundrát <jkt@kde.org>
2015-04-21 23:18:50 +00:00
Lars Knoll
d3d10cf23d Improve error handling in qtestlib
Dump a stack trace on Linux if the process crashes. This will give us
much better log output in the new CI system. In addition, create a
watch dog thread, that kills the test if the test function times
out (ie. hangs)

Implementations of the stack trace dumping for Mac and Windows
are still pending.

Change-Id: I65426c5afe290a0a2019b881436a0c278f1cafaf
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-04-21 16:19:09 +00:00
Oswald Buddenhagen
4c96367410 make fileFixify() calling convention somewhat sane
instead of allowing arbitrary input and output base paths, restrict them
to the project input and output dirs (in any permutation), which are the
only cases ever used anyway.
this permits much clearer call sites, and allows later optimizations.

Change-Id: I48d149a4417af5c858e66ec57c476a5bc6b17f17
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:20 +00:00
Oswald Buddenhagen
6234dec41f unhack Xcode shadow building
explicitly use the correct directories instead of temporarily changing
into the output dir. this makes the code less obfuscated.

Change-Id: Ia935987f486151ae556910703cc20945c7610ffc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:17 +00:00
Oswald Buddenhagen
2c0730839b Revert "Use relative path for QMAKE_BUNDLE_DATA"
turns out that a relative path makes some versions of Xcode crash.
so use an absolute path again.
fileFixify() has been fixed for shadow builds to make this possible.

This reverts commit 6ccf0a326e.

Task-number: QTBUG-45424
Change-Id: Ica87c6c29f990f56e42c399b6d9b1c7eacdd13a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-04-21 12:06:13 +00:00
Oswald Buddenhagen
6accf40a14 make fileFixify(FileFixifyAbsolute) pay attention to in_dir
... instead of sheepishly assuming qmake_pwd().
it also canonicalizes consistently with the relative output path now.

Change-Id: I86231f7259179020643405f3c0e696a74031aa4e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:10 +00:00
Oswald Buddenhagen
ed4bdd3eec fileFixify(): remove bizarre canonicalization
it would trigger only if the input file name was already absolute,
matched the native path separator, and some (likely) other conditions.

as this behavior was almost unpredictable, it would be not very useful.
so save ourselves the headache and just remove it.

Change-Id: Ic457f487f6d0ce9f7a5f192859c9efa9c2de2b63
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-21 12:06:06 +00:00
Oswald Buddenhagen
b532250237 remove pointless argument to build_args()
it's always empty.

Change-Id: Icd97b5ac5b77c119174fdce2671f69c88c607428
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:06:03 +00:00
Oswald Buddenhagen
8e380c2021 remove redundant definition of ANGLE_ENABLE_D3D11
config.pri already defines it (as needed).

Change-Id: If0e87d23a560c6de37457b2d8d3a84b6dc16396f
Reviewed-by: Andrew Knight <qt@panimo.net>
2015-04-21 12:05:59 +00:00
Oswald Buddenhagen
497974abe3 don't try to include non-existing private module .pri
amends b8f79e7095.

Change-Id: If4358634a66947d7644224466b239e470d15afda
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:05:56 +00:00
Oswald Buddenhagen
e662dc21b8 disable automatic PCH compilation for headers-only modules
there is neither a point in building a PCH that will never be used, nor
does it even work with the aux TEMPLATE.

Change-Id: I2fe11f951f81adf5e15066ed60f983003c76b451
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 12:05:53 +00:00
Oswald Buddenhagen
3444e23652 make QMAKE_CXX/CROSS_COMPILE verification work under windows
automatically append the .exe extension. this is done unconditionally,
which means that providing it in the spec is wrong by definition.

don't use system("which") (which won't do what we want in a windows
shell), but scan PATH ourselves. as a bonus, this is also faster.

to avoid fetching and splitting the path multiple times, factor out a
function in spec_pre.prf.

Change-Id: I95f0fa285c158b347d45422111f91540e3a595fd
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-04-21 12:05:50 +00:00
Laszlo Agocs
a989e5c54f Enhance QWindow::devicePixelRatio() docs
Document that fact that for non-create()'ed windows this is the
same as QGuiApplication::devicePixelRatio() which is the highest
dpr in the system. This has consequences when running with multiple
displays so application developer's have to be aware of this.

Change-Id: Ic05a18732ff021659da04428cb49421ac3453870
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-21 11:50:54 +00:00
Bjoern Breitmeyer
4d2b7e5f2e Remove libs that are already set by the mkspec.
Change-Id: I79c47e5a49ce048c634e4bc708b632e51133c027
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-21 11:38:12 +00:00
Bjoern Breitmeyer
2e18c9af26 Fix incorrect pass by value.
Make sure we don't pass by value, but by const reference.

Change-Id: Ia432e881d2b8116f22a30dfa31186479784ee4a1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-21 11:37:54 +00:00
Bjoern Breitmeyer
60a384cf2f Add QMake support for WEC2013 SDKs
CESDKHandler now retrieves available WEC2013 SDKs from the registry and
assembles a working build environment.

Change-Id: Ifa70f53aca9d1bf2fadf178a331f46c1efca90ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-04-21 11:37:48 +00:00
Timur Pocheptsov
bf23091e6b Cocoa integration - invalid window state
QCocoaWindow::syncWindowState incorrectly sets m_effectivelyMaximized as !m_effectivelyMaximized
after calling zoom. But zoom can trigger windowDidEndLiveResize, which also can set m_effectivelyMaximized,
so double negation results in ... the previous value. Fixed.

Change-Id: Iea974132a1854a258e27635e8779d7d8c02bfc0c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-21 11:21:22 +00:00
Timur Pocheptsov
8b1f01e573 Cocoa integration - invalidate backing store on geometry update
Invalidate backing store in updateGeometry in case we do not flush
events (this happens if we're in setGeometry).

Change-Id: I36b9ae532a3e11620c8aba7c5e92007942260684
Task-number: QTBUG-44313
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-04-21 11:21:13 +00:00
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