Also, remove the -angle-d3d11 configure option, as it no longer is
necessary to select the renderer at build time.
The D3D11 renderer is the default renderer in upstream ANGLE, and has
been shown to be a more reliable solution for developers running over
remote desktop and inside virtual machines. It also provides more features
to the OpenGL ES implementation.
This configuration switch does not disable the D3D9 render; if the GPU
does not support D3D11, D3D9 is used instead.
[ChangeLog][QtGui][Windows] The ANGLE D3D11 renderer was enabled by
default. Systems which cannot use the new renderer will automatically fall
back to the D3D9 renderer at runtime.
Task-number: QTBUG-41031
Change-Id: If894309c07d9309c236b63c36f37679f74375133
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
The code says
bool QRect::isValid() const { return x1 <= x2 && y1 <= y2; }
so the documentation should say <= as well, rather than <.
Change-Id: If52005879d2a758b5d1d64b552e6cd96341fae76
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Widgets and layouts added or inserted to a layout are checked for:
- Not being NULL
- Not being the parent widget of a layout or the layout itself,
respectively
Without this commit, adding a widget to its own layout would result in a
CPU-hogging infinite loop. Now, a warning is written to stderr and the
add or insert function call is ignored.
The checks are implemented as public functions of QLayoutPrivate and
thus accessible in QLayout's descendants to be used in various
"addWidget", "insertWidget", etc functions.
Unlike 'classical' layouts like QGridLayout, QFormLayout does indeed
accept widgets that are NULL. To not break this behavior, any call for
the check functions first tests if the widget or layout, respectively,
to test is NULL or not and calls the check only in the latter case.
Automated tests for QBoxLayout, QGridLayout, and QFormLayout were added.
For an unpatched Qt 5.3, each of those automated tests will freeze as
explained in QTBUG-40609. For a fixed version, warning messages about
invalid parameters to addWidget/addLayout/... calls will be read by
QTest::ignoreMessage, resulting in a passed test.
Change-Id: I1522d5727e643da3f7c025755975aca9f482676d
Task-number: QTBUG-40609
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.
This one is a bit more complicated, as the QPolygon was returned
from a helper function, so I wrapped the array in a minimal
std::array-like StaticPolygonF.
Together, these four QPolygon -> QPoint[] changes result in
ca. 4.5K text size reduction for libQtWidgets.
Change-Id: I082f199d5edb7a7782173fe3748220f373edac8a
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.
Change-Id: Ie1eecd376a52b73572998ba253a032deaa0daaf9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.
Change-Id: Ifdf8224ddffe06ef7848562023e372e2c32b9ad6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
No need to allocate dynamic memory for a fixed-size point array
when QPainter has a (QPoint*,int) overload.
Change-Id: I50c69103bba47e9f6de4f5616e8f40fee522ddc2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
ATSFontNotify() allocates over 30MB for no apparent reason for
applications that don't register fonts.
Change-Id: I7bbc97f53b76be1e638de8ca0d1be3a08586cf00
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Both Q_LITTLE_ENDIAN and Q_BIG_ENDIAN macros are always defined
on all architectures. So, byte order detection results in
"little_endian" value for big endian systems. Test the system
endianness in a right way, according to Q_BYTE_ORDER macro
documentation.
Change-Id: I5523f90567e78d679a3ff2902a8f5377ed39ceb1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
For iOS8 and up [UIScreen bounds] changes based on the interface orientation,
so we need to use [UIScreen nativeBounds] instead.
Change-Id: I3fc12cfa417df26ca94c803e970bc2dc18a94378
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This reverts commit f6c36917f1.
Depends on 203ce7c5ce
which can't go into 5.3 because it introduces new enum values.
Change-Id: I13040a7268fae4baeace244a3e75dc982d3a50b8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Provide workarounds for things GCC doesn't like, and define a number
of macros not found in the MinGW headers.
Change-Id: I254c208209c0071fae5efb6727f2b3cfd5542da6
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
When we strip the & we should also report the hotkey.
In addition only strip labels when they are buddys and try not to remove
ampersands from all kinds of random text.
This fixes https://bugs.kde.org/show_bug.cgi?id=338282
Change-Id: I401281cd9ff43b23a3923ad9909ca9c469b59506
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
These functions are supposed to make it easy for third parties (and
QLineEdit) to implement the textAt/Before/AfterOffset functions.
Before the functions were ignoring newlines completely and thus only somewhat
useful.
Change-Id: I7136b9502a7fa6f8ad9ad7236761a34c1a7fd4da
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Read and store softInputMode set at AndroidManifest.xml on QtActivityDelegate.
When showSoftwareKeyboard is requested setSoftInputMode for main window if
softInputMode is not defined fall back to old behavior.
Change-Id: I71cb27d4bdb4ae4e3c2a0706560173703a2f5a50
Task-number: QTBUG-34401
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
QMdiSubWindow::eventFilter() is supposed to close the sub window on a
double click on the menu icon. However, it did not receive the double
click event since it removed itself when the menu was hidden, which
happened before the double click was delivered.
Task-number: QTBUG-25179
Change-Id: I5e7fb02dda26ceab12e8b7554fc604066a0a3136
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This switches the font rendering to use gray scale antialiasing when in
translucent rendering mode. It does so by adding a flags argument to the
paint engine, allowing for future expansion in communicating render hints
from the device to the engine.
Task-number: QTBUG-41002
Change-Id: I0265154716a12060e851b603a109e9c693f5e843
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This adds support for reading and writing ASN.1 boolean
values. It also adds an operator to test two ASN.1 elements
for equality.
Change-Id: I4a22cbf9808533d593fc59d27b63caaf650b1f57
Reviewed-by: Richard J. Moore <rich@kde.org>
This environment variable will paint an overlay on each paint command
that is using the accelerated blitter path for DirectFB. This is useful
when you want to assure that you are taking advantage of the DirectFB
blitter.
Change-Id: I6e374754825794daf9c1bf40bee2b963e752a8e9
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
When using a linear index, all items in a scene are stored in a QList.
While adding new items is a constant operation, removal requires a
traversal through the entire list. This is especially problematic
when the scene contains millions of items and many of them are removed,
which requires a linear search for each item, resulting in a very slow
operation. Moreover, this behavior is actually inconsistent with the
current documentation which states for the linear index:
"Adding, moving and removing items, however, is done in constant time."
With this change, the list is sorted once an item needs to be removed.
The item to be removed is then found using binary search. To reduce
the overhead of sorting the list is not sorted from scratch. First the
newly inserted items are sorted and then the two parts of the list
are merged.
[ChangeLog][QtWidgets][QGraphicsScene] Speed up the removal of items
when using the linear index.
Change-Id: I28708622605d7fb0fac656df1f9b2f2fa3136759
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
During the introduction of context adoption support the config choosing got
broken for context creation, at least for hooks that return a customized
format in surfaceFormatFor(). The returned format is the one that needs
to be passed to chooseConfig(), not the original.
Change-Id: Iae203cbbf7b39c462386611dd3744f048116df13
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This reverts commit bf2ec0183c.
That patch changed the way the linear index works in QGraphicsScene
in order to speed up item removal. That patch occasionally rebuilt
the index by recursively exploring all items in the scene, starting
with the top level. Further testing revealved that in some
circumstances, rebuilding the index in this way can be slow, thereby
significantly slowing down the index compared to the unpatched
version.
The original patch only exists in the qt 5.4 branch and has not been
released.
Change-Id: I081dbcdcc86196ef382466c3e800a33eab9a5b79
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Get rid of the rendezvous at shutdown: the android thread does not
need to wait for the GUI thread. Since the GUI thread frequently does
blocking calls to the android thread, this fixes several known and
potential deadlocks.
Task-number: QTBUG-41072
Change-Id: Ia6fa8da026b1727e7352b22f4df4d72b63b8c847
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
There are valid uses cases how to use Qt without installing
any fonts (e.g. by using an application font), so let's
make the warning non fatal.
Task-number: QTBUG-29192
Change-Id: I5684331b687bef4b8a54be1f68303c80aa8d4372
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Assignment of a value was two times successively for same variable while
the variable itself is not used between these assignments.
Change-Id: I3c457e3af0505d32a64f6c8576b458cd15a951e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The practical uses of a POD QElapsedTimer are not really that clear, and the
number of misuses of this API are quite high. Default the state to invalid to
prevent against mistakes.
[ChangeLog][QtCore][QElapsedTimer] Is no longer a POD.
Change-Id: I267292acf2bfca7404e3e449dd04410441d7ce26
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
udpSocket() can only be called after the socket descriptor is set.
Change-Id: If651ff58507cd66c98de4b699a80149913d9ffcf
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Maintaining a black list of devices can't be reasonably done.
The workaround is now enabled by default. It can be disabled with the
QT_ANDROID_DISABLE_GLYPH_CACHE_WORKAROUND environment variable, in
which case the current list of blacklisted drivers will still be taken
into account.
Task-number: QTBUG-40483
Change-Id: I9b90ab45e86569e8e4679333ddb9b835189892c7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This adds the infrastructure for reading and writing encrypted private keys
when using non-OpenSSL backends. Each platform must provide its cryptographic
encrypt / decrypt functions.
As WinRT already uses the common parser, this commit includes an
implementation for that platform.
Done-with: Andrew Knight <andrew.knight@digia.com>
Task-number: QTBUG-40688
Change-Id: I0d153425ce63601ff03b784a111e13962061025f
Reviewed-by: Richard J. Moore <rich@kde.org>
Do not try to resize or destroy invalid surfaces.
This caused update problems with all GL apps after suspend,
since we would forget the dummy view that we always keep
around so we get proper transitions on shutdown.
Also make sure that we don't mess this up even if we try to destroy a
non-existing surface. This would have fixed the bug by itself, but
then we would still be stuck with the annoying warning message.
Task-number: QTBUG-41093
Change-Id: I83299e93eb9ac5357b98ca47014789b56c91b35a
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
The default behavior of ANGLE is to use D3D11 before falling back to D3D9.
This change improves flexibility the platform plugin to explicitly create
a D3D11, D3D9, or D3D11 software (WARP) context by setting the
QT_ANGLE_PLATFORM to "d3d11", "d3d9", or "warp", respectively.
Task-number: QTBUG-41031
Change-Id: Ie1d399c1cb0e360e5b3a6d9f2a4b28745d86cc71
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The color table is passed by value (good for C++11), so when
the argument is assigned to the member variable, that's a good
spot for a move assignment.
However, the argument is also declared const.
The standard says that top-level const is ignored, but some
compilers (I know about SunCC) think differently, so we cannot
remove it.
Instead, we do a const_cast. It is well-defined: Even though
apparently the argument was declared as const, the standard
says the const is not there, and no sane compiler would put
the argument copy into read-only memory.
Add a reminder to remove the top-level const from the
signature come Qt 6.
Change-Id: Iac18846ba669de0a30da620685ad1438c267e193
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The code doesn't touch any member variables, so it doesn't need mutex
protection. Reducing the time spent under the mutex allows a higher
speedup (Amdahl's Law), so do it.
Also made the mutex locker const to indicate it is never unlock()ed
again.
Change-Id: Ic50b827c0e34d39cbddc7ec83675b568a9c33f6d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
We pull out the magic UIViewAnimationCurve of the keyboard animation
when the keyboard is about to show, but we need to defer the shifting
of the value 16 bits, as that turns it into a UIViewAnimationOptions,
which we can't store in a UIViewAnimationCurve member.
Change-Id: Id35dae1ec487951df749dfffb6118b572c28b103
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
When 'cursorPos' is out of bounds ([0, lineEnd]), this method crashed.
Change-Id: Ia0540ab3afbffb5c598f7b8515263cce3b3928e4
Task-number: QTBUG-40753
Reviewed-by: Dominik Haumann <dhaumann@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
A blocking isSoftwareKeyboardVisible() is a deadlock
waiting to happen: when the android input method performs
blocking metacalls from the android thread to the GUI
thread all the time, we cannot block the GUI thread
waiting for the android thread.
Task-number: QTBUG-40750
Change-Id: I2490897b0f65e0d92214907e239b10b372d949dd
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
For iOS8 and up [UIScreen bounds] changes based on the interface orientation,
so we need to use [UIScreen nativeBounds] instead.
Change-Id: I3fc12cfa417df26ca94c803e970bc2dc18a94378
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Extract a struct containing the function pointers and derive
QWindowsXPStylePrivate from it, so that both styles can use them.
Remove duplicated variables.
Task-number: QTBUG-38858
Change-Id: I7c2c665b5930c56ffdf33c5185720f71517d146c
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
This change adds the ability to decode ASN.1 INTEGER fields,
provided they represent a positive number of less than 64-bit.
This is needed for PKCS#12 decoding.
Change-Id: Iafb76f22383278d6773b9e879a8f3ef43c8d2c8f
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Otherwise bad things happen if the application leaves a buffer bound.
[ChangeLog] The eglfs mouse cursor properly resets the array buffer
to prevent rendering issues. This, just like with vertex attributes and
textures, requires applications to be aware of such state changes in
swapBuffers().
Change-Id: I8b383cc867d8d0d0572773eacfa650e7b33b9680
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
It's easy to do the work on the side and then commit. This is strongly
exception safe, but in Qt, we don't care. But transactional code, when
this easy to achieve, is also clearer.
Change-Id: I30f1badec7745d62a09af4eede234cb312b373aa
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
As usual, HITheme is not helping, and renders inactive controls
as disabled. Also, given the design changes in Yosemite, we can't
just desaturate the active pixmap and render it. In this case, we
render the inactive control and enhance it, making very close to
the expected result. The pixel-exact version would be to render
a plain push button, and then add the combo box arrows. However,
these arrows would need to be created (and updated) since there
seems to be no more API to render them.
Task-number: QTBUG-40833
Change-Id: If1bc366c0bc83123972fabebbc8beeb9f071e7a1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
When using WA_TranslucentBackground/FramelessWindowHint, the backing
store must paint to an offscreen texture instead of the swap chain in
order to achieve the desired results. This texture is then presented to
the screen using UpdateLayeredWindowIndirect().
As the swap chain is not needed in this mode, its construction is skipped
if indirect rendering is active.
Furthermore, the layering options were updated to fix an issue with
transparent layers overpainting the background. The layer options were
switched to D2D1_LAYER_OPTIONS1_NONE, which appears to work for both
translucent and non-translucent rendering modes.
Task-number: QTBUG-40601
Change-Id: I656f7cdfb424d1eda6f82c2c69500e78d8c1726a
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The scale factor was only being applied to touch coordinates.
Change-Id: I7fc2793b1514c73986a574a95478306c1eb54c5e
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Allow the D3D11 renderer to build with the June 2010 DirectX SDK.
Change-Id: I2343acedab16845d6a0d4a53cf3145f583efc4a7
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
These libraries are dynamically loaded on desktop Windows.
Change-Id: I3a0d17a48a3bd4930690d20d387df0d92906662d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Platform plugins have a tendency to make the newly created native
context current with a temporary surface. This is usually needed to
query some information related to the new context. Afterwards most of
them just reset to having nothing current.
This has two issues:
It unexpectedly changes the current context/surface. A call into
QOpenGLContext::create() does not imply that the current context will
get changed. This is the minor issue and we could probably live with
it (at least if it had been documented).
However, the real issue is that QOpenGLContext::currentContext() will
become inconsistent: it will still report whatever was current before
the create() even though on the EGL/WGL/GLX level that's not the case
anymore.
To prevent all this confusion the platform plugins can easily be
changed to restore whatever context/surface was current before they
altered it.
Change-Id: I6a5b4597c86571327524ddb13e0d02538593cc7b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Some applications may use native file dialogs and some may use the
widget implementation, but QFileDialog always saves all settings to
the same place each time it destroyed. So it is important to remember
all settings read in restoreState and put them back in saveState.
This bug was introduced by 37ca2224ec
Task-number: QTBUG-36888
Change-Id: Ied1db83817480312e963a042784d7bdd16f0a2b1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Some fonts appear to include zero-width space in the CMAP table, but
not include an actual definitions of the glyph they point to. The
missing glyph causes a warning, but isn't handled making the character
end up being giving the same metrics as whatever character it came after.
This patch adds explicit handling of missing glyphs, and also caches
their missing state when caching is enabled.
Task-number: QTBUG-40912
Change-Id: I06fba9c01df59548e750e36babfdd5a6bafd6bd0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
That commit exposed part of qfunctions_winrt.h for non-WinRT use
(Windows 8) without wrapping with Q_OS_WIN. That meant the headercheck
pass failed to compile when outside of Windows.
Change-Id: Ie731cce21e5102f5e5879b147b7738a7d0a91ecd
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
QSslKey currently has methods which supposedly allow decoding and
encoding private keys as DER protected by a passphrase. This is
broken by design as explained in QTBUG-41038, as storing the encrypted
DER data alone makes no sense: such a file lacks the necessary
information about the encryption algorithm and initialization vector.
This change:
- explicitly stops using the passphrase when decoding DER in the
constructor. The behavior is unchanged, it is not possible to
read the encrypted DER alone.
- refuses to honor the passphrase to DER encode a private key. The toDer
method now outputs an empty QByteArray instead of garbage.
Task-number: QTBUG-41038
Change-Id: I4281050cf1104f12d154db201a173633bfe22bd9
Reviewed-by: Richard J. Moore <rich@kde.org>
Move from a stub to a functional SSL socket implementation.
This implementation has some limitations. Due to the way the native
SSL upgrade works, it is not possible to ignore SSL errors after the
handshake has begun. The user must set the ignore flags before
connecting to the host.
Due to missing implementation in the underlying native socket, the
synchronous methods (waitForConnected(), waitForDisconnected()) are not
functional either. Users must rely on the asynchronous methods instead.
This is not a problem in the general case, as HTTP(S) is not affected.
SSL server sockets are not supported by the native API, so it is not
possible to bind an SSL server socket.
Change-Id: Id0b323f273892580b294aa5a6ff601a8241470df
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
The native handle and import functions are now available for use in other
parts of the winrt backend.
Change-Id: I07e6f95b3411c3dc7c1a7a164544b18e5e435d01
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
This internal implementation of QSslKey can be used when OpenSSL is not
available. Encrypted keys are not supported, as the cryptography must
be supplied by a separate library.
With this commit, WinRT is migrated to the new implementation,
but qsslkey_winrt.cpp is left in place so that the missing crypto
implementation can be added later. This also means most of the expected
failures for that platform can be removed from the autotest.
Change-Id: I24a3ad1053bb72311613b28b3ae845aa1645a321
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
This makes it significantly easier to obtain debug output
for style functionality.
Task-number: QTBUG-38858
Change-Id: I19edc834a55fa369b6830abeb4697ae5e5ded995
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Qt expects scroll operations to be executed immediately. They cannot be
postponed since Qt may paint on the scrolled area afterwards.
The new code will only use an accelerated scroll operation (screen_blit)
once before the window is posted, because the blit is from the previous
buffer to the current one. Hence an additional scroll operation could
copy outdated pixel data. Additional scroll operations will be handled
by Qt. Performance issues were not perceived with this approach so far.
Task-number: QTBUG-39958
Change-Id: I6d7c3274c5db6a831a169615518fcdb4d926db70
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Don't truncate the maxlen to a DWORD. Instead read all
data incrementally up t maxlen.
Task-number: QTBUG-27796
Change-Id: I21c34d11046f1106244dcd77420cc472e7240e68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make the warnings that are displayed during the reading of index
files and dependencies more consistent by using QDoc's error
logging functions.
This means that warnings are not generated in prepare phase,
but they are generated for projects that call qdoc directly,
running prepare and generate phases in one go.
Change-Id: I645c3feb1cbf471fd3ca6034f94e7dc1ea35b875
Reviewed-by: Martin Smith <martin.smith@digia.com>
When setting a new screen, the code calls QWindow::destroy(), which
recursively destroys all child windows. It then calls create() on the
top-level window, leaving child windows destroyed. This causes crashes
if you have embedded native widgets.
Task-number: QTBUG-40817
Change-Id: Iaace2589f48bbfd5faaf5ff95357ff43b310504a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
On iOS 8, the value 0 is returned as a kCFNumberIntType.
The code still works - CFNumberGetValue converts it
to a 0.0 double.
Change-Id: Ic50900b22e4fa19ad1481e8e0e293559bbfd8cd2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This is a follow-up to 4c6ebe5f9e.
Crash was still 100% reproducible for me with the previous fix.
Task-number: QTBUG-40957
Change-Id: Ie59cfe4f1fc746251fe06ba96369738098b2a35f
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
The screen pointer is usually only used to get the Display, which normally
doesn't change anyway.
Task-number: QTBUG-39996
Change-Id: Ie35f02fc9330647897a9f081afb8c9ce550eed2a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This reverts commit 3a84d92f57
because it caused a regression with certain fonts on Windows that
have divided information about writing system support in unicode
ranges and codepage ranges.
The original commit fixed a problem on Android where one
of the fonts had an entry for Arabic in its codepage range but
no glyphs for this script. This issue has been fixed in a different
way now, by 0b87f4f6c9 which makes
fallback fonts work properly, so the commit is no longer needed
to fix said bug.
[ChangeLog][Fonts] Fixed regression in font families returned by
QFontDatabase::families() for certain writing systems.
Task-number: QTBUG-39846
Change-Id: I3077b1e618b21680549abc1734cb6df6e264387e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Bump minor version of the saved geometry and append
the screen width in version 1.1. Use that to check and bail out should
large differences occur due to scaling or different levels of DPI
awareness.
Task-number: QTBUG-38858
Change-Id: Iad8ae0705297118b4237c9a41469cb97d7eab549
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Moves feature checks so OpenGL vs OpenGLES is only tested one way
and extensions so they are not tested if already required by their
version.
Change-Id: Ia77f6ea924559fa7a428beb6316ae392063dfc4f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This is needed to prevent lock-ups in application that use ANGLE from
multiple threads, as e.g. QtWebEngine based applications do.
The environment variable QT_D3DCREATE_MULTITHREADED is used to
communicate this from the QtWebEngine module.
Change-Id: Ibd5a5c75eb68af567d420d9a35efb3490c93b27c
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
As a side effects it also adds core templates types to the tests
Change-Id: I0e3338e0bffdf21982aa83d404c83288e54411f4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
...by instantiating std::count() not with QVector::const_iterator, which is a
class, but with const T*, thus increasing the chance that the instantiation
can be shared with other instantiations in the executable. It might also enable
STL implementations to choose a hand-optimized version of the algorithm for C++
builtin types.
Change-Id: I93df4e58f76838d98b565f229c19e317774b7b4c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Same change as was already applied to QVector::operator==().
Change-Id: Ic2e140a52ee95f2e215668077951de0b4450d194
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Assuming the CPU has already loaded 'this', the value of 'd' is just
an indirect load away. The value of d->size, however, is two indirect
loads away, one of which is the load of 'd'.
So it makes more sense to check for d-pointer equality first, as that
can proceed in parallel with the fetch for d->size, which the CPU
may speculatively trigger.
In addition, at least GCC in release mode after this change doesn't
set up the stack frame if the d-pointer check succeeds.
Change-Id: I61f9b245070dd1742fca6ccb8d4936a0b1aa7c07
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Simplify the temporary buffer usage by using the built-in WinRT Buffer
class. This also allows one use of the local event loop to be removed.
Change-Id: Ice552910227ffbe31c6e8716ff7896af7c4532ef
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
This stores the socket pointer in the descriptor, rather than an
abitrary handle, so that it is easier to access from e.g. SSL socket.
To further support SSL sockets, a special case for SSL sockets is
made so that the the socket reader installation can be delayed until
after the socket is encrypted (as this is the only supported mode of
operation with StreamSocket).
Change-Id: I693229189722dc43b221b167e8256f5497a50346
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Similarly to 1b19f660 (which added socket flushing before close), the
socket should have a chance to disconnect if the write buffer is not
empty. Instead of flushing, the pendingClose is added so that the
backend may disconnect the socket once these bytes have been written.
Change-Id: I2d85b6356c3e158bade3d5d86161d3e33649cad6
Reviewed-by: Richard J. Moore <rich@kde.org>
The scan thread can take an indeterminate amount of time, often longer
than the 5 seconds we had previously waited. Since this destructor is
only called when the application quits, it's ok that some resources may
be lost.
Task-number: QTBUG-36000
Change-Id: Ib184156b5a23c39ea4f7937a26ecb099554bd4de
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
This moves the socket backend's host name matching functions up to
QSslSocketPrivate so that they can be shared between backends. This
works, as there is no OpenSSL-specific code here.
Change-Id: I73c2081fdc2e60a44c90e90800d1e1877391a626
Reviewed-by: Richard J. Moore <rich@kde.org>
Qt Quick does a processEvents() at shutdown. On some versions of
Android, this can trigger a getTextAfterCursor() after
QGuiApplication shutdown. This patch still has a theoretical
race condition, but should reduce the crash probablity to
practically zero.
[ChangeLog][Android] Fixed bug on some devices where the application
would crash at shutdown if the virtual keyboard was open.
Task-number: QTBUG-40957
Change-Id: Iefcc10a77e3d506c32ea151c27a3e87a7be40e68
Reviewed-by: BogDan Vatra <bogdan@kde.org>
When no objectName is set, this will give at least some information,
other than the memory address of the current instance.
Change-Id: Iae452c0e9fe38f0aab35094ddf0edc0fd6b28c20
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
HITheme renders the focus ring in a way that diminishes contrast
on the focused button edges. The same issue seems to affect
combo boxes, check boxes, and radio buttons.
We refactor the code that was used to draw CE_FocusFrame into
qt_drawFocusRingOnPath(). We use it to render our own path for
the push button contour. This should also allow us to implement
the focus ring animation in the future.
As a side note, notice how the square button part (kThemeBevelButton)
is a complete joke. Not only we impose the wrong button kind and
let HITheme do what it can with it, but we also prevent ourselves
from using it by never adding padding for the focus ring.
Hopefully, we can fix this whole button sizing and padding mess
in 5.5 or 6.0, whatever breaks less apps around.
Task-number: QTBUG-40833
Change-Id: Ib9e7829d99b38dc926c55b31c3d6d5d32b691867
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Setting it initially to 0 is very important, otherwise we will
do a glDeleteTextures with the undefined value.
The result sometimes goes unnoticed and sometimes causes bizarre
issues: For example in the 'textures' example one face of one cube
out of the six did go blank from time to time since the corresponding
texture was deleted by the backingstore.
Change-Id: Iebf68e20b2af426c979980d8bc4449db2b98f2f0
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
They're identical to the compiler-generated ones, and probably inhibit
move operators here and there.
Change-Id: I918f2946f6b6aa49aa883420dc87df44013938a5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
If a (non-external) link string ends in '.html', qdoc assumed it is
a direct link to a generated html page. However, it could also refer
to an example file with .html extension.
This commit fixes a corner case where links to an example file page
were broken for such files.
Task-number: QTBUG-40831
Change-Id: I31acc141970b6768f0a93964723be82611d37a3d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Adapt the code that generates the navigation bar to the recent
changes in node hierarchy - Module pages, QML module pages and
groups are no longer DocNodes.
This change will ensure that if a page has a title, it will be
visible in the navigation bar regardless of the the page (node)
type.
Change-Id: I697a12d5904d88f91771764ab7ed607b79e4eab1
Reviewed-by: Martin Smith <martin.smith@digia.com>
When writing the Qt Help Project XML file, QDoc traverses the
documentation nodes recursively, adding html filenames for each node
to the XML.
The logic that QDoc uses for this process is not perfect, and needs
to be kept up to date whenever the internal structure of the node
tree changes. This often leads to problems where some pages are
generated but not added to the .qhp, resulting in missing pages in
the offline documentation.
This change fixes this problem by having the generator keep track
of the created filenames, and passing that to the help project
writer.
Task-number: QTBUG-40572
Change-Id: Ife60a30724183a2b6dcd2397ea79bfbdc2addd04
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Since the \br was promoted from a macro to a QDoc command, its output
has been enclosed in extra paragraph end/start tags, adding to the
visible vertical space.
This change fixes the issue by not closing the paragraph when QDoc
encounters a \br command.
Also removes the now-obsolete \br and \hr macros, as they are both
proper commands. \BR and \HR substitute macros are kept.
Task-number: QTBUG-37361
Change-Id: Iabbefb6e79268419792ccba42386f6342ccd175d
Reviewed-by: Martin Smith <martin.smith@digia.com>
Having QAsn1Element in place, we can have a common foundation
for the ssl certificate class for upcoming ports like WinRT
and SecureTransport. The only thing that has to be added to
the existing class is the handle() functionality.
Change-Id: I560a8e412b26f350855c7bc456fcdb8e9b750939
Reviewed-by: Richard J. Moore <rich@kde.org>
Gets rid of awkward wrapping of Qt::InputMethodQueries as integer in a
NSObject.
Change-Id: Ia7e368fc12ec7957ca8ab602d8cec1e0a071af1d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
On iOS 8, the value 0 is returned as a kCFNumberIntType.
The code still works - CFNumberGetValue converts it
to a 0.0 double.
Change-Id: Ic50900b22e4fa19ad1481e8e0e293559bbfd8cd2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
We do this for QWidget::setFocus(), but were missing a call on clearing
the focus widget. Since QWidgetWindow::focusObject() will fall back to
returning itself if there is no focus widget, we need to pass the
result of window->focusObject() to the change signal instead of 0.
Change-Id: I52a5519a19bb20e74b4a7c2a1abc9d47e2ea1315
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
A device removed very fast after being inserted might disappear while
we are still seting it up. We must therefore check if we indeed still
get a matching device
Task-number: QTBUG-40820
Change-Id: I4372fb1932264e5799f37cea0d016795e28ebed6
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This function actually is worse than just calling
QAccessibleButton::text which it already does. It would mess up the
shortcut handling in addition to that.
Change-Id: I56cb95a44624da4c5fccb43e6835f6012a083337
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
The selected tab text color should be white except when the
window is not active. Also, no text shadow should be rendered
in any case. Finally, there's no need to move the tab shape up
anymore.
Task-number: QTBUG-40833
Change-Id: Ibb35f0bb7a12fb005202fd8c082eb9bb19645b2b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
The default button has different text color on OS X 10.10, and
doesn't pulsate anymore.
We first make sure we don't start any animation for default buttons.
Then, we set the right text color in the attached palette, which
implies making a copy of the style option object. This increases the
size of this patch but keeps things sane. (It's also more concise than
the QGtkStyle approach that consists on duplicating QCommonstyle's
code for rendering CE_PushButtonLabel).
Task-number: QTBUG-40833
Change-Id: Ifac118bb607eec17400c6ae42342a223a40843b4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
The class name scheme can be separated by '/' or '.', if both formats
where used we would end-up caching those classes twice.
Change-Id: I3ae69694d6a8616bbaadfb3c2d0717fbf9ccb9fc
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
QList<WidgetMapper>::takeLast() is a needlessly expensive operation
(involves copying a QPersistentModelIndex and a QPointer).
Instead of looping over takeLast() until empty, reverse-iterate
over the list and call removeEventFilter(), then clear the whole
list.
We reverse-iterate to preserve existing behavior. Also, since the
original code popped the WidgetMapper instance before calling
removeEventFilter(), we move the whole list into a local copy
before iterating. There's little chance that a removeEventFilter()
call will cause reentrancy into QDataWidgetMapper, but better safe
than sorry.
This and the previous change together save 448 bytes of text size in
libQt5Widgets.
Change-Id: I1bfe907751659f31e618aa05bbb7b840f0aa61f4
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Don't use index-based iteration, but use iterators.
Change-Id: I57c9582aed644fc58ced1a1af940dcd20d11d970
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This adds support for the environment variable
QT_DEVICE_PIXEL_RATIO for the Windows platform plugin.
Task-number: QTBUG-38993
Task-number: QTBUG-38858
Change-Id: I6831eb6d3a09a80be7bbef46395e91531b61cc50
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
A device removed very fast after being inserted might disappear while
we are still seting it up. We must therefore check if we indeed still
get a matching device
Task-number: QTBUG-40820
Change-Id: I4372fb1932264e5799f37cea0d016795e28ebed6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Follow the good practice of checking for isCreated() before calling
VAO functions like bind(). Use also the vao binder where applicable.
Change-Id: Ib827f3bce838396bf2e08f9480fa63801d4d3a50
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
It gets somewhat complicated due to the fact that a RasterGLSurface window
(i.e. any widget window since 5.3) may behave either like an OpenGLSurface
or a RasterSurface, and the expected behavior may change on each backingstore
sync.
This does not fit designs where the platform window implementation is separated
and there is different behavior for raster and GL windows.
Therefore QAndroidPlatformOpenGLWindow is now made capable of behaving like the
raster one, based on a flag communicated from the widget stack via QWindowPrivate
(since the plugin knows nothing about widgets).
This means that widget windows that do not have renderToTexture children (QOpenGLWidget,
QQuickWidget) will go through the raster path, while the ones that have will behave
like an OpenGL window with the actual rendering happening in
QPlatformBackingStore::composeAndFlush().
The surface type is RasterGLSurface in both cases nonetheless.
Task-number: QTBUG-37907
Change-Id: I6f9261fc0fd993afcda7f30d379c5410069033d3
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
but only if there is a Cancel button. A color dialog without a cancel
button might be kept open and apply to various selections, so it
doesn't make sense to reject such a dialog, only to close it.
Task-number: QTBUG-40855
Change-Id: Ifffb4ae81307c72259ed388a4776ba09543603e7
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Setting it initially to 0 is very important, otherwise we will
do a glDeleteTextures with the undefined value.
The result sometimes goes unnoticed and sometimes causes bizarre
issues: For example in the 'textures' example one face of one cube
out of the six did go blank from time to time since the corresponding
texture was deleted by the backingstore.
Change-Id: Id19eb2164471b542b08a277a65edfcb5d0f8248d
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
If the window was not visible when the geometry was set, then the
DirectFB window would not be resized.
Change-Id: I7790c90ed0fb755aebee0e32c877ebd9e48417cd
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
The local and global coordinates for mouse events were being translated
incorrectly from the native DirectFB events.
Change-Id: Id904a4335459b87c92f4b8b46d535c78fb7dad8c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Previously when we created any QWidget based application a
QDesktopWidget would be created as a physical window like any other, but
this window would steal input from the application. We now create a
DirectFB window for the Qt::Desktop type of widget now, but it does not
receive input events and can not be painted to or displayed.
Change-Id: I6a090c5384b1f83383e40680dbede5d0edc41983
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Using the same multiple inheiritance that is used in the EGLFS platform
plugin.
Change-Id: I016f904bfc365bec6266c3f5d638ab15ecefe63b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The DirectFB platform plugin was missing support for services and
inputContext.
Change-Id: I010fdcbed5e172b019b4dce79f3beea0f9c5025d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The QPanGesture recognizer requires single-point touch events. The touch
implementation in Qt 4 would test Qt::WA_TouchPadAcceptSingleTouchEvents
and forward single touch events if set.
Making this work in Qt 5 is a little bit more involved since the platform
plugins don't know about widgets.
Change the Cocoa touch implementation to send single-point touch events
to QWidgetWindow windows only. Make QApplication forward single-point
touch events only if the target widget has the
Qt::WA_TouchPadAcceptSingleTouchEvents attribute set.
Task-number: QTBUG-35893
Change-Id: I68712a5e3efb4ece7a81ca42f49c412e525eeb3a
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
The iterators for QJsonArray and QJsonObject are currently lacking an
operator-> definition. Unfortunately it is not possible to do in clean
way without redefining either the iterators or QJsonValueRef class.
This patch instead adds two fake pointer classes that are only used
to handle the operator-> return value.
Task-number: QTBUG-29573
Change-Id: Ief785a6afbbedc9e89cf3b6f3958c2c755997a66
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Writing out the alpha is re-enabled too early. When blitting the
AlwaysStackOnTop widgets as the last step of the composition, they
need the exact same settings as the backingstore content, meaning
blending but without writing out alpha.
Move the glColorMask call to fix this. This will avoid issues with
semi-transparent AlwaysStackOnTop widgets when the top-level has
alpha enabled too.
Task-number: QTBUG-40910
Change-Id: Id6d0d684cfa78bf79b65a097efd92de575e73b2c
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
The NSScreen API has been observed to a return a
screen list with one mirrored, non-primary screen
when Qt is running as a startup item. Always use
the screen if there's only one screen in the list.
Change-Id: I721e25bb7595599287b97f6528e04060ce5da6c1
Task-id: QTBUG-37878
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
There are three reasons to do so:
1. This could be more efficient, depending on the STL implementation.
2. By using QTypedArrayData iterators (T*) instead of QVector ones,
we actually invoke the non-templated range ctor of std::vector,
at least in the common case that std::vector<T>::const_iterator
is also const T*.
3. The change turns a former NRVO return into a RVO one, potentially
allowing more compilers to perform the copy elision.
Change-Id: I70b35aaeae70ba06a971a36b8b1b1da997e8094f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
If qtlogging.ini contains a rule
qt.qpa.input*=true
then all available input event logging will be enabled on any platform.
There are more specific categories for touch, tablet, gestures,
input methods etc. on some platforms.
Change-Id: I8754ce23df8f0b750a4b7dfcf3afe5bab800ead8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This element can be used for backends that do not offer all the
information that is needed when implementing a ssl certificate backend.
WinRT and the SecureTransport lack functionality in this area for
example.
The sources and tests are added for ssl and openssl configurations in order
to be tested. The condition for adding these can be changed as soon
as they are used by an actual implementation
Change-Id: I2b836133105afdc178bf3b1ee7d732bea069effa
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
As the spec for eglGetProcAddress says, some implementations may not return
function pointers for core functions. Similarly to how we cannot get
OpenGL 1.0/1.1 functions with WGL for example.
To make sure QOpenGLTexture does not just crash with such implementations,
we simply use the statically exported functions in -opengl es2 builds.
Change-Id: I213bfcc21e58888b17e0ebcd0a26f26f77517e40
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit should fix proxy authentication when NTLM is used.
NTLM differs from normal HTTP(S) authentication by having 2 roundtrips
instead of 1, some parts of our code however were not prepared for that.
I've tested this patch with Microsoft Forefront, both with normal
NTLM and with NTLM SSPI (in Windows domain).
I removed an optimization added in 3c3ea9a8, I could not see that behavior
anymore. That commit was the wrong fix in my opinion.
[ChangeLog][QtNetwork] Fix NTLM (SSPI) Proxy Authentication (HTTP/HTTPS)
Task-number: QTBUG-30829
Task-number: QTBUG-35101
Change-Id: Idcc9c0dbf388b011d49f2806e9a6dd55ebc35cec
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
Jolla removed the always ask option in the UI, which is the reason
for all this code.
Now, if mobile data is autoconnectable, whether roaming or home, it will
be connected.
Change-Id: I6a86315262e8c4c5551b2b2097389559096f14d5
Reviewed-by: Pasi Sjöholm <pasi.sjoholm@jolla.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Was added with 19a39a4 to allow no input context to be created.
Broken by commit 24c10b0. Especially if compose input context didn't
get compiled, the first input context found was loaded.
Also made Xcb integration use compose plugin by default.
Change-Id: I992eaa8b383320e4ab725bb7b79f561f4f841458
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
QIconLoader did not use the services from QObject and the
Q_OBJECT macro was missing, too, so external code couldn't
have used it in a qobject_cast or inherits(), either.
Change-Id: I1f33dd540fa2ded48d871d848a77eee743a4e3c0
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QIconDirInfo is larger than a pointer, so holding it in a
QList is horribly inefficient.
Fix by holding it in a QVector instead.
Change-Id: I6551d2d2941447e600a33c3d68edf46db002d96c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
QIconDirInfo is held in Qt containers, so reap the performance
benefit of a movable type.
Change-Id: I317c69ec46d324623b21a33043856e22f60e21b1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
There's no calling back into QIconLoaderEngine from the QIconLoaderEngineEntry
dtors, so don't bother slicing off one element by one from the container as
they are deleted, the more so as m_entires is either move-assigned or deleted
right after these loops.
Change-Id: Ic9ffa442ef0b0c59e19eb91d164183ea5c3bab67
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Experience shows that the compiler does not recognize the
size() call as a constant expression, so help it along.
Change-Id: I688244f37c555365566cd1a59dc601974316a2e6
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Experience shows that the compiler does not recognize the
size() call as a constant expression, so help it along.
Change-Id: I60cd1754f8be123c62e3b47f6f721f42a69fe3c5
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Otherwise some text gets rendered black, which is the default background
color on Windows Phone.
Change-Id: I963875879655207e881ab0199bdac98a1e4f4ea5
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Valgrind has reached double-digit versions, so the regexp for detecting
the version from the string needs to be widened accordingly.
Change-Id: Ib95994f96d6b1e94a34bedd1b98525076851984b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Incorporates animation timer fixes in:
* 7da483bfbefcaabb1dbbf3e2f1d5b5f7aadc3b06
* b02eeeee586abe343b8866385c1327ac009b3ef0
* 59d5c5cf555a51cd7559cea197a198ef3a792614
from qtdeclarative.
With these changes, we no longer need to call updateAnimationTimers
in QUnifiedTimer::startTimers.
Change-Id: Ic24501cfdc3cb572bd891d84f684f11c3bef1b50
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This update fixes a few cases that didn't work
correctly. The problem was caused by calling
findNodeForTarget() with a pointer to a relative
node, but the relative node pointer should always
be 0, when the domain tree to be searched is not
the same as the tree containing the relative node.
This fix sets the relative node pointer to 0 in
that case.
Change-Id: I2fe4a7a4a3b6392199666c7d49b473a56697e7b5
Task-number: QTBUG-39221
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This update makes qdoc report an error, when it can't
recognize a parameter in square brackets.
Change-Id: I45d31ec875ac533736ee4a565ff3f217353068dd
Task-number: QTBUG-39221
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
But don't use it yet. qdoc will check for name
collisions within a module, once we decide what
collisions to look for and what to do about them.
This change puts a rewritten checkForCollision()
function back in, but doesn't use it yet.
Change-Id: I41f9275c3ca29f228268ccf7cb2d99bbe0ce557c
Task-number: QTBUG-40506
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Now that the qdoc link command has ability to tell qdoc which module
contains a link target or whether to link to a QML or CPP entity,
collision pages should no longer be necessary. In fact, qdoc hasn't
been generating any collisions for some time. This task removes all
the collision node code from qdoc.
Task-number: QTBUG-40506
Change-Id: I34d1980ca1c0fe4bb5ad27dd4b00e61fa7e6e335
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
In an attempt to make the classes show up in the generated documentation.
Change-Id: I198f788a42f6007802db2384e3cd79e988f573e7
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This allows the convenience macros to be used on desktop Windows 8 when
interacting with Windows Runtime types.
Change-Id: I09c6b18a6ee9711371ef7dc23fb1d3354198db1c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Add QT_DBL_CLICK_DIST to replace QWS_DBLCLICK_DISTANCE for controlling
the distance for detecting double clicks, which can be very useful on
embedded devices
[ChangeLog][QtGui] environment variable QT_DBL_CLICK_DIST
customizes the amount of movement allowed when detecting a double click.
Task-number: QTBUG-40841
Change-Id: I0a7534ad6cd6387d127eb49021a92d414d45670e
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The HTML 5 spec requires it, instead of only looking at the first 512.
Task-number: QTBUG-40383
Change-Id: Ie10cf8c745ed1a3402914e126a02bc43d5035fff
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
The most useful information is what kind of gesture the event
represents, but it was missing until now.
Also added a line of documentation about the NativeGesture event type.
Change-Id: I1ba3c951dcc5751e937d762d9b647ab0bf8d93b8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
59ba84d31c introduced a mistake.
It's necessary to populate the device data structure
even if we are not going to log anything. Now the accessor
is renamed to touchDeviceForId and the struct is renamed to
XInput2TouchDeviceData to make it more clear that it is only
for touch devices.
Change-Id: Iaa3cce2d6cae250318f5a200becb9de9626b6437
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
We set FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH as the default load flags
for freetype fonts, but due to using = instead of =| the default flags
gets overridden when outline drawing sets FT_LOAD_NO_BITMAP.
Change-Id: I26b45aa2bbf613689d278eb07ae028ef9757023c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Generation of the obsolete members page, for QML types
that have obsolete members, had not been implemented.
This update implements that missing feature. The link
to the page appears right below the link to the "All
Members" page.
Change-Id: I3e4bb2a68d5c8ef2bbe2e0c431eccf94ecb1fd3c
Task-number: QTBUG-40214
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This update enables using QML or CPP as the parameter
in square brackets for the \l command. You will use this
when, for example, there exist both a C++ class named
QWidget and a QML type named QWidget and your \l {QWidget}
links to the wrong one.
Suppose you write \l {QWidget} expecting it to link
to the QML type named QWidget, but it links to the C++
class named QWidget. Then write this instead:
\l [QML] {QWidget}
Or if you wrote \l {QWidget} expecting it to link to
the C++ class, but it links to the QML type, write this
instead:
\l [CPP] {QWidget}
A qdoc warning is printed if qdoc can not recognize the
parameter in square brackets.
There will be a further update to complete this task for
implementing the other type of parameter that can be in
the square brackets.
Task-number: QTBUG-39221
Change-Id: I5dd85478f968025ecbe337a8aabcc31d8b12a86d
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
The xcb auto-repeat checking code checks for queued events on the target
(focused) window. This breaks down if you have a native child widget,
and QKeyEvent::autoRepeat is never true.
Task-number: QTBUG-21500
Change-Id: Ia979edfa8a3afce07a3e1cbaa778541ffb9ce5dc
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
We need to keep track of both wall time which are used for pauses
and actual animation driver time which is used for actual animations.
When switching between these, we need to also maintain the temporal
drift potentially introduced by the driver and also the time
that has passed in wall-time from when a pause has started until
an action animation takes over.
This change introduces a well defined elapsed() function in
QUnifiedTimer which will return the right value based on which
mode we are currently in. It also introduces start/stopAnimationDriver
functions which helps us maintain the temporal drift and pause-delta.
Change-Id: I5b5100432a6db444a413d1bca4f2d5f800e8cf3e
Reviewed-by: Michael Brasser <michael.brasser@live.com>
On Android, fullscreen means enabling "immersive mode", which
results in the screen available geometry changing. When restoring
normal mode, oldAvailableGeometry == oldGeometry, which means that
the fullscreen branch would be chosen even though the state is not
fullscreen. By doing the maximized test first, we will default to
non-fullscreen geometry for non-fullscreen windows.
Task-number: QTBUG-39977
Change-Id: Ifc7e8b4de7e96d8c00603ce0cd136b95f58012bb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
The convert_generic_inline method was not correctly handling the case
where both the conversion methods were passthrough and the last store
is therefore not needed and may trigger an invalid memcpy call.
Change-Id: Ic88780f50e1ff9dedc04b8ff1ab3527dd0c8150c
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
In Qt 5.3.0 a change was added which automatically adapts Common
script to surrounding scripts in accordance with the Unicode tr#24.
This broke *a lot* of cases of font selection because the font
selection algorithm is not prepared for handling characters with
adapted scripts. We need to disable this change for now and redo it
later with patches to font selection to avoid the regressions.
[ChangeLog][Text] Fixed several regressions in font selection when
combining different writing systems in the same text.
Task-number: QTBUG-39930
Task-number: QTBUG-39860
Change-Id: Id02b5ae2403c06542ed5d81e7c4deb2e0c7d816e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
A mouse device with both missing labels and a wrongly placed label
on the mouse wheel buttons have been spotted.
This patch makes the XInput2 code even more lenient to better match
legacy systems that always assumed button 4 and 5 are mapped that way.
Task-number: QTBUG-40806
Change-Id: I7cc52f3d9c54e15e6f3ddcc2bdeb1bb8e0ac9eca
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Drag'n'drop events were not propagated by a the QWindowContainer to the
embedded QWindow. This patch makes the widget accept the events and
pass them on
Task-number: QTBUG-40603
Change-Id: I97320fbcad27f7c6aa48c95c90bb42dda634764e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Make sure that the screen geometry is updated before the available
geometry, since Qt uses available geometry change as the trigger
for updating the application.
Task-number: QTBUG-39965
Change-Id: Icb660f2de739367cf1fa99ddfe600f37eb6174eb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Android does not report the full screen size in display metrics.
However, it does report the correct size for layouts, which we use
to get the available geometry. Since by definition, the available
geometry should always be inside the screen geometry, it is safe to
use the maximum of the two sizes.
Task-number: QTBUG-39977
Change-Id: I78d974f12274ca67eada43f5e1d80e70149efe3f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
It's unclear whether it has to be, but there are a lot of patches floating around
on the net that indicate that Coverty requires this, and the SIOCGIFADDR micro-howto
also NUL-terminates the string.
So who is Qt to differ?
Change-Id: I1aa5a2de47a58b1d9b73556d5a6ddc48b2c40ce3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
kUCCollateDigitsAsNumberMask works only if kUCCollateDigitsOverrideMask
is also set.
Update 0: - test added.
Task-number: QTBUG-40777
Change-Id: I48bfec78f5f8439a51f8d749f0fc4397a72b29f2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>