Commit Graph

15063 Commits

Author SHA1 Message Date
Tor Arne Vestbø
ae577e6b8f Don't use ARMv5/6/7 atomics on 64-bit ARM, as they are AArch32 specific
Change-Id: I0c359e62a8cbf560691019187f316561bddbee52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-16 23:19:26 +02:00
Tor Arne Vestbø
51da240149 Don't use Mac OS X QCollator backend on iOS
We don't have CoreServices on iOS, which hosts the UC* APIs.

Change-Id: I95b1b173e57665c2fc2cdc1701f8ad57cdc0e567
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-16 23:19:06 +02:00
Tor Arne Vestbø
410e9cd5b1 Add support for ARMv8/ARM64 to qprocessordetection.h
As used by the upcoming iPhone 5S' A7 SoC.

Change-Id: I276dc739c2565bce23fb1a12c9470dcd311e67ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-16 23:18:59 +02:00
Marc Mutz
15c384f82f QDateTime: fix unused function warning on non-Windows
Change-Id: I8fbf1f8b0ebfdf58cd72c724326227dc1610e746
Reviewed-by: John Layt <jlayt@kde.org>
2013-09-16 22:58:44 +02:00
Konstantin Ritt
36e768cd71 Un-export qt_registerFont() internal function
QPlatformFontDatabase::registerFont() method must be used instead.

Change-Id: I80aa5567a748a980f689c90125f8bcc20c304ee2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-09-16 20:25:06 +02:00
Alan Alpert
b674b15dff Add QFileSelector API
For easy cross-platform and cross-device UIs, automatic asset swapping
based on filename is being developed. This API provides the logic for
the swapping, so that applications can use it themselves with the same
logic as any automatic swapping done in application templates.

Selector set is initially minimal, aiming for just platform selection
and enabling a common selection mechanism for Qt platforms to use.

Change-Id: I219517d740fa7385e923a9e09cb7e241378f857a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-16 19:42:22 +02:00
Olivier Goffart
4b02585f30 Fix spelling in Q_STATIC_ASSERT in qobject_cast
Change-Id: Ibc2b1296bf7eb20e41c1af044797a9a026bed369
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-16 15:36:59 +02:00
Martin Smith
433f2315ac qdoc: Now reports duplicate page titles better.
Currently, qdoc reports duplicate pages, when it should be reporting
duplicate page titles. Sometimes the duplicate titles actually refer
to the same page, but often they are different pages with the same
title. This update changes the error message to better indicate that
two identical page titles were seen.

A further complication was that the qdoc warnings for these duplate
page title errors were useless when the duplicates were in different Qt5
modules, because the support for file location information in the qdoc
index files was inadequate. This update adds better location information
to each section in the index file. This makes the index files bigger
and will increase qdoc runtimes, hopefully not too much.

Task-number: QTBUG-33506
Change-Id: I35db3c5e1551b9ef748d63377e94453da80c1e26
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-09-16 15:35:33 +02:00
Tor Arne Vestbø
4bae7158d3 Don't send posted events from QWindowSystemInterface::sendWindowSystemEvents
The responsibility of sendWindowSystemEvents() is to process events from
the window system. Historially that logic was part of the QPA/QWS event
dispatcher, which naturally also sent posted events. Through refactoring,
the code at some point ended up in in the QWindowSystemInterface class,
still with the posting of events in place.

This resulted in QPA event dispatchers adopting a pattern of just calling
sendWindowSystemEvents(), as that would cover both posted and window system
events. Other event dispatchers would call sendWindowSystemEvents(), and
then use a base-class implementation from QtCore for processing events,
resulting in two calls to QCoreApplication::sendPostedEvents() per
iteration of processEvents(). This breaks the contract that processEvents
will only process posted events that has been queued up until then.

We fix this entanglement by removing the sendPostedEvents() call from
QWindowSystemInterface::sendWindowSystemEvents() and move it to the
respective event dispatchers. For some EDs it means an explicit call
to sendPostedEvents, while others were already doing sendPostedEvents
though a separate source (GLib), or using a base-class (UNIX/BB), and
did not need an extra call.

We still keep the ordering of the original sendWindowSystemEvents()
function of first sending posted events, and then processing any
window system events.

Task-number: QTBUG-33485
Change-Id: I8b069e76cea1f37875e72a034c11d09bf3fe166a
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-09-16 15:22:40 +02:00
Shawn Rutledge
4c19055cb1 remove unnecessary beginPaint and endPaint overrides
QPlatformBackingStore::endPaint does not take a QRegion parameter.
6ce6b8a378 set the API, but the
platform implementations were not all synced up since then.  There
was anyway no point in overriding beginPaint and endPaint on
platforms which don't need to do anything there.  This fixes
clang warnings of the form
QXcbBackingStore::endPaint hides overloaded virtual function

Change-Id: Id6cd0fc2c831a34576ac2c73eeb0d5741d26e622
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2013-09-16 15:21:40 +02:00
Andrew Knight
7d3f775075 WinRT: Disable PCRE JIT
That is what we do on on other "limited" platforms.

Change-Id: I608880698d60ab10ecbb2f3ce12ff6c5eaab7eed
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-09-16 12:23:46 +02:00
David Faure
aabbd27dda Simplify QFileSystemModel::remove by using QDir::removeRecursively
This also fixes it in case of hidden or system files, which
were missing from the filter (found by Denis Kovalskiy).

Change-Id: Ic12de12ec51c20de52d040514e90be5e783add43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-16 12:12:09 +02:00
Eskil Abrahamsen Blomfeldt
104debb662 Don't depend on QtQuick plugin in QtWidgets
The accessible plugins directory contains a QtQuick plugin
as well as a widgets plugin. We need to specify the correct
one to avoid all widgets applications implicitly depending
on QtQuick on Android.

Change-Id: I72b2ee4fcd2d7914fc2ed7996f504ce2df79842d
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-09-16 08:56:09 +02:00
Oliver Wolff
134a020e2a Implement windowsErrorString for WinRT
FORMAT_MESSAGE_ALLOCATE_BUFFER isn't available for WinRT

Change-Id: Ib9cf2a11a4e84f3ff010665bd53b4ffb0d0bfcce
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-16 00:14:00 +02:00
Oliver Wolff
cfc7cc39f9 qelapsedtimer for WinRT
Change-Id: Ic31fa667bdc746776d8e29564ea8a1ba6e7384f3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-15 22:41:48 +02:00
Nicolás Alvarez
1985f818e7 Fix QTextEngine build on MSVC2008 debug mode.
This was broken in 7ac6ce21 which removed some unused functions;
but MSVC2008 in debug mode requires this particular operator overload.
I'm re-adding it in an appropriate #ifdef so it doesn't cause "unused"
warnings in other platforms/compilers.

Task-number: QTBUG-33473
Change-Id: I6dfba0fa5f835e848e8a1e4213efb030fb5def3d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-09-15 19:51:50 +02:00
Oliver Wolff
f6f1f44e71 Disable sqlite for Windows Phone 8 builds
sqlite cannot be supported as Windows phone is
missing the needed memory mapping functionality.

Change-Id: I20e89292b9c7802c7402e8095854b72a9f21e614
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
2013-09-15 18:18:46 +02:00
Kamil Trzcinski
4bbbe06bef qmake: added file deployment support for winrt and winphone targets
The user needs to specify the DEPLOYMENT variable. The syntax
is the same as previously used for DEPLOYMENT. For more info
please refer to the qmake documentation. The change adds
a new itemgroup, "Deployment Files". All files in this
itemgroup are marked as DeploymentContent and are then
packaged with the application either as XAP or the WinRT
specific file format.

Change-Id: Icf85887287c1c97eb782704340eaa3f8dde6719e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 18:18:46 +02:00
Kamil Trzcinski
083b5b503c qmake: added support for WindowsMetadataFile
In order to be able to use the linker's /WINMD
and /WINMDFILE options

Change-Id: I2673e20aa073c6b807e8c9f191fd408c7976efc4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:16:07 +02:00
Kamil Trzcinski
6008eb525e qmake: added CompileAsWinRT switch to the VCCLCompilerTool (the cl /ZW option)
Change-Id: I2a67779bcb38af85a2c43d3e9a15aa3ba45b4788
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:15:44 +02:00
Oliver Wolff
1d4e1e12d8 Use correct toolset version for winphone builds
Change-Id: I9ecd9f632d0201e060de5cce4782912efdc6bd32
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:14:49 +02:00
Kamil Trzcinski
7c8ef213b5 qmake: enable default reference for all winphone targets
The change adds a new ItemGroup with a single library reference:
platform.winmd.

Change-Id: I0c7f4c46654b520afb79b6c6f49b5f2d1af400d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:14:40 +02:00
Kamil Trzcinski
48ba0389ee qmake: added VCPROJ_ARCH variable.
It's a generic way to configure the Visual Studio Solution
architecture. It's added to support different project
architectures, ARM specifically. It may be a good idea
to replace the Win32 and x64 with VCPROJ_ARCH=Win32
and VCPROJ_ARCH=x64 defined in corresponding qmakespecs.

Change-Id: I9b23f7393bf248a629c425187d6dd8859092c45c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:14:28 +02:00
Kamil Trzcinski
036cfadcc6 qmake: added WinRT and WinPhone configuration switch
qmakespec for either WinRT or WinPhone have to specify
QMAKE_PLATFORM with winrt and/or winphone.

Change-Id: I87e0063881e6edd65de14adb006949247ce49904
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:13:59 +02:00
Oliver Wolff
fee7420a73 Fixed sqlite build for WinRT
Change-Id: Idf5bfa8b55e8d7db46207e55de1e9176def503a6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 16:13:49 +02:00
Andrew Knight
ede5be6ea0 Create clean makefiles for winrt builds
Change-Id: I33b74b98e04c1a9ca15ae07fad88f88dd4ce0669
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-15 13:25:25 +02:00
Giuseppe D'Angelo
f4cc344e01 Revert "Reimplement qBinaryFind in terms of std::lower_bound"
After a bit of discussion, we should actually deprecate qBinaryFind too.
This puts the old code back (to avoid behavior changes / source
breaks).

This reverts commit 23d7f6ee5d.

Task-number: QTBUG-33473

Change-Id: I7f7d25171e14061e51543c501c30a7b6b184a8fd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-09-14 23:43:00 +02:00
Olivier Goffart
7d7e8ae3fa Use Q_STATIC_ASSERT to report error about missing Q_OBJECT
Q_STATIC_ASSERT gives better error with C++11 enabled.

Aslo the qt_check_for_QOBJECT_macro had warning on some compiler since
it used null reference

Change-Id: Ic6115da800064b00c50a5762f0b79f5f656bf750
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-14 20:33:29 +02:00
Thiago Macieira
6b9d125621 Do 64-bit loops in QBitArray::count(bool)
On 64-bit platforms, with unaligned loads, this is defintely an
improvement since we can run fewer instructions. On 32-bit platforms
with unaligned loads, we'll do the exact same number of loads. On
platforms without unaligned loads, it's no worse.

Change-Id: Idd5dd5213975d77bbc3adf486adbf6f8ef071341
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-09-14 20:33:29 +02:00
Thiago Macieira
6f0fdaa76c Let the compiler do the unaligned loads in QBitArray::count(bool)
For platforms where the CPU can do unaligned loads on its own, like
x86, the compiler will generate actual loads. On other CPUs, it will
do the byte-by-byte load like we were doing. The compiler cannot
generate worse code than our hand-rolled load, so this change can only
improve performance.

Change-Id: I32a89e64aa64d8af504be6c5a10b04d7573cdb98
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-14 20:33:29 +02:00
John Layt
6c3a9df3fe QDateTime - Store Qt::TimeSpec, remove Daylight Status
Change storing the spec from QDateTimePrivate::Spec to Qt::TimeSpec.

Remove the storage and use of the Daylight Status as it is almost
never set or used, and would be inaccurate if the tz were to change.
It will be replaced later with proper daylight transition support.

This simplifies the code and makes the msecs storage change easier.

Change-Id: I78a70905025d7eddf1c2dc6001f6b490e5a2b3b8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-14 18:31:00 +02:00
John Layt
e76c312eb8 QDateTime - Switch to using msecs based functions
A number of QDateTime functions directly use or modify the data stored
in the private, but future changes to store msecs and status make this
maintenance more complicated.  Where possible simplify this code to use
the standard msecs functions, standard constructors, or public api
instead.  This greatly simplifies the functions and the following msecs
storage code changes.

This is an intermim step towards storing the time in msecs.  Some
functions will be slower as a result of this change, optimization
will take place after all the msecs changes are completed.

Note this also removes a test that used valid QDates outside the range
of msecs, this change in behavior will be documented in the final
mscs change.

Change-Id: I6ef710f24babc7024091010064082e9be0b5bbfe
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-14 18:31:00 +02:00
Andrew Knight
f6e6dde369 winmain for winrt
WinRT passes the executable and Appx server info to the CRT main, and
supports several additional activation arguments as well. This handles the
arguments passed to main as well as the case where a modern app is
launched from an external application (e.g. Qt Creator).


Task-number: QTBUG-30198
Change-Id: Ia843e98c7843d5705f5f6d1c809de0b6bcdb5d26
Done-with: Kamil Trzcinski
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2013-09-14 15:42:24 +02:00
Giuseppe D'Angelo
384ca58e33 Remove qSort usages from qtbase examples
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: I68dec0cb6efa1f164ba9f1671b55332ee4ad2e23
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-09-14 13:12:40 +02:00
John Layt
3a8b8edd01 QDateTime - Add test case for Daylight Time Transitions
Test the Daylight Time transitions.  QDateTime does not correctly deal
with many of these scenarios so those tests are marked as QEXPECTFAIL.
These bugs will be progressively addressed in coming commits.

Change-Id: I01eba9d6143a792f081542cb198e221efcf28e98
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-14 11:38:15 +02:00
Oliver Wolff
6afbb46264 build system support for WinRT
Done-With: Andrew Knight
Done-With: Oswald Buddenhagen

Change-Id: Ief4e921072a03229bb342480a85024a1fc09fa56
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-14 09:51:14 +02:00
Konstantin Ritt
0adc96c1c4 Drop leftovers after 02651060b6
Change-Id: I011359a47ed47308a7d25e306fbf45a83a3a5715
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-09-14 08:06:46 +02:00
Konstantin Ritt
3e025708b4 Fix build with -Werror
The actual warning is:
src/gui/text/qharfbuzzng.cpp:589:67: error: cast from ‘void*’ \
to ‘uint {aka unsigned int}’ loses precision [-fpermissive]

Change-Id: I75cc7bad2147cd5e5e7c17bc22fe613280e86755
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-14 05:17:07 +02:00
Thiago Macieira
504a644862 ICC 13.0 supports atomics
See http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler

Change-Id: I45ba6aa640f82df4d06fd4412264892bfd58ffc3
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-14 03:20:25 +02:00
Thiago Macieira
bad6f54c0b Update ICC warnings disabled by default.
Warnings 654 and 411 appear to have disappeared by ICC 14.

Change-Id: Ic200f239a4a4377015d13b2f4ae85595ce864ace
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-14 03:20:25 +02:00
Thiago Macieira
cc74159702 Base64: Implement the "base64url" encoding and the stripping of '='
The "base64url" encoding is defined in RFC 4648, which is the newest
version of Base64. There are also a few situations where the ending
'=' is not desired.

Change-Id: I9bb9fa55817b57d125189e4e795d6fde97caea6d
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-09-14 03:20:25 +02:00
Thiago Macieira
3154e1ccaa Whitespace: re-indent the {to,from}Base64 functions
The code must have been copied from somewhere, a sample
implementation.

Change-Id: Ieb6ac5d69824fe8a3f38710a22beb79ac986e182
Reviewed-by: Richard J. Moore <rich@kde.org>
2013-09-14 03:20:25 +02:00
Thiago Macieira
131b3e5dca QStandardPaths: add a test that just dumps the values
Change-Id: I79bcc1974988b3d712a40e89a3ec4aeb7be1fb5e
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
2013-09-14 03:20:25 +02:00
Sergio Ahumada
415f65fbff Merge "Merge branch 'stable' into dev" into refs/staging/dev 2013-09-14 01:11:43 +02:00
Thorbjørn Martsum
62fbf3ca6f QMessageBox - move margins to a left spacer
This patch moves labels indent and contents margins into a
left spacer, and it only puts the iconLabel in the layout
if there is an icon.

Change-Id: I6f3563a08fc15ec6ec267e095adf1734f7828355
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2013-09-13 22:06:26 +02:00
John Layt
92b0a7fa3e QTime - Add public api for get/set msecs since start of day
Add new public api to get and set the number of msecs since the start
of the day.  Modify QDateTime to use the new msecs api.

[ChangeLog][QtCore][QTime] Added new methods fromMSecsSinceStartOfDay()
to create a new QTime from an msecs value, and msecsSinceStartOfDay()
to return the QTime as the number of msecs since the start of the day.

Change-Id: I285b725b883f1f5524fda87ca81bd64ed99fe6f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-13 22:06:26 +02:00
hjk
63a382a930 Add a static QFileInfo::exists(fileName) function
This avoids dynamic construction of the private class. According to
the benchmark we go from 4,550 to 3,900 instruction reads per iteration.
(without change 32629676 the baseline is 5,600)

Change-Id: I5df925e30dbd49bdde87173e481820574ce5abe1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-13 19:37:51 +02:00
hjk
4c709fb391 Add a note on symlink behavior of QFile::exists
Change-Id: I41ede0536f1b7093a7cde3d74a5e221df413aeea
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-13 19:37:14 +02:00
Thiago Macieira
aef44c7970 Don't use an extension to the C++ language in public headers
According to Clang 3.3, this is an extension:
qpalette.h:178:9: error: anonymous types declared in an anonymous union are an extension [-Werror,-Wnested-anon-types]
qsizepolicy.h:148:9: error: anonymous types declared in an anonymous union are an extension [-Werror,-Wnested-anon-types]

If you try to simply give the struct a name, it complains with:
qpalette.h:178:16: error: types cannot be declared in an anonymous union

Change-Id: I61c69b8e42a1f4c4a15a0733f2d7efa0b3e44864
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-09-13 19:12:09 +02:00
Thiago Macieira
c1c715f800 Optimize QBitArray::count(bool)
Ever since 76e0223619, qPopulationCount
was extracted from QBitArray and moved elsewhere. That unfortunately
meant that the 24-bit loads are completely useless, since
qPopulationCount always operates on 32 bits.

Instead, do a full loop on 32-bit and then do 16-bit and finally 8-bit
(for which there are qPopulationCount overloads).

Change-Id: If945609f075095257d12877c39434909ac190e54
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2013-09-13 19:11:48 +02:00