setDoubleStep works in the same manner as for setIntStep in that it is
just available for input dialogs getting a double.
[ChangeLog][QtWidgets][QInputDialog] Added setDoubleStep to enable
changing of the step amount for getDouble().
Task-number: QTBUG-17547
Change-Id: I5cabcfceb23324f8045f2b1e49017644418db01a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
We know the resulting screen based on the geometry mappings we now do, so
no need to wait until expose to deliver the screen change.
Change-Id: Ibb84948ab091d8f74d31cdd2d300b381e2e1e7cc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The tests (and Qt) should be able to handle occlusion of windows.
Change-Id: I5e93e032f6a5282f19a20d0e230863d2a165f4e3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Several tests are not valid for 1.1 anymore:
1. SSL2 was removed, but there is no OPENSSL_NO_SSL2 and the 'protocolServerSide'
test is trying to use QSsl::SSLv2 and thus is failing.
2. We now use the generic TLS_server/client_method instead of version specific
methods we have in pre-1.1 back-end. So, for example, a client socket with
QSsl::TLS_V1_0 in its SSL configuration will be able to negotiate
TLS 1.2 if our server socket wants it, while with TLSv1_client_method
(OpenSSL < 1.1) our test was expecting SSL handshake to fail.
Change-Id: I18efd5921c79b189e4d9529be09299a361a8a81d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
On VMWare Workstation 12 it will indicate OpenGL 2.1 support but it is
not sufficient enough as it is lacking things needed to use QtWebEngine
without crashing. Falling back to d3d9 works fine in this case as d3d11
also crashes.
Change-Id: I404867045a74f37d3ecc7e04e669dd305570deeb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Older versions of CMake expanded `@var@` in CMake code, so this could be
expanded at this location rather than the `string(CONFIGURE)` call if
`module` were set inadvertently. Instead, hide the literal `@` symbol
from CMake, but not from the string.
This avoids a CMP0053 warning for projects using Qt5 with a minimum
version set lower than 3.1 and silent bugs with projects explicitly
setting CMP0053 to OLD.
Change-Id: I0e4a86469fdf69b8706387799ab9b17498b8d1ca
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Qt 5.9 introduced a QByteArray::toHex() overload that
inserts a separator char after each byte. The function
colonSeparatedHex() could not be replaced completely,
as it skips leading zeros also.
Change-Id: Ic1d5d4771a0a5171f0e7e9813b83eb4c1f59f085
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
It's a Linux-specific call that was added to the kernel in pre
historical times (before Git). Sqlite3 uses mremap(2) but it has its own
checking. Nothing else in Qt uses this.
Looks like the last user was the QPF font engine, removed in commit
d7e424ee66 almost four years ago. And
that's considering that the QPF font engine wasn't in use since Qt 5.0
because QWS was no more...
Change-Id: Idaa189413f404cffb1eafffd14ceee7488514c1d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This was accidentally removed when we revamped the document
mode tabs appearance.
In retrospect, we should also consider adding CE_TabBarTabIcon
so that we can set the relative position of the icon w.r.t.
the tab title.
Change-Id: Ic8c3a69c31837018bfdd60f8084120cae47e91f8
Task-number: QTBUG-61092
Task-number: QTBUG-61742
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This removes the single occurrence of HIThemeGetTextDimensions. Since we
have access to the actual platform font through QPlatformTheme::font(),
it's possible to use QFontMetricsF instead.
We also cache small and mini system fonts to be reused in other places.
Change-Id: I799c61eef0a2a6880a1c51aa7d3105c7e5b0ed4f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Removes the last occurrence of HITHemeDrawTextBox.
Change-Id: I13804a16672c692a4405d8b2f9d5fb6a132a6b7b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We don't need the calls to HIThemeDrawTextBox after all. These
render simple text nowadays, so we can do this with Qt APIs.
Also fixes TabBarPalette in QCocoaTheme.
Change-Id: Ib9436be83f03bd62fca40feb110a86602794c5b7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Task-number: QTBUG-13925
Task-number: QTBUG-18788
Change-Id: Id155ea26824e1cb470cc6174704436d99fb7ac87
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Bail out of QStorageInfoPrivate::doStats() should an error occur
and set the ready/valid flags accordingly.
Task-number: QTBUG-6039
Change-Id: Id5354b31329d951599ae991aa7edde0515c90514
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There are really only two cases here, where the difference
is the coordinate system of the window position.
1) Child QWindow and embedded QWindow:
The position is relative to parent view/window origin.
2) Top-level QWindow:
The position is relative to screen origin.
Change-Id: I867133a5adbbf3a690f574aec06b70c2bc64ad95
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The classes have recently been cleaned up to be ready for being made
public, and this change adds the final documentation. The classes are
already used in qjson, qtdeclarative and some image format decoders.
Change-Id: Ib6df89f1119162c5bad7a08e9b6f843a2db4040f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There's no longer any reason to call out from QCocoaWindow to QNView for
this, as the geometry events from AppKit are delivered directly to the
QCocoaWindow. Most of the data used in the implementation are coming
from QCocoaWindow anyways, and this enables geometry events for foreign
windows in the future.
Change-Id: Idd724d078e9981304dcbe6742b9ddc71640a2350
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Pass SHGFI_USEFILEATTRIBUTES/FILE_ATTRIBUTE_NORMAL to ShGetFileInfo() in
case a file does not exist to obtain an icon.
SHGFI_USEFILEATTRIBUTES cannot be used unconditionally as it
breaks custom directory icons.
The functionality is then on par with XCB which obtains icons
via QMimeDatabase look-up.
Task-number: QTBUG-25319
Change-Id: Icd894d97fd8d1a2c4d5d39e86afe89843e6720c4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Now the parameters from the prototypes are used as default values and
the graph file can overload them.
Change-Id: I9a8a73963c7e578bd0a34e96f76f147a12224f4f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This will allow to make the prototypes more extensible when referred to
from a graph file while providing some sane defaults.
Change-Id: I1ae10182427d8a7d29c51a64e19e99139494ea92
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This will allow to create nodes having an entry point for tuning, still
need to be exploited by the loaders and the shader generator. Coming in
further commits.
Change-Id: I8384b0f528c9919e9f8d35102adde2b307f08b80
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
We forgot to check that the node content was correct and complete when
loading the graph.
Change-Id: Id4ee6aaba6ca268b0785e7fa3fb51a19817e7c9c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Changes internal data-size and pointer calculations
to qssize_t.
Adds new sizeInBytes() accessor to read byte size, and
marks the old one deprecated.
Task-number: QTBUG-50912
Change-Id: Idf0c2010542b0ec1c9abef8afd02d6db07f43e6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This deduplicates the code between QFileSystemEngine and QLockFile.
Change-Id: I1eba2b016de74620bfc8fffd14cd005d5fd9beaa
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
I'll need it soon in QTemporaryFile. This also reduces the overhead,
since QFile::exists -> QFileInfo::exists needs to check if there's a
file engine that handles "/proc/version" (there isn't), convert the
UTF-16 filename to UTF-8 and QFileSystemEngine::fillMetaData will issue
a more expensive stat(2) syscall.
access(2) is cheaper.
This commit also introduces QT_LINUX_ALWAYS_HAVE_PROCFS that isn't
defined anywhere, but could be passed during configure with -D if a
build wants it.
Change-Id: I1eba2b016de74620bfc8fffd14ccfd1593d59ade
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The original version (8758f532ae) of
this file was full of things that are irrelevant for XCB GL plugins.
Most of this has been cleaned out as side effect of porting to the
new configure system. This patch cleans up the remaining pieces.
It does not matter for XCB GL plugins if Qt was configured with
-qt-xcb or -system-xcb as those are dependencies of xcb_qpa_lib-private
and are not used directly by these plugins.
The only XCB dependencies that are directly used by these plugins
are libxcb-glx and libxcb, which are managed directly in xcb_glx.pro:
qtConfig(xcb-glx): QMAKE_USE += xcb_glx
Change-Id: I2175185902bb028de142c8ff6e0b0a3b76a09703
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QObject when it should include QtCore/QObject
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QList when it should include QtCore/QList
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QList when it should include QtGui/QList
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QThread when it should include QtCore/QThread
Amends 88f30250eb.
Change-Id: Ia56fdd87871fdeae8fe34752c61a66195100ceb7
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
We can't open a file for reading if the file is open by another process
(or by ourselves) without sharing permitted. So ask for no access just
so we can get a handle to it.
Change-Id: I998653739e1cec2a58a07a6593b6ff87c1d59dd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QFileSystemEngine::id() will stat(2)/CreateFile in order to get the ID
of the file anyway, so we don't need to use QFile::exists() to check if
the destination exists. Instead, rely on id() returning a null value to
indicate error. On Windows, it's possible that the calls to either
GetFileInformationByHandle or GetFileInformationByHandleEx might fail,
but we ignore those.
Change-Id: I1eba2b016de74620bfc8fffd14ccaebcbed64419
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
This was added in 32629676b9 for Qt 5.1
because QDateTime always allocated memory, so QVector was much faster
for default-created objects. Since Qt 5.7, QDateTime no longer allocates
memory in the default constructor, and in Qt 5.8 on 64-bit systems, it
won't allocate memory at all for most reasonable dates, so construction
times are acceptable now.
Change-Id: If0ad4d988da143b3b1b2fffd1480e83121cddc8c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Most engines just had to override the virtual to return false. So do it
in the base class.
Change-Id: I8d96dea9955d4c749b99fffd14cd738a48aa818c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
The script will look for the most recent Qt Creator version on the system,
and pick up the LLDB summary providers from there, allowing pretty-printing
of Qt types inside LLDB/Xcode.
LLDB will detect the file when loading the dSYM, and inform the user that
the file can be loaded to enable the formatters. The script can be loaded
automatically by adding the following setting in ~/.lldbinit:
settings set target.load-script-from-symbol-file true
Which comes as a slight security risk, as other libraries might have
scripts of their own. The alternative is to load the script directly
from ~/.lldbinit:
command script import "<path to debug script in dSYM>"
With an optional target.load-script-from-symbol-file set to false, to
silence the warning when loading the dSYM bundle.
Change-Id: I01ba51dab725a8d0a58f1ad1749742443b639cc5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Also wrap two blocks in braces, since the formerly-else block spreads
across many lines; and split those lines differently to limit length.
Change-Id: Ib89329b11aad6599926f0338d6546f4141d2c002
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The logic of deciding whether or not to send resize and move events
has been centralized in QGuiApplication. This ensures that if a
window with geometry 100,100+200x200 is moved and resized to e.g.
0,0+100x100, but the window manager denies the request (because the
window would e.g. overlap with system UI), and issues a geometry
update with the original geometry, 100,100+200x200, we will still
treat that as warrant of a move/resize event to the application,
so the application knows that its position and size is as before.
[ChangeLog][Qt Gui][QPA] QWindowSystemInterfacePrivate::handleGeometryChange
no longer takes the old geometry as an argument.
Task-number: QTBUG-57608
Change-Id: I1d471cc7a257fef958bdb1e56184fa95489403a3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Now that QFileDevice::setFileTime() provides a portable way to prepare
our test file, we can verify QFileInfo does handle the distant past,
notably including negative time_t values. The old MS-specific code
used a time back in 1601, which we can't hope to support
cross-platform, so use one in 1901 that's a little inside the range of
32-bit time_t.
Task-number: QTBUG-47985
Change-Id: I2de3e79d8c7864221f92395813b63f373e4d8a3b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Calling the class-method dotProduct(x, x) in order to then take its
square root is a clumsy way to obfuscate x.length() - and lacks its
efforts (clumsy though they are) to limit rounding issues.
Change-Id: I1dc1f38764651bc70c0620e286cb5625f505ddbf
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>