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>
Now that it's a plugin, the restrictions for the compiled-in hooks
do not apply. Make it maintainable and prepare for future development
by splitting up properly.
The actual functions are not touched at all in this patch.
Change-Id: I4c666817afe15b31a63c1f9fc01413e9a2376a3b
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
We have to set a default arrow cursor on startup because non-widget
apps will not request one. This is how we behave with non-kms backends
too.
Change-Id: I11b7bf96e46f570bc49f3e8701616b13c480fda6
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
isnan is C99 and POSIX.1, which the older MSVC do not support. Use the
Qt equivalent.
Change-Id: Ic5d393bfd36e48a193fcffff13b8679cb83d12db
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QDateTimePrivate::setDateTime has a comment saying this is intentional,
so document it.
Task-number: QTBUG-43704
Change-Id: Ic5d393bfd36e48a193fcffff13b965409eaf7be9
Reviewed-by: Martin Smith <martin.smith@digia.com>
When programatically setting a text selection on iOS, we
call [UITextInputDelegate selectionWillChange] to report
the change. If auto correction is enabled, UIKit will then
reset the current tracking, and for some reason tell us to
clear the selection. This is contradictory to us
saying the the selection is about to change, and will
cause an unwanted recursion back to Qt.
Since there seems to be no way to stop UIKit from doing
this, this patch will instead add a guard that refuses
to change the selection recursively while processing
a selection change from Qt.
Task-number: QTBUG-43716
Change-Id: Id487a57cdda55d7e2d09c3efc14c7f03f566f15a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Add the missing definition for IFF_RUNNING like
documented on http://ports.haiku-files.org/wiki/CommonProblems
Change-Id: Iea3fa224dc8e7e1e36674026efbb28289d2efa2a
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The step logic in scrollByDelta() made scrollbar position to go
temporarily outside its min/max boundaries, and then setValue()
corrected it immediately back within its bounds. The false change
notifications caused by this position vs. value ping pong caused
plenty of unnecessary updates.
Task-number: QTBUG-30316
Change-Id: I32dd5bdb7b0c578dfc5dfa1deecceb19bb98a2b3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
When changing models it makes no sense to keep the old root model index,
pointing into a possibly deleted model. Reset it to the root
of the new model is the best line of action.
[ChangeLog][QtWidgets][QComboBox] QComboBox will now reset its root
model index when a new model is set on it.
Task-number: QTBUG-43350
Change-Id: I113d558ce19fcaed31f13abfbedc7a24302e28d7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>