Commit Graph

12365 Commits

Author SHA1 Message Date
Olivier Goffart
7e5d1c1c2f moc: Support the '$' character as an identifier
Both gcc and clang allow the use of '$' in their identifiers as an
extension. moc should not throw a parse error if there is one in the
file. Instead, consider '$' as valid in identifiers.

Task-number: QTBUG-22720
Change-Id: I8be3a52429c0db5b7e8308b8f4fe475d3d3994bf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-03-02 12:58:18 +01:00
Olivier Goffart
b0e58a9008 Fix compilation of moc generated file with MEMBER properties
If the object has only MEMBER properties, without any other property
specifying READ, the generated will fail to compile with this error:

tst_moc.moc: In member function ‘virtual int ClassWithOneMember::qt_metacall(QMetaObject::Call, int, void**)’:
tst_moc.moc:3810:42: error: ‘_v’ was not declared in this scope

That's because the '_v' is only declared if 'needTempVarForGet' is set,
and it should be set when we have a MEMBER property.

Change-Id: I829fad3faf69654b5a3fd540857df19f4a9449d4
Reviewed-by: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-03-02 12:58:18 +01:00
BogDan Vatra
e786a347c8 Add __ARM_ARCH_5TE__ to Q_PROCESSOR_ARM_V5
Android uses this define for armv5.

Change-Id: Iee32f3e8691fa731ab0c2185a01620e18741f9a4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-03-02 10:47:41 +01:00
Oswald Buddenhagen
1c061b4bcc introduce QMAKE_LINK_O_FLAG
this makes it possible to properly parametrize alternative linkers.

Change-Id: Ia9cf574544a0259975470366d278b6c5dc747906
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-02 10:45:54 +01:00
Peter Hartmann
b20d15b58b QUrl: update top level domains that may contain non-ASCII characters
Most notably, .com and .net now may contain non-ASCII characters.
list has been generated from
http://www.mozilla.org/projects/security/tld-idn-policy-list.html

Change-Id: Idc3191dc782bc4173ccb19b4bc81f4f061ca7999
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-02 10:13:27 +01:00
Giuseppe D'Angelo
658616b44e QOpenGLShaderProgram: insert precision defines based on runtime detection
Given that we can create OpenGL/ES contexts even under a Desktop OpenGL
implementation, we must check the type of the surface we're renderering
on at runtime.

Change-Id: I55004ce918889b3fc094702976500fcfc675bd1a
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-01 22:10:25 +01:00
Thorbjørn Martsum
d711f98bfb Clean up manual test to QGraphicsView (rubberband)
This cleans a bit up in the manual test by
a) Removing a weird reference alloration (and replace . with ->)
b) rename for variable from v (which was also the view name) to n.
c) remove a big item in the scene rect that is irrelevant to the test

Change-Id: I49cb319bcc2f4bceef0c96ca86b571b0240a9a92
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2013-03-01 22:10:25 +01:00
Frederik Gladhorn
a48a85098b Add .device.vars to .gitignore.
Change-Id: Ia119a33faa6e0e84cb8a002e2ee9f9a745d31f1c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-01 19:43:44 +01:00
Sean Harmer
2ca46a5526 OpenGL: Add support for OpenGL 4 tessellation shader stages
This adds support for OpenGL 4 tessellation shader stages to
QOpenGLShaderProgram and QOpenGLShader.

Change-Id: Iefb2f411e00767990d54670c5d39413be694dd66
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-01 10:42:21 +01:00
Jędrzej Nowacki
c474f40452 Add QDBusReply::error() const.
The accessor was missing.

Task-number: QTBUG-29917
Change-Id: Ie6759a1120bc9ed6550c271df35f276e15b4eb79
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-01 09:39:23 +01:00
Alan Alpert
8b0868bb17 Add notify signals to some QCoreApplication properties
The various string properties are good candidates for exposure to QML.
While QCoreApplication itself is unlikely to be exposed to QML directly,
a wrapper exposure also needs these signals in order to react to changes
from QCoreApplication.

Change-Id: I266da6010f1c9300de4bb5e7775a0bdacab7f26c
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-03-01 01:46:50 +01:00
Jędrzej Nowacki
0effb75153 Enable QGlobalStatic autotest.
Change-Id: Icda82dacbc749247153df1edb75629b959030ee9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-28 23:43:50 +01:00
Thiago Macieira
50d3a2917e Fix Q_GLOBAL_STATIC support for exceptions
The problem was that the HolderBase destructor was getting called after
the contained type's constructor threw an exception, as is required by
RAII semantics (the base was fully initialized, so it had to be
destroyed). That was required because we want to return a non-null
pointer from operator() during destruction and return null after
destruction, to keep compatibility with Qt 4.

The solution is to only set the guard to Destroyed only if it is already
at value Initialized. This way, if the HolderBase destructor is run as
part of the stack unwinding, it knows that the construction did not
complete.

Change-Id: I9849b43ed7112bf9e70861b48a56a924c286617e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-02-28 23:43:46 +01:00
Thiago Macieira
ebfd85a499 Add the infrastructure to compile Qt with -Werror
This is enabled only for -developer-builds and only for certain
compiler-version combinations that are in a whitelist.

It also requires each library, plugin or tool to declare whether it is
supposedly clean of warnings. When most targets are clean, we can
consider inverting.

Change-Id: I17b5c4e45aee5078f9788e846a45d619c144095a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-28 23:43:36 +01:00
Tor Arne Vestbø
0520631b2b Merge "Merge branch 'ios' into dev" into refs/staging/dev 2013-02-28 19:22:05 +01:00
Rafael Roquetto
439002cdde BlackBerry: handle window state navigator events
Change-Id: I925b1c53c5e251111469501056ee162a23e36faf
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-02-28 19:22:05 +01:00
Olivier Goffart
ab59a7ef09 Add private API to connect to slots in QObjectPrivate
Change-Id: I16ffbf91ff4c6e9fca6fe7984800d2c24e70701b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-02-28 19:22:05 +01:00
Tor Arne Vestbø
b997481fcb Don't look up DOCTYPE when resolving SDK settings on Mac OS
We don't want to hit the network, as a flakey network or slow server will
hang the XML parsing. We assume the XML is well formed.

Change-Id: Idc4898a925a46222954bf633a04ea9fe148c6797
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-28 19:22:05 +01:00
Jerome Pasion
cbe6aafc11 Doc: Various changes to global CSS files.
-added style for JavaScript code blocks
-code blocks is scrollable when viewed in a narrow window
-improved alignment of table of contents

Change-Id: I45acdb4c7aa0ae57fe030e7e68a230c1a7d41b8f
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2013-02-28 17:14:54 +01:00
Sean Harmer
40192d6814 OpenGL: Add QOpenGLVertexArrayObject class
This class makes it much simpler to manage OpenGL state relating to
vertex data (i.e. vertex buffer objects, vertex attribute divisors,
index buffer objects, vertex buffer formats).

Change-Id: I9fb932cc3f0691ec9ba065bf871e43cd2e369bad
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-28 17:11:40 +01:00
Sean Harmer
2c8c0cb33a OpenGL: Reinstate support for OpenGL geometry shaders
Unlike QGLShader, this requires the OpenGL 3.2 core implementation
of geometry shaders to keep the API simple.

Change-Id: Icb07f430c4c5b5d950bcf6f7119becec4cfaad8a
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-28 17:11:28 +01:00
Eskil Abrahamsen Blomfeldt
05a61de622 Allow flushing window system events from other thread
For platform plugins such as the Android plugin, we need to
make sure an event is delivered and handled before continuing
execution (e.g. when doing an expose event to report that the
EGL surface has been destroyed when the app goes into the
background.)

Change-Id: Ibd381baafa93f111dbc887d4cf9d9ca37429b186
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-28 17:11:02 +01:00
Eskil Abrahamsen Blomfeldt
dedec0b305 EGLFS: Enablers for Android plugin
These are some changes that are needed to make the Android
plugin as a subclass of the EGLFS plugin.

Change-Id: I7c77931f311d8a07f9292715d2abc256c5d552d8
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-02-28 17:10:55 +01:00
Israel Lins
f4d7b4d10f PSQL: lastInsertId without OID on table
Make lastInsertID work for tables without OIDs.
The use of OID in tables is now deprecated in PostgeSQL and
lastval() is now provided.

http://www.postgresql.org/docs/8.1/interactive/runtime-config-compatible.html#GUC-DEFAULT-WITH-OIDS

Change-Id: I01dfdd7a2aab8826487657f691fea3c9268c16b2
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2013-02-28 10:04:46 +01:00
Thiago Macieira
267567b8da Enable C++11 mode for Qt tools too
Change-Id: Ifb93e6ed1046142a9f57c7546ddf926532efd868
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-02-28 05:43:25 +01:00
Thiago Macieira
bb6b2f4073 Add qt_common.prf and move some common definitions there
This file is now included by three types of Qt output: modules,
plugins (including QML plugins) and tools.

Change-Id: I5085f6ff37f70e9228303bf0520040adc2e2d7a5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-28 05:43:18 +01:00
Tor Arne Vestbø
70d5cb406f Merge branch 'ios' into dev
Change-Id: I5d18d502908920a44bbc506aba77dd805d94d843
2013-02-27 23:57:06 +01:00
Richard Moe Gustavsen
9b05f675e3 QFusionStyle: Fix crash on iOS
First of all, the ifdef section was meant for osx, and not ios.
Second, a platform theme does not necessarily need to override the
palette function, which will return 0 by default.

Change-Id: I5a28f4ee1020c9253d0803c9d962c6a058e5358c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-02-27 23:56:12 +01:00
Richard Moe Gustavsen
75a7dc7a57 iOS: Remove debug output noise
This debug information is not needed anymore, and only causes noise
when trying to debug other stuff.

Change-Id: I076826e251b84a3883e63aa7669f6e1bb55a0d1f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:11 +01:00
Richard Moe Gustavsen
76e4b6d2f2 iOS: Add QIOSIntegration::hasCapability function
Add the missing override, and report that we support
OpenGL (and multiple windows).

Change-Id: If95138cab9099b547d12d3dfed008bd63b6d2acf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:11 +01:00
Morten Johan Sørvig
aa5528b050 iOS: Implement socket notifiers.
Create the QCFSocketNotifier class in platform support
which contains shared socket notifier support for
the Cocoa and iOS plugins. Remove the old code from
the Cocoa plugin.

The Cocoa code had one QCocoaEventDispatcher-specific
call: maybeCancelWaitForMoreEvents. Create a forwarding
function that is passed to QCFSocketNotifier.

Change-Id: Ibf9bd4745ba4f577a55f13d0cc00f5ae04447405
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-27 23:56:10 +01:00
Tor Arne Vestbø
0c1ae5f866 iOS: Add potentially undefined version defines to qsystemdetection.h
Unless we're building on the 6.1 SDK some of the version defines will
not be defined in Availability.h, so we define them ourselves so that
Qt can still use them.

Change-Id: Ibb45e9f8f4e888fc57e35286bf15d2fee2c1a217
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-27 23:56:10 +01:00
Morten Johan Sørvig
fecc155408 iOS: Enable autorotate on startup.
The qobject_cast to QGuiAppplication will always
fail at startup since QGuiApplication is not ready
yet.

Return YES in that case. Allowed orientations can then
be controlled by setting "Supported Interface Orientations"
in Xcode or the Info.plist file.

Change-Id: Ifd86bbcedabc716e63563bbb7cb0c1c6833fd6c7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-27 23:56:10 +01:00
Morten Johan Sørvig
c75bc5b532 iOS: Don't crash on landscape mode startup
fromPortraitToPrimary is called from the QIOSScreen
constructor. This is probably to early to call QGuiApplication
functions.

Change-Id: I882304fd641df13dc530491990245ba9ad495377
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:09 +01:00
Morten Johan Sørvig
11d50be6dd iOS: Set touch point position in screen coords.
Previously the position was set in window coordinates,
which would break for non-fullscreen windows.

Change-Id: Iefa2f590c6d62b09fc3e7fe60a882c1acd33e029
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:09 +01:00
Richard Moe Gustavsen
3eeb388b42 iOS: Skip flushing child windows in QIOSBackingStore
We skip flushing raster-based child windows, to avoid the extra cost
of copying from the parent FBO into the child FBO. Since the child
is already drawn inside the parent FBO, it will become visible when
flushing the parent. The only case we end up not supporting is if the
child window overlaps a sibling window that's draws using a separate
QOpenGLContext.

Change-Id: Ib10414f4494747e5fe67f84b06575fe16ffddf96
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:09 +01:00
Richard Moe Gustavsen
029029fa97 iOS: QIOSWindow::setParent()
Change-Id: I1a413d898d10b55a4d0653eae719f5bd909a01ec
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:08 +01:00
Richard Moe Gustavsen
4993d3ed6b iOS: implement QIOSWindow::winId()
Change-Id: I3dd7accae43bcf7d4d6dfd8b272ab65d67bd935c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:08 +01:00
Tor Arne Vestbø
15bdf85f28 iOS: Bump max Xcode version to 4.6
We need to figure out where to draw the line when it comes to warning
about unknown compiler (Clang), Xcode, or SDK versions, but for now
building with Xcode 4.6 should not be an issue. We'll have to revisit
this and test with the full set of compiler/Xcode/SDKs we support
before the final release.

Change-Id: Iac3ec3a25c0f7618b2c3714657d147f17f834d97
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-27 23:56:07 +01:00
Tor Arne Vestbø
5ac2a3f045 iOS: Silence warning about 'long long' being a C++11 extension
At some point we want to build with C++11 support, but for now we silence
the warning.

Change-Id: I40deb0925d459eaf06e324dddc0a2e9893c57615
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-27 23:56:07 +01:00
Morten Johan Sørvig
60685407c2 iOS: Enable retina resolution for styles
The QStyle code uses the global qApp->devicePixelRatio(),
which queries the screen, not the window.

Implement QIOSScreen::devicePixelRatio().

Change-Id: I0091e5793f8d07ab7a46b6de443edd9457dcff85
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:07 +01:00
Richard Moe Gustavsen
58415530aa iOS: avoid activating modally blocked windows
Make sure that the user cannot activate a window
that is modally shaddowed.

Change-Id: Ib92be319d017460bbc1ef63ad7556cb4758dfa6c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:06 +01:00
Richard Moe Gustavsen
38e6d5a915 iOS: add QIOSWindow::windowLevel() to simplify window stacking
When adding modal windows into the mix, raiseOrLower became
even more messy to write. So do it the usual way instead, and
add a windowLevel variable to each QIOSWindow that we
can sort on. The code becomes more readable, and we can handle
more window types correctly.

Change-Id: I348352473a7d8cf9909c17c1b074b2fe3fab9819
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:06 +01:00
Morten Johan Sørvig
f2c52d6560 iOS: Implement touch events.
Track touch events during the standard [Began -> Moved
-> Ended] event sequence based on the UITouch pointer
which stays constant.

Enable multiTouch on Qt's UIView.

Mouse events should now be automatically created
from (unhanded) touch events by QGuiApplication.

Reviewed by: Ada Sørvig (fingerpaint app approved)
Change-Id: I2aeb48c962c697d8b8337f8ceab062070c2a4240
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:06 +01:00
Richard Moe Gustavsen
0a9a4e826f iOS: let first responder follow the view of the focus window
This to ensure that the keyboard does not close prematurly.
This can happen if the user opens up the keyboard while typing
inside one window, then switch window, continue typing while
the other window gets deleted.

Change-Id: I5cfb1673ccbe4d5aaa14167b7aa53451031089a1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:05 +01:00
Richard Moe Gustavsen
73e8796603 iOS: implement QPlatformWindow::requestActivateWindow()
Dispite the name, 'requestActivateWindow' means raise and transfer
focus to the window.

Change-Id: Ib97321ed7ec8da90e924ff8155a95896c12160c9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:05 +01:00
Richard Moe Gustavsen
e83bed82c1 iOS: raise windows that becomes visible
When a QWindow becomes visible, it should move to front and
be active.

Change-Id: Icab12c6031c0cc8d791e4f8cc49b9c2d5c73100d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:04 +01:00
Richard Moe Gustavsen
355f064ec9 iOS: implement QPlatformWindow::raise() and lower()
Probably not going to be the most used functions on iOS, but
implemented to support old widget apps out of the box. The
implementation stacks both staysOnTop and popup windows on
the same level for simplicity, since iOS does not have a
concept of z-ordering UIViews (UILayer has z-order, but layers
belong in a different hierarchy, and cannot be used in this
respect).

Change-Id: Idd68e5ceea7d4eaeb3066486c47400930cebb1b0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:04 +01:00
Tor Arne Vestbø
7150e8f51f iOS: Use 72 DPI for font size conversion
This matches how UIKit behaves

Change-Id: I13fd2578cac84e57b6be29c42ddee414b7ee9cb9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-27 23:56:04 +01:00
Richard Moe Gustavsen
16e8eca362 iOS: transfer focus to the window touched
Since our QWindows are UIViews rather than UIWindows, we need to
implement window activation manually. This patch will ensure that
the window touched by the user also gets keyboard focus.

Change-Id: I9390c5c8e50a4b066cd1320a2a044e02f2a9f75d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 23:56:03 +01:00