The macOS and iOS version bumps were already proposed, and bumping
up tvOS and watchOS by one version since all original devices that
ran tvOS 9 and watchOS 1 can run the latest versions and given
the upgrade cycles and TP status of these platforms in 5.8, there
is not much point supporting any older version.
Change-Id: Ib01035054291f5bcd18d15a4f27ad33922076851
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Ensure that the point QPushButtonPrivate::adjustedMenuPosition() returns
is on the same screen with the button
Task-number: QTBUG-57689
Change-Id: If611d41fff4c72ae16369fd95bc5159f398894e9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Added isObsolete and setObsolete functions to QUndoCommand that signifies
a command is not functional. This is useful for when two commands are
merged in such a way that the merged command does nothing. Another
particular use is with networking commands in which the command fails
due to connection issues. The command is considered obsolete because the
undo/redo functions do nothing since the connection failed.
This property is checked in QUndoStack::push(), QUndoStack::undo(),
QUndoStack::redo(), and QUndoStack::setIndex(). The obsolete flag is
checked after QUndoCommand::undo(), QUndoCommand::redo(), and
QUndoCommand::mergeWith() is called where applicable. This allows the
user to set the obsolete flag within the QUndoCommand class and it will
be deleted directly afterwards.
Task-number: QTBUG-54970
Change-Id: Ia8e962ff3aa16515e8f9e2180aee5e1d726d5ba3
Reviewed-by: David Faure <david.faure@kdab.com>
An overflow-check needed the datum for the "min" test to be minus the
datum for the "max" test; so explicitly make the former use -max()
instead of synthesising it as min()+1. This simplifies the
explanation of why that's needed, too. Clarify the overflow-check's
comment at the same time.
Change-Id: I41f56764fdf5e8c749bfae7a685e5fb77d37b3a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It's quite a simple addition and required for the ahead of time compilation
tool for qtdeclarative.
Change-Id: Iba85ae5182919cdb5ab15a0b643e57c103eae632
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The template definitions are required here as we are using an object
of type QPointer below when doing static cast of QPointer::data()
Change-Id: I41e2b6f59667574ca3c5d75c5dddb203790adbce
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This allows the Dptr parameter of the Q_DECLARE_PRIVATE_D macro to be
a smart pointer, not just a raw pointer.
Change-Id: Iaf27352e327e9aedea149461d47f2f11460a42dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... after a member-function declaration: this would be a compilation error
anywhere outside of a class-definition, allowed as 'opt' inside a class-definition
and essentially not needed at all (and is already different from other
member-functions we have in the same code).
Change-Id: Ia689a41bf2a1052cd19eb8fb4766ed9635c20c88
Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The "qYouForgotTheQ_OBJECT_Macro" function hasn't been used in
qobject_cast since commit 7d7e8ae3fa (Qt
5.2), when Olivier made the error use Q_STATIC_ASSERT instead.
Change-Id: I15b62e0f9cec482fbb40fffd1490d7c050084369
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This reverts commit 91a2c8630b. We
promised in the Qt 5.6.2 changelog to do it in Qt 5.8. It was a
temporary compatibility hack.
[ChangeLog][QtCore][QUrl] The temporary compatibility in
QUrl::resolved() that treated the base URL as relative if its scheme
matched the current URL's scheme has been removed.
Change-Id: I3e4e5051937c40319d6efffd1490eb9a5a948481
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Relevant for QWidget apps with multiple top-level widgets. With real
windowing systems a resize will result in an expose. Follow suit.
Task-number: QTBUG-57747
Change-Id: I9c6e9fa5e073f85a695df07d63176b1d2d657f25
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
ISO 14443-3 is for nfc communication and uses 2 different checksums.
The existing one is from ISO 3309 and the other one is from ITU-V.41.
Both are needed to implement an own transport layer defined in ISO
14443-4 to allow nfc commands with a length above 250 byte independent
from the smartphone.
This change will avoid code duplication in QNearFieldTarget.
The private function qNfcChecksum is a copy of qChecksum.
Change-Id: I790ffec8e2ea46f88b2db6f48b64fdcb140e7b70
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The separator character is inserted in the resulting array
after every byte and is useful for MAC address output like
01:23:45🆎cd:ef, Hash fingerprints, or low level data
debug output.
[ChangeLog][QtCore][QByteArray] Added toHex() overload to
insert a separator character between the hex bytes.
Change-Id: Ibe436094badc02f3ade7751aa8b5d690599941d4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make it depend on the corresponding Private target of each
dependency. This way, user code can write
find_package(Qt5Gui REQUIRED)
add_executable(hello hello.cpp)
target_link_libraries(hello Qt5::GuiPrivate)
and get the private include directories for both Qt5Core and Qt5Gui.
Don't create the Private target if any of the private include
directories do not exist. This way, if user code uses one of the
targets, CMake will issue an error if the private include directories do
not exist. Unfortunately the error is somewhat cryptic (eg, 'the
"Qt5::CorePrivate" was not found'), but this is still an improvement
over an error at compile time.
This is an improvement on the situation described in QTBUG-37417 using
Modern CMake features.
Change-Id: I034f8216c3ec64d1a3309682456a713cac9bf854
Reviewed-by: Kai Pastor <dg0yt@darc.de>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
This used to work only for 0- and 1-pixel wide handles. However,
and paradoxically, 2- and 3-pixel wide handles would end up with
narrower grab areas. We now ensure a 4 or 5 minimum grab area,
depending on the handle width parity.
The patch also clears the margins and mask if the handle size is
increased at some point.
Change-Id: I8a16e39fb34b5452d9021dbde8c22bec79df0243
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
In client code I often see code like:
startTimer(1000); //ms
Let the code to be self-explaining. So provide overload
method that takes std::chrono::milliseconds as arg.
QTimer already has std::chrono support, but QObject does not.
Change-Id: Ib348612ce35f1a997b4816fe9e864775cbcbec16
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Many of the tests still use the old connection signal/slot syntax for
tests. Since I recently made a change to one of the tests within the
Widgets/Util folder, I went through and updated the entire folder to the
Qt-5 connection syntax.
Change-Id: Iaaa5a38858eed41fbc897b66ef291f08458505f1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
For instance, if we are passed a QFile to a path that does not exist, being told
"No such file or directory" is significantly more useful than being told
"Device not writable".
Change-Id: I0cc72322f868f06ae2f77b3d0fac7e2094a1d2c7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The changes are motivated by the following reasons:
1. SHGetFileInfo() needs to be COM-intialized per thread.
Microsoft's documentation for CoInitalizeEx() is quite
unambiguous about this.
2. Following point 1, using a thread from the global thread
pool means we would taint every such thread with the
COM-initialization state. This may result in unexpected
behavior in other parts of the application. Moreover,
systematic COM-uninitialization can be expensive and
can't be recommended in this case.
3. Even though the timeout duration is pretty generous, the
logic is wrong and could lead to serious errors should
the call to SHGetFileInfo() actually take too long. This
is because we let the thread run with references to the
main thread's stack, namely a reference to the file name
string, and pointers to the result variable and SHFILEINFO
struct.
Running a dedicated thread allows us to ensure points 1
and 2. Point 3 is ensured by making a local copy of the
file name and using local instances for the info struct
and the result. Then, provided the thread has not been
cancelled, we can copy the info and result values back
into the main thread's stack referenced memory areas.
This also removes all need for QWindowsThreadPoolRunner
which will remain in the code base nonetheless.
Change-Id: Ic9c2d6204ac015aa409db2b57a09837361203291
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Adds linux-generic-g++ which can be used for simple cross-building to
well-behaved Linux targets.
Change-Id: I20423249cbcaaf7fc2c65e46b737e682d9222e38
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
No need to pollute the debug output when attempting to load a program
binary which then gets rejected, because this is not fatal. We will
simply recompile from source then.
Change-Id: I762b7c66fc1ccdf8ab73d720ee10a349c287628b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
It allows to set shortcuts for the standard buttons in
QDialogButtonBox.
Restore Qt4's behavior for the "Don't Save" button on macOS
by setting a shortcut for it (it was Cmd-D before Lion,
now it's Cmd-Delete).
Change-Id: I6b56f68f37670962178693a8983d9fe550540856
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
A child widget without a native handle would previously not be treated as
exposed or active, even if the closest QWindow actually was, resulting
in qWaitFor returning false and QVERIFY failing.
Change-Id: I9df41cbac7aeab63bfa59d8ac77880591393c085
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
In particular, this saves the allocation of the extra data
if no mask was set to begin with.
Change-Id: I402c28fa53c946134c853d52fc7435a50f2232f5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
All Apple Platforms have public API to get the environment; there is no
reason to exclude it from the UIKit subset. It can be useful for
debugging in Xcode, in particular. Furthermore, VxWorks appears to have
support for the Unix environment API, so don't exclude it either.
[ChangeLog][QtCore] QProcessEnvironment is now available on iOS, tvOS,
watchOS, and VxWorks
Change-Id: Ife3745f9b0a588de521a714b4273c5c08eeef286
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This removes an unnecessary dependency on QProcess, which allows
the example to work on platforms where process support is not
available (such as iOS and tvOS).
Change-Id: I5d75fe8373b5f8c3744ab8fb3b1fd1b37eea35f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This decouples QProcess and QProcessEnvironment, since the latter may
actually be available on platforms where the former is not.
Change-Id: I3dc799ffdf94486b64143ed01a369897fff44a96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Drop the include for qt_egl_p.h. For Qt itself this should have no effect
since platform plugins including this header include EGL headers on their
own anyway.
Similarly, applications relying on such advanced functionality will likely
include EGL/OpenGL headers on their own - the point is anyhow to interoperate
with native, non-Qt EGL and GL code.
This avoids a lot of hassle since normally no EGL (or other winsys interface
API) bits are exposed in the public Qt APIs, and thus there are no public
headers provided to set up EGL headers in the same way Qt does internally.
Change-Id: Icdbc28811b753799abc06085bc8dff7f09bdbff9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
A null pointer check was accidentally removed while
refactoring the code.
Change-Id: I547936671bd134bb7df710a4b123a0d731076bf2
Task-number: QTCREATORBUG-17438
Task-number: QTBUG-57404
Task-number: QTBUG-57657
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Clang pre-3.4 didn't like this and it's used in Xcode 5.1 (which we need
to support for 5.8).
error: 'this' cannot be implicitly captured in this context
typename T::const_iterator i = c.begin(), e = c.end();
^
Task-number: QTBUG-57488
Change-Id: I63e21df51c7448bc8b5ffffd148e688d7c9b89d6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit extends 060e0f6628 by loading
the platform font database if there's any. Note that this
happens at compile time and depends on QtFontDatabaseSupport.
Change-Id: Id073fd949765d9439bbb3f66187b15de444d535f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Aborted QDrag object has never been removed, moreover there was no way
to know a previous drag-and-drop operation status
Task-number: QTBUG-53990
Change-Id: I2b6a7aad86d94b9d5083f9799fe54752c251660b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This amends 59b80d606e for MinGW.
Change-Id: I37cd9a0902350e57d4f0961f88734d3b72cb22fa
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
QtWebEngine requires this in order to disable code that is not allowed
on the Mac App Store. The option is too generic to go directly into
QtWebEngine however, as it can be used to toggle additional features in
qtbase as well as on platforms other than macOS.
Change-Id: I556298f4b654a8904c33002ef097a75e2e38938e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
When you change tab it will loose or gain native window decos
depending on if the current dock widget has them or not.
Change-Id: I1171f43fa5ee897ce7d695fc447255dcb0d1d5a1
Task-Id: QTBUG-56866
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Don't block the event that Qt depends on to close popups.
This is the same fix as 5b65698248,
but for touch this time.
Task-number: QTBUG-57292
Change-Id: I47bc19883c2e2b5dc9615c12dc6c198193c055cf
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This is a repeat of ae880beb7d, which had
fixed the problem for ICC 16. That commit was a repeat of
acf80b9a2b, which had fixed it for ICC 15.
As reported in ae880beb7, ICC doesn't like polymorphic exported classes
with inline constructors. That commit added the default constructor, but
we forgot the copy constructor. This constructor should have been
protected, so users are forced to use the virtual clone() function, but
we can't make it so in Qt 5 because MSVC encodes the protection and has
exported the inline function in debug builds.
qsvgiconengine.obj : error LNK2001: unresolved external symbol "const QIconEngine::`vftable'" (??_7QIconEngine@@6)
Change-Id: I427336c52fc342638c74fffd149033b990ea7ade
Reviewed-by: Lars Knoll <lars.knoll@qt.io>