The Visual Studio registry keys are stored in the 32 bit view.
Extend qt_readRegistryKey with an option that enables the caller to
choose the 32 bit or 64 bit registry view.
We now read the Visual Studio registry keys from the 32 bit registry
view even in a 64 bit build.
Adding the next Visual Studio version will become a bit easier.
Change-Id: I7300b992be6058f30a422e3f1fe0bafade6eea54
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Commit 64a1448d87 (Qt 5.2) caused
QNetworkInterface to report address labels (a.k.a. interface aliases) as
separate interfaces. This is caused by the fact that glibc, uClibc and
MUSL copy the address label (netlink address attribute IFA_LABEL) to the
ifa_name field, which made QNetworkInterfaceManager think that it was an
interface it hadn't yet seen.
Address labels are the old way to add more than one IP address to an
interface on Linux, for example:
ifconfig eth0:1 192.0.2.2
Those do not create a new interface, so the "eth0:1" label maps to the
same interface index as the parent interface. This has been deprecated
for 10 years, but there are still tools out there that add addresses in
this manner.
This commit restores behavior compatibility with Qt 4.2-5.1. The Qt
5.2-5.5 behavior is incorrect because it reports more than one interface
with the same index. On systems configured like the above, the
tst_QNetworkInterface::interfaceFromXXX test was failing.
Change-Id: I8de47ed6c7be4847b99bffff141c2d9de8cf7329
Reviewed-by: Richard J. Moore <rich@kde.org>
It should compile, since the std::shared_ptr does.
[ChangeLog][QtCore][QSharedPointer] Fixed a problem that would cause a
compilation error when constructing a QSharedPointer of a const type
when the type derives from QEnableSharedFromThis.
Task-number: QTBUG-49748
Change-Id: I8de47ed6c7be4847b99bffff141c84f5e0b6bea8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Otherwise, the window may up outside the display area when centering
on a secondary screen and the primary screen has a different scale factor.
Task-number: QTBUG-49803
Change-Id: I91ec7c5348722a90012f80a247e662e96bcbb391
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Add two- and three-column layouts for the 'All C++ Classes'
list. Also affects the layout of 'All QML Types' page.
Task-number: QTBUG-49376
Change-Id: I80953c0955dbc37db5aa4c60eb9ea8e3023a77f2
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
IFileSavePicker::put_DefaultFileExtension() fails when the '.'
is missing, causing the QtWidgets-based dialog to show up (Windows 10).
Change-Id: Ifcb870431b792ffa8e4a608dec999225e8383fa9
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Make it possible to pass arguments to the messages by
introducing variadic macro versions of RETURN_[]_IF_FAILED.
Change-Id: Iec27adb33d9d3211fdc299f07777fcdf33f08a93
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Expose QPlatformIntegration::ShowIsMaximized similarly to
QPlatformIntegration::ShowIsFullScreen.
This allows for applications to adapt their UI to mobile/desktop
accordingly.
Change-Id: Ic14d16fde11d7d2740b2f4092ae12e88a2f522fd
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
On some Debian distros, the TZ environment variable can be set to
":/etc/localtime", which libc defines as "default value". If this is
set, the current QTimeZone parsing code will return "/etc/localtime"
as the system timezone id, which is clearly wrong.
So in that case, just unset the ianaId variable and let the other
blocks look for the timezone.
Change-Id: I3f5795d0a05f4974a60556387a07a1e2e1e7aa30
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We can use getWindowVisibleDisplayFrame to know the height on the
keyboard, and we can use getLocationOnScreen to find out how much
the view is scrolled. Since onPreDraw is always called when the
view is scrolled or when the keyboard appears or disapear, we can
call the native functions from there.
This is not working for floating keyboards.
[ChangeLog][Android] Implemented QInputMethod::keyboardRectangle
Task-number: QTBUG-40731
Change-Id: I7848eb34fece410b29a06bf0bbb2313112fffa68
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
There are many cases in which finishComposingText is called and it
does not mean the keyboard will be hidden.
Add a check that there are space reserved for the keyboard before
closing it.
This is not helping with floating keyboards, but it's already better.
[ChangeLog] Made QInputMethod's visible more accurate
Task-number: QTBUG-42444
Change-Id: I4d706f1ea5ba2f0f6d3ec1921139317bc4f8dafb
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Instead of replacing the container iterated over, in the middle
of the loop body(!), place a label in front of the loop and
use goto to restart the entire loop.
This allows to mark the variable 'list' const, which is a
prerequesite for replacing the loop with a C++11 range-for
one.
But it also makes the code less cryptic. No-one expects the
container to be re-seated in the middle of the loop.
The compiler agrees: saves 144b of text size on optimized
AMD64 GCC 4.9 Linux builds.
Change-Id: I22d07672a1bbe9d7ffb083ae231eda760c29d350
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
In a QPair, the member names {first, second} have no semantic
value. A simple struct, while not as featureful as QPair, can
be given meaningful member names, {rect, index}, in this case.
Change-Id: If1e289ecee82a1cb020ac3a854efd2ec1096493b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
qabstractitemmodel_p.h should include qabstractitemmodel.h since
it's using QModelIndex.
Change-Id: Ie2e3f9e1b324e080e1159e49fa89dd70f920dd1d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This suppresses the emission of QTcpServer::acceptError() from
QTcpServerPrivate::readNotification().
Task-number: QTBUG-49776
Change-Id: Icfb686d44c0a396ae2bf5867bd31a91232ef3e3c
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This information is already registered by the QMessageLogger ctor.
Change-Id: Iac378777675f00ad5d07b938605484b1466aa5c5
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QImage can be used without QGuiApplication, but wihout QGuiApplication
the accelerated methods would not be used.
This patch changes the initialization of the QtGui function tables to
happen in static object constructors on QtGui load, instead of in
the QGuiApplication init.
Change-Id: Ib58982fbc50fd79122352d021d93a3c99aca5043
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The qt_poll function calls recv to query whether fds marked by select
as readable should be marked POLLIN or POLLHUP in the pollfd structure.
On many platforms such as QNX this requires extra link-time libraries
which were not previously required by QtCore.
While the qt_poll function is intended as a fallback mechanism only for
those platforms which do not implement poll natively, the function was
compiled unconditionally whenever QT_BUILD_INTERNAL was defined, e.g.
in developer builds.
Additionally the function was included on those systems that define poll
in system headers so that configure determines build-time availability,
but do not define _POSIX_POLL > 0 or indicate POSIX:2008 compliance via
either the _POSIX_VERSION or _XOPEN_VERSION macros. On those systems a
sysconf query for _SC_POLL was performed to determine at runtime whether
to call the system poll or qt_poll.
Both of these cases are in fact counterproductive. In the first case the
sole consumer of the function is a single manual unit test. In the
second, to my knowledge no platform requires the runtime fallback.
Despite that, we were forcing an extra dylib in both cases.
Both cases are fixed by 1) moving the implementation into its own file
for the unit test to include and 2) dropping the dynamic fallback if
configure determines availability of poll at compile-time.
This also reverts commit 1377709711, which
added -lsocket for QtCore on QNX.
Change-Id: I2dd10695c5d4cac81b68d2c2558797f3cdabc153
Reviewed-by: James McDonnell <jmcdonnell@qnx.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QResult and QResultPrivate are not derived from QObject and
QObjectPrivate respectively, but can still benefit from Qt's
PIMPL idiom. There are several interrelated aspects to this:
- Base all driver ResultPrivate classes on QResultPrivate.
Previously, each level in the Result hierarchy tended to keep
its own private data class.
- The ResultPrivate class initializes its own Result (q_ptr)
and Driver members. This ensures that these pointers are
correctly set in time for the ResultPrivate constructors
and Result constructors. This is more efficient and makes
it a lot easier to follow what's being allocated, initialized,
and cleaned-up.
- Use macros Q_DECLARE_PRIVATE, Q_DECLARE_PUBLIC, Q_D, and
Q_Q for access to and from ResultPrivate objects.
- ResultPrivate classes refer frequently to their counterpart
DriverPrivate. Various patterns were used to do this. Now
Q_DECLARE_SQLDRIVER_PRIVATE arranges this uniformly while
hiding ugly casting. It creates a public method in the
ResultPrivate returning the correctly typed pointer to the
corresponding DriverPrivate object. Since the method is public,
the Result class and helper classes and functions can also use it.
- The explicit const is removed from QResultPrivate::sqldriver,
even though it is treated (mostly) like a const within the
context of Result and ResultPrivate. This is the same pattern
seen in Qt's PIMPL idiom. The macro created getter methods
take care of const.
- qsql_mysql was using a signal/slot connection to zero its own
copy of the driver pointer when the driver was destroyed. This is
no longer necessary.
Change-Id: Ida4933bc92fb3e9a05ea4b53b48085894734e36e
Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
If possible.
The BSF/BSR/TZCNT/LZCNT Intel instruction does not exist for 8-bit. And
it's a good idea to use the 32-bit instruction instead of the 16-bit one
for that case, to avoid the Length Changing Prefix (LCP).
GCC doesn't allow us to use __builtin_cl[tz]s unless BMI is active,
while ICC generates the same code either way (Clang understands
__has_builtin).
Change-Id: I8de47ed6c7be4847b99bffff141c91603c7024dc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
That implies we need to differentiate between a variable set but empty
and an empty variable. GCC, Clang and the Intel compiler accept -msse2
on 64-bit builds without warning (they also accept -mno-sse2), but the
Microsoft compiler does not have that option.
Change-Id: I54233388ba10994996ae3e749fd829085e8fd7b7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This should help improve the cleanliness of our source code, including
compliance with the C++ standards. They apply to all of our code except
examples (they don't load qt_common.prf).
Change-Id: Ia0aac2f09e9245339951ffff13c94663c1901766
Reviewed-by: David Faure <david.faure@kdab.com>
A QVector<int> uses 50% less space on 64-bit platforms.
Change-Id: I6a2174b04b362188597bc42cad84b7ce2018ea78
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The old code assigned an empty QPoint to elements contained
by value in a QHash that was cleared out in the very next
step.
That makes no sense, because the operations in the loop cannot
possibly cause a re-entrancy into QGraphicsItemCache, which
would be the only explanation for modifying the state of a
death-row object.
While at it, replace the use of the highly inefficient
(and no longer needed) QMutableHashIterator with C++11
range-for, taking care to iterate over a const reference to
avoid detaches.
Change-Id: Ie3eba0f954644a27932666bc9e97f1ca8f36a578
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
While investigating a rendering bug I noticed that methods marked in the
blitter engine as virtual and intended to override a base implementation
where in fact just shadowing a non-virtual method in the raster engine.
Fix that and add Q_DECL_OVERRIDE all around to avoid similar breakage
in the future.
Change-Id: I24c5bb27fb6d3ac57dddb704a14dab7ce153a72a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
A few things were changed in Android 6.0
Task-number: QTBUG-49323
Change-Id: I3112d885881dce541d5c4f3a1561f6c34d75e319
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This was a regression (it worked in 4.8) that was probably introduced
by the refactoring of the accessibility framework in Qt 5.
Now, QPlatformAccessibility::notifyAccessibilityUpdate() is called
regardless of isActive(), so its the responsibility of each
implementation of notifyAccessibilityUpdate() to check for isActive()
where it matters.
Task-number: QTBUG-33303
Change-Id: I0d18f8c1890ef679460408b05e704712b886bf7c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
Change-Id: I071810cc5bc2773df9f6202c4547379d3ecd8b5c
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
Adds a NEON optimized version of the QImage smooth scaling.
Change-Id: I27c0a24d25f66bda3b5c55a8fabdb8b583fcd5c6
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
when embedding a QWindow into a native win32 window hierarchy, dragndrop
is not working, as RegisterDragDrop is not called.
the parent HWND is wrapped via QWindow::fromWinId(), which is topLevel, but
a Qt::ForeignWindow. it's children are not topLevel.
we therefore add a conditon to call RegisterDragDrop on non-topLevel windows
whose parent is a Qt::ForeignWindow
Change-Id: Id2bfa1130857c21566feae9cb10b62b648d86a72
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QColor always uses unpremultiplied alpha, but the new QImage methods
were based on the QRgb versions which might be either. This patches fixes
the two new methods so they treat QColor alpha correctly.
Change-Id: I78a5b875ad4e78ad7fde3b811c6187482b4f6d15
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
The special case was needed for INTEGRITY 5, but select support has
since long been added.
Change-Id: Ice25c5becc9d7dcdf6c5bc9eeac36b70e1b94df3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The variables were always intended to be located inside the #ifdef
Q_OS_INTEGRITY.
Change-Id: I5e223ff8b5b2a686e4b45e2b8eb731e8406a199f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
More specifically, equivalent declarations to this BSD header are
defined implicitly on INTEGRITY, and the header does not exist.
Change-Id: Ib0bd4b22742ef403c83dab0d72c268c1571b8250
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some systems, like INTEGRITY, may support Posix/unix but lack system()
in certain configurations.
Change-Id: I8ef09fac03f8d16d791cdf1073f32b1c7c911776
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>