The edit menu will also close if the user taps outside it, not only
when selecting a menu item. But we never caught this case, which left
QMenu to belive that it was still open.
Change-Id: Iae071b4fc5fdc44d7d05b4dd767042907e337957
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
[UITextInput textInRange] is sparsely documented, but it turns out that
unconfirmed marked text should be seen as a part of the text document. This
is different from Qt IM (ImSurroundingText), which handles marked text on
the side. The reason we can assume this is that the range we are given
as argument to textInRange exceeds the documents length when having
marked text appended to the end, suggesting that it tries to read / verify
the current marked text. In addition, keyboards like Japanese-Kana will not
update and function correctly unless marked text is included.
Note that the docs seems to imply that you cannot have marked text and text
selection at the same time, unless the selection is contained within the
marked text (using the dedicated selectedRange argument to setMarkedText).
If this turns out to be incorrect, we might need to adjust the methods
dealing with selection to also include marked text as well.
Task-number: QTBUG-49946
Change-Id: Ifedd792ec66db435806f57fca157e1abbbf121a8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Delay the exit call until Java part finishes the execution.
We must be sure all the threads are stopped (hanged), when we
call exit, otherwise java thread will try to use static vars
that are freed by the qt thread.
We also need to call exit from Qt thread, otherwise Qt will complain
about it.
Change-Id: Ia1e7a4d7d56c39d38313f040aab618ec5a68dfb6
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
the variable is later re-used by qtPrepareTool(), so the tools used to
build the tool would get excess variables passed.
Change-Id: Ib1bdd2211b4a8615e2be9ba0310822f373f5efb0
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
When cleartype rendering was turned off, transforms would be
badly broken with the DirectWrite engine because we did not
implement the appropriate code path there. In Qt 5.6, this
would become especially visible, since DirectWrite is always
used when high-dpi scaling is enabled.
[ChangeLog][Windows][DirectWrite] Added transformation
support to DirectWrite engine when using grayscale antialiasing.
Task-number: QTBUG-49562
Change-Id: Ic5f7dd5b020a85ed1b6473c511a67cdb5ed5cedb
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
The code is using the same rasterizer for A8 and A32 glyphs,
in the former case it's just converting to grayscale afterwards.
Therefore, we need to pad the glyph cache with the same number of
pixels for both cases.
[ChangeLog][Windows][DirectWrite] Fixed clipping bug when rendering
unhinted text with grayscale antialiasing.
Task-number: QTBUG-49562
Change-Id: If85ff768451116278f6d2ccd1e77b5ce0664087d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Both specify 87 (invalid parameter) as error code for non existing
shared memory.
Change-Id: I02b02da106e9e4e574a21359c25bc2a03e385a7c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
As for the #include-parser, the moc-detector's minimal C preprocessor
could be confused by a raw string into ignoring large chunks of code.
Change-Id: Id688e9a1f04628ce75a51a7d15269078c734288e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
If a / wasn't part of a comment-start, it and the character after it
were none the less stepped over. If the character after started an
enclosure, this would duly be missed, leading to mis-parsing of the
subsequent text. As for similar bug recently fixed in findDeps().
Change-Id: Ie5329ec633c23a554b42a6351723c980e27fb9a9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
qtPrepareTool() does it anyway, so this saves repeated manipulations.
for now, this is just nicer, but soon it will be a requirement.
Change-Id: I5184e0e4597c6d5a4d7dd4cc4d81e7f742a79fc8
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This extends the test suite introduced in 497f0af1f7 for
a known-to-be-good case also for 32 bit systems.
Change-Id: Ia231bcb9b0102c28483d932be18767662b7a6afd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
instead of an empty list.
Even if QBasicFontDatabase::fallbacksForFamily() returns an empty list ;)
Change-Id: Ib4a63e7898d2708737dd694f0629bdb68b2eb3a1
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Do not assume QBasicFontDatabase doesn't reimplement fallbacksForFamily()
and use the proper chaining instead.
Change-Id: I822d1902843a3a13517b7025761b88439fd75ced
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Previously, the geometry stored for floating dock widgets
in QPlaceHolderItem::topLevelRect and QDockAreaLayoutInfo::saveState()
included the window frame (frame position/content area size).
This does not work in the case where a floating dock widget is deleted
since the geometry is determined after reparenting the widget when the
frame geometry is no longer available. Change the behavior to store
the geometry excluding frame to avoid such problems and adapt
QDockWidgetPrivate::setWindowState() accordingly.
Task-number: QTBUG-49832
Task-number: QTBUG-45780
Change-Id: I84b5c80df6e1c9e738bbb1407b9047cc84719ce0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
when QCocoaWindow::setCocoaGeometry is called on windows embedded into a
native cocoa gui, QPlatformWindow::setGeometry does not apply the geometry.
we therefore need to set the frame on the embedded view manually.
related tasks:
Task-number: QTBUG-47632
Task-number: QTBUG-45269
Change-Id: I976e4606d36bb4afc74b0834105bceab8a6f8cbd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This test is marked as blacklisted on 10.10, and it
is found to still fail in 10.11.
Task-number: QTBUG-49834
Change-Id: Ibddb1af6b61f3fca2b2aea18102bbaa5390a40d3
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The C preprocessor allows backslash-newline anywhere and allows
comments anywhere it allows space. Testing wilfully perverse
applications of that revealed qmake's parsing of #include directives
wasn't very robust. So rework to actually follow the rules and add
those tests.
Change-Id: If5cc7bfb65f9994e9ab9ed216dd1ee7285c63934
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This reverts commit 9a6a58a95a,
which was a work-around for a qmake bug, now fixed.
Task-number: QTBUG-19393
Change-Id: Id467bb5907a88f03eac0e29a90f4ff7e97045423
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Add a const char * message with QDnsLookupRunnable's translation
context and use that for untranslated warnings and errorString.
Change-Id: I1b6c9fb259fb9ff824a0c3829b2c00c36aaecdfa
Reviewed-by: Richard J. Moore <rich@kde.org>
This caused issues in upstream tests that didn't expect to have their
geometry requests not being respected by the WM.
Task-number: QTBUG-49912
Change-Id: Iec99f341d81488de6026f04c99dff45a0d3f8587
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
When calling WaitForMultipleObjectsEx, do not use a
timeout for the initial call. This saves around 10%
of blocking invocations in the QEventLoop autotests.
Change-Id: Ib24436ed11de1865e31f9ff0ddf6ce1bc5562f42
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
"-ServerName:" is only used for Visual Studio and causes bad side-
effects when using QCommandLineParser.
Change-Id: Ifef652bbb65df9279a39ae3c74ddbb563c87bd90
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
TEST_HELPER_INSTALLS cannot be used on platforms with no
QProcess support.
Change-Id: I2a6a283d94ca4487fc628449c53fc37140dd291d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Since special files have file size == -1, they were always filtered
out by QFileSystemModel, even when passing QDir::System as filtering
option. Keep them instead.
The testcase is more convoluted than it should be because QFSM
is so broken that it returns valid indexes for invisible elements
in the model (such as filtered out elements).
Change-Id: I023a9813dbfeed7be99dded42c66b1191afdc17e
Task-number: QTBUG-20968
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The test was comparing an "unsorted" file listing read from disk
with a reference listing, checking whether the two were different.
Obviously that's a nonsense test, as there's no stable order
for the entries returned by readdir_r and friends.
Change-Id: I1d781a6513c42bb0b585d02e57a771c5336c7df4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Change-Id: I8636993571b04d8cda74708777ba3ef2bac09fb5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
I still have no idea how to fix this properly given the absolute mess
of QWidgetLineControl. For now add a failing test.
Change-Id: Ieb5ad6994c8ce7deb0cd0f2f47d51073d042244e
Task-number: QTBUG-49295
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The pixman drawhelpers are implemented using GAS syntax, which the
Clang assembler doesn't handle, nor do they work on 64-bit ARM, so
we disable them selectively. They are only used for 16-bit surfaces
anyways, so it not a big deal on iOS.
(cherry picked from commit 49568df954)
Change-Id: I70848981c794739d40a6a2d9a537307bc80d61a6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
If no screens are available, windows could disappear, could stop rendering
graphics, or the application could crash. This is a real use case in several
scenarios: with x11vnc, when all monitors are physically disconnected from a
desktop machine, or in some cases even when the monitor sleeps. Now when the
last screen is disconnected, it is transformed into a fake screen. When a
physical screen appears, the fake QScreen is transformed into a representation
of the physical screen. Every virtual desktop has its own fake screen, and
primary screens must belong to the primary virtual desktop. It fixes updating
screen geometry on temporarily disabled screens in the middle of the mode
switch.
Expected results: Windows don't disappear, the application doesn't
crash, and QMenu is displayed on the appropriate screen.
This reverts patch 51ada7734a
Change-Id: I6e8eb682b0c8425d08ffdaecbd4c6c7700c914b4
Task-number: QTBUG-42985
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
QXcbWindow::m_xcbScreen was introduced in 4e1b09fa8f
(Keep screen geometries from overlapping) to map the window
geometry for the right screen, because it wasn't possible to
rely on QPlatformWindow::screen().
But we don't need it since a705b4ec1f
(Introduce cross platform high-dpi scaling), because QGuiApplication
triggers GeometryChangeEvent right after processing WindowScreenChangedEvent.
So just use QPlatformWindow::screen() instead of cached m_xcbScreen.
m_xcbScreen was also used in d4bc56cb42
(Fix screen detection on configureNotify) to compare the new screen
after receiving ConfigureNotify to the correct old screen. Just send
WindowScreenChangedEvent event and leave making the comparison to
QGuiApplication.
Change-Id: Ibe717ae4bf4c40b0a04cd62fe2ecaee5df5f4060
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
The parser in QMakeSourceFileInfo::findDeps() would step over the
closing quote of a string, only to have a for loop then step over the
character just after that closing quote, which was thus never studied;
this could lead to problems in various ways. Fixed that and expanded
findDeps() test to catch regressions.
Task-number: QTBUG-17533
Change-Id: I7dec5222e38fa188495b39376ffee70bc7bbc87f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Recent changes to the main file accidently removed the
parameter from the call.
Change-Id: I4cce48327d43d9ea3fe4fd82c2f5768aa4bc6d5c
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Graphics effects may exceed the window size, causing platform
backing store operations to fail (see QWidgetPrivate::effectiveRectFor()).
Task-number: QTBUG-49785
Change-Id: Iff16da599397d19acb86010fe7023f3ce15b6d6f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
OpenFileMappingFromApp has been added for Windows 10. Using it,
QSharedMemory autotests succeed without any failure.
Change-Id: I5a4fbec004f121f41909ae13f3db02c384810645
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
QFINDTESTDATA is already prepared to find it there.
Change-Id: I467392786ce6bcfbf1bd0b6079f60c9df06834b1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Change-Id: Ia4dbb2e3b055a7899c4a3e02698c5776ea7f73ea
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
It makes little sense to give focus to a hidden widget; in order
to make the treeview visible, we need to set the view mode to Detail.
Change-Id: I453111e83593a790a656651b603a9c9b1a78dd9d
Task-number: QTBUG-7690
Reviewed-by: Jan Blumschein <jan@jan-blumschein.de>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
By calculating the previous geometry and passing it on when calling
handleGeometryChange we can detect cases where setGeometry() on a
QWindow didn't result in the expected geometry. The new (actual)
geometry is delivered as a resize event.
This also allows us to only send expose events when the size of the
window has actually changed (instead of also sending when the window
has just moved).
Due to the async delivery of geometry changes on the xcb platform we
need to avoid using QWindowPrivate's cached state of the geometry, as
that will result in duplicate resize events when events are not flushed
in between two system resize events coming in with the same size.
Change-Id: I3d4abe4a1095dd96e6e354288d5b646c623c30dd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
For certain devices vci->resolution is zero, which causes a SIGFPE
if FE_INVALID exceptions are enabled. Try to prevent that.
Task-number: QTBUG-42717
Change-Id: I388735f5dfb6218496787dbb74cf0c0f43cc928f
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
... otherwise we would not detect subsequent file/directories added
into the non-removed one.
Change-Id: I43018dfb9a9c6c0399190800da3f0d572ec5d8d8
Task-number: QTBUG-49307
Reviewed-by: David Faure <david.faure@kdab.com>