Commit Graph

15899 Commits

Author SHA1 Message Date
Christoph Schleifenbaum
7e768dde39 Widgets: Never revoke focus by click on focused widget.
When clicking on a widget currently focused, w/o having Qt::ClickFocus
set as focus policy, the focus should stay on the widget and not get
propagated to the widget's parent.

Task-number: QTBUG-34042

Change-Id: I53f1153829cc7228de02a90e38125b5cf4ee5008
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-18 20:38:41 +01:00
Sérgio Martins
cd93a2c0e1 Windows: Fix bug where windows stopped painting after a restore.
This is an improvement over 6800728d where we only fixed it if
the window was in "normal" state (Qt::WindowNoState) before
minimizing.

With this patch, if the window was previously maximized or
full-screen it will also get the expose events when being
restored.

Change-Id: I4a30423145e0999c5d0a5ee2a989730b83f4e3f2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
2013-11-18 10:14:30 +01:00
Thorbjørn Martsum
aafbd7392e QHeaderView - do not ignore -1 as minimum section size
We claim that -1 is a special automatic value, but calling
setMinimumSectionSize with -1 is unfortunately ignored due a
regression in 524c3e05e8

Change-Id: I7d7e5dbbf78e561849d2f2352c9edb2df36aa181
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-17 20:49:00 +01:00
David Faure
2026e50259 QCommandLineParser: add word-wrapping algorithm
Rather than breaking at column 79 precisely, break entire words,
to improve readability.

Change-Id: Ie30db00f0e6ed95cce87480c3b91804826c6076b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-11-17 00:45:03 +01:00
Friedemann Kleint
afe8e36872 Stabilize tst_qabstractitemview.
Center windows on screen to avoid conflicts with Unity taskbars,
observe minimum geometry for Windows, move cursor out of the
way for Mac. Introduce QScopedPointer to ensure cleanup in
case of failures.

Change-Id: Ic169e015e795597457b8e85a28ff7fcb7b9b9430
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-11-16 14:57:10 +01:00
Michael Brasser
42aacbf5eb Improve interaction between QPlatformTheme and QPlatformIntegration hinting.
Ensure that custom style hints returned by subclassed
QPlatformIntegration::styleHints() are used if not explicitly overridden
by subclassed QPlatformTheme::themHints().

Task-number: QTBUG-34589
Change-Id: I0a3114cb00b532d2a5cd40941eca192b32412bcf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-11-15 19:05:27 +01:00
Sérgio Martins
f59e29d9bf Don't accept wheel events if sendEvent() returns false.
Otherwise wheeling over disabled items won't let the wheel event
propagate to the parent.

An easy way to reproduce the problem is by having a flickable with
some disabled item in it.

Task-number: QTBUG-33477
Change-Id: Ib327cc34dd9f415617ffbc41064f689507446c05
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-15 12:42:36 +01:00
Friedemann Kleint
e2557933cb Remove QTRY_ macro from tst_qabstractitemview.
Change-Id: Ic8b8e5c242b640581aa735a3716666d4e7ff44eb
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-11-15 12:42:36 +01:00
Jan Arve Saether
de5b3780cf QFormLayout: Avoid assertion with negative spacings.
It's not really clear if styles *must* return a non-negative value for
QStyle::pixelMetric(PM_Layout{Vertical,Horizontal}Spacing), but both
QBoxLayout and QGridLayout seems to be robust enough to handle this.
They will simply make sure that the spacing is never negative.
We therefore make QFormLayout equally robust.

Task-number: QTBUG-34731

Change-Id: I62235bfcd8adf7757cf15bc9927b29650ae6459d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-15 09:15:13 +01:00
Jan Arve Saether
191f96cb88 Avoid compiler warning about alignment for MSVC2013 (x64)
Only align if we actually *need to* (due to SSE/XOP usage)

The code will currently not compile as it is now with UseSSE or
UseXOP defined, (so the ALIGN macro could just
be totally removed). In order to keep the diff to upstream as small
as possible, we keep the ALIGN macro definition.

Task-number: QTBUG-34362
Change-Id: I6cf420205896e3a476cdcfbf3308a07e0ae0c84e
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-15 09:14:40 +01:00
Marc Mutz
f75c5c7dc6 QKeySequenceEdit: add to qfeatures.txt
QT_NO_KEYSEQUENCEEDIT was only added to qfeatures.h whose removal killed the feature.

Change-Id: I0644bcffdd814bb0bdb4c94d281d56fa3baff3a3
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@me.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-11-14 19:00:02 +01:00
Marc Mutz
4d1ece8b44 QKeySequenceEdit: simplify clear()
As the test case shows, clear() is semantically equivalent to
setKeySequence(QKeySequence()), so implement it that way.

Change-Id: Id68edbbf85aac3bcff82c81310c38274ed8e6708
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-14 18:59:54 +01:00
Marc Mutz
6b745d6c63 Move MaxKeyCount from QKeySequenceEditPrivate to QKeySequencePrivate
Adjust users and add a static_cast that MaxKeyCount be 4. That is instead
of adjusting all the code to use MaxKeyCount instead, some of which
cannot be thus changed (e.g. where using the QKeySequence(int, int, int, int)
constructor).

This was requested in the original review, but never implemented.

Change-Id: I3812340890f4d75257139f04e73e83083ca09760
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-14 18:59:38 +01:00
Simo Fält
ee53530a0e Mark tst_qgl as insignificant in angle build
All ci nodes are currently missing 3d support, when that is enabled
this test will start to fail.

Task-number: QTQAINFRA-711
Change-Id: Ie6b840e290a9371fa895681e58d6dedf55b777e6
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-11-12 07:11:07 +01:00
Fabian Bumberger
fd619946be Refactor QQnxWindow
This patch does following things:
* Remove the root window: First window which is created will serve as a root window
* Allow creation of more than one application window (with every app window having
  an own window group) on one screen
* Fixes a bug when reparanting an EGL window

Change-Id: I1afd64a813bc084c0893b958aa191d4a25c32b9d
Reviewed-by: Matt Hoosier <matt.hoosier@garmin.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-11-11 04:24:57 +01:00
Gunnar Sletta
d4ade9d4ef Request the glyph at the right subpixel offset
Change-Id: Iace18740565862f1c66e2d654a1a2e7bc1a16fc7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-10 23:04:39 +01:00
Gunnar Sletta
f9399d69ad Force FT font engine to load the right glyph metrics
Change-Id: If027ea4c1a3b2ca8f972592abe3534165f62cf4e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-11-10 23:04:21 +01:00
Giuseppe D'Angelo
8462a6933c Remove a boolean trap in QLayout::replaceWidget
Use some flags instead.

Task-number: QTBUG-34668
Change-Id: I9a75253c8eb98164c594bb6bb06c1a16c9609537
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-10 14:09:55 +01:00
Marc Mutz
9af6fd5d8a QKeySequenceEdit: give nested line edit an objectName
People request this, and other widgets do this, too (say, QSpinBox).

Change-Id: I275537fb82b805b0dcb8edba87b8e234985f8d1f
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-11-10 14:09:45 +01:00
Marc Mutz
944fe9b8bc QKeySequenceEdit: make setKeySequence a slot
There's a signal keySequenceChanged(QKeySequence), so the setter
should be a slot, too.

Change-Id: I6591bad071444ffa252a2fdb9ccaf28e8629f59c
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-11-10 14:09:33 +01:00
Giuseppe D'Angelo
c819a89269 Document the BC break of viewportSizeHint() in itemviews
Since users were not supposed to use this feature at all, just
live with the BC break, but document it. In order to prevent possible
problems in the future, introduce dummy overrides in QAbstractItemView
and QListView as well. Also, fix the visibility of the overrides
(it's protected, not public).

Task-number: QTBUG-34667
Change-Id: Ib4554ae5e1e7d3ce4ea8e8703e1fea9e2231edb0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-09 15:42:49 +01:00
BogDan Vatra
ef6544ee27 Android native message dialog
Change-Id: Ief8c3ce3b8683c6960f046245844c1835a327d51
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-11-09 10:41:25 +01:00
Thiago Macieira
315ba388f3 Avoid signed integer overflow by making an addition a subtraction
The task has a very good explanation. The use-case was
  ba.remove(n, INT_MAX);
since you can't pass -1 to the length, and that results in overflow when
you add n+INT_MAX.

Task-number: QTBUG-34694
Change-Id: I365eb86b2d0dabbe0bde67e4e7f33d64fd5793af
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-11-09 07:02:00 +01:00
unknown
f767d3a1b2 QTimeZone - Fix Windows Transitions
The Windows tz transition routines were not checking for a number of
invalid scenarios, in particular where there are no next transitions
able to be calcualted, leading to infinite loops.

Change-Id: I262b4321a95be1df4228774ada3908f8d3ed6c1a
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-09 01:11:07 +01:00
John Layt
9b7e6cb83d QTimeZone - Fix Mac Transistions
Fix nextTransitions() where there are no next transitions and improve
performance of previousTransition() and data().

Change-Id: I5d44525554243d139ba8d5f86e41bdfc0f7bfc25
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-09 01:11:00 +01:00
Giuseppe D'Angelo
5dc8ab409f Move QTreeView::accessibleTree2Index to the private class
It's not needed to expose that symbol.

Change-Id: I65b752a41d80eb0779969fa3887c081b4c2c88db
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-11-08 22:17:14 +01:00
Thorbjørn Martsum
5f5c879832 QHeaderView - remove confusing bool
It is probably better not to have a default boolean in
QHeaderView::setResizeContentsPrecision

Task-number: QTBUG-34665

Change-Id: I0bb2c35abc1d5713bb3ee65df3af86c04f175a38
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-08 22:17:03 +01:00
Peter Hartmann
becdfa6fab QSslConfiguration: rename [get]session() to [get]sessionTicket()
to reflect the fact that this returns and sets the whole session
ticket, and not just the session ID.

Change-Id: I00fe2bc4197dbcd7a02b3ae4f2f84e3a2a7edad0
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-11-08 18:58:27 +01:00
Maciej Kujalowicz
f45e12f91a iOS: Send expose event when a window changes the geometry.
When the EAGLView view changes its layout, it must send the expose event
along with the geometry change. It is important to notify the render loop
of the scene graph that the windows's geometry has changed. The render loop
is waiting for the WM_Expose event and updates the scene's window size accordingly.
See QSGRenderThread::event for reference.
Without this notification, the geometry of window is updated, but the scene is rendered
incorrectly, for example when the orientation of screen changes.

Change-Id: If102014313de455cb1f44d772b478d2feae6dacf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-11-08 18:52:36 +01:00
Shawn Rutledge
d60e0c3bc1 Remove disused version of QPlatformMessageDialogHelper::clicked signal
It has been replaced with a version that sends both the button and
the role.

Change-Id: I47156288bf2039cfdfd4cf09f75563347bfb4141
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-11-08 16:45:26 +01:00
Shawn Rutledge
7e5452a23f Fix QFileDialog::getSaveFilename() with a given default name
The QFileDialogOptions::initiallySelectedFiles were overridden, and
the given filename was also not properly converted to a local file URL.

Task-number: QTBUG-34408
Task-number: QTBUG-34446
Change-Id: I51d05b954a5393d10db9232945ba05bda7068e73
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-08 16:45:26 +01:00
Sze Howe Koh
706eeadf3a Doc: Move threading overviews from qtbase.git to qtdoc.git
- This topic is  relevant to multiple modules, as illustrated by the
  "Thread-Support in Qt Modules" page. Multithreading can be done in
  both C++ and QML.
- Moving also fixes links to QML-related pages.
- Snippets are copied, not moved. QThreadStorage docs need them.
- QDoc: "DEPENDS += qtdoc" added to keep the "\reentrant" command
  working. It creates a link to the "reentrant" keyword.

Change-Id: I2cdf6139e62d66911561c30fcca7aab160a694b1
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-11-08 16:45:26 +01:00
Geir Vattekar
8647bac9cf Doc: Added some Qt Quick examples to manifest-meta.qdocconf
Change-Id: Ie199b48faf885d9a50b7dfd8a73cc99e69998102
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2013-11-08 16:45:26 +01:00
Kai Koehne
7a78a22e65 Prevent clang from warning about unused variables
Fixes a compiler warning introduced by 79b975756a

Change-Id: Ie9bc677d061f0bb0530eae88715069042b2ab440
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-11-08 16:45:26 +01:00
Olivier Goffart
34d21610ba QVariant: Convert automatically from enum types to integral types.
[ChangeLog][QtCore][QVariant] Variant containing enum types can now
be converted to integer

Change-Id: Ibbbc9ae29ab45d67c582fa2d406afc19c5dc41ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-11-08 16:45:26 +01:00
Olivier Goffart
2ee97f505b Fix QVariant::canConvert with longlong
Add few cases where conversion to or from LongLong was missing

We need to make it work if we want to use variant.canConvert<qint64>

[ChangeLog][QtCore][QVariant] Fixed QVariant::canConvert with longlong

Change-Id: I0f65073802b62d99250601dd90a8cd2e4d934b60
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-11-08 16:45:26 +01:00
Friedemann Kleint
dd262dc7f5 Revert "Fix setVisible() of QWidget has no effect in QTreeWidgetItem"
It introduces  QTBUG-34653 (Qt Designer widget box no longer
repainted after collapsing items or using the filter).

This reverts commit 04de24c644.

Task-number: QTBUG-13522
Task-number: QTBUG-34653
Change-Id: Ieb9766e7f15acea901fce4ad7142aa72557b9957
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-11-08 16:45:26 +01:00
Morten Johan Sørvig
fbcad545ce NSUrlConnection backend for QNetworkAccessManager
Add support for QNetworkAccessManager https REST on
iOS, without adding a dependency on OpenSSL.

The current limitations are:
- Overriding server certificate trust issues (for
  example expired certificates) is not supported.
- Usage on non-gui threads is not supported.
  NSurlConnection needs a CoreFoundation-based event
  loop, which Qt currently only provides when using
  QGuiApplication on the main thread.

Change-Id: Ic6f74591d40c3b2248ab81db12647e432377cd4f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-11-08 14:37:27 +01:00
Giuseppe D'Angelo
2d1bb6d61d Prevent a crash in QLayout::replaceWidget
Item might be null.

Change-Id: Ia432a35cb1a6bb02ee056ff8ad44a9f35bdbc146
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-08 14:18:14 +01:00
Gabriel de Dietrich
c934ea341e Cocoa File Dialog: Remove sandbox-ufriendly file system watcher
QFileSystemWatcher causes sandboxing errors since its backend uses
POSIX API in a relatively liberal way.

Also, Cocoa already acts as a file system watcher, and calls
-[QNSOpenSavePanelDelegate panel:shouldShowFilename:] on each
file. From a logical point of view, caching the directory content
can be replaced by testing the current file against the filter
setting. We expect Cocoa to cache results, and by using NSFileManager
things should remain relatively fast.

Task-number: QTBUG-34107
Change-Id: Ia872b9b1244f7b390d173a498011379b9309b3c6
Reviewed-by: Cyril Oblikov <munknex@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-11-08 11:35:29 +01:00
Friedemann Kleint
7a3c82077f Fix potential BC break in QColorDialog.
Replace newly reimplemented virtuals in
d928dbbc91 .

Task-number: QTBUG-34663
Task-number: QTBUG-14332

Change-Id: Idb2cc2ec237c96f7157470728bb79ff3efc504d0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-08 11:16:51 +01:00
Friedemann Kleint
7a6bb4d9c9 Fix potential BC break in QTabBar.
Move code from mouseDoubleClickEvent() to event().
Introduced by 252bad7c58 .

Task-number: QTBUG-34670
Change-Id: I98ed24f26977220cf03524cfe001524364473982
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-11-08 10:44:06 +01:00
Tor Arne Vestbø
ac7823129a iOS: Cancel any active touches when destroying a QIOSWindow
Keeps the internal state of QtGui sane when it comes to which buttons
are active, etc.

Change-Id: Ic63e74d2546469e085ec46b74f4cf159dd409b07
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-08 07:21:40 +01:00
Tor Arne Vestbø
59be0509e0 iOS: Detect/handle cancellation of subset of touch points
Change-Id: I0d345d07fe62a8c7844333bf1eed9be6d6fa432f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-08 07:21:29 +01:00
Tor Arne Vestbø
24d1f58414 iOS: Rename QIOSWindow's backing view from EAGLView to QUIView
Matches the cocoa QNSView and highlights the relation to UIView.

Change-Id: Idcdb17bff994c1e0aef099400c21915a7041e44c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-08 07:20:08 +01:00
Tor Arne Vestbø
a301e868f7 iOS: Rename m_requestedGeometry to m_normalGeometry
Matches the wording using in QWidget.

Change-Id: Ifbb4e5ffa90b47a7c179cf9ec52cb46126d7bccc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-11-08 07:19:57 +01:00
Liang Qi
b2f2636217 Cocoa: fix a crash in QCocoaFileDialogHelper
Current directory can't be nil.

Task-number: QTBUG-34561
Change-Id: I58c84da4928bd9081c916b6e5541bb86cf75ed47
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-11-08 05:29:38 +01:00
Peter Hartmann
8db127b0b5 qfeatures.txt: add section about XML schema
... so the XML schema part can be disabled in the xmlpatterns module,
while still using other functionality (e.g. XPath).

Change-Id: I3599ea8f915d34e0b1ba5d6a30f3f6269a4c992e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-11-07 20:13:50 +01:00
Shawn Rutledge
8aab8ccc0f Dialogs: provide the StandardButton->ButtonRole mapping in QPA
As the QPlatformMessageDialogHelper will be implemented repeatedly,
it's useful to have this mapping in one place for reuse.  Also, since
we do not guarantee that either accepted() or rejected() will be
emitted for every possible button on a QtQuick MessageDialog, it's
useful for the QtQuick.Dialogs module to have access to this mapping
to interpret individual button presses and emit the role-specific
signals such as yes(), apply(), help(), etc.

Change-Id: I7be753080794adabb784df9b95ac04aa1c29151c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-11-07 18:40:33 +01:00
Eskil Abrahamsen Blomfeldt
42670c7c45 Android: Allow modules to specify permissions/features
Some modules, such as Qt Multimedia, needs special permissions
to avoid getting exceptions at run-time. We should apply these
by default to the AndroidManifest.xml so that an application
using e.g. the camera will work out of the box.

Task-number: QTBUG-33953
Change-Id: Ibc1f086d249197b63e7ed1075ae7d54bdd1212f2
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-11-07 16:37:37 +01:00