Several enum values had to be given \value statements, and a
member function only visible for Windows had to become visible
to clang-qdoc.
Change-Id: I47fbbcf9c5e4333abd13a041ce8fee2c13f9541d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Added missing template clause to \fn commands required by clang-qdoc.
Changed a few Q_QDOC macros to Q_CLANG_QDOC.
Change-Id: I20e6855b13df6384b471fc2bb5de27b0e3b44d1b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Added missing template clause to \fn commands required by clang-qdoc.
Removed several obsolete \sa targets. Added a few missing return types
to \fn commands.
Also changed a } to ] in a \fn command in qrandom.cpp.
Change-Id: I0f004a1e57507ff5fb035e822ca8b1baa7faad9b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This reverts commit d7bcdc3a44.
Now that QPalette::setBrush() is a bit smarter (see
c564779c07), we can be
confident the palette's cache key won't change so often.
Therefore, we can use it again as part of every pixmap's
cache key.
Change-Id: I5cab2296a937f9149c7745291e0442eea24f4e9d
Task-number: QTBUG-65475
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Fixes a deprecation warning about QDesktopWidget::screenGeometry().
Change-Id: Ib56b2d3f62ddca60d84b4f626571b5e444304804
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The previous code assumed that ppdMarkOption returning non zero (i.e. it has conflicts)
also meant that the option wasn't applied at the ppd level, but it actually is.
What we need to do is after calling ppdMarkOption parse the tree again looking
to see if any option is conflicting and mark it as such in the UI.
Change-Id: I836f1902d14dc8c176bb06776471cbf4ed11786f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Since there may be some applications that want to make their comboboxes
scrollable or not with the mouse wheel then a style hint is added to
make this toggable. It defaults to true for all platforms except macOS
to keep it in line with existing behavior.
[ChangeLog][QtWidgets][QStyle] Added SH_ComboBox_AllowWheelScrolling as
a style hint to enable/disable the use of the mouse wheel in a QComboBox.
This defaults to true in all styles except the macOS one so there is no
change in existing behavior.
Task-number: QTBUG-53094
Change-Id: I6eb61e1990bfc79e3b3ea82d7b91ee39096fa077
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
It has been a while and it is supposed to be updated at every release.
[ChangeLog][Third-Party Code] Updated top level domain-list from Mozilla
Change-Id: Ifd3e5fe33166e793908b3ce28d29a507b483dd8a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
These options are used by winrtrunner/Qt Creator to control logging
and debugging behavior and should not influence applications.
Without this change applications that use
QCommandLineParser::process have to explicitly remove these values
from the arguments list or the application will exit with an
"unknown option" error when run from Qt Creator.
As winrt applications do not natively support command line arguments,
breaking the use case of having these values as valid command line
options is acceptable.
[ChangeLog][qtmain][winrt] -qdevel and -qdebug are removed from the
command line arguments and not passed to the application.
Change-Id: I60e5565148fd3dd0155b946607fdf5042139d2e1
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Clang errors out on casting from a pointer to a smaller integer
type.
This is an adapted backport of a newer upstream harfbuzz
commit, 03b7a221f701a9b003890878e730ad175c3fdd86.
Change-Id: I0de62d90008021aed6acf4e946ce1d346f9aac8c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Not all X server vendors support the XKB protocol. Furthermore,
while X.org seems to use keycodes that match the usual keyboard
scancodes, other vendors may not do so. This means that using an
XKB keymap suitable for an X.org server results in garbled input
with servers for other vendors.
Both of these issues are addressed by using the core keycode
information as a fallback.
[ChangeLog][X11] Fall back to X11 core keycode information
if an XKB keymap could not be determined through the connection.
Task-number: QTBUG-44938
Change-Id: I64568aa31113d5a3fd90f70c63320a497db21477
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Setting the same brush on the same group and role should
not detach nor alter the result of QPalette::isCopyOf().
Task-number: QTBUG-56743
Change-Id: Ic2d0dd757d703b01e8c5d835a8c124b3317653f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When the user changes the advanced settings we call
setProperty PDPK_PpdOption so if the user cancels we
need to set them back to what they were originally
Change-Id: Idd0cb413fb1e68dd28cf66f7f66f7e0afb38393e
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Make the members private and add getters
Make some other functions also private
Move setCupsOptionsFromItems from QPrintPropertiesDialog to QPPDOptionsModel
Change-Id: Ibb555a6e6be53550f30c159c3ad611d55e2a767a
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Added missing template clause to a template friend function
of class QVariantAnimation.
Change-Id: Ia96dcbb1dad1f6678642564a55991445d0b6ba0e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
clang required adding template clauses to a several \fn commands.
There was also a case where Q_QDOC was changed to Q_CLANG_QDOC
in qtimer.h
Change-Id: I1184e507a3fa719fe5049ade80e5da24f52ac851
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
clang required adding template clauses to a few \fn commands.
|| defined(Q_CLANG_QDOC) was also added in qmutex.h.
Change-Id: I7e61f460a8f8f15032094fb35c02f73721a5eb8a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Added template clause to several qHash() functions and
created a \typedef comment for QHash::const_key_value_iterator.
Change-Id: Id56191f69bf9f36e606101e46bf1dfa528d88e09
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The incorrect ones had been removed already, but they
reappeared after a branch merge, I think. This update
removes the old ones again.
Change-Id: Ief971819651fa3517f374d9f226c68bf7f015cb0
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
MinGW's headers and libraries are lowercase, and MSVC is generally
run on a case-insensitive file system. Referring to libraries with
a lowercase name is more compatible.
This fixes cross-building using MinGW, and matches a similar
change for headers in dfaa32a945.
Change-Id: I728376f239a23c700416643cae98e271bbcdff32
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This fixes a regression from ba44cdae38.
Task-number: QTBUG-65516
Change-Id: I989b075d3f96170660042349437e4a6a4a115cf9
Reviewed-by: Liang Qi <liang.qi@qt.io>
What was broken:
- m_xiGrab on successful ungrab (XIUngrabDevice) was never set to 'false'.
Which means that we would unnecessarily call XIAllowTouchEvents, even when
we are not grabbing (this did not have any apparent side effects).
What was non optimal:
- Redundant XIQueryDevice calls. XIQueryDevice with XIAllMasterDevices flag
already returns all required devices. Calling XIQueryDevice for every id again
does not make sense.
- Querying for master pointer info on every grab is unnecessary. Simply cache
ids of master devices whenever hierarchy changes.
What remains to be investigated some time later (or never):
The original and the re-factored code grabs all master pointer devices. Not
sure if that is the expected behavior on MPX (Multi-pointer X) systems. Could
there be two context menus, each dismissed separately? MPX concept was introduced
in XI2.0, but testing shows that this setup is not very well supported even on
modern desktop environments. Tested on Ubuntu 16.04, where multiple pointers is
enough for crashing a terminal. Also AFAIK there isn't any bug reports about
broken MPX support in Qt.
Change-Id: I53f99c6efd44abc43a0985e15cff8aae7ebba8f1
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
QTreeWidget::visualItemRect() returned an invalid QRect when a column
was moved and then hidden (or the other way round). The reason was that
the logical index returned by QHeaderView::logicalIndexAt() was again
passed to QHeaderView::logicalIndex() to create the QModelIndexes needed
for QTreeView::visualRect()
Task-number: QTBUG-28733
Change-Id: I8676f21bcab8c05c2260b85d483902f18cbf3e24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
The menu indicator was not adjusted in RTL-Mode to be on the left side
of the text. Use visualRect() to adjust the rectangle before drawing
the PE_IndicatorArrowDown.
Task-number: QTBUG-50084
Change-Id: I20129499f111d06637c98ede23b4635a3fc34a6c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Q(Tree|Table|List)View was able to display a simple
QJsonValue::String, but not QJsonValue::Bool/Double. This
is an inconsistent behavior which is fixed with this patch.
Task-number: QTBUG-65082
Change-Id: I22c2fe2890f11e283cae4f7ea947aa67ff36f367
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Also adjusted the text segmentation and line break algorithms
so that they can handle the new data, and pass the test suite.
Change-Id: Ib727fd80003e34e96458d7a681996de3fa3691e7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The text segmentation data is not being updated in this change,
as it requires additional code changes. Updating those will
come in a follow-up commit.
Change-Id: I5d6b6bc96044e8dd0c25cf6f79756e7f68bf6e7c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Make sure we properly handle both directional embeddings as well as
directional isolates to determine the direction of the string.
According to the latest version of the Unicode bidi algorithm,
parts of the string contained inside an directional isolate is
to be ignored when determining the paragraph direction. Embedding
markers themselves are to be ignored as well, but not the characters
inside an explicit directional embedding or override.
This is also some required pre-work to get our BiDi algorithm
updated to the latest version of the standard.
Move the implementation to QStringView and implement the methods
in QString and QStringRef through that implementation.
Task-number: QTBUG-57743
Change-Id: I7f24e09198e22d6359c6534c9ae40a904e94c46e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
So invert the list and let "msvc-2017" be the latest, at least until we
know about a different version.
Change-Id: I39332e0a867442d58082fffd1504c316e27f51d0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
QTreeViewPrivate::itemAtCoordinate() did not calculate the correct item when
non-uniformRowHeights is enabled and vertical scroll mode is ScrollPerPixel.
This results e.g. in an activation of the item above when the click happens
on the very first pixel line of an item. Another, more problematic effect was
that once a drop happened on the very first line of an item,
QAbstractItemViewPrivate::dropOn() calculated the root as the drop index
because the visualRect of the calculated item is compared with the drop
position which did not match.
Task-number: QTBUG-57538
Change-Id: If89571bf0fb76fc01d60ba7139f1d985b49d70db
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Add an env variable QT_MAC_TABLET_IGNORE_BUTTON_MAPPING which, if set,
reverts to the old behavior.
The issues that it fixes are:
1) With a Genius tablet, it's not possible to generate a middle-click
at all, regardless of preferences, unless you set this variable
2) With a Wacom mouse (passive mouse used with an Intuos 3), the
side-buttons (normally mapped to forward and back buttons) do not
work unless you set this variable
[ChangeLog][macOS][Tablet support] If you have changed
the button mapping of your Wacom tablet in System Preferences,
it will be respected in Qt applications. To revert to the
old behavior, set the environment variable
QT_MAC_TABLET_IGNORE_BUTTON_MAPPING
Task-number: QTBUG-57487
Task-number: QTBUG-54160
Change-Id: I0a1c9c6550e4dfe6ee2daa2d993f22691430826c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Due to the integration of clang in qdoc, several qdoc warnings
appeared for class QRandomGenerator. This update corrects all
the remaining qdoc warnings.
Change-Id: I92fe9f7d9cb193e145ee8ad0e7198625b9a5bf7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Unconditionally apply window cursors restoreOverrideCursor() also for
platforms with override cursor capability in case
a cursor was changed while the override cursor was active.
Amends b05d1c2ebf.
Task-number: QTBUG-65001
Change-Id: I7fd38a27dcf045f2fb48a16abb484342feaab5df
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
QTreeView makes columns movable except for the first one
(since Qt 5.0, see commit e0fc088c0c). This is indeed best
for actual trees, but not when using QTreeView as a flat
multi-column list (with no "root decoration"). Then it should
be possible to move the first column.
[ChangeLog][QtWidgets][QHeaderView] Flat treeviews can now allow
the user to move the first column (like in Qt 4.x) using the new
method QHeaderView::setFirstSectionMovable().
Change-Id: I6b5025e40850bf5c4c373124ee81f657f3f09d29
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Since DB2 can potentially have more than one error code, we need to join
these together using ';' as a separator.
Task-number: QTBUG-142
Change-Id: Idd376df84a8e3ae4c05b4722b4d0020fa4f3edad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QSqlDatabase objects can only be used in the thread that the connection
was opened for. So if the driver was created already then we check if
the thread is correct. If it is not then we output a warning and return
an invalid QSqlDatabase.
[ChangeLog][QtSql][QSqlDatabase] QSqlDatabase::database() will return
an invalid QSqlDatabase if the calling thread does not own the requested
QSqlDatabase.
Task-number: QTBUG-216
Change-Id: Ib5a25aa62129e3925f9819109af05961e5178bc5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If the values vector is empty then we know already that the paramCount
will still be invalid, so we should just accept that and not check the
reused named placeholders.
Task-number: QTBUG-64923
Change-Id: Ifaa755540c4574f1f76d3f9f129bf0f66b837b70
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This patch updates the code from QSharedMemory to remove the use
of the deprecated QRegExp class. It also updates the unique key
test to avoid change of behavior going undetected.
Change-Id: I649e615027507898800bb5454a62a6cf8bbb2e18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch updates the Cocoa QPA backend code to use QRegularExpression
in place of the deprecated QRegExp.
Change-Id: I6de2774975e63f8dbff6dad0a842f35c3c4b4f83
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is the first version that supports Unicode 10.0.0, which
we now require for Qt.
Change-Id: Iff3cb757eb7d97dace5649262c337a4ed1145199
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This is the latest released version, fixing a large amount
of bugs and adding Unicode 10 support.
[ChangeLog] Bundled HarfBuzz-NG copy updated to 1.7.4
Change-Id: Idc8092dfc4e593d64fff2fd51ff9e1b3d84049a7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Since its initial implementation, QRingBuffer had the following
fragilities in the architecture:
- it does not guarantee validity of the pointers, if new data will
be appended. As an example, passing an address of the QRingBuffer
chunk as a parameter to the WriteFileEx() function on Windows
requires the stability of the pointer. So, we can't add new data
to the QRingBuffer until the overlapped operation completed
(related issues were fixed for QWindowsPipeWriter and QSerialPort
in 5.6 branch by introducing an intermediate byte array);
- inefficient reallocations in reserve(), if a shared chunk was
inserted in the queue (we can get a reallocation in the place
where we don't expect it:
char *writePtr = buffers.last().data() + tail; <- line #133
).
Proposed solution is to avoid reallocation by allocating a new
block instead. That was accomplished by introducing a QRingChunk
class which operates on a fixed byte array and implements head/tail
pointers strategy for each individual buffer in the queue. So,
QRingBuffer is no longer dependent on QByteArray's internal
shrink/growth algorithms.
Change-Id: I05abab0ad78e22e4815a196037dfc6eff85325d1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
That causes compilation error in developer build or when '-Werror'
command line argument is forced:
kernel/qnetworkinterface_unix.cpp:142:12: error: 'int getMtu(int, ifreq*)' defined but not used [-Werror=unused-function]
static int getMtu(int socket, struct ifreq *req)
^
cc1plus: all warnings being treated as errors
So, mark 'getMtu()' as unused in the appropriate branches.
Change-Id: Ib4d74845835962bb12f56baf8e13834c032a0404
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Some apps (e.g. Chromium) explicitly append a \0 to the text they
transmit through the clipboard. Remove that one, when we retrieve the
text, so it doesn't become part of the text we're pasting.
This was e.g. visible when pasting from chromium to the textedit example.
Change-Id: I9445319e6e5ef304a364e14f794b16557a3cc919
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Binding without an interface and expecting the OS to select something is
not supported in all OSes. On FreeBSD, I keep getting EADDRNOTAVAIL. So
modify our test to only join, leave and send to multicast groups with an
interface selection.
With this, all tests either pass or are skipped for me on Linux,
FreeBSD, and macOS. On Windows, this revealed an inconsistency in
behavior, which this commit adds a workaround for.
Change-Id: Ifb5969bf206e4cd7b14efffd14fb6815456494d2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Putting parentheses around the call to (std::numeric_limits<T>::min)()
works, but the trick cannot apply to the min() function declaration on
the same line. So we really need to #undef.
I hope no one after the 1990s still needs these macros.
Task-number: QTBUG-65414
Change-Id: I39332e0a867442d58082fffd15024f8edb293311
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The C standard library functions cannot handle UTF-8 filenames. Instead,
we need to use the wide-character versions which accept UTF-16 input.
Task-number: QTBUG-65492
Change-Id: If4b3b4eeeec4f3bbb428b8f6b0311a65d01463b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Like in commit 75cdf654bc, we use the
pointer value of the QMap header (which is of type QMapNodeBase) as a
sentinel. It's never dereferenced. In that commit, the issue was calling
end() directly; in here, it happens when iterating forward from any
element, which means nextNode() can reach back to the header.
However, using static_cast is wrong, so we use reinterpret_cast.
Change-Id: I39332e0a867442d58082fffd15040317704a87ce
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Move the selected and selDescription members to a subclass of QOptionTreeItem
since it's only ever used for Option type nodes of the tree
Change-Id: Ic99841c4e04a3afcff0950f72abf12977850f6d3
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Renato Araujo Oliveira Filho <renato.araujo@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This involves QCocoaApplicationDelegate and QCocoaMenuLoader.
The former has been modernized to use blocks. The latter was
not being deleted previously.
Change-Id: Ic4cbfed2d9598fa04130675b3330d985b9489a21
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This removes at least one special-case we had to have, in Android's lack
of /etc/mnttab. Bionic's _PATH_MOUNTED is already /proc/mounts.
Change-Id: I9407dcf22de6407c83b5fffd14fedc638586d0f9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This fixes only those that look fixable. There are a number of errors in
the online documentation that look like qdoc tool bugs, like missing
functions (operator==) and documentation text that does not exist in the
source code. This fixes:
- QRandomGenerator(System) constructor showing up
- Links for C++ reference documentation not showing up as links
Change-Id: I9e2892cb6c374e93bcb7fffd14fe21db5a6969d9
Reviewed-by: Martin Smith <martin.smith@qt.io>
QHeaderViewPrivate reimplemented _q_layoutChanged() to handle changes
of rows/columns via layoutChanged/layoutAboutToBeChanged. This worked
fine for Qt4 but since Qt5 only the special signals rowsAboutToBeMoved/
rowsMoved are used for this (8021e2d5e7).
With this change, QAbstractItemViewPrivate::_q_rows/columnsMoved() is
calling the virtual function _q_layoutChanged(). This resulted in a
wrong call of QHP::_q_layoutChanged() for a horizontal header when
a row changed and for a vertical header during a column change. In the
end this can lead to an unhide of hidden sections.
Task-number: QTBUG-54610
Change-Id: Ide4bfc5b24a97746fd1e5af82d3ba08257149157
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Commit 77942a1bdf introduced the QScopedValueRollback, but without
assigning it to a local temporary, so the value was rolled back
immediately, resulting in always sending touch events async.
Change-Id: Ic7f65c3d38c46813ff06694e883dae3df138b9d4
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
The QTextFormat::FontLetterSpacingType property was added outside
the span of the FirstFontProperty and LastFontProperty, so
the fontDirty flag would not be set when it was changed. There is
no binary compatible way to fix this before Qt 6, so for now, we
add a special case for it.
[ChangeLog][QtGui][Text] Fixed an issue where changing the letter
spacing type of a QTextCharFormat would not cause its font to
update.
Task-number: QTBUG-65345
Change-Id: I5ab53d7f82d529b57edceacfc3fa688c6741cd17
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: C. Boemann <cbo@boemann.dk>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Instead of allocating the full backing store size for
the transparency layer, we make sure we only allocate
exactly as much as needed by the scrollbar.
Change-Id: I55c3172fe3dd2a1f3fd46828463497f9f35cb1ae
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This one fell off the truck while we were removing
HITheme calls. We add it back by simply rendering a
BLACK RIGHT-POINTING TRIANGLE character.
We also fix smaller issues, such as not displaying
any shortcut related to a submenu action — this is
simply not a thing. The spacing between the menu
item's text and the submenu indicator has also been
slightly improved.
Change-Id: I6c768a5506a5eb9528b0dd76acd52b561266d67b
Task-number: QTBUG-64405
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
The thing we are looking for in qstandardpaths_unix.cpp is
regularexpression, not QT_BOOTSTRAPPED.
Change-Id: I37eb0cdd8a52b0adfd69f592b84659e8807e35ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The vnc and tuiotouch plugins depend on network support. The tuiotouch
plugin furthermore depends on a specific feature from network.
Change-Id: I3bc1f7b1dcf3437c6ed0d41cc9e282114a95a39c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
By not actually making them intrinsic, leading to linker errors:
/home/qt/work/qt/qtbase/src/corelib/global/qfloat16_f16c.c:61: undefined reference to `_mm256_cvtps_ph'
/home/qt/work/qt/qtbase/src/corelib/global/qfloat16_f16c.c:76: undefined reference to `_mm256_cvtph_ps'
I had the workaround applied, but only for "intel_icl", the qmake config
for the Intel compiler compatible with MS cl.exe options. The one for
compatibility with Unix cc (intel_icc) was missing.
Task-number: QTBUG-65367
Change-Id: I39332e0a867442d58082fffd15020e4838b6a01d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
In file included from ..\..\include\QtWidgets/qdesktopwidget.h:1:0,
from kernel\qt_widgets_pch.h:71:
..\..\include\QtWidgets/../../src/widgets/kernel/qdesktopwidget.h:71:65: note: declared here
QT_DEPRECATED_X("Use QGuiApplication::primaryScreen()") int primaryScreen() const;
Use QScreen directly and remove the then unused function realDpi().
Change-Id: I526adb09ba35ed0699338d6a8d044c2ff9a03a1e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
It breaks a build if warnings are treated as errors.
Task-number: QTBUG-65357
Change-Id: I42d5cbdbd90f831662a6decaebecebef5005e735
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
On Windows, QFileInfo.isWritable() was returning true in situations
where the file would only be writable with elevated privileges. Using
AccessCheck instead of GetEffectiveRightsFromAcl to get the correct
results.
Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Done-with: Edward Welbourne <edward.welbourne@qt.io>
Task-number: QTBUG-30148
Change-Id: I7a3468ac069bf782ca312078e3a84107b6cd468c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Code examples make it much easier to learn how an API behaves.
One area that the patch tries to address is the distinction
between a relative URL and a relative path.
Change-Id: Ife52172816b89afb6cd810b07d3573480e2cd747
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Task-number: QTBUG-65354
Change-Id: If628c73b05854c13086708c193995062c8b9f9e4
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Fixes the fallback painting used with complex transforms to be able to
handle color bitmap fonts which can't be converted to a path.
Change-Id: Id2851607f673b8fc1aea63f92043d0cdebc0fb9d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
old style connects have protection against null sender and null receiver,
but new style only had against null sender.
Change-Id: Ie555ac078412918e60c3b60830fe1f3abfb7f5af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
By using NSEvent.characters instead of NSEvent.charactersIgnoringModifiers,
we may miss sending ShortcutOverride events.
For example, when the user presses Cmd-Opt-o, characters will be "ø"
(on a US keyboard layout) and therefore we'll be looking for the wrong
key-equivalent among the menu items. We only fall back on the modified
string when the search on the unmodified string fails.
As and addendum, we also skip any submenu when doing the key search.
This is not necessary since each menu delegate will get called eventually.
Change-Id: Id793315293a02c99e99d793ad812cff7b4a47821
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Out of the box, this saves one delegate instance per NSMenu. It
also weak-couples the NSMenu instance with its owning QCocoaMenu,
making it safer to inspect from the menu delegate.
In the future, this will be helpful for debugging by just overriding
any NSMenu method.
Change-Id: I7eb801009b97f6a8ee2003306c0e152621bbce54
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Change the condition to strong equal, as 'bytes' was checked against
wrong value on the start of the function.
Change-Id: Iebd785665ac7bd0941ba4ffd3f315b12efc6ce0b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The current implementation is poorly documented and hides the mapping
between keysyms and modifier bits.
This changeset adds documentation about the inner workings and makes
the keysym/modifier bit mapping reusable. (The latter will be needed for
xkb keymap synthesis if the XKEYBOARD extension is unavailable.)
Change-Id: I70c6d204b2357365db4dafeda680132ab6823ca3
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Make sure to use the printer original name as 'cupsPrintFile' function
argument
Testing:
- Create a instance of your print with lpoptions
- Try print a document using the new instance of the printer
- Check if the instance properties was respected
Change-Id: I884b641d1871fe04c7b119c82d4edb4aa41db2f5
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Change from config to feature in the json and pro files.
Change-Id: I58ddac3c4ad739253bae010f1d5023fc1d481047
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The old code used select with all-zero parameters and a timeval struct
configured to wait for 50ms. This can be drastically simplified by just
calling QThread::msleep which makes the intention much more clear.
Change-Id: I115b56ae67ae2c2cd03354e16a7bfdf56f8c15b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
... and make sure we can compile without it. In particular,
Qt Concurrent depends on QFuture, so we specify it as a condition,
and QtConcurrentException should not depend on future but on
concurrent.
Change-Id: I65b158021cecb19f227554cc8b5df7a139fbfe78
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
FileChooser portal expects filter property in a(sa(us)) format but by
default, using enum, we will end up with a(sa(is)), thus we have to
specify format for the enum.
Change-Id: I7de971197a0c77d6dca092edda7d428d90394574
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Used 'ppdLocalize' to translate cups options
Change-Id: I7fea7c26194fd6c6ee62a17d3e35d7c2c5be6d3c
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This means that actually the paper size set on system settings (or lpoptions) is used instead of A4
Change-Id: I2dd86fd9ba210a335773430328b0ba2d3343395f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This also reads the job-hold-until from lpoptions if set there for the particular printer
Change-Id: Ic60fef675ab9f4760cd99ee9ac417b0478459681
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This also reads the job-billing from lpoptions if set there for the particular printer
Change-Id: Ia4a6961de504005b8dcd9209da0624e9ae9ef7e4
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This also reads the job-sheets from lpoptions if set there for the particular printer
Change-Id: I35aff103261ef58492779071d866e8a15ac78607
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This also reads the job-priority from lpoptions if set there for the particular printer
Change-Id: I75d983c377d2135a0b0d3e028829a7384a5e1897
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Comparing pointers with op< that do not point into the same array is
UB. Fix, in the usual way, by using std::less.
Change-Id: Id2c957557719887b2016632d683dbab8af07b34c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If a top level, parentless widget has Qt::WA_WindowPropagation
set, Qt will crash when trying to resolve the widgets locale.
The reason is that we try to access the QLocale of the
non-existing parent.
This patch will add a check if a parent exists before trying
to access it.
Task-number: QTBUG-61213
Change-Id: I09a6351a12dc1fffab3069b70e3d7b3932317c85
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When one scrollbar is added, this may cause the other to be
needed as well. This change does a second calculation
immediately instead of relying on a signal through a
QueuedConnection.
Task-number: QTBUG-62818
Task-number: QTBUG-56280
Change-Id: Iee9a083e3a6cd3765e6bb9206687a8a6e7f99cff
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This is actually two fixes.
* We need to call cupsMarkOptions
* CUPS differentiates between the "" and the nullptr instance, so we need
to change the call to cupsGetNamedDest accordingly
Change-Id: If2692e405b6b71f8ee91362e6e72eabd9202d704
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
The number of active scrollers is probably very low, so O(N) vs. O(1)
search can be neglected, compared to the higher cost of allocating and
iterating a QSet. The tipping point is that the public API uses QList,
and the QSet needs to be converted toList() on each (external) access.
Just use a QList.
Change-Id: I5f0b37761923dc94d6dbbbf92973da73f5335e4a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
dialogs/qprintdialog_unix.cpp:1104:21: error: incomplete type 'QTextCodec' used in nested name specifier
Amends b4330bc391.
Task-number: QTBUG-54464
Change-Id: I555431d11a5c3f247d4f055d94255d2708c92374
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
QHeaderViewPrivate::_q_layoutChanged() was not called when used in a
QTreeView because it was explicitly disconnected in setModel().
The disconnect was added sometime prio to Qt 4.3, but there the signal
was connected to the doItemsLayout() slot. This was correct since
QTreeView::doItemsLayout() is calling header->doItemsLayout().
In Qt 4.3.0 _q_layoutChanged() was introduced and the disconnect was
adjusted. But since _q_layoutChanged() is doing much more than
doItemsLayout() (e.g. restoring hidden sections), functionality was
lost. The problem was already observed for Qt 4.6 (QTBUG-18196) but
only partially fixed.
Task-number: QTBUG-41124
Task-number: QTBUG-54610
Change-Id: Id13a9930d0163812e12a0287016bab9c3aa02068
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Makes sure the ARGB32PM that is painted on always have a defined alpha.
Task-number: QTBUG-55645
Change-Id: Ifcf5fcc2127d255518eca4763845a197da6c7914
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Adds support for FileChooser Flatpak portal. To support them we just do
specific DBus calls, which are then caught and forwarded by xdg-desktop-
portal daemon/service. This is needed for Qt applications running in
sandbox.
[ChangeLog][Platform Specific Changes][Linux] Added support for flatpak
portals. Flatpak is a software utility for software deployment and
package management. It provides a sandbox environment in which users
can run applications in isolation from the rest of the system. To
communicate with the system flatpak uses portals, which are designed to
be a bridge between sandboxed applications and desktop/system running on
user's computer. Flatpak runs this service (called xdg-desktop-portal)
automatically. It exports the portals via DBus and they are visible by
default to all applications running under Flatpak.
Change-Id: I4de1402434ba7cbcc805eab51c30f84f8ba0c5c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is especially useful on macOS where the default
ignore cursor is the pointer cursor.
Change-Id: I5e14814abd2d59a7f4c4cd1029829ebbed5b3017
Task-number: QTBUG-26724
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This is one of the most frequent problems users ask for help with, and they
don't even know if the plugin was found but not loaded or simply not found.
Qt knows what happened, so communicate it to the user.
Change-Id: I6003ed4ab3d147a5d159b2002004e53c251cb512
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fixes 5d4089299a commit,
which was causing a build break if qnx pps is enabled.
Change-Id: I8c29f48bde0187a9db02d6325e8a9a0fae760bcb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This is mostly a revert of 69de617761 adapted to the new code.
The commit that removed this code said:
a) there's duplicate settings in the advanced tabs and in the rest of the ui: this easily
solved with a blacklist
b) you can set these options in the system settings: probably true, but it is very cumbersome
to go to the printer settings every time i print to select from which tray the
paper should be used
Task Number: QTBUG-54464
Change-Id: I7b1cacf51006dadb10aa6e00fe6dd2ff748fe576
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Scanning for WiFi networks is causing network disruptions
in the form of higher latency, sometimes globally
for all running applications.
In practice, the default configuration selection algorithm
in QNetworkConfigurationManager prefers configurations
from the generic bearer plugin, due to the way the
plugins are ordered. Removing the platform WiFi bearers
should have no effect on default network configuration
selection.
Task-number: QTBUG-40332
Change-Id: I778281c41a1aaec1949c220a9266677bd788a57a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This code is unused/not functional.
Use sRGB everywhere instead. This is not a change
of effective color profile: the backing store has
had the sRGB profile assigned since commit ac899f6d
changed it as a side effect.
Change-Id: Ib45cec3acad90db2a0873b052d6bc4a61c894b18
Task-number: QTBUG-47660
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
getCursorCapsMode() now matches the Java implementation in
QtActivityDelegate.showSoftwareKeyboard() which is given to the Android
keyboard on InputConnection creation.
The reason we only saw this bug with some Android keyboards was that many
keyboards never call getCursorCapsMode and just rely on the initial hints.
Task-number: QTBUG-51865
Change-Id: I2aae024d9c77ea14e087e3f51a413d15a684179c
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Qt requests full resolution OpenGL surfaces by default.
However, when running as a VMware guest it looks like
the OS silently creates low-resolution surfaces.
This is not possible to detect using the standard NSWindow
APIs for converting to backing coordinates or for
reading the backing scale factor. The result of this
is that Qt will incorrectly display one quarter of
the window content only.
Fall back to detecting if the OpenGL renderer is the
Apple software renderer, which it will be on VMware.
Cancel the high-resolution surface request if this
is the case. This needs to be done while we have a
valid OpenGL context.
Task-number: QTBUG-62357
Change-Id: I33bf12b3bb0408249e6d66e0a8ca86b044bea781
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is going to be the most common scenario for GCC: all recent
versions allow compiling F16C code in the same source, thus generating
better code.
MSVC is excluded unless AVX is already turned on by the user in the
mkspec file, because it fails to use the VEX-prefixed instructions for
everything else, printing a warning that it knows it should have done
so.
ICC is excluded because it's known to generate invalid code when using
the F16C intrinsics unless F16C is turned explicitly on.
Clang is excluded because it runs into an internal error compiling this
code unless F16C is turned explicitly on.
Change-Id: I57a1bd6e0c194530b732fffd14f58de6a46f0de1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
QFileSystemModel had a #ifdefed out experimental code path for watching
single files to track changes in size, which got outdated over time.
Replace the #ifdef 0 by a check for the environment variable
QT_FILESYSTEMMODEL_WATCH_FILES, fix it up and apply some fixes to
related code to make it work:
- Split file names signaled by QFileSystemWatcher on '/' always.
- Do not instantiate QDirIterator on "", which means "current directory"
and results in mixed-up directories.
- Check on lastModified() in QExtendedInformation::operator==() so
that changes trigger an update in _q_fileSystemChanged().
- Fix the #ifdefed out part to compile and not to add directories
to the watcher.
[ChangeLog][QtWidgets][QFileSystemModel] It is now possible to enable
per-file watching by setting the environment variable
QT_FILESYSTEMMODEL_WATCH_FILES, allowing to track for example
changes in file size.
Task-number: QTBUG-46684
Change-Id: Ia5da9170866416c9529251f889814b23d7a7d069
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Check that the inserted/removed range is indeed valid.
Change-Id: Ifccbe13f0753252ee1450c8668df782dc699f05b
Reviewed-by: David Faure <david.faure@kdab.com>
- adjusted to new configure system realities
- centralized 'make install' instructions
- fixed 'make' command for mingw
- externalized the license compatibility question
- removed dated information about postgresql client libs
- removed dated claim that freetds is not stable yet
- updated official sybase client link to point to sap support
- removed apparently bogus "demo" include path from oci instructions,
based on the archive content description
- removed troubleshooting item about static builds - one can use static
"plugins" with a static build just fine. and building dynamic plugins
for a static build is plain impossible to start with.
- removed troubleshooting item about build key mismatch, as build keys
have been removed in qt5
- removed "general info" sub-section titles, as that's bad style
- misc language and minor content fixes
Task-number: QTBUG-62479
Change-Id: Ic4efa9e20a5966b6fc646062aec6d1a8d4ff4158
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
W3C Namespaces Standard states that "The attribute value in a default
namespace declaration MAY be empty" (secion 6.2). Analysis and fix
thanks to Eugenio Rustico.
Task-number: QTBUG-63538
Change-Id: Icd8d4df639b9737d8e0d215bf2bea56fe1e161ac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
If a signal is emitted more than once in a multithreaded application the
QSignalEventGenerator::execute function asserts in the check for a valid
signal index. It happens after abandoning the state and all the
connections are disconnected. If we have pending signal to be
processed the QObject::sender() won't be able to resolve the sender
object.
Task-number: QTBUG-61463
Change-Id: I9d4b7266c6dddc9ff2e7453b05a6989876ccb332
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The update adds the moduleheader variable to the qdocconf
file for qttestlib.qdocconf and qmake.qdocconf. The problem with
qmake is that it doesn't have a module header file, but it does
have qmake_pch.h, which is used here. This update also corrects
several \fn commands in the qttestlib docs.
Change-Id: I2202b9db96390bac1ee491ca8a99ca9010057ce3
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QPlaformPrintDevice uses QVector to store, but QList in the getters to
retrieve these data. Port API from QList to QVector to avoid
conversion between the two containers on every access.
Saves almost 4KiB in text size (another 0.9% of QtPrintSupport).
Change-Id: If33df141b87753803c45d9f4dae501a68abe49af
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit pains me, because we want Qt to migrate away from QList,
but the QtPrint API stack (all the way to public API, for QPageSize,
and int) is formulated in terms of QList, not QVector, so it makes
zero sense to store data in QVectors just to convert to QList on every
opportunity.
Store QMimeType in QList, too, since that's what QtCore uses.
Saves 3KiB in text size (0.7% of QtPrintSupport).
Change-Id: I71249f60be517cc06973b38d9ccad7a31f348be3
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QWidgetBackingStore::markDirty has an optimization for QRect, so we don't
want to unify these two functions by calling update/repaint(QRegion(rect)).
Change-Id: Id2a42f478f71863da45697041e0ab0130c74b9d2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
If QCoreApplication is recreated, it is possible the previous argv[0]
pointer has become invalid, so we should not rely on it. So to prevent
that, we copy the original argv[0] to a static QByteArray.
Task-number: QTBUG-58919
Change-Id: Idadd4cb78e4281830165fb681ea7925109f316ff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
In order to support the generated EUDC.TTE font for
End-User Defined Characters on Windows, we need to allow
fallback fonts which are not part of the default font
collection. This is the same as change
21c7421d4e, but adapted to
the fallback font code path.
Without this change, the EUDC file would still be loaded,
but it would be loaded through the GDI fallback, and we
would display an error message on the console.
Task-number: QTBUG-44594
Change-Id: Id2404228c7fd345523e4e5c99f31862e256930e3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
We set anchors from QSslConfiguration::caCertificates. On macOS these
anchors are by default copied from the system store, so I expected
setting 'trust those anchors only' should not break anything.
Somehow, on 10.11 SecTrustEvaluate fails to evaluate a valid
certificate chain (apparently because it has an intermediate
certificate, it's just a guess, since their API/docs are too poor
to explain well what was the real cause) as I can see connecting,
for example, to google.com - we have a chain with a valid root,
say it's GetTrust CA and we have it also in our list of anchors we set
on trust, but evaluation fails with: kSecTrustResultRecoverableTrustFailure:
"This means that you should not trust the chain as-is, but that
the chain could be trusted with some minor change to the evaluation
context, such as ignoring expired certificates or adding an
additional anchor to the set of trusted anchors."
Since none of certs is expired, and the required anchor already set,
this must be some bug in SecureTransport. For macOS (deployment
target) < 10.12 we fallback to the original version of the code
(the one that unfortunately does not allow us to limit the set
of trusted anchors by what client code wants to trust).
Change-Id: Ie42fd77c3eb6ef7469812aa0d7efff88a003c0b8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
... from 1.7.4 to 1.7.5 (released Sep, 2015).
Some more locking issues were fixed after 1.7.4. Testing
for a prolonged period of time has showed that 1.7.5 does
not cause a system lock-up.
[ChangeLog][Platform Specific Changes][X11 / XCB] Minimal libXi
version requirement has been updated from 1.7.4 to 1.7.5. This
is because XIAllowTouchEvents is known to deadlock with libXi 1.7.4
and earlier. When touch events are never received, this is not
an issue. Plain mouse / keyboard systems are not affected.
Task-number: QTBUG-62224
Change-Id: Ie70264b9af0390df33c417f660350d4bce48c6d3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The safe area margins of a window represent the area that is safe to
place content within, without intersecting areas of the screen where
system UI is placed, or where a screen bezel may cover the content.
QWidget will incorporate the safe area margins into its contents margins,
so that they are are never smaller than the safe area margins. This can be
disabled by unsetting the Qt::WA_ContentsMarginsRespectsSafeArea widget
attribute, which is set by default.
QLayouts will automatically use the contents area of a widget for their
layout, unless the Qt::WA_LayoutOnEntireRect attribute has been set. This
can be used, along with a contents margin of 0 on the actual layout,
to allow e.g. a background image to underlay the status bar and other
system areas on an iOS device, while still allowing child widgets of
that background to be inset based on the safe area.
[ChangeLog][iOS/tvOS] Qt will now take the safe area margins of the
device into account when computing layouts for QtWidgets.
Change-Id: Ife3827ab663f0625c1451e75b14fb8eeffb00754
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The code that was supposed to initialize the joining property of
characters to the correct defaults was actually applied after reading
in the data from the Unicode file, and was in a couple of cases
overwriting explicitly specified data in ArabicShaping.txt
Task-number: QTBUG-63191
Change-Id: Ie35261039b2211a827322ca11afacd9555ccefc7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
EUDC, or "End-User Defined Characters", is a concept in Windows,
where the end-user can create a local fallback font of default
glyphs for the PUA (Private Use Area, a range of Unicode
not reserved to any writing system), and these glyphs will be
used when displaying the character using a font which does not
itself support the code point.
To support this in Qt we look up the default EUDC font in the registry
and add it to the fallback fonts if it is available. We use the
font for code page 1252. This has been tested on a couple of systems,
and appears to always be present. The font is added to the front of
all fallback lists, so that it will override other fallbacks,
such as Segoe UI Symbol, which happens to assign glyphs to the PUA.
If there is no end-user defined fallback, then Segoe UI Symbol will still
be used as before.
Note that this required a small change in the code to get canonical
font names. The EUDC font that Windows generates will only have a
name set for the current locale, and we expected all fonts to have
an English name. Instead, the code has now been changed to prefer
the English name if one is present, but accept any other name if
there is nothing in English.
[ChangeLog][Windows][Text] Added support for End-User Defined Characters
in Qt.
Task-number: QTBUG-44594
Change-Id: I83ae68b6d16e9b50e990dfb3ac3d294b7b2a5113
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use the correct height/width values when calculating
the vector for resizing the window content and the
new size as viewport size.
Task-number: QTBUG-62475
Change-Id: I33a8dc1379a908e991b04bc31dfc6254a6d005c9
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(or lack thereof).
* `QString::utf16()` reallocates if `*this` has been constructed using
`fromRawData()`.
* `QString::data()` ensures a writable string, so will detach from raw
data.
* `QString::unicode()`, `constData()`, and `data() const` do not. They
just return `QStringData::data()`, which may point to raw,
non-NUL-terminated data.
These functions can therefore not possibly have the same behavior, but
were documented the same.
Fix.
Also drop the discussion of operator[](size()), as that, too, was not
correct, and anyone who indexes with op[] beyond size() - 1 should not
rely on proper behavior.
[ChangeLog][QtCore][QString] QString::unicode(), constData() and
`data() const` do not return a NUL-terminated string. This was true
before, but the documentation claimed the opposite.
Change-Id: I1437f57cd02bdf80264e8559608b46aa749c23a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For multi text-item texts we should render the text decoration at the
same position as the text-item part is, and not always from the
beginning of the line.
Task-number: QTBUG-60422
Change-Id: I9aa58fc164122ad1fae9716b8b18bdfbbbd778a9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Change the include header to sys/slog2.h, which is available
in both QNX 6.6.0 and 7.
Task-number: QTBUG-64033
Change-Id: I26d8c5451376bab33e11f4784ca772f84cd6fc28
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Autotest is taken from the previously reverted
8b1377fde1.
Task-number: QTBUG-60231
Change-Id: I44dd79cba22b6baefdd6d95c176790bef0b7eafe
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
In QWindowPrivate::applyCursor(), do not apply override cursors
when the platform supports QPlatformCursor::OverrideCursor.
Complements b05d1c2ebf.
Task-number: QTBUG-65001
Change-Id: Ie84cc30ad99b22e037aae829a2ce847ec4bf900f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Override cursors were not restored when nested or in a dual
monitor setups.
The default cursor stored in QWindowsCursor::m_overriddenCursor
was clobbered by subsequent calls to QWindowsCursor::setOverrideCursor().
This caused for example the wait cursor to remain active when
switching to Help Mode in Qt Creator. Add a check preventing that.
Make the variable static so that it is shared between the cursors
of multiple screens.
Amends b05d1c2ebf.
Task-number: QTBUG-65001
Change-Id: Iead5804d317f73dedd78d22c1c85c62b5349ab83
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This change allows services using QAndroidService to function properly.
A service using a plain QCoreApplication is still affected.
The original code uses postfix decrement, causing an off-by-one error in
reference counting, which, in turn, fails to properly release a semaphore.
Fix by using deref() instead, which is also more readable, and consistent
with the use of ref() elsewhere in the code.
Task-number: QTBUG-64728
Change-Id: I99b59307638d619506c594f86de6d7d202d755f2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
The user can set QT_QPA_NO_TEXT_HANDLES to 1 to disable the text handles.
Change-Id: I974af4d79c86259288035fe20b6a9d0c6d047af8
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
The hash from QOpenGLContext* to cursor texture/shader data can
accumulate dangling pointers if the program uses multiple contexts on
the same screen. This is fixed by moving the cursor data into the
platform context. The code for deleting the texture and shader program
is omitted as it is tied to the life time of the context and the GL
context deletes its resources automatically upon destruction.
Task-number: QTBUG-65119
Change-Id: Ic3b8e5669d14949af811bdf047e7d47000216180
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
QHeaderViewPrivate::setupSectionIndicator() did not honor the font
set for the QHeaderView which results in a wrong font in the indicator
pixmap. Fix it by using the correct font for the dragged section as
it is done in paintEvent()
Task-number: QTBUG-65017
Change-Id: I5393c6861073de22f30ffa13e12c5e2cf8aa7776
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
In rtl mode, the headers were not painted correctly. The style option
selectedPosition was not filled correctly and the paint rect needed
to be adjusted by one pixel to fit the table grid.
Task-number: QTBUG-56520
Change-Id: Ib92d5ab6ff730bba67eca35c83cd638e613f58b9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The file size column was not properly horizontally aligned. The model
only returned Qt::AlignRight with no horizontal alignment. This lead
to a top alignment within QStyle::alignedRect().
Task-number: QTBUG-64098
Change-Id: Iaef30200a63bd0975c88a67d0af2eb1d5254f588
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Change 28666d167a simplified
QProcess::start{Process,Detached} by using findExecutable() instead of
using execvp, but this introduced an unintended side effect when the
PATH environment variable isn't set. It turns out that most libc have a
default fallback in that situation, which we didn't apply.
This commit applies the default directly to findExecutable(), which
seems sensible.
[ChangeLog][QtCore][QProcess] Fixed a regression that made QProcess be
unable to find executables when the PATH environment variable on some
Unix systems wasn't set. This behavior should not be relied upon since
many systems do not have sensible fallback values for PATH.
[ChangeLog][QtCore][QStandardPaths] findExecutable() will now apply the
default value for the PATH environment variable (as returned by the
POSIX confstr(3) function or found in <paths.h>) if the variable
isn't set in the environment.
Task-number: QTBUG-65076
Change-Id: I9407dcf22de6407c83b5fffd14feda6c1f509210
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Check for QWindowPrivate::blockedByModalWindow in
QGuiApplicationPrivate::processDrag().
Task-number: QTBUG-46287
Change-Id: I8f43de8389f34458f9e10b37b94806b47a50d40a
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
If the cursor is at the top of the screen, it may end up with a cursor
rect that extends beyond the screen after we pad it. We need to make
sure it's constrained by the screen geometry before checking if it's
within the available geometry.
Task-number: QTBUG-65041
Change-Id: I115f49d359b3c2e10219a6b8aa5ad051f44256a7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When the mode is center we are typically moving the dock widget,
but we should however not stop if the mode is Center.
Though the regression
(in commit e662b4ed721ee36f0a17cc413494b7d09395d52e)
is not easy to reproduce it is clear
that the code later may call "mouseMoveEvent(e)" and the
mode is also checked for being Center and in that case
the eventfilter (function) returns true (not false).
Change-Id: I3936ec56833d613f78920d9ccf8ddb66e19e9802
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This is mostly relevant for Apple platforms, where we can use the new
unguarded availability warnings to guarantee that proper version checks
are present when using APIs that are not necessarily available on the
deployment target.
Change-Id: Ie408704b2924e1220491a9ea30f0141dfa4867d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry-picked from 70422449ef)
MetaKeyKeyListener augments the meta state of the keyboard, we need
to also check the KeyEvent.getMetaState().
Task-number: QTBUG-61369
Change-Id: I07a5d7b1b741a958bc94e1f1677dc1f2256220b6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Changed some uses of Q_QDOC to Q_CLANG_QDOC;
eliminated some uses of Q_QDOC; correct some
function signatures used for qdoc; added docs
for swap() functions.
Change-Id: I0d3c62d462bd3b10fd35d411bdfb93d952e6423d
Reviewed-by: Martin Smith <martin.smith@qt.io>
QT_NO_OPENGL must not be defined when running clangqdoc
because there are opengl elements that must be documented.
That means clang will see uses of GLxxx, which might not
be included on some platforms. For example, clang must
parse the declaration for class QOpenGLFramebufferObject,
which uses GLuint, GLenum, and GLbitfield, because there
is documentation to be published for that class in
qopenglframebufferobject.cpp.
This change uses Q_CLANG_QDOC to first undef the needed
GLxxx types and then provide suitable typedefs for them.
This technique is also used in qglshader.h.
This works for macOS, but is it the right way to solve the
problem?
This change also removes some \overload commands, because
they shouldn't be used on constructors. And some \fn commands
that are made unnecessary by upgrading to clang.
Change-Id: I4ac658e951b3f2011698005f0238d4dea85fc403
Reviewed-by: Martin Smith <martin.smith@qt.io>
QColorDialog does not save custom colors after application
relaunching, if those colors were changed with drag'n'drop
Task-number: QTBUG-64500
Change-Id: I8ba6e1ef4e078f7b93463e7b20c9e21659d4777e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QFontMetrics(F)::width() has been deprecated and is replaced by
horizontalAdvance(). This updates all usage of it in tests and
documentation.
It is worth noting that many or most of the usages of
QFontMetrics::width() probably intended to use boundingRect().width(),
but since it currently works, I have not looked into that, just
replaced the function name mechanically.
Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use being()/end() instead.
The region of whose rects() we iterate here is modified in the loop
body, so take a copy of the rectangles. Since QVector is still
missing a range constructor, use std::vector. This does not cause
extra copies, since the QVector inside QRegion would detach anyway,
when the QRegion is modified inside the loop.
Change-Id: Ib973e825b55d9c9568936cb80180858163d87379
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
These errors resulted from the improved parsing provided
by clang, which required rethinking which elements of the
QtConcurrent API should be visible to clangqdoc. The basic
problem is that clang must see declarations for all types
used by a type, or else it either gets lost and fails to
parse a type correctly, or it simply refuses to include
the type in its AST.
Change-Id: Iaa699c287e67d1288fcb2d83a9dbbaf07521d0cc
Reviewed-by: Martin Smith <martin.smith@qt.io>
This change updates the \fn commands in the QtConcurrent
module, which makes extensive use of templates. Some of the
update \fn commands are very long as a result.
A few cases of the tag trick were used to fix qdoc errors
for some complicated template function signatures that were
marked \internal anyway.
Change-Id: I8546b89030c51bb9dddf38fa10bc0248d901aa51
Reviewed-by: Martin Smith <martin.smith@qt.io>
The \fn commands were not recognized by clang-qdoc because
the template stuff was missing from the \fn commands. This
update adds the correct template text and parameters.
Change-Id: If45465880933174f1481a8be292474be191cfd45
Reviewed-by: Martin Smith <martin.smith@qt.io>
This update corrects many qdoc warnings in qglobal.cpp caused by
incomplete \fn commands. It also corrects many undocumented parameter
errors caused by clang's requirement that the formal parameter names
be the same in both the declaration in the include file and the \fn
command.
Some formal parameter names were changed in the declarations in the
header file.
Change-Id: I4cd38f30461c585b97ec11923cdbc81a41fe00b8
Reviewed-by: Martin Smith <martin.smith@qt.io>
There were four dummy declarations for struct QMetaObject that were
needed by old qdoc to allow documentation of some very complicated
function signatures that old qdoc could not parse. clangqdoc can now
parse these signatures, but, unfortunately, old qdoc is still used to
parse \fn commands in .cpp and .qdoc files, so the dummy declarations
are still needed in struct QMetaObject. However, clangqdoc now
sees that two of the four dummy declarations are actually duplicates
of the other two, and then old qdoc complains when it can't find all
four of the function nodes, when it parses the four \fn commands.
This update removes the duplicate dummy declarations and the two
redundant \fn comments. The remaining two \fn comments are
updated accordingly.
This change also moves a couple of qdoc comments so they are located
with the function definitions that they are documenting.
Change-Id: I85e2492ba0380b01c3700b3dc7db0913d6429701
Reviewed-by: Martin Smith <martin.smith@qt.io>
All of QLocalePrivate::codeToLanguage()'s legacy codes were
two-letter, so duplicated a "third letter is 0" check; pulling it out
in front of them all will get any three-letter code more promptly to
the final fall-back, while saving the two-letter codes repetition of
the check.
Change-Id: I8ee81a526adaa7b24c11c1de7a1750d87deb5fb3
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
The documentation claims that function objects just work with
map-reduce. They work for the map function, but not for the reduce
function. Making them work for the reduce function was deemed
too complex for questionable benefit, so this patch explains
the situation and provides a work-around.
Task-number: QTBUG-22710
Change-Id: I7f706468e36031bc261234310d331001b96e5137
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
- There was a typo
- It has not been limited to the 4D mouse for some time now
- The Apple Pencil now supports rotation too
Change-Id: I96e20a56491fbcb80e19dc39d0b48b543217aa24
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
It was superseded by begin()/end() in Qt 5.8.
The eventual removal of rects() will allow greater flexibility
in the implementation's choice of data structure (std::vector,
e.g., or QVarLengthArray).
Remove all traces of rects() from the documentation. This means
we need to copy information previously contained in the rects()
docs to functions which previously just referred to rects(), in
particular the begin()/end() familiy of functions.
Change-Id: I90809809783252f7c552f24b4841f1e965580284
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Not doing so might break the connection. We have had similar
issues before, e.g. QTBUG-45312.
Change-Id: I95f15d24773fc92b052578bd72d1ba264d0a5f63
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Add the command line switch added in change
184c5470f534119b27c1a4caec29d699aba9c234 on qtdeclarative to the
help output of the qmltestrunner application.
Change-Id: I9f42719500e0039afa6a5b0f1f365611855229b3
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
To fix QTBUG-52493 we tied the exposed state of a window to the
application being in the foreground. This has the result of a
visible flash of black between hiding the launch screen and showing
the first frame of the application, as the application is still
waiting for UIApplicationStateActive to begin rendering, which
happens after iOS hides the launch screen.
According to the iOS OpenGL ES Programming Guide, it should be safe
to render GL in UIApplicationStateInactive as well, and even in
UIApplicationStateBackground, as long as the rendering finishes
before the UIApplicationDidEnterBackgroundNotification returns.
To ensure that we catch any bugs in this area, checks have been
added that verify that no rendering happens while in the background
state.
Task-number: QTBUG-63229
Task-number: QTBUG-52493
Task-number: QTBUG-55205
Change-Id: Ib42bedbeddd7479ab0fb5e5b7de9f5805658e111
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
I don't know when it ceased to be needed, but QRegion no longer
does anything fancy with QVector.
Change-Id: I1bdfefc84724c379fab76dada35575666144df12
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Despite the OpenGL ES Programming Guide telling us to avoid all
use of OpenGL while in the background, iOS will perform its view
snapshotting for the app switcher after the application has been
backgrounded; once for each orientation. Presumably the expectation
is that no rendering needs to be done to provide an alternate
orientation snapshot, just relayouting of views. But in our case,
or any non-stretchable content case such as a OpenGL based game,
this is not true.
Instead of continuing layout, which will send potentially expensive
geometry changes (with isExposed false, since we're in the background),
we short-circuit the snapshotting.
iOS will still use the latest rendered frame to create the application
switcher thumbnail, but it will be based on the last active orientation
of the application.
To ensure that we pick up the right geometry when rotating the device
while the app is in the background, we treat applicationWillEnterForeground
as Qt::ApplicationInactive, which matches the recommendations of the
OpenGL ES Programming Guide to "re-create any objects and restart your
animation timers".
Change-Id: Ia9c27f85f996ecf30284c825b43447aa7099224e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Make sure we catch application state changes as early as possible,
and deal properly with any changes delivered before we have an app
to send them to.
Change-Id: I6d0ea0398f9fab88fc182342769b075cb144227f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Use begin()/end() instead.
The old code extracted the rects from the region, then checked for a 'complex'
region (by comparing the number of rectangles against 10), and replacing the
region with the bounding rect if it was too complex. It then went on to adjust
the rectangle list it had gotten from the original region to match the new.
Simply delay getting the rectangles until after we have modified the region.
Since there are many member function calls in-between, take a copy of the
region to iterate over later, rather than relying on the region to be left
untouched by all the code in-between.
Change-Id: I49ddf4d545520ab435ab6b89eec3d24cf371823e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use begin()/end() instead.
In QXcbShmImage::flushPixmap(), instead of gettings different rects(),
depending on a bool parameter, just call yourself again with the
modified QRegion, which we can then just iterate over.
Change-Id: I6d4f7c6e4e5d2a24520716847ca9331bf39337c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
... between QXcbWindow and QxcbShmImage.
Replaces one QRegion::rects() call (to be deprecated), fixes potential overflows
that QXcbShmImage did not handle, but QXcbWindow did, and saves ~1KiB of text size.
Change-Id: I55d37021164feefe0cb3e60bd6d22b1976a6467b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use begin()/end()/rectCount() instead, which don't require QRegionPrivate
::vectorize() calls.
In QPaintEngineEx::clip(), the rectCount() == 1 case called clip(QRect), but
forgot to return, causing another clip(QVectorPath) call with the same
arguments. Fixed.
Change-Id: Ife33112fc8006ed4bdff6409e2b8465ce7acb9d1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Wrap std::free() in a function object, to avoid having to carry around
state (the function pointer) inside unique_ptr objects. This shrinks
unique_ptrs back to sizeof(void*).
Change-Id: I32a711192c5485dc04e3b36a1ddabf02d1e9d4f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
A UIGestureRecognizer may have its delaysTouchesBegan or delaysTouchesEnded
properties set, which causes iOS to not deliver touch events to the view
until the recognizer has failed recognition of its gesture.
In that case, the touch event is not delivered via [UIWindow sendEvent:]
as usual, but via _UIGestureEnvironmentSortAndSendDelayedTouches. The
latter function is apparently not reentrant, as opening a native alert
dialog in response to the touch delivery will result in the dialogs's
buttons to stop working, probably because they themselves use gestures.
Unfortunately iOS maintains two internal gesture recognizers on iPad,
of type _UISystemGestureGateGestureRecognizer, probably related to the
swipe-from-bottom gesture used for multitasking. Without any workaround,
these two recognizers will result in any tap on the bottom part of the
screen to be delivered delayed, which may introduce stuck alert dialogs
as described above.
UITouch has a gestureRecognizers property, but unfortunately this property
does not give us any information in the cases where we need it, so we
have to use an heuristic involving a UIWindow subclass to detect the
case where event delivery is delayed. As there is no way to prevent
the user from recursing into an event loop when delivering the event,
our only hope is to deliver the event asynchronously.
Task-number: QTBUG-64577
Change-Id: I11d9caa8c4542dc80426a9e58ea555914bed433e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Since 5.10, QIODevice resets the error string on opening. So, we should
set the error code to UnknownSocketError accordingly.
Change-Id: I0dd314788ffc182d6837f9d06b51e41d6de59d7e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This update corrects many qdoc warnings in qsharedpointer.cpp and
qshareddata.cpp caused by incomplete \fn commands. Template stuff
was added to the \fn commands.
Change-Id: Ic10bcf04477d5f3d5380aeb1e58050a88f03005a
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This update corrects several uses of #ifdef macros
that needed updating because qdoc now uses clang to
parse header files.
Change-Id: I285efa4629a1a5d5bcbfaf701eeafbd0e9f1e43e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
It is only ever called after the constructor, so merge the code
Change-Id: I5c75a2cd367af401b41920f51754a64dc6c6eb40
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
It is only ever called after the constructor so merge the code
Change-Id: I381165ad90c85342e5db3c16327d729388b71fb2
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
It's only ever called after the constructor so merge its code to the constructor
Change-Id: Icca88764f725b9aeaa08ee7387da8885be247fba
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
And move it's code to the only place it is called, the QUnixPrintWidget constructor,
that means we can remove the if that checks if propertiesDialog is not null since
at that stage we know it is null
Change-Id: I81cdaa0505fa6fe64a45c7d1f5c3e277400cbbf7
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
In Qt 5.4 these envvars were replaced with categorized logging
59ba84d31c. This is not a public
API, the log output is useful mostly for developers and it can
still be used via QT_LOGGING_RULES, so there is no good reason
to keep the old envvars around. By using QT_LOGGING_RULES, we
can access even more xinput2 logs than is available via
QT_XCB_DEBUG_XINPUT*.
Change-Id: I2b12b8696043bc8bf8310f49f0cdc2ba1b8708ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This change supplies several missing class qualifiers for
parameter types and function return types.
Change-Id: I569026e4da0948902fcc13557003d3748b85dd82
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This update corrects about 200 qdoc warnings caused by incomplete
\fn commands for member functions of template classes. It can be
used as an example of how to fix \fn commands that suddenly cause
qdoc warnings now that qdoc uses clang to parse the \fn commands.
For example, with the old qdoc, we had this \fn command, which the
old qdoc handled correctly:
\fn QAtomicInteger::operator T() const
For the new clang-based qdoc, this \fn command must be written this way:
\fn template <typename T> QAtomicInteger<T>::operator T() const
However, the documentation generated by the clang-based qdoc looks the
same as it did in the old qdoc.
Change-Id: I7803b3b7ec7c6b8b3cc1be789bc36921438f527e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Use begin()/end() instead.
Drop the special handling of rectCount() == 1, since with begin()/end(),
we no longer take the hit of creating a QVector just to be able to return
it from rects().
Change-Id: I19ebc38267951c80bc71aa9d2b5df7403d710064
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
When the QVarLengthArray was initialized with a size then append would
add to the end of that. Therefore we need to use reserve to get the
desired effect.
Task-number: QTBUG-64905
Change-Id: Ia1ebeb26cd31bc5e92bd7f81079506a266b845bf
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Android Marshmellow intentionally forbids use of hard links. See
https://code.google.com/archive/p/android-developer-preview/issues/3150
However, instead of using EPERM or another error code that indicates the
hard linking operation itself has a problem but there are no other
problems, Android developers stupidly chose to use EACCES, an errno code
that only indicates permission problems.
In any case, since the call will never succeed, we shouldn't even try.
Task-number: QTBUG-64103
Change-Id: I9e2892cb6c374e93bcb7fffd14fc5d1082bd60a3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
A few parameter types in \fn commands were not
qualified with their class name. They had to be
qualified because they were in a base class of
the class being documented.
Change-Id: Ic0b43be689d17a0a539ee977c0db6e20eb05d5fe
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This prevents an out of range assert when monitoring directory
with activity (for example, temp).
Task-number: QTBUG-62841
Change-Id: Id3aa4098e9bbd665c7b17a667516885fa7c7f473
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Martin Rotter <rotter.martinos@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When building Qt 5.6.2 with gcc 4.1.2 on Fedora 8, a compilation error
happened when compiling the code below
QColor::name()
{
...
case HexArgb:
return QLatin1Char('#') + QString::number(rgba() | 0x100000000, 16).rightRef(8);
...
}
qtbase/src/gui/painting/qcolor.cpp:527: error: integer constant is too large for ‘long’ type
gcc 4.1.2 was unable to handle 0x100000000. The patch is to use Q_INT64_C to
append "LL" to 0x100000000 to avoid the compilation error.
Change-Id: I000e65a5c897ef2d78fcfe4e212d832eb488a762
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Prioritize CoreText over Fontconfig since the former is the
native one on macOS, and any other native font DB on its
respective platform. We introduce a new 'fontconfig' option
to allow using Fontconfig instead. This works similarly to
'freetype' overriding the default font engine on Windows. A
propos of which, 'freetype' now does the same on macOS.
Change-Id: Ic8168820d1d01fddc2f26e046abb65b8ab765f89
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
These errors resulted from clang parsing function
declarations for functions that were not meant to
be documented. Here they are hidden from clang
with #ifndef Q_CLANG_QDOC
Change-Id: I256b49830b63188bf0a685cb393d469f2f2ca315
Reviewed-by: Martin Smith <martin.smith@qt.io>
src/corelib/global/qrandom.cpp:915: warning: Cannot find 'bounded(...)' in '\fn' qreal QRandomGenerator::bounded(qreal highest)
src/corelib/tools/qstring.cpp:774: warning: Command '\snippet (//! [qCompareStrings-QSV-QSV])' failed at end of file 'qstring/main.cpp'
src/corelib/tools/qstring.cpp:5281: warning: Cannot find 'qTrimmed(...)' in '\fn' QStringView qTrimmed(QStringView s)
src/corelib/tools/qstring.cpp:5281: warning: Cannot find 'qTrimmed(...)' in '\fn' QLatin1String qTrimmed(QLatin1String s)
src/corelib/global/qrandom.h:171: warning: No documentation for 'QRandomGenerator::System'
src/corelib/global/qrandom.h:105: warning: No documentation for 'QRandomGenerator::bounded(double highest)'
src/corelib/global/qrandom.h:84: warning: No documentation for 'QRandomGenerator::generate64()'
src/corelib/global/qrandom.h:77: warning: No documentation for 'QRandomGenerator::generate()'
src/corelib/global/qrandom.cpp:799: warning: No such parameter 'sseq' in QRandomGenerator::seed()
src/corelib/global/qrandom.cpp:1096: warning: Can't link to 'operator()()'
src/corelib/tools/qstring.cpp:8982: warning: Can't link to 'qStartsWith()'
src/corelib/tools/qstring.cpp:9203: warning: Can't link to 'qTrimmed()'
src/corelib/tools/qstring.cpp:4798: warning: Can't link to 'qConvertToLatin1()'
src/corelib/tools/qstring.cpp:4825: warning: Can't link to 'qConvertToLocal8Bit()'
src/corelib/tools/qstring.cpp:4928: warning: Can't link to 'qConvertToUcs4()'
src/corelib/tools/qstring.cpp:4884: warning: Can't link to 'qConvertToUtf8()'
Change-Id: I5c7c89b230d3d1de8a679c10833319a470a44e80
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Wacom stylus proximity detection had stopped working: it was not
detecting which type of tool is in use, so all stylus types
acted as a generic drawing stylus.
Selecting XI_PropertyEvent on a root window fixes the problem.
There is nothing in the XI2 specification that says that this
property would not be supported on non-root windows. Possibly
it is bug in the X server. Anyways, selecting XI_PropertyEvent
on a root window in this case actually is better. Property event
contains a global state information, there is nothing window
specific in it, so there is no need to select it for every native
sub-window.
It is worth noting that XI_HierarchyChanged also seems to work
only when selected on the root window (according to my testing
results). And on XI2 author's blog post about XI_HierarchyChanged
it says [1]:
"These events are sent to all windows, so it doesn't really
matter where you register. The traditional approach is to
register on the root window."
This kind of further confirms that it might be bug in X Server's
implementation.
[1] http://who-t.blogspot.no/2009/06/xi2-recipies-part-2.html
Task-number: QTBUG-64911
Change-Id: I8582675bf835239932e23f4596966dc167495e30
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Follow native behavior and disable ⌘H and the “Hide”
menu item if there are any open popup windows.
Task-number: QTBUG-58727
Change-Id: Iad38cc5cce29e0081613417c53b154ae0f05857e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
There are two fake classes in qendian.h that exist only documenting
a lot of operator functions, but now that clang is being used to parse
all C++ code, when a class is a template class, clangqdoc must see its
template stuff to recognize template type T, for example. Hence, this
update adds template<typename T> to some fake class declarations used
only for documentation purposes. ie, inside #ifdef Q_CLANG_QDOC.
Change-Id: I1988b77cd7f3bb97067e7107dd00de34770e9fed
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
1. Make the checkbox's box size hidpi scale-able. Making the size
not only anchored to icon size, but also the menuItem's rect height
in empty or too small icon cases.
2. Make the checkmark's pen width in propotion to the box's size
to keep consistent visual effects among different dpi settings
3. Also make the radio button hidpi scale-able.
Task-number: QTBUG-63576
Change-Id: I4369aaa18ee68908a26a118cf04292ee4c3e9847
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This change updates the \fn commands in the endian
functions, which are template-based. clangqdoc now
parses these \fn commands and expects to see all the
template stuff in the signatures.
Change-Id: I94c1aba8d710c97b8d41184d64b5341c88ece297
Reviewed-by: Martin Smith <martin.smith@qt.io>
The \fn commands were not recognized by clang-qdoc because
the template stuff was missing from the \fn commands. This
update adds the correct template text and parameters.
Change-Id: I920d9cc4bef710f276267a34b6b9d49f7412adb0
Reviewed-by: Martin Smith <martin.smith@qt.io>
For ibus-hangul, it needs ForwardKeyEvent signal to fix
the commit issue.
[ChangeLog][plugins][ibus] Support ForwardKeyEvent signal
Change-Id: If41e75bed9ec4e3126db05c8ece4a51d2bc3c3fd
Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The macros Q_GLOBAL_STATIC(Type, VariableName) and
Q_GLOBAL_STATIC_WITH_ARGS(Type, VariableName, Arguments)
were documented in qglobal.cpp, but both qdoc comments
were marked \internal. More recent documentation for the
macros also exists in qglobalstatic.qdoc, and the qdoc
comments there are not marked \internal. clang-qdoc
reports errors indicating that both macros havew been
documented in two places. This update removes the older
comments that are marked \internal.
Change-Id: I1c319b831d705d86eb4142b9963dbf56edc72772
Reviewed-by: Martin Smith <martin.smith@qt.io>
This change updates the \fn commands in QGenericMatrix
clangqdoc now parses these \fn commands and expects to see
all the template stuff in the signatures.
Change-Id: Icf815606f98271aae1959adc633e918e7f241aa0
Reviewed-by: Martin Smith <martin.smith@qt.io>
_q_canWrite() unconditionally disabled the write notifier before the
writing, and might have enabled it again afterwards. This caused
unnecessary processing in the event dispatcher and could result in
extra system calls.
Actually setting the state at the moment when the write buffer size
is determined is enough.
Change-Id: I81f9ec27d95a5a9bdb83cc6a842b6ae95f002b96
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Clang needs to see declarations for GLclampf, GLSizei,
and GLboolean.
Change-Id: Id1c1310e4877b32bb8fc2e6d4f743999842b3f06
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
When Q_CLANG_QDOC is defined, ensure that the following openGL
types are defined:
typedef int GLint;
typedef int GLsizei;
typedef unsigned int GLuint;
typedef unsigned int GLenum;
typedef unsigned int GLbitfield;
typedef float GLfloat;
typedef float GLclampf;
typedef bool GLboolean;
typedef void GLvoid;
typedef char GLchar;
Running clangqdoc with these on macOS fixed over 500 qdoc errors!
There were also some functions that declared the parameter list as void.
It was also shown as void in the \fn command for each function in the
.cpp file, which is wrong. When the function is declared in the header
as int func(void), it should just be \fn int classname::func() in the
.cpp file.
Change-Id: I6489d499f0830e5ba97c085ed5dadfad5affecb7
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Two of the three functions were for functions that
should not be documented. The third was a function
protected by #ifndef Q_OS_DARWIN, which required a
test of Q_CLANG_QDOC in the header and cpp files.
Change-Id: Id2ab3e4f2ea896dc628a622de2e80a19c18eb9fe
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Some member functions of QImage were upgraded to use ref qualifiers,
but the documentation wasn't updated correctly to account for this.
This change update the documentation for those member functions to
show the ref qualifiers in the documentation.
Change-Id: I0ff4011e9d0251062d5616d69e9dda6bdbc1c136
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This update surrounds some #defines with #ifndef Q_CLANG_QDOC
because they define some names that conflict with formal parameter
names. Otherwise, clang starts replacing formal parameter names
with $27 etc, when qdoc runs, and that causes trouble for qdoc.
The change also replaces one use of Q_QDOC with Q_CLANG_QDOC.
Change-Id: I6e93bf1e0d30d7590280b6f18f0e694556050685
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
A use of Q_QDOC is changed to Q_CLANG_QDOC.
A misspelled std type name is corrected.
A few extraneous ';' are removed.
Change-Id: Ic49f64a3b97f645268a8ecbbca5f0eef0456bb33
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The code checked on QFileInfo::size() whether the file had any content.
The check failed for NTFS symbolic links since QFileInfo::size() returns 0
for them. Workaround by using QFile::size() instead.
Task-number: QTBUG-64121
Change-Id: I303414b5a560d1ed8fbc53d969e53f9e2899ae5c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This update corrects many qdoc warnings in qpointer.cpp caused by
incomplete \fn commands. Template stuff was added to the \fn commands.
Change-Id: I39bcd5db1cb4257d574918155dc49414a8b00c3d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This update corrects many qdoc warnings in qdebug.cpp caused by
incomplete \fn commands. It also corrects many undocumented parameter
errors caused by clang's requirement that the formal parameter names
be the same in both the declaration in the include file and the \fn
command. The name changes don't seem to be objectionable in this file.
Change-Id: I0630a0e05e651b58608b2f2116df70dcf0e83a45
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This update corrects many qdoc warnings in the documentation
for the QFuture classes caused by incomplete \fn commands.
Template text and parameters was added.
Change-Id: I360c9db191230b19a9b174a43468d3de1eb24549
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This change updates the \fn commands in qalgorithms.qdoc.
clangqdoc now parses these \fn commands and expects to see
all the template stuff in the signatures.
Change-Id: Id9492bf80eca494eb2b5b8d7364b8485ed1a047e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The \fn commands were not recognized by clang-qdoc because
the template stuff was missing from the \fn commands. This
update adds the correct template text and parameters.
Change-Id: I49302d0792c8a4c5a36c671142796a48d384b548
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The \fn commands were not recognized by clang-qdoc because
the template stuff was missing from the \fn commands. This
update adds the correct template text and parameters.
Removes about 150 qdoc warnings.
Change-Id: I63c6cae5613f0bb23527607230b6edf7fac33740
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The \fn commands were not recognized by clang-qdoc because
the template stuff was missing from the \fn commands. This
update adds the correct template text and parameters. This
change eliminates about 150 qdoc warnings.
Change-Id: I23632e739b529cd56a6cae1a29df2e7131a05292
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This reverts commit 958a4c9087.
QApplicationPrivate::usesNativeStyle() introduced by that commit
was never used. We have an untested method that is furthermore
may return wrong results because it relies on the comparison
'app_style->objectName() != QApplicationPrivate::desktopStyleKey()',
but not all styles set their object names.
Conflicts:
src/widgets/kernel/qapplication.cpp
src/widgets/kernel/qapplication_p.h
Change-Id: I48d221f9387381db9ed51a7a068bfd0a0c2ed58d
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Non-const arrays are not literals, so their encoding may be
not defined at compile-time and they should be converted
explicitly.
Change-Id: I2a65e095224f48efafeaa97fd85134697a1e5bf0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Drop the #ifdef Q_COMPILER_RVALUE_REFS - we require that since Qt 5.7.
Change-Id: Ib4c6f559b014915f43875ec6791bfda3f24a109b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When the response from res_nquery is too big for the buffer used to receive it
(of size PACKETSZ, a mere 512 bytes), the returned responseLength is the
size of the data that would have been delivered, had there been enough space.
Trying to process all of the data, including what wasn't delivered, leads to
reading past the end of the buffer, which either causes a crash or leads to
rubbish (from the stack) in the resulting QDnsRecords. Easy to reproduce
using many long TXT records.
Replace the array with a QVarLengthArray; when the response is big, resize()
and retry, so as to actually get all of the data, so that we can process
it all. A follow-up patch will fix the case when even the second call/resize
buffer is not enough and we have to use TCP.
Task-number: QTBUG-64742
Change-Id: I173beb531e11a3828fd9c97f437afc192766035e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
As the numercialPrecisionPolicy can be set and subsequently retrieved
from the QSqlDatabase's driver, then when copying the QSqlDatabase, we
need to set that appropriately too.
Task-number: QTBUG-10452
Change-Id: I2c63748365ab4e9fbc29d8d460d80d2e2a0ee385
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
We haven't had support for anything older than 7.3 for a long time, so
this removes the code to save having to maintain it any further.
Task-number: QTBUG-644
Change-Id: If0635f3bef5138a00a0e77011a70f23d0bffda32
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The \fn commands were not recognized by clang-qdoc because
the template stuff was missing from the \fn commands. This
update adds the correct template text and parameters. It
eliminates nearly 2000 qdoc warnings.
Change-Id: Ibe047424396a8f99f8bd64efea1b0d8cc7c7527d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
... to make user code buildable with gcc [-Werror=zero-as-null-pointer-constant].
Change-Id: I309953acd7154511660302aa9826410276cfe41b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Although the items were enabled for a dialog's menubar they were not
appearing as such because Cocoa will query the menu item's target to see
if it has a worksWhenModal selector. Therefore to ensure that the menu
item will be enabled, we need to add this selector to our delegate and
return YES from it when the window for the menubar is the dialog.
Task-number: QTBUG-44584
Change-Id: Ic62dc027d563069d2f5c2b7bf9810184bd76de39
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Change-Id: I5bed1fd690daa72492e7ec5f24e80198a2592986
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
There seems to be an issue in CoreText which may cause an existing
font descriptor to give unreliable results if it refers to one of
the system theme fonts. Since we do not know all function calls
or events that may trigger this bug, the safe route is to always
create fresh font descriptors when creating fonts for these
descriptors. The impact on performance should be small, as Qt has
its own internal caches.
[ChangeLog][macOS/iOS][Text] Fixed an issue where text using
one of the system theme fonts would under certain circumstances
display random glyphs.
Task-number: QTBUG-63476
Change-Id: I9e9b253018c63976345eec1439a6b78de2cab869
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Enable xcb QPA plugin when XQuartz is available. This is done
in a single build, alongside the Cocoa version.
We delegate part of the configuration stage to pkg-config, so
this becomes a requirement. Ensure that
PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/opt/X11/share/pkgconfig
is in your environment, or pkg-config is properly set up.
Tested with the following configure options:
configure \
-pkg-config \
-fontconfig -system-freetype \
-system-xcb -xkb -no-opengl \
-qt-xkbcommon -qt-xkbcommon-x11
Change-Id: I2eb5a0491172368afc4c629c540cbef08580348d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The condition for the 'services' sub-project in platformsupport.pro
was identical to the one guarding genericunix.pri in services.pro.
We can't remove the condition in platformsupport.pro because that
would result on an empty static library, which is not supported on
some platforms, like macOS.
Change-Id: I5c80737d9527bdd75dde44e33e5063f3d7aeecb7
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
qwindowsxpstyle.cpp(289,35): warning: Signature is not normalized. Use void* instead of void * [-Wclazy-connect-not-normalized]
qwindowsxpstyle.cpp(292,35): warning: Signature is not normalized. Use void* instead of void * [-Wclazy-connect-not-normalized]
Change-Id: I773530452c0837c5066f9174c25ae37e57086e76
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
... and not only when the source explicitly specifies build variants.
Change-Id: Iac6c8fda8f431d5fb50fada8338d1b660ab040d7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
flex emits code using isatty(), but fails to include the required
unistd.h. we can work around it by including the header ourselves.
Task-number: QTBUG-64771
Change-Id: I05313eeb79f7a0e25365dee5f05a0142f87209ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QAbstractItemDelegatePrivate::textForRole() was formatting date and
time separately, then gluing the parts back together with space.
QLocale can do that just fine itself (it has a toString() overload
that handles a QDateTime) and might even (some day) do it better. To
my mild surprise, this proved sufficient to fix a problem with
date-time display in tool-tips, when the date-time includes a zone.
Extracted the date-time part of an existing selftest into a test of
its own and extended it to test times of each spec-type; verified that
the non-local spec cases of this all failed before this fix.
Task-number: QTBUG-61069
Change-Id: I6d6be0c27be9a557d8afc3ced200a10b2aaff816
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
It's decoding a SYSTEMTIME in the slightly quirky manner of MS's
timezone APIs (year 0 means annual, with wDay as 1 through 4 for the
first through fourth, or 5 for the last, of a specified week-day
within a month) and the calculations to go with it were a little
opaque. So clean it up, document what it's doing (and why) and assert
some things that should be true. Also, only copy one int, instead of
a whole structure, to change from their day-numbering to ours.
Expand on a related TODO comment in its caller, at the same time.
Change-Id: Iffd95c094c37fc1081b73b2a267cfdcd29aeb4ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The implementation of QWinTimeZonePrivate used many static functions
and at least one struct; to which I've added. Put these all into an
anonymous namespace (thereby keeping the struct types out of the
linker's sight): make them local the C++ way, rather than the C way.
Change-Id: Ibdce0865234b5d4ebbdc90628cc4d9e790ed6321
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTimeZonePrivate::dataForLocalTime() needs a transition before the
time it starts at; MS's time-zone data tends to omit old zones (before
2007, in the case of Win7 for Casablanca - which had interesting
transitions before that), so all we can do is extrapolate backwards
from there; but a first rule is indeed apt to be a no-transition rule,
describing the zone's status up to the first known transition. So
fake a "start of time" transition to return for this case, that
describes this prefix of history.
Change-Id: Iaf178cbebc3b1e599cbde3437a0af75d9f6ca432
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A transition time may represent the beginning of time; as such,
arithmetic on it might underflow, e.g. on adding a negative zone
offset to compare with a given time. So move the arithmetic to the
other side of the comparison in such cases.
Change-Id: I1697a03ebf74679ff86059664dd2b173b9c4c367
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When a year contains a real change of standard time without any DST,
MS's APIs still claim to have both a DST start and a DST end; one of
them is bogus and positioned on the start (or end) of the year,
producing no change in offset from the end of the previous (or into
the start of the next) year. So code round that.
Task-number: QTBUG-42021
Change-Id: Ieb6161cfb77db8a57dc181097f117316f9d1c13c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Iterate rules (now that there's fewer of them than years) with only a
secondary iteration on years (when needed - in which case it should
never need more than two iterations). In particular, avoid iterating
years to the MIN_YEAR and MAX_YEAR extremes on failure; fail faster !
Change-Id: I354af8e0cb1e484c8abda279991e6e1824f9f7d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The MS API documents that the two TIME_ZONE_INFORMATION date fields
either both have wMonth clear (when there is no DST) or both have it
set (for each part of a DST pair). This rule is followed even when
there's a standard time change without DST, with perverse results I'll
deal with in a later commit. Add code in init() to verify the rule is
followed and qWarning() if not.
A year with no transitions doesn't imply no earlier or later year has
transitions, so don't give up on searches for transitions because of
it. Also fix a potential uninitialized variable bug, related to
data() breaking out of a loop on such a year.
Change-Id: I1ad86c07e54b2eb835a2e02d18dc64022f52a0d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Note that the relevant cases are all numeric, eliminate a redundant
variable (the min of two others, one of which was provably <= the
other), invert and rename a boolean (that was always used negated),
eliminate a case that couldn't arise (and assert this).
Change-Id: I9ef9cedbeb608c7cd56ddc618ddfb921966edfbf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Previously, a 1, 2 or 3 for "dd" would be rejected because 10, 20 or
30 would fit in the field and be valid; but 4 or more was accepted,
even though it was too short for the field, because no suffix could
make it valid within the field-width.
[ChangeLog][QtCore][QDateTime] When parsing dates and times from
strings, fixed-width date-time fields, such as a "dd" for day,
QDateTime now rejects all values that should be padded, rather
than only doing so when the value is a prefix of some value that
would fill the field-width. Use a single letter for the field,
e.g. "d" for day, if you want to accept short
values. (QDateTimeEdit is not affected.)
Task-number: QTBUG-63072
Change-Id: I22d223c50057c3edab4ef7f01d9ed0f58e9139c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>