Commit Graph

12506 Commits

Author SHA1 Message Date
Tor Arne Vestbø
a8021ed985 Fix Xcode version lookup in xcode.conf
We want the second member from 'Xcode 4.x', and $$first() gave us
'Xcode' instead of the version number.

Change-Id: Iaf0ed9dc89a03f7918290a61bddade82651ad0f6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-06 19:02:16 +01:00
Alberto Mardegan
b5bdd31de4 Implement XEmbed protocol
Add a static QWindow::fromWinId(WId id) constructor which can be used to
create a QWindow object representing windows created by other processes.
Then, QWindow::setParent() can be used to embed a window into a foreign
window socket and QWindow::setTransientParent() to stick the current
window on top of a foreign window.

The changes in the QtWidgets module ensure that the focus chain (TAB
navigation) correctly works when a QtWidgets-based window is embedded
into another application.

As far as the platform implementation is concerned, this commit only
implements the embedding functionality in the XCB plugin. So, this is
roughly equivalent to the Qt4 QX11EmbedWidget functionality.

Change-Id: Iff8f7b9ee974d33fb30f36056f7838b433a413c7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-03-06 18:59:07 +01:00
Thorbjørn Martsum
f0533ba8c2 QMap - add multiInsert with hint
This provides a fast multiInsert in QMap (and a fast insert in
QMultiMap) when providing a correct hint.

Change-Id: I3c864c3a7842765fe63f8ecb4b54d0e8c9fd22d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-06 18:56:30 +01:00
Thorbjørn Lund Martsum
ca6a4258d0 QMap - add insert overload that provide a hint
This adds a fast insert on QMap when providing a correct hint.

Change-Id: I256bba342932c1d4f24c6e65074e1bf47b519537
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-06 18:56:17 +01:00
Frederik Gladhorn
49a2ec05b4 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/qnx/qqnxscreen.cpp
	src/plugins/platforms/windows/qwindowsdialoghelpers.cpp

Change-Id: Ib64f21c077b54f2291d19187590bfe869b98477a
2013-03-06 14:38:07 +01:00
Jędrzej Nowacki
31c5b34e80 Silence warning about an unused variable in Q_ASSUME.
Change-Id: Ia7dd537d1f0dadb1dc41b8123fda0da82e83598b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-03-06 09:27:19 +01:00
Frederik Gladhorn
b861063873 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-03-06 00:11:52 +01:00
Corentin Jabot
88918abdde Make QLocalSocket::open set an error when already connected
When attempting to connect a tcp-based QLocalSocket while it was
already connected, the open() (and connectToServer()) method
failed silently. That behavior was not helpful and inconsistent
with the windows and unix implementations.
So an error is now set and error() is emitted

Change-Id: I544e81f0a303dd6d5b1869287df860878a8a06c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-06 00:11:20 +01:00
Mark Brand
53de293433 QSqlResult: private d -> protected d_ptr
This QObject-style convention will allow the usual private class
macros to be used.

Change-Id: I992ee2a2d2e7984d57feb4cbe785a267f2fd83ce
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-06 00:11:11 +01:00
Mark Brand
2adeefc85f add QSqlResult constructor suitable for inheritance
The new constructor accepts reference to the private
class provided by a subclass.

Change-Id: I568e31727bb90de12ee8bb7bf0ed442737056470
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-03-06 00:11:08 +01:00
Mark Brand
fd6821aa19 QSqlResultPrivate: private q -> protected q_ptr
This QObject-style convention will allow the usual private class
macros to be used.

Change-Id: Ib1cee0b3aca949b75511868ad4914e5b8530929b
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-03-06 00:11:06 +01:00
Mark Brand
8434b7ad4a prepare QSqlResultPrivate() to allow subclassing
Allow the private class to be instantiated before the public class.
Public subclasses will need to first instantiate the private subclass
and pass the reference to QSqlResult.

Add virtual constructor so QSqlResult can delete private class
polymorphically.

Change-Id: Ide7115dbb4150d6604677b542dbec16e6956a142
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-03-06 00:11:03 +01:00
Frederik Gladhorn
d8e784f47e Fix potential crash in accessibility key event handling
Change-Id: Id3eec6c83d7f8ece186e6b5bc02771c00893294b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2013-03-06 00:06:37 +01:00
Fabian Bumberger
56820382f2 Workaround a bug in mktime on QNX
Under certain circumstances, mktime failes to convert the tm struct into secs since epoch.
This is a workaround and fixes the qdatetime and qqmllocale autotests.

Change-Id: If99385142a049c5315429dca177df7fc8e947d55
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Wolfgang Bremer <wbremer@rim.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-05 21:56:52 +01:00
Fabian Bumberger
4f60ff6ad3 Do not build qsharedmemory and qsystemsemaphore autotests on QNX
QSharedMemory and QSystemSemaphore are not available on QNX so the autotests can not be built.
Change-Id: Ibfb405f951d21342d64bf215cedc203a8cefe070
Reviewed-by: Wolfgang Bremer <wbremer@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-05 21:56:52 +01:00
Fabian Bumberger
15768381ad Delete the reference of the QNX screen in child windows on deletion
Change-Id: Ic3e5deaeabe282ff44400aba80f8746067473030
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-03-05 21:56:52 +01:00
Tor Arne Vestbø
d28073d9eb Distinguish between 'mac' and 'macx' qmake scopes
The former applies both on Mac OS X and iOS, but 'macx' is specific to
Mac OS X.

ios.conf and macx.conf now share most of their settings in the common
mac.conf. We set the default QMAKE_MAC_SDK before loading mac.conf, so
that any overrides in the device config will apply afterwards. This
means configure's mkspec parsing will be able to read the QMAKE_MAC_SDK.

Change-Id: I0c7e26a6a0103e19b23ef152aa9e4ab461cee632
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-03-05 20:59:45 +01:00
Thiago Macieira
950b35cf97 Clear the current thread data for the main thread
This avoids crashes accessing deleted memory when creating a QObject
after the last QObject had been deleted, like a qDebug() in global
destructors.

==41000== Invalid read of size 4
==41000==    at 0x5F01ED5: bool QBasicAtomicOps<4>::ref<int>(int&) (qatomic_x86.h:208)
==41000==    by 0x5F01309: QBasicAtomicInteger<int>::ref() (qbasicatomic.h:147)
==41000==    by 0x5F24051: QThreadData::ref() (qthread.cpp:100)
==41000==    by 0x614A984: QObject::QObject(QObject*) (qobject.cpp:681)
==41000==  Address 0x6ee73f0 is 0 bytes inside a block of size 152 free'd
==41000==    at 0x4A0736C: operator delete(void*) (vg_replace_malloc.c:480)
==41000==    by 0x5F240BF: QThreadData::deref() (qthread.cpp:109)
==41000==    by 0x6113F6B: QCoreApplicationData::~QCoreApplicationData() (qcoreapplication.cpp:268)

The comment right above the change in qthread.cpp looks eerily similar
to the problem I'm trying to fix. However, the actual change that
introduced the change is not in the Qt public history, so we can't
know for sure what the problem was then.

Change-Id: I0dba895b041fe6cf81e6f8939ca85035cd00aad1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-03-05 20:58:00 +01:00
Yoann Lopes
0666975d6c Added JNI convenience classes in QtPlatformSupport.
This is used for Android.

Change-Id: I049138c140a472b1721390cf4ec2bd88bbe9c471
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-03-05 18:41:30 +01:00
Tor Arne Vestbø
d28f454a67 Rename gcc-base-macx.conf to gcc-base-mac.conf and use it for iOS as well
The only difference between the two is that iOS append @executable_path/
to QMAKE_LFLAGS_SONAME, but since shared libraries are not supported on
iOS anyways, this is not really something we have to care about.

Change-Id: I4797a4dfb94d9b3af03af22618351b98b48f8255
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-03-05 18:40:12 +01:00
Tor Arne Vestbø
26b260c0c1 Rename common/mac.conf to common/macx.conf
This is a step towards making mac a shared scope for both Mac OS X and
iOS, while macx is Mac OS X specific and ios is iOS specific.

We'll then move iOS to not include macx.conf, once we make the change
to not have iOS imply macx.

Change-Id: Ic9ce4d597873aa3cf2c981598354733e07db644d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-03-05 18:40:03 +01:00
Tor Arne Vestbø
71252ac222 iOS: Share common Mac qplatformdefs.h instead of duplicating code
If there are minor differences later on we can put them in the
mkspecs' forwarding header and/or introduce a macx specific file.

Change-Id: I2a93107838e0d8434c0d444db3064e0a462fa656
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-03-05 18:39:56 +01:00
Tor Arne Vestbø
163dcf2b71 Fix build with older Clang versions without __has_extension
Change-Id: I505d3e4ad2fcd56ee229935d8543811a43923273
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-05 18:39:47 +01:00
Tor Arne Vestbø
1c90590768 Disable AVX for the whole Apple Clang 3.x series, not just 3.0
Version 3.1, shipped with Xcode 4.3, has the same issues compiling Qt's
AVX code.

Change-Id: Icb778fbd9d61f01aa84365661af050c9442d4d7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-05 18:39:35 +01:00
Tor Arne Vestbø
0c768600f7 Rename configure's getQMakeConfN functions to more descriptive names
Change-Id: I2f0ad6c3978c4bbb20d6d5b854b5f49e9bb96d2b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-05 18:39:35 +01:00
Corentin Jabot
953255abab Make QLocalSocket connectable with open()
Add getter and setter for handling the server QLocalSocket connects to.

Move the connectServer() implementation to QLocalSocket::open
so the local socket can be handled transparently as a QIODevice

Add a convenient connectToServer(OpenMode) method

Change-Id: Ibc8dc33f79903f92daf2d1ca2e64ead2ce39f33e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-05 18:39:35 +01:00
Corentin Jabot
866a5d0c28 Make QProcess startable with open()
Add setProgram() and setArguments() methods to the QProcess api.
Add a convenient start(QIODevice::OpenMode) method.
Move the implementation of QProcess::start() to QProcess::open()
unifying the QProcess api with other QIODevice subclasses.

Change-Id: Id1af57da05f750fe8d526d391589c05ee8037bca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-05 18:39:35 +01:00
Friedemann Kleint
2759761824 Manual dialog test: Add a page for QWizard.
Task-number: QTBUG-29904

Change-Id: I47df03b0d724ccd156a2854602c41e8f1f2a1d5b
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-03-05 18:39:35 +01:00
Nico Vertriest
f2162d04d2 Doc: fixed snippet issues with customcompleter.qdoc
Edited customcompleter.qdoc (paths snippets + ingroup statement)
Moved customcompleter.qdoc to widgets/tools/customcompleter/doc/src
Moved png files to doc/qtwidgets/images

Task-number: QTBUG-29101

Change-Id: Iab66f178b92321257c4eb0e4e9704bb1e3043ef6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
2013-03-05 17:55:14 +01:00
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
Martin Smith
8b10e8c198 qdoc: Maintain correct nesting level for QML parsing
qdoc was not incrementing the nesting level when parsing
a UiObjectBinding, which can contain a component definition.
qdoc now increments the nesting level when starting to vidit
a UiObjectBinding and decrements it when ending the visit.

Note this fix does not stop qdoc from reporting that public
signal handlers have not been documented. If that is to be
changed, it will be done separately.

Task-number: QTBUG-29993
Change-Id: Ibd5ef81082e989652b3a15dcc95080a2757e0077
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-03-05 12:19:08 +01:00
Laszlo Papp
80af204297 Return -1 as the API documents it for socket issues
Task-number: QTBUG-30024
Change-Id: I51498e6d74ab139134abfb94f35647e995319ee8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-05 12:19:08 +01:00
Konstantin Ritt
b1c3f71a7b QLocale: Add some more languages and scripts
Change-Id: Iab23128c1567974154cdcce7412b2e1468bb8462
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-05 12:18:30 +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
Irfan Omair
d903b2aac4 Avoid setting initialNameFilter when mode is Directory
Task-number: QTBUG-30001

Change-Id: I5e854ce99137bd9d718cb2052f2c8dc1fb92b78f
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-03-05 08:06:22 +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
Roman Pasechnik
342c99ff45 Fixed memory leak in QXmlStreamReader
Fixed memory leak caused by repetitive usage of the same
QXmlStreamReader instance.

Task-number: QTBUG-27889
Change-Id: I673f4d26bae1503cb43e972f95b418dbf6d6fd89
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-03-05 03:05:45 +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
Olivier Goffart
f9497b1a54 Fix spelling
Change-Id: If3d5e09b2553d95caacd3e61a1bb108f1172111f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-04 21:11:05 +01:00
Friedemann Kleint
bc741b867c Windows: Repaint when switching off layered windows by opacity.
Task-number: QTBUG-29010

Change-Id: I565a800e5a5b4870bd3ee2e3fb3f55523334425f
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-04 17:41:15 +01:00
Martin Smith
c0c38912eb qdoc: Allow QML linking without version nr
This change allows links of the form:
\l{qml-module-name::qml-type}{name}
i.e. no version number provided.

This change does not handle collisions.
There aren't any in Qt5 at the moment.
If a collision occurs, qdoc will link to
the name in one of the colliding QML
modules, but not necessarily the most
recent one. Hence, the link may go to
the wrong page. A further update might
be forthcoming that will handle this
better.

Task-number: QTBUG-29778
Change-Id: Ie2c2b117446ed02852593dd0273c390d39fed927
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-03-04 15:36:56 +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