For most cases, the GCC/Intel atomics (__sync functions) are fine, but
there are some systems for which libgcc is incorrectly built (QNX
6.5.0). Additionally, this will allow Harfbuzz-NG to be supported in
exactly the same systems as Qt itself.
Task-number: QTBUG-43850
Change-Id: Ib53f57f70d4ad46863c45e74d60b0eb45ba9bd02
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This code is C++ only. There isn't a single C++ compiler that fails to
understand the "inline" keyword, since it's required by C++98. Any
compiler older than C++98 is likely to choke on the template usage
further down, so this isn't necessary.
Moreover, the C++ standard says you cannot define macros.
[lib.macro.names] says "Nor shall such a translation unit define macros
for names lexically identical to keywords." -- technically, it's a
promise that the Standard Library headers won't do it, the wording means
that the entire translation unit won't do it, which implies no source
can do it.
MSVC complains about it:
fatal error C1189: #error : The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.
Change-Id: Ic2a0a03a0af47386e34bb698454a2040ef3f6a9d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
execinfo.h is optional in uClibc. We need to check
__UCLIBC_HAS_BACKTRACE__ if uClibc is used.
Change-Id: Ie28be85b0b70472df1fc4a208581bb66ad34229e
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This only occurred if the item added was the only item in the last
row/column, since then the the internal grid failed to expand
(in this case it would always call expand(0, 0), which would not
create the extra row/column).
[ChangeLog][QtWidgets][QGridLayout] Fixed crash that sometimes happened
when adding items with spans that spanned to the bottom/right edge.
Task-number: QTBUG-38052
Change-Id: Iba95f6d9d9356b4d1c84c7b93f4af9b4ea0cf714
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
Some drivers appears to reset their scroll positions when make the
primary point. This patch listens for the device changed event and uses
the information in it to update the position.
Task-number: QTBUG-40829
Change-Id: If354dfde6300ceb2b81be14ea24594ab0658a6aa
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
This version was based on Clang mainline between releases 3.1 and 3.2,
which means it has part of 3.2 features but not all. One of the missing
features is __builtin_bswap16.
Cherry-picked from ec9bc843d8 on 5.4
Change-Id: Ic5d393bfd36e48a193fcffff13b95664c7f664de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This patch apply the recommended cleanup in qpainterengineex_p.h
Task-number: QTBUG-25069
Change-Id: Ice2c3298c88ba6a7141642470aeeefa782af7f3a
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
If the window contains a widget that accepts text input, a Meta+...
shortcut will be interpreted as if no modifier was pressed. This fix
enables the usage of Meta+... shortcuts for the XCB platform plugin.
Change-Id: I80034b7e6bbbf18471c86fc77320d5038f5740be
Task-number: QTBUG-43572
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Historically, the screen number of a QWidget was stored in
QTLWExtra::screenIndex which came in via the Q_WS_QWS platform.
The variable contained the screen number of the QDesktopScreenWidget
and the desired screen number for widget creation (from parent widget
or desktop parent widgets) and was not updated according to widget
geometry or when the associated QWindow moved to another screen.
Storing the screen number is problematic in Qt 5 since it may change
when the list of QScreens in QGuiApplication is rearranged.
This change renames it to initialScreen and changes its usage to only
contain a screen number when a screen is requested by parenting
on a desktop widget or reparenting. A value of -1 indicates no screen
is requested and the number should be deduced from the geometry.
For the usage in QDesktopScreenWidget, add a method to determine the
number via index in the list of QDesktopWidget.
Task-number: QTBUG-44070
Task-number: QTBUG-44213
Change-Id: I153d19073ad4b0fd14ef3d24caa6d3e76f350e82
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
When using images in QRC and giving the 1x and 2x image files
respective aliases but without any file extension
(for example 'myimage' and 'myimage@2x'),
then QIcon would fail to find the 2x variant.
Task-number: QTBUG-44049
Change-Id: I400bf6d22aeefe0aa351c68e473bf24ac2a36471
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This patch aims to improve the documentation of setPlainText/setHtml to
let the user know that the undo stack is cleared when both these
function are called.
Change-Id: I079f9f1dd407387941777ebbc7b5a7bc6dc005ec
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Currently angle() is used in place of angleTo() to describe the
difference with intersect. This patch fixes that.
Task-number: QTBUG-44309
Change-Id: Idfc521932247f76fe15fd980ff8e87e52feec1f1
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Otherwise there is a race condition: when the tray implementation
gets around to embedding the window, if it was already shown,
it will be unmapped, embedded, and then remapped. Some tray
implementations will resize the tray icon to 1 pixel wide in
that case. We also never want to show a window that was intended
for the tray in any other location, so it's better that it remain
invisible until we are sure it is embedded.
Task-number: QTBUG-31762
Task-number: QTBUG-35658
Task-number: QTBUG-32811
Change-Id: Id324b0bfded0f8258ff1686a223cb2c069827d42
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
... but choose HTTP/1.1 and continue connecting anyhow. According to
the NPN spec, actually we should choose SPDY:
"In the event that the client doesn't support any of server's protocols,
or the server doesn't advertise any, it SHOULD select the first protocol
that it supports."
However, some tested servers did not advertise anything and did not
support SPDY, so blindly trying the newest protocol would fail. We are
conservative in that case and choose HTTP.
Task-number: QTBUG-40714
Change-Id: Ia8aaf01fea74e13d9e4416306f85f1890b25559e
Reviewed-by: Richard J. Moore <rich@kde.org>
Disable top-level widget code path for embedded widget in the show
helper.
Task-number: QTBUG-43780
Change-Id: I574e07130e5e68a019a426cee3fde982f3883720
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
QProcessPrivate::_q_processDied() was potentially called twice if there
was a slot connected to readyRead() that called processEvents(), because
the processFinishedNotifier was still enabled when readyRead() was
emitted.
This led to a null pointer access in findExitCode.
Change-Id: I4b796b81f050dc46bb9469602984accaa6ebfa28
Task-number: QTBUG-33731
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change c238d34137 was a refactoring
which slightly changed behavior. In the case of fetching the
alpha map's bounding box, before we would call loadGlyph()
even for the case of outline drawing, as the correct bounding
rect is still needed for this case. In loadGlyphFor() however,
0 was always returned for this case, as it was only used for
populating the cache.
The simple fix for this is to add a bool to loadGlyphFor() which
adapts the original behavior when set, similar to the
fetchMetricsOnly bool in the loadGlyph() functions.
Change-Id: I76296c8aaeddbdae9e4c27ed2b30b7d59ff0843b
Task-number: QTBUG-44273
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
We do not support Windows older versions in the first place ...
Change-Id: I2cd3135f1b7f2dac6929c07624ea9373f4ac0ff1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The call to LookupAccountNameW from advapi32 was rewritten following
the example:
http://msdn.microsoft.com/en-us/library/aa392742%28v=vs.85%29.aspx
This prevents the generation of a garbage pointer when accessing
QWindowsSystemProxy::init() for Qt compiled as 64bit library
with MinGW-w64.
Task-number: QTBUG-39874
Task-number: QTBUG-38145
Change-Id: I620b2fa64941f84838f9a386851480285336e8d1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Use a static_cast instead. This is not 100% equivalent,
since it's missing remove_reference<>, which we don't want
to depend on and whose emulation in qtypetraits.h is missing
rvalue support.
That will be fixed in dev.
Change-Id: Ib03754c81c904932943d3a5415b54ff107f4719d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QWindowsXPStylePrivate::buffer() can fail due to CreateDIBSection()
failing for large sizes. Introduce a bool return for the
QWindowsXPStylePrivate::drawBackground() helpers and fall back to
QWindowsStyle:::drawPrimitive() should that happen for PE_FrameWindow
in QWindowsXPStyle::drawPrimitive().
Task-number: QTBUG-44282
Change-Id: I122d84576455bbad8e6639022da5bf64f79aed3a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
The QImage returned from grabFramebuffer should have the dpr of the
source.
Change-Id: Iafeabc1ab4e032fc28b73307104917ba3e898ad5
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
The methods for inplace conversion from RGBA to ARGB was misplaced by
one step causing conversion to RGB16 to get an invalid method.
Change-Id: I3b2b4cffe993705c48613eec7d9b7c6213f57fc2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
findEventTargetWindow() will return 0 if m_window is
a top-level window with Qt::WindowTransparentForInput
set.
Change-Id: I413dabf2a8993b0522653c4e586bb304b642f3ed
Task-number: QTBUG-44013
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
prepend the 'cd' command only after prepending the variables, as
otherwise they'd apply to the cd command only.
Task-number: QTBUG-44183
Change-Id: Ibf96a16ce2c9cd9c0e80ca3cd5433e64ec19b136
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
If we set ANDROID_NDK_PLATFORM env variable, QMAKE_DEFAULT_XXXDIRS still contains
old ANDROID_PLATFORM, so we need to overwrite it.
Change-Id: I917e24caa11bd589966b3fb11be3a9f3c4370b3e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
We need PIE, doesn't matter if reduce_relocations is used or not
Change-Id: I9a359b9d4443a6059980cd4c48058132ec4267fe
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section.
Length is supposed to be equal to the section items length, but the state saved might be corrupted.
Task-number: QTBUG-40462
Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Ctrl/Ctrl+Shift should not cause any characters to be input
(as opposed to AltGr(Alt+Ctrl) as used on German keyboards).
Extend the tests in QLineEdit and QPlainTextEdit to
check the modifiers, remove test from QTextEdit
since it is handled by QWidgetTextControl.
Task-number: QTBUG-35734
Change-Id: Ie0004fac68cf840c68247f27547e84b021355cd2
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Otherwise, the code triggers for top level windows in setups with
multimonitors where the primary screen is on the right and the left
monitor has negative coordinates.
Task-number: QTBUG-43879
Task-number: QTBUG-38475
Change-Id: Ied3ee6dc59bd784e11db22031d2090cc6f42ef8b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
Terminating the scan thread is leading to crashes. So was the previous
solution to use wait(5000), since the scan thread may take longer than
that.
Task-number: QTBUG-36000
Change-Id: I5c37ba5ba3f5c156fca30f3dacaa998c15f76be8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
In MenuBar.qml, it's possible for __isNative to be set
after visible on a child QQuickMenu. In that case, the qcocoamenu.mm
will have set submenu to nil, only to be overridden in insertNativeMenu
when __isNative is set.
Change-Id: Id3c6bca03f937528d05b166cbd6a6d1011db43e8
Task-number: QTBUG-44168
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Assign geometry in setGeometryDp() only when minimized as otherwise the
variable will be set by the handling of the resize event triggered by
setGeometry_sys()handleGeometryChange(). As it is, it suppresses
the emission of screen change signals for programmatic move operations
since the move is not detected.
Change-Id: I5cd32bb16fd41dd720c16ddf84b88df642677af7
Task-number: QTBUG-44070
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Add some parts of the qtdiag tool as a qtbase test to output the
graphics configuration to the CI log and to verify that Open GL can be
initialized for platforms on which the qopengl test is marked as
insignificant (for example, ANGLE).
Change-Id: Id445e57928e0307ad38cd433c52a62501f1097c6
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
CppCat detected duplicate sub-expressions in the code that checked for
BottomLeftSection and BottomRightSection. It was fairly obvious to
see what the values should be.
Change-Id: Id45ca5bbd26c92b800c60867fef5170578216eee
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
There were several leaked CFStringRefs in the new OS X bundle detection
code that is part of QFileSystemEngine.
Change-Id: Id0817e9692da411c7eb8287b9bf71b99ae28f960
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
This partially reverts commit 1755038134,
which did not only fix undefined (signed left-shift), but also
implementation-defined (signed right-shift) behavior. It turned out
that code depends on a particular implementation behavior (logical
instead of arithmetic right-shift), and needs to be fixed first.
Change-Id: I9ba32d06f127d17d05e0c6f6eac3d26268587bca
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
(this is committing the new output of generate_ui from qttools)
For QLatin1String, operator== is overloaded, even for QStringRef,
so comparing to a latin-1 (C) string literal is efficient,
since strlen() is comparatively fast.
OTOH, QStringLiteral, when not using RVO, litters the code with
QString dtor calls, which are not inline. Worse, absent lambdas,
it even allocates memory.
So, just compare using QLatin1String instead.
Change-Id: I5035d259085c21689ab0f62fd49819ab5223ffe8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>