Commit Graph

38054 Commits

Author SHA1 Message Date
Nico Vertriest
4d9ac14bf8 Doc: Complete doc on QHostAddress::clear()
Task-number: QTBUG-31280
Change-Id: Ia9904433b0b67bead8831f2ef678b9598977df6b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-08 15:00:30 +00:00
Kai Koehne
2e2832a499 Fix typo in fontconfig autotest
Change-Id: Ie6ef3aa654083cd23320eda99660ff85050d999c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-01-08 13:12:57 +00:00
Tony Sarajärvi
8b1a23ed32 Blacklist a flaky qtableview function in WinRT
Task-number: QTBUG-72853
Change-Id: Iaf2b25712b571a3ce73387cb3d2e70d427808364
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-01-08 11:58:41 +00:00
Heikki Halmet
a3f3c1d599 Make Android arch x86_64 to use platform-21
Change-Id: I0dc1f87af2270aa5a8ac9fcc256b5b923e1c8c21
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-01-08 11:47:02 +00:00
Timur Pocheptsov
98552a84ce Emit paletteChanged and send ApplicationPaletteChange on theme change
Fixes: QTBUG-72575
Change-Id: I407e081295a456a7bdd36de91ca5bbf74bba6078
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-08 11:43:16 +00:00
Timur Pocheptsov
78b422c341 QNetworkReplyHttpImpl::_q_startOperation - remove a useless warning
Since it explains nothing and now, after some other bug was fixed
(see, for example, c89d0f9d53), we trigger this message on the
first request, which happens because:
- 'createSession()' indeed, creates a session, compares a previous
  kwnon state (which happens to be 'Invalid') with a current state,
  which is 'Connected' and then invokes '_q_networkSessionStateChanged'.
- '_q_networkSessionStateChanged()' on 'Connected' emits
  'networkSessionConnected()' to which a newly-created QNetworkReplyHttpImpl
  will respond with it's _q_startOperation().
- QHttpNetworkReplyImpl will also try to 'open' a session, its 'opened()'
  signal will trigger, again, 'networkSessionConnected()' and ... the
  next _q_startOperation().
Now, not to add even more twisted spaghetti if/conditions with some
unpredictable regressions, let's suppress a useless warning and
silently return. We, indeed, in 'Working' state, let's keep working.

Task-number: QTBUG-72463
Change-Id: I5282979920915ffded889c20b8ae740a46efef04
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-01-08 11:18:18 +00:00
Friedemann Kleint
56e92dfdf2 QSplashScreen: Fix positioning in multimonitor setups
Previously, QSplashScreen::setPixmap() used
QDesktopWidgetPrivate::screenGeometry().center() to determine
the screen position, which would always result in the primary screen
being used. That is counter to the documentation of QSplashScreen(QWidget *,
QPixmap), which states that a desktop screen widget can be passed
as parent to set the screen.

To fix that and make it easier to work with QScreen (which is the likely
outcome of QTBUG-62094), extract the setPixmap() to QSplashScreenPrivate
with an additional QScreen * parameter and add a helper to determine it. Do
not set a position in case no parent was passed so that
QPlatformWindow::initialGeometry() triggers, centering it over the cursor.

Fixes: QTBUG-72819
Task-number: QTBUG-62094
Change-Id: Ic38cfecd24c3ff6b82dff37702b627c5a50a3e1d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-08 11:12:38 +00:00
Oswald Buddenhagen
5733dfbd90 qmake: make CONFIG+=egl work again
while it's legacy and should not be used (use QMAKE_USE+=egl instead),
it shouldn't be broken nonetheless.

amends 310bf3f57c.

Fixes: QTBUG-72564
Change-Id: Id6a070a4653dc1182a6b4d75af027a6ee6cbacae
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
2019-01-07 19:07:02 +00:00
Max Mazurov
2cd633e7ee XCB: Use application name for X11 selection owner name
This makes it possible for clipboard managers (or other scripts) to
distinguish different Qt applications and act differently.

Change-Id: I5bc5a1914b51127b24a81142ca9dbdb196ffd0d8
Fixes: QTBUG-72806
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-01-07 17:12:54 +00:00
Liang Qi
772f56c3cf Fix warnings about uninitialized variables - qrgba64_p.h
In function 'QRgba64 rgbBlend(QRgba64, QRgba64, uint)':
error: 'blend.QRgba64::rgba' is used uninitialized in this function [-Werror=uninitialized]
qrgba64_p.h:246:13: note: 'blend' was declared here
     QRgba64 blend;

Change-Id: I7b263f863281c51c7d8099704f2cffcc7e1a07df
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-07 14:57:03 +00:00
Kari Oikarinen
07685355b5 Bump version
Change-Id: I2bf8da98a140bdd9848139a96bea736708357a1a
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-01-07 07:56:16 +00:00
Gatis Paeglis
abcf7a103e configure: improve warning when all qpa plugins disabled with features.gui
The mentioned README file has never been very trustworthy and
after 863c688749 it has become
very minimal - it doesn't contain anything that is not already
present in "configure --help" and enforced by the configure
process. Furthermore, the warning was XCB specific, but Qt
supports also other QPA plugins on linux.

Change-Id: I3211dda3f294cbcd5f3d15fe8c21a1af7627f048
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-01-07 07:27:35 +00:00
Jędrzej Nowacki
ecdccce8e4 Fix warnings about uninitialized variables
qtbase/src/corelib/kernel/qmetatype.cpp: In static member function ‘static void QMetaType::destroy(int, void*)’:
qtbase/src/corelib/kernel/qmetatype.cpp:2599:27: error: ‘info.QMetaType::m_destructor’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     if (m_typedDestructor && !m_destructor)
         ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
qtbase/src/corelib/kernel/qmetatype.cpp:1868:15: note: ‘info.QMetaType::m_destructor’ was declared here
     QMetaType info(type);
               ^~~~
qtbase/src/corelib/kernel/qmetatype.cpp:2600:26: error: ‘info.QMetaType::m_typedDestructor’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
         m_typedDestructor(m_typeId, data);
         ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
qtbase/src/corelib/kernel/qmetatype.cpp:1868:15: note: ‘info.QMetaType::m_typedDestructor’ was declared here
     QMetaType info(type);
               ^~~~

The extended (not inlined) function may be called on a half
initialized invalid instance.

Change-Id: I26d677a8ad2bd0c5846233f06393e774d377936d
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-06 10:14:36 +00:00
Oswald Buddenhagen
45e4dfb449 qmake: rewrite msvc/nmake cross-build environment setup
rather than reproducing vcvarsall.bat's functionality as hard-wired code
in the nmake generator, just invoke the actual script from
toolchain.prf. this is much easier, more future proof, and - critically
- makes the detected variables available to configure's new library &
header search facilities.

[ChangeLog][Important Behavior Changes][qmake][WinRT] Cross-builds will
now ignore pre-set values of %INCLUDE% and %LIB% when building target
executables. If necessary, use configure's -I and -L switches when
building Qt, and pass QMAKE_INCDIR and QMAKE_LIBDIR on qmake's command
line when building own projects.

Change-Id: I36f53e8880d6523f3f6f7a44d40d87d04bd06854
Reviewed-by: Thomas Miller <thomaslmiller91@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-01-05 20:33:24 +00:00
Oswald Buddenhagen
ef14c3dc1a qmake: reshuffle toolchain.prf
swap the order of compiler version detection and default path detection.
this keeps a subsequent commit smaller, which introduces a dependency
between the two.

Change-Id: I2d4cbee1fd3555411c18833bbee0201c994a9942
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-01-05 20:33:14 +00:00
Oswald Buddenhagen
f89ac0101a qmake: add $$read_registry() function
Change-Id: I7f9f17e0f44c273e4754d1decc92a8594cad8658
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-05 20:33:07 +00:00
Oswald Buddenhagen
fff59911a3 qmake: add QMAKE_EXPORTED_VARIABLES
because QMAKE_EXTRA_VARIABLES sometimes just ain't enough.

Change-Id: I739e5b6510e4701ca0a86834e4f9a978d7ef1cf4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-01-05 20:32:56 +00:00
Volker Krause
2f4eea5b9c Also integrate Android AAR libraries
This works in the same way as JARs are currently provided by dependencies,
and becomes necessary when needing e.g. the Android support/compat libs
for implementing the Java side of a library.

While this is not relevant (yet?) for Qt itself, we hit this with KDE's
notification framework.

Change-Id: Ia87d1a048a493f7bc311abf5761f33d1943cfbe9
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-01-05 15:52:56 +00:00
Sona Kurazyan
012f7bb622 Copy backend configuration while setting dtls config
When setting dtls configuration, we should also copy
backendConfig, otherwise this setting will be ignored.

Change-Id: I4df53e8e6d8c2bd0eb7dddb9928b7883c401d60a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-01-05 09:22:36 +00:00
Ville Voutilainen
1fb41a3869 Fix qbswap calls for Big Endian targets
Task-number: QTBUG-71945
Change-Id: I5356f8e32d00ea591b1f65cdd4111276fcf876ac
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Khem Raj <raj.khem@gmail.com>
2019-01-05 09:22:13 +00:00
Tor Arne Vestbø
1075f10184 macOS: Optimize detection of dark mode
Change-Id: I579527c54f8453c1e4f57bab7eebfc576b6ad365
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-01-04 20:55:14 +00:00
Tony Sarajärvi
8c2ca29045 Revert "Blacklist tst_QTimer::basic_chrono on macOS"
Incorrectly blacklisted.

This reverts commit 40a7c57ba9.

Task-number: QTBUG-61013
Change-Id: I7d9dc4a4b1c8d7ff77ab75c61027b908ffb74552
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-01-04 09:45:41 +00:00
Vitaly Fanaskov
f7dc6042cb Remove dead code
Task-number: QTBUG-44131
Change-Id: Ic092f2be5855840d6467560159c12f3c5aa36344
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-01-04 09:42:14 +00:00
Tor Arne Vestbø
4dc2bc323c macOS: Remove Mojave forward-declarations now that we build with Xcode 10
Change-Id: I8528932f3744fbf3473219b6eeda7c26ac039b67
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-01-03 18:38:18 +00:00
Tor Arne Vestbø
88e34b0a46 CoreText: Fix inaccurate use of pixelSize when dealing with pointSize
Change-Id: If46fa157bc921efd8145823c806b6b04f49233cf
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-01-03 18:38:15 +00:00
Vitaly Fanaskov
d8bbb5ee0e Respect roles of buttons added to QMessageBox
When a button added to QMessageBox has AcceptRole or YesRole, the signal
accepted() will be emitted upon click on the button. If the button has
RejectRole or NoRole, the signal rejected() will be emitted upon click
on the button. If a button has a different role, neither accepted() nor
rejected() will be emitted. This works for both standard and custom
buttons.
The signal finished() with result code will be sent regardless of a
clicked button role.
Also added documentation strings for some methods of private classes in
order to have better tooltips in IDE(s).

Task-number: QTBUG-44131
Change-Id: I521a4e5112eb4cf168f6fbb4c002dbe119aeeb09
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-03 18:38:12 +00:00
Samuel Gaist
1606a8aa1c Doc: fix typo in QAbstractSocket::bind documentation
Fixes: QTBUG-72780
Change-Id: I16d89d29f573dba37ed8e1986ed9677117ca6aad
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2019-01-03 11:38:09 +00:00
Samuel Gaist
7ca39bf7bc Doc: cleanup semaphore example
This patch removes unused signal and variable.

Change-Id: Ia4eaf083493d3d37e3ff22e0380d5a5ee69f91cf
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2019-01-03 11:37:22 +00:00
Gatis Paeglis
dd988e2074 configure: add XCB GL integration features
This way Qt builders can see if everything has been configured
properly for XCB GL integrations at configure time, instead of
at the end of the build process.

Change-Id: I00740cc2edd7f6ecfcda0ddfb22649d1b4db4aa2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-03 10:29:17 +00:00
Gatis Paeglis
0decdcb754 configure: add X11 subsection in "Features used by QPA backends"
xcb-xlib is used by XCB and EGLFS_X11.

xlib is used by XCB, EGLFS_X11 and offscreen plugin (not listed
currently under "QPA backends").

egl_x11 is used by XCB GL integration plugin and EGLFS_X11.

Renamed X11 -> XCB under "QPA backends", because that is the
correct QPA name.

Change-Id: I455ac3a41da3ab84453d8de0edc657c3a5e064c9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-03 10:09:47 +00:00
Gatis Paeglis
7d8fe4d98f configure: make xcb-render a hard dependency for xcb plugin
Its been available by default since at least libxcb 1.5, and in Qt 5.12
we have even increased the minimal required libxcb version to 1.9.

Having configure switches for extensions is a legacy from Qt 4. There
are still few exceptions in Qt5, where the reason is that we have to
support Linux distributions that don't ship recent enough libxcb.

Task-number: QTBUG-30939
Change-Id: I0a02d93b6411119ec018b0cb8fe5c63beeab62ee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-03 10:09:40 +00:00
Gatis Paeglis
6899117a59 configure: properly atomize render vs. renderutil
xcb-render is a C interface for X11 extension. xcb-render-util is a
utility library that complements xcb-render by providing convenience
functions and interfaces which make the raw X protocol more usable.

Bumped xcb-render-util version to avoid having include hacks. We were
bundling 8 years old release 0.3.8 (Apr, 2011). 0.3.9 is the latest
release and it was relesed 4,5 years ago (Jun, 2014). All CI machines
have 0.3.9. The only thing that have changed in xcb-render-util sources
since 2011 is that we don't need to have various hacks to include
xcb_renderutil.h in C++ files. Upgrading bundled XCB libs was also
requested in QTBUG-71109.

Task-number: QTBUG-71109
Change-Id: Ib261f7584ad81be95660123b007e2200a3042f4c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-03 10:09:34 +00:00
Eskil Abrahamsen Blomfeldt
ceddc14af1 Draw ShowTabsAndSpaces symbols with the correct font
We would draw the tab and space symbols without setting the correct
font on the painter first.

[ChangeLog][QtGui][Text] Fixed so ShowTabsAndSpaces will use the
correct font.

Fixes: QTBUG-62540
Change-Id: I3b7d6d317473e7aab722dafe1a128c57a830f634
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2019-01-03 08:48:41 +00:00
Oliver Wolff
f9d8762d37 winrt: Remove yet another Windows Phone leftover
Hardware and camera button handling are phone specific APIs we no longer
support in Qt.

Change-Id: Ib11f894a426b8e4b71acf24876437ddab2cea548
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-01-02 23:32:34 +00:00
Christian Ehrlicher
7ba16f4c1e QComboBox/WindowVistaStyle: restore focus rect
The focus rect for the QComboBox was removed during the refactoring done
in 5c60e4b8f9.
Readd the functionality in a similar to
QWindowsStyle::drawComplexControl().

Fixes: QTBUG-69239
Change-Id: I74e4060fbe52432318e3c986fc838cf353d99843
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-01-02 21:32:34 +00:00
Nico Vertriest
9636a43abc Doc: Update page Tamil Script Code for Information Interchange
Task-number: QTBUG-56668
Change-Id: I173d73ef5e9b08e865cb75fa03849665fcda652e
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2019-01-02 09:42:59 +00:00
Alexander Volkov
f05cc4144e QDialog: Pass transient parent as a parent to native dialogs
Sometimes it's needed to show a native dialog for another process,
for example in xdg-desktop-portal-kde. In this case we have WId
of a parent window which can be used for calling
QWindow::setTransientParent(QWindow::fromWinId(...)).

Pass this transient parent to a native dialog so it could use
it as a transient parent for itself. Rename
QDialogPrivate::parentWindow() for clarity.

Change-Id: I68974ddea35f9366a0ddffe602d9d028f45e26fa
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-24 16:51:14 +00:00
Luca Beldi
ff835a5030 Fix QStringListModel::setData to check for actual changes
QStringListModel::setData documentation states that
"The dataChanged() signal is emitted if the item is changed."
This patch actually respects the doc. setData will check that the data
actually changed before sending the dataChanged signal.

[ChangeLog][QtCore][QStringListModel] setData will now emit the
dataChanged() signal only if the string set is different from
the one already contained in the model

Change-Id: I4308a6f3b4851203fb899c5e29a36076e0c32f2f
Reviewed-by: David Faure <david.faure@kdab.com>
2018-12-24 08:07:36 +00:00
Tor Arne Vestbø
3306b16239 macOS: Only do gamma-corrected blending for subpixel-antialiased text
The grayscale font-smoothing doesn't expect to be linearly blended,
as first assumed.

Amended nativetext manual test to better diagnose the native Core
Text behavior. Non-linear blending will result in the magenta
text having a dark outline against the green background.

Change-Id: I24a5f04eb1bd66fb98d621078d80ee9b80800827
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-23 12:00:07 +00:00
Tor Arne Vestbø
5af60d3b37 macOS: Prevent checking for stale SDK without the required SDK name
There's no need to check the SDK at the root exclusive-build Makefile,
we can leave it to the individual build passes where the SDK variable
is available.

Fixes: QTBUG-72449
Change-Id: Ic829babf4c76e6d20812de0b94120199ebfb300c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-23 11:58:48 +00:00
Morten Johan Sørvig
f0dd6655e1 Fix QSystemTrayIcon stale pointer access
The child imageCell is a NSView and may be retained by Cocoa,
which means it may outlive the parent QNSStatusItem.

Clear its parent pointer to avoid referencing a stale
pointer.

Task-number: QTBUG-47929
Change-Id: I6078070b8c9f512ecd034fee4e54b1d8282dabdf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-23 09:23:50 +00:00
Morten Johan Sørvig
fb67ac6368 Modernize QNSImageView implementation
Use Objc properties instead of instance variables.

Change-Id: I4bddf2c9c824467d7c42dd5bb0c3b4aacd6b27be
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-23 09:23:42 +00:00
Tor Arne Vestbø
69f7115c43 macOS: Merge qt_mac_createRoleFonts into only caller
Change-Id: Id6e61a70e4ebe47896dcbc8680d1d6b06c747871
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-12-22 14:33:33 +00:00
Kai Koehne
8915c9715a Doc: Remove pre-Windows 7 from QCollator documentation
The code path that this refers to was removed already for Qt 5.11 in
commit 53fb2c48ef.

Change-Id: I4a7ae1b89b24c0ab7ceaa43f763c7ef422ca4900
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-22 10:00:49 +00:00
Kai Koehne
b978cdcb26 Make sure -prefix documentation is also valid for top-level build
Fixes: QTBUG-71540
Change-Id: I1c8c66706beaa130f9eb7a6f2ee02a21f98d8afc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2018-12-22 09:59:35 +00:00
Kai Koehne
07e5edf991 Doc: Consistently mark QT_XYZ_CAST_FROM_ASCII with \c
Otherwise it gets linkified, which looks inconsistent. Instead,
use \sa for functions where QT_NO_CAST_FROM_ASCII
or QT_RESTRICTED_CAST_FROM_ASCII is referenced.

Change-Id: Ic3933d8c4c81c963215de7f3aac4d0a11e61cbc2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-12-22 09:59:25 +00:00
Kai Koehne
28a28af182 QtCore: Unify license headers
Change-Id: Iff4f6da9f0bbf7a0627101f455dd8467681b2783
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-22 09:58:09 +00:00
Kai Koehne
f372714e96 Doc: Fix typo in QStyle
Change-Id: Ic979cb66acb3f8824aefb6ad858c0f746ce3e02b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-12-22 09:57:42 +00:00
Thiago Macieira
a7cea16005 MSVC x86: implement add_overflow for quint64
There's no 64-bit ADD instruction, so we make do with ADD+ADC. This is
what Clang generates. ICC uses the two as well, but then performs some
subtractions to find out if it overflowed. GCC for some inexplicable
reason attempts to use SSE2 if that's enabled, otherwise it performs the
subtractions like ICC.

Alternative implementation which generates better code, but violates
strict aliasing:

 uint *low = reinterpret_cast<uint *>(r);
 uint *high = low + 1;
 return _addcarry_u32(_addcarry_u32(0, unsigned(v1), unsigned(v2), low),
                      v1 >> 32, v2 >> 32, high);

Manual testing shows this works. tst_qnumeric passes in debug mode. MSVC
2017 15.9 still miscompiles in release mode (reported to MS as [1]).

[1] https://developercommunity.visualstudio.com/content/problem/409039/-addcarry-u32-wrong-results-with-constant-inputs.html

Change-Id: I61ce366d57bc46c89db5fffd15704d53ebd4af3c
Reviewed-by: Thomas Miller <thomaslmiller91@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-12-21 17:48:56 +00:00
Antonio Larrosa
9ab04795e2 Fix qfloat16 methods definition without declaration when using Q_QDOC
This fixes qtdoc failing to build on i586 because of an assertion in
libclang since Q_QDOC is defined and thus the declaration of the
qfloat16(float) constructor and operator float() are removed, thus
their definitions should be removed too, which is what this patch
does.

Fixes: QTBUG-72725
Done-with: Michal Srb <msrb@suse.com>
Change-Id: I6424873425d46345e09f411f9ce88f2520825da4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-12-21 17:21:34 +00:00