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>
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>
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>
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>
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>
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>
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>
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>
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>
... 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>
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>
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>
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>
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>
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>
By dropping it. Found while looking into
Task-number: QTBUG-45291
Change-Id: Ie7655d607244aa67219ade465525ec771c87ccf5
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Excepting QDebug, which doesn't have value semantics.
Change-Id: I43757ef7bba4c1f5b6de9144f12b38ce840cd9f9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
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>
unless GL_EXT_texture_norm16 (and so GL_RGBA16) is present.
Change-Id: Ic15b81b8134fda147e96301b7f78cabe07a05d9e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
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>
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>
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>
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>
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>
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>
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>
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>
There's no value in the ctor and it might be inhibiting some
C++98 POD-only compiler optimizations.
Change-Id: I6887afcd2af9805251eac2d8dfe4ced5b54bff85
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QGraphicsItemAnimationPrivate::Pair, being a (qreal,qreal) is
larger than a void*, so holding them in a QList is needlessly
inefficient. Worse, the code could come to depend on the fragile
property of (inefficient) QLists that references to elements
therein never are invalidated.
Fix by marking Pair as primitive and holding it in QVector
instead.
Change-Id: I190721f4b0cdeab2efab2d51536f64572cd663df
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Adding constexpr there is allowed, because QWeakPointer is a class template.
But in 100% of cases, it will be dropped, because the destructor is not
trivial. So, don't mislead users and devs to think that any or even all
QWeakPointers could ever be constexpr.
Change-Id: Ia50aad4d6c4fb724254308150124c666e82ef817
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
In IsInvalidName::operator(), marked as _NOTHROW, we're calling qWarning(),
which, of course, _can_ throw. We don't care in that case, but then we
musn't use _NOTHROW, which causes UB on MSVC, but _NOEXCEPT, which causes
std::terminate to be called.
Change-Id: I18f74546ea3b388495fdb173d3abd9a162fb78a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>