Commit Graph

9546 Commits

Author SHA1 Message Date
Topi Reinio
ab345856b1 Doc: Fix invalid exampledirs in qtopengl.qdocconf
Remove redundant and invalid exampledirs definition from .qdocconf
for Qt Open GL module.

Change-Id: I5a725bf57d78b2fd35aa4dbd24e8cb3881499ed3
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-10 12:09:41 +02:00
Topi Reinio
2e685628b9 qdoc: Don't try to add html files for images in .qhp
QDoc adds document nodes as files into the .qhp, including nodes with
image subtype. This will generate a lot of unnecessary warnings for
missing '<image>.png.html' files from qhelpgenerator when running
'make docs'.

This change makes qdoc skip the above step for image nodes to remove
the warnings. The images are still always added to .qch in a separate
step.

Change-Id: Ib07fc8a3ce65f5d4dd700daf00f5f6a36f74a696
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-10 12:09:41 +02:00
Jørgen Lind
c1e24f8838 Implement apostrophe in windows cmd args
Task-number: QTBUG-15379

Change-Id: I4a2ca942d2dbfa490302858b589e00bd91e25636
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-05-10 12:09:41 +02:00
Mitch Curtis
9a7bc0fc1b Rename Numpad to Num, ensure Numpad is translated in all cases on Mac.
Numpad is unnecessarily long.

Change-Id: I19a6ce129e26a4f6f8344f514317214c48abde6e
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-05-10 09:10:45 +02:00
Thiago Macieira
7ebf21e004 Defer enabling std::atomic on GCC until GCC 4.7
The implementation that GCC came with from 4.4 to 4.6 used external
locks for most platforms, other than x86. It's unsuitable to be called
"atomic" at all. More importantly, it's not behaviour-compatible with
Qt's own QBasicAtomic classes.

Change-Id: I92a0beab58504e6bd7cd236d358fef905c69821c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-05-10 03:45:35 +02:00
Thiago Macieira
ea461b7800 QProcess: leave a warning about the signal with overload, for Qt 6
You can't write:
  connect(proc, &QProcess::finished, [](){});

because of the overload.

Change-Id: I651cc56ee15481392590dc44942d8e814fad75f6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-10 03:45:33 +02:00
J-P Nurmi
71034bb2ea QMacStyle: fix transient scrollbar fade out animation
If a transient scrollbar was hidden during the fade out animation,
it got stuck visible after being shown again. A regression introduced
by f52177829a.

Task-number: QTBUG-31060
Change-Id: I1cda16c6afa4370cce4702d3b4fdaee9f44f9ab9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-05-09 12:17:59 +02:00
Albert Astals Cid
95cab90b10 Make QFlags enum flags (C++11 strict enums) friendly
Change-Id: I9ccb3e4d281a545ca1845db4f6aa7ac6c04e8621
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-05-09 12:17:59 +02:00
Jake Petroules
f7eea69a2a Utilize the new Q_OS_MACX define.
All occurrences of `#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)` have
been replaced with `#if defined(Q_OS_MACX)`.

Change-Id: I5055d9bd1845136beb8ed1c79a8f0f2c0897751a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-05-09 12:17:59 +02:00
Jake Petroules
bf10f2be19 Repurpose the former Q_OS_MAC synonym "Q_OS_MACX" to mean "OS X".
The equivalent was done earlier for qmake, and this will enable
developers writing OS X-specific code to use #ifdef Q_OS_MACX as
opposed to overly verbose #if defined(Q_OS_MAC) && !defined(Q_OS_IOS).

The sole usage of Q_OS_MACX within qtbase has been changed to the
now appropriate value and documentation has been updated.

Change-Id: I2c59eea02e94b691b705170b2f96a97940fdc756
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-05-09 12:17:59 +02:00
Lars Knoll
e1d3687d64 Fix crashes when creating large documents
Compact an object in regular intervals when inserting
data into it, to avoid the object becoming huge.
Compact an object/array before inserting into another
array or object.
Check that the document doesn't get so big it's overflowing
the internal data structures.

Task-number: QTBUG-29288
Change-Id: Id39d80dac1e7d5a11f40819f41b4b336bce16947
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-05-09 10:20:21 +02:00
Olivier Goffart
9cc106d9d7 Fix a case of connect()ing to signals declared in a base class
Fix connection to pointer to member signal that belongs to the base
class, but whose type is a pointer to a member of the derived class.

The current code only use the QMetaObject of the type coming from the
function type to look up the signal id. But if the signal was casted
to a pointer to member function of a derived type, then we also need to
look in the base classes

Change-Id: Ib98fc38f63942946acb34d9f83c100991d58e4e5
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-05-09 08:23:48 +02:00
Gabriel de Dietrich
baa2822077 Revert "OSX: obey the Qt::WindowTransparentForInput flag"
This reverts commit 79e729e111, which
partially fixed QTBUG-30122 and will need to be reopened.

On the Creator side, we think using the Qt::ToolTip flag is a bit unsafe
since tooltips are supposed to have very limited interactivity. We would
like to propose to use a similar pattern as in QComboBox instead.

Task-number: QTBUG-30702
Change-Id: I245b7d8b16ac870564ea44f24f481ebfec8ca9a1
Reviewed-by: Shawn Rutledge <shawn.rutledge@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
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
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
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
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
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
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
28ee554b37 QProcess/Win: drain output pipes on process finish
If a process dies before all output is read into the internal buffer
of QProcess, we might lose data. Therefore we must drain the output
pipes like we already do in the synchronous wait functions.

Task-number: QTBUG-30843

Change-Id: I8bbc5265275c9ebd33218ba600267ae87d93ed61
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-05-07 15:02:34 +02:00
Martin Smith
36b7c3cd2b qdoc: The \wrapper command is added
If \wrapper appears in a \class comment or a
\qmltype comment, qdoc will not print warnings
when it finds public members of the class or the
QML type that are not documented.

The \wrapper command is added to several
opengl classes. This reduces the number of
qdoc warnings by several thousands.

Task-number: QTBUG-30755
Change-Id: Iba1eebc1590ccf54100e40fe91423240c1b3d09d
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-07 14:56:01 +02:00
Richard Moe Gustavsen
0d308c4111 QApplication: fix touch to mouse bug when setting buttons()
QApplicationPrivate::translateTouchToMouse always sets
buttons() to Qt::LeftButton for synthesised events. This is wrong
for a mouse release, since 'button' should in that case be
Qt::LeftButton, and 'buttons' should be Qt::NoButton (since no buttons
are actually being pressed).

This caused problems for QGraphicsView, which refuses to
release any mouse grab set on a QGraphicsItem if at least one
button is being pressed (which was always true).
This resulted in broken drag behavior on touch platforms.

Change-Id: Iefe63cd753f9f8bb04278fd04a4d728e3deda25e
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-05-07 14:31:02 +02:00
Richard Moe Gustavsen
3c46b829f9 QGraphicsView: ignore unhandeled touch events
When QGraphicsView has sceneInteractionAllowed == false (e.g
when dragMode == QGraphicsView::ScrollHandDrag), all touch
events are accepted. This is wrong, and will stop mouse synthesising
from happening on touch platforms. This in turn will make
ScrollHandDrag not work (since no mouse events will come through).

This patch will call QEvent::ignore() if the touch event isn't send
to the scene, which will cause a mouse event to be synthesised.

Note that according to http://doc.qt.digia.com/qq/qq11-events.html
the correct approach would probably be to just return 'false', rather
than calling QEvent::ignore(). But this logic is not followed
consistently elsewhere (e.g in QApplication::notify), so I choose
to follow what the code actually expects for this bugfix.

Change-Id: Ida777647134c41661bab156d7b164ebd882a6bb1
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-05-07 14:30:56 +02:00
Shawn Rutledge
dd7058898c xcb: don't do mouse synthesis from touch unless we find a reason
One reason is when we are using XInput 2.2, because touch devices
will then generate touch events only.  For the other X11 scenarios,
X11 does its own mouse emulation.

QPlatformIntegration::styleHint() wasn't overridden yet.  The remaining
hints are TODO for now.

Change-Id: I2e444a00a18b33ed840ebfa8d8218655c2c39aad
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 14:30:50 +02:00
Shawn Rutledge
df93d356df Don't destroy the window if the QCloseEvent wasn't accepted
It's possible to override event() to receive the QCloseEvent and
do event->ignore() to prevent the window from closing.

Task-number: QTBUG-31019
Change-Id: I9abed47fca02a002b78727f98d678a824854adfc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-07 14:30:26 +02:00
Jerome Pasion
d0725dce7b Doc: Removed pages from "qt-sql" group.
-"qt-sql" removed in qtdoc
-no longer needed because "Data Storage" and Qt SQL pages already serve
as the main introduction to SQL support in Qt

Change-Id: I7384ae04ab4c09ecc9d76668e4e7f836095066c1
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2013-05-07 14:28:16 +02:00
Tor Arne Vestbø
87d08acf40 iOS: Set context and bind FBO before allocating render-buffer storage
defaultFramebufferObject() may be called from anywhere, at any point,
not just makeCurrent(). One example is the glyph-cache, which uses it
to re-bind the default FBO after generating the texture cache.

If the default FBO had already been created, but the render-buffer was
out of sync with the window size, we would end up in the resize code
without the correct context current, and without the render-buffer's
owning FBO bound. This caused "Failed to make complete framebuffer
object 8cd7" warnings at runtime.

We now make the context current and bind the FBO, even though it might
already be bound and the context current from makeCurrent(), or when
initially creating the FBO. For the future we should move the whole
resize logic out of defaultFramebufferObject() and call it from
makeCurrent(), or possibly [EAGLView layoutSubviews]. That's a
higher impact change though, which we reserve for the 'dev' branch.

Change-Id: I50ea949c12a02ad1af6ec9fdc3215d5da85b324f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-05-07 14:19:04 +02:00
Tor Arne Vestbø
8dfeb1c374 Don't use GL_REPEAT for image-brush drawing on OpenGL ES2
OpenGL ES2 doesn't support NPOT textures in combination with GL_REPEAT,
so for OpenGL ES2 we use a custom program that emulates repeat by taking
the fractional part of the texture coordinates.

This is not enough though, as merely setting GL_TEXTURE_WRAP_x to GL_REPEAT
with a NPOT texture is an error in some implementations, so we have to
guard the call to updateTextureFilter() in updateBrushTexture() with
a check for OpenGL ES2 and use GL_CLAMP_TO_EDGE instead.

This fixes missing/black backgrounds in the diagramscene example on iOS.

Change-Id: I5020090b5f17faeb06dcab9dc0292459e021af30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-07 14:18:58 +02:00
Jan Arve Saether
9504516847 Remove the crash pending warning
Even though the intentions of this warning were good, the warning
was a bit harsh. In addition, in certain circumstances
(like the autotest demonstrates) we could end up calling object()
on an interface where the object was in the destructor. This
could happen because: *after* we got the destroyed() signal, the
widget would still notify the accessibility framework of a FocusOut
event.
Since the code even called object() from isValid(), we could not even
(as a defensive measure to circumvent this issue) check the isValid()
of an interface without getting this warning (duh).
So - for isValid(), the warning is not needed at
all, since the caller will of course check the result of isValid() and
act accordingly.

As for the result of object(), it should always be a pointer, but it
might point to a partially destroyed object. To detect this, you simply
check isValid() first:

if (iface->isValid())
    doStuff(iface->object());

Change-Id: I206307fe618806133d8c6bc338c412d0009d7181
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-05-07 07:20:52 +02:00
Thiago Macieira
4d6572aac0 QLocale: cache the QLocalePrivate for the default QLocale
Change-Id: I6f05da4d426a0aa685dd9f2fd0020e413a4bebad
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-05-01 23:05:35 +02:00
Thiago Macieira
30a8d73fdc QLocale: cache the C locale's private
Change-Id: I81bbfeffebb5b7fc29d67bb7127beaf13838ac9f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-05-01 23:05:35 +02:00
Rafael Roquetto
a2f59955ae Fix QFontConfigDatabase crash
Take into account the possibility that the target platform plugin does not
support platform services.

Change-Id: I48e7fac2e1230a9a7d450414044d23ed26b334be
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-05-01 23:05:35 +02:00
Albert Astals Cid
b1de018e9a Fix QLocale::standaloneMonthName when d->m_data == systemData()
At the moment if  d->m_data == systemData() it calls
systemLocale()->query but forgets about the standalone part
so you get the wrong data

This patch introduces the new enums so that backends can implement
properly the standaloneMonthName feature properly. At the moment the Windows
and Mac ones still return the monthName, the Unix and Blackberry ones return
the data we store in months_data

Change-Id: Idc5a50b04ab1f914f16c7385be1dca2e027feae3
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-05-01 21:05:33 +02:00
Giuseppe D'Angelo
05984c910f Reintroduce QIcon doc image (from Qt 4 docs)
This fixes the

   [Missing image icon.png]

warning on QIcon docs.

Change-Id: I16aafb51c146fb675f657a7d8210033a17abf642
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-05-01 15:11:50 +02:00
Eskil Abrahamsen Blomfeldt
522c7ba1ac Enable bundling Qt in Android package in build system
For bundling Qt, we need two things:

1. We need to build a regular .jar file out of the Java files,
so that they can be built into the app package. Dexing the
classes first (i.e. compiling the JVM bytecode to Dalvik
bytecode) is required for loading the .jar file at run-time,
but cannot be used for building it into the app, so we need
two different paths.

2. We need to specify which extra files have to be bundled for
each module (this is primarily for plugins and imports). This
is because there is no static dependency on these files, so
it cannot be detected during deployment.

Task-number: QTBUG-30751
Change-Id: I733603ee5d1c64bd7c5b9357eb5d993b9d0298f7
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-01 11:24:15 +02:00
Eskil Abrahamsen Blomfeldt
94bed3ad14 Make it possible to bundle Qt libraries in Android apk
Add the enablers so that Qt Creator (or another
deployment tool) can add a specification in the app's
meta data of which libraries are bundled and the
Java code required to extract plugins and imports into
the required directory structure inside the app's
data directory.

This is intended to be an alternative to using Ministro
for deployment, and the mechanism of extracting
libraries on first startup is a work-around for the
requirement in Qt of having this directory structure.
For Qt 5.2, the approach should be changed to load
plugins directly from the app's lib directory and
the other files in imports will be bundled as qrcs
in the native plugins.

Task-number: QTBUG-30751
Change-Id: Ibdb3a672548b4802f9bf3ecd05fc194426ac30e7
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-05-01 11:24:03 +02:00
Thiago Macieira
75fba93fc6 Fix more warnings, found by cross-compiling Qt
KeccakF-1600-opt32.c:497:5: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
harfbuzz-thai.c:264:49: error: comparison is always false due to limited range of data type [-Werror=type-limits]

These warnings are caused by "char" defaulting to unsigned on ARM. In
particular, the second warning was introduced by commit
785e95ef0a, which is not upstream...

qbenchmarkvalgrind.cpp:224:5: error: variable ‘_qzz_res’ set but not used [-Werror=unused-but-set-variable]

This one was fixed for x86-64 in 7b54571ec2 but not
for the other platforms.

KeccakF-1600-opt32.c:250:5: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

This one is wasn't caught before because it applies only to big-endian
code.

Change-Id: Ice33b639e55d95140cbf912bb81b6f508ed3744a
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-05-01 08:48:13 +02:00
Thiago Macieira
e68845ec78 Oops: bugfix support for ref qualifiers in GCC 4.8.1
51ee309a79 introduced this check, but it
was supposed to be >= (it's available in 4.8.1, not after 4.8.1)

Change-Id: Id993b128de5c3500684833aea8ef556b31aac5f2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-05-01 06:44:38 +02:00
Tor Arne Vestbø
130b579a16 iOS: Don't use -1 as magic value for UIDeviceOrientationFaceUp/Down
The check in [QIOSOrientationListener orientationChanged] ensured we
never reported the two unsupported orientations through QPA, but we
were reporting back the orientation through QIOSScreen::orientation()
as well, and that didn't have a guard for -1. This resulted in crashes
in client code that assumed the range of QScreen::orientation() was
defined by the enum, such as the paintedwindow example.

The listener now ignores the two unsupported orientations, which leaves
us at the previous orientation. For the conversion function, we still
have to support all UIDeviceOrientations, so we fall back to portrait
for the two unsupported orientations. In the future we should consider
caching the previous value explicitly, or fall back to the interface
orientation.

Change-Id: Ic19d0ce86b4ddea250ea927d5e8664396b2b68fd
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-30 23:30:56 +02:00
Tor Arne Vestbø
02e406ac50 iOS: Don't pretend like our OpenGL context is single-buffered
Internally iOS double-buffers its rendering using copy instead of flipping,
so we reported that our context was single-buffered so that clients could
take advantage of the unchanged buffer. This failed when clients (such as
Qt itself) then assumed that calling swapBufferes() was not needed.

We now properly report that we're double-buffered, and we'll have to find
another way to report the way double-buffering works if that's still an
optimization we'd like to provide to clients.

Change-Id: Id2e4faa68ed3b837ad01d6f22b2927fc9c9769c2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-30 23:30:52 +02:00
Olivier Goffart
008aedc8d1 QAccessible::State is no longer an enum
Since 39a052c664, QAccessible::State is no
logner an enum that moc understand.

moc currently silently ignores it the Q_ENUMS

Change-Id: Iecc30ad57055fc9ccaa33e9e9c400d96997d0902
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-30 22:53:48 +02:00
Gabriel de Dietrich
c904860669 Cocoa: Port QCocoaTheme::fileIconPixmap() to Cocoa
Task-number: QTBUG-30907
Change-Id: Ie460db63413ab9c8e0fb5fb85af907e1c7f12759
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-04-30 19:23:05 +02:00
Thiago Macieira
08ac38a6e3 Make QLocalePrivate POD
QSharedDataPointer does not actually need a class derived from
QSharedData. All it needs is a member called "ref".

Change-Id: I2f7fe4cc143478ef7ef64681eada16e2d4c2e63a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-04-30 17:21:21 +02:00
Thiago Macieira
50ab31a5df QLocalePrivate: remove QLocalePrivate::m_index
It's not used anywhere, so we don't need to cache the locale data
index. We already have the pointer to the QLocaleData anyway.

This saves us a few roundtrips calculating the index from the data
pointer only to get the data pointer again.

Change-Id: I6905d20a382ddcb9fb04cc886a17499b467f905a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-04-30 17:21:21 +02:00
Thiago Macieira
600c538cd6 Move the code that creates QLocalePrivate to separate functions
Direct benefit is that the code between the two QLocale constructors
taking language, country and (maybe) scripts is merged.

This will also allow us to cache the QLocale::c() result.

Change-Id: Ia46c5a37764dc287bfcd3a52a022ac413c53a582
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-30 17:21:21 +02:00
Paul Olav Tvete
6c719079ec Android: don't crash on exit
We have to call DetachCurrentThread() for each time we call
AttachCurrentThread(). Fortunately we have this convenience
class that we prepared earlier.

Task-number: QTBUG-30847

Change-Id: I5ffb94b336d3787a3bae197bab22b91770d58848
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-30 17:21:21 +02:00
Paul Olav Tvete
8d1b8b97ac Don't block back button after keyboard is hidden
The back button would be non-responsive for 5 seconds after
hiding the software keyboard. This is a minimal change that
does not look into why we need to have a 5 second delay in
the first place.

Task-number: QTBUG-30752

Change-Id: Ied514b77650cea7accc37a03efef2ce861090f65
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-30 17:21:21 +02:00
Frederik Gladhorn
c56372e379 Clarify documentation for QKeyEvent::text
Change-Id: I4b455a512b2e678b6127ea488b456c68eb80cdbc
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-30 15:11:23 +02:00
Tor Arne Vestbø
299154bd65 iOS: Simplify context format setup
Change-Id: I6a6a025410298cecd5f62abd08388a7379359af7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-30 12:45:30 +02:00
Gabriel de Dietrich
5e652bbcbc Mac style: Fix text offset within 'small' combobox
Change-Id: I2bde1c71e0e79a6d8ef2897acc053357b12dc00c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-04-30 12:45:30 +02:00
Gabriel de Dietrich
16413d8bd1 Mac style: Update appearance of 'button with menu'
Most of the logic was still following the 10.6 UI guidelines, and had
not yet been upgraded to the 10.7 new button look. We tried to keep
10.6 compatibility were possible, and improve 'small' and 'mini' Aqua
sizes support.

Change-Id: I64139f24cccd095e9349b27a987395210b55c586
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-04-30 12:45:30 +02:00
Martin Smith
08be36c176 qdoc: Config class uses current path for each path var
The Config class is further modified to make
use of the current directory information it
stores with each configuration variable.

Task-number: QTBUG-30725
Change-Id: I34c845e6c05d7868266324f1d54e56f94d709f95
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-30 12:45:30 +02:00
Martin Smith
a2892ad1d7 qdoc: Config class keeps track of current path
The Config class is modified to build a single
multimap containing a record for each variable
found in each .qdocconf file. Each reacord
contains not only the name and value of the
variable, but also its location in the qdocconf
file it was read from and the path to that file.
This single multimap replaces 3 maps in the
Config class.

Task-number: QTBUG-30725
Change-Id: I049a69790f943b24c014a24b55b2b39725a1b56f
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-30 12:45:30 +02:00
Shawn Rutledge
542e3be40d don't customize dialog buttons if GTK version is too old
gtk_dialog_get_widget_for_response was introduced in GTK 2.20

Task-number: QTBUG-30610
Change-Id: I30510f132c1d81c5d44863b3efddbc5e50771362
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-04-30 12:45:30 +02:00
Shawn Rutledge
124da0f5e6 Fix possible segfault when setting up window's transient parent
tp->handle() can be null.

Task-number: QTBUG-30919
Change-Id: Ie18b70d4cc6916d2e821a71d00d1bf99956b0632
Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-04-30 12:45:30 +02:00
Caroline Chao
dc5a579a16 QPlainTextEdit: add missing feature zoom on Ctrl+Wheel
When the control is read only. This is documented but not implemented.

Add functions to zoomIn and zoomOut.

Task-number: QTBUG-30845

Change-Id: I692b5f8cc5791498d34d35ea3dafa18b6e5d3e65
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-30 12:45:30 +02:00
Caroline Chao
7375c06328 Doc: Zooming inside QTextEdit
One can zoom in/out text inside a QTextEdit when the widget is
read-only or when using the zoomIn/zoomOut functions.

Zooming inside a HTML document only works if the font-style is not set
to a fixed size inside the document though. Adding this information
to the documentation.

Change-Id: I66a62da53827e1ce3241ba16b91e86926b97c297
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-30 09:40:40 +02:00
Sze Howe Koh
bf9ae9018e Doc: Give C++ class lists consistent titles
The majority format is "<Qt Module> C++ Classes" (see
http://qt-project.org/doc/qt-5.0/qtdoc/modules-cpp.html)

Also, fix a broken link (Qt Network C++ Classes)

"<Qt Module> C++ API" is perhaps the more correct format, but that's
part of a much bigger cleanup: QTBUG-30556

Change-Id: I753365e2bec8d85d9a5f686b4aa35c9eeeaf0871
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-29 19:01:48 +02:00
Tor Arne Vestbø
62eb4d7f3d iOS: Don't resize backing store twice in beginPaint()
The first call to resize() was a left-over from before we had retina-support.

Change-Id: I637e8d40f443f81fe7cfc367650bb28b917da2bc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-29 16:56:58 +02:00
Eskil Abrahamsen Blomfeldt
d59e9af592 Make sure window is updated on resize event
After 475d1ed4f6a21686828fbd018542b469a8b2dbcd in qtdeclarative,
orientation changes on Android were broken, because the resize
event no longer implicitly causes an expose event. So we need
to post both when doing the resize.

Task-number: QTBUG-30909
Change-Id: I87c8c38e14d96a03b3409ef6439c3ac6ef432005
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-29 14:50:49 +02:00
Holger Hans Peter Freyther
694559a201 uclibc/pcre: Fix the linking of libQtCore for mips/uclibc
The mips/uclibc features.h of the toolchain used by a former key
account of PSO is defining both __USE_XOPEN2K and __USE_BSD this
will lead to POSIX_MADV_* and MADV_* being defined while only the
symbols for madvise are present. Change the order to make it link.

Change-Id: If324b978d72ad2b37b8cd624562e81503c9465d4
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-04-29 14:50:49 +02:00
Olivier Goffart
529b648ece Fix possible race in QMutex
As described in the QTBUG-30872, there may be a race condition involving
3 threads fighting for a mutex.  I am surprised it was not caught
before despite all the Q_ASSERT and the stress test in tst_qmutex.

We do not need to call store(0) because the unlocking thread will
eventually remove the BigNumber flag. And perhaps it even did it
already, and another thread has incremented waiters (hence the Q_ASSERT
is wrong)

Here is a paste of part of the description from the bug report:

---
many threads, one of them is ready to release mutex, while at least two other trying to acquire it
d->waiters is 0
Thread 1 release mutex in unlockInternal:

   if (d->waiters.fetchAndAddRelease(-QMutexPrivate::BigNumber) == 0)

d->waiters is now -QMutexPrivate::BigNumber
Thread 2 try to acquire mutex in lockInternal:

   old_waiters = d->waiters.load();
   if (old_waiters == -QMutexPrivate::BigNumber) {
   if (d_ptr.testAndSetAcquire(d, dummyLocked())) {

It acquire 'about to release mutex' by changing d to dummyLocked
Thread 1 continue release procedure:

   d->derefWaiters(0);

d->waiters is now back to 0
Thread 3 try to acquire mutex in lockInternal:

    while (!d->waiters.testAndSetRelaxed(old_waiters, old_waiters + 1));

d->waiters is now 1
Thread 2 continue its dummy lock:

    d->waiters.store(0);

d->waiters is force to 0

Thread 3 continue wait procedure
but it realize that mutex was already unlocked so decrease back waiters

   if (d != d_ptr.loadAcquire()) {
   if (old_waiters != QMutexPrivate::BigNumber) {
   d->waiters.deref();

d->waiters became negative value of -1
Neither thread need internal data so it is released back to pool
The waiters counter in released internal structure is still -1
---

Change-Id: I1b22555db764482775db6e64a8c9ffa9e1ab0cf6
Task-number: QTBUG-30872
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-29 11:15:35 +02:00
Gatis Paeglis
7f943968ad Fix QKeySequence matching
QKeySequence failed to find a match in the shortcut table when QKeyEvent
contained Qt::GroupSwitchModifier modifier. It's not a part of the shortcut,
it simply shifts character group in a keyboard mapping table.

Task-number: QTBUG-26302
Change-Id: Id91cd4999777f7085068e9dba5cb22b40653e23d
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-29 08:56:09 +02:00
Samuel Rødal
a298216bb4 Prevent crash due to giving QWidget::update() a large rect.
We can simply clip the update rect 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: I23bd0149fbe8d1a007a60b228e6bddb45dc4fc32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-29 08:09:24 +02:00
Kai Koehne
3d42f6fed2 QFlags: Remove text promising 64 bit enums for 5.1
Change-Id: I34173abd693cb124beb8feec5e0cee1f7842725e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-28 10:33:20 +02:00
Jan Arve Saether
c29cbfa858 Get rid of this hack where QAccessible inherits from QObject.
This was added just so that moc could pick up the enums and so that
we could use the enums in Q_PROPERTY declarations, which was needed for
accessibility in QML. It turns out that Q_GADGET is enough for us.

This is a strictly a binary compatible change.
However, QAccessible was marked internal in 5.0, so we are free to
change it. In addition, this class is static and cannot be instantiated.

Change-Id: I27e2e97c5f4b45c38678264c6b593a4383db8d3e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-26 23:27:18 +02:00
Paul Olav Tvete
53ac80c50c Android: fix crash on exit
QTouchDevice is already automatically deleted at shutdown.

Task-number: QTBUG-30847
Change-Id: Id6a407083efed849a34ccb1caa315204fc5a5891
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-26 21:19:23 +02:00
Richard Moe Gustavsen
f46a732a4f iOS: remove setMouse/keyboardGrabEnabled warning
Setting mouseGrabEnabled means that the window should continue
to receive mouse events even when the mouse is not over the
application. This is not an issue on iOS, but the warning is
still annoying.

Change-Id: I0dd7c3828bcb1a51a4eae534aca1da5bfa258f03
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-26 16:21:35 +02:00
Richard Moe Gustavsen
08f0b5dbc4 iOS: stack true popup windows ontop of tool windows
The current implementation would never hit the Qt::Tool case, since
a tool is also a Qt::Popup. This patch fixes that by making the
logic more explicit.

Change-Id: I0e6898081a18289e1007c8a168b374740915b3ff
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-26 16:21:35 +02:00
Richard Moe Gustavsen
ff9b3fcf69 iOS: add convenience functions for getting window type
Change-Id: I971df06dd348d1da68578e04076a02e85866e141
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-26 16:21:35 +02:00
Jørgen Lind
fca94fa5ed Add QXcbWindowEventListener
This makes it possible to listen for events on xcb_window_t which are
not platformwindows inside the xcb plugin

Change-Id: Ic9ec17ed757a7f9a5302ef2759c119a72bac573c
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-26 14:18:16 +02:00
Jørgen Lind
7288625c52 Moving logic from Qt4 for grabbing the X server
Basically you don't want to grab the X server while your debugging.
Also added an environment variable which lets you force to not grab
the X server

Change-Id: Iba03f11c8f486ce71c55fac7716bffcb7cc8cb98
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-26 14:18:16 +02:00
Morten Johan Sørvig
f8e2a8469f Don't crash on null QCoocaMenuItem.
Change-Id: Ia70f616983141134afe874b69a5957e31f6f5ed9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-26 14:18:16 +02:00
Josh Faust
c90d9b697f Fix ignoring close events on OSX
QNSWindowDelegate was not handling windowShouldClose, which is how you
can tell Cocoa that your window should not close if the close button is
pressed. This change moves the close handling from windowWillClose to
windowShouldClose, and adds an optional "accepted" pointer to
QWindowSystemInterface::handleCloseEvent so that QNSWindowDelegate can
return a true/false value for whether the window should actually close

Task-number: QTBUG-28965
Change-Id: I67c6296ad42cbeeb71413e05411467d4e558adb4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-26 14:18:16 +02:00
Topi Reinio
e12d384d7b Doc: Fix module name in .qdocconf
Use CamelCase for module name(s) used in in .qdocconf - this is
required as qdoc will generate visible output (tags in example
manifest files) based on these names.

Change-Id: Ie246e740203ee0b996fea5dee612bf7f61638991
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-26 14:18:16 +02:00
Topi Reinio
e80a8fe861 qdoc: Adjust regexp that generates tags from module names
Use a slightly better regular expression for splitting module names
into tags used for example manifest files.

This will correctly split words with consecutive capital letters
(e.g. QtDBus)

Change-Id: I1320e08a1fbd44f718b82a1fcfea19eabca035fc
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-04-26 14:18:16 +02:00
Shawn Rutledge
9f1b64766b Don't use the SubWindow flag for windows embedded in foreign windows
Instead, add QCocoaWindow::setEmbeddedInForeignView which can be called
via QPlatformNativeInterface::NativeResourceForIntegrationFunction

Task-number: QTBUG-30805
Change-Id: I05861e80ca664ddb430216388cf0fec573a4d32b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-26 12:08:24 +02:00
Morten Johan Sørvig
2e69015d74 Increase the loopLevel when activating menu items.
Apply 0293aff5c44202e5c62e229b74d8bd0bf9206185
from Qt 4.

Without this, calls to deleteLater() may create delete
later events with a loopLevel of 1. Those events will
not be processed until QApplication::exec() returns.

Add a QScopedLoopLevelCounter that increases the loopLevel
for the duration of the activated() call.

Task-number: QTBUG-30660

Change-Id: I7ab3bb3a53243691b8f7f64e025150e5cc7da2c8
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-26 12:08:24 +02:00
Frederik Gladhorn
4ca105b9bb Fix shortcut override for menus
Since we use native Cocoa menus, we cannot rely on the
normal shortcut handling. Shortcuts can be overridden by
the currently focused object in Qt.
In order to make that possible we need to send a
QShortcutOverride event before accepting any key event.

For menus the key event goes from the NSApp directly to
the menu, so the shortcutOverride would not work.

This is mostly an adaptation of the Qt 4 code.

Task-number: QTBUG-30695

Change-Id: Icb4979309d2d6f9606eb9c8abc4130dc79926593
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-26 09:42:34 +02:00
Andy Shaw
89e2319322 Don't do any transitions if the widget is disabled
On Windows 8 it would end up changing the look of the QLineEdit when the
mouse hovered over it even though it was not enabled. None of the
Windows platforms show the lineedit changing when hovered over if it is
disabled so we can skip the whole thing.

Task-number: QTBUG-29224

Change-Id: Ib9495bf395477f114e91b744e1b1209c9e11f336
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-04-25 19:59:16 +02:00
Andy Shaw
b06b519759 Respect the hotspot when creating the cursor in Cocoa
The hotspot was not taken from the QCursor so if one was set then it
was reset to 0x0.

Change-Id: Ie81f1c2ac15a16f10436738367e612c44dc42d38
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-25 19:59:16 +02:00
Friedemann Kleint
3860848674 Windows: Update transient parent in show().
Similar to XCB.

Task-number: QTBUG-30707

Change-Id: I6dd7aa370891a46aa5a2243528692180d8366486
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-25 17:56:26 +02:00
Gabriel de Dietrich
220b2b92b6 Cocoa: Improve text heuristic menu item syncing logic
Don't try anything after the original syncing, particularly after
changing the menu item's text. Also, don't try anything if the menu
item cannot be linked up to a menubar (see QTBUG-30756). This latter
point requires extra syncing after adding a menu in the menubar.

Finally, to be able to find the menubar, we need to clean the code for
moc's eyes.

Task-number: QTBUG-30756
Task-number: QTBUG-30812
Change-Id: I88fad663f1c35d03a0cb167d1723d16f590918c0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-25 17:56:26 +02:00
Gabriel de Dietrich
370e89f064 Cocoa: Reflect menu hierarchy in QCocoaMenu* objects
QCocoaMenu is child of either a QCocoaMenuBar, a QCocoaMenuItem as a
submenu, or nothing as a standalone menu. QCocoaMenuItem is child of
its containing QCocoaMenu.

The parent is set during insertion and cleared during removal.

QMenu needs to be updated to avoid double deletion and leaking its
own platform menu.

Change-Id: Iadf60d8062d7466fa616f84f3761fe322fc9aa2e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-25 17:56:26 +02:00
Gabriel de Dietrich
7a1cdac052 Cocoa: Remove dead code in QCocoaMenu*
Change-Id: I56136594f073295ced645d06f657187a54e84384
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-25 17:56:26 +02:00
Oswald Buddenhagen
da55d48ad7 fix namespaced build
Change-Id: I9d0a3cb08de5e91807da7f0358c83b6693ebd1ea
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-25 17:56:26 +02:00
Oswald Buddenhagen
0dea24054f fix QProcessEnvironment documentation re case conversion
Change-Id: I854382d1d431ee084ef0faa2e240e093b9183ec8
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-25 17:56:26 +02:00
Friedemann Kleint
42760e43ea Windows native save file dialog: Do not append suffix afterwards.
Instead, set the currently selected filter's suffix as
default suffix of the dialog unless another default suffix
has been set.

This emulates the behavior of Qt 4 behavior which would set
the selected name filter's suffix as default suffix in
QFileDialog::getSaveFileName().

Task-number: QTBUG-30748
Change-Id: I111cd6190ddab8775a0fa72b94b3c728dd411c5e
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-25 17:56:26 +02:00
Jan Arve Saether
b9db3e4785 Do not include the treeview header if its hidden
Previously, accessibleTree->child(0) would return an interface for the
header even if it was hidden.

Also, the assertion was wrong since the index would be 0 if both row
and column were 0. The assertion was actually found while using the
project explorer of Qt Creator (2.7)

Change-Id: I9f3cc2c13b6887569d10c4e062a64552f898231a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-25 17:56:26 +02:00
Gunnar Sletta
2e0575ce89 Fix windows expose logic
Make sure the value of QWindowsWindow::isExposed is in sync
with regions we expose.

This provoked a couple of existing issues in the qwidget test.

setWindowGeometry tested that windows with invalid sizes got
exposed on screen. They didn't, but because the plugin sent
bogus events, these used to pass. Same with windowMoveResize.

The expect fails are also rather bogus. Showing invalid-size
widgets could be considered undefined behavior. The Window
manager could resize it, choose to not show it at all, etc,
but they now pass on windows.

resizeEvent has been broken since 5.0.0, but the test didn't
spin the event loop so the second event didn't get delivered
before the test completed.

Task-number: QTBUG-30744
Change-Id: I3a9efcd095f366126a87739f4248185b6c81d407
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-25 15:41:54 +02:00
hluk
b43609404c Fix segfault while handling system-wide shortcuts with xcb
Change-Id: I8485031edc623f99b4b858d4f777be43f4bc3264
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-24 18:30:33 +02:00
Jan Kundrát
78fc0d4872 Respond to the _NET_WM_CONTEXT_HELP WM_PROTOCOLS message
This change restores a proper function of the "(?)" button in the window
decorations which is used as a clue for the user to check what a particular
widget is supposed to do. The change is only implemented for QtWidgets because
the underlying QWhatsThis is inherently widget-specific -- which is why it sends
an event to QGuiApplication, but only processes it in the QtWidget-specific
QApplication.

Thanks to Alberto Mardegan and Gunnar Sletta for their feedback on this patch.

Change-Id: Ibb912e3960f1e9aec54c5ed77ade1c6744d6ca23
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-24 16:24:40 +02:00
Tor Arne Vestbø
4afb128d31 iOS: Don't try to set screen orientation before QApplication startup
We create our QIOSViewController in didFinishLaunchingWithOptions,
and schedule a timer to run the user's main. If the device is
placed in landscape orientation at startup, we will receive a
willRotateToInterfaceOrientation message before the timer is
triggered to run the user's main, which means we do not yet
have a QApplication.

To fix this crash we exit early, but we might have to store the
new orientation for later, and make sure the initial QScreen is
then created with the correct orientation.

Change-Id: I0cc02f0d36b992d190736e98858dc7d002d595b7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-24 13:36:53 +02:00
Friedemann Kleint
ded4613ae4 Windows: Position full screen windows on the correct screen.
Find effective screen by searching the virtual sibling that
contains the center as does QDesktopWidget::screenNumber().

Task-number: QTBUG-30724
Change-Id: I8441ab4f3e5ee8169613a82f150d1a4f1777b662
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-24 11:10:02 +02:00
Peter Hartmann
b4985215df QNX host lookup: do not try to load libresolv.so, it is not there
Not trying to load the lib saves 30 - 50ms upon an apps' 1st host
lookup.

Task-number: QTBUG-30809
Change-Id: Id893cec09ff57494776625700c93f7efe96fcc6b
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-04-24 09:01:14 +02:00
Samuel Rødal
2cea97bc61 Fixed documentation of QWidget::mouseDoubleClickEvent.
Since change 3bb9024952 the documentation is invalid.

Task-number: QTBUG-29680
Change-Id: I7d5fcb6bc490aa5cba83439d33f798459640c42d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-04-24 09:01:14 +02:00
Samuel Rødal
9d7fe3eb3d Fixed crashes relating to SVG icons.
Creating a second QFactoryLoader for the same plugins seems to trigger
an unload of the plugins loaded by the first factory loader. The
QIconEngine created by the SVG icon plugin thus gets an invalid virtual
table pointer, which causes a crash when attempting to call any virtual
function in the QIconEngine (pixmap(), the virtual destructor, etc).

Reusing a single QFactoryLoader instead fixes the crash.

Task-number: QTBUG-30496
Change-Id: I80c5fa8b52ab9b0db68499f8c37fad14a1ac4f3c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-24 06:49:44 +02:00
Mark Brand
af35ee291a qsql_odbc: fix SQLGetStmtAtt usage
Failure to initialize the variable can cause spurious non-zero
values.

http://msdn.microsoft.com/en-us/library/windows/desktop/ms715438(v=vs.85).aspx

"..value can either be a SQLULEN value or a null-terminated character
string. If the value is a SQLULEN value, some drivers may only write the
lower 32-bit or 16-bit of a buffer and leave the higher-order
bit unchanged. Therefore, applications should use a buffer of SQLULEN
and initialize the value to 0 before calling this function. Also, the
BufferLength and StringLengthPtr arguments are not used."

Follow-up to 1509316a37

Change-Id: I2e92eb845a2590bea0849c52bde8902adff1b419
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-24 01:30:20 +02:00
Stephen Kelly
4341ae32f4 Enable OpenGL library detection for mac.
Change-Id: If99d3faf2b08ac5109d619ff69efdaa3857c007f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-24 01:30:20 +02:00
Peter Hartmann
e145b67fbd SSL internals: do not write after shutting down the socket
... but rather throw an error, so the HTTP layer can recover from a SSL
shutdown gracefully. In case the other side sent us a shutdown, we should
not send one as well, as it results in an error.

Change-Id: Ie7a56cf3008b6ead912aade18dbec67846e2a87e
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-04-23 23:22:43 +02:00
Thomas McGuire
e0cf3fcd8f Fix retrieving of the generic system proxy via environment variables
ignoreProxyFor() always returned true if the no_proxy was not set,
which resulted in the first token being an empty QByteArray, causing
the endsWith() check to always evaluate to true.

Add a unit test that is enabled for those platforms that use the generic
system proxy.

Change-Id: I6081ad5e0b8e2c3fee1568835907c32bde5b7772
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-04-23 21:02:50 +02:00
David Faure
1ea1abeb91 Implement startup notification spec again.
This functionality was in Qt4's qapplication_x11.cpp and was missing
from the XCB QPA plugin. Ported the code from xlib to xcb.

This code was actually tested (with plasma), unlike the Qt-4.8 code which
skipped every other character...
    for (uint i = 0; i < 20 && i + sent <= length; i++)
        xevent.xclient.data.b[i] = message[i + sent++];

Provide a QPA native-function for accessing the startup id, for cases where
an application doesn't show a window, but starts another app instead, or asks
a running app to show the window on its behalf.

Change-Id: If392179efddd70a51c45a8fab4fb9d753913094a
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-04-23 21:02:50 +02:00
David Faure
71a1ff39bc qxcb: output clear error message when running on an 8-bit display
Currently, running a Qt5 widget app in Xvfb (with its default setup, 8 bit color depth)
outputs a stream of error messages, starting with:
QWidget::paintEngine: QWidget::paintEngine: Should no longer be called

Better output clearly the reason why we end up in that method: painting
on a null image, due to the unsupported image format.

Maybe this should even be a qFatal...

Change-Id: Iae8f1b057518c146bf8e034999c1b5e67ce6ef5e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-23 21:02:50 +02:00
Konstantin Ritt
3821047e6c Fix memory access violation
The pointer returned by unicode() was deleted right afterwards.

Change-Id: I7cef72386d02c7be42e71134f616926506d37ea6
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-04-23 21:02:50 +02:00
hjk
01cbd7e4b5 Remove QLocalePrivate::m_localeID
It was only used for toUpper/toLower but always computed in the
constructor, including QString::toLatin1 conversion and allocations.

This needlessly slows down all other uses, including supposedly "cheap"
operations QString::toDouble, or accesses inside QResourceFileEngine.

The benchmarks indicates that doing it always when needed is bearable.
There's still a lot of improvement potential on these code paths.

Change-Id: I88b637ee11f9f7ea614f8da4ec5df0bf40664fce
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-04-23 18:57:45 +02:00
hjk
649da796f5 QDataStream: Be a bit more verbose about operator>>(char *&)
This also fixes a few "sloppy" mentionings of "new" into "new []".

Task-number: QTBUG-30777
Change-Id: I3f4add07777b59cd09cac97b672c73273b3b97eb
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-23 18:57:45 +02:00
hjk
32629676b9 Use a QVector<QDateTime> instead of an array in QFileInfoPrivate
Since QDateTime is pimpled, default allocation is expensive and
regularly shows up in profiles of code using QFileInfo.

For Qt 6, QDateTime's data members should be put into the class
proper, and this change here reverted.

Change-Id: I94a50e467b12772e1076181eb2ac6031984d8802
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-23 18:57:45 +02:00
Gabriel de Dietrich
38bf6da7dd Cocoa: Fix disabled minimize button on main windows
Task-number: QTBUG-30775

Change-Id: Idec64f2cc6181e6889498171ead676d33c66e537
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-23 18:57:45 +02:00
Morten Johan Sørvig
56cc59110a Don't crash on a null window pointer.
Task-number: QTBUG-30731

Change-Id: Id256b915012b43d1eb85bba62cbc1d42cfb58b34
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-23 18:57:45 +02:00
Gabriel de Dietrich
f2fa65e4bf Cocoa: Add setAlertState(), isAlertState(), beep() functions
Also, fix operator precedence error in QApplication::alert().

Change-Id: I140ccfba29638d24bc1c97f5f9a9611f66eb6b8f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-23 18:57:45 +02:00
Samuel Rødal
1f6ab6a661 Fixed QGLWidget not being able to be made current with a context.
If the QGLWidget's creation is triggered by a sibling or similar being
created it would end up without the surface type OpenGLSurface. We need
to make sure the QWindow has the correct surface type to prevent
QOpenGLContext::makeCurrent() from failing.

Task-number: QTBUG-30811
Change-Id: Ifc85f9120d89bd0bed4a3911233799830cb3a0f3
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-04-23 18:57:45 +02:00
Jan Arve Saether
146658a10f Fixed QLayout::addChildLayout(QLayout *l) when l had a parent
Previously if l had a parent, addChildLayout would warn and skip the
reparenting, but it would still add the sub layout to the layout.
This caused some inconsistencies in the hierarchy which in worst case
could cause crashes.

Task-number: QTBUG-30758
Change-Id: I618ec3341636b97bd71e421201b22c746dcf43e1
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-23 18:57:45 +02:00
Friedemann Kleint
ad3b61554b Move Mac translations to .cpp file for lupdate to pick them up.
Task-number: QTBUG-30125

Change-Id: I4e56fd3021b4ef5f344d4d36ae594dd88e2aa1bd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-23 18:57:45 +02:00
Stephen Kelly
ecc11ccd65 Set the sysroot if cross compiling the cmake tests.
Change-Id: Iae268f30b86a67fcf978983ca9b12f850948dd24
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-23 18:57:45 +02:00
Thiago Macieira
06b6784c28 Fix header check: you must #include qconfig.h before QT_NO_OPENGL
Change-Id: I50518bd1b721d19e4712a6c11afb0a93afeaa7ea
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-04-23 16:38:09 +02:00
Frederik Gladhorn
9c47a273ff Accessibility: Ignore negative child indices in main window
Change-Id: I6b3d0b066bf20a09b43d6d80255fb8d428d38df1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-23 14:10:05 +02:00
Stephen Kelly
93aa83e074 Fix typo in docs
Change-Id: I3ee3e3d061fc87c0c2ea05197b37a952c8d63dd2
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-04-23 14:07:50 +02:00
Stephen Kelly
38fea4d642 Fix build with QT_NO_CLIPBOARD
Change-Id: I138a29e1099e691770b9e3e094a108fc8c52f8cb
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-04-23 14:07:37 +02:00
J-P Nurmi
a7dc708eb5 Fix QAbstractItemModel::moveColumn()
Task-number: QTBUG-30346
Change-Id: I3d6dbe1e88bb5e2748eadabb2663f30be16f8d18
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-04-23 13:35:31 +02:00
Gabriel de Dietrich
e324f5bc0e Fix crash when deleting a QMenu on exit
If the application object is an ancestor of QMenu, dereferencing qApp
in its destructor will cause a crash.

Task-number: QTBUG-30756
Change-Id: I31a33db0fd783bb210a420618911ea8b412e9a0f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-23 13:12:33 +02:00
Frederik Gladhorn
a7ce34dba4 Accessibility: Menu item should keep track of owner being valid
The QAction may stay around while the parent/owner gets deleted.
This is for example the case for some dynamically created menus.

This is required for fixing QTBUG-30792

Change-Id: I7b6122edec6def69aed77502403134e1568e21c9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-23 13:11:22 +02:00
Liang Qi
8d60a10462 QWindow: expose active as property
And add activeChanged signal for it.

Change-Id: I9ebe9263e99863267c3a81b9286eaa5b29222085
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-23 12:45:32 +02:00
Liang Qi
941f7a5283 Make requestActivate() as a slot in QWindow
Then it could be used in QML world.

Task-number: QTBUG-28667
Change-Id: Ib65ad3b271a07ba50d3ca50d61f486f829f69119
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-23 12:45:30 +02:00
Kai Koehne
a6e903299b Fix def files for Mingw (32 bit)
Add missing symbols.

Change-Id: I73579f13b0cbc8b4b405a50b3745785e088cf82d
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-23 12:45:22 +02:00
Kai Koehne
43e1c61a19 Add missing intrin.h include for __cpuid
This is already fixed upstream in

https://codereview.appspot.com/8615046/patch/1/2

Change-Id: I4b9e865f6b5622c484418a8381334381bc256887
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-23 12:45:16 +02:00
Libor Tomsik
2fbfad8b0d Added grabbing option for qevdevkeyboard and mouse.
Added option grab=1/0 which allows user to choose using environment variable
if the application will exclusively grab the input device or let
the OS read it in paralel(default).

Task-number: QTBUG-30004

Change-Id: If3caa8419584be46f320931ddb152a41893d8693
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-04-23 12:39:14 +02:00
Gabriel de Dietrich
3b992f8319 Enforce focus policy in item delegate's editor
Focus policy can be wider in this case given the limited scope of the
editor widget. This helps workaround platform specific focus policies,
like on Mac, were focus can be restricted depending on the widget type.

Task-number: QTBUG-30715
Change-Id: I69acf8ebff4ba16d473964c91680a1cb0235e3cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-23 12:32:47 +02:00
Mitch Curtis
7dd81686e8 Fix QKeySequence::toString() returning gibberish for Qt::KeypadModifier
This is the patch from the bug report with a few alterations to get it
to compile, and also with the GroupSwitchModifier code removed, as this patch
just focuses on Qt::KeypadModifier. The problem was determined to be in
QKeySequencePrivate::encodeString, which doesn't handle the
Qt::KeypadModifier flag.

Task-number: QTBUG-4022

Change-Id: Ic981eb8b5cd88c7b36892d3019b8175db4b7b6f2
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-04-23 12:26:13 +02:00
Morten Johan Sørvig
f9ecaa8825 Return GroupRole for unknown accessibility roles.
UnknownRole draws attention from the screen reader
and makes it focus on the unknown item. GroupRole
is ignored and passes focus to child items.

Change-Id: If7b4cd9ec02b1890929a709b84d897f452c39587
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-23 07:44:20 +02:00
Morten Johan Sørvig
d576d77f03 Don't set WA_AcceptTouchEvents on Mac OS X.
Setting this flag causes scroll event lag, so we want
to keep it off for all widgets that do not need touch
events. QPanGestureRecognizer is installed on all
QAbstractScrollAreas. Prevent it from setting the
flag.

Change-Id: Idd4fcc545ff26377607b56f75db75c2865a5fc82
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-23 07:44:02 +02:00
Thiago Macieira
ccb7db2ee3 Document that the mutex passed to QWaitCondition::wait must be locked
Simply say that the behaviour is undefined if you don't do what you must
do. I don't want to introduce a check: it can't be done reliably anyway.

Task-number: QTBUG-30806
Change-Id: Iba1bbbdfe62ffcb133f9c52215efdcc0ee7bd9bd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-22 18:35:52 +02:00
Frederik Gladhorn
e5e54a9ceb Accessibility Windows: always check for negative child ids
Some screen readers will pass in child id's that are negative
as response to notifications.
We should always check for negative id's on incoming calls.

Task-number: QTBUG-30792
Change-Id: Idaba3d1931d35ed068cfd9f20e70aa26da427616
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-22 18:35:52 +02:00
Stephen Kelly
bc4fbcd215 Add IMPORTED targets for the GL libraries used by Qt.
There may be multiple libraries specified in the mkspec, such as
EGL and Mali, as used in devices/linux-sh4-stmicro-ST7108-g++, so
create an imported target for each one. Also populate the
Qt5Gui_EGL_LIBS variable with all created imported targets. Similar
variables are created for the used OPENGL implementation.

In the case of using the packaged ANGLE library, we already know the
exact locations of the binaries.

This makes it possible for third parties to use the same GL
implementation as used by the Qt build itself. As these are used only
privately by QtGui, they are also added to the DEPENDENT_LIBRARIES
of that target so that they are found for rpath-link usage.

On some platforms (eg Raspberry Pi), multiple include directories must
be set to include egl.h, as the headers it includes for vcos are a
bit scattered.

Task-number: QTBUG-29132

Change-Id: I1126da3d37cd51c88d3670347c8b6405b285efb5
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-22 18:35:52 +02:00
Frederik Gladhorn
d257e69a79 Accessibility Mac: Implement accessibilityFocusedUIElement
Change-Id: I17b5b1f741a8b340d8f4b16f4ec39cc9a8159bfa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-22 18:35:52 +02:00
J-P Nurmi
00b11ccdea Fix QTableView::doItemsLayout()
Keep the content aligned to the bottom when the view has been scrolled
to the bottom and the content is relayouted (for example due to
sorting).

Task-number: QTBUG-30653
Change-Id: I9513e295e276d25ff2068036cd80dbf91314fe84
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-22 18:35:52 +02:00
Eskil Abrahamsen Blomfeldt
241ee2ee42 Read correct font hinting config on Gnome/Unity
Fixes regression against Qt 4. This tries to recreate the logic
from 5c46d9a4c85abbcc0b5db2bbbafded3efd784cd9 in Qt 4, where we
on Gnome would override the default hint style specified in
FontConfig with Xft.hintstyle settings. This is the configuration
used for changing the hint style in the Gnome Tweak Tool.

Task-number: QTBUG-29582
Change-Id: I6b9fe2c8ff55ff080d034e5a53fc8cbb49f7651f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-22 18:35:52 +02:00
Morten Johan Sørvig
353f7340a1 Revert "Don't warn on 0x0 sized windows."
This reverts commit 88272d6c04,
which accidentally re-introduced a crash.

Change-Id: Ie60bcf55f940b24f982eed4f20c6af3320b040a7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-22 14:53:39 +02:00
Richard Moe Gustavsen
8a00a42d0d iOS: don't delete m_touchDevice, QPA takes ownership
When registering m_touchDevice with QWindowSystemInterface, it
will also transfer ownership to it. It will eventually be
deleted in clenupDevicesList on qtouchdevice.cpp.

This patch will also stop the app from crashing when telling it
to quit.

Change-Id: I97070efdf16b4db7d076935fbec62e60f094a7df
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-22 14:38:28 +02:00
Kai Koehne
38f6467b81 ANGLE: Fix compilation with MinGW
Make sure ImageSSE2.cpp is compiled with the right flags (-msse2)

Change-Id: I410bbd1fd78112d01ebd486908cd22d827e2e472
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-22 14:30:03 +02:00
Andy Shaw
d672ef0768 Convert the CGImage into a QPixmap after reading from clipboard
Now that the relevant function is available we can do the conversion
inside QMacPasteboardMimeTiff when obtaining an image from the clipboard

Change-Id: Ie41b0fffedf4dd3f8ef49431482bd075a69722b1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-22 08:57:48 +02:00
Andy Shaw
f78842abe4 Ensure the QLineEdit::returnPressed() signal is still emitted
The signal needs to be emitted directly as the event is not passed to
the QLineEdit if the QSpinBox gets the Key_Return. Since this signal
may be relied upon then we ensure it is emitted directly.

Change-Id: I17cdec62c9f995bacfd7d3cc66d6324f26c84c67
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-21 02:01:29 +02:00
Thiago Macieira
51ee309a79 Mark that GCC 4.8.1 has support for C++11 member reference qualifiers
This also marks it feature-complete for C++11 (at least, language
features). See http://gcc.gnu.org/gcc-4.8/cxx0x_status.html and
http://gcc.gnu.org/projects/cxx0x.html.

Support for the C++11 features in the Standard Library is still
incomplete, but we don't try to detect those features anyway (see
http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2011).

Change-Id: I55702ef48f757b536ebbf17e921442ff5bfc29f8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-20 18:36:47 +02:00
Eskil Abrahamsen Blomfeldt
1b289379dc Don't bootstrap QT_EVAL code
For most bootstrapped tools, the QT_EVAL code will not
have any effect, because most of the tools don't instantiate
a QCoreApplication. However, qdoc is bootstrapped for cross
compilation, and will instantiate QCoreApplication which
calls the QT_EVAL code. Since the QT_EVAL code requires QObject,
and QObject requires moc, it does not make sense to compile the
eval code into the bootstrap library. Instead, we simply disable
it to make sure the build succeeds.

Change-Id: I472803572b070df041014d337c23d3f3dc0749e4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-20 01:35:33 +02:00
Mark Brand
0631caf555 update bundled sqlite to 3.7.16.2
Change-Id: Iae9b3012e93af3399e482e32e4bc201213567496
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-19 20:10:46 +02:00
Friedemann Kleint
155ff13bb6 Implement QApplication::beep().
Invoke slot "beep" on QPlatformNativeInterface. Implement for
Windows and X11.

Task-number: QTBUG-30416

Change-Id: I2be651165b899e5147818a012001d354827bb090
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-19 20:10:46 +02:00
Friedemann Kleint
da01deb0ac Implement alertion state for windows.
Add QWindow::alert() and QPlatformWindow::setAlertState().
Add logic to clear alertion state when the window becomes
active. The platform plugins then only need to implement a setter
and a cheap getter and need not handle activation.

Prototypically implement X11 and Windows.

Task-number: QTBUG-30416
Change-Id: Ia70c4722d812462a21f4034b7d52735c9f2bc49c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-19 20:10:46 +02:00
Gabriel de Dietrich
926086b9e3 Cocoa: Disable QTBUG-30266 hack in full screen
That would set the full screen window in a weird state, where is was
full screen (but unable to exit that mode) and showing the title bar
at the same time.

Change-Id: I3ac913876f3b326504dd5af18c34181d002509d0
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-19 20:10:46 +02:00
Frederik Gladhorn
0d57da067b Let platform plugin decide if accessibility is active
Change-Id: I881a8ff3fedf3db73ee37046a4363c70960a92a6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-19 17:52:45 +02:00
Nico Vertriest
c2059ac80d Doc: added details for QRegisterStaticFunction(plugin)
Added reference to macro Q_IMPORT_PLUGIN()

Task-number: QTBUG-30548

Change-Id: Ibc20ad52cd57d497f5a7fb5c4dd4a4c778e4a660
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-19 17:24:30 +02:00
Jonathan Liu
ca0e350183 QMessageBox/Win: Include detailed text using Ctrl+C to copy
Task-number: QTBUG-21150
Change-Id: I14c214e9f96892f0da4369e7253e363b7313c252
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-19 12:03:36 +02:00
Richard Moe Gustavsen
526eaeea09 qprocessordetection: add armv7s
Xcode builds projects for armv7s if a compatible device is set as
target device. If trying to include <QtCore/QtCore> into such
projects, the build fails complaining about "the usage of sizeof missing
QMutexData definition in qgenericatomic.h"

The reason is that qprocessdetection.h fails to pick up that we're
building for ARM, and includes qatomic_gcc.h instead of qatomic_armv7.h.
So we need to check for __ARM_ARCH_7S__ as well. In addition,
iPhoneOS6.1.sdk/usr/include/arm/arch.h will define _ARM_ARCH_7 if
any of the more specic ARM defines are defined, so I add this check
as well to more easy support new version of ARM7.

Change-Id: Ic51a4d7ac99f7f6ba1065f870b3ef82d1250b56c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-19 12:03:36 +02:00
Stephen Kelly
a680fe609f Add the GL headers to cmake variables.
If building angle ourselves, that's just the basic Qt include dir,
and if using an external gl, look for it in the places specified
in the mkspec.

As the qopengl.h header includes the gl header, this is a 'public
include dependency' of QtGui, so it is added to the relevant
variable and the INTERFACE_INCLUDE_DIRECTORIES of Qt5::Gui.

Change-Id: I8c2c1782e0a2600032771175444b087da28433fc
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-19 12:03:36 +02:00
Richard Moe Gustavsen
5ea3845bd0 iOS: use an explicit pointer to qiosViewController
As it stood, we always relied on the root view controller
being a QIOSViewController if isQtApplication() returned
true. For mixed application, this might not always be true
as native code can choose to replace the root view controller
at times, or even rip it out, and place it as a child of
another (e.g UISplitViewController).
This change will give an extra protection against that.

Change-Id: I0cb85796a8b82f9037c32f9e85e04e1dc7aad8e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-04-19 12:03:36 +02:00
Tasuku Suzuki
02713994bf Make qtbase compile with QT_NO_DRAGANDDROP
Change-Id: Id1a74c6b22b388d20103b4e73f83c8345ec70ba6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2013-04-19 09:57:09 +02:00
Mitch Curtis
f3612f39ff Make password mask characters themeable.
Task-number: QTBUG-29871

Change-Id: I3cf739a321d7917f8f8431992e29bba0871b1934
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-19 09:57:09 +02:00
Topi Reinio
8597458ceb qdoc: Include words from the module name as tags in example manifest
This change adds words from the module name (QHP 'project' name defined
in .qdocconf files) as tags for the module's examples. This makes
searching for examples easier in Qt Creator: For example, typing
'multimedia' will list all examples in Qt Multimedia and Qt Multimedia
Widgets modules.

Other minor changes:
    - Exclude 'qt' as a tag (not needed)
    - Exclude one-character strings as tags

Task-number: QTBUG-28720
Change-Id: I53751b7a87ff39ee7b648f865c9090c52444de76
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-04-19 09:57:09 +02:00
Richard Moe Gustavsen
e9b2d029f9 iOS: QIOSBackingStore: enable FBO depth and stencil buffer
Unless we enable those buffers for the FBO that backs the
backingstore, setting a clip region on an associated QPainter
will not work.

One apparent bug from this was the menubar. Without this patch
it appeared to never be drawn. The reason was that we ended up
drawing the menubar background over the whole menubar instead
of inside the clip region.

Change-Id: I25660cec6ce9e43fe4cd693127dca6afeb8dcf65
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-19 09:57:09 +02:00
Thiago Macieira
96134c6f58 Make sure to also check for null CFPropertyLists.
In 1b08e0307d, I removed the null check
by accident. It's possible for the Darwin API to return a null
property list.

Task-number: QTBUG-30760
Change-Id: Iaf0125767fe4b47c19810b70483a5219e94e4305
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-19 07:53:21 +02:00
Kai Koehne
e34dccc9e5 Allow using Ctrl+C to copy selected text from DetailedText in QMessageBox
Task-number: QTBUG-21895

Change-Id: Ib28f064295493595263945bc72907bf95d2cb909
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-19 02:30:52 +02:00
Morten Johan Sørvig
6e73061c58 Actually set devicePixelRatio on copy.
Followup to 7b9d4531 - the second part refactors
to call setDevicePixelRatio but the call itself
was left out.

Change-Id: I3e36452603fe1d7d53fa1a74d87169efea1c2e78
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-19 00:11:37 +02:00
Peter Hartmann
835e720c7e SSL internals: fix memory corruption using QSslConfigurationPrivate
We are passing a QSslConfigurationPrivate that is allocated on the stack
(in QSslSocketBackendPrivate::initSslContext()) to
QSslConfiguration::QSslConfiguration(QSslConfigurationPrivate *dd).
When the SSL context is destroyed, this object is not there any more.
So now we create a deep copy of the configuration like we do in
QSslSocket::sslConfiguration().

Task-number: QTBUG-30648
Change-Id: Iaefaa9c00fd6bfb707eba5ac59e9508bf951f8a5
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-04-18 22:02:18 +02:00
Friedemann Kleint
b3bed2c8de Fix format for alpha drawing.
Task-number: QTBUG-28531

Change-Id: Ie97953950cad26776724848adc5751c861903cf7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-18 22:02:18 +02:00
Friedemann Kleint
b982679940 Mac: Fix warnings about non-existing native Windows on startup.
Shown for example by Qt Designer.

Change-Id: Ia866a93a781a027aa3703f44314954888d75d436
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-18 22:02:18 +02:00
Sérgio Martins
cbde509965 Fix memory leak.
Change-Id: I7d308a869fdc729bd46ace336b71c7e30556d65d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-04-18 19:54:16 +02:00
Stephen Kelly
67bd27fee2 List the Qt5::WinMain Release configuration before the Debug one.
Apply the logic from commit d7ae34fdfd
(List the Release library before the Debug library in cmake files.,
2013-02-21) to the Qt5::WinMain library too.

Task-number: QTBUG-29186

Change-Id: Ie465fef1cc0fc842d86c5bc69ab84ec65ec652d9
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-18 16:53:46 +02:00
Morten Johan Sørvig
8ddcc18ac1 Remove nativeResourceForWindow warning.
The warning is useful for pointing out the the return
value will be null. However, code that correctly
checks the return value (such as qt_macWindowIsTextured),
still causes the warning to be printed.

Change-Id: I3828992b3d5e7b08451cf0e051b937fa9d9536d3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-18 15:33:38 +02:00