Commit Graph

14535 Commits

Author SHA1 Message Date
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
Tor Arne Vestbø
327a87cfe4 iOS: Set PLUGIN_CLASS_NAME for platform plugin
Change-Id: Ic8c5181d753925de0d8cd5fcb5e1347429ff5ba3
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
David Faure
794330e40f Doc: ignore "Q_NORETURN" in function signatures.
Needed by the upcoming function
    Q_NORETURN void QCommandLineParser::showHelp(int exitCode)

Change-Id: Ie8550d2d0eff9eb20e629eef4952fa2b0b10f873
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-13 01:38:54 +02:00
Jerome Pasion
4bea83fe71 Doc: Fixed qmake manual's images and snippets directories.
-corrected qmake.qdocconf file to not read the manual twice
-moved the snippets and images directories to make sure they are not
 in the src directory

Task-number: QTBUG-32580
Change-Id: I7b702ce3b1c8709bbb1f473f70625083242f1a40
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-08-13 01:38:54 +02:00
Konstantin Ritt
4b0dfef236 Fix Undefined Behavior due to delete new[]
This didn't crash just because a simple type was used.
On other platforms/compilers it may eat your cat or whatever.

Change-Id: Ica2631e4e8ad20ff3a7f4cab60ec8487b6fa70ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-12 23:06:02 +02:00
Konstantin Ritt
2af5567f3e Update QLocale locale database up to CLDR 23.1
This only added Kosovo [XK] territory and few valid locales for it.

Change-Id: Ia0b47041ed5cd1303b5bc233f2502a3725c74da9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-08-12 23:05:59 +02:00
Raphael Kubo da Costa
faea8d1056 gdb_dwarf_index: Use a sed call that's more POSIX-compliant.
sed versions other than the GNU one often default to being POSIX-compliant,
in which case "+" (with and without escaping) is always an ordinary
character.

Achieve the same functionality in a way that works with both GNU and BSD
seds by using "xx*" insted of "x\+".

Change-Id: I1d2576a8c0e17b31f01a44d9632c57991e53780d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-08-12 22:29:30 +02:00
Thorbjørn Martsum
28c6841283 QMessageBox - add detailed text to manual test
Even though detailed text does not work that well, it should still
be in the manual test.

Change-Id: I051f9f0592ad9206dc42f0e9929c1be32baec832
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-08-12 19:59:43 +02:00
Matt Broadstone
ade0d8361c add QScopedPointerDeleteLater, a custom deleter for QObjects
This is a custom deleter for QObjects that are participating in an event
loop (e.g. waiting for signals to complete a task), which need to be
deleted using deleteLater() rather than just delete.

Change-Id: I3084ea28a6829a299c7400006c617fc23cf15160
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-08-12 19:41:05 +02:00
Oswald Buddenhagen
0aad3fc742 purge QT_{SOURCE,BUILD}_TREE from dictionary
both variables are available class-wide anyway.

Change-Id: I97c13de9ead44638e9310b62f02d8cd1c910df94
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-12 19:01:52 +02:00
Oswald Buddenhagen
ae95f28997 bye-bye .qmake.cache
well, not really - qt_parts.prf will still create one, but it will be
empty.

apart from being cleaner, this now finally makes it possible to load an
unconfigured qt source tree into qtcreator without random parts of the
tree being missing from the project explorer.

Change-Id: Ida7ee77ecb450af05bfa66106caf2067b02f1a7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-12 19:01:45 +02:00