Commit Graph

24298 Commits

Author SHA1 Message Date
Marc Mutz
f405352fee QByteArray: add {const_,reverse_iterator}, {c,}r{begin,end}()
Had to mark {,c,const}{begin,end}() inline, since they are, and mingw
complains about inconsistent dllimport attributes.

[ChangeLog][QtCore][QByteArray] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.

Task-number: QTBUG-25919
Change-Id: Id5aefb52635f029305135afcd99db0b036a7af82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-07 05:22:08 +00:00
Marc Mutz
92d5733c78 QString: add {const_,reverse_iterator}, {c,}r{begin,end}()
Had to mark {,c,const}{begin,end}() inline, since they are, and mingw
complains about inconsistent dllimport attributes.

[ChangeLog][QtCore][QString] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.

Task-number: QTBUG-25919
Change-Id: I1d48729c76e510c1e49c0e5dc41691aa662fdf21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-07 05:22:04 +00:00
Bjoern Breitmeyer
683d817ada Introduce QT_NO_WINCE_SHELLSDK for WEC builds.
ShellSDK isn't always available in WEC2013 and
sadly the define that should tell us if it is
isn't enough as the headers would be in the SDK
but the lib doesn't need to have the symbols.

Change-Id: Iccd11eafd0dbd22ee421c9a08f05bfc2fc5bdd49
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-06 14:31:45 +00:00
Ulf Hermann
2839e8d010 dbus: allow dbus_shutdown() on QT_NO_LIBRARY && QT_LINKED_LIBDBUS
If you statically link in a dbus library you'll have dbus_shutdown()
available.

Change-Id: Ieeded63838423a14a5530a4edb0ea46dc9b58d18
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-07-06 14:15:53 +00:00
Ulf Hermann
2ca151a8d1 configure: Put qml-debug option into QT_CONFIG
This way we can exclude the connection plugins from being compiled
if it's off.

Change-Id: Ic5ea1d35ea9f5929420268a1aefebf0464d8520b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-06 14:15:39 +00:00
Marc Mutz
49403ef7a2 QIcon: use (Qt-) canonical form of move special member functions
In particular the move constructor now performs only
two instead of four assignments.

Change-Id: I033d75635288fbd44060a1ba5f2da23b7e7729f6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-06 12:47:09 +00:00
Marc Mutz
82f48c7d32 QtTestLib: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Since QtTestLib has a lot of templates and macros, not all uses of 0 as nullptr
might have been detected by the headersclean check.

Task-number: QTBUG-45291
Change-Id: I21e9d8822e3a708010938e8d5ef2fd42ae6c8c68
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-07-06 12:46:26 +00:00
Marc Mutz
283f19924d QtWidgets: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: Ie67d235151ca8d4ef5e721c9cf4a6fd32bd167a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-06 11:33:05 +00:00
Marc Mutz
3e2953e05a QtDBus: mark some types as movable come Qt 6
Marking them movable now would make QLists of these types BiC.

Change-Id: I7ae06aec596b349ee05e48f24a077af743450669
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-06 11:32:51 +00:00
Marc Mutz
db5e672acc QtOpenGL: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: I16c93bd36c242a6d402cf7622820e91eac782772
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-07-06 11:32:44 +00:00
Marc Mutz
861dca57d7 QTextLayout: deprecate QList API for additionalFormat
This is a separate commit to allow other modules to do the transition
before this may vanish or cause a warning.

Change-Id: I556837bf0d2c667f067f4e1fa7918bd1a3f55025
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-07-04 06:03:59 +00:00
Marc Mutz
9cb68cdea0 Make QWidget *=0, Qt::WindowFlags f=0 functions use Q_NULLPTR
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: If9721e8b1ab3b4cd6e3e366362cae314f451bbed
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-07-04 06:03:52 +00:00
Marc Mutz
c3addaca17 QtXml: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: Id65c5a13d66e08937e6115e8c5b37923c8489f1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-04 06:03:44 +00:00
Marc Mutz
160f4191d4 Micro-optimize QKeySequence datastream operator (II)
Instead of reading a QList with the keys and then assigning the list
contents to the keysequence internals without any further checking
(not even for the size of the list, even though op<< creates lists
with just one element), do the processing by hand.

The greatest benefit is that there is are no memory allocations
anymore, except for the detach and whatever QDataStream does
internally.

The other benefit is that the output key sequence is not touched
until the necessary values have been successfully read. This
includes the detach. For this, some very basic error checking has
been added.

Also removed the magic number 4 in favor of the recently introduced
QKeySequencePrivate::MaxKeyCount.

Change-Id: If70f75cc043468d2774a7bb03eebdbf39422043a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-04 06:03:39 +00:00
Marc Mutz
b196573c9a Fix QVector move assignment to return a reference
... instead of a copy.

This has been there since before Qt 5.0.

A quick grep shows it's the only instance of this mistake
in Qt.

Change-Id: I341df34f67544b8ed719254bd57237a9599efb46
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-04 06:03:33 +00:00
Marc Mutz
f9bcaeb808 QtDBus: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: If258b503c5ce335ecc22a5176d3e2b21aa7a278a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-04 06:03:29 +00:00
Sérgio Martins
ebe4ab04ca Use const-ref in foreach if T is big or non-trivial
Criteria: Linux x86_64, sizeof(T) > 8

Change-Id: I78c2b776ff219fa1ff6632fde17ae25fae66c54e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-07-04 06:03:21 +00:00
Liang Qi
0698f876ca Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-07-01 09:59:28 +00:00
Allan Sandfeld Jensen
cd297f99a2 Fix A2RGB30 compositing tests
With two alpha-bits half opacity can not be represented, so we must use
one third (85) instead of half (127).

Change-Id: I2b3f1c983a3034196bf2604840945ad3a81f5b38
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-07-01 09:59:26 +00:00
Liang Qi
0aa2d318b1 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qglobal.h
	src/corelib/global/qsysinfo.h
	src/corelib/global/qsystemdetection.h
	src/corelib/kernel/qobjectdefs.h
	src/plugins/plugins.pro
	tests/auto/widgets/itemviews/qlistview/qlistview.pro

Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
2015-07-01 11:05:26 +02:00
Marc Mutz
6251d4dafc QtCore: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: I0cc388ef9faf45cbcf425ad0dc77db3060c104a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-01 05:50:41 +00:00
Allan Sandfeld Jensen
49049d9047 Fix simple semi-transparent blending of RGB32 on RGB30
We can not rely on the alpha being preserved as part of the source when
the source is converted to a2rgb30 which has much less alpha accuracy
instead we need to apply the alpha on the result.

Change-Id: Iac3104666980825e44ed3490370cdbe21dc68008
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-07-01 04:28:31 +00:00
Marc Mutz
1be6bad232 Add qHash(QLocale)
QLocales can be compared for equality,
so qHash should be overloaded, too.

[ChangeLog][QtCore][QLocale] Added qHash(QLocale).

Change-Id: Ia0fdf1207b842b9bb20b8f9ab0165016915debf4
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-30 20:10:54 +00:00
Marc Mutz
82e442a26b QModelIndex: Fix a nullptr literal 0 that would look odd as nullptr
By dropping it. Found while looking into

Task-number: QTBUG-45291
Change-Id: Ie7655d607244aa67219ade465525ec771c87ccf5
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-30 20:08:34 +00:00
Martin Smith
b4babd6406 qdoc: Missing names from ignored tokens list
Q_DECL_CF_RETURNS_RETAINED and Q_DECL_NS_RETURNS_AUTORELEASED are
added to qdoc's list of ignored tokens. Without them, qdoc fails
to parse a few function declarations.

Change-Id: If59066a765882d88881eed7db31b4b52a6e570ea
Task-number: QTBUG-46920
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-06-30 19:10:47 +00:00
Martin Smith
ce4cfd0028 qdoc: Missing name from ignored directives
Q_ATTRIBUTE_FORMAT_PRINTF is added to qdoc's list of ignored
directives. Without it, qdoc fails to parse a few function
declarations.

Change-Id: Ie24a58d9a5dcdffb8c103b2f5e34dd09b9471f06
Task-number: QTBUG-46920
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-06-30 19:10:37 +00:00
Marc Mutz
6aaac9a3b1 QtGui: make all Q_DECLARE_SHARED types nothrow move-assignable
Excepting QBitmap and the QTextFormat heirarchy, which don't
have 100% value semantics (still pondering them).

In QPolygon(F), adding the move assignment operator disables
the implicitly-defined copy assignment operator, which therefore
have to be made user-defined. That doesn't change the ABI of
the class, since the base class QVector already had a user-defined
copy assignment operator.

Change-Id: I0b111c1d21cf47f559ada6357c982e3dc26aca68
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-30 16:34:26 +00:00
Gabriel de Dietrich
52e7aba6bf QFileIconEngine: Remove reference to QFileIconProvider
Keeping the reference may end up in a crash if a created
QIcon outlives the QFileIconProvider and we then try to
generate a pixmap.

The reference is not necessary since the options are queried
only when creating the icon, so they can be saved in the icon
provider.

Task-number: QTBUG-46755
Change-Id: I5c60887c2ed39030a2a20298ff10fd652189e4e7
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2015-06-30 12:27:04 +00:00
Friedemann Kleint
b0852eb271 tst_qtooltip: Move cursor away from tooltip.
When executing the test in a sequence (as done by make check after
tst_qstackedlayout), tst_QToolTip::task183679 often fails since
apparently the tooltip is hidden when the cursor is near it.
Move to the cursor to the right corner of the widget to fix this.

Change-Id: I3b13239e77cb387f1b1425fab79c8d6faa27b5bb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-06-30 12:03:13 +00:00
Andreas Holzammer
4dc35d26f5 Turn off optimizations for all windows arm platforms
Windows Embedded Compact 7 seems to be affected
by the optimization bug as well.

Task-number: QTBUG-46666
Task-number: QTBUG-46667
Change-Id: I169588cfbc570378ee3066b760d8c084fd28e6be
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-06-30 11:51:40 +00:00
Oswald Buddenhagen
49631eaaf9 fix build under FreeBSD 10
qlockfile_unix.cpp:236:24: error: use of undeclared identifier 'kinfo_getproc'

Task-number: QTBUG-46907
Change-Id: I146b5de99b6149df64c116cbdec81a19e352a3a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-06-30 11:49:01 +00:00
Giuseppe D'Angelo
79402425dd Re-fix X86 Wince builds.
eebb8de21ce4845866f15e444a4c78fc2cbb7f3f fixed the PCRE
build, but was accidentally overwritten by a subsequent
import of the PCRE tarball.

Now put the same patch also into patches/ so that we don't
forget it needs to be manually applied.

Change-Id: I93c2ee9c2e2dd1c48d391ce7e16d33208fb2cbbb
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
2015-06-30 11:41:16 +00:00
Andreas Holzammer
69e9459e09 Switch to new not deprecated api
SPI_GETPLATFORMTYPE is deprecated as of Windows
Embedded Compact 2013, SPI_GETPLATFORMNAME is a
full replacement. Use this instead because it
produces deprecation messages and slows down
execution.

Task-number: QTBUG-46916
Change-Id: I7f162b488dd0b1aa256c47a9e76358df101e3d0f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-06-30 11:23:16 +00:00
Marc Mutz
65343eb283 QtNetwork: make all Q_DECLARE_SHARED types nothrow move-assignable
Change-Id: Ib29ec4b73a4cdc51074997f7d167c289cf5af7a4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-30 10:57:50 +00:00
Marc Mutz
bc1804fa72 QtDBus: make all Q_DECLARE_SHARED types nothrow move-assignable
Change-Id: I5b04fb44b632a0bbb290199fc092b3ffd8289650
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-30 10:57:27 +00:00
Pier Luigi Fiorini
11370f0a43 eglfs: Destroy screens after windows
Screens must be destroyed after windows otherwise the application will
crash on QEglFSWindow::destroy() because the screen is NULL.

Change-Id: I315ddc267dd0d2dd2a1c4f3a0c319c8f2c11ec28
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-30 08:11:29 +00:00
Nico Vertriest
a7f2af0911 Replace MAC OS X with OS X
Task-number: QTBUG-46374
Change-Id: I7bc633ab551740bd328a24b0ccae1d534af47138
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-06-30 07:33:31 +00:00
Marc Mutz
f815676b7d QtCore: make all Q_DECLARE_SHARED types nothrow move-assignable
Excepting QDebug, which doesn't have value semantics.

Change-Id: I43757ef7bba4c1f5b6de9144f12b38ce840cd9f9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-30 07:20:50 +00:00
Sérgio Martins
20147fae60 Use QVector::reserve() all over the place.
Reduces internal memory fragmentation.

The search criteria was:
QVector::append(), QVector::push_back(), QVector::operator<<()
and QVector::operator+=() calls inside for, do and while loops.
Statements inside ifs and out of loops weren't considered.

Change-Id: Ie5aaf3cdfac938994e6e5dfa5f51de501ed79a0c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-06-29 19:31:59 +00:00
Laszlo Agocs
29e88fd8f0 Do not use 16 bits per color on GLES
unless GL_EXT_texture_norm16 (and so GL_RGBA16) is present.

Change-Id: Ic15b81b8134fda147e96301b7f78cabe07a05d9e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-06-29 15:59:06 +00:00
Richard Moe Gustavsen
592f355271 iOS: remove unrecognized compiler flag '-fno-arc-abi'
Clang does not recognize the compiler flag 'no-arc-abi' anymore.
This causes a warning, which will fail the build. Not sure
what the flag does, as I cannot find any documentation for it, even
after grep-ing through the sources (both clang-600.0.57 and
clang-503.0.38)

Change-Id: I39fae3fd108a8edb978f4264935a069cce4c302a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-06-29 15:18:29 +00:00
Kai Koehne
8b304ff26f configure: Infer licheck bitness from platform argument
We build our 32 bit Linux packages nowadays on Red Hat 64 bit with
-platform linux-g++-32. Honor this when selecting the right licheck
binary to use.

Change-Id: I08527295bc461c8cdd07e81a10c93a8f010b787d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-29 15:06:00 +00:00
Tor Arne Vestbø
c937bbb4fe iOS: Use LC_MAIN to wrap user main() instead of mangling object files
With iOS 6.0 and above the LC_MAIN load command is available, which allows
dyld to call the application entrypoint directly instead of going through
_start in crt.o. By passing -e to the linker we can change this entrypoint
to our wrapper that sets up the separate stack before entering the native
iOS runloop through UIApplicationMain. As before, we call the user's main()
from applicationDidFinishLaunching.

By using LC_MAIN instead of messing with the object files we open up the
possibility of generating Bitcode instead of object code, which can be
useful for link-time optimizations, either locally or by Apple.

Change-Id: If2153bc919581cd93dfa10fb6ff1c305b3e39a52
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-06-29 12:39:50 +00:00
Laszlo Agocs
7b0cb2ffa3 Modernize Beagleboard/Beaglebone specs
Use hard float. This has already been the case for the commercial Beaglebone
reference images, it's time to fix the old specs too.

Change-Id: Ic9007285f64a3055fb637e7eacead17cbad1cad4
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2015-06-29 11:45:42 +00:00
Benjamin Summerton
2a526b12ce Updated Hello GL2 Example to new Signal/Slot syntax
The Hello GL2 Example was using the older Signal/Slot syntax that made
use of the macros `SIGNAL()` and `SLOT()`.  I changed it to the newer
one.

Change-Id: I8e55015383847a04b07f751fe9fc94b81956a896
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-06-29 11:30:01 +00:00
Sérgio Martins
2a81516835 QRasterPaintEngine: Don't detach QImage
Caught being detached a few thousand times per second.

Change-Id: I9f3c80cc5178ec2016041a4f2f6e6e1f458171f1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-06-29 10:34:39 +00:00
Oswald Buddenhagen
f88f93efb6 Bump version
Change-Id: Ide0b1a80ac89b76154ecccbda68398f3a05e1f5d
2015-06-29 10:47:21 +02:00
Sérgio Martins
aa09cc029f Fix inefficient container.values().first()
Saves 1 full iteration and 1 memory allocation.

Change-Id: I7e521054bd573f30dea2ec166d566ab6ac60eb4e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-28 21:14:34 +00:00
Marc Mutz
eda79a467e QDate/QTime: fix SiC introduced by adding new non-explicit ctors
The new constructors were added in c94d41d9 to help
constexpr'ify QDate and QTime. Even though private,
they participate in overload resolution and break
function pairs overloaded on QDate and int or
QTime and int.

Mark them explicit.

[ChangeLog][QtCore][QDate/QTime] Fixed a minor source-incompatibility
between Qt 5.4 and 5.5.0 involving sets of functions overloaded on
QTime and some integer or QDate and some integer.

Change-Id: I65a09aaca2b083cda90255c24cc72ef51119d3b1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-28 21:12:43 +00:00
Marc Mutz
99d9a683b1 QGraphicsItemAnimationPrivate: replace a sort with a rotate
There's really no need to sort the whole collection if you
a) know it's already sorted and b) already know its final
position, because you looked it up using lower_bound a line
up. Instead of appending and sorting the whole thing, simply
append and rotate into place, conveniently packaged as
positional insert.

Also reverse the check for presence: less negations: more
readable.

Change-Id: Id23f108b64976061f666f517fbc436d3c72dd25b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-06-28 21:11:00 +00:00