When you are using a query that pulls from a number of different tables
then it can be ambiguous as to which table a particular field belongs to.
So this will make it possible to determine the table that a given field
belongs to if it is set.
Task-number: QTBUG-7170
Change-Id: I49b7890c0523d81272a153df3860df800ff853d5
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Document that "visible"-but-obscured windows may not
get expose events for various audiences: QTestLib
users, platform plugin authors and on the QExposeEvent
itself. QWindow::exposeEvent() already has this documented
and is not changed.
Task-number: QTBUG-50414
Change-Id: I91042e8b1c70e48f10e692b2e80367d242a8ccbe
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The child viewport window covers the entire client
area of the parent window, which prevents the parent
window from being exposed.
This worked by accident until now, and was uncovered
by changes to the cocoa platform plugin implementation.
Change-Id: I0d62a1a33f125e5a9030c8def452a49886e54956
Task-number: QTBUG-50414
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
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>
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>
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>
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>
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>
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>
The output didn't previously make clear that the datum was invalid.
It's now explicitly invalid. At the same time, use QDebug's space()
and nospace() methods to make spacing choices explicit.
Revised a QDate test to match.
Change-Id: I4699f5897530b4caa31c22fdb07de149832b30f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Separate the part varying between tests from the common form of all
the tests, so the reader can see the common pattern and know for sure
that there's not a typo or copy-and-paste glitch.
Change-Id: I3145a26ab42c104eb27756d906ac87f937024bad
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The angles in question were in radians, not degrees;
we get them from std::atan().
Change-Id: Ifd60efbd975997ffca02e45ae884fb75e59806b4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
macOS hasn't had SC_ScrollBarAddLine and SC_ScrollBarAddLine
since 10.7, when transient scrollbars first appeared.
We also make the warning message a bit more informative.
Change-Id: Idef4684162456d9bc274eea77908a6afe24fa0f5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Addresses drawing, hit testing, subcontrol rects and one metric.
Also fixes the knob width on hovered transient scrollbars. Since Cocoa
won't help for this (and never will), we do it manually.
For non-transient scrollbars, no more HITheme. That's why we're doing
this after all. It also comes with its own small hack; see how we darken
the knob when hovered.
We had to de-intertwine the logic with QSlider in drawComplexControl(),
which now gets its own full case CC_Slider statements. QSlider will be
addressed next.
Task-number: QTBUG-49585
Change-Id: Iced58d52fff0c11866bdf6eb562dbab36c8f3ef2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
We can offload this to QGuiApplication, just like the geometry of the
QWindow is set. This ensures that all platforms behave the same, and
that the documentation of QPlatformWindow::setGeometry is adhered.
Change-Id: I19dbc32cb4fb146d716ec289c28030a547d3afaa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Fixed crash on QCoreApplication::translate() call from qqmlThread while
QCoreApplication::{install,remove}Translator() is called from the GUI
thread.
[ChangeLog][QtCore][QCoreApplication] Calling
QCoreApplication::translate() is now thread-safe.
Task-number: QTBUG-57095
Change-Id: Ie5340a42040a829f311c01332e05d4bbaf60462c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Qt has two APIs to intercept native events today:
- QAbstractEventDispatcher::installNativeEventFilter()
- Q{Window|Widget}::nativeEvent()
On macOS we only implemented one of them, the native event filter code
path, by calling filterNativeEvent from the Cocoa event dispatcher.
We now also propagate the native event to the corresponding QWindow,
and QWidget if applicable.
It would be nice if there was only one Qt API for this, or at least
only one codepath for platform plugins to care about, but since the
event filter might catch more event types than gets delivered to the
window, we probably need both code paths going forward.
Task-number: QTBUG-40116
Change-Id: I0796bd62a2b7c08b2eaaf6f15db8088e9703af02
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: Icb3794f37c929019de1e997e15f7d975492224c2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Clear the known times when we write to it and always refresh for the
Access time.
Change-Id: I8d96dea9955d4c749b99fffd14cd6c03b4253197
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>