there is no point in iterating BAR if FOO is (or became) empty.
Change-Id: I86c89bf0ad726a5ab7ead990a27ef7cc32caebbf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this is of marginal value, as only our own code ever messes with
QMAKESPEC, and we mostly stopped matching on the spec in favor of
compiler and platform flags.
Change-Id: Ibdd9a9c85067623f0f1f064d139d23b4e6b0677d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
since ab0cc305, the spec will be replaced by an entirely new one during
configuration, and so needs to update the path separator for
$$shell_{path,quote}(). however, the latter didn't happen, as the spec
reloading doesn't go through the "real" spec loading path.
Change-Id: I45ab3156b8e040f683328ac46e48b09c2eb94ef7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This tag was never spelled "PlatformToolSet". The correct spelling
is "PlatformToolset" (lower case s). VS itself can load qmake-generated
projects despite this misspelling, but tools like PVS-Studio are
bothered by it.
Task-number: QTBUG-57435
Task-number: QTBUG-57694
Change-Id: Ib70e8561f1827e195194bcf518445b2909a8d8c0
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This has always been true, but hasn't been documented well enough, so
triagers are giving incorrect information in bug reports (eg QTBUG-47711
and QTBUG-53221). That incorrect information is being treated as truth
by Qt users which take action based on incorrect information. That is a
problem, so try to make the documentation clear.
Change-Id: I4e44a9a0675cdd7d9289ec209ae32d5a92899fc9
Reviewed-by: David Faure <david.faure@kdab.com>
Because it was a function-level static, the QFactoryLoader was getting
destroyed out-of-sync with the bearer thread stopping. Under normal
conditions, the thread stopped first (~QApplication / ~QCoreApplication
via qAddPostRoutine), and the static got destroyed when the process
exited. However, if QApplication leaked or if the destruction order is
wonky (as seen in PyQt5), the thread could still be running when the
plugins were already unloaded.
With the loader a member variable, it gets destroyed when the thread
stops.
Note: in Qt 5.7, QFactoryLoader no longer unloads the plugins (since
commit 494376f980), so this crash cannot
happen in that version.
[ChangeLog][QtNetwork][Bearer management] Fixed a bug that could cause a
crash on application exit, depending on the order of destruction of the
QCoreApplication object and the QtDBus manager thread.
Task-number: QTBUG-56228
Task-number: QTBUG-52988
Change-Id: I33dc971f005a4848bb8ffffd147853376f82de2a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This is required for the next commit.
Change-Id: I73fa1e59a4844c43a109fffd148c8c3e3a100c79
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The process of loading a plugin is examplified by the qLoadPlugin
function (though not all users of QFactoryLoader use this function, they
all do something similar):
const int index = loader->indexOf(key);
if (index != -1) {
QObject *factoryObject = loader->instance(index);
if (FactoryInterface *factory = qobject_cast<FactoryInterface *>(factoryObject))
if (PluginInterface *result = factory->create(key, std::forward<Args>(args)...))
return result;
}
QFactoryLoader::indexOf already locked the mutex, but not
QFactoryLoader::instance. This commit fixes that.
Note that calling the virtual create() in the plugin's factory is not
protected by the mutex. Each plugin's factory must be thread-safe and
also create an object that works on any thread too. It's also the
responsibility of the caller of qLoadPlugin to ensure that it's called
thread-safely.
Task-number: QTBUG-42855
Change-Id: I63e21df51c7448bc8b5ffffd148ebee33d4c47de
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Timestamp is necessary for testing custom mouse event handlers e.g. what
Qt WebEngine uses for handling triple and quadruple mouse clicks.
Based on commit 181ee8f9ff
Task-number: QTBUG-56223
Change-Id: I2bf840f326255333eec83ca8c42f087cb7deb1fb
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
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>
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>
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>
Some formatting characters are replaced by ASCII in the output
from toPlainText(). Since this is a bit inconsistent, we should
document it.
Task-number: QTBUG-57552
Change-Id: I46033588d37517056a8d4668d1d16d48c72ee1b5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
After all the check makes sense here. If a timer was removed as a result
of sendEvent and it was not at the end of the list the list is not
shrunk but the timer info's id is just set to INVALID_TIMER_ID.
Additionally the timer's object should be fetched before we unlock the
locker as timerIdToObject is changed in removeTimer and we might access
a nullptr if the timer has been removed.
Reverts c83ba01f7b
Task-number: QTBUG-56756
Change-Id: Ib1a04c02fbfcf4c939b4891d42f954dc9e87149e
(cherry picked from commit 8f2088db17)
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Some public functions in QString and QDebug are declared inside
Q_COMPILER_UNICODE_STRINGS. This commit defines it for QDoc, and
adds documentation for QDebug functions that are now visible to
QDoc.
Change-Id: Ia7f2501c1dc7b8244dcc3ce4adcd2019fdbffcb6
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This macro, introduced in Qt 5.8, needs to be ignored by QDoc
in order to generate documentation correctly for a number of
deprecated functions.
Change-Id: I50bcd42167e3fafb7dda88484fde86e1aebb5980
Reviewed-by: Martin Smith <martin.smith@qt.io>
90eee08b made system-png a subset of png, which is strictly speaking a
porting error. However, as this is a good idea as such, fix it by adding
the missing !system-png check.
Change-Id: I1557a2130a22ac668be315dc9aea67845928ff4c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Since Qt for Android now supports running as a service, we shouldn't
use the activity context unconditionally, but instead query the current
context from QtAndroidPrivate::context().
Change-Id: Ib793ba890fdbfc0cfe7b20115e41ff64cc73477a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
We might run out of memory or malloc() or realloc() might fail for any
other reason. We want to crash cleanly with a clear message in that
case, rather than returning a null pointer.
Change-Id: If09c1b9e905fc60a5d9d45e598a418df433cf83b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We need to add Q_[ENUM|FLAG]_NS to global qt-cpp-defines doc conf otherwise
qdoc ignores them and it will not produce any documentation or links to
these enums/flags
Task-number: QTBUG-57616
Change-Id: I744317346feb41db02787677f8698c4de15db226
Reviewed-by: Martin Smith <martin.smith@qt.io>
It prints libraries necessary for linking against the MySQL static
library. When linking against dynamic libraries, we end up with too many
parameters. We don't want to explicitly link our plugin to OpenSSL and
this is especially important on macOS since Sierra no longer comes with
OpenSSL development files.
On my Linux:
-L/usr/lib64 -lmysqlclient -lpthread -lz -lm -lssl -lcrypto -ldl
On my macOS:
-L/usr/local/Cellar/mysql/5.7.16/lib -lmysqlclient -lssl -lcrypto
Instead, keep only -L options (that haven't been removed by the function
$$filterLibraryPath above) and the actual client library.
Change-Id: I3e3f0326f7234a26acf5fffd148fa985d0fd9c93
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Use qmake operator *= to prevent adding it multiple times resulting
in warnings on Linux/Desktop:
Makefile:114: warning: overriding recipe for target 'sub-eglfs_kms_support-qmake_all'
Makefile:64: warning: ignoring old recipe for target 'sub-eglfs_kms_support-qmake_all'
Makefile:118: warning: overriding recipe for target 'sub-eglfs_kms_support'
...
Change-Id: I18a926c9faeb8f9eafea5223d32c526c06c43724
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Removed a few from the list after testing them on a
Linux desktop and an Android device.
Change-Id: If1b9e7739d8c374acc8cbd2c72d7176fdff2e9f3
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Q_UNREACHABLE() isn't enough for some compilers, especially if it
expands to nothing.
warning #1011: missing return statement at end of non-void function "fetchPixel<bpp>(const uchar={unsigned char} *, int) [with bpp=QPixelLayout::BPPNone]"
Change-Id: I3e3f0326f7234a26acf5fffd148fecf0b72ea7e0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
we pull this feat off by booting configure with a dummy spec. the proper
spec gets loaded subsequently.
note that it was necessary to move the cache loading after processing
the early checks (from which the spec handling is triggered). this is
just fine, as the cache is needed only by tests, which are forbidden at
this stage by definition.
Change-Id: I5120e25a8bf05fb8cc5485fd93cf6387301089aa
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
this moves us another step towards the "outer" configure doing just
minimal bootstrapping of qmake.
a challenge here was that so far, qmake itself needed qconfig.cpp. this
was replaced by usage of a qt.conf file instead of compiled-in values.
however, to make the executable still self-contained, that qt.conf is
embedded into it (by simple appending of a fixed signature and the text
file).
the qmake with the embedded qt.conf is not used for the qt build itself,
which instead relies on the qt.conf in bin/ as before. however, due to
the missing built-in values, this file now needs to contain more
information than before. but except for a minimal version that is needed
to start up qmake/configure at all, that file is now also generated with
qmake. as some of the newly set up properties are subsequently used by
configure itself, qmake gains a (deliberately undocumented) function to
reload the qt.conf after it's fully populated.
unlike the old implementations, this one doesn't emit redundant qt.conf
entries which match the hard-coded fallbacks. omitting them leads to
leaner files which are more comprehensible.
Started-by: Paolo Angelelli <paolo.angelelli@qt.io>
Change-Id: I4526ef64b3c89d9851e10f83965fe479ed7f39f6
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
in its current form, it was introduced only in 5.7, mostly as a side
effect of -external-hostbindir (which is now handled differently).
it only ever worked for the macOS and MinGW specs, as a side effect of
them supporting -sdk and -device-option (for good reasons), and was
supported only by the unix configure. it's not believed to be really
useful and complicates matters somewhat, so get rid of it again.
should it ever become actually relevant, it can be re-introduced
properly, probably along with a -host-sdk option for macOS.
Change-Id: Ib078469ea39deb821c7b6a8c67fda9e1a95fedf5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
instead of letting the specs validate themselves on each call, let them
only define a callback for use by the verifyspec configure test. this
is somewhat faster, and allows them to be loaded before qdevice.pri is
populated.
Change-Id: I2b60d006b33bbf42c28949f10ad429520ed32f46
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
its only consumer is qt_tool.prf, which is an internal api.
Change-Id: Iae90b079c5af60efad2ded70d6ea481212e5353a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
... where it actually belongs, as it should work in each repo in a
modular build.
Change-Id: I5463f0bcacb239900bed0b0f7be9cf32a3eab04e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
the qmake bootstrap uses some of the options, so the configures still
read config.opt for their own purposes, but the general handling is
entirely in the new system now.
Change-Id: I2c6c657d4da01c8d520ac74795454747bb224bdd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
otherwise, infinite loops can result, as amply demonstrated by the new
configure (which duly replicated the old configures' behavior ...).
QMakeEvaluator::evaluateBuiltinExpand() now returns a VisitReturn like
all other evaluate*() functions. the string list return value is now an
out parameter; i used a reference instead of a pointer to avoid
adjusting 56 usages of it.
Task-number: QTBUG-13964
Change-Id: I51ca7df8d694c6ffe9d9899cba414b1b46f5ce95
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
- wait until the handle location changes the cursor position
- don't update cursor position if:
* a batchEdit is in progress
* the UpdateSelection is blocked
- finish the composing before update the cursor
- add the missing .java files
There are still corner situations when the text gets deleted/moved, but
those are pretty rare and they will be fix in another patch.
Task-number: QTBUG-57507
Change-Id: I230d7f64625fb556e1be3069694a71e9bc91323a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>