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>
(cherry-picked from qtbase/e9ad46ed412987e3e46c5a641e5f30408b97ac90)
Since we don't configure HB-NG via its configure script, we have to
define all optional switchers we do care about by our own.
Some of these switchers were missing in harfbuzz-ng.pro, causing
HB-NG to be built with no threading support.
Task-number: QTBUG-43850
Change-Id: I0944a68fe0bfae3306a3e6085e25704f0d0d0efc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The NSStrings return by QString::toNSString are autoreleased;
manually releasing them is not correct. The test still
works (no leaks or double deletes) since there is no
autorelease pool in place when running it.
We don't want to encourage incorrect usage: remove
the release call an add an autorelease pool.
Change-Id: Ic566fd3a8efd6cbc0eb6db850248a68bfc8fed0b
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
The old harfbuzz code path is included as a fail safe for any
possible use case where the Harfbuzz-NG regresses, but because the
variable was checked statically, it was not actually possible to
build a releasable executable which employed the work-around.
Instead we use the regular global static pattern where the variable
is queried the first time it's needed.
Task-number: QTBUG-43850
Change-Id: I9ade76bf0825bbfefebdbdc4e6ee5571f1a3deec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Delay initialization/GL detection until a surface is requested.
Remove member variable from window and access static context
from QWindowsIntegration only.
Task-number: QTBUG-43832
Change-Id: I4b9a324b58af4399df5c314bfb2b952455b1e080
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
The code makes usage of _fileno without including the appropriate
header, which is stdio.h according to Microsoft:
http://msdn.microsoft.com/en-us/library/zs6wbdhx%28v=vs.120%29.aspx
Task-number: QTBUG-43900
Change-Id: Ic9d407c66243d64823353a1c7e79cf0825c735db
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
[ChangeLog][Widgets][QMacStyle] Fixed a possible divide by zero crash.
Task-number: QTBUG-43398
Change-Id: I8b5c6fd87d07eb42ad43e8c2405b7cad19372b86
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Fixes an issue where under certain circumstances, QSslSocket could get
stuck in a state where it would disconnect immediately after starting
encryption. Since it doesn't make any sense for the socket to be
initialized to a state where any connection attempt will fail, the
pendingClose value should be set to false.
Thanks to Martin Sandsmark for his help debugging this issue.
Task-number: QTBUG-43793
Change-Id: I7deebacbac588c21439a8e594db4222095cf3f22
Reviewed-by: Richard J. Moore <rich@kde.org>
Fix regression introduced by e4becdc3d3
Add QPlatformDrag::ownsDragObject() function, QDragManager can use the
return value of this function to decide if it should take care of deleting
QDrag object or platform plugin will take care of deleting QDrag.
XCB platform plugins uses async dnd data delivery mechanism. It allows
user to drop something and then continue working with the assurance that
the target will get the data regardless of how slow the network connections
are, which means that a source window should preserve QDrag data until
dnd has finished.
Change-Id: I1fbad7380cddec98b756698993dd397409833150
Task-number: QTBUG-43436
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Apparently on some cards, that only provide OpenGL 1.4,
the check for OpenGL 2 specific functions is not sufficient
(presumably some old extensions provide the functions and so
the test passes, even though it really shouldn't)
To avoid crashing the apps later on, we should check the
context version and activate the fall back to ANGLE if it's
below 2.0.
Task-number: QTBUG-43870
Change-Id: Id0e3d8ad1f632334ba03bbb1a4802413f28436dc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.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>
Since openssl 1.0.1k with enabled option no-ssl3-method we need to
check for OPENSSL_NO_SSL3_METHOD to use following functions:
- SSLv3_method
- SSLv3_server_method
- SSLv3_client_method
Change-Id: Iee83a6f4bacbf5660baa6bdb89eb02ceb9f11614
Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
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>
Check and warn in that case.
Change-Id: Ic513334b5aa48e1c7e44685c30da3e9be52c3c52
Task-number: QTBUG-43833
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Introduce flags for the renderer type and move code to
qwindowsopengltester. Introduce
QWindowsOpenGLTester::supportedGlesRenderers() where type-dependent
checking can be added.
Change-Id: I4bbffaf861cb0fdbea0919e081e3626fb5a872de
Task-number: QTBUG-43263
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Compile qwindowsopengltester on all platforms and add struct
GpuDescription with detection method based on IDirect3D9 (dynamically
loaded).
Expose as a QVariantMap-property to QWindowsNativeInterface to be
able to access it from qtdiag.
Task-number: QTBUG-43263
Change-Id: I3c6cd0bbbe36465e0e05f7064ecfc943d6ea4101
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Bump copyright year in tool output and user visible strings to 2015.
Change-Id: I9b29907fe3f555e78005cb296a49d92f601fb7ec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.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>
Wheel events should not cause a popup widget parented on a scrollable
widget to be closed or moved to correctly reflect the system behavior
on OS X and Windows.
Task-number: QTBUG-42731
Task-number: QTBUG-40656
Change-Id: I4ef75aa8331390309c251316ac76db2cf9ec51f7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Moved doc D-Bus Viewer from qdbusviewer.cpp to qtdbus-index.qdoc
Doc moved from qttools to qtbase
Task-number: QTBUG-43537
Change-Id: I718781a8f5029f64fea0f2be241b4d584cc8bfce
Reviewed-by: Martin Smith <martin.smith@digia.com>
Some of these tests are verifying things that are not supported
on Android, so we XFAIL these cases when we see the appropriate
error message.
Change-Id: I8245266f061c902515bb12251521159a8e19bfb7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Calculate the logical DPI independently per screen, but
only when auto dpr is enabled.
Using a constant DPI value for all screens, based on the combined
geometry is arguably incorrect, but changing this now will
cause pixel-size fonts to behave visibly different from point-size
fonts when moving the window to a different screen.
However, with QT_DEVICE_PIXEL_RATIO=auto, the pixel size fonts are
already changing when the devicePixelRatio changes. Without this change,
the point-size fonts will *not* adapt, which is a clear bug.
Task-number: QTBUG-43713
Change-Id: I3e71618f9d55b7828ccd70b69a7b7ce656c69d65
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>