This fixes qdoc warnings introduced by 67d5f79fe6.
Change-Id: I4b199e6243d9a7706befe4bc9549c78c11026d9e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
We're relying on C++11 since a while, so lets not advertise creating
lists of strings with operator<<() anymore.
Change-Id: I14a3442ff852ac2c106d90c63504eb9ebb737609
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
When the QHeaderView is resized (e.g. due to setFixedWidth), the views
are not notified about it and the layout is not updated which leads to
a wrong painting. Therefore we have to listen for QEvent::Resize the
same way as when the font or style changes.
Task-number: QTBUG-67532
Task-number: QTBUG-34095
Change-Id: Id70daf083e0dddc2500d8e5aad47513266887a2c
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
We need to take into account the presence of a possible ',_debug' suffix.
Change-Id: I5655394b78723bbc6cc32e56849acc2366d288e2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This patch enhances QTextImageFormat with a property for image quality.
Default will be quality of 100. The user may set different values with
setQuality(int). QTextODFexport will export images as png if quality is
set to 100 and as jpg with the compression quality set to the given value
if smaller than 100.
[ChangeLog][QtGui][QTextImageFormat] Adds two new functions to the class:
setQuality(int=100) and quality(). Is currently used by QTextODFWriter to
determine the image type and quality when exporting images to ODT files.
Change-Id: Iaa8ec0246aaba004d98c9e8c66609795101519a9
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Fix wrong QRegExp in Custom Sort/Filter Model Example and replace it
with QRegularExpression.
Task-number: QTBUG-61129
Change-Id: I515474ee6985d36195d90dcd93876ba28a83bccc
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Once connection is established the socket emits 'connected', and then
you can start writing. But it will end up in the write-buffer and won't
get sent until 'transmit' is called. Some code (e.g. QWebSocket) relies
on QSslSocket transmitting once it's encrypted. This is done in the
OpenSSL backend but was not done in the WinRT backend.
Task-number: QTBUG-56558
Change-Id: I8cf5d3257f3597a4bb80f35369490a3816506a34
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Fixes the default C version used with gcc < 5
Change-Id: I948dece961caed8e6b181e1c6e6b9dc43c46583e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change the documentation to use nullptr and modify the related code
also while at it.
Change-Id: I6264a254828159cda54e90393835ea04e131350b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
'QPrint::Color' should be returned in case 'ColorModel'
is NOT set to 'Gray'. However, the logic was inverted
before, since 'qstrcmp()' returns 0 if the two strings
match.
Also, eliminate a redundant condition:
The left-hand side of the '||' already makes sure that
'colorModel' is non-null, so there's no need to check again.
(Corresponding cppcheck warning: "Redundant condition: colorModel.
'!A || (A && B)' is equivalent to '!A || B'")
Change-Id: I965c29e8c020bc9c47a53678e23d94f05be3fd53
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Use the match with the least modifiers (prefer Shift+9 over
Alt + Shift + 9) resulting in more missing modifiers.
Task-number: QTBUG-67200
Change-Id: I90463c0dfaadda29dcd24a08ba35c91fac8bd04c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Add utility functions to QWindowsContext input messages sent to
native event filters (event dispatcher and window system interface).
Do not send input and similar events to the event dispatcher since
QEventDispatcherWin32::processEvents() also sends them.
Note though that QEventDispatcherWin32 does not receive all windows
messages.
In QWindowsKeyMapper, send the WM_CHAR/WM_IMECHAR events from
where the messages are removed.
Task-number: QTBUG-67095
Change-Id: I5f61294fcb3aee7e0eacd840a2010d128cd02a5d
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This generalizes what qnsview_cast() does to any Objective-C class.
Notice that this is a loose cast, using isKindOfClass: instead
of isMemberOfClass:.
Change-Id: I745f548e474f2f9eef89f370d7d45496f0c51434
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The manually maintained qrc file was missing corrupt_clut.bmp among
others.
Change-Id: I8916ba76a63950de03f25814d893306d046d273d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
When a key press is received which is not spontaneous then it needs to
be manually sent as a shortcut override event to ensure that any
matching shortcut is triggered first. This enables emulation/playback
of recorded events to still have the same effect.
[ChangeLog][QtWidgets] Sending a key press event with sendEvent() now
sends a ShortCutOverride event first to the widget to trigger any
shortcuts set first.
Task-number: QTBUG-48325
Change-Id: Iafcc2cdb1773bffe89edaeb0abc44cd5a51088e6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
[ChangeLog][Third-Party Code] Libdbus-1 code in Qt D-Bus is now properly
documented. The code is licensed under AFL-2.1 OR GPL-2.0-or-later.
Change-Id: I38bd6f38175562fff03ae84fc7a5c435de4cb972
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We use nil for Objective-C null pointers and nullptr everywhere
else, including CoreFoundation and similar opaque types.
Change-Id: Id75c59413dec54bf4d8e83cf7ed0ff7f3d8bb480
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We extend QCocoaNSMenuItem with separator items capabilities
and use it as any other custom item in the app menu.
Addition and removal of items in the app menu remains very
basic because that menu doesn't exist as such. Instead, it's
hinted through the QAction's menu role.
Change-Id: Ia13bfcc008c75e49fd21705d2528da5a85ed1c73
Task-number: QTBUG-63756
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This is in accordance with the macOS HIG which state that, "in general,
a Preferences menu item should be the first app-specific menu item." See
https://developer.apple.com/macos/human-interface-guidelines/menus/menu-bar-menus/
Change-Id: Ie2b6ce274995a7d0b0e934c6a68241500a39f7aa
Task-number: QTBUG-63756
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We start by setting the menu item target to nil.
Then, -[qt_itemFired:] action is now in QNSView, which itself is
naturally inserted in the responder chain. This removes the need
to track and change the menu item's target/action when we're
displaying a native dialog. Part of this is possible because we
now derive our own QCocoaNSMenuItem class from NSMenuItem.
We use -[respondsToSelector:] to decide whether the QNSView in
the responder chain should respond to cut:, copy:, etc. And we
only return YES when the view is first responder. The invocation
to these action is forwarded to the same views' -[qt_itemFired:].
Message forwarding is done via forwardInvocation:, but experiments
have shown that it can be done by the sole means of respondsToSelector:
and direct invocation from cut:, copy:, etc. See the usage of the
macro QT_COCOA_DYNAMIC_MENU_ITEM_ACTION.
Menu validation also happens in QNSView and looks for modal windows.
Therefore, -[worksWhenModal] is no longer necessary. Also, since the
target is no longer set, the logic as documented in NSMenuItem.target
won't work anymore.
Most items from QCocoaMenuLoader also become QCocoaNSMenuItem and
get the same target/action, which removes a bit of duplicated (and
outdated) code. A particular case is the Quit item, which gets the
terminate: action set until an actual menu item is added.
Tested with texedit and standard dialogs examples together with
menus, menurama and bigmenucreator manual tests.
We also renamed some functions and variables to reflect common
naming practices.
Change-Id: I9b51d3be3467a666d8c3dcf8585edbc821e0282e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This change improves the appearance of MDI child windows in a High-DPI
display for applications using the WindowsVista style, with the
Qt::AA_EnableHighDpiScaling attribute set.
Task-number: QTBUG-64708
Change-Id: I5e9fbd23809b440ffd33e4948c83d115cc6e1910
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Wrap current example code snippet in std::function as a work-around,
as suggested in comment to QTBUG-61145 (see history tab) with the same
issue.
Task-number: QTBUG-67603
Change-Id: I6875b31d8e983e234b88384c7d76917ac144f953
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QLocaleData::findLocaleData() was checking its given data with likely
tags filled in, but not checking it without; then it went on to blot
out some of the given data with Any, checking first with likely tags
then without. The lack of this second step with the full data seemed
misguided.
Change-Id: I58ee09f5a2a3355446333fc9985a2fb818491e2f
Reviewed-by: Jason Erb (Suitable Technologies) <erb@suitabletech.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The Likely Subtags section (4.3) of Unicode TR 35 stipulates a quite
specific order for trying the various candidate lookups; we had two of
them swapped and were missing the last.
Change-Id: Idcd8e7f7c9849be3ee805245e7746435e992c1db
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
In 5.11 robustness was added for nvidia drivers, this patch extends
that to other opengl drivers, and fixes the reported format.
Change-Id: Ia81934c3bcf13e7300fb4e75674ea63317039870
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
QNetworkRequest is already aware of the Last-Modified header but
has been lacking support for the If-Modified-Since, ETag, If-Match
and If-None-Match headers. These headers are used with HTTP to
signal conditional download requests.
See RFC 7232 for more information.
Change-Id: I248577b28e875fafd3e4c44fb31e8d712b6c14f1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
the 'info' variable was re-used too early. make a new one 'infoargs'
instead.
Task-number: QTBUG-67286
Change-Id: I77881ecbfce338d653358c5e5edac84e1c0c7de3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
In iOS 9.0, the original application:openURL function was deprecated
and replaced with a newer one. As iOS 9.0 is no longer supported we can
safely switch to the new one. This is also required to prevent a crash
when the LSSupportsOpeningDocumentsInPlace and UIFileSharingEnabled keys
are set to true in the Info.plist file.
Change-Id: I59a7ee82e3ddb2777ef78e28b964ef8666c629af
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Sometimes it is hard to find the line, when the warning
"QObject::connect: invalid null parameter" appears in the log.
This change adds the class names of the sender and receiver
to give a hint where to search for the wrong call to connect.
Change-Id: I00cead7d943f96d60f198cb3f0bed34ba10285c5
Reviewed-by: André Hartmann <aha_1980@gmx.de>
And add CoreServices as framework dependency.
The standard pixmaps depend on CoreServices, or LaunchServices
to be accurate.
Change-Id: Ib97e521f3e950586a352bf9b30f827ce3fda8efd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This brings back Qt 4 behavior. The difference is that we only
ignore modifier-only key events, as it's done natively.
Task-number: QTBUG-49462
Change-Id: I02f2313e1164ba185336d80ac5cc16ce6d883b79
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
It use to be yellowish in the past, but modern versions
of macOS show it light gray.
Change-Id: I8cca5cbb37c73a6dfc79e633a746b9a7d7bced05
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Because we use toggle NSButton for selected tabs, the inactive
appearance doesn't follow what NSSegmentedControl would have
shown. Therefore, we fall back to our good old habits, i.e.,
render on a pixmap and do some pixel transformations.
Change-Id: I838a2f23abee5846219ba67328c79fa8cc359a9b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Change QMacStylePrivate::drawNSViewInRect() signature
to remove all the unused parameters.
Reuse recent tab direction functions where appropriate.
Includes the infamous outter -> outer fix.
Change-Id: I8f92d79d8a6c3b5903bfbb13293afb6f72a5340b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
QTestEventLoop (conveniently so) takes care of timeouts thus no
external QTimer/handling logic needed at all.
Change-Id: Id65ea928daec1e7d9380107e63916896f19d3d14
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The idea was probably to ignore it since macOS already provides
accessibility for a menu item in its native system menu. However, a Qt
Quick Controls2 Menu will instead show a non-native menu, which should
not be ignored.
Task-number: QTBUG-63522
Change-Id: Ib5ae16ad991ebd7a18fa73b8f576f20b1c14d4c8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
In order to be able to build and test a testcase on an iOS device it
needs to be a bundle. So the app_bundle config should only be removed if
the testcase_no_bundle is set. This is already done by testcase.prf.
Task-number: QTBUG-45211
Change-Id: I4f16ea832ccff2a5db5fed0050fa0344b4ac9ad6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>