Commit Graph

12456 Commits

Author SHA1 Message Date
Frederik Gladhorn
5e8ae03578 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/kernel/qtimerinfo_unix.cpp
	src/plugins/platforms/cocoa/qcocoabackingstore.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/plugins/platforms/xcb/qglxintegration.cpp

Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
2013-03-05 13:42:11 +01:00
Friedemann Kleint
7a5fea113e Fix crash in flushWindowSystemEvents() in QGuiApplication-cleanup.
Check for existence of QGuiApplication, discard events if it is 0.

Change-Id: I04b27679033fb13ef2fa38e39757d89465cba94b
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-03-05 08:31:23 +01:00
Friedemann Kleint
09fb084e3a Output window in warning about flush() for unexposed window.
Change-Id: I1dd975926c2bea7bcc10a702739836b16b656213
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-03-05 08:31:23 +01:00
Friedemann Kleint
9100a68221 Windows: Print size constraints in geometry warning.
Change-Id: I0f8f82e975bfe7e9b00c48741b2a0317fac5f839
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-05 08:31:23 +01:00
Friedemann Kleint
f4933eba54 Windows: Take custom margins into account for size constraints.
Fix a warning unearthed by the task's code example. The minimum
size of the window would be too big since it did not take the
negative custom top margin into account.

Task-number: QTBUG-29904

Change-Id: I8b71a39f0724bdd1b9359676ce1d86ef5384d685
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-05 08:31:23 +01:00
Paul Olav Tvete
f2dc9f1dc2 Add missing license header
Change-Id: I0a1c453ff87beb7c900c6b1e76432bcd908a999d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-05 08:31:23 +01:00
Paul Olav Tvete
97fcf3bc98 Introducing the Qt Android port
Based on the Necessitas project by Bogdan Vatra.
Contributors to the Qt5 project:

BogDan Vatra <bogdan@kde.org>
Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
hjk <hjk121@nokiamail.com>
Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Paul Olav Tvete <paul.tvete@digia.com>
Robin Burchell <robin+qt@viroteck.net>
Samuel Rødal <samuel.rodal@digia.com>
Yoann Lopes <yoann.lopes@digia.com>

The full history of the Qt5 port can be found in refs/old-heads/android,
SHA-1 249ca9ca2c7d876b91b31df9434dde47f9065d0d

Change-Id: Iff1a7b2dbb707c986f2639e65e39ed8f22430120
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-05 08:31:23 +01:00
David Faure
1b582d64eb Long live QLockFile
Locking between processes, implemented with open(O_EXCL) on Unix
and CreateFile(CREATE_NEW) on Windows.

Supports detecting stale lock files and deleting them.
Advisory locking is used to prevent deletion of files that are still in use.

Change-Id: Id00ee2a4e77a29483d869037c7047c59cb909339
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-05 06:26:33 +01:00
Thiago Macieira
6f8bc4de40 Make the new OpenGL function headers compile on their own
You can't use #ifndef QT_NO_OPENGL before including whatever is supposed
to define that. That's qconfig.h, included by qglobal.h.

Also, make sure that the desktop OpenGL code isn't activated when
compiling in OpenGL ES 2 mode -- QOpenGLFunctions_1_0_CoreBackend and
other classes aren't defined.

Change-Id: I127edf56d42257580579789d0566b7e11c21133b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-03-05 02:43:00 +01:00
Tor Arne Vestbø
5107cacaee Move Xcode version extraction to xcode.conf
Change-Id: I11aaf3191cdda6bb88d3e1ba3aba56310720f0a1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-04 14:54:57 +01:00
Tor Arne Vestbø
4c1e7305e5 Teach configure's pro-file parser to parse quoted $$system()
If the command is quoted, it can contain anything but quotes (we do not
support escaped quotes, so single quotes have to be used). If the
command is unquoted we look for the first closing parenthesis. We used
to do this using .*?, but the greedy modifier '?' didn't seem to work,
so we now use an inverse character set.

Change-Id: I40660ce7aef6a6b6d480292d28da1b079bb161da
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-04 14:54:57 +01:00
Alberto Mardegan
e3f36e7290 Make tst_qwidget more stable
This change fixes a failure of tst_qwidget under XFCE (Ubuntu 13.04).

Change-Id: Ic63e85a97ac6e44ce8c281a80ef4e83feecd9185
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-03-04 14:54:57 +01:00
Richard Moe Gustavsen
e27ca37d18 ApplicationStates: add more states to Qt::ApplicationState
On mobile platforms, Qt::ApplicationActive and Qt::ApplicationInactive
are not sufficient to describe the different states an application can
be in. This patch introduces Qt::ApplicationHidden and
Qt::ApplicationSuspended that should fill in the gaps, at least
on Android and iOS.

Change-Id: I3f5a584cf6f4832e7c81dea095dcf711a8866c38
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-04 14:54:57 +01:00
Konstantin Ritt
2f31bbd9cc Fix potential issue in QTBF itemization code
Since 5.0, script is QChar::Script which isn't of 1:1 mapping to HB_Script

Change-Id: I2d88f929d7d3c3c994076a4e92ea22370962c41c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-04 14:54:57 +01:00
Konstantin Ritt
c63e7f5766 Fix selection of fonts that require OpenType features
HB_Face's supported_scripts[] expects HB_Script, so QChar::Script should
be remapped via script_to_hbscript().

Change-Id: Ib068c35ab76567fe9a61da7d8ab01133a6f58bc0
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-04 14:54:57 +01:00
Thiago Macieira
ccdec0b7a6 Remove excess brace added by accident
Added in 53dc49ffc8.

io.pro:44: Excess closing brace.

Change-Id: Ia3810a5a2668d96ab4604831e8ca5b49c7562956
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2013-03-04 14:54:57 +01:00
J-P Nurmi
14dab5b2d7 Add QProxyStyle(QString key) constructor for convenience
The QStyle implementations are becoming private, so the following
slightly verbose pattern seems to be now repeated a lot:

    new QProxyStyle(QStyleFactory::create("windows"))

This change adds an alternative, more convenient constructor for
this particular use case:

    new QProxyStyle("windows")

Change-Id: I97ded597a0fd3225a6354ebea0abb367237430af
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-03-04 14:54:57 +01:00
Gabriel de Dietrich
4b7276b93f Fusion style: Remove unnecessary widget cast
Change-Id: I8d7fd79b396525ee00fb0ba95faf0c95b5d2899a
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-03-04 12:47:24 +01:00
Thiago Macieira
d93b2ef968 Mark all qtbase headers that aren't clean
QtCore has a few headers that, though public, aren't meant to be
included directly. Those are the atomic headers, the three _impl.h
headers and qt_windows.h.

QtGui includes two OpenGL headers that don't compile on their own.

Other libraries should not have headers like that (but they do,
something we need to fix eventually).

Change-Id: I55e4eb057748f47df927ee618f9409acbc189cc1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-03 20:15:21 +01:00
J-P Nurmi
078b3419bd QGtk2Theme: use GtkSettings to fetch the icon theme name
Change-Id: Ib486d65276512a94299650adfbf3d87108ae5845
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2013-03-02 23:24:04 +01:00
Tor Arne Vestbø
c4249e1e92 Pick up QMAKE_MACOSX_DEPLOYMENT_TARGET from mkspec when building qmake
Instead of setting it explicitly to 10.6. Before 736e4258a this was
not a problem, as we were hard-coding the version flags as part of
the C/CXX_FLAGS for each makespec, so getQMakeConf would pick
them up automatically. When 736e4258a introduced sdk.prf as the
place to resolve these flags in a single place, it broke the
qmake build for macx-clang-libc++, as we were then falling
back to the 10.6 target hard-coded in configure.

We fix this by duplicating some of the logic from sdk.prf, by
pulling out the QMAKE_MACOSX_DEPLOYMENT_TARGET variable
and adding to the C/CXX_FLAGS.

Change-Id: I04afc7525031727c2504588c70dd3f7892cc8e42
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-02 12:58:18 +01:00
Tor Arne Vestbø
93c6284696 Make host_build re-use the sdk.prf logic
Instead of hard-coding the SDK and deployment target.

A host build will already use the host-makespec, so now that we
always build against an SDK, these mkspecs will have the SDK and
deployment target set.

Change-Id: I2b0343ae75f7de12081bab8346307b96b3883f62
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-02 12:58:18 +01:00
Sean Harmer
8c4d02ef87 OpenGL: Add support for the Compute shader stage
Change-Id: Ibb1b79358758c2adf818af8c6fcd5c379efad8c3
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2013-03-02 12:58:18 +01:00
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
Frederik Gladhorn
be3fb9afe5 Merge remote-tracking branch 'origin/release' into stable
Change-Id: I6b49d5e1c31599b5aa4940b798533b17e58616bf
2013-02-28 16:49:06 +01:00
Friedemann Kleint
42507173bd Fix automatic hiding/restoring of transient children.
Task-number: QTBUG-28408

Change-Id: I31382c4edc213961dfb132af3bf5202e178e7a57
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-28 10:36:22 +01:00
Fawzi Mohamed
a243251091 qcocamenubar: force update after destructor
Task-number: QTCREATORBUG-8785
Change-Id: I1e782cab36f4fea331561f016ea67a73deb63c37
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-28 10:36:22 +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