Commit Graph

9546 Commits

Author SHA1 Message Date
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
Gabriel de Dietrich
b381581579 Mac: Fix various memory leaks
Change-Id: Id554be11ffcf9a506c217b0dc5b96cb37c4dd57c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-18 15:31:29 +02:00
Gabriel de Dietrich
2bd846f8da Cocoa Menu: Remove unnecessary retain, release/retain in the right order
Also, make sure platform menu item is deleted on ActionRemoved event.

Change-Id: Ic07a81cb77833bdffd1464abf1c81ebdee4d16e9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-18 15:31:18 +02:00
Andy Shaw
8cbc7ef05c Fix the QTouchEventSequence code snippet so that it compiles
The release() function also requires the QPoint to be set which was
missing from the code snippet.

Change-Id: I4a5cd2bed0915eb1fbaac3a34fb229eac9c284df
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2013-04-18 09:18:43 +02:00
Andy Shaw
9ec493fa41 Convert the new filename to native separators before checking it
If a native separator was put in the new name when renaming a file name
via the file dialog then it would correctly fail. But if a non-native
one was used on Windows then it would cause the file to be moved
instead if the directory existed.

Change-Id: If01760b8c54a69b600c9a44c7509017be70d33e3
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-18 09:18:43 +02:00
Eskil Abrahamsen Blomfeldt
eb95685556 Android: Don't crash when displaying multiple top-levels
While the raster platform plugin supports multiple top
level windows, this is not supported on the GL plugin,
so if you use GL or QtQuick2 in your app and use several
top levels, the app would crash with an error message.

A problem is that the top-level SurfaceView is a special
overlay View and does not support being stacked in a
layout. So instead, we let all windows share the same
GL surface and draw on top of each other. This works
fine for simple use cases.

We implement a new platform capability to make sure no
top level windows (even combobox popups and dialogs)
get non-fullscreen geometries. That has never
worked properly with the eglfs plugin.

Task-number: QTBUG-30473
Change-Id: Ia1438019638fc739cc93ffe79b46b81631254df2
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-18 09:18:43 +02:00
Jens Bache-Wiig
1770f25857 Fix GroupBox painting on Windows when not using widgets
This is simply removing some slow and rather ugly hacks that tried
to reconstruct broken data from the windows xp theme. After testing
without these hacks on both XP and Windows 7, I believe we can
conclude that these workarounds are no longer required and even
breaks our look and feel in several places.

Task-number: QTBUG-29888
Change-Id: Ifaffd660e8d9ed6dfd43657745c3fa1606d33a7c
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-18 09:18:43 +02:00
Morten Johan Sørvig
e25db96884 QOpenGLPaintDevice: correct painting on retina.
Make QOpenGLPaintDevice::metric(PdmDevicePixelRatio)
return d->devicePixelRatio instead of 1.

Change-Id: I4cf9dd552a700b958212edc8efb990a45e77fd66
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-18 09:18:43 +02:00
Shawn Rutledge
acfccd0483 Fusion & GTK styles need to check direction from style option not qapp
An RTL menu containing a menu item which opens a submenu was showing
the wrong arrow if the application's direction was not also RTL.
So now the test for QTBUG-30595 can be simplified: no need to set
the application direction, and therefore less chance of failure.

Change-Id: Id140656206c6fefea3649289477dc54c77e2dd5e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-04-18 09:18:43 +02:00
Shawn Rutledge
4c7881396e An RTL submenu should be right-aligned
Task-number: QTBUG-30595
Change-Id: Iac54cae70b5a2ac6be5a750279fb390bb158776a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-18 09:18:43 +02:00
Gunnar Sletta
7c791171a1 Calling wglMakeCurrent on an already current context gives 100% cpu load
The problem occurs at least with nvidia cards when vsync is enabled
in the control panel.

Task-number: QTBUG-29686
Change-Id: I6fd2a3560a5baeeac7c3fe0440db85904c45026d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-18 07:09:09 +02:00
Friedemann Kleint
333817b9cf Do not send clipboard message to application under debugger.
Fix Qt Creator hang when copying a stack trace from an
application showing a runtime assert.

Change-Id: I874bd48643ebce1a3551644dc850cb7cf5869522
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-17 22:14:19 +02:00
Friedemann Kleint
9a89d614f2 Windows: Fix compile with -directwrite.
Task-number: QTBUG-30643

Change-Id: I3a2a0e767a92bc2ff9d7d241dfad6771034e6ad4
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-17 22:14:19 +02:00
Gunnar Sletta
5a05d0716f Emit animation driver signals after we change the state.
Change-Id: I4d5d6efdcb519cd4bb53626ae9412a4f5f130689
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-17 19:22:19 +02:00
Cyril Oblikov
9557cc6536 Correct dir entries caching in QFileDialog
Using QFileSystemWatcher to update cache when directory is changed. It is
needed to correctly filter files created after the dialog opening.

Task-number: QTBUG-30604

Change-Id: I5479f9a54095de59ca2ba36b2bd4906de0907ac8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-17 12:31:42 +02:00
Martin Smith
c77f7229d5 qdoc: Add index of obsolete members to obsolete page
qdoc has been modified to emit a compact list of the
classes that have one or more obsolete members. The
command is:

\generatelist obsoletecppmembers

This generates an index of all such classes,
where each class name is a link to the class's
subpage of obsolete members. A class's subpage
of obsolete members is also accessible from the
class's reference page, but now it is also
accessible from this index.

Also, The command shown has been added to the
page obsoleteclasses.html in the generated
output. This page already contains the index
of obsolete classes.

Currently, no such output is generated for
QML types and QML types with obsolete members.
But qdoc does accept commands for those:

\generatelist obsoleteqmltypes

and

\generatelist obsoleteqmlmembers

...but qdoc doesn't know what to do with
those commands yet.

Task-number: QTBUG-30270
Change-Id: If19a3b977f64c948e4bd6f14a9e0a287419baa8a
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-17 12:29:55 +02:00
Jørgen Lind
3ae271523f Move Fusion styles palette into QtGui
So that it can be used as the standard palette for QtGui
applications instead of the absolutely useless black palette.

Change-Id: Ie001439fcd8840a66275009c9f42cbf8bab4864a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-17 07:43:11 +02:00
Sergio Martins
d42e54c862 Fix typo in qWarning()
Change-Id: I17aa0a1985c2da889bc602fd76dc07c890ed6f6b
Reviewed-by: David Faure (KDE) <faure@kde.org>
2013-04-17 02:22:28 +02:00
Gabriel de Dietrich
2dbb73b54b Cocoa: Fix menu popup, again
This time, popUpContextMenu:withEvent:forView: wouldn't respect the
menu's minimum width setting.

Change-Id: I7731851f2cf45d596d45a24dab5abe7b9239f07f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-16 19:45:11 +02:00
Gabriel de Dietrich
21f6ab2860 Cocoa: Make sure no invisible proxy icon button is created
If the icon is null, don't force creation.

Task-number: QTBUG-30064
Change-Id: If639714f667fedfcc67a3393a7d75111a7dbff3f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-16 19:45:11 +02:00
Frederik Gladhorn
f5ea183cc6 Prevent recursions when triggering menus in QToolButton
With a global shortcut set it would be possible
to let the button re-open the menu again and again,
each time spinning an event loop.

Task-number: QTBUG-30399
Change-Id: If7eddc115c77fef3df3e751fd72e7414cedaf272
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-16 19:45:11 +02:00
Thiago Macieira
2ddbba9ba9 Make QBuffer unbuffered
Sounds non-sense but it means that QIODevice will not try to copy from
QBuffer's buffer onto its own.

Eventually we should figure out to make QBuffer use the
QIODevice::buffer member that is already there and avoid all of this
mistake. Something for the future.

Change-Id: Ib700c9cadb46cec20a8ea5a69a488ded7104ac76
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-04-16 19:45:11 +02:00
Andreas Holzammer
0d1ab4e667 [QNX] Fix build/runtime if QT_NO_OPENGL defined
Change-Id: I38d511ac0a53b65abfe47baaa6333629df5b578d
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-04-16 19:45:11 +02:00
Thiago Macieira
b4ce49287f Make QBuffer::bytesAvailable() work
We don't need to keep an internal QBuffer position, we can just use the
one from QIODevice::pos(). It will keep track of goings ahead and
backwards for us, plus it will make the default bytesAvailable() work
out-of-the-box too.

This error was reported on IRC.

Change-Id: I8559e8ee56edaa01ca8732c1f1012082ebe3a3f2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-04-16 19:45:11 +02:00
Bjoern Breitmeyer
fb1649d30b Fixed CE build of sqlite3
The updated sqlite3 lacks a forward declaration of localtime.
Depending on the CE version that forward declaration
was sometimes available.

Change-Id: Iec7de1167702ccec46b62f63b65a4710231c8534
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-16 19:45:11 +02:00
Frederik Gladhorn
ae6f9d00a6 Accessibility Mac: Enable ignoring of children
The ignored children do not show up in the
hierarchy, this should improve performance
significantly.

Previously the code would ignore the grouping
property which seems to break QGroupBox.

Change-Id: I4535af9c95bce76ded65f6d40fe07f17f3acffad
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-16 16:50:59 +02:00
Jens Bache-Wiig
6300caf01f QGtkStyle: Remove widget dependency from GroupBox
This patch makes it possible to draw a checkable groupbox without
passing a widget pointer.

Task-number: QTBUG-29867

Change-Id: I9b74bcffa0401c88f9dcbcd9816081b7f03a5173
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-04-16 15:36:09 +02:00
Konstantin Ritt
201bd2e59a QFontConfigDatabase: Fix performance regression
..introduced by 244cc5da55
Symbol fonts usually don't have code ranges support except Latin.
Don't load FT face for font that doesn't look like a symbol font.

Change-Id: Iec46aa84e27227e0bda5d50f96a2b2f75f58e950
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-16 15:33:16 +02:00
Tor Arne Vestbø
8e127d9df8 Add default value for qHash's 'seed' argument for QOpenGLVersionProfile/Status
Although template<typename T> inline uint qHash(const T &t, uint seed) from
qhash.h is never instantiated because we have the two-argument version of
qHash() for both QOpenGLVersionProfile and QOpenGLVersionStatus, we need
the default argument, as the template in qhash.h uses noexcept, which
is evaluated regardless of instantiation, and uses qHash(t) without a
seed.

This behavior seems to not be the case with Apple clang 4.2, but has
been observed with Apple clang 4.1, Clang 3.2, and GCC 4.8.

Change-Id: If70e93f64eb9675a7c3ef7897ced2c6aebbec2d6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-15 17:45:20 +02:00
Janne Anttila
aa009e3dcc Fix QFSFileEngine::renameOverwrite for Windows Embedded Compact 7.
Windows Embedded Compact 7 does not have MoveFileEx, simulate it with
the available file I/O functions [1]. For more details please check the
comments in source code.

[1] http://msdn.microsoft.com/en-us/library/ee490588.aspx

Change-Id: Ib0fb0ba84e2d070dee2f633af1b81bec132f4c17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Johannes Oikarinen <johannes.oikarinen@digia.com>
2013-04-15 15:32:40 +02:00
Thiago Macieira
c57dd789fd Mark as unused the private members that aren't and CANNOT be used
Those members were left uninitialised by inline constructors and/or
the destructor of those classes is/was also inline. Those members
cannot be used to store pointers that need managing during the Qt 5.x
lifetime.

They can be used to store simple values, as if they were integers.

Detected by Apple Clang 4.2.

Change-Id: I20e2def7c4006668e2d6a7e332c89e2dc8c2a184
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-15 15:32:40 +02:00
Eskil Abrahamsen Blomfeldt
aec1bcf6a3 eglfs: Make sure virtual functions are not called from ctor
We want to override some of them in a subclass.

Change-Id: Ic7a22d7bc4589199b3f764157125094a4ff6ec28
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-15 15:32:40 +02:00
Eskil Abrahamsen Blomfeldt
2b4dff8dc1 Make surface and window accessible to subclasses
We need to access these in the Android plugin.

Change-Id: I8c7f279bbe0b7087260cceb1f965c833c0097984
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-15 15:32:40 +02:00
Eskil Abrahamsen Blomfeldt
c1ac77b34c Remove code for Android API level < 9
We don't support API levels < 9, so we can simplify this code
a little.

Change-Id: I9823d4c5a44d265e03dec0ceedeeb3c34a1e1eab
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-15 13:20:17 +02:00
Eskil Abrahamsen Blomfeldt
72e9cad560 Remove dead code
Just some code that was commented out and only adds to the
confusion.

Change-Id: Icfdf81de9731eeb2c473a2f6e2723742601a2037
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-04-15 13:19:01 +02:00
Morten Johan Sorvig
27d40fce12 Add autorelease pool for cocoa plugin creation.
Prevents mem leaks at startup on 10.6.

Change-Id: I5f8b72c54ab396ee0ec2e47320163a6a342b78f1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-15 13:17:26 +02:00
Morten Johan Sørvig
6a0bb4206a Add autorelease pools needed by Qt Creator.
With these Qt Creator startup is now warning-free
on 10.6.

Change-Id: Ie29d360611c0e516258920163e4e94d174217299
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-15 13:17:26 +02:00
Tasuku Suzuki
01f3ef2050 Make qtbase compile with QT_NO_IMAGEFORMATPLUGIN
qfeatures.h re-generated from qfeatures.txt because
QT_NO_IMAGEFORMATPLUGIN was missing

Change-Id: I1c9291529ec07f83f99c9cd08340cbfebda609b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-15 13:17:26 +02:00
Gabriel de Dietrich
61b71b2baf Cocoa: Fix unresponsive main window after running more than one modal session
For some reason, we postpone clearing the stack of modal sessions until we call
processPostedEvents() again. However, it also means that when we clear the second
modal session, that session keeps running although we just closed its window. The
reason why it isn't stopped is because it wasn't the topmost modal session in the
stack.

This patch fixes the issue by stopping a modal session if any session above in the
stack has been stopped. This makes it less problematic if we don't call
processPostedEvents() in between ending modal sessions.

Task-number: QTBUG-30504
Change-Id: I9f898250ae629947d066647f9d5a0b9f75cf0070
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-04-15 13:17:26 +02:00
Morten Johan Sørvig
88272d6c04 Don't warn on 0x0 sized windows.
I don't think this is an user error. If it is then
the warning should be in a cross-platform code path.

Change-Id: I4c615d9b2372660bb03b17ccb25204b2a8d17b1a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-15 10:34:53 +02:00
Gabriel de Dietrich
e5e0ec42bb Cocoa: Fix popup menus on modal windows
Previously, we used -popUpMenuPositioningItem:atLocation:inView: but
this turns out not to work with modal windows. This can actually be
reproduced in Cocoa.

Change-Id: I9b750d1f97637f0cc30329d3da3acf5200f62206
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-15 10:34:06 +02:00
Morten Johan Sørvig
11fdd8edcd Cocoa: Create QCocoaWindow when enabling touch.
The ref-counting and (native) touch enabling is
implemented in QCocoaWindow.

Change-Id: I4f3f5e16db59afec7dd7dd2f8360dd60b90bfe6d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-15 10:28:23 +02:00
Morten Johan Sørvig
2da29c9736 Cocoa: Enable touch on 0->1 counter transition.
Change-Id: I9d8fb84851a866c3020cbbca13d5b2dc297cfe65
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-15 10:28:14 +02:00
Morten Johan Sørvig
fd038dc53a Make QGLPaintEngine work on retina displays.
QGLWidgetGLPaintDevice::size now returns the size
in device pixels.

This fixes the QPainter "overpainting" and GraphicsView
with a QGLWidget viewport use cases.

Task-number: QTBUG-30217

Change-Id: I01998d39d7b4d755cf8b7b3fab5f75cd0d899ccf
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-15 10:28:00 +02:00
Morten Johan Sørvig
cea58f4b77 Add devicePixelRatio metric to QPaintDevice.
Previously QPainter computed the devicePixelRatio
based on the physical and logical dpi, and expected
that the ratio between them would be either 1x or
2x.

This was problematic for paint devices like printers
where the physical dpi can be much higher than the
logical dpi, and also for QScreen where the physical
dpi would have to be defined as a multiple of the
logical dpi.

Add QPaintDevice::PdmDevicePixelRatio and QPaintDevice::
devicePixelRatio() getter and implement it for the
QPaintDevice subclasses. Use it when calculating the
highdpi scale transform in qpainter.cpp and when scaling
the clip rect in qwidget.cpp.

Remove physical dpi scaling for QImage, QPixmap and
QOpenGLPaintDevice, reverting to the old behavior.

Change-Id: I6c97510613196d4536ff39d08e9750b8782283d4
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-15 07:55:52 +02:00
Konstantin Ritt
1f3a67e870 QFontEngine: Fix cache_cost might be not initialized
Change-Id: I4cf4de5797e6623a71593e8f382496188e3abac8
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-14 14:28:07 +02:00
Konstantin Ritt
112b31bed6 QWindowsFontEngineDirectWrite: Fix resources leaking
fontFamily has been acquired by IDWriteFont::GetFontFamily() and thus
must be released with IDWriteFontFamily::Release().

Task-number: QTBUG-26861

Change-Id: I314153f97b8b59c9ba728220f93b493b13337039
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-14 14:27:58 +02:00
Jędrzej Nowacki
d121b37a4a Micro-optimization of list string list construction in qmetaobject.
We know the size of constructed list, so it may be worth to reserve
memory space for it.

Change-Id: Idad061bc1dbf5acecaec48d2e00ca3504b9db8b8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-13 17:44:11 +02:00
Konstantin Ritt
d3938c1898 Fix integer overflow for very large fonts
This caused glitches up to unreadable text with i.e.
pixelSize 256 and stretch factor 4x /* ((256*4)<<16)<<6 */.

Change-Id: Ib6a038a043d820a94bd2019c50390a815a2a8277
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-04-12 20:02:49 +02:00
Konstantin Ritt
4f400eeec1 QFontCache: Make clear() really clear/free cached data it maintains
QFontCache::clear() now frees everything it keeps and resets the cache costs.

Change-Id: I23ac2cab5c7c7d70db03f048b6fde151a18f92e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-04-12 19:50:53 +02:00
Jan Kundrát
cc38a1eee8 Fix C++11 support in clang prior to 3.2
The comments in this file suggested that the bug was only present in clang/3.1.
However, qRegisterMetaType was failing even on clang 3.2
("tags/RELEASE_32/final"). The clang's bugzilla says [1] that the problem was
fixed two days before the release of 3.2, but apparently it didn't make it to
the release branch.

[1] http://llvm.org/bugs/show_bug.cgi?id=13470

Change-Id: I37db8f6f6b22ab939110e79240d92313c1786d6a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-04-12 14:09:25 +02:00
John Layt
61d0f728ae QPrinter - Fix doc errors
Fix doc errors.

Task-number: QTBUG-27143
Change-Id: I59376bdb48ce03eb61f38b7dd7eb58f0d517a873
Reviewed-by: Casper van Donderen <casper.vandonderen@gmail.com>
2013-04-12 11:46:01 +02:00
John Layt
839a9c11de QPagedPaintDevice: Fix setPageSize() to set correct metrics
Use the correct metrics for the requested PageSize instead of always
defaulting to A4.

Task-number: QTBUG-30494
Change-Id: Ia3978afe3f7cc9b1ded1065416e5c3def44e7a05
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-12 11:46:01 +02:00
Tobias Hunger
47ce14cf74 s/uint32_t/quint32/
uint32_t is in C++11, which we can not rely on being present. It is also
in C99, but some compilers do not support that in C++ mode.

Change-Id: I29bada724f5646a0a0562b3ab133cb49cf928d6d
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-12 11:46:01 +02:00
Friedemann Kleint
8c81b282f8 Widgets: Propagate 'accepted'-state of touch begin events.
Task-number: QTBUG-29946

Change-Id: Ia9ac54251f52b6ae4b3d667e49b96441def72a57
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-12 09:31:51 +02:00
Friedemann Kleint
f8a047d843 Fix Windows CE compilation.
Breakage introduced by 11e9f1368b .

Simplify #ifdef-blocks.

Task-number: QTBUG-30063
Change-Id: I0710915ff7b0ad5947935904c43ff9b621f638f2
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
2013-04-12 09:31:51 +02:00
Janne Anttila
fc21811982 Fix qlocalsocket_tcp.cpp build for Windows Embedded Compact 7.
There is no 'name' variable, but apparently 'd->serverName' is correct
variable here. Some other methods take 'name' as an argument and have
similar code block, so I think this is a copy/paste error introduced
somewhere in the past.

Change-Id: I2e82b42688b9928e0dcc5054df04e87d30a5e38e
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Johannes Oikarinen <johannes.oikarinen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-12 09:31:51 +02:00
Konstantin Ritt
b3dae6848d Fix leaking of QFontEngineData
QFontCache now references QFontEngineData-s it maintains,
so that QFont instances not freed prior to calling ~QFontCache()
would destroy QFontEngineData on their own.

Task-number: QTBUG-25434

Change-Id: Ia7679d64de436841f09ac7be62ceb570e50cce5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: jian liang <jianliang79@gmail.com>
2013-04-12 04:23:35 +02:00
Gunnar Sletta
289120f8dd Enable qDebug to console when desired on Android.
Change-Id: I91906c5fc2a5b406f416c296c124a01795e69b8a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-12 01:25:37 +02:00
Stephen Kelly
fc06df5c77 Warn if mouse event occurs outside target window in tests.
This class of bug seems to occur in 'flaky' CI tests, so give
more information about what the problem is. Found here:

 https://codereview.qt-project.org/#change,44210

Change-Id: I73908e309bdecf1fd3bc323dd4e8febe47c1239a
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-12 01:25:37 +02:00
Stephen Kelly
89e6183a19 Only test cmake module versions if available for test.
The expected versions are only set if the cmake tests are set up by
qmake by running

 qmake && make check

If instead someone uses cmake directly:

 mkdir build && cd build && cmake .. && ctest

the expected versions are not known, and the test fails without
this patch. So, don't test the versions if they are not known.

Change-Id: I2e8a4f651a69a8817c819d881be75ca07bc1bfd4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-11 22:34:31 +02:00
Thiago Macieira
6a11dd1669 Remove unused private members [tools]
Apple Clang 4.2 caught private members that aren't used in a class
with no friends. Since this code is in a tool, there's no binary
compatibility requirement.

databaseinfo.h:71:13: error: private field 'driver' is not used [-Werror,-Wunused-private-field]
quoter.h:86:10: error: private field 'validRegExp' is not used [-Werror,-Wunused-private-field]
qmlvisitor.h:123:11: error: private field 'tree' is not used [-Werror,-Wunused-private-field]

Change-Id: Iba9995f28ddef983c9ffc1dc551f042539252704
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-04-11 21:11:33 +02:00
Fabian Bumberger
e9760f1559 Fix the check if mouse events should be synthesized from touch events
In QGuiApplication only Qt::AA_SynthesizeMouseForUnhandledTouchEvents
is taken into account when synthesizing mouse from touch events, in
QApplication only the PlatformIntegration syle hint
QPlatformIntegration::SynthesizeMouseFromTouchEvents.

With this patch both attributes are checked. Furthermore the check was
moved out of translateTouchToMouse in QApplication in order not to
influence the result which is returned to the user, when mouse events
are not be synthesized.

Change-Id: I87ac7299f0a9fbf0a083eff9c547f0dbfab75dfb
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-04-11 16:09:19 +02:00
Jonathan Liu
e81446141f ANGLE: Use rtti_off in CONFIG only for release
ANGLE uses dynamic_cast in debug.h for debug builds which require RTTI.

Change-Id: I0e2fea7ed751dc87624d7e76d179023accb9c126
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-11 16:09:13 +02:00
Andy Shaw
ac4474900c Call QString::normalized when it is constructed via the native API
When a string comes from the native APIs then it may need to be
normalized.

Task-number: QTBUG-14787
Change-Id: I5164e80efcd1d99a50263c72bcf97d7fb31b38f7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-11 10:41:14 +02:00
Jan Arve Saether
3a3e9b74eb Do not show the warning if queryAI() returns an invalid interface.
We should only warn about missing a11y plugins if iface is 0, since
we obviously have the plugin otherwise.

This got triggered by that a visible widget got destructed, which in
turn called hide(), which ultimately ended up calling
QAccessible::updateAccessibility(QAccessible::ObjectHide).
When QAccessibleEvent::accessibleInterface() then called
queryAccessibleInterface(), QAI::isValid() would return false because
the widget was in its destructor.

Change-Id: If655e00e7bb3737a39e24e26dbd1e23edd515bf5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-11 10:09:44 +02:00
Friedemann Kleint
0b12cf613f QVector: Fix signedness warning in assert.
Task-number: QTBUG-30331

Change-Id: I91b346b36162e8146a05babd24afa4bfb7259bec
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-04-11 10:03:00 +02:00
Stephen Kelly
77db3b8d65 Merge "Merge branch 'release' into stable" into refs/staging/stable 2013-04-11 06:51:52 +02:00
Stephen Kelly
1b32185a7a Make qt5_use_modules find dependents only in the parent directory.
Similar to 70420ec3 (Look for cmake package dependents only in the parent
directory., 2013-04-02), make sure this cmake function only searches
for sibling packages as dependencies.

Change-Id: Icab23d333fa6a750ee262b592fae39f0ba334fee
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-11 00:51:04 +02:00
Stephen Kelly
b8cd54a92f Make the umbrella Qt5 CMake Config file find components only in the parent directory.
Similar to 70420ec3 (Look for cmake package dependents only in the parent
directory., 2013-04-02), make sure cmake only searches for sibling
packages as components.

Change-Id: I9e0c13dfcdba28a9fd6892828b0f509dd63e6604
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-11 00:48:58 +02:00
Konstantin Ritt
c0300eed19 QFreetypeFace: Fix getFace() uses UTF-8 paths on non UTF-8 locales
QFontEngine::FaceId::filename is intended to be local8Bit-encoded
but QFreetypeFace::getFace() always treats it like UTF-8-encoded.
Also replace explicit (to|from)Local8Bit and toLatin FaceId::filename
conversions with QFile::(en|de)codeName, where appropriate.

Change-Id: Ic7beabf0a160f2f02f1667bcb8e6067adaba1c16
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-11 00:03:32 +02:00
Konstantin Ritt
9f7bc42b7d Fix QFontconfigDatabase unable to fallback to a localized family
When populating the font database, FcPatternGetString(FC_FAMILY) gets
a localized font family name; but, in fallbacksForFamily, it gets
a non-localized font family name, so it unable to find the proper font to fallback.
Simply register all family name variants as aliases to localized name
and make sure they are checked when getting fallback families.

Task-number: QTBUG-28806
Task-number: QTBUG-30415

Change-Id: I71c03ae9b51a28736c2576f3442f1bbdb3497c09
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-11 00:03:22 +02:00
Sergio Ahumada
b4283c0b46 Merge branch 'release' into stable
Conflicts:
	src/widgets/styles/qwindowsvistastyle.cpp

Change-Id: Ifd17532393ebab8ed454c6a79bab622959ceef95
2013-04-10 19:28:12 +02:00
Stephen Kelly
f29b793508 Use CMake facility for verbose makefiles instead of an env var.
It should also have an effect for Visual Studio project files, not
just makefile generators.

Change-Id: I395071f09b29a6e8967a3d44e41d30480ae783f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-10 17:51:51 +02:00
Jens Bache-Wiig
b5b6d6f5fc Windows: Dont use black as clear color on opengl windows
Perhaps this made sense when all our open gl examples were black,
but with components and I would assume the majority of use cases
we should use the default window background color to fill exposed
window background during a resize.

Change-Id: Ia439a7c3919243efa6026e2e07bee62c25557df0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-04-10 17:51:36 +02:00
Rafael Roquetto
f0425e115e QNX: Adjust rotation according to initial orientation
Task-number: QTBUG-29201

Change-Id: I37e82904e0f3d8b372b31ee7d1379e61c788c622
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
2013-04-10 17:51:36 +02:00
Peter Hartmann
f273d6fbc0 QNetworkConfigurationManager: check whether app is shutting down
... before trying to update the configurations. Before, we would check
whether the pointer to the QNetworkConfigurationManagerPrivate instance
was 0 and in that case construct it. This would mean that this code path
was taken "at app shutdown", i.e. when the qAddPostRoutine had already
been called but the other statics were still accessed.

Note: This is not thread safe, but neither is the rest of the code;
making it thread-safe would require additional changes.

Task-number: QTBUG-30585
Change-Id: I8f6cf616e3f3ba1e84b8246589fb7210d2dae57a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-10 13:27:01 +02:00
Kai Koehne
0eefbf8376 Fix access to invalid memory
QString::toLatin1() creates a temporary QByteArray.

Task-number: QTBUG-30578
Change-Id: I17c60bbade1486399f745c7e9878c6467971e6cc
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-10 13:23:13 +02:00
Sze Howe Koh
6617b6765a Doc: Fix minor typo
Change-Id: Id99a1ea0be841cf7cfaf3c671d36dbddc290fcad
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-10 13:21:09 +02:00
Sergio Ahumada
31907c16f8 Remove QT_{BEGIN,END}_HEADERS macros
These macros are useless from Qt 5.1 on.

Change-Id: I4574e87ef36e7bc67d2f1caa38c685a837708764
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-10 12:53:05 +02:00
Liang Qi
1d6325e4f1 Mac: Ensure the native filedialog sets file name when saving
The name field string was not set in native dialog when one was present.

The previous fix is not correct. In the doc of setNameFieldStringValue,
it said "The value must not be nil".

Task-number: QTBUG-28342
Change-Id: I847fb7472b8fecc0303433d8bf72b6a5bd7da72b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-09 20:10:59 +02:00
Shawn Rutledge
4bcec703c4 OSX window: set QWindow geometry after native window is created
Initial window position is at 0,0 by default, then it's corrected
in createNSWindow (by calling initialGeometry).  After window
creation, QNSWindowDelegate will receive the windowDidMove
notification and call QCocoaWindow::windowDidMove() which then
calls QNSView::updateGeometry().  It will not call
QWindowSystemInterface::handleGeometryChange() because the window
is still being constructed.  So we can fix this by directly
setting QWindow::geometry in the QCocoaWindow constructor.

Task-number: QTBUG-30382
Change-Id: I3db7a6e83693e5787ae82dcab1767de938d2e5d1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-09 20:10:59 +02:00
hjk
34fadcfeb1 Mac: Return Qt::Key_F9 for F9, not Qt::Key_F8
Task-number: QTBUG-30520
Change-Id: I7006e43ea638796045925e753a2ef8f9d0a066e9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-09 20:10:59 +02:00
Sergio Ahumada
1abeb85464 doc: Minor changes to qtgui.qdocconf
Changing "C++ API" -> "C++ Classes" to match all the other modules.

Change-Id: I434cd9c32b1db18395242e73564fe309c8ebb99e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-09 10:36:28 +02:00
Andy Shaw
97c6fd22d2 Use Q_DECLARE_PRIVATE for Oracle and DB2 plugins
This completes the change started with
0bdc86d9ef by providing the implementation
for the Oracle and DB2 sqldrivers

Change-Id: Ia14415c6d7dea51f1369a81236f79aff892b3af7
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-04-09 10:21:26 +02:00
Sze Howe Koh
ab7eacd8a5 Doc: Fix minor typo
QDoc needs correct capitalization to create a link to the class ref

Change-Id: If95ab1245fcad6c0f624b88eb4522ba78be7d6a6
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-09 09:31:32 +02:00
Thiago Macieira
55c225428f Doc: fix compilability of the example
QDBusConnection::registerObject takes an object.

Task-number: QTBUG-30483
Change-Id: Ibebec48e8c9d3df0d3fa1177c3887ea5c75e8623
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-04-09 07:13:58 +02:00
Thiago Macieira
f104991180 Doc: add row for Qt 5.0 datastream version
We seem to have two tables. That's a bad idea, but they are there.

I won't add Qt 5.1 until we're certain that the datastream isn't
changing. It's preferable to lack information than to show the wrong
value.

Change-Id: Ibc7eb95bbbf3b35388f910154372fdd896735430
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-04-09 07:13:55 +02:00
Martin Smith
7a66f6b60e qdoc: Removed dead code from qdoc
The documentation used to have "Main Classes" list for C++ classes,
and qdoc kept track which classes were supposed to be listed as "main"
classes. This is no longer used, so this change removes the code that
marked a C++ class as a main class and tested whether a class was a
main class. This dead code was seen while preparing the way for
changing qdoc to output a documentation page for obsolete C++ classes
and functions and obsolete QML types and functions.

Task-number: QTBUG-30511
Change-Id: Iccc31b46b7c3c144038372cad4771d974f207937
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-04-08 17:23:15 +02:00
Gabriel de Dietrich
6db10834b0 Cocoa: Properly clean window mask data
Also, get rid of qt_mac_toCGImage and QPainter warnings.

Change-Id: I9e2a0e93d74c318d99651de9222994615e082ac9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-04-08 17:23:15 +02:00
Volker Krause
e6bade8f87 mkspecs are installed to QT_HOST_DATA instead of QT_INSTALL_ARCHDATA.
These are the same for normal builds, but differ when cross-compiling Qt.

Change-Id: I75eccc6f4b67b440a08c4aba41aabb7df686c9f9
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-08 17:23:15 +02:00
Friedemann Kleint
faa390dc4f Fix compilation with QT_NO_ACCESSIBILITY.
Task-number: QTBUG-27860

Change-Id: I561b0b0b1a098556f9de909241b448307a271985
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
(cherry picked from commit 8b29c7539d)
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-08 15:30:58 +02:00
Mark Brand
f6011ec528 QSQLITE2Driver: use Q_DECLARE_PUBLIC/Q_DECLARE_PRIVATE
Follow-up to 0bdc86d9ef

Change-Id: I0a480b5780eb22b1c22e8a47b3a13ab1cd97b934
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-04-08 14:31:41 +02:00
Volker Krause
96e3c2bcbf Don't bypass overwritten [set]data() methods in the proxy.
By calling itemData() of the source model directly, the result cannot
contain data provided by the proxy model itself. The base class
implementation however will call data() on the proxy instead.

Change-Id: Ib0ef5f5621457adbfa4bd896a756dfcb98d0ae54
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-04-08 14:17:27 +02:00
Michael Brüning
9bf93f3e73 Clear the WA_QuitOnClose flag from EvalMessageBox.
The evaluation message box caused  the QtWebProcess
to quit due to the fact that the process has no other
windows and EvalMessageBox was both set to be closed
on quit and ended up being the last window in the process.

Change-Id: Iad6461d014258fdc5fade7dafe48da33903377bb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
2013-04-08 14:09:02 +02:00
Andrew Knight
dce86de8e7 ANGLE: Avoid memory copies on buffers when data is null
With data=0, ANGLE can crash when setting the buffer data. As this
should be a legal operation, don't perform a memcpy when data is null.

Change-Id: I3fa1260482549b1da50d7a68001a65decb98f258
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-08 11:35:44 +02:00
Andrew Knight
fab430a412 ANGLE DX11: Prevent assert when view is minimized or size goes to 0x0
This allows the Direct3D 11 version of ANGLE to gracefully allow
surfaces with dimensions of 0. This is important because Qt may resize
the surface to 0x0 because of window minimization or other user
action (window resize). As EGL specifies that empty (0x0) surfaces are
valid, this makes sure an assert doesn't occur in the case that a valid
surface is resized to an empty one.

Change-Id: Ia60c4c694090d03c1da7f43c56e90b925c8eab6d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-08 11:35:44 +02:00
Andrew Knight
710ad8ce1b Upgrade ANGLE to DX11 Proto
Upgrades ANGLE to dx11proto (dx11-MRT-support tag), which splits out support
for DirectX9 & DirectX11. The DX9 codepath is used by default;
CONFIG+=angle_d3d11 must be passed to the ANGLE project to build for DX11.
Existing patches to ANGLE have been updated (or removed if no longer
needed), and a patch has been added to make DX9/DX11 codepaths mutually
exclusive.

Change-Id: Ibe13befadb94f04883eca449d0ee1f0da955ff92
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Axel Waggershauser <awagger@gmail.com>
2013-04-08 11:35:44 +02:00
Frederik Gladhorn
8307ab784e Make QTextCursor accessibility boundary finder available
This allows re-using the function in QtQuick.
In addition TextBoundaryType is moved to QAccessible
and QAccessible2 as namespace ceases to exist.

Change-Id: I184bc2c181a22ca51ac4db4e5a080dc26d4acfe0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-04-08 11:35:44 +02:00
Ahmed Saidi
6f0dc9f4c7 QWizard/Win: Support RTL layout in Aero style
Task-number: QTBUG-30462
Change-Id: Ie6b3ba4975542a9d92611eb9a8547215e41d3c2c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-04-08 11:35:44 +02:00
Shawn Rutledge
53cee4a37a Mac: a dialog should have a titlebar by default
Change 595deca5 for QTBUG-22316 resulted in having titlebars only on
modal dialogs.

Change-Id: Ic23c957e0e95cf567d90831e105cc402465df982
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-04-08 09:30:19 +02:00