For example:
../../include/QtGui/5.7.0/QtGui/private/../../../../../../../../qt5-dev/qtbase/src/gui/painting/qpaintengine_blitter_p.h:67:18: warning: 'end' overrides a
member function but is not marked 'override' [-Winconsistent-missing-override]
Change-Id: I2845d8e4b5a7e11c57ac1933a6d152df1ef5d07f
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
[ChangeLog][QtCore][QProcess] Added method
setCreateProcessArgumentsModifier to QProcess on Windows to enable
users to intercept and modify CreateProcess parameters.
With such a modifier, calling code can decide whether to inherit
handles, modify the STARTUPINFO struct, and pass its own
combination of process flags to CreateProcess.
Task-number: QTBUG-390
Task-number: QTBUG-6917
Task-number: QTBUG-9350
Task-number: QTBUG-24619
Change-Id: I14757dbbacfebb1c89f52402d36fba0ba9c45f3a
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We need to pass the correct connection and we need a specialization for
reply pointers. Also, there is not much of a point in first creating
a QString from a QByteArray, only to retrieve a QByteArray again.
Change-Id: Ia1bb5655f6229638e3bd2339acadeffc80561b9e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Move some code (like registrations of meta types) from init() to
initTestCase() in the process.
Change-Id: I57db5156647cfadab554fbed853b2e68b2815f3b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
When a QLineEdit is readonly there's a discrepancy between key press
events and shortcut override events. For instance, presses Ctrl+C
copies the text unless there's also a shortcut for the same key sequence.
In this case, the shortcut override event is not handled, and no text
is copied. Fix it by splitting the handling of shortcut override
events between "read only" access (copy, select, etc.), which still
makes sense on a read only line edit, and write access (paste, ...)
which doesn't.
[ChangeLog][Important Behavior Changes][QLineEdit] QLineEdit will
now accept certain shortcut override events even if it is read only.
Change-Id: Ie5b048259b99a1eff0581129e3ad97f27a88fe86
Task-number: QTBUG-21217
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
The documentation says that we scroll one pixel, but changing the
behavior in 934f062203 to do that
was not well received.
People were relying on the undocumented behavior - and the new behavior
was considered to be a regression. (Nobody called setSingleStep since
Qt in many cases provide a reasonable singleStep - which implied that their
programs scrolled with 1 pixel which was quite slow). Furthermore getting
the old behavior (auto set of single step) was nearly impossible.
However the revert (done in 0e69230d02)
gets us back to QScrollbar::setSingleStep not working in pixel scroll mode
(even without it being documented - but we should also have a working API
rather than documenting that it is not working)
The previous approach was directly prevented Qt from changing
single step (on e.g resize) at all. This patch only prevents Qt from
changing when a user explicitly has called the function
QScrollBar::setSingleStep (in pixel scroll mode).
That is we expect that calls to setSingleStep means that the user actually
wants to set the singleStep and doesn't want Qt to control that value.
Furthermore it is possible to switch back to the automatically adjusted
singlestep with QScrollBar::setSingleStep(-1).
[ChangeLog][QtWidgets][QAbstractItemView] QTBUG-7232 - In ItemViews
when scrollMode is set to scrollPerPixel, it is now possible to
change the single step. Qt will automatically adjust the single step
until setSingleStep is called. When setSingleStep is called it will
however respect the set and stop doing automatic changes of the value.
Calling setSingleStep(-1) will switch mode back to automatic adjust.
Task-number: QTBUG-7232
Change-Id: Ibfe0caa9751d3bcc11bfc6e0654a3d1ac35ac8ae
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
The pixman drawhelpers are implemented using GAS syntax, which the
Clang assembler doesn't handle, nor do they work on 64-bit ARM, so
we disable them selectively. They are only used for 16-bit surfaces
anyways, so it not a big deal on iOS.
Change-Id: I78417fabd7f671f9c5d94b6e5fa5ce10d3fc1d27
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
d79ae90466 accidentally removed the check
on the driver pointer before dereferencing it. This causes a segfault
when deleting a result object after its driver has already been deleted.
This situation can arise when a database is removed, explicitly or
probably also upon unloading the driver plugin, while related
results still exist. The problem affected
qttools/tests/auto/qhelpcontentmode.
Task-number: QTBUG-49836
Change-Id: I8ce8f8a5e27d787309ac2ff644b388e333d76435
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
... because it's useful for non-primitive types.
Except for index-based loops, these were the only two
remaining instances in QtBase.
Change-Id: I0fafa502d78a70f98b4a90f4d3c7fdfbb401a90f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The code for _q_clipboardChanged comes from some ancient time
(Qt 3's QLineEdit::clipboardChanged, subsequently refactored in Qt 4
and Qt 5). The best part: it has always been a slot doing absolutely
nothing. Get rid of it.
Change-Id: Icc2c71920377d069529bb7ed7c40c15f46fbb455
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Like on some BSD systems, the member of the ifreq
structure is called ifr_index and not ifr_ifindex
on Haiku OS.
Change-Id: I273de0c703b1c89dbac537c68e52db219d2da50e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since the commit 9f83e75d3fbfc01a5ca8d87b4c33ca1ad848387d we can build
the release packages with Q_ASSERTs still enabled. As this feature was
targeted to embedded platforms it would be nice to enable Q_CHECK_PTR
macro as well.
Change-Id: I2d549d92b7196935665d927e6aaed3e9f31593b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][State Machine] Added constructor overload that
takes a pointer-to-member for the QSignalTransition.
Change-Id: I80ac6e16d0edf7d2ab09882b6f6db4cbd73364e1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
... and simplify it:
De-duplicate ++c by moving it from every case into the
switch statement, undoing it only in the default case.
Introduce a small helper function can_consume() for dealing
with the two-letter length modifiers.
Also return the result from each case instead of storing
it in a temp variable.
Change-Id: I28a527920aabba067ebb2152a67995c8f2ec7ae7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.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>