The class inherited QSharedData, had a non-virtual clone() function and
a non-virtual operator==() which compared QPlatformPrintDevice::id().
Derived classes implemented clone() and operator==() comparing ids
to no effect. The class does not have any setters modifying its values,
so detaching, copying and assigning does not make sense.
Remove the inheritance, clone(), and operator==() and make the class
a non-copyable base class. Use a QSharedPointer instead of
a QSharedDataPointer to store it in QPrintDevice.
Remove copy constructors and clone() reimplementations that were never
called in implementations.
Found while investigating QTBUG-44991.
Task-number: QTBUG-44991
Change-Id: Ib79354b37048d04d50d936f1d0ae06c36efaac00
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
In single-exec mode, QDoc must never skip documentation warnings
as there is no subsequent QDoc run to re-execute the same code
paths (in generate phase) that generate warnings.
Change-Id: I8da2f16cfb12b3b3509249d1c9941d63733176a9
Reviewed-by: Martin Smith <martin.smith@digia.com>
The failing test has been blacklisted in 3ed6f74fb2.
Change-Id: I5a2defd839e2f98690fc8cea9ff18e7503caf0de
Task-number: QTBUG-25294
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
this allows LD_LIBRARY_PATH to take precedence over the hard-coded
rpath, which is the only sane thing to do (which is also why i'm not
adding an option to disable it).
this behavior is consistent with non-linux systems.
the windows version has no auto-detection, just like for gold linker
usage.
Task-number: QTBUG-3069
Change-Id: Ief9ba032291c898d75d76ecc740390954382a804
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This is for example useful when looking for a possible BLACKLIST
file while doing a shadow build.
Add autotests for blacklist.
Change-Id: I41d3939d31d21d10187fefcb82604736d911b6ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The change would remove the noexception hint on MSVC versions that
doesn't support noexcept but supports their older 'throw()' hint.
Change-Id: Ie5163f2413522f427279f59c8562c0ce4769bc82
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
There is no ApplicationsLocation on iOS (at least not one that
is public API). NSApplicationDirectory just points to a non-existing
write-protected path inside the app sandbox. Rather than returning something
we know is wrong, it's better to return an empty string.
Change-Id: I2ebc151f15509ed5699af05def5c708a56eeaf31
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
NSDesktopDirectory points to a non-existing write-protected path inside
the app sandbox. According to QSP documentation, we should fall back to
use the home directory instead.
Change-Id: I2c370af7758ac043eddcff84aa287eacc754ae38
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This was completely broken until now because the ranges were assumed to be
from the OS/2 header map. These are actual unicode ranges from the cmap,
so they need to be matched by looping over the values and checking if they
fall within a given writing system range.
Task-number: QTBUG-44155
Done-with: Peng Wu <peng.wu@intopalo.com>
Change-Id: I933429627c4dbf3377f41c9281df5a801057698f
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Moves some of them to the .rodata section, the rest at least to
.data.rel.ro[.local].
Change-Id: I85676ddf22b0c0097f3f0dce4c3dc018dc29d045
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
QGraphicsWidgetPrivate::init had a special code path for setting
the item's parent. For some reason that code path caused the
ItemChildAddedChange notification not to be sent to the parent
element, which is wrong. Instead use the "normal" path, which is
what the QGraphicsItem constructor does anyhow.
Change-Id: Iad84cae05d797022a45977d35ca00c80c17c306a
Task-number: QTBUG-45867
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
...by dropping the use of qIsNull(), which, in Qt 4, distinguished
between -0.0f and +0.0f.
But mathematically, whether x, y, z are ±0 doesn't change the fact
that the result is the identity element (x, y, z should contain the
identity element for addition and w the one for multiplication), or
the null element (additive identity).
So using qIsNull() was wrong even in Qt 4. In Qt 5, qIsNull() returns
true for both ±0, so we can just as well compare to 0.0f instead,
which allows to mark these functions constexpr (qIsNull() can't be).
Do so.
Change-Id: I78b1fa7890036dd3cb4de7f90b75d439f9835e73
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
currently when adding an event it is not possible to know when processing
it has finished.
In particular if the event is ignored no method is called.
Adding virtual methods to the private implementation (binary compatibility).
These methods allow for extended automatic testing of the state machines.
(cherry picked from commit e7feb95628)
Change-Id: Iaa48fb9d7f6a6cde1a8a7a2bece7b4df55c147e8
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The behavior of "external" and "internal" transitions is identical,
except in the case of a transition whose source state is a compound
state and whose target(s) is a descendant of the source. In such a case,
an internal transition will not exit and re-enter its source state,
while an external one will.
[ChangeLog][State machine] Added support for internal transitions.
Change-Id: I9efb1e7368ee52aa2544eb84709a00ae3d5350d3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
As nothing changes in the state machine when selecting transitions for
events and then calculating the exit- and entry-sets, some calculations
can be cached.
The exit set for a transition was calculated multiple times. First in
removeConflictingTransitions, where the two loops would each calculate
them multiple times. Then secondly in microstep(), which would calculate
the exit set for all transitions.
Transition selection, exit set calculation, and entry set calculation
all calculate the transition domain and effective target states for
transitions.
Change-Id: I217328a73db2f71e371eb5f60a0c7b222303f0ca
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Add the noexcept attribute to all move constructors and assignment
operators in QtGui that didn't already have it.
Change-Id: Idcdf79ae8349b8793e7394b5ae7c08e6111fbc9a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
It's undefined behavior to left or right-shift a signed integer such
that the sign changes. Since SymbolCsbBit is 31, make sure we use
unsigned numbers.
Found by ICC
qplatformfontdatabase.cpp(614): error #68: integer conversion resulted in a change of sign
Change-Id: Idf715b895bac4d56b4afffff13da78d294b1248e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Make it clear (just like the other methods) that the indexes refer
to the source model, not the proxy model. There was already a note
in the documentation, but it was at the end of it; instead, change
the formal arguments names.
Change-Id: Ia9592f2b080ff276a62de1713a9623e0f3a50cf6
Reviewed-by: Tobias Koenig
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
There is no any sense in detecting the encoding of an empty string ;)
Change-Id: I1c7af07bd7c3e7e7cf67421a2cb3a1123ca57650
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The init()/cleanup() code in tst_qfiledialog and tst_qfiledialog2
currently differs and fails to clean up the settings file
since it only removes the legacy settings under the Qt group
and instantiates a new QFileDialog while the QSettings class
is still in scope. Also, it has no means of clearing the
setLastVisitedDirectory(), which causes the
tst_QFiledialog::completer() and tst_QFiledialog::history() tests
to interfere, leaving the settings in an invalid state.
tst_qfiledialog2 does not use QStandardPaths::setTestModeEnabled(().
- Ensure the last visited URL is always clean by
making QFileDialogPrivate::setLastVisitedDirectory()
static and calling it from init().
- Introduce a cleanupSettingsFile() function to the tests that
cleans both groups and call it from initTestCase() and cleanup()
to ensure a clean state.
- Add QStandardPaths::setTestModeEnabled() to tst_qfiledialog2.
Fixes sporadic test fails when executing
tst_QFiledialog::completer() and tst_QFiledialog::history()
in a sequence.
Task-number: QTBUG-45764
Change-Id: I24de3caabf77be067b385d64ff11b7a07fe12b72
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This one has not been unsed for ages (since Qt3?).
Change-Id: Iaf514db1b698b34a303f34c150b72db989eb176c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Many times set but never used.
Change-Id: I297f21d4b9878e5f9559a2dfdb2d3de34107bb7d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
1. Checking if `db->count == 0` inside the
`for (int x = 0; x < db->count; ++x)` loop makes absolutely no sense;
2. The family gets loaded just a line above (ensurePopulated()).
Change-Id: I72dbd42565c4f5a5d9ff8879f10ee0ece7298fa7
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
There is no sense in comparing fonts with different resolve_mask-s.
Change-Id: Icfdaf494fce8a59b7138d96fdf7354cc0514ca6a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
When resolve_mask is 0, the font inherits just everything, and there is
no need in checking for any resolved attributes;
the resolved font always inherits dpi, so do not check it either.
Change-Id: Ie5d7ced0859d46a9237447e29051a22569480a51
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
These values were added as part of upgrading to Unicode 7.0
Change-Id: Ib208828a7685ba4f89f0e2f06033f74c8ff13532
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
The flags are the same across all GCC flavors so put the definition
in the common gcc-base.conf instead of duplicating it in g++-base.conf
and clang.conf
Change-Id: I1ba2c3c314d3a02b559c384aecef74240f69f659
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Completes the inplace converters so that we can rely on inplace
conversions to succede as long as the image depth is the same.
Change-Id: Ia1ae34b5de1bc16e87ff5403bdacfcae44a22791
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Some inplace conversions would not set the requested image format in
the returned image, due to the same conversion being used for several
destination formats.
This patch ensures all inplace conversions return the right format,
and adds testing infrastructure to easily test iterate over all formats
so that they all can be tested.
Change-Id: I68ab17a713ddb2aa8ed6aaf0a0a1ec8bbcb56090
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
- Introduce QDebugStateSaver for all debug operators.
- Remove the "Flags=" from enumerations since their type is now output
by default.
- Added some spaces since the previous formatting relied on space=true
as a result of some debug operators erroneously returning debug.space(),
which is now fixed in qtbase.
- Fixed formatting, added noquote() where necessary, added some newlines,
used stream modifiers instead of QString::number(n, 16) to output
hex numbers.
- Fix indentation.
Change-Id: I64123a4262916e21448cda2aa61ae1100f07291a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
The one converters from RGB30 was misplaced in the method table, and
the unpremultiplication from A2RGB30 to RGB30 had an underflow mistake
when alpha was 2.
Change-Id: I92c11ede28611a3dbdce72aca1898845c120c209
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
X server may return an empty physical screen size, for example
on VNC, Xephyr or some not very well supported hardware.
In this case it's possible to use the size of the virtual desktop,
but until now it was done only in the QXcbScreen constructor.
Move it to QXcbScreen::updateGeometry() and calculate physical screen
size using the DPI of the virtual desktop.
Task-number: QTBUG-45564
Change-Id: I6b757818a2fcefdd7b2c0aa31b840a88d625d6ae
Reviewed-by: Daniel Vrátil <dvratil@redhat.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Doing a build on OS X without -developer-build fails.
Change-Id: I49c178ab2428177d9dd94f84620595a4bc132244
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Changed state in MouseRelease so that QTreeView
does not end up in wrong state if drag is started
but not completed.
Task-number: QTBUG-44773
Change-Id: I0b665d2944f2b696bc4b7e79689d110aefa3f194
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
There is no reason to use the more expensive ARGB32 conversions when
there is no alpha channel involved.
Change-Id: Ifcb325352b8c806ef755db385121a2939c5825b2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Done by using in-place removal from the list of transitions using
iterators.
Change-Id: I6dced4b214b49b3dcd3ba19ca4cd81a601f81bb6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Fixed issue that text/uri-list mimedata got from QMimeData::data()
was corrupted after setting it back via QMimeData::setData()
Change-Id: I2377523a9286519402ab9127ed7f3fa66e39a679
Task-number: QTBUG-45486
Reviewed-by: David Faure <david.faure@kdab.com>
Some QImage methods were not preserving image metadata, or only
preserving some of it. This adds the missing parts and adds a test for
metadata.
Change-Id: Ib5892a23e49dfde5ea26074d3deaa887fa930c6b
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Remove the insignificant_tests CONFIG option in favor of a BLACKLIST
file. The tests blacklisted have been found using CI builds logs.
Change-Id: I34374ed7269f941c330c65d97fe083c83d3df461
Task-number: QTBUG-33574
Task-number: QTBUG-30943
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
In certain situations, when reading a large amount of data from
sequential devices with QIODevice::readAll(), content was lost when
passing a qint64 value > QByteArray::MaxSize into QByteArray::resize(),
which takes an int. The result of the conversion to int is either negative or
calculated mod 2^32. In any case, it will at some point be < QByteArray::size(),
which prompts QByteArray to truncate, losing already-read content.
Fix by adding an explicit size check before calling QByteArray::resize().
This shows once more that an API that uses int for sizes is dangerous.
Esp. on 64-bit platforms.
Change-Id: I30fbfad0bf37476c34141b6f3786e7e0fc8e1e74
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Swap title and message parameters in the QBalloonTip::showBalloon() call.
It was wrong in f277c07467 on xcb platform.
Task-number: QTBUG-43428
Change-Id: I18e354703d9fa9c196b2789e6df263debdb7ce06
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
QMAKE_BUNDLE_DATA itself does as well, and it can refer to versioned
resources.
Change-Id: I3d9bf23c2ff81dbb1cd929f3f0e0ce1e67f3258a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
CMake INTERFACE targets may only have whitelisted properties, and
FRAMEWORK is not in the whitelist in released CMake versions.
Change-Id: I27cd0cfbe1b52f25c91bf1b3c0d55879bed91bdf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
This enables rendering of Emoji symbols.
Task-number: QTBUG-45811
Change-Id: I7cb128dab717870929e02ea9ec253f36fef29804
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>