Commit Graph

30346 Commits

Author SHA1 Message Date
Joerg Bornemann
dcd2f82951 Fix circular dependencies in generated vcxproj files
For QMAKE_EXTRA_COMPILERS with inputs that are "buildable" (e.g. C++
sources) the custom build step is added to the output file. From Visual
Studio's point of view this looks like a circular dependency (e.g.
foo.moc generates foo.moc). Usually this just prints a warning that can
be ignored. But this circular dependency also breaks dependencies
between custom build steps. This became noticeable when the generation of
moc_predefs.h was added. Generating moc_predefs.h must be done before
any moc custom build step is executed.

This patch fixes the issue by using fake files (output file plus suffix
".cbt" for "custom build tool") that act as dummy inputs for the custom
build tools.

Task-number: QTBUG-16904
Task-number: QTBUG-57196
Change-Id: I4711e44a0551046d215db151fa0312af8a9177a2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-12-01 05:07:08 +00:00
Friedemann Kleint
448790eaed Windows QPA: Fix build with MSVC2015 on Windows 7
The installation uses SDK 8.1 which does not have the required
include files. Add a check depending on NTDDI_VERSION.

Change-Id: I6323496aed2a2d6e22d41ec14bdf8c6cf1bf2f31
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-11-30 12:51:38 +00:00
Joerg Bornemann
6515d942ae Set a proper name for the moc_predefs extra compiler
In VS builds the default name is the first word of the command, in this
case "cl". Use the generated file name instead.

Change-Id: I8f0039eeae045f8b9a13caea8bd3e338bbe2ed17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-30 08:29:18 +00:00
Joerg Bornemann
fe0b91879b Fix type of VcprojGenerator::extraCompilerOutputs
The values of this hash are strings, not lists of strings.
Enforce this by using the proper type instead of just using a comment.

Change-Id: Id8a13acdceb8f9f8a9a8eaa04e790b1e6cd5faa7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-30 08:28:55 +00:00
Marc Mutz
feb95effc4 QDeadlineTimer: fix namespace for chrono literals in examples
Change-Id: I6d39b4fe653cf89d2bd27af4b3f606d98ac83eba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-30 08:28:35 +00:00
Marc Mutz
1710947fde QMutex: small doc fixes
Add parentheses after function names, replace
  is different -> differs

Change-Id: I6332db1d1650ed8d8320c5f20cd79d0bf1870e27
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2016-11-29 12:27:07 +00:00
Oswald Buddenhagen
947cace799 Merge 5.8 into 5.8.0
Change-Id: If74f0ade36baa9454ebcffb8d6bdd14ac963c1cb
2016-11-29 12:31:41 +01:00
Anton Kudryavtsev
7eb4be9db8 QStringRef: de-duplicate lastIndexOf code
Change-Id: Id6d804b2ab4c9c763d7ec9cb66c255ed0b4f785d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-28 13:18:45 +00:00
Friedemann Kleint
49cdf51ac9 Fix some warnings in tests
../tst_qfile.cpp: In member function 'void tst_QFile::handle()':
../tst_qfile.cpp:2661:38: warning: ignoring return value of 'ssize_t read(int, void*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
tst_qstatictext.cpp:862:58: warning: unused parameter 'textItem' [-Wunused-parameter]
../tst_qtcpsocket.cpp: In member function 'void tst_QTcpSocket::abortiveClose()':
../tst_qtcpsocket.cpp:2254:90: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
Test.cpp: In member function 'void My4Socket::read()':
Test.cpp:66:20: warning: 'reply' may be used uninitialized in this function [-Wmaybe-uninitialized]
../tst_qlocalsocket.cpp: In lambda function:
../tst_qlocalsocket.cpp:701:51: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../tst_qtcpserver.cpp: In member function 'void tst_QTcpServer::linkLocal()':
../tst_qtcpserver.cpp:935:92: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
../tst_qtcpserver.cpp:940:92: warning: suggest parentheses around assignment used as truth value [-Wparentheses]

Change-Id: Ic315069768bcb63a6b333c28ac65b0b992b0d43f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2016-11-28 13:10:43 +00:00
Thiago Macieira
277208c169 moc: disable deprecated warnings in generated code
Code generated by moc very often calls deprecated functions, like
deprecated slots, signals and property getters and setters. There's no
way around that unless the class in question is willing to break binary
compatibility, so those warnings are actually harmless.

Change-Id: Iaeecaffe26af4535b416fffd1489d1a98ef8b34a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-11-27 02:31:22 +00:00
Thiago Macieira
40c9e9dc5f Add a macros for disabling deprecated declaration warnings
This is the only warning we disable in a lot of places in Qt 5.8 source
code. If other warnings become common, we can add macros for them too.

Change-Id: Iaeecaffe26af4535b416fffd1489d1968e29c52a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-11-27 02:31:12 +00:00
Liang Qi
d34be32434 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-11-26 10:25:14 +00:00
Alexander Volkov
011aeb131e Examples: Remove a redundant virtual specifier for overriders
It's a good practice to use override without virtual:
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-override

Change-Id: I5c2d73600e6c706424589c0487133c03a4ef3629
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-25 22:36:21 +00:00
Oswald Buddenhagen
f91bbd2438 make handling of qml module search path saner
excise knowledge of QTREPOS from qt.prf - this is a private variable of
the qt build system which the public functions should not know anything
about.

instead, move this handling to a function in qt_build_config.prf (where
QTREPOS comes from in the first place), and call it from qt_app.prf and
qt_example_installs.prf (which should be the only consumers within qt).

qt.prf now also checks that the qml install dir actually exists, which
is not the case during a modular prefix build of qtdeclarative.

not really incidentally, this fixes modular static builds of
qtdeclarative.

Task-number: QTBUG-57308
Change-Id: I31465b9cd400483264fc236934c6f9f26a5fdd73
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-25 17:31:02 +00:00
Oswald Buddenhagen
38259594e2 fix use of $$QMAKE_QMAKE, take 2
we can't use $(QMAKE) after all, as this breaks with the visual studio
generator. so massage $$QMAKE_QMAKE into the final form manually
instead.

supersedes 591d9588f in amending 2b6bcd5ff.

Change-Id: I8c7a6c43f9668d88c1cc968dbf5614240f16239a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-25 17:30:54 +00:00
Liang Qi
bce25a6340 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/gui/painting/qcoregraphics.mm
	src/gui/painting/qcoregraphics_p.h
	src/plugins/platforms/cocoa/qcocoahelpers.h
	src/plugins/platforms/cocoa/qcocoahelpers.mm

Change-Id: Ibe5efcae73526b3d3931ed22730b13d372dcf54e
2016-11-25 14:41:29 +01:00
Friedemann Kleint
032971af2f tests/manual,auto/qstorageinfo: Use function pointer in print helper
Fix warning about unused variable printer in auto-test and redirects
output to qInfo() as intended.
Amends change a26435d65c.

Change-Id: Ia72a93267a54b9c4f9ef37fa058b95ef586ecc75
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-25 12:44:41 +00:00
Leena Miettinen
5e921a18b2 Doc: Enable global linking to new Qt Creator VCS subtopics
Each supported version control system is described in
more detail in a dedicated topic since version 4.2.

Change-Id: I666f8c18d31954935c836509e572a3bfd2c2a32e
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2016-11-25 10:52:04 +00:00
Konstantin Tokarev
5cd4001bf2 Use separate Qt5Config.cmake inside build directory
Qt5Config restricts search paths of Qt components to ${_qt5_install_prefix}
to prevent accidentally using system Qt modules in case of restricted Qt
configuration. However this does not work properly when Qt is used without
installation, in particular when building cmake-based QtWebKit as a Qt
submodule, because ${_qt5_install_prefix} resolves to QtBase and does not
contain components from other modules.

This patch changes search path from ${_qt5_install_prefix} to all qt5
subdirectories.

Change-Id: Icf01a256097710889573ad69d847b9c3bffa1449
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-25 10:46:34 +00:00
Friedemann Kleint
8a2f544523 tst_qsql.cpp: Remove deprecated module include
Fix warning:
include/QtSql/qsql.h:4:4: warning: #warning Header <QtSql/qsql.h> is deprecated. Please include <QtSql/qtsqlglobal.h> instead. [-Wcpp]

Change-Id: I254c6ac9ddb0f49a7f4dc8b3de44fd1010f6243e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-11-25 09:55:21 +00:00
Liang Qi
50aeedd86c Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/features/qml_module.prf
	src/corelib/tools/qdatetimeparser_p.h

Change-Id: I5382cee3ddb33107dc61ee20f7a9188c4a68a882
2016-11-25 10:32:29 +01:00
Kai Koehne
600c5a7e1b Document third-party code in Cocoa QPA plugin
Change-Id: I2c30f5da25c83d6129403cb9b745a2f17fd6fd9e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-25 08:11:28 +00:00
BogDan Vatra
17d72c7837 Android: All gcc flags should be set for clang too
gcc-base-unix.conf must be included before clang.conf because
clang.conf doesn't set all the needed flags.

Change-Id: I71f95732d0d245096b575c91610800d91c6aa5d7
Reviewed-by: Vyacheslav Koscheev <vok1980@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-25 06:06:57 +00:00
Orgad Shaneh
5bd2d6afec Remove nokia reference in example mimetype
Change-Id: I45c01fd57171f4ba6ea195d7ad3ae988a1797acb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2016-11-24 20:03:35 +00:00
Liang Qi
3966ab51ff Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-11-24 11:18:22 +00:00
Liang Qi
08dea594fe Merge remote-tracking branch 'origin/5.7.1' into 5.7
Change-Id: Ib7b4c3a1d92b93425663014482873742745c210b
2016-11-24 11:47:58 +01:00
Liang Qi
4783de0473 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/network/socket/qnativesocketengine_winrt.cpp
	tools/configure/configureapp.cpp
	tools/configure/environment.cpp

Change-Id: Ieae6f2ee004a87f041751852b687484f91ee4480
2016-11-24 10:31:21 +01:00
Lars Knoll
0861c2176c Use harfbuzz feature to check for HarfBuzz
instead of defining a special macro for it.

Change-Id: I715380717f7d871571f663be30b73f7d95d83d71
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-11-24 08:38:39 +00:00
Lars Knoll
72ed34b792 Don't set platform specific QT_NO_FOO defines in qglobal.h
They should be enabled/disabled through the configuration system.
Remove some unused defines, and move one define from qglobal.h to
a proper feature definition in Qt Gui.

Change-Id: Ie8d5bff9712ba745af60b42ceca3f0440bed2706
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-24 08:37:38 +00:00
Jesus Fernandez
4f896ba34e ICC: Fix MySQL driver build
In function `QMYSQLDriver::formatValue(QSqlField const&, bool) const':
qsql_mysql.cpp:1569: undefined reference to `QString::operator=(
QLatin1String)

Change-Id: I56104cdd53fdc083670510f24b735cf05948f156
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-24 06:22:44 +00:00
Allan Sandfeld Jensen
34be7dc9d0 Optimize fontdatabase fallbacksForFamily
Short-cut the case-insensitive string comparison when lengths doesn't
match.

This reduces the time spend in ucstricmp from 8% during start-up of the
textedit example, to under 1%.

Change-Id: Ib3a92900b330453289ec9eff4830dfac6a9a5da2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-23 23:48:29 +00:00
Simon Hausmann
dc4c647137 Clean up the resource reading code
Instead of doing the conversion from the big-endian data by hand, let's
use the convenience functions from qendian.h.

Change-Id: If3966ca94428afabb1f5c922967fb9970f976622
Reviewed-by: hjk <hjk@qt.io>
2016-11-23 20:50:37 +00:00
Edward Welbourne
7c41ced98c QDateTimeParser: introduce at least some encapsulation
Shuffled its parts to make clear which bits are public, private and
protected.  QDateTimeEditPrivate makes rather heavy use of the last.

Change-Id: Ic5f9d0c5cc85f02e57d3f31e9ac31a17428c5311
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-23 15:02:50 +00:00
Edward Welbourne
0aa3de46ca Fix two leaky uses of realloc()
If it fails, we get NULL back but haven't free()d the old pointer;
saving the NULL return over the old pointer forgets it, leaking the
memory it pointed to.  This is particularly severe in the JSON
parser's grow(), where reading a very large JSON document can lead to
the last successful realloc() in a doubling pattern being very large
indeed; the subsequent failure will leak this very last allocation.

Only worth checking for, however, when the subsequent code takes care
to handle failure: in most cases, if realloc() fails, we're about to
crash anyway.

Change-Id: Icd3a503f169be224f0a058c58e8b7c82a3241ae7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
2016-11-23 15:02:15 +00:00
Edward Welbourne
a4bd635b33 Typo fix in QDateTime::toString() documentation
Text that should simply have been naming days of the week used
Qt::Sunday rather than the simple day name.

Change-Id: I64a3cdacd854c1c9c0fbf2d11826555086d674f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-23 15:01:39 +00:00
Timur Pocheptsov
d3ab4a1ce7 _q_networkSessionClosed - disconnect the correct object
We have:

...
auto networkSession = getNetworkSession();
...

getNetworkSession() can return non-null pointer even if
networkSessionStrongRef is null:

...
    if (networkSessionStrongRef)
        return networkSessionStrongRef;
    return networkSessionWeakRef.toStrongRef();
....

We check the result:
if (networkSession) {

    // here we disconnect signals
}

But we should use the same networkSession when disconnecting,
not start using networkSessionStrongRef suddenly, since it can
be null.

Task-number: QTBUG-57110
Change-Id: I96babb42c2182e741e6eabaf7d1abb88869861f4
Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2016-11-23 14:04:57 +00:00
Joerg Bornemann
435e7b17a3 Fix qmldir copying in debug and release builds on Windows
This is a backport of 6cc02ce6c8 from 5.7.

In a parallel build we may end up copying the qmldir file at the same
time, which doesn't work on Windows due to file locking. Apply the same
guard for the copying condition as in commit
770a0c91f3.

Task-number: QTBUG-57153
Change-Id: Ibac759b16cebaf04f5d2f785211b62071aa656a8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-23 13:53:53 +00:00
Oswald Buddenhagen
0810d48bc4 unbreak "aux" template for mingw & msvc, take 2
of course, we should stub out everything related to TARGET - only the
generic "all" and "first" targets including their deps should be
emitted.

amends af2847260.

Change-Id: I8ed7a550b8022c69328d2e16dbd078928d176964
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-23 13:53:47 +00:00
Oswald Buddenhagen
5b05c37845 qmake: fix up dist targets for mingw & nmake somewhat
actually pack the extra compilers' input files, not the variable names.

unlike on unix, we don't create an actual distdir, so the package is
still going to be rather broken.

Change-Id: If0a15bbe9db95aebd88c2a21ca3c0f787ce5c7e1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-23 13:53:42 +00:00
Kai Koehne
60054b5940 QSettings: Replace deprecated Win32 SHGetSpecialFolderPath
SHGetSpecialFolderPath is declared 'unsupported' by Microsoft, and has
problems with non-ASCII characters. Replace it by the newer
SHGetKnownFolderPath.

Task-number: QTBUG-50570
Change-Id: I8b2dfa10fa5dc30e6c3be094a2ba8d7c3504f2ca
GPush-Base: 4d181bd93234a3747b520d10417825a0147bfeb1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2016-11-23 13:48:46 +00:00
Friedemann Kleint
389b4ec28b Windows QPA: Do not send key events for mouse-synthesized app commands
Sending key events in addition causes applications to respond
twice to for example the back / forward extra mouse buttons.
Suppress the keypress by checking on the device. This is in
line with the other platforms, which do not send keypresses
either.
Native event filters will still be able to listen for
WM_APPCOMMAND.

Task-number: QTBUG-48117
Task-number: QTBUG-57198
Change-Id: I219e17244087663f06ab2c5a8cf4b880c3655700
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-11-23 12:41:19 +00:00
Lars Knoll
04b276b0f5 Remove last traces of MeeGo
Change-Id: I5242f1dfcfccf9811398e717b90196e6228d1dc5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-23 10:57:19 +00:00
Allan Sandfeld Jensen
f17605777b Revert "Revert "Deduplication fetchTransformed""
qdrawhelper.cpp is now compiled without PCH, and changes
blocked by the ICE can be reinstated.

This reverts commit cd9de59177.

Task-number: QTBUG-56817
Change-Id: I8d674768d16b3705598bfe5d08ed98376c97a478
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-23 10:53:47 +00:00
Lars Knoll
5d9413ab35 Remove Mac specific code paths from qiconvcodec
The code is dead, as the codec is never used on macOS.

Change-Id: I86138f1c95e5564256b4d592f0044e83658def93
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-23 10:31:03 +00:00
Lars Knoll
fd9e5d9033 Clean up iconv configuration
Turn iconv off if ICU is being used (in line with codecs.pri)
and get rid of the DEFINES += GNU_LIBICONV in the pri file.

Change-Id: I6fbca975498adbb3e67f913ae9b1dd5cc53ee8da
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-23 10:30:57 +00:00
Lars Knoll
7e9aca683a De-duplicate the systemsemaphore entry
Change-Id: Id015cfe60956d899bbb58597b88204738578b7fe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-23 10:30:45 +00:00
Allan Sandfeld Jensen
9204b8c31e Register fonts with preferred names on Windows
Looks up the canonical names of enumerated fonts and register them under
their preferred names if present.

Also changes the logic handling registration of english aliases, so it
is always done, even if it might in rare cases cause a double
registration since that is safe.

Task-number: QTBUG-53458
Change-Id: Ia010774b26072192b55697b717cc37442c852881
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-11-23 10:04:47 +00:00
Oswald Buddenhagen
53686bf86d configure: simplify version string setup
this basically finishes the job of 2d2cb6434.

Change-Id: I47a5e29ca0df7f521242790be64a09b3514be464
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-23 09:38:19 +00:00
Oswald Buddenhagen
9bdb5b5ffe configure: put more of the makefile contents into template files
... instead of having (duplicated) code in the configures to create it.

Change-Id: Ia86b44021a024a969f5a49b7fb18d3d414869f93
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-23 09:38:14 +00:00
Oswald Buddenhagen
4ce0beee1b configure: delete some dead code and outdated comments
Change-Id: I764a9b383176e1fe9573790547ce0e12d1f88261
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-23 09:38:09 +00:00