On some devices, a miscompilation of libc.so has caused it to
return the wrong value. Instead of returning the dest pointer,
it returns dest + n. When compiling with optimizations turned
on, gcc may use this return value for subsequent accesses to
dest after the memmove() call, causing memory corruption.
This caused problems e.g. in QVector::prepend() which would
overwrite the whole vector with the new value.
Setting -fno-builtin-memmove disables the optimization and
works around this bug with very little risk or impact.
More information in:
http://code.google.com/p/android/issues/detail?id=81692
[ChangeLog][Android] Fixed device-specific crash on Samsung
Galaxy Tab 3 Lite 7" and some other devices.
Task-number: QTBUG-34984
Change-Id: I0c1347149eb5fe1c298758fe7de81aca4137f652
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
The keepalive socket can only be set if the socket is not connected
(see
http://msdn.microsoft.com/en-us/library/ie/windows.networking.sockets.streamsocketcontrol.keepalive)
Task-number: QTBUG-38623
Change-Id: Ia40dc66f071a8109538e4be7a8f420de81d5be8d
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
When any item in a QColumnView gets selected, the next column gets
normally set to show the children of that index. When we are on a leaf
of a tree model, the next column will have an invalid root index, yet
we set that root index as the "current index" for the current column.
Due to the special handling for invalid indexes in
QAbstractItemView::setCurrentIndex, this ends up breaking the current
item AND the current selection in that column. Further clicks inside
the column for instance trigger the entire column (up to the clicked
index) to get selected, because of that broken first setCurrentIndex.
The simple fix is to stop doing that when the next column has
an invalid root index.
Task-number: QTBUG-2329
Change-Id: Icd10c0b958e25cd868536e1315561787977b68bd
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Previously, the accessibility focus rectangle was only visible when it
overlapped with the m_editText View of QtActivityDelegate. The reason for
this is not completely verified, but this is the most likely reason:
* The SurfaceView and QtLayout (ViewGroup) does not do any drawing
themselves. Due to this their default value of the View::willNotDraw
property is true. Because of this Android might assume there is no
content for the focus indicator to surround. (This was verified with
setting the willNotDraw property to false on the accessibility view);
* Another possible reason could be that overlays does not work for
SurfaceView. It is documented that overlays does not work for
SurfaceViews, so therefore it tried to use the overlay of another
view. For some reason it picked the m_editText overlay instead of the
QtLayout overlay.
See here about overlay:
http://developer.android.com/reference/android/view/View.html#getOverlay()
The solution is to add another View that covers the whole screen, which
will be used solely by android to draw the accessibility focus indicator.
In addition, we change the QtAccessibilityDelegate to no longer have the
SurfaceView as a host, but have the m_accView as a
host (the host can be freely changed, since all accessibility nodes are
virtualized through the delegate anyway)
For the record, this will be the current ordering of views in QtLayout:
(back-to-front order):
Qty Default Qty
* Surface View(s) >= 1 1
* Accessibility View == 1 1
* Native View(s) >= 0 1
* m_editText View == 1 1
where the m_editText migth be interleaved among the Native Views.
[ChangeLog][Android][Accessibility] Fixed an issue where the accessibility
focus rectangle was not drawn properly
Task-number: QTBUG-38869
Change-Id: I64d6b6ec45b27d0d93ac9dd840de764c18c55d04
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Always skip calculating style-dependent margins for windows claimed
to be frameless by Qt. This allows users to remove the margins by
handling WM_NCCALCSIZE with WS_THICKFRAME set to ensure Areo snap still
works.
Task-number: QTBUG-40578
Change-Id: Ice7771df8fbf59b370568219d10c12ce04e99628
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
The fixed-size EGL display must be updated on PC as well as Windows Phone.
Task-number: QTBUG-43112
Change-Id: I0ba90370b67e8c065843e5754579e341b647266d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
The Fira Sans font by the Mozilla Foundation has bytecode that goes
into an infinite loop. Fortunately FreeType catches the case, but we
fail to render any glyphs and spends too long trying the bytecode on
every glyph.
This patch instead switches the font to auto-hinting when this error is
encountered.
Task-number: QTBUG-41034
Change-Id: Icd044b41396a06fb435bc189cdbd71d703107de6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
When calling QDockWidget::setTitleBarWidget() from within signal
QDockWidget::topLevelChanged(), a nested call of
QDockWidgetPrivate::setWindowState(unplug=true) is triggered, leaving
it with Qt::X11BypassWindowManagerHint set and thus invisible/off
screen.
Force the unplug parameter to false if the widget is already
in floating state.
Task-number: QTBUG-42818
Task-number: QTBUG-38964
Change-Id: I6aff61e4ee1501f5db281566b66db66c19351410
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Fix warnings:
QWindowsContext::windowsProc: No Qt Window found for event 0x46 (WM_WINDOWPOSCHANGING), hwnd=0x0xde0408.
occurring when using Active X controls.
Factor out message handling to a static function which can be used
during window creation when QWindowsWindow does not yet exist.
Task-number: QTBUG-36318
Change-Id: I3ce56fd377e3392b0dd22d3d26a7048065380f13
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Only reproduced with Windows font Calibri. This font has both
outline (vector) and bitmap glyphs. QFontEngine_FT has an hack
to get metrics from EBLC table, but this might fail, resulting
in a 0 ascender and descender, meaning QFontMetrics::height()
will be 0, meaning totally broken text.
This patch checks for that failure, and fallbacks to the outline
metrics instead of the bitmap ones.
Task-number: QTBUG-42898
Change-Id: If33fc3404d0c7f84557f8c4a5ae71b30f78d60a7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
The text was very washed out, almost white on small font sizes.
This ifdef was introduced to cater for GDI differences between Vista
and Pre-Vista, it's GDI specific, nothing to do with FreeType.
Text now looks good, and md5sum of the rendering is the same as on Linux.
Task-number: QTBUG-42564
Change-Id: I2e06b83b80df093331454fe1b780d26462db597d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
This reverts commit 2ffa46054d.
It completely broke text selection in text edits on iOS, and wasn't
even tested on that platform before landing. It's also changing
behavior in a patch release for multiple platforms, from being
able to both scroll and select text, to only being able to scroll,
which would be considered a feature-regression and an automatic
-2 on the original patch.
This means QTBUG-40461, a P2 regression from Qt 4 on Windows, will
have to be re-opened, so that we can fix it properly.
Task-number: QTBUG-43101
Change-Id: I26a2bafb4500b1ff4dc3fb942f197d11038b630b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This reverts commit cf0d96f4c8.
It broke text selection on iOS and was never tested on that platform.
Task-number: QTBUG-43101
Change-Id: I9f224a3838a1f741bc9a9c24f16923ef2018ddf3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Don't check for absolute counts of resize events but just check if we
were resized. Also use QTest::qWaitForWindowExposed instead of QTRY_COMPARE
and checking for QEvent::Expose.
Change-Id: Ie383493a8ce6d88cad50bd6375d432ad1578449c
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
When setting a left corner widget on a QMenuBar, the first
action rectangle is offset by its width and thus the width
should not be added to the size hint. Use QSize::expandedTo()
instead.
Task-number: QTBUG-36010
Change-Id: I660e3facbd0aeb5fb84fac8923db3e0c7998309d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
When generating the DBus signature of a registered custom type the
marshaller appends the signatures of the map entries and array items
after the map/array causing an invalid DBus signature to be generated.
This happens because beginArray() and beginMap() output the full
signature of the data.
Fixed by suppressing changes to the signature within
beginArray()/endArray() and beginMap()/endMap() blocks.
Change-Id: Icaf23b2fe58a3e1f575b81e4a100f02684f68452
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This is required before we can add support for those three types in
QVariant.
This commit changes the output format for QChar when it falls outside
the printable ASCII range. In the future, it might be nice to use the
pretty-printing of control characters like QtTest and QJsonDocument.
Change-Id: I4d942da8d11f83de9c1b485ea6ca804fe1622602
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
"no signature" is misleading and even led me to re-check the code to see
if it meant that the reply failed and no signature could be obtained.
Saying that the signature was obtained but is empty is better.
Change-Id: I1381cf53b334798125d36db0934105d15b63b84f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Running 'make distclean' should remove all files generated by qmake,
including .qmake.stash/super. These files are considered owned by
a particular project (and hence a candidate for distclean), if it
lives in the same directory as the output dir of the project.
Task-number: QTBUG-42678
Change-Id: I224e9bac039eeacb6561e18acc7f8e867da5dab8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Change-Id: I91ff06644e8047c2ca483f9768b46c1372eb6171
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
This allows us to avoid the ugly #if for compiler versions. We might
still need for when a warning only occurs in one compiler version, but
otherwise the code will be much cleaner.
Change-Id: Ibc941d898b3dad2e3d87c11378f29139c31f0fff
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
I had already hoisted them a little in the previous commit, so that the
comparisons run without conversion. This now moves the numeric compare()
before the cmp() equality check, so it saves us a few more cycles.
Another benefit is reduced code duplication.
Change-Id: Ia96da94e169fe0b8d4e761177fc2b74e47d4daff
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Previously, QVariant would try to convert one operand to the other's
type, which would produce unexpected results: the results would depend
in the order of the operands and whether there was data loss in the
conversion. In addition, ordering comparisons were only done with signed
values, yielding other unexpected results, like
QVariant(LLONG_MAX / 2) < QVariant(Q_UINT64_C(0)).
Instead, try to obey the C++ standard rules for type promotion in
expressions. Our code is a little simpler than the standard would seem
to require since we know some more details from the ABI.
[ChangeLog][Important Behavior Changes][QVariant] QVariant now obeys the
C++ type promotion rules when comparing numeric types (integrals, float
and double), including the fact that unsigned comparisons are preferred
for types of the same rank (that is, now QVariant(-1) > QVariant(0U)).
Task-number: QTBUG-42722
Change-Id: Ie7b19073dcb45485354710975e561bcdb1a753f1
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Strange API asymmetry that needed to be fixed.
Task-number: QTBUG-8315
[ChangeLog][QtWidgets][QAbstractScrollArea] A getter for the viewport
margins has been added.
Change-Id: Ie1460b572206922031fc4effc2aa8261e25088b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
The App might use response data of Synchronous 401 reply. (example : specific error info of code, string as json)
so, Added a function to read it for Sync.
Async is already OK. Sync path is different from Async path.
Change-Id: I683d4b6b40f600793d2545811dcd6644515de79c
Task-number:QTBUG-43030
Reviewed-by: Jeongmin Kim <jm86.kim@lge.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
This is a cherry-pick of upstream f60fab6d154f4c9bf599e92976cd8cee7f8633e0
(See https://chromium-review.googlesource.com/231612)
Task-number: QTBUG-42882
Change-Id: I7b4bdc4b68a1b93ff514f09ce35dbf4e9360af9b
Reviewed-by: Marko Kangas <marko.kangas@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The sizeHintChanged() signal from the column and row delegates need to be
connected to the doItemsLayout() slot so that the view is updated when the
size hint changes.
Additionally doDelayedItemsLayout() is called to ensure that this is
up-to-date as the size hints may have changed when the new delegate was
set on the row or column.
Change-Id: I458293f05ce9ef40a03bdbcab1a6e7a10f648c89
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
When we overwrite the default palette, we have to make sure
we don't overwrite default values with black for all the
colors that are not retrieved from the json file. We would
for instance get black as both the base color and text
color which would make some components unusable.
Change-Id: I1079a70a0ac7eb379ed5e8d92c6b39c2ea77ba49
Task-number: QTBUG-42812
Task-number: QTBUG-42998
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
An online documentation template that follows the
style of qt.io site.
Update the url variable for Qt modules to point
to doc.qt.io/qt-5/.
Task-number: QTBUG-42086
Change-Id: I5428a02cd503aef2217efd7361f4c8b7b5895a52
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Done automatically with clang-modernize on linux
(But does not add Q_DECL_OVERRIDE to the function that are marked
as inline because it a compilation error with MSVC2010)
Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The only reason for copying QSslEllipticCurves into a temporary array
would be to be extra-pedantic about type safety, but in the end,
we can simply force a cast and remove the copy.
Change-Id: Ice8a036fe4b79ba438ce83b5eacf6158eb3f0ce7
Reviewed-by: Richard J. Moore <rich@kde.org>
A typical ring buffer usage is a sequence of reserve()->chop()->read()
cycles. Usually, between these cycles, the buffer doesn't contain data and
all blocks are released. To reduce reallocations, keep the most recently
used block while the buffer is empty.
Change-Id: I8128f1f04649ae005fd0a480f17f95de01a9a135
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Must have been a copy paste mistake, the check is used in other places
to make sure we don't unlockFace() without a lockFace(), but here
we're certain lockFace() was called first.
Makes Coverity happy.
Change-Id: I679129727b29a40d780f4fa903f44f7cbc9ec8cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Remove duplication of the set of flags.
Remove "text" column which had a constant value.
Change-Id: I39dd541a545664fb3f992b32b8c64e4dd263a9c7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Adds an option to request the RTLD_DEEPBIND flag to dlopen. On Linux
this can be used to force a library to resolve global symbols locally
instead of using the similarly named symbols already loaded.
This makes it possible to load and use plugins linked against Qt 4
without crashing.
[ChangeLog][QtCore][QLibrary] Added DeepBindHint which maps to RTLD_DEEPBIND
on Linux making it possible to load libraries with external symbols that
clash with already loaded ones, such as plugins linked to Qt4.
Change-Id: I4edb4af68e4a47e932a87d108360dba8d91dc34a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When we met at least one checked child
and at least one unchecked child
return immediately PartiallyChecked state
(no need to check other children state).
Change-Id: I17ec07a925667231a1d809695f347a0f3cfffa0e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
We don't need to modify ResourceOutputFileName. The default is fine,
and $(InputName) evaluates to nothing in VS >= 2010.
Change-Id: Ib203d36261e1b5449c5a139b1950bd0d66197297
Task-number: QTBUG-43026
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
The compile.test script expects -I... parameters. Passing just the
include path is therefore wrong. Pass cflags instead.
Change-Id: I0f9b155d1e710fe7d77c64a867a89290d4f31db3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
There is no need to call bringToFront() when the item was just made to
be the last child in the two previous lines. (Child views are ordered
in stacking/paint order)
Change-Id: Ie9fbe5de6dce2bbc96cd44a8a6a779504cd0becd
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
The old code would stack the new surface just below the topmost surface.
It also did not consider if the m_editText was added to the layout or
not (thus, m_layout.getChildCount() - m_nativeViews.size() - 1) was only
correct if the editText was added.
Spotted by plain code reading while investigating some accessiblity
issues.
Change-Id: I12c9f373a471c0a7ee624a47232e8952d69c9067
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>