This patch contains:
- some cosmetic changes to make example look more like
modern C++;
- UI initialization code and SSL signals handling were split
into separate member-functions;
- useless checks 'if (socket)' were deleted;
- widget's minimum size is now fixed + font size
in 'CertInfo' dialog increased to make it readable.
Change-Id: I7aadb78896832a989494d280d6da0635045f948c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
The QML API allowed only separate setting of geometry parameters which
causes flickering when all parameters need to be changed.
By exposing the setGeometry function it is possible to set all of these
at once using an imperative setGeometry call from JavaScript.
Note that bindings for x/y/width/height are still evaluated
sequentially, resulting in four calls to the platform window's
setGeometry. This patch only introduces an imperative workaround for
that issue.
Change-Id: Ie9b0d3c39434740e50757ba7cff0385ae80f47f4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reduces duplication of logic and allows other primitives to be
built on top.
Change-Id: Ia100014cfb0c09ac2f47c3a156d0c76f0fddafa8
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
When tabbing/searching for the next focus widget, the current
code would check if the next widget in the focus chain
had a focus proxy, and if so, ignore it. The exact reason
for this behavior is not clearly understood, but some widgets
(e.g QSpinBox) has children (a QLineEdit) that sets the parent
as focus proxy. If we didn't ignore children with focus proxy, tabbing
from a QSpinBox would lead us to find the inner QLineEdit, which
(because of its proxy), would lead us back to the QSpinBox. And
therefore not be able to tab out.
But ignoring the focus proxy has other problems. Normally a focus
proxy is the next sibling to the widget it acts as a proxy for, and
tabbing to the widget will therefore appear correct. But if the
focus proxy is not the next sibling, the logic will fail, since
the tab would anyway give focus to the next sibling. This becomes very
apparent if the focus proxy is a child of the widget, since then
its likely that the focus proxy is not the _first_ child among all
the children. So tabbing to the parent would not give focus to
the proxy.
This patch will change this logic so that you are allowed to tab to a
widget with a focus proxy. But we check that if you do so, you actually
end up moving focus in the right direction. If not, we ignore it like
before. This will ensure that we tab correctly when dealing with focus
proxies, and especially when focus proxies are used to construct
compound widgets.
[ChangeLog][Widgets] When tabbing to a widget with focus proxy, focus
will now be given to the proxy rather than just being ignored.
Task-number: QTBUG-10907
Change-Id: I66d1da5c941fdd984bb2783cc355ca65b553b5dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Factor out searching for the deepest focus proxy
in to a private function. Other than being called
from QWidget::setFocus(), this function will also be
used in subsequent patches.
Change-Id: I4450a42e362eccb64f8a88c7ea83b415101973b9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
QHostAddressPrivate is one QString and 24 bytes, allocated on the heap,
which is WAY too heavy for something that fits into 8 bits. So instead
of storing the expanded netmask inside QNetworkAddressEntryPrivate, we
store the simple prefix length and calculate the mask only if asked.
Change-Id: Ie05c6480d8a44fda817ffffd14d9ad4707aa8a92
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When I introduced QNetworkInterface in Qt 4.2, I didn't understand the
relationship between the prefix list and the unicast address list in the
IP_ADAPTERS_ADDRESSES structure. Turns out, there isn't a (direct) one
and the actual solution didn't come along until Windows Vista, adding
the prefix length to each address.
Change-Id: I6a556cca551116d77c7edf43f9c651dacb75348f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Commit 2589111dc0 removed the dynamic
function search, but did not remove the offsetof checks.
Change-Id: Ibd2b5263f7de551f47fe137dbe1a1b7b7cd71934
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Our iOS deployment target is now 8, so this code will never be executed.
Change-Id: I7dd4001c01d7c8c2e8e977753cb3fa246b19ce06
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
This allows us to retrieve the current OS type without constructing an
instance of the class, and it's also constexpr.
Change-Id: I8b32a1aebeb8139fe3fcf146e5de558fa1060bb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Now that we accept STL datatypes in our ABI, expose a factory
function that takes a std::future<void>, and hide the QThread
subclass in our implementation. This also solves the problem
of a non-exported polymorphic class that would generate duplicate
vtables / typeinfo in all TUs.
Change-Id: I70a5c301e7c589de1a4a189db39b86b956d1ba0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
"generate" is better than "get", and we already have "generate(it, it)"
which uses std::generate(). This changes:
- get32() → generate()
- get64() → generate64() and QRandomGenerator64::generate()
- getReal() → generateDouble()
Change-Id: I6e1fe42ae4b742a7b811fffd14e5d7bd69abcdb3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It was an oversight in 83729ad7a1
that this constructor is still in use in other modules. And in fact
we cannot remove public constructors without deprecating them first.
Task-number: QTBUG-63355
Change-Id: I64dbf9bc54c0bf6be7157f047b548d3b2c5bc2ed
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
It was already revamped a fair bit 2 years ago
Replaced Q_NULLPTR with nullptr.
Added a minimum size to the progressbar dialog.
Update the label if a redirect is rejected.
Improve the overwrite dialog message.
Replaced the documentation image.
Task-number: QTBUG-60628
Change-Id: I0fb70d90e1d6ca84a8307bd6ea4ea1ce220feeaf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Fix copyrights, update signal-slot connection syntax, use some simple
C++11 features (member-initializers, 'auto'), delete some data-members
(where a local variable is enough), where possible - use data-memebrs
as sub-objects (instead of heap allocated).
Task-number: QTBUG-60628
Change-Id: Ia440d8471eafb47481c0d010175c907037bae841
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Previously we pretended that there is only one touch device; but in fact,
different trackpads have different deviceIDs, and this may be useful
in some scenarios to tell them apart, as on other platforms.
So far we don't expect to get touch events from actual touchscreens
though, because macOS only turns single-touch events into mouse events
and does not interpret gestures on touchscreens. So there isn't API
which can distinguish touchscreens from touchpads as far as we know.
QCocoaTouch::getTouchDevice() takes the type as a parameter, just in
case this changes some day.
Change-Id: I56228471363235c5d0cc2a55a35a3c3288f3b1a1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
QtQuick is beginning to have a use for this, to distinguish native
gestures which come from actual trackpad rather than from the "core pointer".
It might as well use a real device ID instead of making one up,
as it has to do for the core pointer.
So far on macOS, the device ID isn't a real one; but that can be fixed,
as the qCDebug lines demonstrate (different trackpads have different IDs).
Change-Id: I5841deb1c4cc0b77a3b1df70904f70b3d2d71853
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
The libraries are now 'libssl-1_1' and 'libcrypto-1_1', not 'ssleay32' or
'libeay32'. 64-bit versions also have -x64 suffix in their names.
Task-number: QTBUG-62692
Change-Id: Ic15bf8f8271d0f6266cb9d2143e292ddba643ded
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Introduce nullptr and override. Change the ready/valid columns to
use check marks. Right-align the numerical columns. Add a shortcut
to refresh. Sort by path, making sure the root volume is first.
Task-number: QTBUG-60635
Change-Id: I74cda7647f544902aaf4d2a0ab76986f1523aa6f
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
This autotest is blacklisted as it is deemed flaky.
Task-number: QTBUG-63260
Change-Id: I3e83bcb0dbbe4fbf9d5c16f764fbeeca2b52d10c
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
We haven't hooked on any of the properties to tell ibus IMs the type of
field or that it should be hidden, so hide it like is standard.
Change-Id: Iaa64c669f7162b60c16971ec962101b974108e65
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Change-Id: Iffb81a37a517e58d48757d82f93f20e8c5100033
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This file uses functions declared in this header, and it is not pulled
in transitively on all platforms.
Change-Id: I6654118883a8dc22dacf1beb7b9b1c662719d25c
Reviewed-by: Tuomas Heimonen <tuomas.heimonen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Pointers belonging to different arrays must be compared using
std::less.
Change-Id: Ib77af7b1b2da58d7243fa77273a8a45ee9035a1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
One example is VxWorks.
Change-Id: I253df715a9417c1f9cede79b1e1860924e0da8a9
Reviewed-by: Tuomas Heimonen <tuomas.heimonen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We obviously should check the variable we're about to get the data from.
Amends 1216f596bd.
Change-Id: Ibe87138b9c9aa99837b4fbf3769cd26ca1aaacb9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
We don't need to bother the network test server with a TCP SYN packet.
All we need is for the local operating system to figure out the IP
address it would use to send a packet to the test server. We can do that
with QUdpSocket.
Also, the network test server hasn't been called "fluke.troll.no" for
almost a decade.
Change-Id: I209fcd5dbc2b4e5381cffffd14df65ccc7133247
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Fix the 'shared' OpenSSL code for those our users who build with QSSLSOCKET_DEBUG
defined and OpenSSL 1.1 detected: the preprocessor-excluded fragment is using old
API. Also remove never used in this file (and commented out) macro.
Task-number: QTBUG-63170
Change-Id: Id24ccf2955f0a65e4f1dea1ecb06e10245105080
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Fix warning of missing F key in Annot directory. The F key needs
to have the printing flag (bit 3) enabled and all other bits disabled.
(Clause 6.5.3 in ISO 19005-1:2005)
Change-Id: Iddba6b71f516aca75cd573584aa184c1b808863d
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
If MOC_INCLUDEPATH exceeds a certain limit, its content is written into
a file named mocinclude.opt, which is then passed to moc as a response
file. That moc parameter was not properly quoted, and the moc call
failed for paths containing spaces.
Task-number: QTBUG-63197
Change-Id: Ib0542d80ce1bab239e0e6b6e24fadd11007b1846
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Changed signals and slots to new syntax, used nullptr and replaced
foreach with new C++11 range based for loops.
Also fixed a few minor flaws.
Task-number: QTBUG-60633
Change-Id: Ice4030133971912f96752d9d84c638c70fd73e35
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>