This change disables tests which require QtGui.
Change-Id: Ib647afd086f54536054cb4c0cde5696d762ee8c4
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
The old code converted QRectF into QRect when applying the offset. Change
the offset point to QPointF and change the conversions accordingly. Add an
autotest similar to that of QPlainTextEdit.
This minimizes rounding errors and prevents conversions since
the input method logic mostly uses qreal.
Task-number: QTBUG-51923
Change-Id: I0c2f80ccae028d8bbbb97ec603f8782f69959c76
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Determine offset point to similar to QTextEdit::inputMethodQuery()
and add an autotest.
Task-number: QTBUG-51923
Change-Id: I8232eb348063e2cd95d0632fe74a6eb30c897eda
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Subjects each *.png file that matched grep -law "sRGB" to:
pngcrush -ow -brute -rem allb -reduce
(Two needed -force but did get smaller.)
Change-Id: Ia030f0bc1d3617ba716bcc26677ff919ef58423c
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Its currently not possible to style the arrows with QCommonStyle because
drawPrimitive from QCommonStyle is called instead from the proxy.
Change-Id: I910b13df110601cb18578bc16edfa5ddaa17bbd2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The previous implementation overwrote multiple 'time' parts in the
qSetMessagePattern with the last setting in the pattern line.
%{time}%{time process}%{time boot} ended up to be output as if
%{time boot}%{time boot}%{time boot} was set.
This fix keeps the arguments of each individual 'time' part.
The same holds for multiple 'backtrace' parts. The previouse
implementation overwrote multiple 'backtrace' arguments with the
arguments of the last occurrence.
This fix keeps the individual arguments for the 'process' parts.
The individual arguments are applied in qFormatLogMessage.
A new test to verify the individual 'time' arguments application
is added, too.
Task-number: QTBUG-51944
Change-Id: Ib757614a482c5f31ed0a61b550daa2eea4b907b4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QWindowsPipeWriter doesn't write in a separate thread
anymore.
Change-Id: Id978bfdfa2531be91cce94476ab9b0dff237bd61
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Drop addSub() test. It executes exactly the union of fetchAndAdd()
and fetchAndSub(), which have already had their UBs fixed.
No need to do fixes in duplicated code.
Change-Id: Ib72caab0310fce3ff9a40c261d8a38518f91ecaf
Reviewed-by: David Faure <david.faure@kdab.com>
Commit 0307c008 removed the buffering of data-to-be-written from
QWindowsPipeWriter, because it was assumed that users of this class
(QProcess and QLocalSocket) already buffer data internally.
This assumption was wrong for QLocalSocket. The following sequence
localSocket->write(someData);
localSocket->write(someMoreData);
would not write anything on the second write.
Add a write buffer to the Windows implementation of QLocalSocket.
Task-number: QTBUG-52073
Change-Id: I6d0f03a722ec48138cbde3e2f69aae7dafe790d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The most visible problem is that changing selection model didn't update()
the view, resulting in the old selection/current item still being drawn.
In general trigger the handlers for when the selection/current item
changes.
Change-Id: Ib3b2ad70412e6a21a182d4c173e617710bcc630d
Task-number: QTBUG-50535
Reviewed-by: Stephen Kelly <ske@ableton.com>
Set input method attribute to be aligned with read-only
value in QTextBrowser initialization
Task-number: QTBUG-52071
Change-Id: If0e64bf09e2a2d505ed66fcbfb8cd12ae39844d3
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
The spawn code was only used to make QProcess work on QNX 6.5.0. Fork
works on QNX 6.6.0. The QNX spawn implementation has a flaw that causes
a deadlock in certain situations. When a working directory is specified
for the process, the QNX spawn implementation stops all threads except
the one doing the spawn so that it can temporarily change the process'
working directory. This can lead to a deadlock if the thread does
anything that conficts with something being done in a stopped thread.
QNX 6.5.0 is no longer supported in Qt 5.6.0 so we can just switch QNX
to the fork implementation and get rid of the spawn implementation.
Made a QNX specific adjustment to the hardExit test. There's a bug
in the OS that the test can run into because it does something that
normal applications wouldn't.
Task-number: QTBUG-47250
Change-Id: Ib32567d2c15ce651815858000035ac5aa6f35224
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This issue has been solved some time between 5.6 and 5.6.0.
We just make sure to protect against further regressions.
Change-Id: Ic3fdad901ed5f36792ae04b3d65047da95eea668
Task-number: QTBUG-50561
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The Qt CI does not have ninja, but the autotest can be used for manual
regression finding.
cd qtbase/tests/auto/cmake
qmake
make check
cd build
cmake . -DHAVE_NINJA=ON
ctest -R FINDTESTDATA
Change-Id: Ic3f3748f6ab04e37fa5287c59486e5cd46dcabb4
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Previously WinRT was using the UTC backend which fails on all platforms
for some QDateTime autotests related to timezone items. Hence switch to
the Windows implementation for WinRT as well.
However, the windows backend does query the registry heavily, which is
not supported on WinRT. Instead use the API version provided by the SDK.
Long-term we might want to switch to this version on desktop windows as
well, as direct registry access would not be required and we could
harmonize the codepaths for both platforms.
Change-Id: I620b614e9994aa77b531e5c34c9be1da7e272a30
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
A test should not write to its directory.
Change-Id: I34dfc36387cf5a637b325be29c8a19ff51d9b9c3
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
For platforms with builtin testdata/sandboxed platforms we need to
change the current directory to be able to create files.
Change-Id: I440205c95dd6df1308c6bf24b1b0f67fd697feab
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
tst_qtabbar uses fixed values to check the minimumSizeHint and it fails
with screens that have a higher resolution. The test still uses the
default values, but now in the beginning it creates enough tabs so that
it goes over the default.
Change-Id: I3f891d2661288d7fad50ad522d73f634b3e91958
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
QRect::center() should be defined for any
QRect(x1,y1,x2,x2), INT_MIN <= x1, x2, y1, y2 <= INT_MAX
because the average of two signed integers is always
representable as a signed integer.
But not when it's calculated as (x1+x2)/2, since that
expression overflows when x1 > INT_MAX - x2.
Instead of playing games with Hacker's Delight-style
expressions, or use Google's patented algorithm, which
requires two divisions, take advantage of the fact that
int is not intmax_t and perform the calculation in the
qint64 domain. The cast back to int is always well-
defined since, as mentioned, the result is always
representable in an int.
Fix a test-case that expected a nonsensical result due
to overflow.
[ChangeLog][QtCore][QRect] Fixed integer overflow in
center(). This fixes the result for some corner-cases
like a 1x1 rectangle at (INT_MIN, INT_MIN), for which
the previous implementation could return anything
(due to invoking undefined behavior), but commonly
returned (0, 0).
Change-Id: I1a885ca6dff770327dd31655c3eb473fcfeb8878
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The compiler can statically check that this is undefined
behavior:
tst_qrect.cpp:3173:52: warning: integer overflow in expression [-Woverflow]
<< QRect(QPoint(0,0), QPoint(INT_MAX+(0-INT_MIN),INT_MAX+(0-INT_MIN)));
~^~
tst_qrect.cpp:3173:72: warning: integer overflow in expression [-Woverflow]
<< QRect(QPoint(0,0), QPoint(INT_MAX+(0-INT_MIN),INT_MAX+(0-INT_MIN)));
~^~
Fix by skipping the test (like most of the others are
in the block).
Change-Id: I359a5e16db6c660c9f11d7dd8fbb40730bd63887
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The existing code derived a helper class from QSqlResult and
overloaded two protected functions as public ones so the test
could call them after casting QSqlResults to that helper class.
Both the cast (which is a C-style cast, but with combined
static_cast and const_cast semanics) and the following member
function call are undefined behavior.
Fix by making the test class a friend of QSqlResult, and
dropping the casts.
Change-Id: I09de2e2b46976d01cfce25892aec6ad36881d3eb
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Tested on the Ubuntu 14.04 VM. The test didn't fail anymore with
2000 test rounds
Change-Id: Ic12c60e5ebf9c234358a6983bf87fa0a88d7886e
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
A test should not write to its directory. Amends change
d0b54cede8.
Task-number: QTBUG-47176
Change-Id: If15258b4aed199792fab422b7ac1d74e22a9e322
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Suppose a client connects while the QLocalServer is still in the loop
that calls addListener. The connection would SetEvent(eventHandle),
but every call to ConnectNamedPipe would ResetEvent(eventHandle).
Thus, the connection is never detected by the notifier on eventHandle.
Callers of addListener must check the connection state of every
listener to make sure that no client connected while setting up
listeners.
Task-number: QTBUG-49254
Change-Id: Ia961927ea76973708e6e3f73510695eb5d6a0e4c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Only two tests inside tst_qstatictext required private symbols, so
we can enable the rest on all builds.
Change-Id: Id222ba01d9676c40b6447c1526ee127fcc2090d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
In one code path the test checked for the emission of a readyRead()
signal without waiting for it.
This code path was never hit, neither on Windows nor on Unix platforms.
Change-Id: Ifbe464400a2a1ba8eab49bd60315289040e6bbde
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Factor out function to check on the pixel color that
outputs a verbose message on failure.
Change-Id: I2331fe45f35327d1ff8ae547a58d93a2e6fe9184
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Signed integer overflows and underflows are undefined
behavior. A test that invokes UB tests nothing, because
the standard permits any outcome.
Fix by guarding the respective operations so
they are not executed if they would overflow
or underflow.
Change-Id: I40354ee88f40e4b47b70eac7790dc3a79ac70a57
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This warning is triggered when we try to apply the Q_DECL_HIDDEN
attribute to a class in an unnamed namespace. Such classes are
already not exported.
qobjectdefs.h:175:108: warning: ‘visibility’ attribute ignored [-Wattributes]
qobjectdefs.h:198:108: warning: ‘visibility’ attribute ignored [-Wattributes]
Added a test on gadgets (and QObjects) in unnamed namespaces,
because qtbase currently does not contain such Q_GADGETs.
Done-with: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Ic747cc2ab45e4dc6bb70ffff1438c747b05c5672
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Some embedded servers use LF to mark the end of an individual header,
but use CRLF to mark the end of all the headers. The GoPro WiFi
interface does this, as an example.
Change-Id: I227ab73622c84f439a6cf8703d020393c4d8bf69
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
As found by GCC 6:
tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp:1476:9: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
tn += ">";
^~
tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp:1474:5: note: ...this ‘if’ clause, but it is not
if (tn.endsWith('>'))
^~
Fix += argument from char[2] to char as a drive-by.
Change-Id: I814dc58830934cac7fcf81eb7fd7564b2abeb631
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
tst_qkeyevent.cpp(140): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
Change-Id: Id3e0eea125f7f7ec13f9b9428e034b922d2ce204
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
An empty read or a failed write on the underlying QIODevice of the text
stream would lead to an early return where we wouldn't correctly restore
the QIODevice::Text flag of the io device.
Change-Id: I5b632f45dea6ede3f408113556c3dad1b96574e2
Task-number: QTBUG-47176
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
A receiver of TouchUpdate and TouchEnd events is determined either
as a widget which has an implicit grab for the touch point or as a
visible widget if there are no implicit grabs. The events are sent
if the receiver has accepted TouchBegin event or if it is subscribed
to a gesture. Before sending the events to the widget they are
delivered to the gesture manager. Thus, in order to detect gestures
for the widget, it must own an implicit grab or be a visible widget.
It can happen that the parent widget is subscribed to a gesture, but
doesn't accept TouchBegin event, as in the case of QScrollArea. Then it
will not get an implicit grab and gesture detection will be impossible.
Activate an implicit grab for such widgets. Also don't send TouchUpdate
and TouchEnd to them, because it's against the documentation.
Task-number: QTBUG-43277
Change-Id: Id767583991def6d76c48ad15eb39af822cad115d
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
The data function for this test re-used listenAndConnect_data that
has an additional column "connections" which was never used in sendData.
Thus sendData executed three times the same code which is just uselessly
burned CI time.
Copied the actually needed code of listenAndConnect_data to sendData_data.
Change-Id: I6cdb1c1b72cb4ce7be7c13e90eea30ac09a14914
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Add missing slash to the prefix pointing to the temporary directory.
Change-Id: I0d00f706af58214a9922758a60d097cab7d6bc9d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Suppose the user connects QProcess::readyReadStandardOutput with a
slot that calls QCoreApplication::processEvents.
Assume the event loop did not handle events between QProcess::start
and QProcess::waitForFinished. The process writes to stdout and exits.
QProcessPrivate::waitForFinished calls drainOutputPipes which calls
QWindowsPipeWriter::waitForReadyRead. This in turn will trigger
_q_processDied via the readyRead signal and processEvents.
_q_processDied will delete the pid object and set pid to null.
After drainOutputPipes returns, _q_processDied is called again but it
must not be called if pid is already destroyed.
Prevent calling _q_processDied if pid is null.
Task-number: QTBUG-48697
Change-Id: Iee047938ee1529057a1a43d71f4e882750903c7e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Remove the member variable and instantiate only where needed
on the stack to prevent it from interfering with windows created
by other tests.
Remove flag Qt::X11BypassWindowManagerHint as it does not seem
to have any effect.
Task-number: QTBUG-51516
Change-Id: I3bf88bf148f365c57aaf989671f8b9c3c3f0d8e2
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Use default timeouts for wait functions. The increased timeouts will
only have an effect if the tests fail.
Print process errors if the process could not be started, while we're at
it.
Contract consecutive "#ifndef Q_OS_WINCE" blocks.
Change-Id: I6324e4c5b91b89ebb2580635b88705bbda922907
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Given the flakyness of cursor positioning, loosen the check to only verify
that the cursor is outside the window. The hint is only active on Windows
depending on a system setting.
Task-number: QTBUG-51516
Change-Id: I474d251cc41e68f182baf8dba84eaf38d914d7ee
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
It made us skip the rest of the test, not just the small set of
sub-tests that were conditioned by the if () in whose else it sat.
Change-Id: I5e914e0aeb9d5ba44b21966d071aaccbc590365d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
QTypeInfoQuery was introduced for 5.6 to decouple isStatic
and isRelocatable so old code continues to work. But since
this test still uses !isStatic to mean trivially-relocatable,
it will fail as soon as one of the checked types is marked as
Q_RELOCATABLE_TYPE instead of Q_MOVABLE_TYPE.
Incidentally, such a change is in the pipeline for Qt 5.7/5.8,
so fix the test by porting to QTypeInfoQuery. Do this in 5.6,
because that's when QTypeInfoQuery was introduced.
Change-Id: I06f815f26ca9b430e124c4a2f8de2a729999762b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The coordinates need to be scaled before calling QPlatformScreen::grabWindow()
On return, set a devicePixelRatio on the pixmap.
Adapt the QWidget test to scale the grabbed pixmaps.
Fixes pixeltool displaying the wrong part of the screen when High DPI scaling
is in effect.
Task-number: QTBUG-46615
Change-Id: I12de7df0da669230cf0fae74f4a42d43f061d5ff
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
As already reported in 2009 (Qt 4.6) QPrinter never actually set the
printer resolution. This change adds the necessary call to
PMPrinterSetOutputResolution (available since OS X 10.5).
[ChangeLog][QtPrintSupport][OS X] QMacPrintEngine now really sets the
printer resolution.
Task-number: QTBUG-7000
Change-Id: I3e851b62e1a7ed78564a8a6fd576b0a18d7eff63
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
The windows.h include is not needed, the enums are properly known to
the metaobject system nowadays, and qprocess_p.h already has a
QT_NO_PROCESS guard.
Change-Id: I6bbdce19f097feb8260c51a29425279049aa0192
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Do not use a loop to execute similar but separate tests in
tst_QProcess::softExitInSlots. Use separate test rows with
distinguishable data tags instead.
This way we can deduce from CI output which part of this test failed.
Change-Id: Ic9bc996f2ced11b2bb1c33c1970e64937d860976
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
When a modal window is closed and the mouse is not under the modal
window - find a proper window and send a fake enter event.
Added auto test for checking enter event on window when modal window
is closed.
Task-number: QTBUG-35109
Change-Id: I370b52d386503820ac9de21e6d05fd019ca456ec
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
First-level context menu grabs the mouse, so all mouse events are
delivered to it. This menu passes the mouse events to submenus. Any
platform delivers mouse enter/leave event differently when window is
grabbed. This patch unifies event delivery to context menus - it can
block some unwanted events and it emulates fake events if necessary.
This patch can reduce duplicated events and can provide proper enter
or leave event to additional widgets in the context menu. It can also
prevent submenu from unwanted close on Windows and X11.
Added autotest.
Task-number: QTBUG-45565
Task-number: QTBUG-45893
Task-number: QTBUG-47515
Change-Id: I7dd476d0be23afa34e947e54aef235012d173dcf
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
This test fails in distros using GNOME due to
most likely bad usage of native dialogs.
Task-number: QTBUG-51148
Change-Id: I6e539b429266e298ce413565e0191bffa7fbe6bc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The test was made insignificant for Windows in change
f3939d943e. As the failure is not
reproduceable locally, re-enable it. Also split apart the test.
Task-number: QTBUG-51149
Change-Id: I6a06bdf2369bc3bdbc73dfe4fa416e9d644f8b01
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Ensure that the window is active (as otherwise
QMdiArea::activeSubWindow() returns 0) and add a QTRY_COMPARE.
Change-Id: I7edb01d43fd2635864266614ef9a0e844f76edbf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
If the WHERE clause is used in a query involving multiple tables,
such as generated by QSqlRelationalTableModel, the table prefix
may be necessary to disambiguate column references. It is harmless
if not needed.
Task-number: QTBUG-43320
Change-Id: I39e1ab7359bf748afa8bcd8578220e3abb3ee24a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Some entries were not updated and tests failed to succeed on platforms
which need to deploy content/testdata.
Change-Id: Ieb2b44c375b04cbaaecc1fb2303cc2478b86a100
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
testdata needs to be deployed to temp and current directory
needs to be set to that directory for the test to succeed.
Change-Id: I2dd023af9073d90afbb4ad60fcfb50bb1af4e159
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
WinRT does not allow do connect to the localhost due to security
constraints and sandboxing. Hence we need to disable those
currently.
Change-Id: Idb8c71397a41e5fa5bad9d618dba1bb389e71b9c
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Blacklisting all tests, which were failing locally.
Task-number: QTQAINFRA-949
Change-Id: I40c25ab0155b8977596d61297ab252a546515f87
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
Labels would use a statically defined font for <pre> blocks.
Use the one defined by the QPlatformTheme instead, through
QFontDatabase::systemFont(FixedFont)
Task-number: QTBUG-50564
Change-Id: I5491bd0defce651bdf809bcbc6a529a900f4959b
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
A malformed bmp file header could specify a negative color table
size. The bmp handler would then return a QImage that claimed to be
valid, but actually was invalid, having an empty color table. This
would cause crash later, e.g. when attempting to paint it.
Change-Id: I7df7c40867557a82dbcee44c7de061226ff232c0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
To calculate the real count we need to use the actual fixed point
increment and can not use the floating point value increment wass based
on since it might round differently.
Includes auto-test by Gabriel de Dietrich.
Task-number: QTBUG-50153
Change-Id: Ia973088f361c90370fa20bac14a4b8f373b5d234
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Generate the qundo*.qm files for tst_QUndo*::commandTextFormat() in
the current directory (out of source, for a shadow build) rather than
alongside the qundo*.ts from which they're derived (in the source
tree); and remove them once loaded, if that succeeds. (On failure, we
might even want to look at them.)
Task-number: QTBUG-49081
Change-Id: I666985fa3ceb8c25c917b617d6d39141eddebb76
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Rename TestWidget to PaintTestWidget, because this class tests only
whether paint event occurs.
Remove unused variables.
Remove reset() method, because there is no need to reset only one
variable in class method.
Change-Id: I8f442c73598e3431baf2b0433fefc157d3f10ea6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This solves an instance where restoreState() was used when the
dockwidget was already floating and the saved state was also for
a floating dockwidget.
Change-Id: I1fe764ae2a6b0351ae26e33ffec682ad37c944d7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The QKeySequence test no longer uses private members (since commit
725bdc3fd2), so that is no longer needed.
Also, remove the unused include from the test.
Change-Id: I4d252bb3efd7282f74c44e48444c23ab51d48ea5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This reverts commit 4c71db7567.
It's too risky for 5.6, we should let it cook in dev for a while
and backport when ready.
Change-Id: I91e677e65d967f29c84a254cd3dffc8bb847b263
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
When getting the glyph runs from a QTextLayout with multiple
lines, the glyph runs would be merged if possible, but not their
bounding rects. This was an oversight.
[ChangeLog][Text][QTextLayout] QTextLayout::glyphRuns() now returns
united bounding rects for glyph runs that are merged.
Change-Id: Ibbeaa99ecfc4e82e7965342efdae7c3c2b637343
Task-number: QTBUG-50715
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Resetting focus_window and other internal QGuiApplication variables before
calling setVisible(false) and destroying the platform window means that the
platform window can't reason about whether or not it was the focus window
unless it can resolve that using native APIs. We should let the platform
window take care of resetting the focus window and related states, and
only execute our fallback logic if the plugin doesn't do the right
thing.
We also use QPA to update the state instead of modifying the internal
QGuiApplication variables directly, so that events and signals are
emitted as a result of the reset.
The QLineEdit test gets two added calls to processEvents(), since
assuming that activateWindow() is synchronous is not correct, and
would result in the QMenu resetting the focus window to 0 on destroy.
Task-number: QTBUG-46414
Change-Id: I562788393ed0ffd77d7a4be2279862322f721c1a
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
We have to make sure that the plugins to be tested are located inside
the virtual sandbox / relative to the application binary. Launching via
winrtrunner, a test can find those plugins then. It is not possible to
those via TESTDATA and extract them to temp, as LoadPackagedLibrary only
loads inside the sandbox.
Unfortunately this also implies that running those tests inside Visual
Studio will fail, as Visual Studio copies the virtual sandbox to another
location missing the plugins. For automated testing this should not
matter though.
Change-Id: I70f5ef2d56b3cf526b731fd885f12583c8f6e103
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Parse the requested family before we're looking/saving into the cache,
thus hitting the cached EngineData for:
* quoted family names (eg. QFont("'Arial'"))
* non-simplified family names (eg. QFont(" Arial "))
* substituted family names (\sa QFont::insertSubstitution())
* explicit fallback list, where possible (eg. QFont("Tahoma, Arial"))
This also improves the cache hitting for the font engines in some cases.
Change-Id: I18cdc3e8d669cccec961f84e9b27329402e2b7ed
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Setting conflicts to isSet & DaySection cleared it if we hadn't seen
the day stipulated, even if there had been a conflict (e.g. over year)
before we hit the day-of-week that didn't match the (unset, so
defaulting to) 1st of the month. Explicitly test for conflict and
only set conflicts (to true) if there is a conflict. Added regression
test.
Change-Id: I7363eb66a8bb808d341738d14969039834f50db8
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
We depend on the assumption QFontCache::findEngine(key) for key.multi=1
returns a font engine of type QFontEngine::Multi;
guarantee that by checking it in a single place.
Change-Id: I287da4fd62deb22fc5520cde5b0505bc44547609
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
When the window container already has a window handle, allow embedded
windows to use this handle as a parent. This change will allow proper
window stacking and clipping.
Task-number: QTBUG-50477
Change-Id: I8d656ecb99e0c42ae7a7ac461e5e5b5d801f5493
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This test ensure that a connection made to either an invalid host or an
unreachable host fails properly.
Task-number: QTBUG-47452
Change-Id: If31d23d815e496fc21ef2e1e19c34c2723bd3504
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Uses a time derived via .toUTC() to ensure the .toLocalTime() comes
out at the time we expect.
Task-number: QTBUG-49008
Change-Id: I2005127929c7eab1b7a3cbaba8d21df8c9585d17
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QDateTime::toString for Qt::TextDate unconditionally uses the system
locale (because QDate::shortDayName and QDate::shortMonthName do).
Setting the default QLocale has no effect. If you ask me, those two
QDate methods are buggy, but they are documented that way.
Change-Id: I408dcb81ba654c929f25ffff1427366b04da5a43
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Both constructors were taking a pointer, so they participated in
overload resolution along with QTextDocument and QTextFrame pointers.
Instead, make them take references and move them to the private section
of QTextCursor. That necessitated adding a method to QTextCursorPrivate
to access that private constructor from non-friend classes.
Change-Id: I7e6338336dd6468ead24ffff1410e3bc534d77dd
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
msvc2015 reintroduced a couple of functions from the win32 API
towards WinRT.
Enable usage of those and simplify the file system engine.
Furthermore update the autotests.
Change-Id: I9eafffba0ddfd05917c184c4a6b9e166f86d71d9
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
It's possible to configure an interface so that it isn't the case. I have
no idea if this is a valid scenario, but the unit test shouldn't enforce
that.
ip addr can report:
inet 192.168.1.1/32 brd 192.168.1.255 scope global vlan0
valid_lft forever preferred_lft forever
Change-Id: I8de47ed6c7be4847b99bffff141c337575760bd9
Reviewed-by: Richard J. Moore <rich@kde.org>
The important one is EET, for the benefit of our CI system; but other
European zones and the USA's coastal zones likely have enough hackers
in them to make this worth checking.
Change-Id: Idcc703bce29808e1a0a6279680cc8d3cbed38dac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>