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>
QList<bool> uses from 400% (32-bit platforms) to 800% (64-bit)
more per-element memory than QVector<bool>.
This change is binary compatible, since QList and QVector have
the same size, and the QList field was not referenced from
inline functions. This includes all relevant special member
functions, since they are all out-of-line (and move assignment
and move constructor are disabled by used-defined copy
assignment and copy constructors, resp.). The header is unchanged
from Qt 5.0, so there were also no past inline users of the
member.
Change-Id: I3a94ddc73a4f388031dfd4fce3fedccc507a39c7
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
So far, this was only supported for dlopen mode. This adds symmetric
defines for the linking case.
Change-Id: I9cbfa18e04d041dde0cbd833929782cada9eb812
Reviewed-by: Richard J. Moore <rich@kde.org>
We should accept JPEGs with broken EXIF headers since the header is
optional and can be ignored if broken.
Task-number: QTBUG-46870
Change-Id: I494e5497b8449ce6494285d4d77caadbbb0ccaf8
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
That's the version Apple ships with Xcode 6.3.2. We set the
threshold to Xcode 7, whose clang version supports the "missing
override" warning.
Change-Id: Ibcab8a45306120bdcd02ca5b0bb0d1c638cea177
Task-number: QTBUG-46833
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Instantiate widgets on stack and add cleanup function for the check.
Change all functions instantiating a QFormLayout without widget on
the stack to use a toplevel widget and pointer variables since
otherwise, the labels automatically created by a call like
QFormLayout::addRow("bla", widget) leak.
Change-Id: I72a7a9c3175b5793a9450c6fcb970012ccd2274b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Instantiate widgets on stack and add cleanup function for the check.
Change-Id: Ia527c228f9173d1b5aeba94ba4e14e1beba60731
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Gather member variables testWidget, testLayout, w1..w3 and sp
used in getItemPosition() and itemAtPosition() in Helper
class ItemTestWidget.
Remove member variables m_grid, m_toplevel and instantiate the
top level widget on the stack in minMaxSize().
Remove empty slots and functions.
Add a cleanup() test checking that no visible top levels
are leaked with explanatory comment about data driven tests.
Change-Id: Ia30120d78144dab3b7c73864c6fbcef606cb19d3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Howard Hinnant is right: just swapping may keep a resource alive too long.
The problem with replacing swap(other) was that the naïve approach:
clear(); swap(other);
is not safe for self-assignment. Taking a cue from the default std::swap()
implementation, and the copy-swap idiom, a self-assignment-safe version is
QSharedPointer moved(std::move(other)); swap(moved);
which is to what I changed the implementation now.
Change-Id: I589fdae50ae22b95350db8250b02d983dc8487a6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Conflicts:
src/plugins/platforms/cocoa/qcocoafiledialoghelper.h
Manually fixed src/testlib/qtestcase.cpp to return the right type.
Change-Id: Id1634dbe3d73fefe9431b9f5378846cb187624e4