The current implementation requests the platform window to set
the window state if it can, and return the actual window state
back.
The problem with this approach is that the platform window is created
as late as possible, so a call to QWindow::setWindowState would in
many (most?) cases never be forwarded to the platform window (instead,
the platform window is responsible to check the current window state
upon creation). As such, the window state might be left unsynched with
the platform window.
This patch suggests removing the return value from
QPlatformWindow::setWindowState. This will at least be consistent, so
that setting/getting state would produce the same result independent of
delayed window creation. If needed, we can later add new API to
QPlatformIntegration or QPlatformWindow for querying supported/actual
window state.
Change-Id: Ie43f56169656854a765ce88b47a808f8f3d51bb4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Proper variable initialization should fix crashs and black screens for
that example.
Task-number: QTBUG-27281
Task-number: QTBUG-27021
Change-Id: I538f233ea3c2faf6c1864c46be0d03828e92a110
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Those were using an inconsistent macro compared to the function
declaration in qdbusthreaddebug_p.h.
Change-Id: I3e77ba83ceedc99cb1f957fdfe318e34ab9c9628
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
These options were only used for QWS in 4.x, and their documentation
should have been removed as part of f220f99a6d.
Task-number: QTBUG-27369
Change-Id: Ia85a20bdac40087c02f6876f53ce21568759d697
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This ensures WA_MacNormalSize & Co. work (almost) properly.
Task-number: QTCREATORBUG-7966
Change-Id: Ib03b5c0f163409e2bc387f6cf9b56c72c43caec7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
For some reason, m_resolveSymlinks was never set to true for
non-Windows systems. The constructor set it to false and the
setter was only implemented for Windows.
So remove the member and code that is only executed if it
is set to true, except on Windows.
Change-Id: I386e980688a603475a413e2ef3628d0754778c5c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Instead omit the whole test when Q_COMPILER_LAMBDA is not defined since
the test is not relevant in that case.
Change-Id: I541da96a881fa0c9be38ae5c0f86df047dd8fc6b
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead omit the whole test when Q_OS_WINCE is defined.
Change-Id: Id6f4e65c994115b8bab45f9fbf21dd255d204ea6
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead omit the whole test when Q_OS_UNIX is not defined.
Change-Id: If0ee3345c25f6b1baa38845edfd08ec26a45d6f2
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead omit the whole test when Q_OS_WINCE is defined.
Change-Id: I356af3ea145012142b3cf2af0b5d813d4be07a25
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead omit the whole test when Q_OS_MAC is defined.
Change-Id: I7d35c99ecd69b3c5bb8f8590342edd9665300709
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Instead of allocating small chunks (40 bytes) on the heap, use a contiguous
array to hold them. This always occupies 10240 bytes of memory instead of
1024 (32 bits) or 2048 (64 bits) for the pointer array (plus heap memory
which depends on the number of items allocated), but is more cache-friendly
and uses less memory when the array isn't sparse.
To emulate the nullptr, a new bool has been added (doesn't change
sizeof(KeyboardLayoutItem)).
Also replace a few more magic numbers by symbolic constants.
Change-Id: I7160f600faddd63deea265c89dc6fd857c7b557f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
As an array of automatic storage duration, 'keyLayout' can never be nullptr,
so remove the respective check.
Change-Id: I2fb2db8311de55b41a1f9aef7c35341949e38e5a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Replace occurrences of a literal 9 that mean 'number of modifier key
combinations' with the new symbolic constant NumMods.
Change-Id: I1e78a1a3c00b81095450ec0557e30751da44c39a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
It's necessary to set the fieldGrowthPolicy on the QFormLayout in order
to have expanding fields on the Mac. Geometry formatting with
negative x and y values looks better. Display fewer
decimal digits for double fields.
Change-Id: Icb252c0c3fb7b605253e04c3361beba124570840
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
The -qtls option is needed when building with thread support so it can
use the local thread storage.
Change-Id: I693d944efddac911fe03b2c9a6b06a28f112b54d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
The content in the prl file is not compatible with what CMake
expects in the value of the IMPORTED_LINK_INTERFACE_LIBRARIES
property. That property expects a list of IMPORTED targets or
full paths to libraries.
The prl file gives us a whitespace separated string of content
suitable for passing to ld, that is, it contains -L and -l content.
As this would take a lot of error prone parsing in cmake code in
order to resolve the content to a list of full paths to libraries
(which can be processed by any cmake generator), it's better to
remove the code until qmake is able to generate a list of full
paths.
Change-Id: I72fe8e862b7f3bd25a7f9a03db94d2e9b815d08a
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This makes it a little bit easier for the reader to discover what
editable combo boxes are about.
Change-Id: I60ce571f01e32d4cacb4718b42a8e12884bd1c13
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This fixes several scaled constants on mac that are inherited from
commonstyle. (such as toolbutton arrows) It is probably easiest
to see when running Windows style on mac.
The problem was that the code assumed a default dpi of 96 would be
used on all platforms.
Change-Id: I83789589009b268dcb1d96629c3ec9e8f968a891
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
The object is used, amongst other things, as a target for
sending style animation updates.
Change-Id: Ic210e7ae2111bc08b70331a3a2030a494919a06d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
The test was not run so far and chances are that it would block
the CI completely.
So disable it for now, enable it again as soon as breakages have been fixed.
Change-Id: I452c02027b37a604eefbadb253c9a4d5041ef159
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Platform implementation for QWindow::setWindowIcon() was missing from
Windows platform plugin.
Task-number: QTBUG-27175
Change-Id: I6807d1ded057b7788a9f2fa5b143e212a666029b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Instead omit the whole test when Q_OS_WIN is defined since
the test is invalid on this platform.
Change-Id: Idb77df96b0c2a223cddbfffb4e24c6d1f5d33dfb
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead omit the whole tests when Q_OS_WINCE is defined.
Change-Id: Idb15d622c9e1dbe4c8ec6a43c34a88e7fef2a384
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Instead omit the whole test when Q_OS_WINCE is defined.
Change-Id: I19e35b837709c92e0202c6a96d113367bc6c92c2
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
If something had changed with the menu item before it had actually been
originally added to the native menu then this would crash when trying
to remove a null item from the native menu. This prevents that from
happening.
Change-Id: I8d78b5504759225364d5fd051a23c8d6dbd7d1eb
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Handle the non-toplevel child window case, where
QWindow has a parent NSView instead of a parent
NSWindow. QWindow geometry is then equivalent to
the frame geometry
Task-number: QTBUG-26972
Change-Id: Ie7cedb3ec1a564ce55b72e8269d4853962e073ce
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Still use it in qtestlib though because using qInstallMessageHandler
here would break all tests (still) using qInstallMsgHandler - Qt always
uses the new message handler if there's one, ignoring any message handler
installed through deprecated API.
Change-Id: I6fefefb315a2421425d2b7787e367fd348a33d83
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make sure that both debug and release versions of QML plugins are built
if Qt is configured accordingly. Also pass on the other QT_CONFIG configurations.
Change-Id: I4aaaf002068dd66277235bef7d1e3da3366d6d12
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
If custom cursor was set before the window was created, it didn't
actually get set, and in some cases even caused a crash.
Fixed by making sure the cursor is correct when showing widget/window.
Task-number: QTBUG-27535
Change-Id: I3bc946a9c406c96af5b86869a3a54893f8980aba
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
qstringmatcher.cpp and qchar.cpp are included in qstring.cpp and
qunicodetables.cpp is included in qchar.cpp so these files should
not be compiled as standalone objects.
Change-Id: I323e0878af28b9e5fb2f659fb8077347b93fa439
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The basic idea is that the platform theme is now responsible for
providing the pixmaps for the given standard name, or any file or
directory. Then, the QStyle implementation should query the platform
theme for the pixmaps, and build the icons accordingly using
ThemeHint::IconPixmapSizes. Same thing for QFileIconProvider. This
also opens future support for getting platform dependent pixmaps in
QtQuick components.
Also includes the implementation for the Cocoa (QCocoaTheme) and
Windows (QWindowsTheme) platform plugins.
Task-number: QTBUG-27450
Change-Id: I4e8406585d970a9af481be10f6643cf0abbc38a3
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
The QLabel is not actually used.
Change-Id: Ia3f43b734fa52ad002111943ed1ba55b9e8a678c
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This makes it possible for styles like Fusion to draw tabbars different
when they have a frame.
Change-Id: I1bb21198c0c3caf44c757f6f39310bf2509054bf
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
QStyleAnimation handles style animations in a generic fashion by
sending StyleAnimationUpdate events back to the animation target
instead of calling QWidget::update() directly. This decouples style
animations from widgets and makes it possible to run style animations
for QQuickItems (ie. the desktop components).
The next step is to add "QObject* QStyleOption::target" and use that
everywhere instead of the widget pointer passed to various QStyle
methods.
Change-Id: Ib963c54872805fc3f0123ff922f82c9962a68b90
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>