Commit Graph

9534 Commits

Author SHA1 Message Date
Gatis Paeglis
b8673b8468 Fix ambiguity in shortcut matching
Comparing to the Qt4 implementation, possibleKeys() should skip records
where qtKeys are equal.

Task-number: QTBUG-31132
Change-Id: I2fb073b4dc7291f909cce616f40f7c2491e7cf26
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-05-20 10:06:04 +02:00
Olivier Goffart
208e9a2757 moc: recover bad template parsing.
When encountering code such as:
  X<a<b>
moc does not have the mean to know if 'a' is a type or a variable, so the
type parser currently assume that '<' always open a template parameter.
(instead of being the operator<)

The type parser do not care about the actual type, it just need to strip
the string out. The problem is that then the whole rest of the file will
be considered as the type.

With this patch, we also stop the parsing at semicolon.  The type will
be wrong, but this allow the parser to recover and it will continue to
look for more classes after this.

(In other words, moc will no longer break if it encounter such construct
in a header. But it will still not parse such types correctly if used
within a Q_OBJECT class)

Task-number: QTBUG-31218

Change-Id: I1fef6bc58493d7c00df72401c9ad55463b24eaa7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-05-20 10:06:04 +02:00
Jørgen Lind
048ce11557 Add BypassWinowManagerHint
Change-Id: Iaf04172aa4fce8d6b354c1c1fc3c376831ee8e91
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-05-20 08:03:48 +02:00
Jørgen Lind
0623d832c7 xcb: fallback to gtk cursor themes
When Xcursor LoadCursor fails to find a cursor

Task-number: QTBUG-27537

Change-Id: I46086c78c3d5bea3c39187dcc55b4774e58f5749
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-20 08:03:09 +02:00
Jørgen Lind
3d43d178e6 Add QXcbConnectionGrabber class
Inspired by QMutexLocker

Change-Id: I66e31091d2a006db3272b627567d95d3e0b1c4f9
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-20 08:02:34 +02:00
Jørgen Lind
0f31a5d91f Introduce QXcbXSettings
This allows you to easily retrieve properties in the XSETTINGS
specification. It is also possible to add listeners to get notified when
a specific property changes.

XSETTINGS is lazy initialized, so it will not be instansiated before
someone uses it. For now the intended use is a fallback for finding
cursor theme

Change-Id: Id47f0613f5876424cd47d721b40da17d3f63429e
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-20 07:36:55 +02:00
Tor Arne Vestbø
3c69751ef2 Prevent windows from jumping when changing geometry on OS X
We were setting the frame origin and content size as two separate steps.
The frame origin was asynchronous, while the content size was synchronous.
This resulted in the window visually jumping/moving, instead of applying
the new geometry in one single step.

We now set both in one go using setFrame, by manually calculating the
frameRectForContentRect. This makes the whole process asynchronous.

Task-number: QTBUG-31039
Change-Id: Iaba46106b9f200c707507f330fa801c99e2e7d89
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-05-15 05:06:15 +02:00
Liang Qi
69c05bbef4 QtWidgets: avoid integer divide by zero in QProgressDialog
Autotest is included.

Task-number: QTBUG-31046
Change-Id: Ie549b59112f458de478294fa00443a3cf6898c85
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-05-15 05:06:15 +02:00
Gatis Paeglis
252cba3cd5 Don't send the same Input event twice to QGraphicsProxyWidget::inputMethodEvent
Task-number: QTBUG-30705
Change-Id: I6fa02807255d0abf74aa38e94662bbe3d9e642bb
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-05-15 05:06:15 +02:00
Jens Bache-Wiig
a4463311a9 Don't draw size grip on Mac > 10.6
After Apple added the resize functionality to window borders,
they stopped rendering the size grip in most apps. Hence we do not
need to either.

Since the status bar height depends on the status bar being
there, we considered the safest option to keep it but make
it hidden.

Change-Id: Ida06e8f0de0f50d746a7d25bc5a472e22a370645
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-05-15 05:06:15 +02:00
Gabriel de Dietrich
1caa0c023f Cocoa: Fix Open GL resolution in high-dpi
We permanently enable 'wantsBestResolutionOpenGLSurface' when creating
an Open GL window/surface. We were enabling it once we would detect a
high-dpi Cocoa backend, whitout ever turning it off. Leaving it 'on' on
non-high-dpi displays should not change anything.

Task-number: QTBUG-31000
Change-Id: I3d0c77f7b36f3c22dacd04a50fcc5a7d88af32c0
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-05-15 05:06:15 +02:00
Jan Arve Saether
27e690e163 Respect specified minimum height for menuBar also if it has HFW.
If the menu bar is subject to height for width (HFW) we should of
course respect that, but in addition we should ensure that the HFW is
within the minimum and maximum height. This also is consistent with how
QGridLayout calculates the effective minimum row height.

This fixes a regression because change 4780f94e391b5e881497c5228661dead
turned QTabWidget into a proper height-for-width citizen, and when
setting a QTabWidget as a menuwidget, the buggy codepath for HFW was
suddenly hit in menuBarHeightForWidth().

Task-number: QTBUG-31057

Change-Id: I3c1bb8063c92d6eda7e9433e44f08967d8e1c43e
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-05-14 17:57:24 +02:00
J-P Nurmi
0b862e0677 QGV: fix items not to be selected on right mouse button release
Task-number: QTBUG-30990
Change-Id: I421d9169b592da2b468eceb9df4f3f7c6a06e8d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-05-14 15:21:23 +02:00
Bjoern Breitmeyer
3f1519d40a Fixed WINCE linking error in QProcess
The error was introduced with
28ee554b37

Change-Id: If3e51227af3880496ef2da3a18835b36d65bad78
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-14 15:18:50 +02:00
Andy Nichols
27cbb58a92 Fix breakage of tst_qquickwindow::grab(invisible)
Instead of waiting for -drawRect to call -setView on the
NSOpenGLContext, we go ahead and attempt to set the context as soon as
possible.  If it is indeed required that we call -drawRect first then
will try to call -setView again during -drawRect with the new
NSOpenGLContext.

Change-Id: I33d9f2ba241b49e8cfa6c9156dd5bf5e4cc6b164
Reviewed-by: Liang Qi <liang.qi@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-05-14 14:45:13 +02:00
Venu
32f09caa35 Doc: Replaced the HTTPS links with HTTP
The HTTPS links fail in Qt Assistant on Windows as the
qt installation package includes qt libraries that are
built without SSL support for legal reasons.

Task-number: QTBUG-31073
Change-Id: I86909abadb1e8164749d924cc53ee05aa57f8f31
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@digia.com>
2013-05-14 11:48:00 +02:00
Oswald Buddenhagen
8739487b1c install host libraries into -hostprefix
... and introduce -hostlibdir configure option for symmetry.

the libraries built for the host have no business in the target prefix.

in principle this code would even support dynamically linked host
libraries, but that's currently unused.

Task-number: QTBUG-30591
Change-Id: I8e600fa4911a020fb0e87fbf7ef2f35647c7c4d5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Ivan Romanov <drizt@land.ru>
2013-05-13 21:54:40 +02:00
Friedemann Kleint
38dc6ccca0 QWidgetWindow: Prioritize keyboard grabber over popup for key events.
Fix the inline editor of the QMenuBar in Qt Designer not working
due to the key events being sent to the QMenu which is open
at that time.

Task-number: QTBUG-31059
Change-Id: Ic96bc119d0d2566d8f8d6ee62858445a70a447b7
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-05-13 15:39:35 +02:00
Nico Vertriest
e63d262b6a Doc: added scenario in case of failure QNetorkInterface
Task-number: QTBUG-30301
Change-Id: Id68129737b8d584ad36e6888cd7318badf0b4ae2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-05-13 15:39:35 +02:00
Nico Vertriest
a1ef6b0087 Doc: remove references to toWinHBitmap and fromWinHBitmap
Task-number: QTBUG-30738

Change-Id: I5a33493b37488b3ac4f5a499e5c5aa22e4e277f4
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-05-13 15:39:35 +02:00
Mitch Curtis
6f4f844689 Fix typo in QGraphicsItem documentation.
Change-Id: I69e7be75ec8164b81c2cd64fc0d4b475495a3db9
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-13 13:29:48 +02:00
J-P Nurmi
00859fe32f Cocoa DND: respect QDropEvent::setDropAction()
Task-number: QTBUG-31061
Change-Id: Id3275a0510bfa619a52d17cf48a3e48b3bae5354
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-05-13 13:29:48 +02:00
Gatis Paeglis
b8a73f96da Fix HTML data transferring through the Clipboard on Windows
When transferring html formated data through the clipboard
some of the html markup was lost when converting from Windows
clipboard native mimedata to Qt mimedata type.

On X11 we are sending everything - inluding <!DOCTYPE ...><html> .. </html>.
This patch enables the same behavior on Windows.

Task-number: QTBUG-30984

(cherry picked from commit 9e28245da1580e25e77a665b7738c59eb298c422)

Change-Id: Ic0e339ad53955f1d31e8dff92ccf38b6eeec369a
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-05-13 13:29:48 +02:00
Richard Moe Gustavsen
2e3282d5e4 QCFSocketNotifier: initialize member variable to avoid crash
The function pointer "maybeCancelWaitForMoreEvents" was never
initialized to any value. This caused qt_mac_socket_callback
to call that "function" when it had a non-zero value, which caused
a crash under some circumstances.

Change-Id: I1d31be7b5b7c103fdc0204ffa6e9a5ecbb28d062
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-05-13 13:29:48 +02:00
Friedemann Kleint
65ae781215 QWindowsFontEngine: Fix warnings about GetGlyphOutline() failures.
tst_qglthreads::painterOnPixmapInThread reports

QWinFontEngine: unable to query transformed glyph metrics...

(Desktop OpenGL only).

Task-number: QTBUG-28264
Change-Id: Ib456905a13a95037ec13dfc4cb828f830076ee89
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-05-13 13:29:48 +02:00
Andy Shaw
12e84748aa Ensure the hovered signal is emitted for the action and menu for Cocoa
In the Cocoa platform plugin the hovered signal() was not being emitted
for the corresponding QMenu. This now ensures it is emitted for the
action itself and its QMenu.

Task-number: QTBUG-30841
Change-Id: I3cfe634a71de7b55550e2561eb1c6a939536216d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-05-13 11:18:41 +02:00
Gatis Paeglis
a77e4ea207 Restore cursor before sending QDropEvent
When users created a modal window in a dropEvent(QDropEvent* event),
the cursor was not restored to its original shape until after the modal
window had been dismissed.

Change-Id: Id4723e3cb66b36a3ca18ff097a3993563816d9e1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-05-13 11:18:41 +02:00
Gatis Paeglis
29b9b92f40 Don't send QMouseEvent events from the QXcbDrag::timerEvent()
This is not needed. The DnD initiated scrolling is done by
installing an eventFilter which forwards all MouseMove events
to the QGuiApplicationPrivate::processDrag which creates and forwards
all the necessary QDrag* events. QAbstractScrollArea has its own logic
in the timerEvent() to make the view scroll when the pointer is standing
still on the edge and the drag process is still ongoing.

With the current implementation, widgets (during the DnD) were receiving
DragMove events even when the pointer was standing still outside auto scroll
areas.

Task-number: QTBUG-28171
Change-Id: I355d88f3eab0ad39f916f84d66f5d0af7c0ff93e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-13 11:18:41 +02:00
Eskil Abrahamsen Blomfeldt
151dd9c67c Fix transformed raster fonts on Windows
We removed all Q_WS_WIN code when going to Qt 5. One of the things
removed was the condition that we do painter path text rendering
for transformed, non-ttf fonts, since the GDI engine does not support
transforming those. This has now been reintroduced and adapted to the
QPA way of doing things, by checking for it in the font engine subclass.

Then there was the problem that QStaticText only supports cases
where the font engine can transform the glyphs. Thus we need to fall
back to regular text drawing in drawStaticText() for unsupported cases,
and we need to skip the optimized path in the raster engine (which
goes to drawStaticTextItem)

Task-number: QTBUG-30932
Change-Id: I17ba7355ee127811b0e77bb3a9b9db092e99893b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-05-13 11:18:41 +02:00
Thiago Macieira
4c13b53702 XCB: Handle new enum value in switch
The new enum value was introduced in f3612f39ff

Change-Id: I9ab5d8fba459408246e9a6f40c5c086af5abbf82
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-05-13 11:18:41 +02:00
Sze Howe Koh
b9adf2a90e Clean up old PostScript printing code
PostScript support was removed back in 2011:
34f712e79e

- The QPSPrint* classes are gone
- The QPrinter::OutputFormat enum only has NativeFormat and PdfFormat
  constants
- QPaintEngine::PostScript is unused now

Change-Id: I27d595b92341f41e14bd1e4fd860eac6826d7890
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-05-12 13:58:04 +02:00
Andreas Holzammer
741eb8cbb1 QNX: Add support for WindowDoesNotAcceptFocus flag
Set SCREEN_PROPERTY_SENSITIVITY to SCREEN_SENSITIVITY_NO_FOCUS of the
screen window when the Qt::WindowDoesNotAcceptFocus window flag is set.

Change-Id: Iac0764a84186c382dcd3f4bdd31dd24ac15df768
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-05-11 15:05:47 +02:00
Sze Howe Koh
8f26a9aa64 Doc: Remove PostScript print support
PostScript support was removed back in 2011, but not documented then:
34f712e79e

Change-Id: Ie818bf5f733422db910efadd57efa0ddabcc5175
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-05-11 02:59:08 +02:00
Matt Fischer
d37dc75116 Improve support for <MODULE>_PATH options
Several modules, including DBus, MySQL, and OpenSSL have
configure options of the form <MODULE>_PATH, which is used
on Windows (where pkg-config is not present) to specify the
locations of third-party libraries.  These switches had been
implemented by adding extra variables which were referenced
in .pro files, to add the appropriate compiler and linker
switches.  This is undesirable because it means there are
two independent paths for adding the switches to the build,
which can get out of sync with each other, and indeed this
had happened for some of the DBus tools.

To remedy the situation, all three of the switches were
reworked so that they added values directly to the principal
variables that are used in the project files.  This reduces
maintenance, by ensuring that the pkg-config and non-pkg-config
paths appear the same to the rest of the build system.

Change-Id: Iae342f1d14b79fbcfef9fe38aadc803ad3141799
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-10 19:39:53 +02:00
Andy Nichols
cd2a51a66f Fix Invalid Drawable error for QGLWidget on Mac
You are not supposed to call NSOpenGLContext -setView: for a view that
has not yet called drawRect.  We we attempted to do this, we would get
the invalid drawable error, leading to QGLWidgets just drawing garbage.

Task-number: QTBUG-28175
Change-Id: I47aef07b4676f2db8591f98fc1661f6f447bdef9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-05-10 17:43:52 +02:00
Stephen Kelly
5c86dd5401 Fix module name in license headers.
Change-Id: I71afbb3170869f3cd0313fb7c707062d1599251c
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-05-10 17:00:40 +02:00
Venu
0f38fe972e Doc: Updated the addtional information about elide marks
Added the same information for QFontMetricsF::elidedText.

Task-number: QTBUG-30865
Change-Id: I57791de21f5721d7a505c3d13f450e5ec6cd2730
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-05-10 16:58:24 +02:00
Tor Arne Vestbø
5e1bdf1ee8 Fix warning about unused variable when not using any SIMD drawhelpers
Change-Id: Ic87be3b6c7afbde869bd011a3a585b0fe7dbf15d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-05-10 12:09:41 +02:00
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