This warning is added in MSVC 2015 and is printed when we use noexcept
in modules we turned exceptions off.
Task-number: QTBUG-59645
Change-Id: Id92f4a61915b49ddaee6fffd14ae3b943ccd2bce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Currently when doing comparison with pair-like classes the fallback
toString method is called which returns a Q_NULLPTR thus not allowing
proper diagnostic of the values that triggered an error. This patch
adds support for QPair and std::pair to improve the tests output
readability.
[ChangeLog][QtTest][QCOMPARE] Now outputs contents of QPair and
std::pair on failure.
Change-Id: Ib0b4aad7640590d56275b6f1306fb9fb39fa81bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... and adapt callers.
In one case, port a use of QString::toLatin1() to QStringRef::
toLatin1() so together with this change and the addition of
QString::arg(QStringView) we can drop one more QStringRef::toString().
Change-Id: Iba898af8cc2a9e1a811e271789359395f595ad32
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Use the new overload directly in QXmlStream*.
Saves 129B in QtCore text size on optimized GCC 6.1 Linux AMD64
builds, even though we added two more functions.
[ChangeLog][QtCore][QString] Added arg(QStringView),
arg(QLatin1String) overloads.
Change-Id: Idf7236dcab763824593f34182e4e0b16b5ed4321
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
C++11 allows these to be called implicitly.
Change-Id: Ife62ce4df4c294623e84fb0c0751ae9b4f6d1020
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
... by removing the QStringView(QString::Null) ctor.
This means that QStringView(QString::null) will now fail to compile.
That's ok, since we've deprecated QString::null in the last Qt version.
This will also help pulling up the QStringView definition to before
the QString one in qstring.h, something that we'll require for properly
adding QStringView-append/prepend/insert to QString.
Change-Id: I3c836732be1e185111b13950be9d8dcd935734ff
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
[ChangeLog][qmake] If you use CONFIG+=qmltestcase with no SOURCES, 'make check'
will now run qmltestrunner for you.
Change-Id: Ie9dfaef75494c9b38f6c9a6239754858535d8657
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Nothing changes, we've just given 'QIntegerForSizeof<size_t>::Signed'
a better name in qglobal.h and now use it in QStringView API and
users.
Change-Id: Ibea1ae26e95b3a96708400fd4b0cd120459d57b6
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This function was also relying on Carbon APIs.
Change-Id: I87bc942800f5f3dc4ab69cad80f3cbf06d1ad4e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The handle is already assigned by QLocalSocket::setSocketDescriptor().
Change-Id: I695cfa31f3d14a3a9eef2fb79d23e9651616e8a8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The 'lines' and 'items' containers are both declared mutable, so
[] detaches even in const functions.
Change-Id: I29ac74302af2fab390b3cf3f9d05ea2cace6840b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
A use of Q_GLOBAL_STATIC() tricked clangqdoc into
thinking it created something called QByteArray that
should be documented, so the html generator tried to
overwrite qbytearray.html which had already been
created for the real QByteArray. This probably means
there is a bug in the clang visitor class, but I can't
see it, and this change eliminates 4 qdoc errors.
Change-Id: Iee333217212ce60727cd9424a19b8e96a20547b4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
On macOS, DoubleClick will work if there is no context menu set.
Otherwise, the context menu will open on the first mouse
press, and then steal focus (which is native behavior).
This means that we never get a callback from the OS for
the second click.
Since it sounds strange to attach a context menu, and at the
same time, listen for double click, we choose here to follow
native behavior and open the menu straight away.
Task-number: QTBUG-5770
Change-Id: I14e08bb8ccd330eecc98e332d54ce4e551cd78fb
Reviewed-by: Jeremy Whiting <jpwhiting@kde.org>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
This is the only one in QtBase that casts to be able to use QStringIterator.
Amends d40dcee642.
Change-Id: I709e0285717e8d17feab9ab0020c8d0aed0dbe36
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
A QStaticText object is supposed to be created and *kept* by the user,
and then used repeatedly for drawing, saving the expensive
layouting/rasterization process which would otherwise be done for each
drawText-like call.
Allowing an implicit conversion from QString is therefore surely
unwanted.
[ChangeLog][Potentially Source-Incompatible Changes][QStaticText] The
QStaticText(const QString &) constructor is now explicit.
Change-Id: Ib939a5f46638cb9a54d1cc30ff50e3a9d20be5e4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
There's support for const char[] and char[], so it seems this was
simply forgotten.
[ChangeLog][QtCore][QStringBuilder] Added support for (non-const) char*.
Change-Id: I4b5d9039632da7721256579b7741816027321a7e
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QCoreApplication::hasPendingEvents() is deprecated, and so is
the event dispatchers' eponymous function. (A subsequent patch
will remove all of the event dispatchers' function, and add a
warning in QCoreApplication.)
The replacing logic is based upon QEventDispatcherCoreFoundation.
Change-Id: If2c1920148dc6d910e77c1dc8ac5b4459c149e2b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
SQLite has been supporting named placeholders for some time now and the
code of the module is also written in that sense. The only thing that
currently fails is the parameter count check. If the named placeholder
is used several times then the parameter count will not match the
value count. This patch adds a second check in that case. This use
case is already tested by tst_qsqlquery.
[ChangeLog][QtSql][SQLite] Named placeholder can now be used.
If compiling Qt by hand and using system libraries, this feature
requires at least SQLite 3.3.11.
Change-Id: I1f6fa93f72bd809136894eafce0a2ae5cf6a62db
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
...and remove see-alsoing wrappers that do not get a doc page.
Change-Id: Ia26aeef3c142b15a47e650dfc7f64ad7339cc80d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
With sufficient enable_if magic, the array ctor can overload the
pointer ctor and statically determine the size of the array passed.
Consequently, remove the sizeof in QStringViewLiteral again.
Change-Id: I486baa3cafefde60ccc5f2b47eb94ee53cefe63c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Pretty straightforward, as the implementation already used only
an iterator range internally.
Change-Id: I6e6b809329e2e2548bba6db414a3d107d09637d1
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Commit 0f1b6acab7 added the detection, but
not the reporting in configure's output. This change makes them be
reported alongside F16C.
Change-Id: I27b55fdf514247549455fffd14b1711ca47b1d9a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The new overloads do not accept parameters for the invoked function, this
use case is handled by using lambda.
Overloads for non member function pointers and functors are separated as
the return type is not retrieved in the same way.
Move QSlotObjectBase, QSlotObject and QFunctorSlotObject from
qobject_impl.h to qobjectdefs_impl.h in order to make them available in
qobjectdefs.h.
Update autotests of previous overloads because of a soft break in source
compatibility: passing null literals (0, NULL, nullptr, etc.) for the
second parameter of invokeMethod() is not supported anymore.
[ChangeLog][QtCore] Added QMetaObject::invokeMethod() overloads for function
pointers.
Task-number: QTBUG-37253
Change-Id: I6fb67e086d315ae393ce32743c4eb1abd6cc9139
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This helps to reduce code duplication as it will be used as the basis
of other reference-counted RAII template classes in the future.
Change-Id: I6e7e32373ec738f68d960afc759213610232b9bf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The non-static method QProcess::startDetached now supports nativeArguments.
[ChangeLog][QtCore][QProcess] Added the ability to specify native
arguments for detached processes on Windows.
Task-number: QTBUG-52405
Change-Id: Ic97c55caac7c1156e1412322000c1e40d80bdbbb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QMacStyle already sets SH_Workspace_FillSpaceOnMaximize, so this will
have the same behavior when QMacStyle is in use.
Change-Id: Ibe9f93b2ca94d84b0ce2d3a3078b7db6d5906042
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
We still support buffering via stdio.h (FILE*), but QFSFileEngine itself
is not responsible for the buffering. Opening by file name (not FILE*
and not file descriptor) already added the Unbuffered flag.
Change-Id: I2bc52f3c7a574209b213fffd1498d4e3f78fe1bf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Starting a detached process with a custom process environment can now be
achieved by:
QProcess p;
p.setProgram("foo");
p.setProcessEnvironment(myEnv);
p.startDetached();
[ChangeLog][QtCore][QProcess] Added the ability to set a custom process
environment for detached processes.
Task-number: QTBUG-2284
Change-Id: I49406dffb64fa2aed41ea05cb271bd42eeabb729
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The three static QProcess::startDetached overloads support a limited number of
features: program, arguments and working directory. To support more features of
QProcess (without adding a plethora of overloads) we add a non-static method
startDetached that can be used as follows:
QProcess p;
p.setProgram("cat");
p.setArguments("meow");
p.setWorkingDirectory("/tmp");
if (!p.startDetached())
qWarning("Cannot start process.");
We plan to add support for nativeArguments, processEnvironment,
standard{Output|Error}File and maybe more in subsequent commits.
[ChangeLog][QtCore][QProcess] Added non-static QProcess::startDetached
to support more features for detached processes.
Task-number: QTBUG-2058
Task-number: QTBUG-2284
Task-number: QTBUG-37656
Task-number: QTBUG-52405
Task-number: QTBUG-57687
Change-Id: If6fdd57ecb28cd13aa5fff566216a4177f81d339
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This change fixes several common qdoc warnings in this new software.
However, because vulkan/vulkan.h is not always available, a few typedefs
were also added to define some standard vulkan types for clang to see
when vulkan.h is not available.
Change-Id: Id3db8c0a59b0c415829c1873a868aba0e84fe21c
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
clangqdoc must see the declaration in vulkan
regardless of whether Qt is configured with vulkan.
Change-Id: I91fcaa4c39121b70e10c4fc3e854e49d959a6c02
Reviewed-by: Martin Smith <martin.smith@qt.io>
This update removes the ! charaqcter from a few qdoc comment
markers for functions that should not have been documented.
Doing so eliminates 4 qdoc warnings.
Note that this update deliberately ignores a clangqdoc bug that
might eventually require teaching clangqdoc to store template
information with classes and functions so that qdoc can match
function specializations correctly and document many different
specializations when there is only one declaration. Currently,
it can't handle function specializations.
Change-Id: I5c1db98dabc802cce18f2fc3e64b82e15165ad4d
Reviewed-by: Martin Smith <martin.smith@qt.io>
Change-Id: If1d2cf175d51b3c02881e21937b0a2d33b78aadd
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Remove most of the std::equal() tests that were used to determine
equality in pre-relational-operator-times again.
Amends a1421e4787.
Change-Id: Iff64808f5ac60861caee899d594b512b58046636
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Introduce convenience function sessionManagerInteractionBlocked()
that is also present when session manager is disabled and
reduce #ifdef-ery accordingly.
Change-Id: Ifa211a3bf19901db669743a16acde6e6dc455f75
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>