Testcases and benchmarks are rather different entities. You won't usually want
to run benchmarks in the same environment you are wanting to run tests in,
so this feature allows to differentiate between the two.
We also add a "benchmark" make target (similar to check), which runs all
configured benchmarks.
Change-Id: I33759ce44c34e42a6a3a88f34e7b9c4372380721
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I975ee556913707e8595b2a89f1bba4299187bcfb
Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Add missing slash to the prefix pointing to the temporary directory.
Change-Id: I0d00f706af58214a9922758a60d097cab7d6bc9d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
RFC 2045 mandates case-insensitive comparison for MIME type and subtype.
Fixes numerous warnings appearing when dumping the database on
Ubuntu 14.04.1 LTS:
Got name "application/vnd.ms-excel.sheet.binary.macroenabled.12" in file "application/vnd.ms-excel.sheet.binary.macroEnabled.12.xml" expected "application/vnd.ms-excel.sheet.binary.macroEnabled.12"
Got name "application/vnd.ms-excel.sheet.macroenabled.12" in file "application/vnd.ms-excel.sheet.macroEnabled.12.xml" expected "application/vnd.ms-excel.sheet.macroEnabled.12"
Got name "application/vnd.ms-excel.template.macroenabled.12" in file "application/vnd.ms-excel.template.macroEnabled.12.xml" expected "application/vnd.ms-excel.template.macroEnabled.12"
Got name "application/vnd.ms-powerpoint.presentation.macroenabled.12" in file "application/vnd.ms-powerpoint.presentation.macroEnabled.12.xml" expected "application/vnd.ms-powerpoint.presentation.macroEnabled.12"
Got name "application/vnd.ms-powerpoint.template.macroenabled.12" in file "application/vnd.ms-powerpoint.template.macroEnabled.12.xml" expected "application/vnd.ms-powerpoint.template.macroEnabled.12"
Got name "application/vnd.ms-word.document.macroenabled.12" in file "application/vnd.ms-word.document.macroEnabled.12.xml" expected "application/vnd.ms-word.document.macroEnabled.12"
Got name "application/vnd.ms-word.template.macroenabled.12" in file "application/vnd.ms-word.template.macroEnabled.12.xml" expected "application/vnd.ms-word.template.macroEnabled.12"
Change-Id: Ie2a427069024080302a95ac46a456288787542c4
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
When reading from the registry, sometimes the string is not null
terminated. In order to fix this, the preallocated QByteArray size
is increased, so that there are guaranteed enough terminating \0
[Windows] Not null terminated strings are now read properly from the
registry
Change-Id: I95fdf42cbbb7074fcf010dd14d0241f02d3c412b
Task-number: QTBUG-51382
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Since the filter can either be something like "*.txt" or "Text Files
(*.txt)" then it should have the suffix default to "txt" in both cases.
Change-Id: I36a72f5bf0fb12c84db103f91c4fca94d0d933ae
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
waitForConnected() could return 'true' even when the socket was
disconnected.
Change-Id: I99d9c9730f4e9b6c8a54696eb92c24c3ef36d261
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
This happens in one particular case: when the touchpoint corresponding
to the last slot is reported as released and a new point is reported
as pressed right after, so that both events happens within a same sync.
In this case, there will be two ABS_MT_TRACKING_ID events received,
first with -1 to report the released touchpoint, then with a new id
to report the pressed touchpoint, then the SYN_REPORT afterwards.
This results in m_contacts[m_currentSlot].state being updated to
Qt::TouchPointReleased then Qt::TouchPointPressed, with the former never
being reported during the handling of SYN_REPORT.
To handle this scenario we need to inspect m_lastContacts for a change
in tracking id for a particular slot combined with a non-null state,
indicating that slot has not yet been reported released and processed
in the previous sync. (the state for processed released points is reset
to zero at the end of the SYN_REPORT handler)
Task-number: QTBUG-51563
Change-Id: I01493008cf9f267e758d974dab29556d0a1425ea
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Both subscribeToNotification() and unsubscribeFromNotification() are missing PQclear calls
to free PGresult.
Task-number: QTBUG-51412
Change-Id: I72ec3438b22bc99205c984b67b922766bcdbed08
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Fix tst_qwindow::testInputEvents() to pass when High DPI scaling is in effect.
FAIL! : tst_QWindow::testInputEvents() Compared values are not the same
Actual (window.mousePressLocalPos): QPointF(6,17)
Expected (local) : QPointF(12,34)
.\tst_qwindow.cpp(771) : failure location
Task-number: QTBUG-46615
Change-Id: I1ccacc807f3390b6ab26a369d13fd7896e64cbca
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
If the image was unable to do the smooth scaling due to running out of
memory then it will return a null QImage, so this should be checked before
copying the data to prevent a crash.
Change-Id: I82a6443ce2d701c45110b5dd3c5ed4813d078312
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
currentInterface.serviceActive is relatively expensive and causes
significant spikes in cpu load. Luckily, we can easily memorize
the result.
Change-Id: Ic7983b63bba5507bc1e34b0644e73365dc44f200
Task-number: QTBUG-45798
Task-number: QTCREATORBUG-15741
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
under certain conditions, a WM_ERASEBKGND message is sent, to a window
without update region. in this case we declare the message as 'handled'
to avoid flickering.
Task-number: QTBUG-48235
Change-Id: I2ed27e020db4b54ec93a445cb219de00f38a62fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Inherit the type-classification from the underlying type.
This amends commit 4889269ff0,
which introduced a QVector<QJsonPrivate::offset>, but failed
to mark the payload as primitive.
Change-Id: I525a0456a550e0694b33b36b4aa71475aeac192b
Reviewed-by: Lars Knoll <lars.knoll@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>
Remove outdated static functions to convert touch points and use
QWindowSystemInterfacePrivate::fromNativeTouchPoints().
Fix tst_QWidget::underMouse() to pass when High DPI scaling is in effect.
.\tst_qwidget.cpp(9000) : failure location
FAIL! : tst_QWidget::underMouse() 'childWidget1.underMouse()' returned FALSE. ()
.\tst_qwidget.cpp(10161) : failure location
Task-number: QTBUG-46615
Change-Id: Ie73dba610da357e7be396f2ea0229987f7503462
Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
This issue is reproducible on OS X when using a Magic Mouse
or a combination of Magic Trackpad and regular mouse. In these
cases it's possible to start a scrolling gesture on one widget
and move the mouse cursor over another widget.
Although we send the wheel event phase information, we never
made any use of it. This means that a widget would start
scrolling even though it never received a ScrollBegin event.
In this patch, we make sure the scrolling cycle is respected
and that once a widget starts scrolling, it'll be recieving
all the wheel events until a ScrollEnd event reaches the
application.
For those input devices not supporting a proper phase cycle,
we introduce a new (undocumented) phase value, NoScrollPhase.
If the wheel event phase is NoScrollPhase, then we ignore
the current scroll widget and proceed as usual. This value
is the default for wheel events. It's up to the platform
plugin to set the proper phase value according to the data
received from the OS.
Finally, we fix a few of QWheelEvent constructors to properly
initialize the phase and source properties.
Task-number: QTBUG-50199
Change-Id: I3773729a9c757e2d2fcc5100dcd79f0ed26cb808
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
`ar' tool from latest binutils shows warning:
ar error: `u' modifier ignored since `D' is the default (see `U')
Warning message includes word "error" so QtCreator processes it as
error in UI.
`ar' command-line option `u' might be dropped safely because it is
unnecessary. Option `c' is added to suppress extra `ar' warnings.
Other build systems are also affected. For example, automake:
https://bugzilla.redhat.com/1155273
Change-Id: Ia378b720503d93b0c0c12ae7a5f38f4d7c32eee5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
Use mapToGlobal() only for foreign windows passing relative coordinates.
Amend change 9915630d08.
Task-number: QTBUG-50206
Task-number: QTBUG-51320
Change-Id: Idee60cc8ea8004c0355ce78a00f807798836b49c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@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 source argument can be nullptr, e.g. if debug information
has been stripped out.
Task-number: QTBUG-51195
Change-Id: Ie229c82278c420200cad33c19e8c3f52ab7f12c3
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Introduce C++ casts and add some conversions. Where possible, increase
const-correctness. Remove trivial conversion function
BSTRToQString().
Task-number: QTBUG-50804
Change-Id: I1820d4693db8bc0dfa6c4a5fecd768cf64a4405c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Introduce a convenience function for allocating arrays and use
algorithms.
Task-number: QTBUG-50804
Change-Id: Iead75f8297923fd13efcfc7987f76262777d074b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
QWindowsIA2Accessible does not implement IAccessibleRelation (found
when replacing the C-style casts by static_cast<>). Remove the
corresponding branch.
Task-number: QTBUG-50804
Change-Id: I80901634044f85e413666f34b91be2e6ad70da91
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Use GET_WHEEL_DELTA_WPARAM() instead of HIWORD and casting.
Fix breakage introduced by b20548f999 .
Change-Id: I11bd97d73c12d72e824e3f769e9c402975f27d48
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Windows 10: SHGetFileInfo() (as called by item views on file system
models has been observed to trigger a WM_PAINT on the mainwindow
for totally obscure reasons, causing a recursive repaint. Suppress
this by running it via QThreadPool.
Task-number: QTBUG-45298
Task-number: QTBUG-48823
Task-number: QTCREATORBUG-14888
Change-Id: I7479102b9b8fb0771681260298c3d735e66f220f
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.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>
Other platform menu implementations check that the index is not out of
bounds, so make QDBusPlatformMenu::menuItemAt() do the same.
Change-Id: I1d2e42681f2dbfff8b80044141d620bddbc3b6aa
Task-number: QTBUG-51372
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.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>
Two related errors: When a non-existent font was set on
the font dialog, the GTK native font dialog would just pick
a default one. Also, if the font size was specified with
pixel size, we would request -1 as the point size from
Pango.
The fix for both is to resolve the font before applying
it to the font dialog, and set the actually resolved family,
as well as point size. Note that if the point size is
explicitly set, then we pass this to the font dialog,
since the one returned by QFontInfo will always be
calculated based on the (rounded) pixel size, so it will
usually not match the request.
This fixes tst_qfontdialog::setFont().
[ChangeLog][GTK2][Dialogs] Fixed requesting a font from
font dialog with a non-existent family name and/or pixel
size.
Task-number: QTBUG-51148
Change-Id: Id9c783407778546b0cf3f9c3ab19f124e76c878e
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
When mouse events are delivered using XInput2 then the wheel event is
missing on submenus, because XInput2 delivers the wheel event only to
the root menu.
Task-number: QTBUG-50996
Change-Id: I757c0b5e3aea4606d2e45dfc8180c263e02167ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@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>
This is a partial revert of fef629cd91.
When doing the original fix, I didn't realize that there was a
mechanism for disabling specific OpenType features in Harfbuzz.
This commit reverts the hack to disable GSUB completely and disables
the ligature features instead.
Task-number: QTBUG-44393
Change-Id: I30f0080eb3897f37219df7f2d50843f3a4556e13
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>