Commit Graph

15313 Commits

Author SHA1 Message Date
Andrew Knight
fc0f784e54 Windows RT and Windows Phone QPA
Change-Id: I6ab8af31f73439172e43fb709831821482b1cc99
Done-with: Kamil Trzcinski
Done-with: Oliver Wolff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-10-02 12:36:13 +02:00
Andrew Knight
11a2226cfe ANGLE: Support WinRT
This enables EGL for WinRT's native types, and adjusts some codepaths
to accommodate differences in between desktop Windows and WinRT.

- WinRT native handles added to eglplatform.h
- References to native handles in libEGL/libGLESv2 follow eglplatform.h
- D3D 11.1 structures and methods used when necessary
- TLS replaced with thread attribute
- LocalAlloc/Free replaced with Heap API

Change-Id: Ia90377e700d335a1c569c2145008dd4b0dfd84d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-10-02 12:36:10 +02:00
Oliver Wolff
8cbc90ffb2 Winrt: Skip qthread autotests, which are not supported (yet)
Change-Id: Ib1047731667ba8a7b9db2f62924eb42a6b85b4fd
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2013-10-02 12:36:09 +02:00
Oliver Wolff
ffb92a5691 Winrt: tst_qthread: Added QEXPECT_FAIL where needed
Change-Id: I88d98421978e0f5c55af8647f3f74c265b45bd37
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2013-10-02 12:36:07 +02:00
Andrew Knight
c6af0a504f WinRT: Fix various test compilations
- Remove irrelevant test subdirs via .pro files
- Follow WinCE codepaths where applicable
- Replace unsupported Win32 APIs with WinRT equivalents

This does not aim to fix any failures in the tests themselves; it only
makes them compile.

Change-Id: Ia82bc0cc402891f8f6238d4c261ee9152b51be80
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-10-02 12:36:05 +02:00
Oliver Wolff
c097670bf8 WinRT: Added missing WIN32 define to qmake.conf
Without that define here moc cannot handle qsystemdetection
properly. While having to touch the mkspecs I also removed
the no longer needed WINRT define.

Change-Id: I0609bd173c7bc14ccdd862afc777d7793dda02b8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2013-10-02 12:36:03 +02:00
Donald Carr
3e1c3a051d Fix clang build for libc++
Successfully builds Qt 5.2 with:

QMAKE_CXXFLAGS_CXX11 += -std=c++11 -stdlib=libc++
QMAKE_LFLAGS_CXX11   += -stdlib=libc++ -lc++abi

against:

clang version 3.3 (tags/RELEASE_33/final)

Change-Id: I778f9410c6563e78bc77ae4c20097fa561503ba1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-10-02 10:32:29 +02:00
Sergio Ahumada
150b8ca294 Merge "Merge branch 'stable' into dev" into refs/staging/dev 2013-09-27 11:31:32 +02:00
Sergio Ahumada
16a36239ab Merge branch 'stable' into dev
Change-Id: I06694436322a7810a163b27b8a059cee2b046f06
2013-09-27 11:15:09 +02:00
Andrew Knight
bd78389fc4 WinRT: Fix Widget builds
Tweak pri files and preprocessor usage to support widgets under WinRT.

Change-Id: I6dc7d160078c0da343d6d39d2a0d52112c6f9f59
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-27 09:46:10 +02:00
Jan Arve Saether
e37001aad7 Say hello to qFloatDistance()
This function is useful if a floating point comparison requires a
certain precision. The return value can be considered as the precision.
For instance, if you want to compare two 32-bit floating point values
and all you need is a 24-bit precision, you can use this function like
this:
if (qFloatDistance(a,b) < (1 << 7)) {   // The last 7 bits are not
                                        // significant
    // precise enough
}

Task-number: QTBUG-32632

Change-Id: I020a58d2f9f9452ac3c510b4bb560dc806f0d93c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-27 07:57:23 +02:00
hjk
00da2e615e rcc: Remove compile dependency on private headers.
Not needed anymore now that it's using the new commandline parser.

Change-Id: I1a44c8658d128e4fbb9a6fc5000025f55e5293c2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-09-26 22:25:10 +02:00
Gabriel de Dietrich
06e7d61b68 Cocoa: Allow widgets to receive events event when no app is running
This is necessary for QMacNativeWidget, where there exists a QApplication, but
is never executed. This directly translates in calls to the event dispatcher's
processEvents() function, whose calls we keep track. If no calls have been made,
we always allow timer and posted events to be processed.

Change-Id: Ia0062ee8c59a2572082f520a2eb85ed44a9856a7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-26 22:25:10 +02:00
Gabriel de Dietrich
db9abc72ef QMacNativeWidget: Have example use a delegate
This would be the case in most if not all the real life use cases.

Change-Id: Ib7ebc6dbe471ce50f4bd1df9becba8e9806008e7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-26 22:25:10 +02:00
Gabriel de Dietrich
79561dd899 QMacNativeWidget: Background should be transparent
Cocoa will draw it for us.

Change-Id: I73c124749658ae76c97afe95b81b78c7ff15c378
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-26 22:25:10 +02:00
Gabriel de Dietrich
79fc0ff67a QCocoaBackingStore: Initialize non-opaque images with transparent color
In particular, this is needed when a QWidget has WA_TranslucentBackground set
and nobody is painting anything behind it (except maybe some native view).

Change-Id: Ib1f0714f85fa7eeced527617ecd09bb2ed6ddfc9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-26 22:25:10 +02:00
Topi Reinio
c533e80e31 Doc: remove duplicate \externalpage definitions
Delete all duplicate \externalpage definitions from
corelib, printsupport and testlib sources.

Change-Id: I7dc5358861f4dad3e8ce080619b61ca3da64ec85
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-26 22:25:10 +02:00
Shawn Rutledge
f37990712b [QNSView viewWillMoveToWindow:] remove observer from previous window
Even if there is not a new window, the notifications from the old one
are not needed.

Change-Id: I9c1858d25e49379ca4737e23beec06623e91b69c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2013-09-26 22:25:10 +02:00
Marc Mutz
88999e9ea0 QPen: optimize population of dd->dashPattern
Change-Id: I02b3bb9b503303b931f075f899126a506f9e25d0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-26 21:45:07 +02:00
Liang Qi
5b70efb125 Mac: QWizard default background pixmap works again
Task-number: QTBUG-26722
Change-Id: I579111b5d34f8e3cdc6bb016d9c0e42ec3ffb8c9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Stephen Chu <stephen@ju-ju.com>
2013-09-26 20:42:33 +02:00
Vitalii Shastun
5889b239b1 Fix QT_NO_PRINTER build on Mac
On Mac the QT_NO_PRINTER build was not implemented.

Task-number: QTBUG-33565
Change-Id: I118472f9400aa0a0d0e192ae39a11ea38a66f340
Reviewed-by: John Layt <jlayt@kde.org>
2013-09-26 20:42:33 +02:00
John Layt
77dc33dcdb QLocale - Fix Mac date format code translation
Mac uses the CLDR format codes which need to be translated into their
Qt equivalent.  The existing code mistranslates the year code, is
outdated for a number of new codes introduced in recent versions of
CLDR, and by default accepted any codes it didn't recognize.

This change updates support to the latest version of CLDR, fixes the
treatment of years, and defaults to ignoring any new format codes
added in the future.

Note that this change cannot have auto tests written as the system
locale formats change between versions of OSX.  Testing must be
done manually by changing system locale and formats.

Task-number: QTBUG-25057

Change-Id: I69dda25b4a0b38d3971995644546306876922d57
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-09-26 20:42:33 +02:00
Laszlo Agocs
279db88c39 Correct the detection of Windows-generated mouse events
Check only bit 8 to decide if the mouse event is generated from
a touch or pen event.

Task-number: QTBUG-33460

Change-Id: I83b23267b5de6df5e0e6b7113ecf377dd7e86c84
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2013-09-26 18:45:16 +02:00
Laszlo Agocs
9bf820ce47 Fix device-specific eglfs hooks to provide createNativeWindow correctly
Change-Id: I21aa17de7a79278d41b30a7590603c3382607673
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-26 18:45:16 +02:00
Laszlo Agocs
091ca0ede2 evdevtouch: Fix ABS limit queries
Add the missing parentheses around the conditional
expression. EVIOCGABS and similar macros do not have guarding
parentheses in older kernel headers.

Change-Id: I5f464351e9407d90643d4e73d4afdbb2ad88b02b
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-26 18:45:16 +02:00
Laszlo Agocs
4ec31ce56a evdevtouch: Avoid duplicating points in released state
Points in released state should only be removed from m_contacts after
the disappeared-since-last-sync is done. Otherwise the same point can
appear twice (both times in released state) in the same event.

Change-Id: Ia751054c3fe893006a090bdce96a64738d8388ac
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-26 18:45:16 +02:00
Marko Pellikka
e120ad442d QString::reserve fix to avoid truncation
In case of implicit memory sharing, QString::reserve caused data
truncation if given size was smaller than size of data.

Task-number: QTBUG-29664
Change-Id: If2da5ad051385635ebb829c18b5ebaa349f08e8a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-09-26 18:45:16 +02:00
Gunnar Sletta
2864ba28e1 Remove code that doesn't do anything.
Change-Id: Id2528167f21e1ab81b998ceb808a9fc4a24b239a
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-09-26 18:45:16 +02:00
Tor Arne Vestbø
a3530859e9 Expose QTest::currentAppName() and remove hard-coded argv[0] in tests
Except where we're actually testing QCoreApplication::applicationName()
and friends.

Change-Id: I25514884c11f43a4f82b1f818f822dc3d79f69a3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-09-26 18:45:16 +02:00
Tor Arne Vestbø
0bf30a7cab iOS: Propagate xcodebuild exit-code from makefile wrapper
Without bash's pipefail option we would end up with the exit code of
grep. Since we don't know which shell the user is running, we have
to explicitly call bash.

Change-Id: Ic3f6db0af9bb90a58001ccfbf9d6d21b6c9c9634
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-26 18:45:16 +02:00
Oliver Wolff
4a76300854 WinRT: Use UtcTimeZone instead of QWinTimeZone backend
As registry access isn't possible on WinRT it cannot use
QWinTimeZone as backend. Instead it uses QUtcTimeZone.

Change-Id: I51c59a187e3da6e957d0b3f6376069d55c9fc2ec
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
2013-09-26 17:27:11 +02:00
Oliver Wolff
bb4869a0c5 WinRT: Disable network
As network reimplementation is not in place yet it is disabled for now.
Once I78ea88901a30280d4098b75ef7398c2628dd19c8 is done this can be
reverted.

Change-Id: I042427fff9664fd8b7ea0a59476d6a6bb6b4eaec
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2013-09-26 17:27:09 +02:00
Oliver Wolff
7e1654cd75 WinRT: Stub out QStandardPaths
It might be possible to obtain special directories like documents and
music if the according rights are granted.

Change-Id: I086c341236b831326acc74754d067867d0eda04b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-26 17:27:07 +02:00
Andrew Knight
3d4cd88fd0 WinRT: QSettings stub
Enable the non-native QSettings path on WinRT. Native settings can
probably be implemented using
http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata.localsettings.aspx
at least for Desktop WinRT applications.

Task-number: QTBUG-33498

Change-Id: I1a3aa506e1393b04b5759ee90732ab35de32b1fc
Done-with: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-26 17:27:04 +02:00
Oliver Wolff
785eee0bf2 Implement qt_error_string for WinRT
Change-Id: I6049d67da0295aeec311b644ccedf8f27f86b1d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-26 17:27:01 +02:00
Oliver Wolff
f89d30aa34 WinRT: Introduced qfunctions_winrt
Using the same approach as, wince qfunctions_winrt
is introduced to replace functions not available
on Windows Runtime by their successor functions/
equivalents.

Additionally this functionality is used for implementing
a fake environment because WinRT does not support
getting/setting of environment variables. The approach
here is also the same that is used for wince.

Change-Id: Ifc3b6b796ab8e8ea41456f4c929f9c3f65f24a0e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-26 17:26:58 +02:00
Andrew Knight
8cc0f19f83 WinRT: Don't build the network-chat example
WinRT doesn't support QProcess, so the network-chat example shouldn't be
built there.

Change-Id: I7885a992d3b8baffd5530c694063140535240f07
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-26 17:26:56 +02:00
Oliver Wolff
81dea57593 add WinRT event dispatcher
Change-Id: I40b3f896b89b99e271e1a5ca625a5193f4a7f59e
Done-with: Kamil Trzcinski
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-26 17:26:53 +02:00
Kamil Trzcinski
d7af71b318 threading support for winrt
Change-Id: Ife296e15ddf727c3f53ab3d3d84634b5c7bbf85c
Done-with: Maurice Kalinowski
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-26 17:26:51 +02:00
Oliver Wolff
9260a3917a WinRT: Disable QFileSystemWatcher
It might be possible to implement some kind of file system watcher using
http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.search.aspx

Change-Id: I375f299e2420f266c8e19d77360bdecf6ff88a56
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-26 17:26:48 +02:00
Tor Arne Vestbø
696060134d Make QCoreApplicationPrivate::appName() thread-safe
Change-Id: Iea0d208e3e4721fff8a6667e0df1203a887c29d3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-26 17:02:25 +02:00
Jerome Pasion
9bd350d03d Doc: Adding "qtdoc" to the depends qdocconf variable.
-needed to link to Qt 5.2 docs (as seen on the navigation bar)

Change-Id: Icc0bdb95231dbccd0393d4f401daafd8bcb30472
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-09-26 17:00:26 +02:00
Tor Arne Vestbø
d4ec6331bb tst_QNetworkReply: Don't remove file if never created
If we end up QSKIP'ing the test 'wronlyFileName' is never created.

Change-Id: I2ccbfdb630b58d7904e73b476a65a82a45ab90d7
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-09-26 08:40:38 +02:00
Eskil Abrahamsen Blomfeldt
39e04b0222 Remove logic which changes install rules inside Qt dir
A common problem is that examples and other apps are unusable on
Android when they are inside the Qt directory. There doesn't
really seem to be any good reason for having a special case in
place, since this will only affect applications which are not built
with the host toolchain, and we aren't building any command line
apps for the target devices. So the only thing this will affect are
the examples and we want those to be installed into the correct
path.

Change-Id: Ibae365e06eb77944f11e596c16c3c5baf798848c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-09-26 08:40:38 +02:00
Eskil Abrahamsen Blomfeldt
0a3a05f418 Fix setting android minimum/target version
We need to output integers here, since these are interpreted
as integers when reading the json.

Change-Id: I4206b3ac347b61a357bd2658f146979e06690141
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-09-26 08:40:38 +02:00
Marc Mutz
935e52108d QtConcurrent::IterateKernel: fix a race on a cache variable
getticks() can be called concurrently, so accessing a non-atomic static long,
even when the assignment will produce the same value in evey case, constitutes
a data race.

Fixed by making 'useThreadCpuTime' atomic.

Since atomic long's might not be supported on all platforms, use an
atomic int instead. To avoid a narrowing conversion, and since we're
not interested in the return value of sysconf(), only whether it
succeeded, convert any non-error return value to 0 prior to storing
in the atomic.

Change-Id: Ic285f7801327b30ddcd9c24bf1ccee3112a447b1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-26 06:31:32 +02:00
J-P Nurmi
c66d42f972 QKeySequenceEdit: cleanup unused member variable
Change-Id: Ib1197aee7589be0afd0c639b362bf1c3fceffeb4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-09-26 06:31:11 +02:00
Tor Arne Vestbø
f04b46f34e Don't assume QCoreApplication::applicationName() will never change
Tests will typically create multiple QCoreApplications, some of them
with different argv[0] than others, so we can't use a static variable
to keep the cached application name.

Change-Id: Icd97527730558944473a71373326b4a82f1b7cf7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-25 21:21:24 +02:00
Matt Hoosier
1749bab565 Allow QDir::mkpath() to work on QNX QNet paths
Due to a quirk in the way that QNX's mkdir() implementation reports
return values when the requested pathname is the mountpoint of a
QNet filesystem, the usual recursive directory creation algorithm
used by QDir fails if the destination directory happens to exist
inside QNet.

This is an artificial failure; the desired directory can still
be created with the normal mkdir() algorithm. There just needs to
error handling in place to allow the recursive creation of parents
to recognize this situation.

Change-Id: I350fd9cb39858570032f9146c1154a9287701569
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-25 21:07:51 +02:00
Christian Strømme
1db9075482 Android: Use the application's class loader when loading Java classes.
Previously the system class loader was used, which meant only system
Java classes where available. With this change it's no longer necessary
to add a JNI_OnLoad() to get a handle to application specific classes.

Change-Id: Ic8fe35b4e525bfeb1d317d5ba6b496e39bf9bb30
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-09-25 20:32:31 +02:00