especially during debugging, it is often necessary to re-run only one
(or a few) tests, where -recheck-all would be wasteful.
Task-number: QTBUG-64059
Change-Id: I9410894dec4289ff832d7f75e04f9b60fe76c57c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
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 Xcode, the default value for GCC_GENERATE_DEBUGGING_SYMBOLS is YES,
which causes Xcode to emit debug symbol bundles (.dSYM) on macOS and iOS
*if* DEBUG_INFORMATION_FORMAT is also set to dwarf-with-dsym. Since that
setting is already set to an appropriate value with debug vs release
builds, the default Xcode value for GCC_GENERATE_DEBUGGING_SYMBOLS is
already correct and in effect the only thing qmake was doing was always
setting GCC_GENERATE_DEBUGGING_SYMBOLS to a wrong value for release
builds - it should be YES in all cases, to allow the .dSYM bundles to
be generated in release mode, which is in fact the only case where
they're really needed in the first place.
Task-number: QTBUG-41246
Task-number: QTBUG-50896
Change-Id: I07639a3c4ff9f62d591cde3ad66748767d475e3b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@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>
Commit 68bcccac took account of MS TZ APIs mis-describing non-DST
zones making changes to standard offset (e.g. Europe/Samara in 2011 at
the end of October); however a DST transition that coincides with an
equal and opposite change to standard offset, while the other end of
its DST period changes normally, ends up looking exactly the same
(although it's nominally subtly different), in MS's APIs. Thus fixing
the more common case broke this more obscure case; there is no way to
fix this (other than not using MS's broken-by-design APIs). So kludge
the test to skip the bit we know this breaks.
Task-number: QTBUG-64985
Change-Id: I068500e2e783ab72b400bfd6dbb7dbbd5b08a7bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The test would fail on Wayland with window decorations enabled because there
window content is drawn to an FBO before it's blended with the window
decorations (also drawn by the client).
Task-number: QTBUG-51741
Change-Id: I7c74ad235c6a2d50231a9f863da1810675dd4eae
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
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>