proper prefix builds don't have the redundant .dlls in bin (the copy
step is simply omitted), so this is broken. the change would have to be
done atomically with making DLLDESTDIR sane.
This reverts commit 9b2e98245a.
Task-number: QTBUG-50065
Change-Id: I9ce0a2d1147a1a2d4bd2f22e619d5c737864a637
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com>
Reviewed-by: Tim Blechmann <tim@klingt.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
this is just an optimization/clarification: variables which are known to
be never empty (like PATH) can be extended with less convoluted code.
Change-Id: Ib365bbec8301673ed1c874979b4de19bc983dab1
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
the primary purpose is making env var prepend mode work for unset
variables on windows. this is achieved by using a conditional and delayed
variable expansion. however, the latter is disabled by default and can
be locally enabled only in batch files. therefore, write wrapper scripts
and substitute them for the actual commands. we do this also on unix,
both for consistency and simply because the commands look much less
confusing.
this change is slightly backwards-incompatible, as invoking
qtAddToolEnv() multiple times on the same command will now make a total
mess. also, invoking it on a command that contains 'make' macro
expansions isn't a good idea, so testcase.prf needed an adjustment. the
function is an undocumented internal, so Nobody Should Care (TM).
this also reverts 80ebedecf9, as it's obsolete now.
Change-Id: I8394b77868b495abcf27b688996ca74c40b80994
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Don't try to run test_interface when Qt is configured without QtWidgets.
Change-Id: If6c376c250215c1d639b06881d16c0141091f288
Reviewed-by: Stephen Kelly <ske@ableton.com>
Render-to-texture widgets that are native children may have a non-zero
offset telling the position within the top-level widget. The size is
usually different (smaller) than the tlw's size as well.
An unfortunate optimization attempt led to ignoring the size for native
children with offset (0, 0). This resulted in interesting rendering
artifacts whenever such widgets were placed in the top-left corner of
the toplevel. This is now corrected.
Task-number: QTBUG-48130
Change-Id: If449610c3f3333cb73ae149efaefd7ef42953951
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Setting a screen to a child window causes a warning message. This patch
prevents the debug message by catching incorrect behavior made by QPA
earlier.
Change-Id: Idf3ac02290a18afc134f19c2b91348dc009ca4ca
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Find the top level window on the primary virtual desktop first to avoid
obtaining a window which doesn't belong to the primary virtual desktop
when screen geometry is similar.
Change-Id: I78fdfa0b5146d0ba9b912338adeb612c102c4ac3
Reviewed-by: Adam Majer <adamm@zombino.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Qt3D is making heavy use of this, causing the QList node allocations
to be among the top 10 per frame allocation sources. Switching to
QVector fixes that.
Change-Id: I3b4df329710f82bf8d6797ea1f0c79b288a08063
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The reply serial is displayed for method call returns and errors,
while the serial is displayed for all message types.
To see a message serial it is required to dump messages after
sending, not before.
Task-number: QTBUG-44490
Change-Id: I859f50d739ed059d5b2dfe1a2efdf04b906891a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch includes setup of class member 'msg' in
QDBusMessagePrivate::toDBusMessage() to be able to get the
serial after message sending.
Testcases for comparing the 'reply serial to' with the 'serial'
are included.
Task-number: QTBUG-44490
Change-Id: Iae7c48f5b0c70a6c5ae500904072b38b46dfd876
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change the QWindowsInputContext::composition if it is called
with lParam has flags GCS_RESULTSTR and GCS_DELTASTART,
it doesn't call endContextComposition.
Task-number: QTBUG-49955
Change-Id: I49de3f239bf8a77414e433b255db08f227141158
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Takumi ASAKI <takumi.asaki@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
(cherry picked from qtbase/786984e7e47a63094ad64ec86a4892cc5c0ad6d4)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
On Android, back button will send a CloseEvent to the focused window.
This change will activate (focus) the Popup windows when they'll become
visible.
Task-number: QTBUG-46419
Change-Id: I6787435b24502bbf9a78662a0c6fd159d4ee2e8d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
On X11, QXcbVirtualDesktop represents an X11 screen while QScreen
represents an X11 output. In the case that there are multiple screens
(possibly with multiple outputs), calculate the screen number correctly:
Find the screen index on the primary virtual desktop first to avoid
obtaining a screen index which doesn't belong to the primary virtual
desktop when screen geometry is similar.
Change-Id: I4cbb29b7aa7cd2125759ffbbbe3db4e934feaeae
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Find the root widget only when more than one virtual desktop exists
and find the screen index using virtual siblings from this root
widget.
Use intersecting rects instead of middle point to obtain the screen.
This can help to get the screen index when the middle point is outside
the screen geometry, but part of the window is still on the screen.
If the widget is completely outside the screen geometry, -1 is
returned.
This commit amends: a6b2a4642f
Change-Id: I80247fc1956a82c487ee6f728d1576bf48b28748
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
This is a partial revert of eaa3a9d010
Task-number: QTBUG-50081
Change-Id: Ic3dc4daa90d7a968a4ebf45d3029c99a12985686
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Use QSharedPointer::create(), to fuse control block and
payload into a single memory allocation.
Change-Id: I8d87c73566c3be960e957ec0b5419a77da2fc8c9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
GCC 5.3's undefined-behavior sanitizer checks that the
declared type of the object is a base class of the
dynamic type of the object on each access to a member
of a class type.
It therefore requires the typeinfo for these types,
which for polymorphic types is emitted in the TU where
the vtable is emitted, too.
QFileDialogPrivate is a polymorphic non-exported class,
so this failed at link-time. Ditto for the other cases.
Fix by autotest-exporting the classs.
Also, where applicable, de-inline the dtors, so the
vtable (and typeinfo) are pinned to one TU, and the
ctor, just because it's the correct thing to do.
Change-Id: I2b7dba776282a2809c80eb2bc36440d7d698f926
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Remove a superfluous loop and thus the usage of QIncrementalSleepTimer
from QProcess::waitForFinished. We just wait for the process handle.
There's no need for a loop that checks multiple wait conditions.
This enables us to remove QWindowsPipeWriter from the Windows CE port in
a subsequent commit.
Change-Id: If6a82405227cf145263dba3726bae959e6871d0e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
...even if reserve() hasn't been called before.
[ChangeLog][QtCore][QString] resize() will no longer shrink the
capacity. That means resize(0) now reliably preserves capacity().
Change-Id: If499a20990bbf3a20553da14e50a42918d310c9f
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Added check for traiCollection selector.
Task-number: QTBUG-50159
Change-Id: Ie3efafe9e22e59aef862a681ad733f2bb0a5ba49
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
There's no variant with bool first argument.
Change-Id: Ib18b50ed6271d21253d075dc72b6e2b8744cf131
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
The function is not available on Windows XP.
Task-number: QTBUG-50188
Change-Id: I4ded1a4eb37af84979c3ce1a9af0d95da60b56ac
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This code seems to be hit three times per frame in a hybrid QQ2/Qt3D app,
quickly generating thousands of allocations here via the detach in begin().
Heaptrack confirms they are all gone now.
Change-Id: I7d09f3f5c2b24a2590b701216715055751306e82
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
openStandardStreamsFileDescriptors and openStandardStreamsBufferedStreams
fail on OS X: lseek somehow works on sequential streams (standard streams)
but QFile has pos() == 0 (since it's sequential).
Change-Id: I6a6161c012a91de189f59c533880fb8fe7a66d37
Task-number: QTBUG-49841
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
This patch fixes drag and drop operation on XCB platform when window
will be hidden. The window can be hidden during dnd operation by
switching virtual desktops or by minimizing all windows (show desktop)
using key shortcut.
The ShapedPixmapWindow must grab mouse before dnd operation if mouse is
not grabbed by other window (like in Qt4).
Task-number: QTBUG-46243
Change-Id: I807bc842719a2d0ea0f4dcb733c06c1fd08813e1
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
If we select XInput events, then when the mouse is clicked, there will
not be a fallback to a core pointer event. But a typical Qt application
doesn't own the root window. If the window manager (such as OpenBox,
Awesome or fvwm) relies on receiving core pointer click events, e.g.
to show a desktop menu, then each time a device is hotplugged while a
Qt application is running, we would select XI2 events and thereby
prevent the window manager from receiving them.
QDesktopWidget's native window is added to m_mapper, even when
it isn't mapped. Then after hotplugging there's a hierarchy event,
and that calls xi2Select for every window in m_mapper. The assumption
with this patch is that the root window does need to be in m_mapper
in case the QDesktopWidget is shown (that was done already in Qt 5.1:
fca94fa5ed), but xi2Select must avoid
selecting XI2 events on it to fix this bug.
Task-number: QTBUG-49952
Change-Id: I5c160e879d93fadfce14120ef2e89a4f71d4f599
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Each QGtk2*DialogHelper class owns a QGtk2Dialog. It is possible that
QGtk2Dialog's parent window is destroyed before QGtk2*DialogHelper.
Then the QGtk2Dialog is destroyed, because of the QWindow parent/child
relationship. Before destroying QGtk2*DialogHelper,
QQuickPlatformFileDialog calls QGtk2*DialogHelper::hide, which will
then operate on the already destroyed QGtk2Dialog.
Break the parent/child relationship when QGtk2Dialog's parent is
destroyed.
Change-Id: Ie2bda234f759e7bf4d0642accd82fdc38e0379c2
Task-number: QTBUG-49203
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
In 50bf54c invoking windeployqt was only required in release mode as
MDILXapCompile was not invoked for debug builds with Visual Studio 2013.
However, Visual Studio 2015 invokes MDILXapCompile for debug and
release. Hence we have to use this workaround unconditionally.
Also we cannot limit this to msvc2015 host specs only, as older projects
still might be loaded with Visual Studio 2015 causing the build to
break.
Task-number: QTBUG-49815
Change-Id: Ia120a392967319b945a9746ad489f2db0eed7156
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Windows 10 requires apps to handle the PrelaunchActivated property. This
enables a faster startup by launching an app and immediately suspending
it. This happens by the system and at the time the user launches the app
no library loading or initialization is required.
By default we opt-out of this and return early. The reason is that we
cannot know the type of application written in Qt and whether it breaks
the guidelines by using prelaunch. For further details check here:
https://msdn.microsoft.com/en-us/library/windows/apps/mt593297.aspx
Task-number: QTBUG-50292
Change-Id: I4d0b0b95a03f93b99211d042895404a88ea7cb9d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Instead of using a "custom wait function" in cases,
where a timeout is needed (like in qhostinfo_winrt.cpp)
we should have the timeout as part of our await
function.
By having one common place to handle this, we can avoid
unnecessary warnings, that might be caused by custom
functions. The current implementation in qhostinfo
for example causes at least 1 "originate error"
exception per call.
Change-Id: I7b6cfdfd861af2b0d271465eecaefe4a93e3109b
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
By using await instead of using a custom wait function we
get rid of a lot of "function was called at an unexpected
time" warnings and use the default way of waiting for an
asynchronous function to complete.
Change-Id: I6c5bf73ccf68a219b8f3facd3531873d7e8d4c67
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
That API has been available for WinRT and Windows
Phone for some time now. By using it to get the
machine name and for hostname resolution we can get
rid of some winrt-only code and use qhostinfo_win.cpp
on WinRT and Windows phone as well.
Additionally the required capability was added to
tst_qhostinfo so that this auto test can be run without
any manual editing.
Change-Id: I63fa5521bf8cdb0c919bd5a0100ea977c865622a
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Windows Phone 8.1 provides access to the camera button and press/release
events get passed as Key_CameraFocus and Key_Camera. Unfortunately a
release does not provide what has been pressed before, hence this
information needs to be cached when the press happens.
Done-with: Maurice Kalinowski<maurice.kalinowski@theqtcompany.com>
Task-number: QTBUG-39115
Change-Id: I6ce58a1f07a6bf7183b8d99a26e5cd7b0d32d6db
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This test seems to be quite broken on OS X: qWaitForWindowExposed returns
too early (while no window is on screen) so gestures can not be dispatched
QApplication::topLevelAt(pt) - returns null.
Use qWait + isExposed combo instead (similar to qWaitForWindowExposed, but
there is no isExposed test before the loop).
Change-Id: I85fbd773ccce0ca92b2dceb1749d67ef767aa0cf
Task-number: QTBUG-49849
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
_panTimer has a target - for example, widget. 'reset' should stop this timer.
The problem (quite subtle and difficult to reproduce) found in tst_QTouchEvent:
widgets created/destoryed by different tests but we still can have a timer
waiting for event dispatcher to 'processEvents', firing with now-invalid
dangling pointer - 'target'.
Change-Id: Iccaf3368a8ee6a0a2f60e9dcdf5d40fb7392ca21
Task-number: QTBUG-49844
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Trying to set data for a compressed cubemap texture face fails, because
the code incorrectly tries to bind to a cubemap face target.
This was already fixed for uncompressed textures. Instead of duplicating
the code, moved the texture binding/unbinding code to a RAII class.
Change-Id: I8f1cb7fc661b919200f85c3465d6e6e3c22d0871
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
QApplication::wheelScrollLines() was always 1 due it being a bool.
Task-number: QTBUG-49561
Change-Id: I83e97da3507c31dfd024db7bf543c4e6a3b4a98b
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
The #if had a condition that was needlessly hard to understand;
and was widely separated from its #else clause.
Change-Id: I43f4282993f4f2e8c4b5ad07dc2c2e06a6b95aa9
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>