tst_QGraphicsItem::setPos() was provided with test data
but it was not used.
Change-Id: I8ed2a1ef9940024e4a0e666276f0953706869ef7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Move all widget-dependent benchmarks which were still in gui
subdirectory to widgets
Task-number: QTBUG-23129
Change-Id: I1359f1ea4036cacdfdbe08ff9ecdf1e2c75a005b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When a value is omitted with \omitvalue, the comment must be either
deleted or omitted with \omit .. \endomit. Otherwise the comment is
merged into the comment for the previous value
Change-Id: Ic5cfb20d36853526ae939529b4609712cd0eb341
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QDesktopWidget::availableGeometry()/screenGeometry() was deprecated in
5.11 and replaced with QScreen::availableGeometry()/screenGeometry()
Change-Id: I912a133971c41196f8f49754c28ce92711ff42bb
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QDate::longMonthName()/longDayName was deprecated in 5.10 and replaced
by QLocale::system().monthName()/dayName() in this case
Change-Id: I666cccfa1b8a437cc830804bbe3504511265ea9b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QQuaternion::conjugate() was deprecated with 5.5 and replaced by
QQuaternion::conjugated().
Change-Id: I0176e3db82e9ad793f60e1034a22b11832c8c44d
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
It is actually not the tab width but the width reserved
for the menu item's shortcut.
Change-Id: I801dff0c57256690f61c022156a80cf6ff530c43
Reviewed-by: Martin Smith <martin.smith@qt.io>
Many subclasses of QIODevice have a functionality to block execution
until some asynchronous I/O operation completes. In case we are using
QWinEventNotifier, a typical reimplemented waitFor{ReadyRead
|BytesWritten}() function could look like:
if (WaitForSingleObject(notifier.handle(),...) == WAIT_OBJECT_0) {
notifier.setEnabled(false);
ResetEvent(notifier.handle());
bool res = GetOverlappedResult(...);
...
return true;
}
Despite the fact that the operation ends synchronously, it leaves the
notifier in a state that indicates it has received the event, so its
next call to setEnabled(true) will produce a fake notification.
So, we should reset a notifier's history before enabling it again.
Change-Id: I62a9dd809ce6a7a40e9d8038f2a49299b36f8142
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
i.e. don't show the duplex options if you don't have the duplexer
hardware installed, otherwise you just get a conflict warning
selecting any duplex option which doesn't make any sense since it's
not something you can fix by other means than going out and
buying the missing hardware
Change-Id: Ief3fea5b86ab65b18765887b1c5d6d279ee337fa
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Duplex and Page Size are not shown in the "Advanced" options tag
since they are more important options, this means we were not
taking them into account for ppd conflicts since we never set
their values in the ppd, we do use the new-style cups options for
them when printing
With this patch we add m_pageSizePpdOption and m_duplexPpdOption
to set the values to the ppd struct behind the scenes.
Change-Id: I48bd9fe93d0c08b7b8dd9620a07c56fc79cce13b
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Ensure initialization of m_cupsCodec to nullptr. The codec is checking
the value of m_cupsCodec; but the initialization was conditional before
this patch.
Change-Id: I81751b7743e9956f31f17cead01dc05e268db7eb
Coverity-Id: 188700
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This prevents delivering queued activation events
to windows that have been hidden or destroyed.
Task-number: QTBUG-66536
Change-Id: I4edf86b6c8592751130f836876725c786452933c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
There are a couple of Qt classes where you almost always use the
same signal, for example QTimer::timeout, QPushButton::clicked,
and QAction::triggered.
Simply doing timer.connectTo([]{}) is much more convenient, less
tedious and even fun.
Not overloading connect() as it would be confusing to see the
receiver as first argument.
And not naming it onTimeout, as that's a popular way of doing it in
other frameworks. People would assume you could use on* with any signal.
If we ever have on* it should be all or nothing.
[ChangeLog][QtCore] Added QTimer::connectTo(), a shorthand way of
connecting to the timeout() signal.
Change-Id: Ida57e5442b13d50972ed585c3ea7be07e3d8e8d2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Mention that the current minimal supported version of
libxcb is 1.9.1, amend 1f5d791708.
Remove the specific package requirements for the xcb plugin:
these lists are unmaintained and besides there are build
instructions in wiki: https://wiki.qt.io/Building_Qt_5_from_Git
Change-Id: I4d5b0583a1ba8a355ee1649022845f6c8d520e7c
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
QImagereader benchmark does neither depend on network nor widgets.
Therefore those two dependencies can be removed here.
Change-Id: Ic127b2668e22608774ce5878454f4a96ef591f6b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
qt4Delta and qt4Orientation have been "deprecated" ever since Qt 5.0
(even though widgets continue to depend on those properties). This
is mainly for use in Qt Quick right now, but can be used everywhere
later on.
Change-Id: If0b163766c8ad8efa268edaa4f1ac1e8926f9003
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Adds the feature of adaptive decimal step sizes for the QSpinBox and
QDoubleSpinBox. By performing a calculation in
QAbstractSpinBox::stepBy() we continuously set the step size one power
of ten below the current value.
So when the value is 1100, the step is set to 100, so stepping up once
increases it to 1200. For 1200 stepping up takes it to 1300. For
negative values stepping down from -1100 goes to -1200.
It also works for all decimal values. 0.041 is increased to 0.042 by
stepping once, and so on.
The step direction is taken into account to handle edges cases, so that
stepping down from 100 takes the value to 99 instead of 90. Thus, a
step up followed by a step down -- or vice versa -- lands on the
starting value; 99 -> 100 -> 99.
Setting this property effectively disregards singleStep, but preserves
its value so that it takes effect again when adaptive decimal step is
disabled.
Adaptive decimal step allows values to be easily set to reasonable
levels. If the spin box value is 12000, changing to 13000 often makes
more sense than to 12001. The feature is turned off be default, when
single stepping is desired.
The accelerated property allows values to be changed quickly, as well,
but it is imprecise. Holding down the button makes it hard to land on
an even thousand, like 12000 or 13000. Often you end up somewhere
nearby and would need a second adjustment to get to an even hundred or
thousand.
[ChangeLog][QtWidgets] Add option of adaptive decimal step size for
QSpinBox and QDoubleSpinBox.
Change-Id: I9f286479b821e240c8ea05c238932fc128c582bb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
- Replace xinput2 feature by xcb-xinput, which doesn't
depend on xcb-xlib
- Remove xi2PrepareXIGenericDeviceEvent() that was used to
fix incompatibilty between XCB and libXi structs
- Drop XCB_USE_XINPUT21 and XCB_USE_XINPUT22 defines that were
needed with libXi
Although xcb-xinput was released in version 1.13 of libxcb,
it was quite stable in version 1.12, and the parts that we
use did not change between versions, so require system
xcb-xinput 1.12.
[ChangeLog][X11] The xcb plugin was ported to use libxcb-xinput
instead of libXi for XInput2 support. The -xinput2 configure
option was replaced by -xcb-xinput.
Task-number: QTBUG-39624
Change-Id: I37475b09b2bd7057763345c3f33d8c7751a4e831
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
The destStore64 operation can be expensive, so when the pixels are just
repeating, avoid using it and the composition, and just repeat the
first generated part.
Change-Id: I6e21594a9abecdc245010b956acbaa60e3fb21a3
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Implement QCocoaWindow::isEmbedded() which detects this
property based on parent view and window type. This avoids
having to use a setter function to set the state.
The detection can’t handle all cases, but should be
sufficient for our use case.
Change-Id: I12a5b90b4e4a7e10714f7275ae001e99c9361e2c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
FT_LCD_FILTER_H wasn't defined because we weren't including the header.
To fix it just remove the checks, as was done for Linux and assume
sub-pixel is there. If it's not then no harm done, it won't use any.
Change-Id: I76f50cb17e41621c45c03cb7d5c75c110557ea68
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The added xcb-xinput code was produced by build of libxcb 1.13
with xcb-proto 1.13.
The following parts were removed from it:
- Pointer Barriers API (requires xcb-xfixes 1.9 with xcb-proto 1.9)
- SendExtensionEvent API (requires definition of xcb_raw_generic_event_t
from libxcb 1.13)
[ChangeLog][Third-Party Code] Sources of xcb-xinput 1.13 were bundled and
are available via -qt-xcb.
Change-Id: I43d2f43bee0ba874d099c9fb858e74b0e3edc970
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
...and update bundled xcb sources to libxcb 1.9.1 with xcb-proto 1.8.
These are the minimal versions of libxcb and xcb-proto available
on officially supported platforms (they are present on RHEL 6.6).
Remove support_libxcb_versions_where_xcb_sumof_not_available.patch
and revert it for xkb.c, because libxcb 1.9 implements xcb_sumof().
This change makes it easier to bundle xcb libs from newer versions
of libxcb (e.g. xcb-xinput).
[ChangeLog][Third-Party Code][X11] The minimal required version of
libxcb is now 1.9. Bundled xcb sources were updated to libxcb 1.9.1
built with xcb-proto 1.8.
Change-Id: Iebcd05656c4a5ed5dd95e898d497acef857423f0
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
We report it in the overview, but left no way of controlling it
Change-Id: I1d31f2e31bb32566f47069c3776e41033ffb1891
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The resize event should not be used to draw, as there will be a follow-up
exposeEvent delivered just after, and we don't want to draw twice.
This is how QRasterWindow operates too, except it defers the backingstore
resize to beginPaint() instead of resizing in the reizeEvent.
It's also how QOpenGLWindow operates, which also has a note for the
virtual resizeGL method saying: "Scheduling updates from here is not
necessary. The windowing systems will send expose events that trigger
an update automatically."
Change-Id: I2a9740018508c2eb129149f53237ee8e378c03b1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The updateLayer function is only called when the layer is a
_NSViewBackingLayer instance, which is what the default
implementation of [NSView makeBackingLayer] returns.
Once we move to optionally returning a CAMetalLayer, we need
to use the more generic displayLayer: API, so we do that now
as a first step.
This matches the way we draw and send expose events on iOS.
Change-Id: I49721ff005ca9dfddebff645705f96b5ab46abb4
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
They are faster, and using them makes it paint commands be the most
CPU intensive part of lancelot instead of regular-expression matching.
Change-Id: Ifabf1081c48a83ce089660049051428fd3a43042
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Use QT_CONFIG(regularexpression), disentangle it from QT_BOOTSTRAPPED,
switch it off in the bootstrap build, remove the #ifdefs from
qregularexpression.{h|cpp}, and add QT_REQUIRE_CONFIG(regularexpression)
to the header.
qregularexpression.{h|cpp} are already correctly excluded in tools.pri
if !qtConfig(regularexpression).
Change-Id: I21de154a6a118b76f99003d3acb72ac1e220d302
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Require it in the headers and exclude the implementation from the build
if disabled.
Change-Id: Ida3303f8595f47b469e92d68e8bccc3957d943b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
QRegExpEngine is immutable once created, so we can easily share
them between different QRegExp instances. This requires a QHash for
engines that are currently in use in addition to the cache for
currently unused engines.
Task-number: QTBUG-65710
Change-Id: I165c12a7b065c488ecd14258a7cdfe0e62666632
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Loading empty glyphs in some fonts would cause the application
to crash with an infinite recusion on the stack between qfontengine
and qfontengine_ft:
12 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877
13 0x00007fffee7d104e in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=..., t=...) at freetype/qfontengine_ft.cpp:2096
14 0x00007fffee7d0ea8 in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2078
15 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877
16 0x00007fffee7d104e in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=..., t=...) at freetype/qfontengine_ft.cpp:2096
17 0x00007fffee7d0ea8 in QFontEngineFT::alphaMapForGlyph (this=0x7fb0c0, g=50, subPixelPosition=...) at freetype/qfontengine_ft.cpp:2078
18 0x00007ffff6954395 in QFontEngine::alphaMapForGlyph (this=0x7fb0c0, glyph=50, subPixelPosition=..., t=...) at text/qfontengine.cpp:877
...
Fix this by trusting the freetype fontengine that it could load the glyph,
as the base class anyway can't do better.
Task-number: QTBUG-62331
Task-number: QTBUG-66617
Change-Id: I6c7c24d24ec0f71a66fa519c04a336f276e418f6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The parsing of the DISPLAY environment variable was wrong,
and only worked by accident for DISPLAY=':[0-9]'.
Task-number: QTBUG-62068
Change-Id: I6860e3907c9b1ad6e538d1b5d08628cd306b4aa1
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Generated files should be added to RESOURCES with an absolute path.
Task-number: QTBUG-67011
Change-Id: Ief82b576824df9abd0901970f076e30dfe57b7d0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
If we pass nullptr as a buffer parameter, ERR_error_string uses
a local array with static storage duration, which makes ERR_error_string
non thread-safe. Instead we can use ERR_error_string_n with our
own buffer. As for the size: docs are inconsistent, sometimes
they say 'at least 120 bytes long', sometimes 'at least 256 ...'.
Their code (ERR_error_string implenented via call to ERR_error_string_n)
has buf[256] and so we do. I know this will enrage our Mr. Bot, but I've
removed a stray whitespace.
Change-Id: I4b8cc7b6b9af1a34fc87a760927a493332cdd0a5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This makes the pointer that was in the moved-into object be destroyed
before the return of this function (if the reference count was 1),
instead of letting it live in the moved-from object.
Task-number: QTBUG-66322
Change-Id: I3debfc11127e4516b505fffd151209292bd3adaa
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Since we won't use the high bit of the low 32-bit word at all, we don't
need the AND with 0x7fffffff either. Just cast.
Change-Id: I72f5230ad59948f784eafffd151aa5a7dee995db
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
When the thread that got woken up by release() is supposed to release()
to wake up another thread, we were deadlocking. This happened because we
cleared the bit indicating that there was contention when the first
release(). Instead of storing a single bit, we now store the number of
threads waiting.
Task-number: QTBUG-66875
Change-Id: I72f5230ad59948f784eafffd15193873502ecba4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>