The target position is passed in physical native pixels, so call
QPlatformWindow::mapToGlobal() instead of QWindow::mapToGlobal().
The latter operates on logical pixels.
Task-number: QTBUG-55251
Change-Id: I789128a0a345d4113fced82ed1b215fe14044634
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
With object_parallel_to_source the workaround of making copies of the
files and using these is no longer needed.
Debug2.h and .cpp were added to the repository by mistake and should not
have been there in the first place.
Task-number: QTBUG-66059
Change-Id: Ib9dbd15be1dee1cb5190762fe06bad56dd40dd47
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Some compilers will assume src and buffer are different and only
vectorize the unaliased case and take a slow path when they are equal.
In our case they are as often equal, so we need to manually unalias the
variables to make sure both cases are fully optimized.
Change-Id: I6ec86171dd179844facdf45376253c55980d9e36
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The target position is passed in physical native pixels, so call
QPlatformScreen::availableGeometry() and QPlatformWindow::mapToGlobal()
instead of QScreen::availableSize() and QWindow::mapToGlobal(). The
latter two operate on logical pixels.
Task-number: QTBUG-55251
Change-Id: I281f47baee727bc0f4738fd6d6cdf12c9f462b0f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
All of these had already no effect.
Cleaned up a bit of code around old Qt 4 #ifdefs and
documentation mentioning Carbon.
Change-Id: Id2858c56a5785f82c47e20e1e760743fb4d08189
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
It looked inverted for some reason. A single line looks
better than before.
Change-Id: Icb214b44ddcc6e9e57fe12e7b4c3f512a5f66452
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
While the QPA theme provides support for dock widgets
title font we never use it.
This is a very similar solution to what we do in
QMdiSubWindow, setting the platform theme font at
few specific points.
This patch also fixes the dock window title font on
macOS, as queried in QCoreTextFontDatabase.
Change-Id: Ie264e4e83e0d3d1e8f78bd378359f3063cc1d525
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Not only they should not appear (icons in menus is a special
thing on macOS), they don't match the look on the window frame
buttons. So, it's better to hide them completely.
Change-Id: I8814ed3e128480abff4f53fdd40a0bb13f1796ef
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
There are a couple issues. Because the actual class for
the buttons returned by +[NSWindow standardWindowButton:
forStyleMask:] is private, we can't fully configure them
as we could with HITheme. Therefore, we don't get the
mouse hovered state and the zoom button will show the
fullscreen arrow instead of the '+' icon.
Hopefully, QMdiArea will go the way of the dodo soon
enough. It is not a thing on macOS and it has been
replaced by tabbed windows UI on most desktop apps.
Change-Id: Ia581f72611ad0224f42657afbc4d9f94bf5e5a3a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This is currently only used in QMacStyle since,
on macOS, the spin-box buttons are always beside
the line-edit. Hence, there is no need to tamper
with the line-edit frame.
Change-Id: I8ccfbab547fccae89a8ddeaeb7005cb17d5951e6
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Bonus changes in this edition:
* The focus frame shows only around the spin-box's
line-edit, as it should. This requires getting
access to the spin-box's line-edit, which we do
by setting a property on the former. Notice that
the stepper doesn't get focus. On this point,
macOS is inconsistent (partly because there's no
such thing as an NSSpinBox, and partly because
spin-box buttons are a separate control), so we
copy the same focus behavior as NSDatePicker.
* We clean some QFocusFrame related dead code in
QMacStyle::event().
Change-Id: I204ca2093d9db343c78f0420811dda35c463bbcd
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Regression after 114f795221, which incorrectly assumed that checking
qt_logging_to_console() was a safe behavior change to include.
Unfortunately that broke debug output in Qt Creator, as Creator doesn't
seem to run applications with a controlling TTY unless it itself was
started with one, and doesn't set QT_LOGGING_TO_CONSOLE to force log
console output either.
Task-number: QTBUG-66153
Change-Id: I775cb06953122a3f20c16bfe21e19de2d1aa5b52
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This way, it's lossless.
This commit is a cherry-pick of ab1e507574,
which was reverted.
[ChangeLog][QtCore][QVariant] Conversions of QDateTime to strings now
contain the millisecond components.
Change-Id: I5e421e32396d44e4b39efffd150b744e40fff3a1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Call the base class implementations to avoid returning an unmapped
values for non-embedded windows.
Task-number: QTBUG-55251
Change-Id: Ib05fd530498dd4d72d3d4ef37caf4e2f0ebcd2e4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Automatically printing the relationship between the view, platform
window, and window, makes it easier to track each object across
events.
Change-Id: I9fbfaa5c304849ed99dba3b5cd8e7449105d0307
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
AtSpiAdaptor::componentInterface was not checking the coordinate type in
GetAccessibleAtPoint.
Now, if the coordinate type is ATSPI_COORD_TYPE_WINDOW the coordinates of the
window will be added to the specified coordinates.
Change-Id: Iba571109a8da300f4141d616a94ef4ac87918f98
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
If the accessible description of a QLineEdit is requested and none has been
set, the placeholder text will be provided if one is available.
Change-Id: I4c0dad1d06fd3d8a6e00c963402d380c59bd7f05
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Passing on the thread ID is confusing, as it's not really what the
function does. The QNX code path can resolve the thread ID by itself.
Change-Id: I5f0d54621058576cdcf3707d36a11762fe2383c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The include is not needed and breaks build that do not have process
support.
Change-Id: I3951c24c950dd556a3b26744d8994709e294d397
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The actual implementation for Android will come later.
Change-Id: Ia68fcb03ea5d769d302ec6f77e5666292b567ffa
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
But they are movable.
qxmlstream_p.h:654:32: error: ‘void* realloc(void*, size_t)’ moving an object of non-trivially copyable type ‘struct QXmlStreamPrivateTagStack::Tag’; use ‘new’ and ‘delete’ instead [-Werror=class-memaccess]
Change-Id: I41d006aac5bc48529845fffd150e8115eb852034
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is similar to commit 342bb5b03a.
From GCC 8:
qarraydataops.h:84:17: error: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class QStringRef’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
[etc.]
Change-Id: I41d006aac5bc48529845fffd150e817e64973bec
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
From GCC 8:
error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of type ‘QJsonPrivate::offset’ {aka ‘class QSpecialInteger<QLittleEndianStorageType<unsigned int> >’} with ‘private’ member ‘QSpecialInteger<QLittleEndianStorageType<unsigned int> >::val’
from an array of ‘const value_type’ {aka ‘const class QJsonPrivate::Value’}; use assignment or copy-initialization instead [-Werror=class-memaccess]
Both types are standard layout and have the same initial sequence (one uint
member), so this is a valid copy. The only difference between the two is that
QSpecialInteger has a private member, whereas in the bitfield it's public.
Change-Id: I41d006aac5bc48529845fffd150e80585fd24db7
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It can be used by custom widgets or for example by
the Breeze style from KDE, which allows to drag windows
by some widgets.
It's important on X11 because _NET_WM_MOVERESIZE requests
induced by touch sequences require support from Qt.
Task-number: QTBUG-58044
Change-Id: I31c37534555a9050cf361cad85bdef13c2808572
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The first, isValidUtf8(), as the name says, returns true if the string
is valid UTF-8. As a bonus, it also returns whether it's valid US-ASCII.
The other two are meant to compare an UTF-8 string to either a Latin1
one or an UTF-8 one, without memory allocation.
Change-Id: Ic38ec929fc3f4bb795dafffd150ad0d63e28cd32
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
While we're at it, add a way to get it without the dashes too. I'm
calling it "id128", as in "128-bit ID", as seen in journald's sd_id128_t
type and the sd_id128_xxx() API.
[ChangeLog][QtCore][QUuid] Added a parameter to both toString() and
toByteArray() to allow controlling the use or not of the braces and
dashes in the string form.
Change-Id: I56b444f9d6274221a3b7fffd150cde706cfc5098
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
New members were added to QVarLengthArray and QVector,
but the engineer didn't document them. Since they are
only slightly different versions of existing functions,
their \fn commands were added to the eisting qdoc comments.
Some defined(Q_CLANG_QDOC) uses were also added.
Change-Id: I8a5505ca27efc9205b1387ed0be310e4b74ec490
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QtWidgets has one link to the linguist manual, so it needs
to see the3 index file for qtlinguist.
Change-Id: I2bbbc4cc9e6d43fed1b6cdee556bc9c4d5f01299
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
A \l was changed to \c to be consistent with all the other references
to the class name..
Change-Id: Ic7449a06e0a1f1d6d7087e11cc85258e81a0dfab
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Return types were missing from two \fn commands, but clang-qdoc
did not detect they were missing on macOS. clang-qdoc on linux
did detect them. This could mean there is a problem with the
function that matches a \fn signature with its declaration in
the database. It might be too forgiving.
Change-Id: I01f107a6162e2f36b594b5d3dd4029b8ef2db678
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is a standard feature in GtkEntry widgets or HTML
<input type="text"> elements. During a normal text selection by mouse
(LeftButton press + mouse move event), it's now possible to quickly
select all the text from the start of the selection to the end
of the line edit by moving the mouse cursor down.
By moving it up instead, all the text up to the start of the line edit
gets selected. If the layout direction is right-to-left, the semantic of
the mouse movement is inverted.
This feature is only enabled if the y() of the mouse move event is
bigger than a fixed threshold, to avoid unexpected selections in the
normal case. This threshold is set by the QPlatformTheme and a value
smaller than zero disables this feature.
The threshold is updated whenever the style or the screen changes.
[ChangeLog][QtWidgets][QLineEdit] Implemented quick text selection by
mouse in QLineEdit.
Change-Id: I4de33c2d11c033ec295de2b2ea81adf786324f4b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
__cplusplus was removed from the list of defines passed to
qdoc because it should not be there for clang-qdoc.
Change-Id: I32802e68d915f7a5b717f16ba26a1cd57d7ff645
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Properly set QStyleOptionViewItem::viewItemPosition to honor the css
Pseudo-States.
Task-number: QTBUG-27110
Change-Id: I9b9bb4913210feb665fd9d00a71dc4a953a93606
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>