When a QML base type is abstract, the documentation for its properties
is supposed to appear on the reference page for each QML type that
inherits the abstract type. And then links to those properties from
within the property documentation must refer to the documentation for
that property on the reference page for the particular inheriting QML
type. These links were dead, but this fix corrects the problem.
Change-Id: Icaf01d67edf44567099f5a6a59fd6348de8df380
Task-number: QTBUG-43200
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Reviewed-by: Tero Kojo <tero.kojo@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Makes it easier to add new tests.
Change-Id: I5c2bca60e125259eac83a03860e60ca85b51db24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This is in preparation of adding more tests.
It makes the test run longer, because of the additional book-keeping,
but if something goes wrong, it can pinpoint the circumstances better.
Change-Id: I4be68fcfbffe48e8609b722ea551b1f7c36790a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We tested button's AXDescription, which is however used only for
non-textual buttons (e.g. buttons with an icon and without a visible
text). On the other hand, button's visible text (which is our case) is
exposed in AXTitle (and not in AXDescription).
Change-Id: Ie89c758cf94b72ade3a440561c5f3df61a4c4612
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Provide real implementations of:
properties(), faceId() and getUnscaledGlyph
Task-number: QTBUG-10094
Change-Id: I5899f247742406de53c68c5cd04fee6fb9b6b7d2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
bec1854cc0 introduced a regression:
when sorting a tree model, children items would not follow the sorted
parents any more (they wouldn't be remapped correctly), resulting
in crashes.
So, the fix needs more reasoning; let's revert the fix,
but leave the original test around for any subsequent attempt, and
introduce a new test which looks for the right behavior when
sorting trees.
This commit partially reverts bec1854cc0.
Task-number: QTBUG-43827
Change-Id: Ic83ac53aef639f870f6c36a8b4b2992f5b485b13
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
This patch short cuts a common loop in the gray rasterizer where it
would iterate over cells it considers invalid.
This greatly speeds up clipping paths on large paint devices, but
probably has little benefit for the FreeType origin of our rasterizer.
Task-number: QTBUG-40559
Change-Id: I30845de0b82e53b619853c6c91903793b4267615
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
For some reason these docs were missing, add them.
Change-Id: If17cf429925ee849a0817e0294a7db7f6dace79b
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
nonTouchUI wasn't defined anywhere, this Q_WS_S60 codepath was partially
removed during the Qt4->Qt5 port, but some cruft remained.
It's not worth saving, because:
- QML is now the way to go for touch UI code
- It's ugly, didn't build, won't be missed
and more importantly:
The current layouting code is already very difficult to read, since we have
"normal" mode, QT_SMALL_COLORDIALOG normal and QT_SMALL_COLORDIALOG touch.
(and WINCE ifdefs in the mix)
This will make the ifdef hell a bit better.
Change-Id: I6daa07cbc8da94ccfe1d0c8d3e870c0678c541fc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
1) everyone forgets to do so (proof: tst_qnetworkaccessmanager_and_qprogressdialog.cpp
forgot too, which led to a valgrind warning, the elapsed timer was never started)
2) setValue(0) makes no sense if the progress dialog goes from 50 to 60,
or any other non-zero minimum value.
Fixed by starting the timer in the constructor (most code doesn't reuse
progress dialogs, so this fixes the most common case), and by also starting
the timer when calling setValue(minimum()) for well-behaved dialogs.
setValue(0) special case kept for compatibility.
Task-number: QTBUG-17427
Task-number: QTBUG-25316
[ChangeLog][Important Behavior Changes][QProgressDialog] The timer for estimating
the duration of the progress dialog is now started in the constructor and in
setValue(minimum()), as well as when calling setValue(0), as previously documented.
Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: Ia8f7fc677438749191b99074fc334eab652ea36f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The old code fetched QHashData::seed from qt_qhash_seed on every detach.
That is both unnecessary and wrong.
It is uneccessary, because if the detached-from QHashData isn't shared_null,
the seed has already been populated from qt_qhash_seed. It thus suffices to
fetch the seed from qt_qhash_seed only when we detach from shared_null.
It is wrong, because if qt_qhash_seed was changed between the detach from
shared_null and a following detach, d->seed is now different from this->seed,
but detach_helper simply clones the buckets 1:1 from this to d, leaving d
in a corrupt state.
By doing this change, we make QHash robust against on-the-fly changes
to qt_qhash_seed (e.g. for testing, or added security). It also opens up the
option to have API for changing the seed of a given QHash instance after it
has been created (detach, set new seed, rehash).
Change-Id: Ib251fc9a6204b42036e97a2fc66f644b379ab841
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is useless. The C++ language does require callbacks passed to C
functions to also be extern "C". That's what this macro was doing.
But #ifdef'ing for the macro only made the code uglier. Just let the
extern "C" be there for all compilers.
PS: C++ classes can't be extern "C"...
Change-Id: Ic5d393bfd36e48a193fcffff13b9c9b3923443dd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This version was based on Clang mainline between releases 3.1 and 3.2,
which means it has part of 3.2 features but not all. One of the missing
features is __builtin_bswap16.
Change-Id: Ic5d393bfd36e48a193fcffff13b95664c7f664de
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Output the current active/modal/popup windows when receiving
FocusAboutToChange or FocusIn events.
Task-number: QTBUG-42731
Change-Id: Ia88e9a9b41f7c80fb7a2a048b06da56d989ff18a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Style sheets that refer to the progress bar (like
"QProgressDialog[maximum='0']{}") may dereference a
null-pointer during the styleHint() call in QProgressDialogPrivate::init()
since the progress bar has not been created yet.
Move the creation of the progress bar closer to the
top of init(), before the styleHint() call.
Change-Id: I31c3c1c346430fc9fe86b0977403dea0c0dc5e90
Task-number: QTBUG-43830
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
[ChangeLog][QtPrintSupport] Fixed QPrinter::{width,height} return values
when the resolution is changed in the print dialog.
Task-number: QTBUG-43124
Change-Id: Ib805907affed4b1ffb48e6b1ff89f7a79ab3e329
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Until now, QSqlQuery::execBatch did not call resetBindCount, which lead
the next call to QSqlQuery::addBindValue to start at non zero index.
This is problematic in case of a prepared query which is called several
times.
Task-number: QTBUG-43874
Change-Id: I1a0f46e39b74d9538009967fd98a269e05aac6f2
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The "Fixed CE build of sqlite3" patch is preserved in this change.
Change-Id: I5461571e5e0b60678727c96a9faee93f9624588c
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The OpenGL windows should have some more obvious
transparent areas in them.
Change-Id: I7d000cd367208f99a79b11c341bf94062613f357
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Remove an useless check and hoist a costly call out of a loop.
Change-Id: Ibd1750026af44462a4f0223a9b2f422ebcc7c0e3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
With change macro is in line with QT_NO_<feature> style of naming
macros. This way it will also be automatically added to file
mkspecs/qmodule.pri in QT_NO_DEFINES value.
Change-Id: I111d07fd015994290c54e00e8aac2d6dbdb7de9e
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
When using the cross-compiler toolchain for 32 bit on a 64 bit machine,
qmake generated a 64 bit VS project.
This was because qmake didn't know about the amd64_x86 cross-compiler,
and qmake did not use the first MSVC bin directory it found in PATH.
Task-number: QTBUG-43457
Change-Id: I50c6f7bb9afe44a58321c670d680dbcc7cd07223
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The current work-flow for adding app icons to an
iOS app during deployment is not good. You basically
need to specify that you want to use asset catalogs
from within Xcode and add your icons there. The
problem is that qmake will regenerate the Xcode project
the next time it runs, and your changes will then be lost.
This patch will check if the project has a valid asset
catalog assigned to QMAKE_BUNDLE_DATA, and configure
the Xcode project to use it for app icons.
Change-Id: I06621ca46aad91de96cb23ba8ca3b1a3f1226670
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Font hinting depends on the specific pixel size, and ends up very
wrong when the painter is scaled.
Change-Id: I2007ec7e7ad8d52358d76e88e030ea4df7e91455
Task-number: QTBUG-43809
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Rectangles need to be mapped differently depending on what they are
used for. Expose events need to cover the entire geometry, so they must
be rounded up, potentially increasing the size. If we use the same
conversion for window geometries, it is possible to end up with a
feedback loop if the window reacts to the new size.
Task-number: QTBUG-43743
Change-Id: I7881cc77bf2148fed2ae743c4226617a61197434
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This test requires test data to be available and the
testRetainSizeWhenHidden test assumes that a widget will be
sized based on its sizeHint(), which does not work on
platforms where show() implies showMaximized().
Change-Id: I9bf372d8c0ea94845ae08481ec555fe25dcfebc0
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This test needs to have a test environment available on the regular
file system, so we create this when initializing the test. In
addition we QEXPECT_FAIL one of the tests which seems to expose
a legitimate bug. A bug report has been created for this.
Change-Id: I7c90aea78a067815cb647a51db5d91a652a9fc1c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
On Android, the HOME and TMPDIR environment variables both point
to the application sandbox, whereas the QSideBar test assumed
they were different. We work around this simply by creating
a new directory and using this as the test dir in place of the
home directory.
Change-Id: I67e01926b901ddf237b05aff116d30b6c7885535
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This requires building a command line tool and running it using
QProcess, which is not a supported deployment option on Android.
Change-Id: I795374bf809a8e4d8634a55f5ebf1699ee9745d1
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
The auto-hinter in the FreeType version bundled in Qt gives
slightly different advances on some glyphs. As noted in
the removed code, this was already observed on Windows and QNX,
and recently also on Android.
I'm sure it could also happen on platforms using the system library
if the system library was the same version as the one bundled in Qt.
Instead of expect-failing the test, we simply accept both the
observed results as valid.
Note that we need to accept 9 as a result for the default hinting
preference on all platforms, not just Windows, since the default
hinting preference in FreeType can be a system setting.
Change-Id: I3cc0f33f0f66dd64419770b37c10dee457706b5e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
The files for the test have to be included in a qrc to be available on
Android.
Most of the image files are already in a qrc, but a couple were missing.
We add this in a separate qrc to avoid interfering with the tests on
other platforms.
Change-Id: Ibb24f5015a1aba4d5622e14f7aae80bc18611ec4
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The value of pdwEffect passed to IOleDropTarget::Drop() is always
the one with which the drag was initiated.
Task-number: QTBUG-43466
Change-Id: I045fef634b55d4f113b393aa0ad4aa15d37db372
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
The algorithm searches for all executables in search path starting with
"tst_". Tests are not named like the folder they are contained in
anymore.
Change-Id: I360f293e43e30292fe0ae6230fd3ec7abf3d632d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
When compiling tst_qpathclipper with MinGW:
In file included from QtGui/private/qpathclipper_p.h:1:0,
from tst_qpathclipper.cpp:33:
src/gui/painting/qpathclipper_p.h:469:29: warning: 'static QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal)' redeclared without dllimport attribute after being referenced with dll linkage
inline QPathEdge::Traversal QWingedEdge::flip(QPathEdge::Traversal traversal)
^
qpathclipper_p.h:474:29: warning: 'static QPathEdge::Direction QWingedEdge::flip(QPathEdge::Direction)' redeclared without dllimport attribute after being referenced with dll linkage
inline QPathEdge::Direction QWingedEdge::flip(QPathEdge::Direction direction)
Change-Id: I38feb07d693768285c1d405b3fc92a58c3309547
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
... in QCOMPAREs.
The implementation is hidden in a nested Internal namespace that retrieves
the strings without strdup()ing. That makes it easier to compose these
functions as there is no need to delete character arrays when using them.
The public interface (which qstrdup()s) is implemented on top of these.
[ChangeLog][QtTest] QCOMPARE now pretty-prints QSizePolicy{,::Policy,::ControlType{,s}}.
Change-Id: Ib03d969847e5a12474c71a7921366b400025f680
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is the error:
src/corelib/kernel/qvariant_p.h: In constructor ‘QVariantPrivateSharedEx<T>::QVariantPrivateSharedEx() [with T = QSizePolicy]’:
src/corelib/kernel/qvariant_p.h:107:61: internal compiler error: in gimplify_init_ctor_eval, at gimplify.c:3560
There are two things fishy in this file:
1. Use of the unnamed namespace in a file that gets included
in different libraries. While not technically undefined
behavior, it may become so when used in the implementation,
which it is.
2. Missing explicit initialization of a member of
QVariantPrivateSharedEx. This is just a wild guess, because
the ICE happens in that line. That class itself is quite
smelly, because the address of an object is taken before
the lifetime of the object begins. A fix would be to store
the object in a wrapper class from which QVPSEx inherits
_first_, but then a cast from QVPSEx to QVariant::PrivateShared
would require pointer adjustments, and I didn't look through
all the code to determine whether that would be an issue.
Having been bitten by this sometime ago:
https://marcmutz.wordpress.com/private-practice/private-practice-taming-templates/#edit-20111128
I opted to do these easy changes first to see whether they
already fix the ICE.
Change-Id: Ic15fd928b3dff2318c425c915b2dab5e54254d71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][QTimeZone] Added methods systemTimeZone() and utc()
that return QTimeZone objects for the system time zone and for UTC,
respectively.
Change-Id: Ic5d393bfd36e48a193fcffff13b96821bb8514b9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
O_CLOEXEC was introduced with the 2008 revision of POSIX.1 and it's the
only way of doing child processes safely with fork(2) in multithreaded
applications.
But we need to support pre-2008 systems, so we can't use that constant.
So let's just choose two arbitrary values for both of our constants --
we need to change both because we need to be sure that FFD_CLOEXEC won't
be the same as FFD_NONBLOCK.
Linux will probably implement them to the O_ constants, like epoll,
signalfd and inotify have done.
Change-Id: I20a5aa6e6264e7a219e19759eeb8747e01df05ff
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This was introduced in 3b844c16e0
and doesn't seem to be right.
Change-Id: I1c6a9445996650566d44f223651dd0c855619a88
Fixes: Coverity CID 21589
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reduces a bit of string duplication by relying on the constants
defined in qglobal.cpp and detection via uname(2), in addition to adding
the Linux distribution name as a selector.
Change-Id: I64a46a0fc552c399db787125b1b32aae5c50056f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>