Commit Graph

13545 Commits

Author SHA1 Message Date
Topi Reinio
032befa819 Doc: Remove applicationicon and orientation examples from QtWidgets
These two widget-based, mobile-targeted examples are obsolete, defunct,
and/or serve no purpose in Qt 5.

Task-number: QTBUG-31023
Change-Id: Ie5732734bb2547b1ea701d7b3c8dcd806362de09
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-08 14:07:41 +02:00
Olivier Goffart
3e44a72ae7 Remove references to inexisting enums in Q_ENUMS
moc currently silently ignores them, but I have a version which display
a warning.

Change-Id: I9a239cb7e99d40a57a013fb66357c4a6426d6e8b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-08 14:07:41 +02:00
David Gil
cfaa98011b Fix typos and style in QInputDialog's docs
Change-Id: I1285938efd252346c4016c8f059c7e4f78ca12a9
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-08 12:01:29 +02:00
Giuseppe D'Angelo
305300cd9c Avoid a QStringRef -> QString conversion by using the new qt_hash overload
During qHash refactorings, this line was changed as qt_hash didn't have
an overload taking a QStringRef. This causes a performance regression
w.r.t. the same code in Qt 4.

Task-number: QTBUG-30821
Change-Id: I17b27a54a73cb9061c20f1bd7f79d0c405050edd
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-05-08 12:01:29 +02:00
Thiago Macieira
3e37e3c3e9 Make the configure summary even prettier
Change-Id: Ie040fe142a5ee74c7f38a3fd2e6806b41aec4976
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-08 12:01:29 +02:00
Kai Koehne
ab94a98b58 QUrl: Fix compiler warning about uninitialized var
Fix gcc 4.8.0 warning about potential use of uninitialized variable.

Change-Id: I0881b1209e9156323b2710c50256d4bed83930ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-05-08 12:01:29 +02:00
Martin Smith
0317763781 qdoc: Documentation for QMetaObject::Connection now appears
qdoc's faux C++ parser did not recognize class declarations
of the form:

class Name1::Name2 {
...
};

...where class Name2 is nested in class Name1. Now it does,
but this fix doesn't handle deeper nestings. doc needs a
proper C++ parser.

Task-number: QTBUG-28664
Change-Id: I5adf88cc1b2ce03f5565250734416bf9592914b5
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-08 12:01:29 +02:00
Martin Smith
843b7f1a17 qdoc: Briefs from other modules now show up
The brief text for a documented thing is now output as an
attribute of that thing in the module's index file, and it
is reconstituted in the thing's tree node, when qdoc reads
the module's index file later. Only the verbatim text of
the brief is saved in the index file, i.e. no links or
other markup.

The effect is that brief texts can be used in other modules.

Task-number: QTBUG-31021
Change-Id: I932a0c85259b6d1901138f0c0959ddb9815b7db5
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-08 12:01:29 +02:00
Topi Reinio
1d22f20887 Doc: Fix paths for a number of examples
Modularized example paths are defined in module-specific .qdocconf
files. This change fixes \example command for a number of examples to
be relative to those paths. This way, the manifest files will have a
correct project path for each example.

Change-Id: I6d3dba34a1eb04a2bc294520102e232ccd0f0ba2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-08 10:01:48 +02:00
Topi Reinio
7fa4af5a97 Doc: Highlight a number of examples
Add an 'isHighlighted' attribute to selected examples to bring them
to the top on Qt Creator Welcome mode/Examples tab.

Task-number: QTBUG-29354
Change-Id: I6c72c11f1f8359d889649ff5b7f91e5c4de583bd
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-08 10:01:17 +02:00
Topi Reinio
d4966a9364 qdoc: Standardize paths used in example and demo manifest files
There is no longer any difference in install directories between demos
and examples (QT_INSTALL_DEMOS is obsolete and points to the same dir
as QT_INSTALL_EXAMPLES for compatibility). This change removes any
special handling of demos' paths used in manifest xml, enabling the
demos to be visible in Creator welcome mode as well.

Change-Id: I5afdf578a42d001fab05979d3ea1102fd52b51da
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-05-08 10:01:05 +02:00
Mitch Curtis
83315ce8b2 Revert QDateTime serialisation to pre-Qt 5 behaviour.
In Qt 5, I managed to break the guarantee that a deserialised local
datetime is the same time of day (potentially different UTC time),
regardless of which timezone it was serialised in. This happened after
I fixed QTBUG-4057 with If650e7960dca7b6ab44b8233410a6369c41df73a,
which serialised datetimes as UTC.

This patch reverts QDateTime serialisation to pre-Qt 5 behaviour to
restore the guarantee and consequently re-opens QTBUG-4057.

Change-Id: Iea877f7ed886f530b928067789b53534e89fe8cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-05-08 10:00:29 +02:00
Gabriel de Dietrich
7e7d40eeb7 Cocoa: Add support for ForeignWindow window type
Necessary to make QWindow::fromWinId() work on Mac.

Change-Id: I0dc3a1b0d63cff61d484693aee711dc54fea6b2f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-08 09:48:05 +02:00
Gabriel de Dietrich
bdebec4e2e Menu item shortcuts reaching Qt's event loop are disabled
See comment in code and Cocoa event dispatching overview at
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/EventOverview/EventArchitecture/EventArchitecture.html

Task-number: QTBUG-30657
Change-Id: I88907aeeefa4962e1121495cd51af17a8e71b7de
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-05-08 09:48:01 +02:00
Friedemann Kleint
649fa0b004 Suppress warning about unsupported frame strut events.
The warning causes a test failure since it occurs with XCB.
Introduced by enabling frame strut events for all widgets
by f2fcf75381 .

Task-number: QTBUG-30530
Task-number: QTBUG-29012
Change-Id: I025b55f5198a270072b33cae033221709db256aa
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-08 09:36:30 +02:00
Miikka Heikkinen
01bc34088e Fix tabFocusFirst when that item is removed from QGraphicsScene
If tabFocusFirst is not cleared or set to another valid item,
there will be crash later if the removed item is deleted after
removal.

Task-number: QTBUG-30923
Change-Id: Iba9a6ce9334c52f8e552b0accda95ebb5fcfcdb1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-05-08 06:47:29 +02:00
Thiago Macieira
bf2a0c795e QLocalePrivate: remove unused dataPointerForIndex function
Change-Id: I0cd3f8a526e11c3df53fe0cbb063e01c5a3564f9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-05-08 06:05:40 +02:00
Thiago Macieira
96e080f81a Fix new compiler warning in qdoc
config.cpp:313:9: error: variable ‘high’ set but not used [-Werror=unused-but-set-variable]

Change-Id: Iacb3cc0f395a3dad7afda1dca167ed8440ac6226
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-05-08 06:05:25 +02:00
Jonathan Liu
157596b1c2 Specify gnu_printf for message formatting with MinGW
The custom printf formatter Qt ships supports e.g. %lld, which is part
of gnu_printf, but not ms_printf. This fixes a lot of MinGW warnings.

Change-Id: Iff600f20ac23ecb88c4b569d2e668f5d4af6ef27
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-05-08 03:16:35 +02:00
El Mehdi Fekari
02679d93c4 QLocale: add autotest for French_Morocco locale
Change-Id: Ie489557342bf9ea571ba4070e8982b1a13fc7021
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-05-08 01:14:40 +02:00
Olivier Goffart
263b86a559 moc: use fprintf instead of qWarning
qWarning now depends on QT_MESSAGE_PATTERN, depending on that variable.
It will show things like the moc process id or the Parser::error
function name.  We don't want that.

Change-Id: I5b35401200f0f7de2442aa77d700a82402081489
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-05-08 00:55:15 +02:00
Richard Moe Gustavsen
758f064558 iOS: don't send ended touch events to QPA
The current implementation kept a list of TouchPoints that
was reused when sending active touces to QPA. This list was
never cleaned up, so if you pressed three fingers, and released
one, we would still continue to sendt three touches to QPA.
Especially, since this list was not cleaned up when receiving
a touch cancel, mouse events sometimes stopped working when trigging
a system gesture (like a four finger swipe). This can be seen by
using the fingerpaint example.

Since we cannot rely on TouchPoints having IDs that corresponds to
their index in the touch point list, it ends up being
simpler (and results in less code) to rewrite the implementation to use
a hash table of UITouch to TouchPoints instead.

Change-Id: I5b32f57a8d72a0b8759a64ac7cdfa6700109d2b3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-05-07 22:43:14 +02:00
Richard Moe Gustavsen
53e01c4329 QWidgetWindow: don't accept touch events while in popup mode
QWidgetWindow will always redirect mouse events to the active popup
(if any). The same logic is not implemented for touch events, which
means that touch events are always delivered to the widget under the
finger.
It is therefore possible to interact with widgets that are modally
shaddowed by the popup. It is also not possible to close popups
without touching them directly.

This patch will ignore touch events when a popup is active, and
as such, force a synthesised mouse event to be sent instead.
Implementing proper touch support also for popups is out of scope for
widgets.

Change-Id: I023c09c3e1fd4e5495df990c11419c69ecafb8f9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 22:43:14 +02:00
Jan Kundrát
c0e04bad70 doc: QWidget::setEnabled cannot enable children of a disabled widget
The current documentation is not terribly clear on this topic, and there's a
couple of posts on various forums where people want to do this. In fact, the old
wording suggested (at least to me) that it is OK to explicitly override a
disabled state, which is apparently not true.

Change-Id: I10c54e0089e9ba5d16958aea62df27feafdf7b3d
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 22:43:14 +02:00
Friedemann Kleint
bbf1e1a667 Add workaround for case-changing renaming of files on Linux/FAT32.
The underlying rename() of the operating system simply does
nothing when renaming 'foo' to 'Foo' in a case insensitive file
system. Work around by moving in 2 steps.

Change-Id: Ibc73724bfca402a5ce7fcf2a83e8fea32ff71093
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-05-07 22:43:14 +02:00
Gatis Paeglis
a2a8a9ea01 Make access to xkbcommon_workaround.h more generic
It makes more sense to keep this workaround header together with the other
libxkbcommon files for a better access point since it's used by several *.pro
files.

Change-Id: I63d4eb58f6e7f3852834e41c4b6e058a2c962233
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 22:43:14 +02:00
Gatis Paeglis
43578e1901 Use X11 core protocol when xkb not available
To have a properly working key input in the xcb plugin in the case when
xcb-xkb library is not available we can update the xkb_state struct with the
keyboard state information available in the X11 core events.

The current modifier state is reported to clients in a number of core
protocol events and can be determined using the QueryPointer request.

This is how it is done in Weston, Wayland's reference implementation.

Note: In case the X server doesn't have a xkb support on it (which is very
unlikely), then xkbcommon will only pick up the user's primary layout.
The X server with the xkb support stuffs unused bits (13 and 14) of 'state' in the
core events with the effective keyboard group, which we can use to determine layout
changes.

Change-Id: I9f1ef635109870e7412ef1157ca592f3c8f9271c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 22:43:14 +02:00
Gatis Paeglis
260bfaf056 Added possibleKeys(QKeyEvent *) to QXcbIntegration
This is required for a modifier+key shortcut support.

Also fixes old Qt bug when keymap group changes were not handled
properly for shortcut functionality.

Task-number: QTBUG-26902
Task-number: QTBUG-4845

Change-Id: I04d2c2ad7049df7420999816154605848fa670e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 22:43:14 +02:00
Gatis Paeglis
05351b0cde Utilize libxkbcommon API for the keyboard backend on X11
libxkbcommon is a keymap compiler [1] which utilizes xkb
keyboard configuration database [2].

xkbcommon simplifies keyboard state handling by providing xkb_state
object which holds the current state of all modifiers, groups, LEDs,
etc, relating to the provided keymap.

Detecting modifier mapping should become simpler once it gets supported
in libxkbcommon. Also with xinput2 we could get rid of the XkbStateNotify
events, because xinput2 key press/release already include all the mod/group
info.

[1] http://xkbcommon.org/
[2] http://www.freedesktop.org/wiki/Software/XKeyboardConfig

This patch:

- Removes a dependency to -lxcb-keysyms
- Removes a dependency to XLib call - XLookupString
- Enables required functionality to fix QTBUG-27681

Task-number: QTBUG-27680
Change-Id: I10e10f873821ee02f6df72238e215a541150f38f
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 22:43:14 +02:00
Gatis Paeglis
9c1d62cc95 Add xcb-xkb to 3rd party libs
1) -qt-xcb

a) Use xkb from the 3rd party libs. As it is done for the other xcb
dependencies when qt configure with -qt-xcb.

2) -system-xcb (default)

a) If xkb found then use xkb from the system. (Currenly xkb is not
enabled by default when configuring libxcb library).

b) If xkb can't be found on the system then keyboard state will be
updated from X11 core events.

Change-Id: I7c3dbce6daa2cec52067cd5af80f19040233a0db
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 22:43:14 +02:00
Gatis Paeglis
2122e731ab Add libxkbcommon to 3rd party libs
This library is required by the XCB platform plugin. As we depend on
very recent version of this library and it might not be available
in base repositories of distributions, users can use -qt-xkbcommom
switch to build Qt with the bundled version.

Change-Id: I0ed2a5cc2f1df98b0e7cc926cabfa69818674e08
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 22:43:14 +02:00
Samuel Rødal
4635536bfb Re-enable automatic evdev support in EGLFS for Qt on embedded Android.
Change-Id: I2ed6bb57c14ee2c5a72d99e01d1d7d1ae966245f
Reviewed-by: aavit <eirik.aavitsland@digia.com>
2013-05-07 22:43:14 +02:00
Samuel Rødal
69ee30260a Prevent crash due to giving QWidget::update() a large region.
Similar to what change a298216bb4 does for update(QRect) we clip
the update region against the widget's rect and return if it's empty.
Otherwise we risk ending up with update rects that are larger than
INT_MAX due to multiple update rects being merged.

Task-number: QTBUG-30876
Change-Id: Idf695b1fdca50449a1e5ddf37500653de290590c
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-05-07 22:43:14 +02:00
Eskil Abrahamsen Blomfeldt
f963d70c30 Android: Change default Ministro download location
Set up for downloading from the qt-project.org servers instead
of KDE servers.

Change-Id: I6f9e69f91ea956165300d75109e1683d0b1aa5f0
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-05-07 22:43:14 +02:00
Eskil Abrahamsen Blomfeldt
9fa1bdeeb2 Fix compilation for Android ARMv5
We have to use the 4.4.3 compiler toolchain for producing binaries
for ARMv5 on Android, since the 4.7 toolchain has a regression for
this architecture. The regression has been fixed, but the fix has
not been released yet, so until it has, we need to use the 4.4.3.
However, the 4.4.3 toolchain has a different bug, which breaks
compilation in qtimageformats with a message about redefinition of
uint. This works around that bug for Android builds. When the
patched compiler has been released, we can revert this.

Task-number: QTBUG-30921
Change-Id: I620c186c6e932413a4de1dd331fbf4b9401f2e72
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-05-07 22:43:14 +02:00
Stephen Kelly
3483336889 Only expect EGL libraries in the cmake files if Qt is configured to use it.
Change-Id: Ida382a80dba882bbeb920756adc0c16321efe37e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-07 22:43:14 +02:00
Stephen Kelly
ed2df46949 Create a proper variable name in the cmake macro.
Change-Id: I98145fb3149dd8f7aba60d305da98c148aa9c705
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-07 22:43:14 +02:00
Giuseppe D'Angelo
66ff3f7fa4 Add qt_hash(QStringRef) overload
This enables fixing a performance regression compared to Qt 4.
Also, add some qt_hash tests.

Change-Id: Id830e17dec99fb67e5930c80029ac2233b2f427e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-07 22:43:14 +02:00
Ivan Komissarov
0866e48ae2 Fixed applying invalid data from QLineEdit to model
Task-number: QTBUG-2216

Change-Id: I5d1c18aadb380667dedc2bb9f9b7e3dd8178a24c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2013-05-07 22:43:14 +02:00
Gatis Paeglis
9953393593 Make the configure script to accept "-no-harfbuzz" switch
./configure -h lists "-no-harfbuzz" as a valid option, configuring with this
switch gives an error message:

"-no-harfbuzz: invalid command-line switch"

Change-Id: I77aa68d17805170189150198dc9abea5f8cfa5c2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-07 20:40:41 +02:00
Friedemann Kleint
51c6800a19 qdoc: Fix warning about unused variable 'high'.
Introduced by a2892ad1d7 .

Change-Id: If41d5990724fd75d27e29987ad19bda50e29518f
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-05-07 20:40:41 +02:00
Friedemann Kleint
5a8d58350d Add QSKIP to hoverenter-test in tst_qgraphicsproxywidget.
Task-number: QTBUG-25294

Change-Id: I7a674dc49d84c7c68a877bcf64c14e9726dd481e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-05-07 20:40:41 +02:00
Friedemann Kleint
1cf39e2610 Fix XPASS in tst_qgraphicswidget (Windows).
Task-number: QTBUG-20778

Change-Id: I90c8135fab85872cae22630c53fef7aed835a19c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-05-07 20:40:41 +02:00
Friedemann Kleint
f2fcf75381 Enable non-client-area mouse events by default for widgets.
Task-number: QTBUG-30530
Task-number: QTBUG-29012

Change-Id: Iaddbb89bbb198e2b04419407e0871951650552ce
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 16:52:21 +02:00
Friedemann Kleint
eb11f67dd9 Set geometry set by QPlatformWindow::initialGeometry() on widget.
Task-number: QTBUG-30855

Change-Id: I15f3dfa0b493874671711cce2190d0710b368796
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 16:52:08 +02:00
Sergio Ahumada
37aa3e0155 qdoc: Fix missing images in 09-qdoc-commands-includingimages.html
Change-Id: I50936f2cab4e6b8a37cf2b13211f99afca4032ff
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-07 16:52:07 +02:00
Sergio Ahumada
1a2ee6bd1d qtgui: Fix missing images
Change-Id: I52bae22829bd464d368452573321cda02e97611b
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-07 16:52:01 +02:00
Sergio Ahumada
ef7ceb81b2 qtprintsupport: Fix missing images in tools-customcompleter.html
Change-Id: I115e7a76ec9078cdc2e6da61510962cd11e23593
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-07 16:51:53 +02:00
Joerg Bornemann
d3a2ee8b1c remove dead declaration from QColorMap
Change-Id: Idf50084c4688c8bb6b7a2e754cad28266e09271f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-05-07 15:30:05 +02:00
Joerg Bornemann
07f668ab87 qmake/vcxproj: do not set ProgramDataBaseFileName
Visual Studio's default value is perfectly fine.

Task-number: QTBUG-29757

Change-Id: Ic334287539bb849f3b74d255d3991a09008cd357
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-05-07 15:03:16 +02:00