As per today's change in the MIME spec.
https://bugs.freedesktop.org/show_bug.cgi?id=97372
Change-Id: Iba4fdd95c3ebec8a042404956db3466a46c97f1d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
checkReason_ActiveWindow() started failing on Windows when run together with
other tests, but still passed on its own.
The offending tests was checkReason_focusWidget(), which showed a window but did
not wait for it to be active.
After adding this wait the whole test executable passes on Windows as well.
Amends fd87c8da82.
Change-Id: I384bc45176fcd7bf6f491a4f39b46464ba45693b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Add qmake feature and configure option, which optimze the size of static
exectuable. Use for static build.
Enabled via configure --gc-binaries, or CONFIG += gc-binaries in 3rd party
projects.
Change-Id: I3c25b02caaef6a4afc6019afc9c67122dd11696d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
We need to make sure we don't emit CMake declarations for private
headers if those headers are absent. However, most of the time we have
private headers and should add them.
Task-number: QTBUG-37417
Change-Id: I639eb93d008de27928dedac540894af70c1883b9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This way the platform window is destroyed in a timely manner, preventing
redundant close events from the window system.
Task-number: QTBUG-43344
Change-Id: Ifdfca59ceacef54405f1c227c493dc514a1b27ea
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Instead of a local wrapper for it.
Change-Id: I0708dfad44b3db0c7a13e75ba5b4193ab50ac315
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Scale pixmap size by the viewport devicePixelRatio,
and make sure scrolling deltas and expose regions
are correctly scaled.
Change-Id: Ibeac34c5ecd531ca7c09802f0b5e1f45b8e31b65
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
GCC with LTO sees through our hack:
qprintdialog_unix.cpp:212:7: warning: type ‘struct QPrintDialogPrivate’ violates the C++ One Definition Rule [-Wodr]
qabstractprintdialog.cpp:49:7: note: a different type is defined in another translation unit
This hack was there so that the QPrintDialog functions in
qabstractprintdialog.cpp could use the d pointer. So instead of hacking
around the issue, just use the class that this file has access to:
QAbstractPrintDialogPrivate.
Change-Id: I3840d727dee443318644fffd1528e2e8b814e983
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
And move some logic into detectMenuRole(), where it belongs.
This refactoring will enable fixes for the issues below.
Change-Id: Id03bb5c26d7dd0bb3b94f01e69935e1f3321bb95
Task-number: QTBUG-17291
Task-number: QTBUG-30812
Task-number: QTBUG-38705
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
In this edition:
* Use Objective-C properties where appropriate.
* Use recently introduced qt_objc_cast().
* Remove uses of foreach.
* Update copyright headers.
Change-Id: I2a07a7b6cab27b833e4deaeedf9563463ff55914
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
When a QToolButton has a fixed width and the text is too long, the text
was cropped which made the button look ugly.
Fix it by eliding the text in the middle in this case.
Task-number: QTBUG-64132
Change-Id: I7bc46d1edcf4e67b5e1a5b651d4793f9ffa15310
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Placing a boolean between two pointers means we'll have a 7-byte padding
hole (64-bit). So move it to the bottom of the class, consuming the tail
padding that needs to be there anyway on 64-bit systems.
On 32-bit Unix systems, the better place would be at the top, as the
parent class (QDialogPrivate) has a 3-byte tail padding. But that's
fragile, as QDialogPrivate can change, doesn't apply to MSVC's ABI and
doesn't gain us anything on 64-bit.
Change-Id: I3840d727dee443318644fffd1528e4f05f4142bd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It was already deprecated in the documentation, just use
the QT_DEPRECATED macros.
Change-Id: Ie9ba7dd36af8e4eb5bddb7429182db98c7c638f5
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The output directory may be the same as the source directory in
the case of an in-source build, but Xcode treats the SYMROOT as
a build directory, and automatically excludes it from Time Machine
backups, which may result in not backing up sources.
Instead we map SYMROOT to an .xcode subdirectory of the output
directory, and then use CONFIGURATION_BUILD_DIR to make sure
the final build targets end up where they used to.
Task-number: QTBUG-52474
Change-Id: I3852ca9088e75ca62fca4c1217b5485175d9436f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Implement more consistent behavior for drawTiledPixmap(),
which should produce the same visual tiling pattern
independent of display devicePixelRatio
Consider the following pixmaps and draw calls:
QPixmap px32; // 32x32
QPixmap px64; // 64x64
drawTiledPixmap(QRect(0, 0, 128, 128), px32);
drawTiledPixmap(QRect(0, 0, 128, 128), px64);
On 1x displays this will produce 4x4 and 2x2 tiles,
respectively.
On 2x displays this would previously produce a different
tiling pattern, where the paint engine would tile in
the device pixel coordinate system. Change this to
tile in the device independent coordinate system,
producing the same visual tiling pattern as the 1x case.
It is possible to produce a 4x4 tiling pattern with
high-resolution output from the 64x64 pixmap by setting
the devicePixelRatio:
QPixmap px64;
px64.setDevicePixelRatio(2);
drawTiledPixmap(QRect(0, 0, 128, 128), px64);
This change adds an inverse scale to the image filler
transform that accounts for the pixmap devicePixelRatio.
[ChangeLog][QtGui] QPainter::drawTiledPixmap() now
tiles in the device independent coordinate system.
Change-Id: I4918d274192967f222f181b374571c7c597dcd76
Reviewed-by: Jonathan Courtois <jonathan.courtois@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: 石博文 <sbw@sbw.so>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Set the devicePixelRatio to 1 on the scaled down pixmap.
A scaled down version of the high DPI pixmap is added to the NSCursor in
addition to the high DPI one, but the devicePixelRatio must be set
correctly on the smaller of the two for macOS to pick the right image
to use on a high resolution display (retina).
This change also fixes the problem that only a high DPI custom cursor
with a hotspot in the upper left quadrant is applied by macOS. I suspect
that the NSCursor was discarded by macOS, because the hotspot was
outside the device independent bounds of the smaller scaled image.
Task-number: QTBUG-52211
Change-Id: I7e552e8f62f5255dd3786da44b2f619f6790c37a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
the dependency paths are fixified against the output directory, so we
must resolve them accordingly.
Change-Id: Id92750aad358153bd2db5daca3194c54eda58dbb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Otherwise, we'll end up with corrupted memory when using
QRegExp from multiple threads.
Amends bbdc1b5ccb.
Change-Id: I9d35897629d0bc26503aa0c537c5f99013921fdd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
this variable hasn't been used in any syncqt.profile for many years, and
if it would, it would cause quite some side effects.
Change-Id: Ia936eff8f6a2a801fc644eee991821165d51dc1f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Writing out the $TARGET_plugin_resources.cpp file in !build_pass breaks
when TARGET is adjusted by $qtPlatformTargetSuffix values. We end up
writing out $TARGET_plugin_resources.cpp but the debug Makefile looks
for $TARGET_debug_plugin_resources.cpp.
Try using the pro file name as name source instead, as suggested by
Ossi.
Task-number: QTBUG-67931
Change-Id: I221cf9b2ec1db699568d0c73513aa66ecf0ada97
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Although QPainter::drawImage()/drawPixmap() would render images scaled
according to their devicePixelRatio(), that would not happen for
drawTiledPixmap() and when using a textured brush. Implemented here,
in combination with the pending "High-dpi drawTiledPixmap (raster
paint engine)" commit.
[ChangeLog][QtGui] Fix drawTiledPixmap() and texture-brush painting with high-DPR images
Task-number: QTBUG-67248
Change-Id: I037e3f897fa708038a0222d3b0c61c7842d87961
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The list of tab bars in QMainWindowLayout::animationFinished()
is apparently modified by animations. Take a copy before
iterating over it and showing the tab bars.
Amends ba2221bd73.
Task-number: QTBUG-67916
Change-Id: Ib3a70eeac1f3b3f0dd7bd5d37aa6c34b92a55086
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
- Don't use QCursor when we can position a mouse relative to the
window coordinates via QTest::mouse*() functions. Even the way
QCursor was user here seemed to be hackish. This hack apparently
was there to make the test pass on macOS, I have verified that
the updated test continue working on this platform.
- Remove Q_OS_QNX ifdef, as this test does not depend on QCursor anymore.
- Remove QTest::qWait()-s. Unconditinal waiting should not be used.
- Add better comments.
- Other minor things.
And move tst_QComboBox to use QTEST_QPA_MOUSE_HANDLING code path.
Eventually we want to deprecate the legacy code path.
Change-Id: Ib72f324b5197d0fd66fc32b8c1c7509e58838e04
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The code was written before 5.10 was released, but took long to be
merged.
Change-Id: If90a92b041d3442fa0a4fffd15286fe079b058e1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
don't put them into GENERATED_HEADER_FILES, as they obviously cannot be
found in a pre-synced source dir. instead, let the injection code itself
add them to INJECTED_HEADER_FILES.
Task-number: QTBUG-67813
Change-Id: Id2a7c565b14fcba8aba9d1dd8b1dd39c586d0d91
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
these are actually redundant with INJECTIONS.
Change-Id: I0a71930401e00d30c9898b4d958de5e89c496d18
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Use ptr.operator->() instead of ptr.data() for getting the raw pointer.
[ChangeLog][QtCore][QtGlobal] Q_DECLARE_PRIVATE can now be used with
std::unique_ptr and other smart pointer types.
Change-Id: I7f3f698d7bac477f2185837681e366057d292588
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add calls to changeKeyboard() to the QWindowsKeyMapper constructor
and the handling of WM_INPUTLANGCHANGE so that the locale is
correctly initialized and changes are processed.
Change-Id: Ia30d8c6434ca85165e4882240ae16f9a75dcf4ff
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Remove the hardcoded mapping from the key table for fallback keys
since the keys are locale-dependent.
Task-number: QTBUG-57992
Change-Id: I016ab5f7f7e8abfd30f6416d2e7597db7deecb9b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
A <br> has a new-line but no text, so be able to handle no lines.
Task-number: QTBUG-60853
Change-Id: I3d4dbd529114bbe8afe760c3622b52446202ec7c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Introduced by mistake in f55c73ede2
Change-Id: Ieac8fc0a6bb536e5ef3770a22785fe41d4033ee9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Some of our examples, and perhaps also some applications,
call requestUpdate() immediately after producing a
frame. This can cause Cocoa to immediately start
(trying to) draw a new frame without processing e.g.
input events.
This should (and will) be handled by rate limiting
updates with CVDisplayLink. In the mean time fall back
to using the base class QPlatformWindow implementation,
which is implemented using a timer, which will allow
for input event processing.
Change-Id: Ic2541f344b2f4018d785404a06274959a7bad2df
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
According to Apple's documentation, there's no delegate
in NSFontManager. We set its target instead. The action
is changeFont: by default.
Change-Id: I8c01bfa97c78dd8097f38c27353748d13f51489f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
We also ask the parent style to draw the header label
instead of the base style which is more likely to respect
other text related parameters.
Change-Id: I6dd658fa4d016a76d7c450478dc42f07e4b807c4
Task-number: QTBUG-33855
Task-number: QTBUG-37153
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>