Fixing miscellaneous rendering issues to make the WindowsVista
style look good on High DPI displays:
- Fixed size/resolution of combo box arrows, and changed to native look.
- Fixed vanishing horizontal line in the frame of line edit widgets.
- Fixed gaps in combo box popup.
- Fixed size/resolution of arrow in push button menu.
Task-number: QTBUG-49374
Task-number: QTBUG-65237
Task-number: QTBUG-65238
Change-Id: If68c2fae7472def3c19636483af741ca8ed2c490
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Fixing miscellaneous rendering issues to make the Windows
style look good on High DPI displays:
- Fixed size/resolution of combo box arrows.
- Fixed size/resolution of scroll bar arrows.
- Fixed size/resolution of check boxes.
- Fixed size/resolution of radio buttons.
- Fixed the frame of default buttons.
Task-number: QTBUG-49374
Task-number: QTBUG-65237
Change-Id: Ib7e2ef2ed027c50dbac23b16a73f7033000552f1
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Commit a56ee60791 changed type of advance
to short, restoring this fixes at least some cases where glyphs were
disappearing.
Task-number: QTBUG-65838
Change-Id: I33b252d91fb7541eaea3275b1950a048941869a6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
In remove(const QString &str, Qt::CaseSensitivity cs)
call remove(QChar c, Qt::CaseSensitivity cs)
if str.size() is equal 1. It prevents quadratic behavior
for that case.
Change-Id: I9a7ab3019c580343533c8c6c6a04b6b0c8c1fb55
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Currently, code paths that call QWindowsWindow:setCustomMargins()
automatically also activate the window (=give the window focus).
The reason for this is the call of SetWindowPos (Windows API)
without the flag SWP_NOACTIVATE.
From the Windows API documentation about SetWindowPos() about the
flag SWP_NOACTIVATE:
Does not activate the window. If this flag is not set, the
window is activated and moved to the top of either the
topmost or non-topmost group (depending on the setting of
the hWndInsertAfter parameter).
It seems the flag SWP_NOACTIVATE is accidentally missing in the
call of SetWindowPos() in setCustomMargins(), especially since
the flag is present in pretty much all other calls of SetWindowPos().
The obvious fix is to add the flag SWP_NOACTIVATE to the call
of SetWindowPos() in setCustomMargins().
So far, this issue exists for a long time, an was possibly
introduced with commit f5fd534603, where setCustomMargins()
was initially added.
Change-Id: Id3f058f8762df17eb3f033ab0b3e1791283937fc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Fix warnings:
QtEdidSupport: WARNING: qtbase/src/platformsupport/edid/qedidparser_p.h does not have the "We mean it." warning
QtEdidSupport: WARNING: qtbase/src/platformsupport/edid/qedidvendortable_p.h does not have the "We mean it." warning
Amends 5f7ab88055.
Change-Id: I3868096344480d509d7b7c1833389adaa67623a0
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
WindowScreenChanged events might be reported repeatedly from the QPA backends
until the event has reached GuiApplicationPrivate::processWindowScreenChangedEvent()
which sets the screen. Ignore events in case the screen is already correct.
Task-number: QTBUG-65580
Task-number: QTBUG-62971
Change-Id: Ie5fc9830771e816db942355efbe5a48e829914cb
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
My assumption before was that show() method calls exec(), but it seems
to be vice-versa and so QML applications using QFileDialog were not able
to open dialogs as they use visible property, which in turn calls show()
method. I made the show() method to call new openPortal() method where
I moved the actuall DBus call from exec() method. The exec() method now
internally calls show(), at least this is my assumption and it seems to
behave like that from my testing.
Change-Id: I27a5b0198e9ff1a9ea031f9ae45b57ceae99c6ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts commit ab1e507574. That was
supposed to be a minor behavior change, but ends up having visible
effects such as QtXmlPatterns xs:dateTime type now reporting sub-second
fractions. So we're reverting in 5.10 and re-applying in 5.11.
Change-Id: I741e49459c9a688c1c329d6cbd521cd4a0b2aa84
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
If the QLoggingRegistry gets called as part of the static initialization
phase, it would call into Android's QStandarPaths implementation, which
assumed that the HOME env. variable was already set. Since the variable
isn't set before main is called, QDir::homePath() returns the root path,
which would be cached and always returned.
With this fix we now call Android's getFilesDir() directly, which will
always return the right path. Since the font locations are also relying
on an environment variable being set, we no longer cache that either.
Task-number: QTBUG-65820
Change-Id: If45f3d5f0e87b808a62118ae95c31b492885646a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Actually check that there's a T where ISO 8601 wants it (instead of
just skipping over whatever's there), with something after it; move
some declarations later; add some comments; and use the QStringRef API
more cleanly (so that it's easier to see what's going on). Simplify a
loop condition to avoid the need for a post-loop fix-up.
This incidentally prevents an assertion failure (which brought the
mess to my attention) parsing a short string as an ISO date-time; if
there's a T with nothing after it, we won't try to read at index -1 in
the following text. (The actual fail seen had a Z where the T should
have been, with nothing after it.)
Add tests for invalid ISOdate cases that triggered the assertion.
Task-number: QTBUG-66076
Change-Id: Ided9adf62a56d98f144bdf91b40f918e22bd82cd
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a9c111ed8c)
Don't prepend the default suffix to the NSSavePanel allowedFileTypes.
"If no extension is given by the user, the first item in the
allowedFileTypes array will be used as the extension for the save
panel." The user expects to get the suffix displayed to them in the
drop down filter, not the default suffix set by the developer.
Apply the default suffix if neither the user or the NSSavePanel
provide a suffix.
Task-number: QTBUG-66066
Change-Id: I64093b9f3178bd2377a7b65d6f23aed6214a4119
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
On Android, we load the application library, and its dependencies (Qt),
on Android's main thread (thread 0), and then spin up a secondary
thread (thread 1), that we call main() on.
If any QObject is constructed during loading of the application library
or any of Qt's libraries, via static initializers or constructor
functions, we will set QCoreApplicationPrivate::theMainThread to
thread 0, which will confuse Qt later on when it's being run on
thread 1, and will result in a warning during QCoreApplication
construction:
QApplication was not created in the main() thread
This situation can easily lead to a crash as well.
Unfortunately logging via qDebug/qCDebug and friends will trigger
this too, as they internally use QObject.
Fixing the root cause of this is under investigation, but for now
we will partially revert fa2a653b3b for Android. The effect
is that any qCDebug with a "qt.*" category before qApp construction
will turn into a no-op, like it was before fa2a653b3b.
This patch does not cover the case of a regular qDebug, or a qCDebug
with a non-Qt category. Those will still produce the same symptom,
as before fa2a653b3b.
Task-number: QTBUG-65863
Change-Id: I95675731d233244530d0a2a1c82a9578d5599775
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Instead of trying to detect situations where we need to send a real
expose event instead of an update request in response to a drawRect
call, we keep track of when we've asked the view to display due to
a requestUpdate call, and only deliver the corresponding drawRect
as an update request if no other code has asked the view to
display.
This should cover all cases of asking the view to display, issued
from our code or from AppKit, such as the view changing its backing
scale factor, or otherwise needing a real expose event.
Task-number: QTBUG-65663
Change-Id: I1783787823aee889dad8e48f34a1cb0f1b7b06bd
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
When using QFileDialog::getOpenFileUrl() with dir set to e.g.
"sftp://foo/bar.cpp" we call q->selectDirectoryUrl("sftp://foo")
followed by q->selectFile("bar.cpp").
Inside QFileDialog::selectFile() we unconditionally convert "bar.cpp"
to an absolute URL and then call d->selectFile_sys("$CWD/bar.cpp")
This then calls platform integration that detects that an absolute URL
is being passed to selectFile() and therefore overrides the initial
directory.
Initially reported as https://bugs.kde.org/show_bug.cgi?id=374913
This is a regression that appeared some time between Qt 5.7.0 and 5.7.1.
I have not had time to bisect this but the only commit that may have
change behavior in that time range appears to be
007f92c6ee.
Change-Id: I6968abe9ed5c5b9de067c453a7e9d2c5cdb3a190
Reviewed-by: Christoph Resch
Reviewed-by: David Faure <david.faure@kdab.com>
On platforms such as XCB, the drag cursor pixmap is shown via a window
(a QShapedPixmapWindow) under the cursor.
The mouse button release event at the end of the drag is received in
this QXcbWindow, but intercepted by an event filter that QSimpleDrag
installs on the QApplication. It then resends it unmodified(!) after
the drag has ended and the drag pixmap window destroyed, causing it to
be delivered to the new top-level window.
The local coordinates in the unmodified QMouseEvent are local to the
drag pixmap window and don't match the window it is delayed-transmitted
to.
This ends up having fatal, user-visible effects particularly in Qt
Quick: QQuickWindow synthesizes a hover event once per frame using
the last received mouse coordinates, here: the release posted by
QSimpleDrag. This is done to update the hover event state for items
under the cursor when the mouse hasn't moved (e.g. QQuickMouseArea::
containsMouse). The bogus event coordinates in the release event then
usually end up causing an item near the top-left of the QQuickWindow
to assume it is hovered (because drag pixmap windows tend to be small),
even when the mouse cursor is actually far away from it at the end of
the drag.
This shows up e.g. in the Plasma 5 desktop, where dragging an icon
on the desktop will cause the icon at the top-left of the screen (if
any) to switch to hovered state, as the release coordinates on the
drag pixmap window (showing a dragged icon) fall into the geometry
of the top-left icon.
QSimpleDrag contains a topLevelAt() function to find the top-level
window under the global cursor coordinates that is not the drag
pixmap window. This is used by the drop event delivery code.
This patch uses this function to find the relevant top-level window,
then asks it to map the global cusor coordinates to its local
coordinate system, then synthesizes a new QMouseEvent with local
coordinates computed in this fashion. As a result the window now
gets a release event with coordinates that make sense and are
correct.
Task-number: QTBUG-66103
Change-Id: I04ebe6ccd4a991fdd4b540ff0227973ea8896a9d
Reviewed-by: Eike Hein <hein@kde.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
QHeaderView is doing a complete rebuild of the sections when the layout
changed because everything could have happened. But since layoutChanged
is also called during e.g. sorting, the old data must be restored when
possible.
Task-number: QTBUG-65478
Change-Id: I088d4d843cad362b97df6dc5e0dcb9819b13547f
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
[ChangeLog][QtCore][QBitArray] Added fromBits(), which creates a
QBitArray from a dense bit array, and bits(), which returns that.
Change-Id: Ia9c88b83534240a5872dfffd150b1c8b1c36ced5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit introduces minimal support for instrumentation within Qt.
Currently, only LTTNG/Linux and ETW/Windows are supported.
Change-Id: I59b48cf83acf5532a998bb493e6379e9177e14c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's vectorized, so it should be faster than this version.
Change-Id: I56b444f9d6274221a3b7fffd150c1519eb999cdc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
isLatin1(QLatin1String) is provided for completeness sake, in case some
generic code operates on both QLatin1String and QString/QStringView.
Change-Id: I5e421e32396d44e4b39efffd150b99a18eedf648
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This patch fixes the strange behavior when selecting text.
This patch (on a Left To Right text) makes sure that:
- the left handle will select text only on the left & above of the right handle
- the right handle will select text only on the right & below of the left handle
For RTL is way more complicated:
- the left handle is acuatually the right handle but on the left side and it acts as a right handle
- the right handle is acuatually the left handle but on the right side and it acts as a left handle
Change-Id: Ifca591398103199d5aef479f0a080161c9f44c0e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This way the user will not cover with his finger the text with the cursor/selection.
Set the tolerance to 0.5mm which is less then the width of the thinnest letters (e.g. i, I, l)
Change-Id: Ia5d50bd3f4fe79c89d01b3d7f5e5c22e94e8158b
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Allowing empty selections leads to strange behavior, it switches from selection handles
to cursor handle.
Change-Id: Ida69346e2a47b13c92cfd68a555d6b94422bb580
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
On Android if the edit control is bigger than the remaining screen we resize it, this caused the
handler(s) to remain outside the control.
A better fix will be to ensure that the cursor/selection remains visible when the control is resized
but I don't know if this is the desired behavior on all platforms.
Task-number: QTBUG-62994
Task-number: QTBUG-58700
Change-Id: If43eb7bc1ecde426697694a8f26118e95fccb80c
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
There was missing update in setTreePosition() or better to say update
was but in not that part of QTreeView that needed. Now QTreeView
correctly updates and paints tree decoration in a new place on
changing tree position.
[ChangeLog][QtWidgets][QTreeView] Fixed missing update of QTreeView
on changing tree position.
Task-number: QTBUG-65980
Change-Id: Id79ab8fcb39d511245a551068640684dd2a10cb9
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Two small changes late in the review process were flawed.
Change-Id: I4b1f6e3fdb8e17000a2e11bc30aae1b29d9f43a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QXmlStreamWriter does not: it just writes the QString inputs to the
output.
QXmlStreamReader does: it first converts the QString to UTF-8 and stores
locally. Then it tries to decode using the XML encoding header.
Change-Id: I39332e0a867442d58082fffd1503d7652cb9fbff
Reviewed-by: Martin Smith <martin.smith@qt.io>
This is in preparation to adding CBOR support. We don't need yet another
dir for CBOR and placing it in src/corelib/json is just wrong.
Change-Id: I9741f017961b410c910dfffd14ffb9d870340fa6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QAbstractItemModel::dataChanged() gained an optional role parameter
with Qt5 which was not filled within QListWidgetItem/QStandardItem
setData() functions
Task-number: QTBUG-55903
Task-number: QTBUG-63766
Change-Id: I4da9346ef8401cc8633dc4b2ea7d00451d1e3942
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
File system operations like renaming/removing may fail on Windows when
file system watchers are present. Add functions to
QFileSystemModelPrivate to temporarily remove the watchers prior to such
operations and to restore them in case of failure. Use them for
rename/remove (within a feature check for QFileSystemWatcher
and Q_OS_WIN).
Task-number: QTBUG-65683
Change-Id: I90142901892fbf9b1e1206a3397a95ffd3c8f010
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
With this change it is possible to use all supported
configurations in different backends without any new interfaces.
Change-Id: Ib233539a970681d30ae3907258730e491f8d3531
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Variable was added in e2e874415e
but is not used anywhere.
Change-Id: Iff1e7c20317bb489978eb77d24b8da12493d7e45
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
The backwards iteration was done under the assumption that the only
valid modification of the winEventNotifierList in a slot connected to
activated() would be the removal of the notifier itself. This is wrong.
Instead, iterate forwards, like before 85403d0a, and check the index
against the current list size in every iteration. This ensures that we
do not run out of bounds while the list is modified.
Also, retry the activation loop if the list was modified by a slot
connected to activated(). This ensures that all notifiers with signaled
handles are activated.
Task-number: QTBUG-65940
Change-Id: I25f305463b9234f391abc51fe0628d02f49b6931
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: Ib9a1b107dd8d2cd4bf541c3edf19a602fde6356f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This way, it's lossless.
Change-Id: I5e421e32396d44e4b39efffd150b744e40fff3a1
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 1.5.3
Change-Id: I8c0caec3c92ba199b1a3baac9a523cc399c8001f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
All of our compilers support #include <immintrin.h>, so we don't need
the legacy code that includes the earlier versions.
Change-Id: I938b024e38bf4aac9154fffd14f80214d1d744c8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Without this, building Qt and Qt applications fails with GCC 8.
The errors look like this:
writing to an object of type ‘class QPointer<QQuickPointerHandler>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess]
Task-number: QTBUG-65691
Change-Id: Ie5a30814125deca7a160b9a61f5aa3f944ee1ac9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix regression from commit 8b3a120a where also dialogs
got NSResizableWindowMask, making them have a Zoom
button.
Task-number: QTBUG-65668
Change-Id: I21054b3aa6fc11eab3d93f78ede44ae771522e2c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Adds inline handling of the C++17 type std::variant, so the type will
be resolved if converted into a QVariant.
Change-Id: I31809d70d7f347277389d42a3695836ec7a32d02
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When the application is hidden then Qt will hide the popup
windows associated with it when it has lost the activation
for the application. However, when it gets to this point it
believes the popup windows to be hidden already due to the
fact that the application itself is hidden. As a result,
when the application is restored it causes a problem with
the still visible popup window as it is taking the input
events without responding to them.
Therefore we need to explicitly hide the windows right before the
application is hidden to ensure that they are actually hidden
correctly.
Task-number: QTBUG-58727
Change-Id: I4be1e1c0b1388d0c9ec872e7732185670998b7af
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The linker complains:
LINK : warning LNK4281: undesirable base address 0x67000000 for x64 image; set base address above 4GB for best ASLR optimization
And it's not really required anymore, as the recommended /DYNAMICBASE is
the default.
Change-Id: I56b444f9d6274221a3b7fffd150caab1beecfd43
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Commit 29bc68cf16 added support for
unsigned and commit 5ff7a3d96e later added
support for int. This commit adds support for qsizetype, which isn't int
on 64-bit platforms.
We do this by reorganizing the code and using the generic version of
__builtin_{add,sub,mul}_overflow from GCC 5 and Clang 3.8, which ICC 18
seems to support now too on Linux. That leaves older versions of GCC and
Clang, as well as MSVC, ICC on Windows, and the GHS compiler, to use the
generic implementations, as I've removed the assembly code those
versions of GCC and Clang on x86 are now uncommon.
Note: any older version of ICC probably breaks. We only support the
latest.
Change-Id: I9e2892cb6c374e93bcb7fffd14fc11bcd5f067a7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
It did not make it into 5.10 as far as I can tell.
Change-Id: I01f950c476f2c98f4ed40d2cafd15ecc112a3427
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
CT_LineEdit is as well, so that makes QLineEdit free
of HITheme APIs.
Change-Id: Ia02ce9f1003e5ae9c8bf47dab9ada030feca98ba
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
For some reason the cups options are kept globally instead of per printer at QCupsPrintEnginePrivate
so when setting the printer options on accepting the print dialog, we first need to clear them
and then call the other functions that set them, otherwise, we will "reuse" cups option set on
the previous print.
How to reproduce:
* Open print dialog, set some advanced option to a non default value, easiest one is print in grayscale
* Print
* Check it prints in grayscale
* Open print dialog, check the advanced options are all on default values
* Print
* Check it incorrectly prints in grayscale
Change-Id: I59aacaf30db844ad40887d6b771f9354557852b6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
When original QNetworkRequest is missing "Host" header (which is the most
common case), it is provided automatically from request URL. However,
resulting header is appended to the list, i.e. after all headers specified
by user, which may include a big bunch of cookies.
To the contrary, RFC 7230 suggests: "However, it is good practice to send
header fields that contain control data first, such as Host on requests
and Date on responses, so that implementations can decide when not to
handle a message as early as possible". Many other user agents are
following this suggestion.
Task-number: QTBUG-51557
Change-Id: I1448ed3ae124f5ce86a8ca8ff35f5d05476a005d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Extract a helper function to determine the window title from QXcbConnection
and add an invokable function to the native interface that dumps the window
tree similar to existing functionality on Windows.
Change-Id: I5544d69ea2b801eb16d3b5b8d64021b3e567b0d8
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Add more queries, output the query enumeration value
and output the hints as flags.
Change-Id: Icfc648a8d6e144074455ecebae1b25c3c3e1063e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
While menubar actions are hidden, as menubar was too narrow
to contain them, by clicking the blank area, where the action
was supposed to place, can still trigger the action.
Task-number: QTBUG-65488
Change-Id: I6b137e0717f634ebd3371dbcc2c1ce2089688374
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Since braille characters are not included in Apple Unicode MS, we
extend the fallback to include Apple Symbols to cover those too.
Task-number: QTBUG-63510
Change-Id: I3977f1f9b7370a9fe9cfde643c86518e006c050a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Follow the example of the other modules and explicitly mention
the valid licenses on each module landing page, optionally
combining it with trademark information.
Change-Id: I9f1fea0f002e0ab607da89a0cbfe7c53060582d7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Setting speed to 0 means the current frame will continue to be shown,
the finished signal is not emitted, and state remains QMovie::Running.
Task-number: QTBUG-65758
Change-Id: I681d902e3211c5899b21043e5177b7c73d5d3fb5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
There's no external arm assembler to fall back on here. The
actual assembly is already disabled since 8072c36eeb,
but passing the empty assembly file to any random external
assembler could end up producing an empty object file for the
host environment instead of the target, in a cross build.
This wasn't an issue as long as the clang compiler only was identified
as g++ within mkspecs, making no_clang_integrated_as a no-op. If
the mkspec actually identifies it as clang, this config can't
be added here.
Change-Id: I0f20b9b2a8d13b5e7e1b654e391d88b639c031bf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The macro Q_DECLARE_INTERFACE declared some qobject_cast() functions
that clang-qdoc must not see in the contexts where the macro is used.
This update prevents that from happening by ensuring that Q_CLANG_QDOC
is not defined when the macro is defined.
This update also adds a \fn command for a declaration of qobject_cast()
that was missing in the documentation. There are two versions of the
function, one with a const parameter and one with a non-const parameter,
and they both share one qdoc comment.
Change-Id: Ic74d0aaae62767cd0391474ee95ae3f4f820b06e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The functions had been added without documentation.
This update adds the documentation.
Change-Id: Ib29e9356b26c248b5fcc9f13ecf77371fbae054a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Fixed many cases of missing return types in \fn commands.
Added a fake GLxxx typedef for a GL type that wasn't there
because the GL includes weren't accessible. Also added some
fake declarations for a few functions declared in namespace
Qt in QtWidgets that must be seen by qdoc in QtCore.
Change-Id: Id82476042d0563d32fa85c4ae81a58c1298a468a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Adding larger pixmaps to the icon caused the icon to grow.
Task-number: QTBUG-38776
Change-Id: I29148d70afa55e287f2ad254e449a98c4aa631fb
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Add larger pixmaps for the dock title bar icons; override
them by the XPM in fusion style to maintain the behavior.
Task-number: QTBUG-38776
Change-Id: I7d0e022bbf620d2aad2b6ee011b8bb9a745d7c3b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Make way for adding dock title icons to QCommonStyle.
Task-number: QTBUG-38776
Change-Id: If1729478f55f0bce5e04399d0cca98afd2facb31
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Passing -1 to waitForReadyRead() may cause it to wait for some time
but the data retrieved may be enough for processing. So if 0 is passed
from read, indicating that there is potentially more to come, then
it will do a waitForReadyRead() then for more data to come.
Change-Id: I75f270d1f124ecc12b18512cc20fb11f7a88f02e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
sljit, the JIT in pcre2, doesn't quite fully work on windows on
arm yet (although the subset of functionality used by pcre2 might
mostly work). On arm64, it fails to compile (although working around
that failure is pretty easy), when using clang in MinGW mode
(where __GNUC__ is defined, making the JIT auto-enabled).
Disable it in these configurations until it has been fully tested
and fixed upstream first.
Change-Id: Ie9681cb7cdd1960586ba194c71e057eb918cb419
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Correctly scale the requested geometry in the constructor
of QWindowSystemInterfacePrivate::GeometryChangeEvent().
Amends 3a31c70879.
Task-number: QTBUG-57608
Task-number: QTBUG-65580
Change-Id: I0ef60deda69bb61ab57972e02c342b7773e1da6b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This affected PE_IndicatorCheckBox in some cases.
Change-Id: I6f10dabd2ca4093f4c1bdaa2bd0ebf73c02e8d12
Task-number: QTBUG-65737
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Yulong Bai <yulong.bai@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
By ensuring that the current index follows the focus of an index widget,
we can ensure that moving the cursor will happen in the way that is
expected from the focused widget.
Task-number: QTBUG-27793
Change-Id: Ia36891a94ce41c7d12fba678de23a6f3b69374ae
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
While touching the code, move initialization from
body of ctor to initializer list
Change-Id: Idfcb4fb771d1414268f8685874395ca54b20621a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Both ICC and MSVC have bugs concatenating strings and that's despite the
standard giving an example ([lex.string] table 9) that says that
u"a" "b"
is the same as
u"ab"
We can't change to preprocessor concatenation (u ## STR) because that
fails when QStringLiteral is used with a macro instead of an actual
string literal.
Task-number: QTBUG-65479
Change-Id: I39332e0a867442d58082fffd1504a0a868c291ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The action which added by QMenuBar::addAction(const QString &text) already
connected relevant signals and slots implicitly, however, while
QMenuBarPrivate::updateGeometry -ing, it reconnects them
if there's a extension button associated with a hidden popup menu.
In that case the QMenuBar::triggered would be fired twice.
Since the QAction's ownership may be changed or added dynamically,
there are still very rare cases like several widgets share the same
QAction object to result in this problem.
[ChangeLog][QtWidgets][QMenu] Fixed a bug in QMenu that caused QMenuBar::triggered
to be fired multiple times.
Task-number: QTBUG-25669
Change-Id: I4d52e82a2136a992e0b37118e41237d96a2c5d22
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
On some combinations of RDP client and server a large mouse cursor
results in a hang of the RDP session. However, the 'touch' drag
facility (creating a transparent window) works just fine, so use
that when encountering a large cursor on RDP.
(The threshold of 96 for a 'large' cursor was extracted from the
spec, as that is the largest supported size mentioned.)
Change-Id: I9782c45e8bd6640f36bb5a392961681a99e214e6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The Embedded Android build (Boot to Qt Android injection) is defined by
having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined,
as well as having Qt config android-embedded.
This commit enables the possibility to build embedded Android builds.
(i.e. Qt build for Android baselayer only, without JNI)
Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The fixes included undocumented enum values, which are now
marked as omitted, adding a test for Q_CLANG_QDOC for a
couple windows enum values, adding \fn commands for a pair
of member functions in QLocale, and a \fn command for an
obsolete function in QSqlError.
Change-Id: I12a8ea7287039096b9cfe7870d2ab213a3d78dcf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The fixes included adding missing '!' characters to qdoc comment
markers, correct misspelled words, adding documentation for an
anonymous enum type, and replacing Q_QDOC with Q_CLANG_QDOC.
There remain 12 qdoc link warnings in QtBase.
Change-Id: I00447722e6e029f5aed273b3cd571cef33c119b4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The size of the QStaticText was always adjusted, even if setTextWidth()
was used. Now size of the QStaticText is calculated according to
the set width of the text, and if no width was set, then the
automatically adjusted size is used.
[ChangeLog][QtGui][QStaticText] Fixed explicitly set width not being
respected.
Task-number: QTBUG-65836
Change-Id: If2f9f6952fb168f4bcb6d8fabfdc7360f8a36485
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Improves performance and STL compatibility by adding rvalue versions
of prepend and insert.
[ChangeLog][QtCore][QVarLengthArray] Added rvalue overloads of
prepend and insert.
[ChangeLog][QtCore][QVector] Added rvalue overloads of prepend
and insert.
[ChangeLog][QtCore][QVarLengthArray] Can now contain movable but
non-copyable types, such as std::unique_ptr.
Change-Id: I6c946acc5b67502c91c52ac5dea67cedb1af93a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QStaticTextPrivate::paintText() now uses QColor(0, 0, 0, 0) to mark
body text. QPainter's pen color was used before this commit
(that was always black) that leads to different colors of body text if,
for example, links are in body (first block painted with correct color
set by QPainter::setPen() but after link body text was always black).
Now QPainter::drawStaticText() will draw body text with set pen in
any case.
[ChangeLog][QtGui][Important Behavior Changes] Fixed a bug where
QStaticText would not use the QPainter's pen color for text when other
text colors were also in use. Internally this reserves
QColor(0, 0, 0, 0) for use with QStaticText.
Task-number: QTBUG-45957
Change-Id: If3e180e3083cdac1b4236e738acd15572f19ab69
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
A large plugin dll (e.g., one with many MB of debug info) could cause
a 32-bit application to crash when the entire dll file could not fit
within the address space of the process. The code for validating a
plugin library and retrieving metadata from it first tried to map
the entire file in memory, which failed for large files, returning
NULL. In this case, the code tried then to read the entire file via
QFile::readAll(), which deep below caused a bad_alloc exception in
malloc, resulting in the termination of the application. This change
handles the case where the library could not be mapped into memory,
in spite of memory mapping being supported, by reporting the error
and returning false, making the plugin unavailable.
[ChangeLog][QtCore][QPluginLoader] Fixed a bug that would cause the
Qt plugin scanning system to allocate too much memory and possibly
crash the process.
Task-number: QTBUG-65197
Change-Id: I8c7235d86175c9fcd2b87fcb1151570da9b9ebe3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
We unconditionally tried Any-ing out various tags of a locale without
checking the remainer weren't Any, which would get us the C locale in
some cases where we might have done better. So check some retained
tag isn't Any before Any-ing out any tag.
In the process, add a separate variable for the ID with likely tags
filled in, to distinguish it from the supplied localeId (thereby
somewhat clarifying what's afoot) and save duplicating the
construction of this.
Task-number: QTBUG-64940
Change-Id: Ibd9f1aba6862434cf00fbf77ba00288ac9a50a3b
Reviewed-by: Jason Erb (Suitable Technologies) <erb@suitabletech.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We do add, remove or update third party code in minor releases,
sometimes even in patch level releases. However, the documentation is
supposed to be valid for all existing Qt 5 versions, but doing this for
attributions would require infrastructure we don't have.
Therefore rather make it explicit which Qt version the attributions
apply to. Also mention since when Qt is available under LGPLv3
(starting with Qt 5.4).
Task-number: QTBUG-65665
Change-Id: I328b5bf0c143f78ea61aad51f0644c3cbb6dee49
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Gcc 8 now warns against casting functions taking references to
functions taking pointers:
warning: cast between incompatible function types from ‘QVariant (*)(const int&, const int&, double)’ to
‘QVariant (*)(const void*, const void*, double)’ [-Werror=cast-function-type]
Suppressed by casting over void(*)().
Change-Id: I48bee53253b8e87110e8a49efa761fc2add89c5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QItemDelegate::doLayout added a margin after the checkbox which is not
done within QCommonStylePrivate::viewItemLayout. This created a small
but visual difference between using QItemDelegate or QStyledItemDelegate.
The additional margin was removed from viewItemLayout somehwere between
4.4 and 4.5 so it was intentional.
Change-Id: I2fc3f287fe8b181355edeebec9626c49d85fe74d
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
The __fastcall calling convention is silently ignored on other
architectures. The GNU attribute regparm is allowed but doesn't
make sense on x86_64. On other architectures, the attribute isn't
supported at all.
This fixes building with clang for MinGW/ARM and ARM64.
Change-Id: Ice1c6eadd0e90b2e5e34736542ee49a25dc67fe6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Don't use the full size of dest in strncpy, we override the last byte
anyway afterwards.
Change-Id: I9f1618cc9019e0060f01deed58a726caa1989d3f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The native APIs don't support previous transition, only next after a
stipulated date. The prior code started its search at the epoch; if
used for a time before the first transition after the epoch, this
found no transitions so returned invalid data, when the last
transition before the epoch would have been suitable. It also wound
through all transitions since the epoch, on its way to the selected
time, which was potentially laborious.
Instead, start a year before the stipulated time; this should get a
transition if the zone uses DST. If it doesn't, start with the first
known transition and binary-chop our way to one within a year of the
last before the stipulated time; then wind forward one transition at a
time, as before. The chopping is actually faster than binary: each
time we find a transition after the interval mid-point but early
enough, we move the early end of our interval to the transition, which
is later than the old interval's middle. Using halving, starting with
a vast interval, should thus only incur modest cost, while ensuring we
give up early when no transition data is available at all or the
zone's first transition ever was after the stipulated time.
Task-number: QTBUG-65443
Change-Id: I96c14540fc2600837e6a22e480fb8dc36cb37220
(cherry picked from commit 7c0b706488)
(cherry picked from commit a090076e93)
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Jason Dolan <jason.t.dolan@gmail.com>
use a "use" entry instead of including the transitive dep into the list
of libraries.
this also removes the redundant check of freetype features from the
fontconfig test code.
Change-Id: I86b78028255c9bf0a62be5ec0f97a62ef3fda36f
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Don’t crash on focusObjectChanged to a QWindow with
a null QPlatformWindow.
Change-Id: Ibf426521d6c8f8b2b2e94d5b92020fa510a74133
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Use Ids from newly introduced id attribute depending
on the global form setting.
Change-Id: I0a5094d5543c0714c88511fa159b60afc9be3c81
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QSettings does not preserve the original key type in the registry, it
will set the type for the key based on the value that is being set.
Therefore we should make it clear that existing key types will be
overridden as this can cause some problems with types we do not
directly support (such as REG_EXPAND_SZ).
Task-number: QTBUG-2894
Change-Id: Ib2f2eed02759591e69fefb98a4a1f3cf897dd5cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Windows on arm (which uses clang, or msvc, but no gcc is available for
that setup) can't assemble these sources.
(On linux, builds with clang force deferring it to the external
assembler, but for windows on arm, no gas compatible external
assembler is available).
Change-Id: I139572257884cfdc57d3c32061a8c2e28c6e24de
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Showing file dialogs if running on a system that has an older GTK3
version installed results in a crash. Do a version check at runtime
and disable native file dialog support if the version is too old.
(GTK3 bug: https://bugzilla.gnome.org/show_bug.cgi?id=725164)
Change-Id: I77bd23f1298333412bae04f52153e1a224ddf470
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Although qt_create_pipe() tries again if the pipe name is already
in use, it doesn't handle the case when another user has created
the pipe with the name (the error is "access denied" in that case).
The chance that it happens is small, but it can be entirely
eliminated by including a unique part in the pipe name, in this
case the PID.
[ChangeLog][Windows] Named pipes internally created by QProcess now
contain the PID in their name to ensure uniqueness.
Change-Id: I079f1b68695c1ddea3eccad241061d11e08b60f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This update corrects several qdoc warnings about undocumented
parameters, which are actually caused when the return type is not
included in the \fn command, or when the return type is mis-specified
(includes static, or lacks needed template parameters).
Change-Id: Ic49139b88424e93609fbd01bc0836436d13a8f9a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Several uses of #if QT_CONFIG(vulkan) were modified to
for classes QVulkanFunctions and QVulkanDeviceFunctions
was added to qplatformvulkaninstance.h, because the
include file that contains them doesn't exist when
vulkan isn't there.
Change-Id: I392202ab5fe9bb4c558a991870e6ebf79254aec0
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Added void return type to several \fn commands.
The return type should always be included with
the \fn command in clang-qdoc.
Change-Id: Ie751eb1430eff668f33f8d86e0b1454bd1d2f582
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
clang sees the comments inside #if 0 blocks when they
occur in source files. Therefore qdoc comments can't
appear inside those blocks.
Change-Id: I5c9c7e9e002042710a5c26252bc7029b2d163dcf
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Some enum values were qualified with the enum name, which is not
required in the \value command. The qualifications were removed.
Change-Id: Ic67003ae04b558f437b331bd3e01af88ace0e888
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This update also corrects all the remaining qdoc warnings
in the mnodule.
Change-Id: I1cea2cb1dd515d075a1e49a52ca78fc407c3a324
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
After including windows.h, interface is a define that expands to
"struct" (unless WIN32_LEAN_AND_MEAN is defined). This name is
used as a normal identifier in multiple places within Qt.
This has already been worked around in a number of places
(in e.g. 3ba61d9baa and
786d23bb49).
After qrandom.h was included in <QtCore/QtCore>, this header
implicitly includes <random>. In libc++ on windows, this header
then transitively includes windows.h, exposing the clash with
the name "interface" in even more locations than before.
For cases within qtbase internals, it could also alternatively be
handled by defining WIN32_LEAN_AND_MEAN while building QtDbus, but
for occurrences in public headers, the undef trick needs to be
used.
Change-Id: I89754f38f55ae7f2145255a2c8a71b23492be6a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Makes it easier to copy and paste the snippet into a code editor.
Change-Id: I27c0a7aa268bd4fd0af885e929f67a28f083dabf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Regressed with ff67dedaaf
Before ff67dedaaf the print dialog
would not let you select less margin than the minimum printer
supported margin, this brings back the old behavior
Change-Id: I22f4e8ebf8ffa7c1653d61b7073a9ee582cf453b
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
QCommonStylePrivate::viewItemSize did not adjust the width when the item
had a decoration or a checkbox. This lead to a too big width used for
the layouting and therefore sometimes the calculated height was too
small.
Task-number: QTBUG-30116
Change-Id: I4468daa9820b9a8aa00fe959ab9b73fec23cc24e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QSortFilterProxyModel::clear() and filterChanged() are deprecated since
Qt4.3 but not annotated with QT_DEPRECATED.
Change-Id: Ia468203802b6be0596f0a48d51f1da3fa55b724b
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This fixes small and mini checkbox and radio button
focus rings since the previous HITheme removal patch
(90c9370d50). But also allows to properly draw
the focus ring outside the widget's boundaries, as
it's common in macOS.
More importantly, we pave the way to use QFocusFrame
for most widgets and, eventually, implement the focus
ring animation.
Finally, we tweak the spacing between the indicators
and their respective label.
Change-Id: I4bf7ac1a06ce924a043f0365e487777d0b20a104
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Passing parameters via auto to a lambda function is a c++14 extension
which is not supported by gcc4.8.
Change-Id: I335b2a2f5ba02f5440c2e7ccc81d4156e8b29484
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
When QFile::open is called with the NewOnly flag, the call will
fail if the file already exists. As usual, if the file does not exist,
it will be created. Like QTemporaryFile, there is a guarantee from
the operating system that you are not accidentally creating a new file
on top of an older file. When QFile::open is called with the
ExistingOnly flag, the call will fail if the file does not exist. The
ExistingOnly flag only provides new functionality when used with the
WriteOnly flag. For ReadOnly it provides no change in functionality,
as ReadOnly by itself already never creates.
Task-number: QTBUG-52244
Change-Id: I8e3206728f245f95172c225bf297023fb078fc6d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Add a check on the platform window to QWidgetPrivate::create_sys().
Task-number: QTBUG-65783
Change-Id: I077882e1cf22ef49bb6f578f7460493ef48c9627
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QStyle::pixelMetric(QStyle::PM_FocusFrameHMargin) was called three times
in the worst case but it returns a constant value. Therefore cache this
value and call pixelMetric() only once.
Since this code is duplicated from QCommonStylePrivate::viewItemLayout()
also change it there.
Change-Id: I6d5f0a8d2b1373bd36f0520f404e6a3cb0794f12
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
When in full screen, then the geometry available is the whole screen
not including the menubar or dock area. This ensures that it does
not leave space for the dock area.
Task-number: QTBUG-39403
Change-Id: I15d7b7764d83282e1ee057628680a338b72711a6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
CUPS has a complex way to configure colors for printers, and this can not
be represented only by radio buttons.
Because of that all colors related options will be available only in
the advanced panel.
The color/grayscale option will still be available when printing to a file.
Change-Id: I1592e779009bd80b6dfc18dde760db4154e46439
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
clang needed to see so type definitions that aren't there
for some platforms, so this update provides defaults when
qdoc is running.
Change-Id: I15e635b31dd651457f828f90c8dd132959c826e6
Reviewed-by: Martin Smith <martin.smith@qt.io>
When a deleteLater event is queued, a check if done if the same event
for the same receiver is queued before by scanning all pending events.
This leads to quadratic behavior, which is quite noticeable. By using
an unused bit in QObjectData, this can be prevented. Now the duplicate
event scanning in QCoreApplication is only done for the quit event.
Task-number: QTBUG-65712
Change-Id: Ie505acbbec802f91ebd0b94ac067e362c2476113
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
IBus 1.6 will remove the deprecated DBus APIs; GetAddress() GetEngines()
These APIs are replaced with DBus GET properties.
Change-Id: I427494dd0685d523ac07366be528127d98ad7d7c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The changes introduced in 0e810e27a5
turn out to be incompatible with our style sheets styling. We
partially revert the style option state check, so that the look
for a highlighted PE_IndicatorMenuCheckMark only depends on
State_On, as it's expected in QWindowsStyle and QCommonStyle.
[ChangeLog][QtWidgets][QMacStyle] PE_IndicatorMenuCheckMark
goes back to only depend on State_On for its highlighted look.
Change-Id: I20f8e712196b5515bd5528ff6eedcdca9df5856f
Task-number: QTBUG-65773
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
If the stylesheet does not have a rule that manipulates the font at all
for the menu item, then it should use the one passed into the style
option instead.
Task-number: QTBUG-65034
Change-Id: I6cae3fad3cc22d5ab2b984e4a58b14303bcd6d03
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
This also fixes focus ring thickness on retina
displays except for radio button, for which we
don't allocate enough space around. Instead of
going down the push button madness we currently
have, we leave it as is (i.e., slightly truncated)
until we can come up with a more sane solution
regarding focus rings.
Change-Id: Icd4aa2e08c2558768c91efd7d119879e249b052f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Using Core Graphics or AppKit has no real advantage.
Change-Id: Ie7e2df23f8da6ca4798092a7c074bbb2f40e2b18
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The protocol may be namespaced, in which case the string lookup would
fail, so we iterate the protocols of QNSWindow instead (of which there
is only one, QNSWindowProtocol).
Change-Id: Ic45752c9e3a40f5d42ec82c4287402a3d7a47b09
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The documentation of the QImage file loader methods contained a
simplified and somewhat misleading description of the format auto
detection algorithm. Fix up the language and link to the detailed
explanation.
Task-number: QTBUG-51596
Task-number: QTBUG-65438
Change-Id: I33ebc81c78e685c7ec4803fa56efd4e9cbc4eda5
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Generate it only when the form contains some actions.
Change-Id: Ic1d64003ccff6102174771c04999cf7c90ac2ae8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Generate it only when needed.
Change-Id: I7a89b18ec0f2ee7d55fcad1b3f9701269d7616ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Qt was missing symbols for many dead keys defined in <X11/keysymdef.h>.
These dead keys were thus ignored by the "compose" input module. This
commit adds the missing dead key symbols.
[ChangeLog][Linux/XCB] Added missing dead key symbols, enabling their
use with the "compose" input module.
Task-number: QTBUG-56452
Change-Id: Ib5c37168990c9d9fa99fdd50f63b934c793e8dc4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Matt Whitlock <qt@mattwhitlock.name>
Added many template clauses to \fn commands. Also added or
modified some uses of Q_CLANG_QDOC in some dbus include files
to work around some seriousl ugly template clauses that could
not be added to \fn commands. Also modified a few parameter
names in the documentation.
The first attempt at making this change caused syncqt to fail
to create QtDBus/QDBusPendingReply. This second attempt works.
Change-Id: I96c1fb9bcb1d9debf9409f6baf8c42e18fb9e75d
Reviewed-by: Martin Smith <martin.smith@qt.io>
... that will be used if an icon can't be found in the
current theme.
The Icon Theme Specification
https://standards.freedesktop.org/icon-theme-spec/latest/ar01s05.html
states that unthemed icons must be searched in the base directories,
i.e. /usr/share/icons, ... But in practice unthemed icons are
installed into /usr/share/pixmaps and this dir is not used as
a base dir for icon themes. So it's better to explicitly specify
fallback dirs to avoid needless access to the filesystem.
Also some KDE application install their own unthemed icons
(into /usr/share/<appname>/pics), that can't be found by
QIconLoader. With this change it would be possible for them
to specify dirs with unthemed icons and thus be displayed
correctly in non-KDE environments.
[ChangeLog][QtGui][QIcon] Added fallbackSearchPaths() that
will be used to find icons missing in the current icon theme.
Change-Id: I0dc55ba958b29356a3b0a2123d6b8faa24d4c91e
Task-number: QTBUG-33123
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QMetaCallEvent references up, so we need to drop by one. In all other
cases, we need to drop the reference to zero and delete.
[ChangeLog][QtCore][QMetaObject] Fixed a memory leak that happened when
the new-style call to invokeMethod() was used.
Task-number: QTBUG-65462
Change-Id: I39332e0a867442d58082fffd15034b99e31c92a1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
One foreach too many, creating a temporary container.
Converted to range-loop, as drive-by change.
Change-Id: Ie2bb94a7147edcfc0d8b5f479604f5ebe113d7cb
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Added several missing template clauses to member functions.
Change-Id: I95b46de84c9afa74b74fc36818094b0fff41f755
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Added a few missing template clauses to member functions
of QVulkanInstance<T>.
Change-Id: Ie13f7e97f6a2183ee66d7ea275bc56a2bc3588e8
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Added a few missing template clauses to member functions
and friends.
Change-Id: Ie5ca557ddcc1dfd90ef5e80fc4e8213dfb32a03c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
struct FormatRange is contained in QTextLayout, so uses of it as
parameters in friend functions of struct FormatRange must be
qualified with QTextLayout::
Change-Id: I6d3ad3020240bff3b948fb571971694b44708c54
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Tab is contained in QTextOption, so it needs that class qualifier.
Also removed a useless qdoc comment.
Change-Id: Ic37f0fc8cb97c2b022f69293e8fd50f0a5a2b649
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QTouchPoint is declared inside QTouchEvent, so \fn commands
for functions in QTouchPoint must use QTouchEvent::QTouchPoint::
as the qualifier.
Change-Id: I1dffe9f43f9f8bddbaa8fab9f77cf17802cf8b26
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Task-number: QTBUG-65687
Change-Id: Ie795c8ac715e36656dabcbcdf8976d303ebaf0d1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Data in item models is most often organized in rows, where each column
contains an attribute of the item represented by the row. Often when
sibling is used, it is to request another piece of data from the same
row. Having a specialized version makes this easier and less awkward
to do, simplifying
auto sibling = index.sibling(index.row(), columnOfInterest);
to
auto sibling = index.siblingAtColumn(columnOfInterest);
For symmetry reasons, siblingAtRow(rowOfInterest) was also added.
Change-Id: Ib203b2cdb16154cbb2680d16fb5c6a7538f33d07
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
The template clause was missing in the \fn command for
a member function of a template class.
Change-Id: Ie1a8f8372d3183f05f02e518b363a7bac735abbb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The class qualifier was missing in the \fn command for
the move copy constructor.
Change-Id: Ia3633efde155ed19ac8460d760a5248e52097ea1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
A few \fn commands were missing the template clause now
required by clang-qdoc. This update adds the template
clauses. It also changes an instance of Q_QDOC to
Q_CLANG_QDOC.
Change-Id: I2850d43d98debb80e01c36a524e0c00651a89298
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Some options only make sense if the printer has installed some extensions, e.g.
we should not shown "Staple" options if the Stapler addon is not installed,
so with this change we use ppdInstallableConflict to know whether an option
should be shown to the user or not.
Change-Id: I5733e1ac8b667c26b292aeafc90a10c155b751a4
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Previously it was a bit awkward to use, you had to do
QStringList cupsOptions = QCUPSSupport::cupsOptionsList(printer);
QCUPSSupport::setCupsOption(cupsOptions, option, value);
QCUPSSupport::setCupsOptions(printer, cupsOptions);
now you simply have to do
QCUPSSupport::setCupsOption(printer, option, value);
Change-Id: Id31583f1ec72644791d82776debbae5583a2be54
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
According to CUPS maintainer it is recommended to not show them[1].
GTK and Libreoffice behave like that.
[1] https://lists.cups.org/pipermail/cups/2015-September/027124.html
Change-Id: I82614003490554d41e38a125d44e3a599c2e7342
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Previous behavior:
* Open, change setting, cancel, open again, setting was as originally (i.e. unchanged)
* Open, change setting, accept, open, change setting, cancel, open again, the setting would be as before pressing cancel
* Open, change setting, accept, open, press cancel without changing anything, print, the initially changed setting is not applied
New behavior:
* Pressing cancel just cancels the changes since you opened the dialog, everything you accepted previously stays correctly selected
Change-Id: I483647504682f26d3d21c5229cc6530bf14fe519
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
First steps towards a public API for having multiple output sinks is
to allow this internally.
We give all the different log sinks the same signature, with a bool
return value to signify if stderr has been handled.
The logic of not logging to the alternative sinks when the function
qt_logging_to_console() returns true has been moved into each sink,
so that they in the future may choose to log even when also logging
to the console, allowing multi-sink output. They must then make sure
to return true if the native logging sink has also logged to stderr.
The logic of each sink has been kept the same when it comes to the
formatting of the message. Some of these sinks should ideally use
the raw message instead of the formatted one, as they are structured
logging sinks.
Change-Id: I441d3bc1db3e16180704e00d13a40564b6f06a6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Structured sinks such as systemd should capture each piece of information
individually, not bake it into the message via the message pattern.
Change-Id: I164c043683f123764a5445dc9faad049e25fd738
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The workaround was needed in older versions of MinGW-w64 headers that
did disable some common functions for -std=c++1z. Anyhow, this is not
reproducable anymore with any recent MinGW-w64.
Change-Id: I8e34a2e055f8e2356696dd4fe131a757c1527574
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
There's no way for the backingstore to end painting on the device by itself,
so we warn the user about what's going on. Failing to end painting on
the device will e.g. in the case of QRasterBackingStore result in having to
make a copy of the QImage data during flush.
Change-Id: I3fbac2d7a8a440fdb23197ac2d57d95bfaf9e125
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Removed unneeded \fn commands from two qdoc comments and
moved one of the comments to the file where its function
definition is located.
Change-Id: I4c4371f0541d2995398b0d32e1df409433061226
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>