The compiler was generating some vectorized code for qresource.cpp but
it wasn't very efficient. So improve upon it and make use in other
places where we read UTF-16BE strings.
[ChangeLog][QtCore] Added an overload of q{To,From}{Big,Little}Endian
that operates on a memory region.
Change-Id: I6a540578e810472bb455fffd1531fa2f1d724dfc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
make sure the access is properly scoped and does not recurse.
Change-Id: Iaa345cd2771811281b9ed6f634c70235a78c3c33
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
at the time this patch was conceived, it was meant as an exercise in
getting rid of usages of ProString::toQString(m_tmp). however, this was
meanwhile superseded by use of toQStringView().
but the change itself should have been done a long time ago already, and
there is no harm in going through with it.
on the way, this also unifies and fixes some of the error messages.
Change-Id: I337aff994c508df783df4794c3fa0762d83a691b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
these characters can appear in file names, but are meta characters in
dependency context. they have different semantics in make commands, so
this required some reshuffling in the windows generator (which just
treated dependencies and commands the same way).
we don't actually escape colons for nmake, because it has magic
treatment of drive letters anyway (and colons cannot appear elsewhere).
also, if a target's filename gets quoted, batch rules will blow up.
therefore, "funny" file names are really only supported as inputs -
which is just enough to make resource embedding work.
Task-number: QTBUG-22863
Task-number: QTBUG-68635
Change-Id: I473b0bf47d045298fd2ae481a29de603a3c1be30
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The macOS framework build of Qt copies headers to each
framework instead of a centralized include location.
Update the .pc file generator to match this behavior.
Add two include paths to the .pc files:
-Ipath/to/lib/foo.framework/Headers
This makes #include <FooHeader> work.
-Fpath/to/lib
This makes #include <Foo/FooHeader> work.
Task-number: QTBUG-35256
Change-Id: I013ce161c904fe6b7bbb03e33c163d32fdda0647
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
/System/Library/Frameworks is now under system integrity protection
and is not usable for 3rd-party framework installs.
/Library/Frameworks continues to be a documented framework install
locaton.
Change-Id: I26f96ed57985218452ebbf9578e08f04b4e5cfd8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The QMAKE_MANIFEST variable was ignored for VS linkers that support
the /MANIFEST:embed option.
Task-number: QTBUG-59967
Change-Id: I1cdb60ec3a7a5f117942952d4632378ff142daa5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The default value for CONFIGURATION_BUILD_DIR includes EFFECTIVE_PLATFORM_NAME,
but when overriding it in 554e44b77 we only used the CONFIGURATION variable.
This left the .app in iOS builds in Debug instead of Debug-iphoneos,
breaking deployment from within Qt Creator, which had this directory
hard-coded.
We now include EFFECTIVE_PLATFORM_NAME to restore the original
destination for the .app bundle.
Task-number: QTBUG-68705
Change-Id: If304193d3e351e19fb84d250a62ae331af6966c6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
... and make it explicit where we can't do that for semantical or
backwards compat reasons.
most urgently, this fixes an assertion failure when $QMAKEFEATURES
contains empty paths (e.g., due to a trailing semicolon).
notable observation: QByteArray::split() has no argument for the split
behavior (it always keeps empty parts).
Task-number: QTBUG-47325
Change-Id: I72d4b2e154a2ed1802cfa98fb4a5211a68e43231
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The output directory may be the same as the source directory in
the case of an in-source build, but Xcode treats the SYMROOT as
a build directory, and automatically excludes it from Time Machine
backups, which may result in not backing up sources.
Instead we map SYMROOT to an .xcode subdirectory of the output
directory, and then use CONFIGURATION_BUILD_DIR to make sure
the final build targets end up where they used to.
Task-number: QTBUG-52474
Change-Id: I3852ca9088e75ca62fca4c1217b5485175d9436f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
the dependency paths are fixified against the output directory, so we
must resolve them accordingly.
Change-Id: Id92750aad358153bd2db5daca3194c54eda58dbb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We need to take into account the presence of a possible ',_debug' suffix.
Change-Id: I5655394b78723bbc6cc32e56849acc2366d288e2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Fixes the default C version used with gcc < 5
Change-Id: I948dece961caed8e6b181e1c6e6b9dc43c46583e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
the source file must not be written with an absolute path to the
makefile, as this won't match the name of the target which generates it,
thus leading to an unsatisfied dependency.
this is the proper fix for QTBUG-60413 and a bunch of others.
amends historical f173e217cd.
Change-Id: I28140351c4b4759de35e60daf63bc54b82d104ec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This fixes qmake-generated project files for Visual Studio 2017 for
setups where the Windows 8.1 SDK is not installed.
Task-number: QTBUG-66265
Change-Id: I67712019f7142e40262f171eb23f9f1e6ab3a251
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
sync-up with qt-creator; no effect on qmake.
Change-Id: I7555de5c72a9250b31e20fc60e39680d19882fcb
(cherry picked from qtcreator/2cb7c81e620d224d386860a637dc889acb15435e)
(cherry picked from qtcreator/89868ee2b9093ecf40602ae302b991d6a60014b0)
(cherry picked from qtcreator/03e699ce2985eedcd33d247aa47d04b14bc4bc04)
(cherry picked from qtcreator/61419e7bf0f3bff6dcf63876b05b72c56e60c2a8)
(cherry picked from qtcreator/19eaf87ef95a510351557119a955223a4aeea7b3)
(cherry picked from qtcreator/3080bda0661989e88dfa62101b4c3f5d5e6754a1)
(cherry picked from qtcreator/99714239b616e628ff4e0afe3db7eb7511ccf569)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
sync-up with qt-creator; no effect on qmake.
Change-Id: I926bc97fe6fa510ac5a8fe77b64014333a69bd04
(cherry picked from qtcreator/8a69c254757eab7852443b5e4bd5eafb68908d3d)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
sync-up with qt-creator; no effect on qmake.
Change-Id: I34b42bd19e0de973deb2291e91f306d1ca7c630e
(cherry picked from qtcreator/15148d8e4454ff3277131ea52a4204c5fa0b7ab0)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
sync-up with qt-creator; no effect on qmake.
comment on cherry-pick: this is actually a lot more than a cherry-pick,
because the dual VFS needs to deal with the file ids which were
concurrently introduced on the qmake side.
Change-Id: I2c1eb16c97526fa275a1c6a2eae9266d385859ac
(cherry picked from qtcreator/424639ecac9d2e404d2bfaff7f46b45ed98664b8)
(cherry picked from qtcreator/a8010b0fff47d903d4a1f80e3adb1a2ef41beb33)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
it now does not see anything except regular files and directories any
more. that's not expected to be a problem, given the function's scope.
Change-Id: I53063ad8cacb3afe5cc1baf6d6d5feba3465e74f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
(cherry picked from qtcreator/cf82f210804151452fce3cddb3cb2793dab976eb)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
when the QFile object is already constructed, querying whether the file
exists is actually cheap, so do it right away instead of later on
demand. that makes the calling code a bit cleaner.
fwiw, that we need to explicitly query the file's existence at all is a
result of QFile's completely useless error "codes" (which merely say
which function failed, as if the caller would not know).
Change-Id: Ifec39d05b1713d8128046f679287e510f10e45dc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
(cherry picked from qtcreator/5ba32e3484ead2e35cc7732dcd59a97e7459dbfd)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
just a sync-up from lupdate; no effect on qmake itself.
alternative source: qt-creator/7e86b98836342035684cc1c1aa49292224faed07.
Change-Id: I5e10b44637d527799f55c578a99076eb4750f131
(cherry picked from qttools/8e7e60dbdea04c943bc6d50290db12d3fefd39f2)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Thanks to QTBUG-61373, this qmake function was called with
/usr/local/5.10.1 as baseDir, which isn't absolute, leading to an
assertion failure. We could raise the error within qmake but it
proved easier to simply resolve any non-absolute baseDir using PWD,
before trying to use it as an absolute path.
Did the same for $$absolute_path(). Documented both. Adjusted the
assert that caught this to report any non-absolute path that upsets
it. Added simple tests, fixed an existing test.
Task-number: QTBUG-66156
Change-Id: Icfef2e2f5b236e071177c9beffa38d71bf404292
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This ensures that the generated XCode project can correctly find any
files that are referenced via a path containing "..".
Task-number: QTBUG-35131
Change-Id: I049bc2279b4c515a82acd61142d25b8c240e8f6e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Removed duplicate "for the".
Function list was sorted except for sprintf; so sorted it. Also, minor
grammatical improvement.
Task-number: QTBUG-64362
Task-number: QTBUG-64363
Change-Id: Ia47c5195011a0e578e916897b3a5ddb1d78170ad
Reviewed-by: Frederik Schwarzer <schwarzerf@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This is in preparation to adding CBOR support. We don't need yet another
dir for CBOR and placing it in src/corelib/json is just wrong.
Change-Id: I9741f017961b410c910dfffd14ffb9d870340fa6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Make it clearer what the variable actually does by mentioning
that it makes its headers available for inclusion and causes
it to be linked to the binary.
Change-Id: I72821d4bceea7a92e91175ba6c5acc4c3377d7b7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
QFileInfo.isRelative() deems any path starting with a slash to be
absolute; on MS-Win, such paths need a drive specifier (unless they're
UNC), so use IoUtils's more robust test for absolute paths.
Change-Id: I7d0872a87833cbf1cc1a6ef107941adc4c529624
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Removed the '!' from two comments because the functions being
documented are static functions declared and defined in the
.cpp file. They are not public.
Change-Id: Ie3b2c32c64102634b6b2a4c438da191536a426d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
For Q_OS_WIN, a path is only truly absolute if it includes a drive
letter; merely starting with a slash is not enough. (We can't support
UNC paths, so don't even try: qmake runs various commands in the
source directory using CMD.exe, which doesn't support UNC as PWD.)
This requires, when resolving a path relative to a root, transcribing
the root's drive to such not-quite-absolute paths.
Changed QMakeGlobals, $$absolute_path() and $$relative_path() to now
use IoUtils::resolvePath() rather than delegating to QDir's absolute
path method, since that doesn't correctly recognize the need for a
drive letter (and qmake did run into problems with some paths, from
splitPathList and a failing test, as a result).
Moved existing ioUtils tests for handling of relative / absolute paths
out into separate functions and expanded significantly. Fixed some
existing tests to use an absolute path where one is needed; added two
tests involving driveless (but rooted) paths; and fixed the test init
to set a value for QT_HOST_DATA/src property (the lack of which lead
to an assertion failure with this fix).
Task-number: QTBUG-50839
Change-Id: I2bfc13c1bfbe1ae09997274622ea55cb3de31b43
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
These are no longer part of Qt 5 and produce documentation warnings.
Change-Id: I82242b7b03d7ece1b82e2ff75dc6673f471e2df2
Reviewed-by: Martin Smith <martin.smith@qt.io>
MSVC requires that the C PCH file is compiled (as an object) and linked if
any C file is found, and the same for C++.
Most qmake projects are C++.
If a C++ project has a precompiled header, it is typically of C++ type, and
cannot be compiled as C (for example, it contains or includes classes).
Since there is no easy way to conditionally build the C PCH file only if C
files are found in the project (as done for g++), we need a setting that is
disabled by default.
This amends 30331afda1.
[ChangeLog][Tools][qmake] Introduced precompile_header_c CONFIG option for
MSVC to enable precompiled header for C sources.
Task-number: QTBUG-65103
Change-Id: Id9688a35ee7d9b5e4f5a846b81986cb674bc5f4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>