Commit Graph

36000 Commits

Author SHA1 Message Date
Paul Wicking
7f7ceb567f Doc: Add references to QDBusAbstractAdaptor implementation example
Adding references where applicable, as removed by
023a818738 when removing stale example.

Add example run snippet to the example landing page.
Remove stale example qdoc file that is superceded by current example.

Task-number: QTBUG-69191
Change-Id: I62dc66edc86da5efb4c79fd124edb2fa619aeb6b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-29 05:16:04 +00:00
Eirik Aavitsland
e5b3db841d Fix: bad-looking scaled rendering of painterpath in OpenGL paint engine
For performance, the triangulation of a painter path is stored for
reuse. Re-triangulation was only done if the path was to be painted at
a significantly different scale AND it contained a curve (bezier)
element. But also the triangulation of a path with only straight lines
can lose precision if rendered at a small scale, and so look bad when
used at a higher scale factor.

Fix by removing the mentioned curve element condition.

Task-number: QTBUG-68873
Change-Id: Id3492514e9382a5828377b7bafea8cfac7b850a6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-06-28 14:28:53 +00:00
Kai Koehne
80a550dd79 Replace LGPL licenses in .qdoc files with FDL
.qdoc files should only be licensed under FDL (for documentation) or
BSD (if they only contain code).

Change-Id: I2a8a5b2c7bd3f927b8f71506c3672bc4916aca1e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-06-28 10:22:06 +00:00
Andre de la Rocha
3d867b84a3 Fix automatic showing/hiding of the Windows 10 on-screen keyboard
The automatic showing/hiding of the built-in on-screen keyboard in
touchscreen-based Windows computers, like the Microsoft Surface line,
has stopped working after recent Windows updates. The OSK no longer
seems to rely on UI Automation properties to detect text widgets.
However, it can be triggered by showing an invisible caret.

Task-number: QTBUG-68808
Change-Id: Ia604d21e314965dcdc61f1ced050cc3ed771f567
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-06-28 09:28:57 +00:00
Paul Wicking
023a818738 Doc: Remove old and broken QDBus adaptor example
Task-number: QTBUG-69091
Change-Id: I991a5bc01c316a5e23204550618d730af755292c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-28 07:37:25 +00:00
Mårten Nordheim
d5fd308d1f Android: Blacklist tst_QPainter::textOnTransparentImage
Task-number: QTBUG-69166
Change-Id: I16289801ff64b09894a5379a584270b53ad7e105
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-28 07:33:15 +00:00
Mårten Nordheim
626ab2ab89 Android: Blacklist some cases in tst_qwindow
Task-number: QTBUG-69154
Task-number: QTBUG-69155
Task-number: QTBUG-69156
Task-number: QTBUG-69157
Task-number: QTBUG-69159
Task-number: QTBUG-69160
Task-number: QTBUG-69161
Task-number: QTBUG-69162
Task-number: QTBUG-69163
Change-Id: Ie44de7fd3f4871bebcaadcc4a8735bf47692ea49
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-28 07:33:15 +00:00
Mårten Nordheim
8757e6fee1 Android: Make tst_qfile pass
By disabling the "stdinprocess"-related tests/code...

... but differently. After fixing my earlier mistakes I'm getting
segmentation faults when it executes a couple different library calls
after the QProcess object has started.

Task-number: QTBUG-68596
Change-Id: Id42a1f939c000754a187dee90c4a4cdfec816232
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-06-28 07:31:27 +00:00
Mårten Nordheim
d420987d54 Android: fix tst_qlogging
The "app" subfolder was already excluded in the .pro-file but Android
supports QProcess, so lets include it in the build. Unfortunately it
currently has trouble and crashes (the child process or both processes).
So we skip those tests.

Task-number: QTBUG-68596
Change-Id: I2e6d0869c408bf08b22c02145db8ce522c64c617
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-06-28 07:29:30 +00:00
Mårten Nordheim
568ee7da5a Android: Pass tst_qlocale
To make it run we make sure it finds the syslocaleapp, however since it
causes a crash we skip the test that uses it...

"formatTimeZone" was failing, but it is the exact same issue as in
e08ba34f26, so we solve it the exact same
way.

Change-Id: Ifd5c796735775dad94acf55210cf18c0f4d375ca
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-06-28 07:27:22 +00:00
Mårten Nordheim
6ee26c543e Android: Pass tst_QUuid
Same issue as has been seen a few other places: path to executable being
wrong, and then a crash when the paths are fixed.

Change-Id: I77a596c6e52d2a02a69a6b9dfe91f878b3ffe07c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-06-28 07:12:47 +00:00
David Faure
8a73085a0d QSortFilterProxyModel unittest: add test for filtered-out-after-setData
The row names for this test were very unspecific.
After reverse-engineering what they are testing, I gave them proper
descriptive names, which allowed me to notice that there were tests
for "filtered in after sourceModel->setData" but not for
"filtered out after sourceModel->setData".

Change-Id: Ib79108db803ae77fb65d29cf0c0ef96c26655980
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-06-28 07:00:00 +00:00
Paul Olav Tvete
9f1568d18c Fix QtWayland non-toplevel in-source builds
Tell qtwaylandscanner to export the symbols when we're building a
module. This is done by specifying the include directory on the
qtwaylandscanner command line.

Task-number: QTBUG-68773
Change-Id: Ib575222261831ab01eb43e6c7caefb07e314492b
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-06-27 18:58:41 +00:00
Mårten Nordheim
7995540292 tst_qthreadpool: Skip "stackSize" if unsupported
If you're on a Unix platform which don't have the necessary defines then
the thread will never be launched due to an error. Skip the test
instead.

Change-Id: I83159988b8f330a750c7aa328a8805e4fa478070
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-06-27 17:40:28 +00:00
Oswald Buddenhagen
9fde782695 configure: permit digits in variable assignments on the cmdline
Change-Id: I21e4f93b119d28fe30cb2436c76a03b67c78fe7a
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-06-27 17:22:02 +00:00
Tor Arne Vestbø
9050ce4ff5 macOS: Guard non-reentrant uses of NSOpenGLContext
NSOpenGLContext should be re-entrant, but is not in practice, resulting
in deadlocks when there are two render threads, eg:

 thread #23, name = 'QSGRenderThread'
    frame #0: 0x00007fff5c6dda4e libsystem_kernel.dylib`__psynch_mutexwait + 10
    frame #1: 0x00007fff5c8a5b9d libsystem_pthread.dylib`_pthread_mutex_lock_wait + 83
    frame #2: 0x00007fff5c8a34c8 libsystem_pthread.dylib`_pthread_mutex_lock_slow + 253
    frame #3: 0x00007fff31ebb52e AppKit`flush_notify + 110
    frame #4: 0x00007fff3e75ee2a GLEngine`glSwap_Exec + 186
    frame #5: 0x00007fff3e740797 OpenGL`CGLFlushDrawable + 59
    frame #6: 0x00007fff31ad43ac AppKit`-[NSOpenGLContext flushBuffer] + 27
    ...

Task-number: QTBUG-69040
Change-Id: I6f28b4cc5faf61ae93f66353ce2abdf8c223d994
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-06-27 16:25:18 +00:00
Alexander Volkov
4d73ab73c8 Return a correct filter from QFileDialog::selectedMimeTypeFilter()
QFileDialog::selectedMimeTypeFilter() returns either an empty
filter in the case when a platform file dialog doesn't implement
mime type filters, or initiallySelectedMimeTypeFilter() in the
case of Qt's file dialog. In both cases the result is incorrect.

Make it return a mime type filter corresponding to a selected
name filter. As a result, tst_QFiledialog::setMimeTypeFilters()
has to be fixed: QFileDialog::selectMimeTypeFilter() can't select
a name filter for an invalid mime type, and "application/json"
is not supported by RHEL 6.6, so replace it by "application/pdf".

Change-Id: I58d3be860a9b5e8a72cba86d74b520178115a812
Reviewed-by: David Faure <david.faure@kdab.com>
2018-06-27 12:14:44 +00:00
David Faure
4af292fe51 QAbstractItemModelTester: don't call match(QModelIndex(), ...)
The documentation for match() indicates that the index has to be valid
since it determines which column to search in (in addition to "from
which row"). So call match with a valid index, if the model isn't empty.

Change-Id: I5f3754cf14d053bf04d207cefe7dcc938e0f4a5a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-06-27 10:12:01 +00:00
David Faure
27ea5a65dd QAbstractItemModelTester: fix out-of-bounds index() calls
When removing rows, the tester is looking at the data of the row
"just before" and the row "just after" the removed rows, to see if
they are still the same at the end of the removal operation.
Guard this with bounds check, in case there is no row just before
or just after.

This is the opportunity to use modeltester in tst_qidentityproxymodel,
which was already a testcase for removing the only row in a given parent.

Change-Id: Iec8228c16b9c670b794e2665356d153679178494
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-06-27 10:11:35 +00:00
Erik Verbruggen
74be42ca59 ItemModels: Cache last-known child index
Instead of caching the last index of a search for a child item, cache
the index of the child in the child item. When the item model is not
changed, the index is valid. Otherwise, the index can only change when
items get inserted or removed before the child. So in that case, start
searching in the vicinity of the previously known index.

As an example: a selectAll() on the view will always hit the cached
index, so no search is performed for any item in the model/view.

Task-number: QTBUG-61368
Change-Id: I85d085299987237fae23451d9e8bbb6060464ef2
Reviewed-by: David Faure <david.faure@kdab.com>
2018-06-27 10:01:07 +00:00
Erik Verbruggen
e3a1b18bc3 ItemModels: search for the child index in 2 directions
Previously, the search for the index of a child was done by searching
forwards (minus 2) from the last search, and subsequently backwards when
it wasn't found. This would cause quite some searching in models with
lots of items, and where the child lay before the last search.

We still assume that subsequent searches for children are "nearby" the
previous search, but instead of first searching forwards and then
backwards, do the search in both directions.

Task-number: QTBUG-61368
Change-Id: Idb549c2d02840632cd658f906816ce911f3ff8bc
Reviewed-by: David Faure <david.faure@kdab.com>
2018-06-27 10:01:02 +00:00
David Faure
528a16b00e QAbstractItemModelTester: add missing includes
The code (in macros) uses these classes, so the header should ensure
they are defined.

Change-Id: Ic68fa5559b7c0481927b47775b9cb7da12be7979
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-27 08:19:40 +00:00
Mårten Nordheim
3079b3433d Android: tst_qtimezone: Blacklist a bunch
Task-number: QTBUG-69122
Task-number: QTBUG-69128
Task-number: QTBUG-69129
Task-number: QTBUG-69131
Change-Id: Ida626a6675764e9554785b5e56cfba3ab7206f17
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-27 07:52:26 +00:00
Mårten Nordheim
da82bfd823 Android: tst_QTimeZone::transitionEachZone: skip 2 zones
When testing zones "America/Mazatlan" and "Mexico/BajaSur" the test
crashes from an assert. Skip testing the zones for now.

Task-number: QTBUG-69132
Change-Id: I595089647792e9a2c094d63cb837584b8cdc9cb9
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-27 07:52:10 +00:00
Friedemann Kleint
a8a0dffd1f Windows QPA/GL: Fix build with MinGW/g++ 8.1 x64
Fix warnings about invalid function type casts (return types
conflicting with the PROC returned by wglGetProcAddress()) like:

qwindowsglcontext.cpp:1250:138: error: cast between incompatible function types from 'PROC' {aka 'long long int (*)()'} to 'GLenum (*)()' {aka 'unsigned int (*)()'} [-Werror=cast-function-type]
         m_getGraphicsResetStatus = (GLenum (APIENTRY *)()) QOpenGLStaticContext::opengl32.wglGetProcAddress("glGetGraphicsResetStatusARB");

by introducing nested casts.

Task-number: QTBUG-68742
Task-number: QTQAINFRA-2095
Change-Id: I7c51836f2b9f7e2a6fa17c5108d59b23c42fb99d
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2018-06-26 18:10:42 +00:00
Paul Wicking
6f53c2bc96 Doc: Fix typo
Task-number: QTBUG-69093
Change-Id: Ica63482251b2a614a17a996fac9bcc16b96c200f
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-26 12:56:04 +00:00
Johan Klokkhammer Helsing
a7730793be wayland-scanner.prf: Remove special-casing for generated headers
Generated headers can now be installed using inject_headers and private_headers
instead.

Change-Id: I51d98e2e05d12aa9f6ab09f8ccb12b81a0c0cd6f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-06-26 12:30:43 +00:00
Mårten Nordheim
6934be03fe Android: Blacklist various cases in tst_QLineEdit
Task-number: QTBUG-69111
Task-number: QTBUG-69112
Task-number: QTBUG-69113
Task-number: QTBUG-69114
Task-number: QTBUG-69115
Task-number: QTBUG-69116
Task-number: QTBUG-69118
Task-number: QTBUG-69119
Change-Id: I424cb472e97bd427e800ee230e0e57d763d1b8a6
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-26 08:06:10 +00:00
Mårten Nordheim
531f950226 Android: Blacklist a few cases in tst_qgroupbox
Task-number: QTBUG-69084
Task-number: QTBUG-69083
Change-Id: Icf218795f81f01a559094cf2088f53a9fd597c24
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-26 08:06:04 +00:00
Mårten Nordheim
afa2d38a89 Android: Blacklist tst_qframe::testPainting
It causes most of the fails seen on Android.

Task-number: QTBUG-69064
Change-Id: I2f97fea41ee78e7962b8c34ed996bbe4bcb88732
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-26 08:06:03 +00:00
Edward Welbourne
cffa010d42 Kludge round Android's ignorance of some esoteric time-zone transitions
Skip a few tests that Android's time-zone information doesn't suffice
to get right.

Task-number: QTBUG-68835
Change-Id: Ibf8d213c96b29d74fc478a0ede686ae52b5200fb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-06-26 08:05:17 +00:00
Paul Wicking
4d326555ab Doc: Add Hello GLES3 example
Task-number: QTBUG-67109
Change-Id: I55135264a63b78502b300de723a25b3f363af58b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-26 07:58:39 +00:00
Kari Oikarinen
1049d3f9db tst_QTimer: Replace unconditional qWait()s with QSignalSpy
Where possible. Sometimes the replacement is QTRY_COMPARE instead.

Also don't use QTestEventLoop directly when it can also be replaced with
QSignalSpy use.

Remove the TimerHelper class, since its uses can be done with QSignalSpy (and a
lambda when remainingTime is checked). Although checking static single-shot
timers still needs a target object, so use a stripped down version in those
tests.

remainingTimeDuringActivation() was not actually testing the repeating case, but
single-shot case twice, so fix that. In the repeating case the remaining time is
exactly 20 ms on my machine, but QEMU emulation seems to be slow enough for time
to advance before the lambda is executed, so relax the conditions.

Task-number: QTBUG-63992
Change-Id: Iae92ff7862a13d36e695eec63b54403ec872f2b4
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-06-26 05:51:15 +00:00
Alexander Volkov
c5307203f5 Fix interaction with the menu bar on touchscreens
Ignore synthesized mouse move events whithout the left mouse
button pressed. We receive such mouse move event on touch
before the mouse press event, it causes the menu to show
and then the subsequent mouse press event closes the menu.

Also don't propagate mouse events after closing a popup
to another popup, because they may close the latter one.

Change-Id: I50a2d9b57da63d33ffe416161a09f1696d65c88f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-06-25 16:45:07 +00:00
Friedemann Kleint
e21d1d3856 QtCore/QtNetwork/QTestlib: Fix build with MinGW/g++ 8.1 x64
Fix warnings about invalid function type casts (return types
conflicting with the FARPROC returned by GetProcAddress()) like:
corelib\global\qoperatingsystemversion_win.cpp💯48: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'RtlGetVersionFunction' {aka 'long int (*)(_OSVERSIONINFOW*)'} [-Werror=cast-function-type]
io\qlockfile_win.cpp:158:85: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'GetModuleFileNameExFunc' {aka 'long unsigned int (*)(void*, HINSTANCE__*, wchar_t*, long unsigned int)'} [-Werror=cast-function-type]

by introducing nested casts.

Task-number: QTBUG-68742
Task-number: QTQAINFRA-2095
Change-Id: I3a5d2ea901bf5dc35963c589d61cf3dc7393377a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-06-25 14:56:19 +00:00
Oswald Buddenhagen
7c34e0a7b4 qmake: escape colons and hashmarks in dependency paths
these characters can appear in file names, but are meta characters in
dependency context. they have different semantics in make commands, so
this required some reshuffling in the windows generator (which just
treated dependencies and commands the same way).

we don't actually escape colons for nmake, because it has magic
treatment of drive letters anyway (and colons cannot appear elsewhere).
also, if a target's filename gets quoted, batch rules will blow up.
therefore, "funny" file names are really only supported as inputs -
which is just enough to make resource embedding work.

Task-number: QTBUG-22863
Task-number: QTBUG-68635
Change-Id: I473b0bf47d045298fd2ae481a29de603a3c1be30
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-06-25 13:35:20 +00:00
Oswald Buddenhagen
8e075dac8f syncqt: make it possible to declare particular headers being private
following the same mechanism as qpa headers, one can specify a list of
regexes in the @private_headers variable in sync.profile.

Change-Id: I5de0284e639ad283561f54dba7dda8c6437b23f8
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-06-25 09:48:37 +00:00
Joerg Bornemann
372b5504fd Do not build SPDY support if SSL is disabled
QSpdyProtocolHandler requires the features http and ssl.

This fixes the moc warning
src/network/access/qspdyprotocolhandler_p.h:0: Note: No relevant classes found. No output generated.
for the -no-ssl build.

Change-Id: I915751e98fc67e8601a8da8c5d18b11304bc0390
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
2018-06-25 08:37:18 +00:00
Liang Qi
c3059391fe Make tests compile for Android
This only enables compilation, it doesn't fix any test.

Qt on Android supports process, but not TEST_HELPER_INSTALLS. See also
acdd57cb for winrt.

android-ndk-r10e is used to compile, see
http://doc-snapshots.qt.io/qt5-5.11/androidgs.html .

corelib/io/{qdir,qresourceengine} need to be fixed later.

Done-with: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-with: Mårten Nordheim <marten.nordheim@qt.io>
Change-Id: I34b924c8ae5d46d6835b8f0a6606450920f4423b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-06-25 08:01:19 +00:00
Kai Koehne
4c68e2558c Fix moc warnings with no_include_pwd and shadow builds
If CONFIG option no_include_pwd is set, moc does not add the build
directory to its include path. The path to the generated
moc_predefs.h file is by default relative though, resulting in
moc warnings:

  Warning: Failed to resolve include "debug/moc_predefs.h" for moc file xxx myheader.h

Fix this by always making the path to moc_predefs.h absolute.

Task-number: QTBUG-69087
Change-Id: I8ef79c8340f9ebd6b0bba15e026d65ef3c088535
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-06-25 07:20:46 +00:00
Liang Qi
0e88882fee Remove dead test - compilerwarnings
A follow-up of 9d078c8f147ea875e862360b0d7480201fbbcff7 in qtqa repo.

Change-Id: Ib7c1f5cf325e9ad0066aae139b0dc72bc0184b32
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-06-22 20:17:39 +00:00
Paul Wicking
1f9dc07a86 Doc: Update br tag in html footer for XHTML compliance
Task-number: QTBUG-68459
Change-Id: Ie7c4a4e6d49c49db5814ee9b0a36387bed74fd38
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-06-22 15:52:40 +00:00
Topi Reinio
6601939713 Notepad example: Wrap clipboard functions with QT_CONFIG(clipboard)
And disable menu actions for functionality that's not available.

Task-number: QTBUG-68168
Change-Id: I153487860e8dda8271ae04e9cd2ad8b26a4b130f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-06-22 14:37:48 +00:00
Allan Sandfeld Jensen
d2c0ba3f30 Do not update scroll coordinates on ignorable enter events
This greatly reduces how often we reset the scroll evaluators,
especially with non-focused windows in KWin which sends an enter for
every wheel events in that case.

The update of the evaluators also has race conditions with the normal
events, and thus reducing them fixes odd scrolling behavior with rapid
firing mouse wheels.

Task-number: QTBUG-42415
Task-number: QTBUG-68734
Change-Id: I1c14ca3352bf9c6e57e47ad3aaee1712fe6ba30b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-06-22 13:37:23 +00:00
Edward Welbourne
4fa8dfee5d Leave m_id clear if the JNI didn't give us a time-zone
QTimeZonePrivate::isValid() just checks m_id is non-empty; so we have
to leave m_id clear if we don't get a valid time-zone back when we ask
the JNI for one.  Unfortunately, JNI gives us a "valid" default zone
if it doesn't recognize the given name; so check the known names of
this zone (or of zones with its offset); if the given ianaId isn't one
of them, assume this is a bogus zone.

Task-number: QTBUG-68842
Change-Id: I6245db18c59c4261ed5fcd4d948dd773365ce61d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-06-22 13:06:14 +00:00
Mårten Nordheim
4361c0ee84 findtestdata: test 'relative to test source'-fix
Before the fix is applied this test fails because QFINDTESTDATA will
return "/usr/" instead of the folder with the same name in the current
directory.

The 'usr' folder can't be located 'next to' the application since this
does not trigger the issue (QFINDTESTDATA looks for the folder next
to the executable early on). So we put it in a subdirectory and change
the current working directory to its parent directory.

Change-Id: I627679dcb6f2f6954264e23bfc1a71de3bff7203
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-22 13:05:03 +00:00
Christian Muehlhaeuser
9e15a93b89 Fix mouse-wheel handling for evdev devices with extended values
Newer mouse devices support a so-called "free-scroll" mode, which
unlocks the wheel and allows for faster scrolling. For such input
devices, evdev will report an event value greater than 1, when free
scrolling is active. Examples for such devices would be the Logitech
G700 or MX Master series.

However QEvdevMouseHandler interpreted such an event's data incorrectly
and triggered wheel events for the opposite scrolling direction. This
also often resulted in jittery & jumpy scrolling, when the events'
values alternated between 1 and 2.

Change-Id: Ibb23ed4419d647fff9b90d371d5bb4037cf2bd9b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-06-22 11:14:53 +00:00
Andre Hartmann
95b41777bb QLocale/QString/QByteArray: Use nullptr in documentation
While at it, fix some more issues in the sentences to
harmonize the description between the different classes.

Change-Id: Iee1c3ffe6fd71e82504bfb003d927c4db3b2a065
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-06-22 10:59:31 +00:00
Alexander Volkov
d640dbf730 QDBusTrayIcon: Avoid needless initialization of a global var
TempFileTemplate is initialized each time an application starts.
It leads to the call of QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation)
which is slow and can even change permissions of the runtime directory.
Use a static wrapper function to initialize this variable only when needed.

Change-Id: Ib620f9b842c88103c67f8dfab200f4d39c9981ee
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-06-22 10:28:33 +00:00
Joerg Bornemann
c4928e99e9 Doc: Fix signal name in QTimer documentation
QTimer emits timeout(), not activated().

Task-number: QTBUG-68798
Change-Id: I4fffce01d409e1fbc433e11c962c4e1921f76f2d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-06-22 09:05:50 +00:00