Commit Graph

14545 Commits

Author SHA1 Message Date
Eskil Abrahamsen Blomfeldt
c8b0c428d2 Android: Add default values for min and target SDKs
The minimum SDK version supported should be set to 9, since this
is required by Qt. We also set the target SDK version to 14, since
this will remove certain compatibility features, like the overflow
button in the action bar.

Task-number: QTBUG-30860
Change-Id: Iddd0eba2e802d03c5fe6e9b5da626808bbbad71d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-08-21 11:45:08 +02:00
Friedemann Kleint
a4d4e18c31 XCB: Suppress warnings about unhandled client messages.
Introduced by the tray icon refactoring
d8090022f6 among other things.

Task-number: QTBUG-33068
Change-Id: I7c536c68acc2fae39ca30afb401500d0dc8701b1
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-08-21 11:13:56 +02:00
Jerome Pasion
31c96d34d2 Doc: Renamed list of example page to "Item Views Example".
Previous name caused a conflict with another page with the same name.
This page will replace the one in qtdoc.

Task-number: QTBUG-32580
Change-Id: Ifda8841feaab4def6c16972a027947f75ccb7739
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-08-21 01:20:01 +02:00
John Layt
2f2a799f3d QDateTime - Fix tests to correctly restore time zone
The unit tests were caching the original TZ value to restore later
after testing with different TZ values.  The problem is reading TZ will
return a null value if no override TZ value is set, and if you then set
the TZ to null the system assumes UTC and not the system time zone.
Instead we need to unset TZ if it was null to start with.

Change-Id: Ib0625b1712e565f9fdfa99e2ffe1e5d74f059354
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-21 01:20:01 +02:00
Sergio Ahumada
1696f45d92 configure: Remove v8snapshot vestiges
Change-Id: I0a43320ca0ab7cc416b07396ebc795215d84fe10
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-20 23:00:34 +02:00
Oswald Buddenhagen
ca06fcfb43 don't include non-framework include paths when using frameworks
Change-Id: Ia72d5b611b9870b83846299bc7642841b09b84b1
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-20 22:56:20 +02:00
Oswald Buddenhagen
b4c0d9166e change reporting of missing files
use the new parser flags to report all i/o errors directly.

as a notable side effect, the "WARNING" prefix is gone (even though
it is still treated like that, which is mildly insane to start with).

Change-Id: I084375d5e7a3314ae763795f7c318804a9fb84b6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-20 22:56:12 +02:00
Oswald Buddenhagen
15981b985f complain about absent files to -pro argument (in lupdate)
this doesn't actually do anything in qmake.

Change-Id: I908fc3792bdc321370e51be98adf7a9c81e37a85
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qttools/e1f3732197ef77a29cb7f3c1ce094b3f31a7b689)
(cherry picked from qttools/226f013441990aa4a58f7c82e284057cff659959)
2013-08-20 22:56:07 +02:00
Oswald Buddenhagen
0a1faaa9eb avoid boolean argument trap: introduce QMakeParser::ParseFlag
Change-Id: I26ce032a1aa044e9a4da0c8708a4490b07374992
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qttools/066b08fc62c67d586996ea4e272ef05dd3865fac)
(cherry picked from qttools/226f013441990aa4a58f7c82e284057cff659959)
2013-08-20 22:55:59 +02:00
David Edmundson
725bdc3fd2 Fetch StandardKey shortcuts from QPlatformTheme
This allows platforms to dynamically alter their keyboard
shortcuts, for example if they are user-configurable on that
platform. Current behavior remains the same.

QEvent previously used the hardcoded values in QKeySequencePrivate so
this was modified to use QKeySequence::keyBindings().

In order to keep the speed of QEvent's former binary search, we moved
this code to QPlatformTheme::keyBindings(), making it faster for all
keyBinding lookups.

As we now need to search by StandardKey instead of by shortcut the list
is reordered and a test is changed to reflect that.

Change-Id: Iefb402fbbe8768be2208ce036f3c2deed72dcc6c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-20 22:22:21 +02:00
Rohan Garg
e2322c885f Extend QStyle API with a SH_Splitter_OpaqueResize styleHint
Currently the default for QSplitter::opaqueResize is hard coded,
which is less than ideal. Instead this should be provided as a
style hint via QStyle so as to give a more uniform look to all
applications.

Change-Id: I5711811f7b672e36aafcd292ed320308570a0390
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-20 20:09:20 +02:00
Stephen Kelly
692bee634e Add missing PLUGIN_CLASS_NAME
Change-Id: Ic2d59ac9194d6756c9f978fb1c13baf3fa7009b7
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-08-20 20:09:20 +02:00
Konstantin Ritt
227e9a40cf Get rid of HB dependency in FT font engine
Instead of loading HB face in QFreetypeFace::getFace(), defer allocation
until the first FT font engine for that face gets initialized;
then, QFreetypeFace "reparents" and manages the loaded HB face.

Change-Id: I2ac8ead4c6ed25d341af9c9cf0c34dfb979f8390
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-20 20:09:20 +02:00
Frederik Gladhorn
cbb4a88262 Skip tst_QGraphicsProxyWidget::deleteProxyForChildWidget on Win
This tests crashes a lot lately.

Task-number: QTBUG-29684

Change-Id: I6892238dc071f050b0208dd5b4843629fa707347
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-20 17:59:39 +02:00
David Faure
2ccf995725 tst_qgraphicsproxywidget: skip crashing test on Mac/Windows.
Created QTBUG-33067 for tracking the issue, after some debugging.

Change-Id: Iaf5556db2e0858e40a7cf6c9dbbe7e6fd6120bac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-08-20 17:59:27 +02:00
Shawn Rutledge
6281acaf8f XI2 touch support: must call deviceForId to create the device
After change 4dbf574b7a touch worked
only if XI2_DEBUG is turned on.  That is because it creates the
QTouchDevice and calls QWindowSystemInterface::registerTouchDevice,
which must be done at startup so we can receive events.

Change-Id: I9446d72bc702fbd819bf26bcdc2a3d657180f642
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-16 16:23:17 +02:00
Frederik Gladhorn
e727855476 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-08-16 16:02:19 +02:00
Uli Schlachter
ac5c64fccd XCB: Ignore _NET_WM_PING on the root window
With a _NET_WM_PING message, a window manager can check if an
application still works or if it froze. The WM sends such a message to
the application window and the application sends the message back to the
root window.

Since change Ia04268b0 / commit d8090022f "Move the X11 system tray code
from widgets into XCB-plugin.", Qt selects StructureNotifyMask on the
root window. Due to this, we now also receive replies to _NET_WM_PING
and treat them like a _NET_WM_PING request.

This caused an endless loop as soon as any _NET_WM_PING was seen where
Qt would send a _NET_WM_PING to itself and handle it again and again.

Fix this by ignoring _NET_WM_PING messages that are sent to the root
window. According to EWMH, such messages can only be replies to
_NET_WM_PING and GTK does this, too.

Task-number: QTBUG-32957
Change-Id: I1b0aa682f99b17d633baacc14b18b3adca7a1aba
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-08-16 15:54:30 +02:00
J-P Nurmi
2468db75c0 qpushbutton_p.h: add missing include guard
Change-Id: I255550e7235dcc8d2170f97e08752c2cb7cea624
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-08-16 15:50:38 +02:00
Corentin Jabot
0d8ba7e349 QThreadPool - Add method clear() to remove queued QRunnable.
QThreadPool::clear() method removes all queued QRunnable.

When a large number of long-running tasks are queud in a
QThreadPool its destruction, which calls waitForDone(), can
be quite long.
QThreadPool:clear() removes (and deletes when appropriate)
all QRunnable that have yet to be started from the queue
enabling a faster interruption.

Change-Id: Ie5d6028ad3cfe7e439d1db068c8d0936ff818db9
Reviewed-by: David Faure <david.faure@kdab.com>
2013-08-16 15:43:53 +02:00
Thorbjørn Martsum
8b86443e36 QVector - optimize removeLast (and takeLast + pop_back)
In our benchmarks this makes removeLast more than twice as fast.
(That is on my core I7 laptop with gcc on linux).

It changes the alloc test to be an assert rather than an if.

Change-Id: Id55195b9b7880e54a89be4dd9d6228d94aff23c7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-16 12:31:52 +02:00
Frederik Gladhorn
9b093871a6 Fix xlint unchecked warning (java)
This patch fixes the warning uncoverd by the -Xlint:unchecked option
by parametrising the generics with wildcards.

src/org/qtproject/qt5/android/QtActivityDelegate.java:315:
warning: [unchecked] unchecked call to getMethod(String,Class<?>...) as a member of the raw type Class
                    Method m = initClass.getMethod("setActivity", Activity.class, Object.class);

Change-Id: I665e9dfd6d64c92a491d68c838ad02bde275d604
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-16 09:22:44 +02:00
Frederik Gladhorn
340e8d801b Make java xlint warnings visible
Change-Id: If347c920df5e5aa0924a9f8d626d7e3e017d3536
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-16 09:22:41 +02:00
Thorbjørn Martsum
f633bc7f7f QHeaderView - reduce memory usage
Though the worst case memory usage was improved in
b800d8b94a the best case usage changed.

Since best case is the same as worst case in Qt5, we should
use as little as possible, which this patch ensures.

We reduce the memory usage from 3 to 2 ints per section - which is
half of worst case in Qt4. There seems to be no bigger cost in
performance doing that. The recalcSectionStartPos is still very fast.

This patch limits the maximum section size to (2^20) ~ 1.000.000 pixels.

This alleviates
Task-number: QTBUG-32325

Change-Id: I9b7530030a31b4e35cf1ca9e32c6b936f5ea9790
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-08-16 05:34:18 +02:00
Ryohei Ikegami
592c8bffd6 Add Wacom tablet support for Cocoa
Task-number: QTBUG-25867
Change-Id: I48178b8913224ac8e907d42f57620947df12e930
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-08-16 05:20:38 +02:00
Konstantin Ritt
f3ffebe5f8 initCharAttributes() micro-optimization
Change-Id: Id8e275c9b4ae0a9855b8ba8917824c79cde5a919
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-15 20:47:47 +02:00
Konstantin Ritt
a15b56b0c1 Fix possible crash due to integer overflow
QFontEngineMulti::stringToCMap() stores the fallback engine index
in a glyph index'es high byte, which means the maximum fallback engine index
it can store is 255, so limit the number of tries we're doing to this value.
Otherwise we could end up with `fontEngineMulti->engine(glyph >> 24) == 0`
after successful stringToCMap() call.

Task-number: QTBUG-30412

Change-Id: I06907a39186fd207f3ce4b732a1a54e615744082
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-15 20:47:38 +02:00
J-P Nurmi
751989df5c Replace QWheelEvent::Phase with revised Qt::ScrollPhase
Change-Id: I4d8e7d48497d0d96a297191976c0d99feb67b538
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-08-15 10:02:36 +02:00
Ryohei Ikegami
8e13a9792a Change QNSView convertFromEvent: arguemnts to QPointF
Change QNSView convertFromEvent: toWindowPoint: andScreenPoint:
arguments from QPoint to QPointF.

QWindowSystemInterface event handlers already use QPointF and
QPointF is needed for tablet support
(https://codereview.qt-project.org/#change,62740).

Change-Id: I6e5b2f19777fe24ae34e9e85028772e4be0a94f6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-08-15 03:50:52 +02:00
Konstantin Ritt
fe3c34c259 Don't allocate QGlyphLayout data, when possible
...and operate directly on a passed array pointers,
without having to copy the input and output data.

Calling QFontEngine:: stringToCMap()/recalcAdvances() with
partially-constructed QGlyphLayout is completely safe
iff `glyphs` and `advances_?` members were initialized.

Also get rid of QGlyphLayoutInstance that was used just in a single place
and never was really needed.

Change-Id: I48fab246fd69fc869f948220a553c3574d93c772
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-14 22:47:19 +02:00
Konstantin Ritt
cb7921a433 QLocale: Minor code dde-uplication
Change-Id: Ie48111a8f76798eb706d6a4036c7965d32ed542b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-14 22:47:10 +02:00
Konstantin Ritt
2e0a4b13ad [2/2] Implement Unicode Normalization Form Quick Check (NF QC)
Use QuickCheck data from DerivedNormalizationProps.txt to check
if the input text is already in the desired Normalization Form.
\sa http://www.unicode.org/reports/tr15/#Detecting_Normalization_Forms

Using NF QC makes a significant boost to most operations that rely on
normalized input data, i.e. file path conversions on Mac, where "native"
form is a decomposed Unicode string.

Change-Id: I292a9da479c6beed730528fc7000c45bf1befc34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-14 22:46:58 +02:00
Frederik Gladhorn
5c23199d4e Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	mkspecs/macx-xcode/Info.plist.app
	mkspecs/macx-xcode/Info.plist.lib
	qmake/doc/qmake.qdocconf
	src/corelib/global/qglobal.h
	tests/auto/other/exceptionsafety/exceptionsafety.pro
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp

Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
2013-08-14 09:06:31 +02:00
Christian Strømme
c8d9b17367 Fix crash in QProcess::waitForStarted() on Unix.
Invoking waitForStarted() on a QProcess before or after an unsuccessful
call to start() (e.g., with an empty command), would execute FD_SET with
an invalid file descriptor and cause the process to abort.
The bug can be reliably reproduced on OSX.

Task-number: QTBUG-32958
Change-Id: Id25b7781168489281645e21571361ca1a71d43e3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-13 19:48:15 +02:00
Gabriel de Dietrich
8c3b31182c Cocoa: Allow to hide menu items in menubar
Task-number: QTBUG-32899

Change-Id: I423ac2d636306303d39e973f19032c9004957095
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-08-13 19:48:15 +02:00
Stephen Kelly
1dcdc506f3 Fix SONAME handling on android
Set the SONAME to the library name without the major
version number appended, as android does not have the versioned
symlinks.

Change-Id: I41c504869019a393a3f112b2f7fc81c7ad5afa1c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-08-13 19:48:15 +02:00
Ivan Komissarov
252bad7c58 Add useful signals to QTabBar and QTabWidget
In this patch we introduce tabBarClicked and tabBarDoubleClicked to get
a finer grained information on the user interaction with the tab bar.

Done-with: kevin.ottens@kdab.com

Change-Id: I7be76a556ca09186e98f2e076fe2512d6c5e6773
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-13 19:28:31 +02:00
hjk
3c2c9649eb RCC: Make auto-test pick up the right binary
Change-Id: I30f42d40c69789eb1e292ab6bd1cf2c09d81b11b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-08-13 17:24:49 +02:00
hjk
90cdac0617 RCC: Mention -list command line option in -help output
Change-Id: I98066aba55f5ac699efc210360a60871042f4083
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-08-13 17:24:31 +02:00
Sergio Ahumada
983fa9b5cb test: Skip some more qsslsocket flaky tests
Task-number: QTBUG-29941
Change-Id: Iaf1c4834ef36db284464184639a1ab00928510cf
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-08-13 17:08:13 +02:00
Frederik Gladhorn
0e3ede3d17 Fix ShortcutOverrid for Qt Quick
The tryShortcutOverride function needs to be called with the
focus object. The same logic is in QGuiApplication::notify.
Applications with QGuiApplication would therefore handle
ShortcutOverride correctly where QApplication would not allow the
override.

ChangeLog: Fixed ShortcutOverrid for QtQuickControls.
Now it is possible to assign a shortcut such as "b" and still type "b" in text inputs.

Task-number: QTBUG-32928

Change-Id: I4f4ab82fd11f45174a4483a01bbbe8143dfe0724
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-08-13 16:53:42 +02:00
Balazs Domjan
0819c48e1b Fix QDialog position shift bug after resize.
On Linux (XCB), resizing a dialog shifts its position. The fix corrigates
the geometry of the dialog to the right values.

Task-number: QTBUG-32473
Change-Id: I6d38539a3ebc3b95eacc7f13a76f83fc9e4d821c
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-08-13 16:44:06 +02:00
Stephen Kelly
dfde98db52 Make the QItemSelectionModel test widgets-independent.
Change-Id: I695afe535ff291bc98f43185469a434cd9178926
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-13 16:34:16 +02:00
Stephen Kelly
45e5a6ff7c Reset the QItemSelectionModel when its model is reset.
Change-Id: I12af41adb18a2ecf8825b23d5715766dcae55436
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-13 16:34:06 +02:00
Martin Smith
91e86688fc qdoc: Clarify documentation of member functions
When implementing a custom subclass of QAbstractItemModel,
if the custom model will use MIME types other than the
default internal MIME type, the mimeTypes() member must be
reimplemented to return the list of allowed MIME types. If
mimeTypes() is reimplemented, mimeData(), canDropMimeData(),
and dropMimeData() must also be reimplemented to use the
allowed MIME types.

Task-number: QTBUG-32362
Change-Id: Iee5cf5d2dbed8a6c1f7ab47a7a4b9b03e80e8e59
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-08-13 12:30:05 +02:00
Simon Hausmann
9b7fc15edf Implement support for global whatsthis on Windows
Task-Number: QTBUG-32835

Change-Id: Ifee10d815ce0037c96eda574ab9e1af67ff6bd78
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-08-13 12:22:54 +02:00
Mitch Curtis
aec0a21f7e Add more key names to QKeySequence.
So that, for example,

qDebug() << QKeySequence(Qt::Key_Cancel).toString();

prints "Cancel" instead of "ᡀ".

Task-number: QTBUG-953

Change-Id: Ib17fc314fd018355e6a1826d26fce85fdcbbe0c8
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-08-13 12:18:01 +02:00
Konstantin Ritt
339aff06f9 [1/2] Implement Unicode Normalization Form Quick Check (NF QC)
Make Unicode tables generator take QuickCheck data from DerivedNormalizationProps.txt
into account and generate NF QC bits.
\sa http://www.unicode.org/reports/tr15/#Detecting_Normalization_Forms

Change-Id: Ib73bd42ddb8f99d0be0aff609711943c52dd9c24
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-13 03:51:07 +02:00
Tor Arne Vestbø
f4942c3cc1 iOS: Wrap Xcode projects in Makefile for convenience and subdirs support
qmake expects the generator to be the same for each node in the tree
of subdirs, including the leaf projects, which caused failures when
qmake tried to recurse out to the leaf projects and run 'make', when
the leaf project was an Xcode project.

We now wrap the Xcode project in a meta-makefile that just
calls out to xcodebuild to do the actual work. This allows us
to get rid of the hacky generator detection, and use the macx-xcode
mkspec instead of setting the generator, which is much cleaner.

Change-Id: I2fed6a4dd6343b6a320eb459ecae824553bff459
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-08-13 01:38:54 +02:00
Tor Arne Vestbø
8abeda08dd iOS: Link to platform plugin when application requires gui-private
Change-Id: I53e955f9673bd6560f44400a8fa877917107c353
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-13 01:38:54 +02:00