On some X11 window managers, 2 events are received when
hiding/reshowing and activating the window, which became
apparent after 91f536dd71.
Change-Id: I66fdc4f69d87ac898b18d5dfddc957617bb8f916
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Allow tmpfs filesystems to be reported, as they're often usable by the
user, mounted in /tmp and in /run (the fs for $XDG_RUNTIME_DIR).
But disallow anything whose device is not a pathname. This catches most
of everything else that wasn't specifically tested for before, like
virtual fuse filesystems, like GVFS.
Change-Id: I3e15a26e0e424169ac2bffff1417b7cee0f8ec97
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The path "/usrfoo" starts with "/usr", so if you tried to get
QStorageInfo("/usrfoo") when "/usr" is a mount point, you'd get the
wrong filesystem.
[ChangeLog][QtCore][QStorageInfo] Fixed a bug that caused QStorageInfo
to report information for the wrong filesystem if there is a mounted
filesystem at a path that is a prefix of the requested path (e.g., it
would report "/usr" filesystem for "/usrfoo").
Task-number: QTBUG-49498
Change-Id: I3e15a26e0e424169ac2bffff1417b7a27cd0132d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
There's exactly one application that needs this functionality (kded/
kiod), but we should test it too.
Change-Id: Icaa7fb2a490246bda156ffff143d210c6f5f207f
Reviewed-by: David Faure <david.faure@kdab.com>
If we're linking to libdbus-1, qdbus_symbols_p.h #includes dbus/dbus.h,
which may be old and not #define the Unix FD macros. tst_QDBusMarshall
had the definition for one of the macros but not the other, so add the
missing second one.
Change-Id: Id69569111e7d4e619e22ffff144c35edcd6f348b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
The old code sometimes made incorrect selections when rows or columns were
hidden or moved. It used logical top left and bottom right indexes to create a
selection rectangle. However on moved or hidden cells a wrong rectangle was
made. This fix calculates a simple rectangle without hidden cells and makes use
of the row/column select functionality provided by the selection model, to make
the right selection.
[ChangeLog][QtWidgets][QTableView] Fixed a selection bug when rows or columns were hidden (QTBUG-50171)
Task-number: QTBUG-50171
Change-Id: Id186012af26da7b2051ff5eb1c13e6b7494cca77
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
QMetaEnum::key(n) returns the n-th key, which is not necessarily the one
of value n. For the key of value n, we want QMetaEnum::valueToKey(n).
Change-Id: Ic90fe6b1cbe84978a02fffff141bf4a06074917a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The C and C++ standards say it's undefined whether the preprocessor
supports macros that expand to defined() will operate as an ifdef.
Clang 3.9 started complaining about that fact.
One solution was to change QT_SUPPORTS to check for zero or one, which
means we need to change the #defines QT_NO_xxx to #define QT_NO_xxx 1.
The C standard says we don't need to #define to 0, as an unknown token
is interpreted as zero. However, that might produce a warning (GCC with
-Wundef), so changing the macro this way is not recommended.
Instead, we deprecate the macro and replace the uses with #ifdef/ndef.
Change-Id: Id75834dab9ed466e94c7ffff1444874d5680b96a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
BLACKLIST should make it, recent regression in QUdpSocket went unnoticed
(first) because of 'insignificant'. We'd like to avoid such regressions
in future (again, using BLACKLIST if needed and fixig the real problem then).
NB: BLACKLIST in this patch was extended to deal with previously unnoticed failures on
Windows and OS X. 'multicast' and related family of of functions on OS X
will probably stay like this (seems to be a Darwin's quirk), datagram
size related tests - fixed in dev or 5.7 (change is in nativesocket engine,
'bytesAvailable').
Task-number: QTBUG-52714
Change-Id: I039b05935a02983ce1648de449907dfa765f7db7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This patch QSKIPs all tests that:
- take to much time sitting in some QTRY_VERIFY or similar before failing
- result in 'not in fullscreen mode' warning (with PASS) - thus completely flaky.
- Where previously determined to not apply to OS X using QT_OS_MAC
The intent is to make the test run-time more reasonable,
both when running the test locally and on the CI system.
Reduce the BLACKLIST - to avoid a 'double elimination' the tests that are skipped now,
should not be BLACKLISTed so that we fix them for good.
Task-number: QTBUG-52974
Change-Id: I34dc2010d0debc6b5b99f2375a6da902b7a17b29
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The test used to output random character sequences which contained
terminal control characters. Change it to output plain ASCII and
Unicode syntax for non-ASCII characters.
Change-Id: Ifaa72f50242bd27416a8698a1f5152bc8b902898
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Q_OS_DARWIN is the general replacement for Q_OS_MAC,
but most/all of the MAC sections in this test are
OS X specific.
Change-Id: Ic54af9d3dce1e1952a57e15b74acdedf2af60c79
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Fix a warning about a missing case statement.
Change-Id: Ic89646704d62668cf83c463dbf6e9b549a4b5200
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
The test should not depend on qWait explicitly
Change-Id: I13c01c47c9f7bae8b0c30afa2ac8550dc0fbf028
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Add more error messages on failures.
Task-number: QTBUG-25367
Task-number: QTBUG-25368
Change-Id: I064143a058b7b98d9d5eecab8b5da49f5307e1eb
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
newer versions of qt creator understand QMAKE_EXTRA_COMPILERS and
INSTALLS, so there is no need to list the files twice.
Change-Id: Iccf3cc3248daf3422b8c366c2eb2d2f46c5f08d1
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
QWindowsPipeWriter uses asynchronous API to perform writing. Once a cycle
has been started, the write buffer must remain valid until the write
operation is completed.
To avoid data corruption and possibly undefined behavior, this patch
makes QWindowsPipeWriter::write() take a QByteArray, which it keeps alive
for the duration of the write cycle.
Autotest-by: Thomas Hartmann
Task-number: QTBUG-52401
Change-Id: Ia35faee735c4e684267daa1f6bd689512b670cd2
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Fix regression in a7b0cb467c which caused
it to be hard to start scrolling at the ends of a scroll-view if using
fine grained scrolling events.
Change-Id: I55f3210150b993281545c3ad5a7356d892fa30b5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The widget is hidden, reshown and tested for active window, which
is flaky. Add a call to activateWindow() which increases
the chances of it becoming the active window should another window
appear.
Change-Id: Ibbecdbc43e2ac9638aec497c47fffaaffa1855af
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
On some operating systems, tzdata files carry the Local Mean Time (LMT)
for the city in question, which better represents how time was tracked
before standard, hourly timezones were introduced in the early 20th
century. The test was asking for the data for 1653-02-09 and assumed
that it would find the first Central European Time (CET) rule, which
Germany didn't start using until 1893-04-01.
This fix allows us to remove the blacklist that had been applied to this
test without investigation. It wasn't related to OpenSUSE, aside from
the fact that OpenSUSE tzdata carries the LMT data.
Change-Id: Id5480807d25e49e78b79ffff1449bdaf46901367
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Miter limits below 1.0 are not valid in PDF and trigger an error in the
Reader. This change enforces a minimum miter limit of 1.0, and it adds
a manual test for producing a PDF file demonstrating this issue.
Task-number: QTBUG-52641
Change-Id: I1c78b1c4a44579e95e1cddfb459926d304e60165
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
libdbus will send a local signal if connection gets disconnected. When
this happens, end all pending calls with QDBusError::Disconnected.
Task-number: QTBUG-51649
Change-Id: I5c7d2a468bb5da746d0c0e53e458c1e376f186a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is not exhaustive, but was enough to discover ICEs.
Change-Id: Ib60be1d298a66b72e3eb9b75ad538f0bf15b5f62
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Simo Fält <simo.falt@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Pushing the mouse rapidly to the top left corner causes KDE / KWin to
switch to "Present all Windows" (Ctrl+F9) mode, showing all windows.
This has been observed to be triggered programmatically by
QCursor::setPos(0, 0) if there is no other window beneath and apparently
depending on the perceived mouse "speed".
Suppress this by using the bottom right corner for XCB.
Change-Id: Id18d2f45a095ed4d4f365f010cf45a20b0d9435e
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
We have a bug that proximity events are generating them spuriously;
this is a way of testing it.
Task-number: QTBUG-52921
Change-Id: I490dfcf8d5b325f612b733e29fd49de9418bb19e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The "path" of a mailto URL isn't a file, so we shouldn't try to do
glob-based matching. I was getting application/x-ms-dos-executable
for a .com domain and application/x-perl for a .pl domain...
Change-Id: Ifc346c3bba83ba1a8476db3202492f4c2e4d52bb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Suppress message dialog of the test helper as does QTestlib.
Task-number: QTBUG-52714
Change-Id: I5efd7d72f77c7689500ecaccf46f1f9dfb312140
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Use the correct parent path for the renamed file when creating
QFileInfo. It must be a path to the parent directory, not to the
root directory of the model.
Modify tst_QFileSystemModel::setData() to test renames in subdirs
of the root directory of the model.
Change-Id: I69d9e3a937616857a81617791ed118af3f6eea05
Task-number: QTBUG-52561
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Return pixmaps with device pixel ratio similar to QScreen::grabWindow(),
cf c0963486ce.
Adapt kernel tests accordingly.
Task-number: QTBUG-52137
Change-Id: I9ce276d5e2d87ae0d39c8639267d1ac283fed854
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The old code incorrectly calculated visual region for a selection (specified by
QItemSelection object) in case of reordered / swapped rows or columns. It used
the leftmost and rightmost (upmost and downmost for vertical mode) logical
indexes directly. However some middle logical index (in case of reorder) may be
the leftmost or rightmost visual index. In such cases the repainting didn't
work properly. This fix first checks whether reordering / swapping is in use.
If it isn't (ie visual=logical) we use code similar to the old code. Otherwise
the new code scans all selected logical indexes, translates them into visual
ones and gets the correct leftmost and rightmost indexes.
[ChangeLog][QtWidgets][QHeaderView] Fixed a repainting issue when items had been reordered.
Task-number: QTBUG-50171
Change-Id: If6afabebf445cf32a8e0afe262b6ee149e7c4b2b
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Add dragging functionality to the labels showing a pixmap
cursor, allowing for testing DnD with pixmaps with device pixel ratio.
Task-number: QTBUG-46068
Task-number: QTBUG-50938
Change-Id: If6781f380864e614efd4328e8b880b57cd900511
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
When the formatting parameter wasn't exactly QUrl::EncodeUnicode, it
wouldn't encode, despite having to.
Change-Id: Id75834dab9ed466e94c7ffff1444bacc08dd109b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
The RFC does allow it. It even has examples showing them as valid. In
section 6.2.3, it shows:
http://example.comhttp://example.com/http://example.com:/http://example.com:80/
Change-Id: Id75834dab9ed466e94c7ffff1444b7195ad21cab
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
The behavior was different in the variadic template code and in the C++98
code. The code without variadic template support was not copying the functor
object (e.g. a lambda) before calling it.
However, in the variadic template section, QtPrivate::FunctorCall::call
took the functor by value instead of by reference resulting in a copy.
QtPrivate::FunctorCall::call is a helper function for
QtPrivate::FunctionPointer::call which is only needed for variadic template
expension.
[ChangeLog][QtCore][QObject] If the compiler supports variadic templates,
no longer copy functor connected to a signal each time the signal is
emitted. Restoring the C++98 behavior.
Task-number: QTBUG-52542
Change-Id: I3ca20ef6910893b8a288e70af7de4c7b69502173
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Follow-up to commit 6fd205d5: document which version of danted shall
make one work-around redundant, document that another work-around is
still needed even with that v1.1.19; and remove a comment that
referred back to an XFAIL that commit 6fd205d5 removed.
Change-Id: I270b662528127c82184bff20b3cecea4f0c41b41
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
QSKIP() causes the whole test to be skipped, where this work-around
for a known quirk of the test server only requires skipping a single
Q_COMPARE(); the rest of the test passes fine without it.
Change-Id: Ie4612bd428f4cb4b342fad908cc2784fbadf069c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Before this change QFile::errorString function was returning an
"Unknown error". Now it will return the typical ENOENT string.
Task-number: QTBUG-45259
Change-Id: Ib7634f1aa5d91f77151cf92c58d3956e20a4cc6b
Reviewed-by: hjk <hjk@theqtcompany.com>
Use QFINDTESTDATA to find the socketprocess helper executable.
Now tst_QLocalSocket::processConnection() passes when started from Qt
Creator without adjusting the working directory.
Change-Id: I97ca3334a381b3cd646647487529bcd90b969528
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(for instance any global object which writes out to a config file in the
destructor). If the global cache isn't available anymore, don't use it.
Change-Id: I851a6e394d0b073aebf3ffd88b1966d424bfb92e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Change-Id: I0c94a5c2846b48c8aea7ffff1435b8a7ccbd4d9e
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Add some extra checks to the parser to make sure that addresses
like "300-05" aren't interpreted as valid IPv4 addresses.
Change-Id: I12475eebc9452e060779bb05e2b4ad9512a28281
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
After 909d3f5c7, private families will not be shown in user interface.
Task-number: QTBUG-41318
Change-Id: I15ae77cacd2a27c9db4b1a8ffbb582416258988c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
- QMouseEvent::screenPos() should be global desktop position
- QDesktopWidget::screenNumber() should tell the correct screen
- QGuiApplication::topLevelAt(screenPos) should find the window where
the mouse is clicked
Change-Id: I9a63ab3ee1944b7246551d0f3d5e37f0d2aa5457
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
According to RFC 2640, FTP uses UTF-8 encoding. Fix the conversions
accordingly.
Task-number: QTBUG-52303
Change-Id: I615199b3d074fc3861f25df113dda672525766b6
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Ensures that QStyleOption is correctly initialized.
This prevents possible styling issues due to
QStyleOption's reporting version 0, see qstyleoption_cast.
This enables users to handle more cases in their QProxyStyle.
For now the test is only used for QCommonStyle.
Change-Id: I768db00b12b46890343fffe44e4f562762e9cf80
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>