These inclusions are necessary when compiling without pre-compiled headers.
Change-Id: I4345ad3f6882046e4b8f2ba9d315299e280c9f18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When the scroll mode is ScrollPerItem and uniformRowHeights is not set,
the offset has to be calculated by iterating over all items.
Optimize the loop by calculating the last item before the loop instead
of checking at every iteration.
Task-number: QTBUG-61763
Change-Id: I1d4439fe0fc3f32194f5f368c0486e793048d965
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
When painting the background for a QAbstractScrollArea, the brushOrigin
was calculated for every brush type although it was not needed. Since
this can be very time consuming (e.g for a QTreeView with non-uniform
row sizes) it should be avoided when possible.
Therefore check if the brush is a texture and skip the calculation if
it is not the case. Also do not restore the old brushOrigin since the
painter is not used at all afterwards.
Task-number: QTBUG-61763
Change-Id: I66cbe1b796cb5cad4c78e656fb86d199d8e4bde9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
QWinRTBackingStore::flush() was not considering the possibility
that the supplied region may fall partially outside the bounds
of the paint device. This resulted in possible accesses to invalid
memory addresses, causing a crash. This bug was exposed by an update
in ANGLE that was causing a crash when running tst_QTableView::bigMode
with a small screen size. With this fix the function will use the
intersection of the supplied region with the paint device bounds.
Change-Id: I2f0f0f7f5510688bfa1459320a0c146df6be65d1
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
This reverts 4fe68ffbe5,
1dfc16f6da and
9545bee98a2431d4ef4c3449631a5fcb8d9bd57a; this feature has not been in
use for some time, so is just dead code.
[ChangeLog][QtTestLib] Removed support for GPU_BLACKLIST files.
Reimplementations or equivalents of QTEST_MAIN() should remove their
uses of QTEST_ADD_GPU_BLACKLIST_SUPPORT and its _DEFS; they are still
vacuously defined, but serve no remaining purpose and shall be
undefined in due course.
Change-Id: I94ffd5c37ce4e1f7cf25d3c7ae8d40696b74c911
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This reverts commit 341bfcd1ea.
As it turns out there might be use cases where we want to have proper
windowing system event integration with glib dispatcher via g_source_attach().
For example with gtk_dialog_run, where GTK blocks in a recursive main loop.
We want to continue dispatcing our windowing system events during this nested
event loop. Not having a proper glib integration can result in rendering issues,
e.g. when resizing parent window via mouse while GTK-based dialog is shown. Can
be seen on examples/widgets/richtext/textedit/ -> Format (from menu) -> "Color..."
The issue from 341bfcd1ea actually should be fixed inside XCB platform plugin,
by improving integration with event dispatcher. That is handled in follow-up patches.
Change-Id: Icabc6d841a554aefbdd460765a3165d22e65f651
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
xcb_poll_for_queued_event() was introduced in libxcb 1.8.
The minimal required libxcb version was bumped up to 1.9 in
1f5d791708. Before this version
bump we needed the runtime check to support older versions
of libxcb.
Updated connections in the event reader to use the new signal
and slot syntax. Removed threadedEventHandling() method because
now it is always 'true'.
Change-Id: I0bce61fd478a871d35e676239ee5280c4f40be8a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We had this information internally but there was no public API for it
Fixes: QTBUG-4071
Change-Id: Ic7f855e32a6870129e7723a47d31a629e0ea1aca
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This is an opt-in feature to control whether font and palette should
be propagated, and there is no reason this should be removed in Qt 6.
This has been introduced in commit
7293200ace .
Change-Id: I666c09d716bf7033953e98108da3f7711f3bc321
Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com>
Reviewed-by: Martin Koller <kollix@aon.at>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
A few places we didn't check if detach() succeeded including
in reinterpretAsFormat(), where it can be undone.
Task-number: QTBUG-70785
Change-Id: Ibcc8e26e2961f6288eb7a045ae1cb28e59213a49
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
QWidgetTextControl is a base class for controls of text widgets
and widget-specific code should be used in derived classes, so
override loadResource() in QTextEditControl.
Change-Id: I6d829ead0837419530094d19e0ca53a964413e92
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
and fix handling of incoming binary data
Change-Id: I31e97505ad4ff64cf8e380df5d0d6b70c3cd60b0
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Two cases with no code between them don't need a fall-through marker.
The only code in the first case is subject to #if-ery; it either
returns, without falling through, or has no code there. Putting in an
overt Q_FALLTHROUGH() confused a rather dumb compiler ...
Change-Id: Icc034be08859cc1656401af1c62367aec302668b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
This reverts commit 4bdd8d4eca.
It contains an error.
Change-Id: I51052029f001b9e82c2a53de15b4ba354aafdbae
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
These functions have not been used by the font selection algorithm
in Qt 5. Calling lastResortFamily() always gave you "helvetica"
and lastResortFont() would actually crash.
Since we cannot remove them before Qt 6, we deprecate them for now
and update the documentation to give a more accurate description
of how the font matching works in Qt 5.
Note that in the non-native QFontDialog, it tries to implement its
own font matching algorithm and therefore was calling
lastResortFamily(). Since fixing QFontDialog is not within the
scope of this patch, I have just replaced the call by "helvetica"
directly, so that it will continue to behave the same.
[ChangeLog][QtGui][Text] Deprecated QFont::lastResortFamily()
and QFont::lastResortFont() which are not in use in Qt 5 and
did not provide any useful information.
Task-number: QTBUG-60813
Change-Id: Id8fe7bfdd427292ef86bc8405de03cb466b9b62a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Adding standard behavior for text selection, when user want to select text
and there isn't any previous line then selection will end on start
[ChangeLog][QtWidgets][QWidgetTextControlPrivate] Move cursor selection to start
Task-number: QTBUG-69735
Change-Id: If222d37747772f60774f671ffdd273d63cdaf571
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
QList, QVector and QVarLengthArray check the validity of iterators
passed to member functions using isValidIterator(), which checks that
the underlying pointers are in the range [begin, end]. This check is
well-defined when the outcome is positive, ie. when the iterator is
valid. But if the iterator is not valid, and does not happen to point
into [end, begin + capacity], the comparison, which uses normal
operator<, invokes UB.
Fix by using std::less<T*>, which defines a total ordering.
Change-Id: I1e5757789b4b9779f5e3e298e7f2b2dd0b27576c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The version we're using is at least seven years old.
Let's try staying up to date ...
Change-Id: I450a2fc37c22740fe554a81b471bf0fad340498e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use a template on the size of the char[], as suggested by Ville
Voutilainen. This resolves ambiguity about whether such look-ups
should be done via QString or QCborValue (not that it would have made
any difference).
When we come to add mutating indexing of QCborValue, chained
dereferences like map[i][j][k] need to stay in operator[] const
throughout, to avoid detaching intermediates to create references into
them due to using the mutating operator[] on the earlier dereference's
return. So const-qualify the QCborValue operator[] const variants at
the same time, to match those of QCborValue itself.
Change-Id: Ib1652ae9440fe3767a653afa2856b74040210e07
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Likewise have mutating operator[] insert an invalid entry at its
target index, if beyond the end of the array. This makes it possible
to fill an array from high index to low, for example.
Change-Id: If71699c20e2623142214ce2c11c4d6e4a120c989
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This patch adds the missing overload for QRegularExpression to match the
QRegExp one for QPlainTextEdit.
[ChangeLog][QtWidgets][QPlainTextEdit] Added QRegularExpression find()
method overload.
Change-Id: Id156971d3fa0372712bfa8b72a55550942a767e0
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: David Faure <david.faure@kdab.com>
This patch adds the missing overload for QRegularExpression to match the
QRegExp one for QTextEdit.
[ChangeLog][QtWidgets][QTextEdit] Added QRegularExpression find() method
overload.
Change-Id: Ic7be224dcc59fc8d832daddd1999a713b7f04253
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: David Faure <david.faure@kdab.com>
Applications with target SDK version lower then 28 running on a device
with version greater or equal to 28 will cause compatibility warnings,
so default to none when the extract_android_style value is set to
default.
Note that the new value "default" was introduced to allow this kind
of changes in the future, i.e., selecting the best solution based on
some simple heuristics. Adding a new value also keep compatibility and
allows the user to explicitly set a value when needed.
Task-number: QTBUG-69810
Change-Id: I68301716767870ce6de40e45742d9c5fc263ee25
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
For winrt we cannot rely on the fact, that QThread::current will be called
from the correct thread for the first time. The application's main entry
point creates a suspended thread and starts it right afterwards. At that
moment, other functionality (QLoggingRegistry for example) might have
called QThread::current, which set the wrong thread as the main thread. In
order to avoid this situation, the main thread is explicitly set in
QCoreApplication's constructor.
Task-number: QTBUG-66418
Change-Id: I8b6347357a80eb395ae758bd3d420adef0826751
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The height of a line edit depends on the height of its font,
which in turn depends on DPI. So use the DPI-scaled icon size
from a style instead of hard-coded values.
Task-number: QTBUG-65627
Change-Id: Ic1f5af61b0d6346cfbc828817c4a3a39296a41ba
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
There is no need to apply QMAKE_LFLAGS_NOUNDEF in a .pro file that loads
qt_module.prf or qt_plugin.prf, both of which do the same.
Change-Id: I1ec86cddb4d0991becc136f8bd50d6652c885a6b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Make the code consistent with the DomProperty::write() method.
Task-number: QTBUG-70613
Change-Id: I622b4a019a4473823584de97304f8324f2cf0c6b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Check on the application state before requesting activation.
Fixes: QTBUG-70810
Change-Id: I550137dc00209b17f4b3c033287ceef1b871ff50
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The only use is for ::tr so use QCoreApplication::translate
Automatic is not used in dialog/ anyway so there's no translation to
reuse
Change-Id: I0c993e87f46384a0f09d83c9b5e96de5366f1eb9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Normally, when deleting a widget, setVisible(false) calls -orderOut:
and then ~QCocoaWindow will call -release, as a result the window
will disappear from the screen and will be deallocated. But -orderOut:
has no effect on minimized/iconified window. As a result, a 'zombie'
window still can be seen on screen, while all Qt-thingies already
deleted/dead. The similar behavior can be reproduced with a native
NSWindow where we do not call -orderOut:/-close and only call -release.
To fix this - we call -close.
Task-number: QTBUG-70794
Change-Id: Iee8e1fc98018885f1f6e9628d966843d21ac7d38
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
qabstractitemmodeltester.cpp:223:31: internal compiler error: in expand_expr_real_1, at expr.c:9170
Change-Id: I098c1bdf706512c91c649205f4675de0ca374227
Reviewed-by: David Faure <david.faure@kdab.com>
This change applies to darwin. It adds each include path in the
QMAKE_DEFAULT_INCDIRS variable to the qdoc command line with the -I
flag for both the prepare and the generate phase. These include paths
provide access to the standard c++ and c headers, which clang needs
to see. This change should work on all platforms, but it increased
the qdoc warning count on the linuxsystem where it was tested, so
now it only applies to darwin.
Change-Id: I16e2e0d744e2cf68743dc12d39155dda2ece1536
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The documentation for key bindings was a little bit unclear for key
asterisk. Also sync the names of the left and right key was not
consistent (Left/RightArrow - Left/Right)
Change-Id: Icee0821880fcc3ebc2ade939cf80127ebf0976ad
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
In iOS, the system certificates cannot be accessed, so this function
will return an empty list for the default configuration.
Task-number: QTBUG-60407
Change-Id: I0d691a0dd5e6367594e71c7ebccfbdc866d4a3f0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
QTable/QTreeView did not follow the documentation and returned
their needed size with scrollbars within viewportSizeHint().
Then sizeHint() also took the size of the scrollbars into account
when the policy was set to ScrollBarAlwaysOn.
This lead to different results when the widget was shown/hidden and/or
the scrollbar was visible or not.
Fix it by only adding the additional size when the scrollbars are
really visible. Also use header->isHidden() instead of isVisible() in
QTreeView the same way it is done in QTableView.
[ChangeLog][QtWidgets][QAbstractScrollArea] QTableView/QTreeView are
now reporting their viewportSizeHint() correctly taking into account
its scroll bars visibility and visibilityPolicy.
Task-number: QTBUG-69120
Change-Id: If50959a9f7429275e3e33122644c978fb64972ba
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Perform a @Nx image file lookup when loading pixmaps.
Make drawBackgroundImage() handle high-dpi pixmaps,
here the layout calculations needs to be in device-
independent pixels
Fixes: QTBUG-36825
Change-Id: I61e6f53c59f61f3bd88c34a036349e51e8c8ad92
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
When switching between different input sources, we have to update layouts.
Task-number: QTBUG-50865
Change-Id: I0c23c19b79a2102dcc533822b0f861c387582c6c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Previously some of the members would have random initial values. Also,
on updateKeyboard() if we don't find usable uchrData, we should just
reset keyboard_layout_format and keyboard_mode, rather than keep the
previous values.
Task-number: QTBUG-50865
Change-Id: I1297fa55bb1593dd549d0bc122713d5d98f7b1fc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Usually we focus in when we receive a click or equivalent.
QGraphicsScene by default also transfers the focus when you start a
touch on a trackpad or similar. Most of the time this also generates a
synthetic mouse click, so people don't necessary notice. However, at
least on macOS you can configure this behavior. With focusOnTouch
switched off, QGraphicsScene behaves as one would expect on macOS.
Fixes: QTBUG-59442
Change-Id: Ib87112640eef6b77892ad2490d80eedd055e6dce
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Commit 710ff392d9 introduced this fallback code for the case where the
extension was empty. Let's make it happen only in that case, so that the
much more common case of "foo.png" doesn't go through
iconEngineFromSuffix twice, nor through QMimeDatabase (which has to load
and parse an XML file in order to determine preferredSuffix(),
unfortunately).
Found using heaptrack.
Change-Id: Iab6b71e1fa23916029c9e2ba25447a12d70f88a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
A font property specified in the css was used while drawing the QMenu
action text but not within sizeFromContents() which results in a wrong
size of the menu rect used for drawing.
Fix it by mimic the rect calculation from
QMenuPrivate::updateActionRects().
Fixes: QTBUG-70648
Change-Id: I5cf4f8b679c69197437393965c0bc6326f1c6c3a
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This patch enabled json1 support for sqlite3 by defining
SQLITE_ENABLE_JSON1
[ChangeLog][QtSql][SQLite] Enable the json1-extension for
the SQLite3 plugin
Task-number: QTBUG-63498
Change-Id: Iaf1069ff1396c573125a5a3f490c0df5df560468
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
QAccessibleTable(Header)Cell::isValid() did not check if the view is
still valid as it is done in QAccessibleTable::isValid() which can lead
to a crash during destruction when e.g. operator<<(QAccessibleInterface)
is called.
Change-Id: I930bf4c22aa0aa6868f58a8e5d0dd1557f6b17af
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
That allows us to remove custom handling in QMetaType.
Change-Id: Ic09fb96e1a05c6897803811d70aebbc6ea6e4f2e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The matatype should not keep manually maintained list of stream
operators. The patch adds automatic detection for all builtin types
so load and save functions pick the right delegate automatically.
This change exposed some existing anomalies:
- char is enforced to be signed while it seems that just calling
the operator directly does not have that feature.
- [unsigned] long type is always upgraded to [unsigned] long long
- QCborSimpleType doesn't have the data stream operators while
metatype is able to stream it through casting
Change-Id: I51178d6acd97d0585a6089e30ddd6acb2a29af54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Calling update has a cost, and should only be done when the drawable
object changes size or location. Instead of calling update each time
makeCurrent is called, we listen for the appropriate notifications,
limiting the number of update calls significantly.
We still call update on the thread owning the QOpenGLContext, which
is not ideal, as [NSOpenGLContext update] should only be called on
the main thread, but in practice this works. Getting out of this
situation is tricky, and setView has in theory the same problems.
Until those problems have been solved we keep the behavior as is.
Task-number: QTBUG-63572
Change-Id: Ibac9f8be7843f2aa006af6f7ee670bf027122440
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
When the font changes in NSFontPanel, it notifies NSFontManager via
-[NSFontManager modifyFontViaPanel:], which in turn sends the font
manager's action (by default changeFont:) to its target (nil, unless set).
Sending the action in -[NSApplication(NSResponder) sendAction:to:from:]
will sanitize the 'to' argument via _NSTargetForSendAction.
If the argument is non-nill (if we've set the NSFontManager target
explicitly), and we're running in an app-modal session (which we are),
the target is checked for worksWhenModal -- a property which is defined
on NSWindow, and only supposed to be set for subclasses of NSPanel.
Since our QNSFontPanelDelegate class doesn't implement this method, the
_NSTargetForSendAction function will return nil, and the action is never
sent.
If we don't set the NSFontManager target (leaving it as nil), the function
will skip the worksWhenModal check, and fall back to resolving the target
via the responder chain, which includes taking the NSPanel's delegate
into account:
#0 -[NSWindow delegate] ()
#1 -[NSWindow(NSEventRouting) supplementalTargetForAction:sender:] ()
#2 _objectFromResponderChainWhichRespondsToAction ()
#3 _NSTargetForSendAction ()
#4 -[NSApplication(NSResponder) sendAction:to:from:] ()
#5 -[NSFontManager sendAction] ()
...
Since we want to end up in the QNSFontPanelDelegate, we can rely on the
default logic to resolve the target based on the responder chain. But in
case _NSTargetForSendAction will at some point also check the resolved
target for worksWhenModal, we also implement the worksWhenModal method,
to be on the safe side.
Fixes: QTBUG-69878
Change-Id: Ie739d016fe0efd17b3d8a99cc1fb1ace81807aff
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Do not override a custom font with the style default.
Task-number: QTBUG-70276
Change-Id: I58bf43f791aee5409e29459d579725365703e4f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This is a regression from commit 346c15102b, which creates a new QRegExp
in setFilterRegExp, losing previously set case sensitivity property
(i.e. when the code does proxy->setFilterCaseSensitivity(Qt::CaseInsensitive)
before setFilterRegExp).
Interestingly that commit ensured that setFilterFixedString would still
preserve CaseSensitivity, but not setFilterRegExp(QString).
Change-Id: I3d37d001ce6e86dd90e7e07431440a42607172f9
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
The code snippets retrieving the native database driver handles was
using qstrcmp() wrong since that is returning 0 when the strings are
equal. In some snippets there was even a plain char * comparison which
would not work at all.
Fix all the places by correctly using qstrcmp() and replace the checks
for the valid pointer by not checking for 0.
Fixes: QTBUG-70598
Change-Id: I5c53dcfc51c958203fc60fa6a23dd6b27faa1d96
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
QPixmap::fromImage in QLabel paintEvent should use the rvalue
reference overload for efficiency
[ChangeLog][QtWidgets][QLabel] Minor performance improvement
when painting a label with an image
Change-Id: I8ab9bf427c1efc320907c66538e9f8e4011f5586
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Debugging PYSIDE-815 revealed that QGestureManager is instantiated in
the application destruction sequence. To prevent that, add a "force"
parameter defaulting to true to QGestureManager::instance() and pass
false in the destructors and QGestureManager::gesturePending().
Change-Id: I1b76173c926c2a156252b88832b032508d8e8a73
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The detection of multiple mouse button presses was broken in the new
WM_POINTER-based implementation. The bug was due to the incorrect
assumption that the press/release of a second mouse button (while
another one is held) would also send WM_POINTERDOWN/WM_POINTERUP, while
in fact it sends a WM_POINTERUPDATE with the actual event type given
by pointerInfo->ButtonChangeType.
Task-number: QTBUG-70787
Change-Id: Ib6776ab7f3d0b8eb5e832a0c863a15bde456e0dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Includes pop-up windows which are implicitly showWithoutActivating
windows. The QNX platform code was allowing screen to activate
these windows when they were shown.
Add code to activate showWithoutActivating windows when they are
first touched or clicked on. From there, screen handles activation
as it does for any other window.
Change-Id: If443676e497a97724e16037b34d3db1d7c335790
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
When native dialogs become visible, their invisible proxy Qt dialog
blocks input to Qt windows. It is intended for native dialogs which
can't block Qt windows themselves, e.g. on Android. But this behavior
is incompatible with native dialogs which are implemented as in-process
Qt windows, because the proxy dialog blocks them as well.
This change introduces QPlatformDialogHelper::DialogIsQtWindow
style which allows to detect such cases and prevent blocking.
Change-Id: I8f1f741e05d09f2c27192890bcec35fdd2e8f074
Task-number: QTBUG-58116
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: David Faure <david.faure@kdab.com>
The message is not sent to the QAbstractEventDispatcher, so it needs to be
excluded from the list of input messages not sent to
QAbstractNativeEventFilter.
Amends a0a22037cd.
Fixes: QTBUG-70873
Change-Id: Id84d73b46e8954867c06a4ddf5dc9e536ecd897e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
There is no advantage to using repaint() here, so using update will
give a performance improvement.
Change-Id: Icc6a28dfc12dffb8ea3df0300fd14c66c775bf16
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
When a time-zone does a spring-forward, skipping an hour (either to
start DST or to move its standard time), there's an hour that doesn't
exist on the day in question. That hour can be the first hour of the
day, in which case using 0:0 as the default time is broken. So catch
this case and use the first time that day that makes sense.
Fixes: QTBUG-70823
Change-Id: I23dae9320a3cdd2c988841a7db1b111edb945730
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QTimeZonePrivate::dataForLocalTime()'s handling of times in a
spring-forward gap added offsets in seconds to values in milliseconds.
Supply the missing factor of a thousand.
Change-Id: Ic32d87675f902e1c7fd85025fb70c8272a4f2db2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Needed to fix "No toolchains found in the NDK toolchains folder for ABI
with prefix: mips64el-linux-android"
Change-Id: I62d9bae0bf424bb9ba32adce98426245922a841b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The setters of both filterRegExp and filterRegularExpression are
currently normal functions. This patch moves them to slots to make
them usable using the old syntax. This can be done since there are
already overloads for both of them so people using the new connect
syntax would have needed to use qOverload already therefore there is
no SIC.
[ChangeLog][QtCore][QSortFilterProxyModel] Setters of both the
filterRegExp and filterRegularExpression properties are now slots and
can be used with the old as well as the new syntax.
Change-Id: Id5cd9a50fa4a62e2bbd6bd665b44bd25a0402852
Fixes: QTBUG-18113
Reviewed-by: David Faure <david.faure@kdab.com>
The sample output from wildcardToRegularExpression was from an earlier
version of the implementation. This patch fixes this.
Change-Id: I48108add01aafed69490ef2527c1ea6a209b220b
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
When there are overloaded function for one class,
at least one of them mustn't possess \overload command,
otherwise it won't appear at all in doc index.
Task-number: QTBUG-59506
Change-Id: I650a3969cb45c1a5efdfc3a654e01d113c398f16
Reviewed-by: Martin Smith <martin.smith@qt.io>
Moc shouldn't artificially introduce calls to possibly overloaded
operator&. It can cause odd side effects in a user code.
Change-Id: Iaa1b491fe6a1a5ebd4dfa1172359dc792cc7604f
Fixes: QTBUG-68191
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It is not allowed to include files within Qt namespace.
Change-Id: I8b87cdc7093bdf0129acca263316f8ea3a037a90
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
There is not reason why it should be kept in secret. Not having public
accessor forces a user code to keep a copy of the id. Visible for
example in QML (QQmlValueType).
Change-Id: If0de65fb8d91bcd50880c66b5f87c68f6d888dd3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When viewing "Supported HTML Subset" documentation in Qt Creator (in
QTextBrowser), the first table that lists all tags is quite unreadable
(see images). It happens because there is a code snippet in Comment
column for tag "meta" that uses pre-formatted text. Because it should
not be wrapped automatically, it ends up pushing first 2 columns into
their minimum size, which mostly makes them take a single letter per
row.
Task-number: QTBUG-64126
Change-Id: I08bf6f61806d52e7a2f47bdbed1b5950825ce739
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Add a check using GetVolumeInformation() (modeled after QStorageInfo::ready)
within a SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX scope.
Remove old #ifdef used for Windows CE.
[ChangeLog][QtCore][QDir] On Windows, QDir::drives() no longer
returns drives whose media were ejected.
Fixes: QTBUG-69029
Change-Id: I2d4a32e9281ccf3c0f2ebfa427122609aa4f327f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>