testdata needs to be deployed to temp and current directory
needs to be set to that directory for the test to succeed.
Change-Id: I2dd023af9073d90afbb4ad60fcfb50bb1af4e159
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
WinRT does not allow do connect to the localhost due to security
constraints and sandboxing. Hence we need to disable those
currently.
Change-Id: Idb8c71397a41e5fa5bad9d618dba1bb389e71b9c
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
That feature is a poor man's session management for applications
that do not implement any specific session management features.
It badly interferes with proper session management support, so
applications must be able to disable it.
This enables fixing applications with
QGuiApplication::quitOnLastWindowClosed() true - the default -
dying too early, before they are enumerated for the list of
applications to restart on session restore, thus preventing them
from being restored. See
https://bugs.kde.org/show_bug.cgi?id=354724
[ChangeLog][QtGui] Qt asking to close windows on session exit as
a fallback session management mechanism has been made optional.
Disabling it fixes session management for applications that
implement full session management. See
QGuiApplication::isFallbackSessionManagementEnabled().
Task-number: QTBUG-49667
Change-Id: Ib22e58c9c64351dea8b7e2a74db91d26dd7ab7aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Instead of casting the function in the calls to EnumFontFamiliesEx(),
use the correct signature and cast inside the callbacks. Also
avoid unconditionally casting the TEXTMETRIC parameter to
NEWTEXTMETRICEX since according to documentation
NEWTEXTMETRICEX is passed for TrueType fonts only.
Task-number: QTBUG-50804
Change-Id: I0393474ac06000fc3f12d2dbc2a5aa37a6b44849
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Up to now, the download folder display name was queried using
FSFindFolder and kDesktopFolderType. Now that NSFileManager can be used
unconditionnaly, the query has been replaced to use NSFileManager.
[ChangeLog][QtCore][OS X] QStandardPaths now returns the correct
display name for the download folder.
Task-number: QTBUG-50262
Change-Id: Ie16c8daea3261a4dd5ca051956fc08d51656e0fa
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
systemd >= 209 merged the individual libraries libsystemd-journal,
libsystemd-login, libsystemd-id128 and libsystemd-daemon into
a single library, libsystemd. To ease the transition one could pass
an option to its build to generate stub libraries and matching
pkg-config files. With systemd >= 229 this option has now been
removed, causing the build to fail when the journald option is
enabled.
Change-Id: I26670f207f1a9e79c16be5ce8c8a49353143c5ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Prevent potential detaching by using constBits()/constScanLine() instead
of bits()/scanLine().
Change-Id: If03f8d4d3b8ed4c07aed5eff7f580e57ca771919
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QPlatformWindow::mapToGlobal() should be used to obtain global coordinates
for foreign/embedded windows. They do not have a parent QWindow, but the
geometry passed in might be local to their native parent window.
For normal top-level windows, this is a no-op.
Task-number: QTBUG-50206
Task-number: QTBUG-41186
Change-Id: I00889b28db69ae65057f48b9e74bd4d8cfffa136
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Ensure no detaching occurs by using Container::constFirst()
and QImage::constScanLine().
Change-Id: Ie197d795d9329de8be76ed388ba2c71ccf201f5c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Running on Raspberry Pi casting to IInputPane2 fails with E_NO_INTERFACE
as there is no input pane available for the device.
However, if E_NO_INTERFACE is returned from the lambda, then deletion of
the ComPtr holding the AsyncAction in runOnXamlThread() crashes
somewhere deep internally of Release().
As we do not check for the return value anywhere, avoid the crash by
returning S_OK instead.
Change-Id: Icd38ec482b365285a482e5ff792ec1b4f13317d5
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Change-Id: If31dd078aeb92e479db8c1f0a5e58e56b549b5f6
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Those were added in ancient times to make QWindowsPipeWriter compile
on Windows CE. It was never used though.
Change-Id: Ica71b182f7ee4e47d9e33638d78475842b2ecdff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
... for poor compilers (such as GCC).
The test (!d) was changed to match what other
member functions test for, e.g. toVariantHash().
Change-Id: I85aee0df6e50da3623ad0afce24abb586e0bd1bc
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Convert rgba64 color table to a new rgb32 color table only once. Use
this cache when required.
This patch can 2x speed up gradient painting using 32bit color format.
Task-number: QTBUG-50930
Change-Id: I9212e01e397c2e0127cdf3070cc49880a2d8df88
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
TUIO is not a standard "device" as the first application takes
exclusive ownership, this patch makes it deliver the events to the root
window when the app is not focused, allowing for interactive
application development on simulators running on the same desktop.
To force delivery set the environment variable
QT_TUIOTOUCH_DELIVER_WITHOUT_FOCUS to 1
Change-Id: I157f59982a1b2025ef8efdf709fe40c78339c1b4
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Unbundled TUIO messages were being ignored. TUIO protocol
defaults to bundled but states it should work with any
Open Sound Control (OSC) implementation. Unbundled handling
was already in place, just fixed the logic to make it work.
Change-Id: I6d91449bd2069ac891e493fb7f50c010bcc3e8be
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Blacklisting all tests, which were failing locally.
Task-number: QTQAINFRA-949
Change-Id: I40c25ab0155b8977596d61297ab252a546515f87
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
Introduce utility function to check using
QWindowsXPStylePrivate::isLineEditBaseColorSet().
Task-number: QTBUG-40634
Change-Id: Iaa6962a17217352aa59d0c54421b764ad47d3bf8
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Introduce QWindowsXPStylePrivate::isLineEditBaseColorSet() checking
whether the base color has been set in the widget's palette taking
into account the QSpinBox special case and simplify the code
accordingly.
Task-number: QTBUG-40634
Change-Id: I0e7527031b333d71727fbd30db6dd80aa715c9ab
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Labels would use a statically defined font for <pre> blocks.
Use the one defined by the QPlatformTheme instead, through
QFontDatabase::systemFont(FixedFont)
Task-number: QTBUG-50564
Change-Id: I5491bd0defce651bdf809bcbc6a529a900f4959b
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
We would ignore the vertical hinting when calculating the
bounding box, giving an off-by-one error in the base line of
some characters when rendering with PreferVerticalHinting,
which is the default when doing High-DPI on Windows.
Task-number: QTBUG-50940
Change-Id: I2846765ec044eaf317026ee8c7bb9588257bf05c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Introduce a special scaling function fromNativeLocalExposedRegion()
for exposed regions that uses the floor of the top left point
and the ceiling of the bottom right point similarly to how it
was done in the XCB plugin in 5.5.
Task-number: QTBUG-46615
Task-number: QTBUG-50463
Change-Id: I95e4a571b814357c014605ed79e374a821fa155b
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
The layout and phrasing of these two QFileSystemEntry methods was such
as to obscure what they actually test. (Overlong lines, extraneous
parentheses, spurious conditions and poor line-breaking.) Rewrote to
make both clearer; and, in particular, to make it obvious that they
are *not* mutually complementary. Behavior is not changed.
Change-Id: If748e48d41fe3a76bab3a1f840c7b7ca62442f8f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Move code from QWidget::setMask() and reimplement QWidget::setMask()
using QWindow::setMask().
Task-number: QTBUG-50938
Change-Id: I040688d6b18df91368fa6ab6392a3b4cd80f2683
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
It does not work as expected since the QLineEdits do not expand.
Amends b880b7e1ac.
Change-Id: I0b3b3822cca7fc6442a7155eecd46bd3d134d069
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
In the gray antialiasing code path for text on Windows, we
check whether Cleartype is enabled in the system and,
if it is, we forcibly enable gray antialiasing instead. But in
this logic we did not consider the case where antialiasing
is turned off entirely, i.e. when the style strategy is
QFont::NoAntialias. We should never override
no-antialias with antialias.
[ChangeLog][Windows][Text] Made it possible to disable
antialiasing for text when drawing into images.
Task-number: QTBUG-47141
Change-Id: Ieb2beba8c2d02295abe6d9a98d2e63a2d39c9e6a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
If a menu is added to the tray icon after the icon itself has been registered,
we need to register the menu properly.
Change-Id: I19a6d78848142d66c2cd882746d8d55c0b9a2818
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
This method can be called for a submenu after it's called for the top-level
menu, and we should not replace it with a submenu.
Change-Id: I8e180ee074287cfcdc76dfe77c6c7aa7d5891741
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Transfer propertiesUpdated and updated signals from submenus to parent
menus. Without this, the adaptor only receives this signal from top-level
menu items, and doesn't receive it from items of submenus. Connect to
these signals when a menu item is added or synced, and disconnect when it
is removed.
* Make QDBusPlatformMenus use IDs of items containing them, not their own
IDs (own IDs do not make any sense since they are not exported over D-Bus).
* Store toplevel menus per-adaptor, to make it possible to export multiple
menus (for example a menubar and a tray icon menu).
* Adjust the QDBusMenuLayoutItem::populate methods to always get the menu
via its containing item and to populate the menus recursively.
* Map D-Bus menu AboutToShow method to platform menu aboutToShow method,
and map hovered and closed events to hovered and aboutToHide signals.
(QTBUG-46293)
* Always set the visible property on item. Otherwise, when an item becomes
visible, the D-Bus menu still thinks it's invisible because that property
was not changed back to true. (QTBUG-48647)
* Call emitUpdated from insertMenuItem and removeMenuItem methods, as they
really update layout. Do not call it from syncMenuItem, it changes only
properties but not the layout.
* Start revision numbering with 1, because libdbusmenu-based hosts ignore
updated signal with revision=1.
Task-number: QTBUG-46293
Task-number: QTBUG-48647
Change-Id: Icf713405db0443e25462c1a19046df7689fe5e78
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
It's used as a global static but according to library policy it's required
to have a trivial dtor and a trivial or constexpr ctor, otherwise it
runs code at library load/unload.
Change-Id: I1fcea3ce388b2a198e3851e6d0aeb91ae0a8e4b1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Consider a window which was hidden and shown with hide() and show()
methods and mouse pointer was in window when hide() was called.
At first, window got focusOutEvent and then Qt library sends X server
a message to unmap the window.
Then X server will send client two messages:
1) FocusOut(10) detail=Nonlinear(0x03)
2) FocusIn(9) detail=Pointer(0x05)
QXcbWindow has a logic for not seting active window to 0 if there is
a FocusIn coming (see QXcbWindow::doFocusOut).
So QGuiApplicationPrivate::focus_window still points to the current
window.
Then when show() is called, qt compares previous focus with new focus
and, since they are equal, doesn't do anything. Event focusInEvent
isn't delivered to the window.
Here are two links why X server sends FocusIn just after FocusOut:
http://lists.freedesktop.org/archives/xorg/2008-December/041684.htmlhttps://tronche.com/gui/x/xlib/events/input-focus/normal-and-grabbed.html
Proposed fix ignores FocusIn events with detail==Pointer.
The text of explaining comment is taken from the Chromium project:
https://chromium.googlesource.com/chromium/src/+/master/ui/views/widget/desktop_aura/x11_desktop_handler.cc
from X11DesktopHandler::ProcessXEvent function.
[ChangeLog][module][Linux/XCB] Fix not delivering focusIn event on
hide/show with XCB
Task-number: QTBUG-49071
Change-Id: I433c8b638834c25f113cc134ee4185778c44f540
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
This patch fixes cursor shape when mouse leaves the window and enters
the window again with pressed mouse button - ignore the mouse enter
and leave event when any of mouse buttons is pressed.
Task-number: QTBUG-46576
Change-Id: Id6ce50cd0d66da51a251d4811bc42cd31606de29
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Added enter/leave event handling in XInput2 to avoid problems with
those events when the mouse is grabbed.
This commit amends: 53d289ec4c
This commit amends: ed2e157803
Task-number: QTBUG-50340
Change-Id: I7a120b46daa4f8fa4c218346273ae90b6abfa156
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
-ldl option was used unconditionally while libdl is not supported
when libc is static.
Add build test to configure which checks if libdl is supported.
QMAKE_LIBS_DYNLOAD in "src/corelib/plugin/plugin.pri" is now used only
if libdl is available.
qt_linux_find_symbol_sys from qlibrary_unix is now used only if
QT_NO_DYNAMIC_LIBRARY is not defined.
Initially reported by Buildroot autobuilder here:
http://autobuild.buildroot.net/results/a85/a85a1839a45fb6102e53131ecc8f6dadf92bcdc2
Change-Id: I0397472456efdc4f3ab5f24d01253bee8048a9d1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
In a case of having a non English system locale, then the face and name of
the font may be localized but will not match up what is in the registry.
Therefore we need to try with the English name if is possible that there
is one, so in the case of when registerAlias is false we should try to get
the English name if necessary.
Change-Id: Id1064b6f5263677320374dbddfad852f30f041c5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>