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>
CID 155005: Possible illegal access in string. Some loops were
reading the buffer without checking the bounds.
Change-Id: I910671a6d56808138ec2bb5d96bd7edf78b20f73
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
CID 21629: The QMakeProject::read result was ignored.
MetaMakefileGenerator::createMakefileGenerator will be called if the
project was read.
Change-Id: I9187c82efd1abedcaa8e394f1fdb0b7f35a2b1d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
The reference to trUtf8() made it even more confusing, so remove it.
It's redundant and deprecated anyway.
Change-Id: I9921297160db3660bb5099692bbfdaf6e85637aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
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>
It was hidden by overridden parent(const QModelIndex &) methods.
See also 63b5082ea8
(Unhide QObject::parent() from QAbstract{Table,List}model).
Change-Id: I8b6d4d4175e4d43ff269eaeb0b2b1a9fb8f44bab
Task-number: QTBUG-45393
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.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>
In addition to pen events being handled as tablet events, we create
touch events. Same principle is used on other platforms as well. This
allows devices as Surfaces to use the pen with Qt applications.
Furthermore, the first update event does not have to be a press event,
as in a pen has proximity values describing a move without touch, but
also the HoloLens uses touch points as permanent pointer devices. They
all send an exit event once released or out of range. Hence, clean up
the internal touchpoint hash when the touch device is gone, not on
release.
Task-number: QTBUG-38681
Change-Id: I38acaa034a3cfe224098bfa36bfead5428f4db16
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
IInputStream::ReadAsync might create a separate buffer to fill in data.
Passing a buffer with GetAddressOf() can cause a memory leak of the size
of data to be read.
Instead, pass a separate buffer pointer and continue to use this one
after the async operation. This way, the OS can decide whether to switch
buffers or not, keeping ref counting in sync.
Task-number: QTBUG-52961
Change-Id: I9dfb627287142355ebcf74ca52427b4e8108e8d1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
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>
[ChangeLog][Important Behavior Changes] Support for DirectFB is no
longer enabled by default, due to lack of development in upstream. To
re-enable the platform plugin, pass the -directfb option to configure. If
there is no interest in this platform, the support will be deprecated in
Qt 5.7 and will be removed in Qt 5.8.
See: http://lists.qt-project.org/pipermail/development/2016-March/025273.html
Change-Id: Icaa7fb2a490246bda156ffff143c62515a5f575b
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The existing code keeps the overrides from each base class together,
so also move them to the correct group after adding Q_DECL_OVERRIDE.
Change-Id: I5d89fb4e7f9454ab0c9c6383f8245e64b95e84e9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The proper solution with qCalculateBlockSize will come for Qt 5.7.
Change-Id: Ifea6e497f11a461db432ffff14490788fc522eb7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
this adds file_copies.prf, which understands the variable COPIES, which
works analogously to INSTALLS.
i've been holding this off for a long time, as it is not without
caveats. however, similar hacks are proliferating all over the code
base, so it's time we formalized it.
in fact, it's the easiest way to fix some nasty shadow build problems,
which is why i'm adding this on the stable branch.
Task-number: QTBUG-52256
Change-Id: Icbe3b9fbb79c952546aad2d467a438d3a69d749f
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Limit the height of the the wave-pixmap so that fillRect doesn't clip
it.
At the same time the precision of the generated wave-pixmap is improved
so it better fits the requested radius.
Task-number: QTCREATORBUG-15851
Change-Id: If754387b20ab7b015857ecb0a0e8fe16de1d728a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Do not set WritingSystem supported just to unset it afterwards;
test in-place and fallback gracefully.
Change-Id: I6910019c08fcf3909b924c27271547aae2ea0ff1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
There is already an array of writing systems for which
GSUB|GPOS table is required
(also rename it from "openType" to "capabilityForWritingSystem",
to reflect its meaning).
Change-Id: I7cfd4a80d5ca13f9312b3644b2bd738d6015c71c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
There was a small logic error in the code selecting the debug/release
C(XX)_FLAGS used when compiling qmake, that could lead to us not
specifying any flags at all.
Change-Id: I5d3c44367d535a17570e3602029b84a02706d624
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In QFileDialogPrivate::_q_enterDirectory() the QStyle::styleHint() for
QStyle::SH_ItemView_ActivateItemOnSingleClick was called w/o the
widget. By such usage the possible StyleSheet setting was ignored, e.g.
"QAbstractItemView { activate-on-singleclick: 1; }".
Task-number: QTBUG-50871
Change-Id: I7a32c4841db7113f32c3823581c2becc1677e3cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
In some cases we move menu items around, therefore we should
not rely on QCocoaMenu::items() being the actual items inside
the menu. But, since the NSMenu is updated before hand, we can
rely on NSMenu.numberOfItems instead.
Change-Id: Icd4497beca4f52a6d38408eeaa2e6ec71b579685
Task-number: QTBUG-52931
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This is a regression with 5.5, it causes some customer test functions
crash. d3d10cf2 introduced the 5 minutes timeout. The timeout could be
changed after this.
Task-number: QTBUG-52402
Change-Id: I8940bbde5004b4d888732b551274f079ddf20563
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
It's been unused ever since it was added in
bba86a01c9.
Change-Id: I6d5bc27a0744d37f873245c92a4e6ba8fc90c062
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Similar change to 390ea21873, but more
extensive because the hash variables were not, yet, of unsigned type.
This brings the three hashed string search algorithms in QtBase (in
QString, QByteArray and QByteArrayMatcher) in line again.
Found by UBSan, fixing the following bunch of errors:
tools/qstring.cpp:3080:38: runtime error: left shift of negative value -1291179264
tools/qstring.cpp:3081:42: runtime error: left shift of negative value -1291179264
tools/qstring.cpp:3091:13: runtime error: left shift of 73 by 26 places cannot be represented in type 'int'
tools/qstring.cpp:3091:13: runtime error: left shift of negative value -1255957171
tools/qstring.cpp:3091:13: runtime error: signed integer overflow: 1783052986 - -1207959552 cannot be represented in type 'int'
tools/qstring.cpp:3097:37: runtime error: left shift of negative value -1298753576
tools/qstring.cpp:3098:41: runtime error: left shift of negative value -1298753576
tools/qstring.cpp:3107:13: runtime error: left shift of negative value -1508912760
tools/qstring.cpp:3158:38: runtime error: left shift of negative value -677037574
tools/qstring.cpp:3159:42: runtime error: left shift of negative value -677037574
tools/qstring.cpp:3169:13: runtime error: left shift of negative value -1657715810
tools/qstring.cpp:3173:38: runtime error: left shift of negative value -677037574
tools/qstring.cpp:3174:42: runtime error: left shift of negative value -677037574
tools/qstring.cpp:3183:13: runtime error: left shift of negative value -1657715810
Change-Id: I1436eb61369919df9fe34251f863dd54fb58af98
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The MSVC STL warns when passing naked pointers as non-bounded
iterators to algorithms such as std::equal and std::copy, in
an attempt to inform users that the range specified by that
iterator has an implicit minimum size that the caller of the
algorithm must ensure is met:
warning C4996: 'std::_Equal1': Function call with parameters that may be unsafe - \
this call relies on the caller to check that the passed values are correct. To \
disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to \
use Visual C++ 'Checked Iterators'
When building Qt, as well as when building user projects with
qmake (cf. 0a76b6bc7f), we
globally disable this warning (with -D_SCL_SECURE_NO_WARNINGS),
but since we started using STL algorithms in public headers (e.g.
in qvector.h), users get this warning in their own projects now,
unless they, too, define said macro. But such a requirement is
against the Qt policy to have headers that are warning-free as
much as possible.
The suggested way of fixing this warning is to wrap the naked
pointer in a stdext::unchecked_array_iterator before passing it
to the algorithm, cf. examples in
https://msdn.microsoft.com/en-us/library/ttcz0bys%28v=vs.120%29.aspx
or, together with the capacity-made-explicit, in a
stdext::checked_array_iterator.
To avoid ifdefs for platforms that don't have these extensions
(which, incidentally, for the unchecked case, includes MSVC 2012),
wrap the calls in macros.
The end game here is to drop -D_SCL_SECURE_NO_WARNINGS, at least
for public headers, even though this commit also adds the wrapper
to implementation and private header files.
An alternative to the wrapper would have been the version of
std::equal that takes four iterators. However, that is a C++14
library feature, while this version of Qt still needs to compile
with a C++98 compiler, and, more importantly, there isn't, and
never will be, a corresponding 4-iterator version of std::copy.
Task-number: QTBUG-47948
Done-with: Stephen Kelly <steveire@gmail.com>
Change-Id: I1bbab257fb5f1c5042939c382a412b596112ff26
Reviewed-by: Stephen Kelly <ske@ableton.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>
Use High DPI when interfacing with the Accessibility API.
Task-number: QTBUG-52943
Task-number: QTBUG-50991
Change-Id: Ica4489222dca5d58864172470e634f709deb69f8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@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>
This is equivalent to d7db6c6c19 on the
xcb platform.
Task-number: QTBUG-51617
Change-Id: I837a764c8382244307ba6aa02bd8bde12bd08bff
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Coverity, CIDs 10917, 10918. This fix looks like purely cosmetic
and unneeded: we check f->error() after f->open(). Unfortunately,
f->open() can fail without setting an error (if you provided an invalid mode).
Change-Id: Idbfcb9305b3f004e5e425cb6076b41e193b8d473
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Coverity, CIDs: 10724, 10725. Data member _iterator is not initialized.
Change-Id: I0c94f5cef031e208aab1687209282fae0317f0ab
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Drops without matching time stamp do not work. I have fixed the issue by
reanimating the findXdndAwareParent() function (adapted to XCB) and
using it to find a matching transaction if all else fails.
Task-number: QTBUG-45812
Change-Id: Ibca15bbab02ccf2f25280418e9edf36972ebf9a0
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
This is relevant if the custom filter passes through some categories to
the previous one (which might be the default one). In this case changes
to the filter rules never took effect.
Change-Id: I1a3ab569857d43621ce5df4e690c6e64e6bc7a66
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Do not paint over CE_MenuBarItem when the palette is set
to transparent by QStyleSheetStyle.
Task-number: QTBUG-49115
Change-Id: Ib364017179d0852490daad094361eae0ead4fd5f
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
struct BacktraceParams is too big (more than one pointer), so using it
with QList is inefficient. Let's use QVector instead.
Change-Id: Id75834dab9ed466e94c7ffff144572c1eb3fb0e5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
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>
Previously the user only got informed about the application getting
inactive or hidden, but not when the application was reactivated again.
This can cause problems with applications using for instance a camera as
that gets disabled when not being active and never return to a active
state again.
Change-Id: I5c1d8750db8e75043ecf261616a0bc98434a3863
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When running a process that requires elevated privileges (such as
regedt32 or an installer), the Win32 API CreateProcess fails
with error ERROR_ELEVATION_REQUIRED.
Fall back to ShellExecuteEx() using the verb "runas" in that case,
bringing up the UAC prompt.
Task-number: QTBUG-7645
Change-Id: Iee82a86a30f78c5a49246d2c0d4566306f3afc71
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Add command line options to be able to set the QCoreApplication attributes
that influence Open GL context creation and add a status label at the
bottom that displays it besides the QT_OPENGL environment variable.
Task-number: QTBUG-52693
Change-Id: Id9793292596e0feb3da5220fde2e5b2e495f87ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.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>
Allow sockets in bound state to wait for notifications.
Task-number: QTBUG-52449
Change-Id: I5c02bd61db68abca652312d4d59023963b05b3c5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Make the destructor of QDBusArgumentPrivate virtual as it may store
other types (QDBusDemarshaller). Suggested by Thiago.
Fixes a "new-delete-type-mismatch" error reported by AddressSanitizer.
Task-number: QTBUG-52176
Change-Id: I9ac19050840530ca9cae893b10093185d31e0448
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>