detecting the machine tuple must happen before committing qdevice.pri.
Change-Id: Ic37eda42fff805d6e1edb5dd92898abd59d6bdc9
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
this fixes the x-build for raspberry pi, as that spec refers to the
sysroot.
the path setup doesn't require the device options to be in effect yet,
so it was sufficient to move the existing spec reload to a later point
in time.
Change-Id: Idc521aa13ff441931e954c7c9004472cf7061ee1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
initially, the idea was that QLibraryInfo would receive a
pre-sysrootified ExtPrefix from the builtin qt.conf. matching this
against the sysroot would then tell us whether to sysrootify the Prefix
from a "regular" qt.conf as well.
however, this would have lead to some major ugliness and inconsistency
between the code paths, so i changed my mind.
unfortunately, i failed to adjust the remaining code, leading to
169a40d51 entirely breaking sysrootification ...
the proper (and nicely consistent) solution is to introduce a
SysrootifyPrefix key to qt.conf. this is user-accessible as well, so as
a bonus it is now possible to adjust the setting at qmake installation
time. incidentally, this omission was the last thing that prevented
using the same qmake host build for any imaginable configuration of the
same qt version ... i think.
Change-Id: Ic0eebf21f93651f6374628c0ad8b206d696a4a7e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
GCC produces false positives for maybe_uninitialized when compiling with
-Og in these three places. Simply initialize the variables to silence
it. This should be entirely cost-free for normal compilation.
Change-Id: Iab778a6ba25993f78f190e928c1fcc2dbd8b2fcd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Before VS 2013 ToolsVersion contained a .NET version
number (e.g. "4.0"). Since VS 2013 ToolsVersion is the same as the
Visual Studio version number (e.g. "12.0"), which is also the default.
We always wrote "4.0" (except in one special case which used
"14.0"). This doesn't bother Visual Studio itself, but other tools
like PVS-Studio.
Remove the ToolsVersion attribute from generated VS projects for VS
2013 and newer.
Task-number: QTBUG-57694
Change-Id: I7a3bc4534c492e9540f6b968bee8a969980df63f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change dcd2f829 introduced fake files with the extension .cbt for custom
build tools that generate code from C++ source inputs. The moc_predefs.h
header file falls into this category, because it is generated from
dummy.cpp.
It turns out that these fake files have to exist. Otherwise the
custom build step is executed on every build. That means re-moccing all
mocables on every build.
Fix this by actually creating the fake .cbt files with some
explanatory comment in them.
Task-number: QTBUG-57695
Change-Id: I251294334425d9914677787d8ba6da1169b4cca5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
QPA headers are shipped as private symbols, so they should be marked as such.
This helps distros to check which applications/libraries need recompiling
on each Qt patch update.
Task-number: QTBUG-57060
Change-Id: Ie09d4d10e1edb5127d45a05a3dfa3f4c9dd012f2
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Missing logic when refactoring image manipulation methods into QtGui
in c52bb03090.
Task-number: QTBUG-57723
Change-Id: I7b55d4451d35faf5fd794daa0b80acbd712f30cd
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
We chose to use UTF-8 as it allows us to ensure there's no mistaking the
hostname in case the locale is changed, if the host name contains
characters outside of US-ASCII.
But this didn't work because the code that wrote the hostname always
used the local 8-bit codec instead of UTF-8. On Unix, we used the
result of gethostname(3) directly, which is supposedly on the locale codec.
This commit doesn't fix Windows, which requires _wgetenv, the plan being
to encapsulate that with a qEnvironmentVariable() method.
[ChangeLog][QtCore][QLockFile] Fixed a bug that caused QLockFile not to
recognize a stale lock file if the machine's hostname contained non-US-
ASCII characters, on Unix. A Windows fix is still pending.
Task-number: QTBUG-49640
Change-Id: Ib9d045544ff370ec901626658a84ec4e6575fe21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Callers can persist a QModelIndex which was not persisted before in a
slot connected to the signal, and such a persisted index must be updated
in the course of the layoutChange.
Store the indexes to persist after emitting the signal.
Task-number: QTBUG-32981
Change-Id: Ibee4c0d84817d72603a03fe5b22fdeefeac0695e
Reviewed-by: David Faure <david.faure@kdab.com>
Similar to the fix in the parent commit, incorrect updating of the
internal data structures during layout changes can lead to dangling
pointers being dereferenced later. Moves are treated as layoutChanges
by this proxy by forwarding to the appropriate method. However, data is
incorrectly cleared prior to that forwarding. Remove that, and let the
layoutChange handling take appropriate action.
Change-Id: Iee951e37152328a4e6a5fb8e5385c32a2fe4c0bd
Reviewed-by: David Faure <david.faure@kdab.com>
In sourceLayoutAboutToBeChanged the source model update is ignored if
the affected parents are filtered out anyway. The same logic is
attempted in the sourceLayoutChanged slot, but there the early-return
logic is applied too late - the mapping is cleared before performing the
early-return. Because pointers into the mapping are used in the
internalPointer of QModelIndexes in this class, persistent indexes used
later will segfault when attempting to dereference it.
Additionally, if a parent becomes invalid as a result of the
layoutChange, it would be filtered out by the condition in the loop,
resulting in a different result in the comparison of emptiness of the
parents container.
Fix that by persisting the parent's container, and performing the test
for early-return before clearing the mapping.
Task-number: QTBUG-47711
Task-number: QTBUG-32981
Change-Id: If45e8a1c97d39454160f52041bc9ae7e337dce97
Reviewed-by: David Faure <david.faure@kdab.com>
The QCompleter documentation mentions QFileSystemModel while the code
sample still uses QDirModel. This patch fixes this by updating the code
sample.
Change-Id: I99a0d2419efcf781af3e9530508df088d77fbbfa
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Benchmarking showed most time rendering in rgb64 mode was spend on
memsetting the buffers because they were not declared with a primitive
type.
This patch changes the buffers to quint64, but leaves refactoring
function arguments to a later patch in the dev branch.
Change-Id: Iacc81b0d8e9570b1975dffb85c955b0aabb096a7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
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>