Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
This commit is contained in:
commit
4dac45c9ee
2
.gitignore
vendored
2
.gitignore
vendored
@ -58,8 +58,6 @@ qt*-config.pri
|
||||
/src/angle/src/QtANGLE/libANGLE/
|
||||
/src/angle/src/libGLESv2/libANGLE/
|
||||
|
||||
/src/corelib/global/qfloat16tables.cpp
|
||||
|
||||
# FIXME: Ignore these again?
|
||||
# /examples/*/*/*
|
||||
# !/examples/*/*/*[.]*
|
||||
|
@ -1,6 +1,8 @@
|
||||
load(qt_build_config)
|
||||
CONFIG += warning_clean
|
||||
|
||||
DEFINES += QT_NO_JAVA_STYLE_ITERATORS
|
||||
|
||||
QT_SOURCE_TREE = $$PWD
|
||||
QT_BUILD_TREE = $$shadowed($$PWD)
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
||||
"force-pkg-config": { "type": "void", "name": "pkg-config" },
|
||||
"framework": "boolean",
|
||||
"gc-binaries": { "type": "boolean", "name": "gc_binaries" },
|
||||
"gdb-index": { "type": "boolean", "name": "gdb_index" },
|
||||
"gdb-index": { "type": "boolean", "name": "enable_gdb_index" },
|
||||
"gcc-sysroot": "boolean",
|
||||
"gcov": "boolean",
|
||||
"gnumake": { "type": "boolean", "name": "GNUmake" },
|
||||
@ -705,6 +705,7 @@
|
||||
},
|
||||
"optimize_debug": {
|
||||
"label": "Optimize debug build",
|
||||
"autoDetect": "!features.developer-build",
|
||||
"condition": "!config.msvc && !config.clang && (features.debug || features.debug_and_release) && tests.optimize_debug",
|
||||
"output": [ "privateConfig" ]
|
||||
},
|
||||
|
1
dependencies.yaml
Normal file
1
dependencies.yaml
Normal file
@ -0,0 +1 @@
|
||||
dependencies: []
|
83
dist/changes-5.12.4
vendored
Normal file
83
dist/changes-5.12.4
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
Qt 5.12.4 is a bug-fix release. It maintains both forward and backward
|
||||
compatibility (source and binary) with Qt 5.12.0 through 5.12.3.
|
||||
|
||||
For more details, refer to the online documentation included in this
|
||||
distribution. The documentation is also available online:
|
||||
|
||||
https://doc.qt.io/qt-5/index.html
|
||||
|
||||
The Qt version 5.12 series is binary compatible with the 5.11.x series.
|
||||
Applications compiled for 5.11 will continue to run with 5.12.
|
||||
|
||||
Some of the changes listed in this file include issue tracking numbers
|
||||
corresponding to tasks in the Qt Bug Tracker:
|
||||
|
||||
https://bugreports.qt.io/
|
||||
|
||||
Each of these identifiers can be entered in the bug tracker to obtain more
|
||||
information about a particular change.
|
||||
|
||||
****************************************************************************
|
||||
* Platform Specific Changes *
|
||||
****************************************************************************
|
||||
|
||||
- X11 / XCB:
|
||||
* [QTBUG-45375] QTabletEvent coordinates now come from AbsX/AbsY
|
||||
valuators in the X11 event, in more precise 32.32 fixed-point format,
|
||||
scaled to fit the virtual desktop. It's possible to revert to using
|
||||
the legacy 16.16-format event_x/event_y coordinates as in previous
|
||||
releases by setting the QT_XCB_TABLET_LEGACY_COORDINATES environment
|
||||
variable.
|
||||
|
||||
****************************************************************************
|
||||
* QtCore *
|
||||
****************************************************************************
|
||||
|
||||
- Global:
|
||||
* [QTBUG-72073] Added the QT_NO_FLOAT16_OPERATORS macro in order to work
|
||||
around a Microsoft <= VS2017 compiler bug that is exposed when using
|
||||
std::bitset along with any Qt header that includes <qfloat16.h>.
|
||||
|
||||
- QDeadlineTimer:
|
||||
* [QTBUG-69750] Fixed integer overflows leading to immediate timeouts.
|
||||
|
||||
- QFile:
|
||||
* Made QFile::copy() issue a filesystem-synchronization system call,
|
||||
which would make it less likely to result in incomplete or corrupt
|
||||
files if the system reboots or uncleanly shuts down soon after the
|
||||
function returns. New code is advised to use QSaveFile instead, which
|
||||
also allows to display a progress report while copying.
|
||||
|
||||
- QFileInfo:
|
||||
* [QTBUG-63970][QTBUG-30401][QTBUG-20791] Fixed resolving of symbolic
|
||||
links to UNC shares on NTFS file systems.
|
||||
|
||||
- QMetaObject:
|
||||
* Non-copyable lambdas can now be used with invokeMethod(). For
|
||||
consistency reasons, the functor object is now always moved.
|
||||
|
||||
****************************************************************************
|
||||
* QtGui *
|
||||
****************************************************************************
|
||||
|
||||
- [QTBUG-73231] QWindow::mapToGlobal()/mapFromGlobal() now handle windows
|
||||
spanning screens correctly.
|
||||
|
||||
- [QTBUG-75522] QBezier: Fix possible endless loop when stroking curves
|
||||
|
||||
****************************************************************************
|
||||
* QtWidgets *
|
||||
****************************************************************************
|
||||
|
||||
- QMenu:
|
||||
* Shortcuts are again shown by default in context menus, except on
|
||||
macOS. They can be forced off by setting
|
||||
AA_DontShowShortcutsInContextMenus to true.
|
||||
|
||||
****************************************************************************
|
||||
* Third-Party Code *
|
||||
****************************************************************************
|
||||
|
||||
- libpng was updated to version 1.6.37
|
||||
- Updated QLocale to CLDR v35.1
|
||||
- Updated bundled SQLite to version 3.28.0
|
301
dist/changes-5.13.0
vendored
301
dist/changes-5.13.0
vendored
@ -1,3 +1,20 @@
|
||||
Qt 5.13 introduces many new features and improvements as well as bugfixes
|
||||
over the 5.12.x series. For more details, refer to the online documentation
|
||||
included in this distribution. The documentation is also available online:
|
||||
|
||||
https://doc.qt.io/qt-5/index.html
|
||||
|
||||
The Qt version 5.13 series is binary compatible with the 5.12.x series.
|
||||
Applications compiled for 5.12 will continue to run with 5.13.
|
||||
|
||||
Some of the changes listed in this file include issue tracking numbers
|
||||
corresponding to tasks in the Qt Bug Tracker:
|
||||
|
||||
https://bugreports.qt.io/
|
||||
|
||||
Each of these identifiers can be entered in the bug tracker to obtain more
|
||||
information about a particular change.
|
||||
|
||||
****************************************************************************
|
||||
* Important Source Incompatible Changes *
|
||||
****************************************************************************
|
||||
@ -5,3 +22,287 @@
|
||||
- Moc generated files include the standard <memory> header file now.
|
||||
A side effect of this is that code including the Moc output from within
|
||||
a namespace will fail to compile.
|
||||
|
||||
****************************************************************************
|
||||
* Important Behavior Changes *
|
||||
****************************************************************************
|
||||
|
||||
- The Qt resource system now supports compressing content using the
|
||||
Zstandard (https://zstd.net) algorithm. Compared to zlib, it compresses
|
||||
better for the same CPU time, so this algorithm is the default.
|
||||
QResource::isCompressed() returns true for either compression algorithm.
|
||||
Use QResource::compressionAlgorithm() to find out which algorithm to
|
||||
decompress. QFile will automatically decompress using the correct
|
||||
algorithm.
|
||||
|
||||
- QDataStream version bumped up to 19 to account for changes in the
|
||||
serialization of QFont.
|
||||
|
||||
- [QTBUG-73048] Qt now enables by default warnings when using APIs
|
||||
marked as deprecated. It is possible to disable such warnings by
|
||||
defining the QT_NO_DEPRECATED_WARNINGS macro. The old
|
||||
QT_DEPRECATED_WARNINGS macro which was used to enable this warning
|
||||
now has no effect (warnings are automatically enabled).
|
||||
|
||||
****************************************************************************
|
||||
* Third-Party Code *
|
||||
****************************************************************************
|
||||
|
||||
- Updated bundled SQLite to version 3.28.0.
|
||||
- [QTBUG-72623] Updated DNS public suffix list
|
||||
- [QTBUG-73883] libjpeg-turbo was updated to version 2.0.2
|
||||
- Bundled libpng was updated to version 1.6.37
|
||||
|
||||
****************************************************************************
|
||||
* Platform-Specific Changes *
|
||||
****************************************************************************
|
||||
|
||||
- X11 / XCB:
|
||||
* [QTBUG-45375] QTabletEvent coordinates now come from AbsX/AbsY
|
||||
valuators in the X11 event, in more precise 32.32 fixed-point format,
|
||||
scaled to fit the virtual desktop. It's possible to revert to using
|
||||
the legacy 16.16-format event_x/event_y coordinates as in previous
|
||||
releases by setting the QT_XCB_TABLET_LEGACY_COORDINATES environment
|
||||
variable.
|
||||
* [plugins] platforminputcontexts now use libxkbcommon-compose APIs for
|
||||
compose key input, instead of Qt's own implementation.
|
||||
|
||||
- Android
|
||||
* Increased the minimum supported Android version to Android 5.0
|
||||
(API level 21).
|
||||
|
||||
- Windows
|
||||
* [QTBUG-47247][QTBUG-71855] Add a default setting for
|
||||
hasBorderInFullScreen in QtPlatformHeaders, QWindowsWindowFunctions
|
||||
* [QTBUG-57180] Removed confusing DirectWrite warning when loading
|
||||
bitmap fonts.
|
||||
|
||||
- macOS
|
||||
* Accessibility: VoiceOver now reads all lines in multiline text
|
||||
components when navigating by lines.
|
||||
|
||||
****************************************************************************
|
||||
* Tools *
|
||||
****************************************************************************
|
||||
|
||||
- configure & build system:
|
||||
* Added --linker=[bfg,lld,gold] configure flag.
|
||||
* The default OpenGL configuration changed from ANGLE to dynamic OpenGL.
|
||||
* Added -schannel option to enable Schannel support on Desktop Windows.
|
||||
* Added -coverage option for recording coverage data during execution
|
||||
|
||||
- CMake
|
||||
* Added support for automatic linking of transitive dependencies in
|
||||
static builds
|
||||
|
||||
- qmake
|
||||
* [QTBUG-53654] Introduced the variables WINDOWS_TARGET_PLATFORM_VERSION
|
||||
and WINDOWS_TARGET_PLATFORM_MIN_VERSION for overriding the default
|
||||
values of WindowsTargetPlatformVersion and
|
||||
WindowsTargetPlatformMinVersion in Visual Studio project files.
|
||||
|
||||
- RCC now supports compressing content using the Zstandard
|
||||
(https://zstd.net) algorithm. Compared to zlib, it compresses better for
|
||||
the same CPU time, so this algorithm is the default. To go back to the
|
||||
previous algorithm, pass command-line option --compress-algo=zlib.
|
||||
Compression levels range from 1 (fastest, least compression) to 19
|
||||
(slowest, best compression). Level 0 tells the library to choose an
|
||||
implementation-defined default. The default compression level is
|
||||
"heuristic" (level -1): under this mode, RCC will attempt a very fast
|
||||
compression (level 1) and check if the file was sufficiently compressed.
|
||||
If it was, then RCC will compress again using an implementation-defined
|
||||
level.
|
||||
|
||||
****************************************************************************
|
||||
* QtCore *
|
||||
****************************************************************************
|
||||
|
||||
- New class QConcatenateTablesProxyModel, to concatenate the rows from
|
||||
multiple source models.
|
||||
- New class QTransposeProxyModel to swap rows and columns of the source
|
||||
model.
|
||||
- Added macros Q_DISABLE_MOVE and Q_DISABLE_COPY_MOVE complementing
|
||||
Q_DISABLE_COPY.
|
||||
- Qt Containers and meta type system now use C++11 type traits
|
||||
(std::is_trivial, std::is_trivially_copyable and
|
||||
std::is_trivially_destructible) to detect the class of a type not
|
||||
explicitly set by Q_DECLARE_TYPEINFO. (Q_DECLARE_TYPEINFO is still
|
||||
needed for QList.)
|
||||
|
||||
- QCommandLineParser:
|
||||
* [QTBUG-58490] The application name (if set in QCoreApplication) is now
|
||||
shown in error messages.
|
||||
|
||||
- QDateTime:
|
||||
* [QTBUG-71030] Fixed race conditions in getting the local time zone. Qt now
|
||||
has a mutex lock around all calls to tzset() and mktime(). Application
|
||||
code should avoid calling those functions directly.
|
||||
|
||||
- QFile:
|
||||
* Made QFile::copy() issue a filesystem-synchronization system call,
|
||||
which would make it less likely to result in incomplete or corrupt
|
||||
files if the system reboots or uncleanly shuts down soon after the
|
||||
function returns. New code is advised to use QSaveFile instead, which
|
||||
also allows display of a progress report while copying.
|
||||
|
||||
- QFileInfo:
|
||||
* [QTBUG-63970][QTBUG-30401][QTBUG-20791] Fixed resolving of symbolic
|
||||
links to UNC shares on NTFS file systems.
|
||||
|
||||
- QJsonArray:
|
||||
* [QTBUG-32793] Added cbegin() and cend() methods for compatibility with
|
||||
the Standard Library container concepts.
|
||||
|
||||
- QJsonDocument:
|
||||
* [QTBUG-71445] Added the ability to stream QJsonDocument into and from
|
||||
QDataStream if it is contained in a QVariant.
|
||||
|
||||
- QLocale:
|
||||
* Added support for Western Balochi, Ido, Lojban, Sicilian and
|
||||
Southern Kurdish.
|
||||
* [QTBUG-71445] Added a const overload for formattedDataSize().
|
||||
* [QTBUG-782] Added toLong() and toULong().
|
||||
|
||||
- QMetaObject:
|
||||
* Non-copyable lambdas can now be used with invokeMethod(). For
|
||||
consistency reasons, the functor object is now always moved.
|
||||
|
||||
- QMimeDatabase:
|
||||
* Added configure option -no-mimetype-database that tells Qt not to
|
||||
bundle its own copy of the XDG MIME database. If this option is
|
||||
passed, QMimeDatabase will only work if there's a system copy in
|
||||
$XDG_DATA_DIRS/mime. This option is useful for Linux distributions
|
||||
that ensure the data is always present.
|
||||
|
||||
- QSettings:
|
||||
* Added QSettings(Scope...) constructor to avoid using #ifdef in Qt
|
||||
applications.
|
||||
|
||||
- QStringListModel:
|
||||
* [QTBUG-69807] Implemented moveRows
|
||||
|
||||
- QUrlQuery:
|
||||
* QUrlQuery now provides an initializer list constructor. It can be
|
||||
created using a list of key/value pairs.
|
||||
|
||||
- QVector:
|
||||
* QVector no longer requires a default constructor for its template
|
||||
argument.
|
||||
|
||||
****************************************************************************
|
||||
* QtDBus *
|
||||
****************************************************************************
|
||||
|
||||
- Matching namespace prefixes using QDBusServiceWatcher (instead of full
|
||||
service names) is now possible. For example, "com.example.backend1*"
|
||||
will match "com.example.backend1", "com.example.backend1.foo" and
|
||||
"com.example.backend1.foo.bar", but not "com.example.backend12".
|
||||
|
||||
****************************************************************************
|
||||
* QtGui *
|
||||
****************************************************************************
|
||||
|
||||
- CSS:
|
||||
* Added support for HSL/HSLA colors.
|
||||
* Fix the range of the hue parameter when parsing a color given in HSL
|
||||
or HSV.
|
||||
|
||||
- QFont:
|
||||
* Add setFamilies()/families() to support use of font families with
|
||||
commas and quotes in their name.
|
||||
|
||||
- QImage:
|
||||
* [QTBUG-41176] Added support for 16-bit grayscale format.
|
||||
* A new method convertTo has been added to change the format of a QImage
|
||||
in place.
|
||||
|
||||
- QPainterPath:
|
||||
* Added clear(), reserve(), capacity(). clear() removes allocated
|
||||
QPainterPath elements but preserves allocated memory, which can be
|
||||
useful for application with complex paths that are often recreated.
|
||||
reserve() and capacity() follow QVector semantics.
|
||||
|
||||
- QWindow:
|
||||
* [QTBUG-67903][QTBUG-52944] QWindow::transientParent is now a property.
|
||||
|
||||
- Text:
|
||||
* [QTBUG-60813] Deprecated QFont::lastResortFamily() and
|
||||
QFont::lastResortFont() which are not in use in Qt 5 and did not
|
||||
provide any useful information.
|
||||
* [QTBUG-22813] Added support for setting the font's style name in
|
||||
QTextCharFormat.
|
||||
|
||||
****************************************************************************
|
||||
* QtNetwork *
|
||||
****************************************************************************
|
||||
|
||||
- TLS (SSL):
|
||||
* Support for SSLv2 and SSLv3 sockets has been dropped, as per RFC 6176
|
||||
(2011) and RFC 7568 (2015).
|
||||
* The Schannel backend now supports ALPN and thus HTTP/2.
|
||||
* [QTBUG-62637] Added support for Schannel on Desktop Windows. To build
|
||||
Qt with Schannel support use '-schannel' during configure.
|
||||
* Added class QOcspResponse as a part of OCSP stapling support.
|
||||
* [QTBUG-12812][QTBUG-17158] Added OCSP-stapling support for OpenSSL
|
||||
backend
|
||||
* [QTBUG-71828][QTBUG-73289] Fixed SSL verification when connecting to IP
|
||||
address (no host name) if that IP address is listed in the certificate.
|
||||
|
||||
****************************************************************************
|
||||
* QtTestLib *
|
||||
****************************************************************************
|
||||
|
||||
- Added QTest::toString(const QModelIndex &idx)
|
||||
|
||||
- Removed support for GPU_BLACKLIST files. Reimplementations or
|
||||
equivalents of QTEST_MAIN() should remove their uses of
|
||||
QTEST_ADD_GPU_BLACKLIST_SUPPORT and its _DEFS; they are still vacuously
|
||||
defined, but serve no remaining purpose and shall be undefined in due
|
||||
course.
|
||||
|
||||
****************************************************************************
|
||||
* QtWidgets *
|
||||
****************************************************************************
|
||||
|
||||
- QAbstractScrollArea:
|
||||
* [QTBUG-69120] QTableView/QTreeView, when reporting their
|
||||
viewportSizeHint(), now correctly take into account their scroll
|
||||
bars' visibility and visibilityPolicy.
|
||||
|
||||
- QHeaderView:
|
||||
* dataChanged now respects the given roles to avoid useless
|
||||
recomputations.
|
||||
|
||||
- QLabel:
|
||||
* Minor performance improvement when painting a label with an image.
|
||||
|
||||
- QListWidget:
|
||||
* [QTBUG-69807] Implemented moveRows in model
|
||||
* [QTBUG-68977] Sped up handling of hidden items when working with large
|
||||
data sets.
|
||||
|
||||
- QPlainTextEdit:
|
||||
* Added QRegularExpression find() method overload.
|
||||
|
||||
- QTextEdit:
|
||||
* Added QRegularExpression find() method overload.
|
||||
|
||||
- QTreeView:
|
||||
* Added expandRecursively() to expand all items below a given index.
|
||||
|
||||
- QWidgetTextControlPrivate:
|
||||
* [QTBUG-69735] Moved cursor selection to start.
|
||||
|
||||
****************************************************************************
|
||||
* QtSql *
|
||||
****************************************************************************
|
||||
|
||||
- SQLite:
|
||||
* [QTBUG-63498] The json1-extension for the SQLite3 plugin is now enabled
|
||||
by default.
|
||||
|
||||
- PostgreSQL:
|
||||
* QSqlDatabase is now stricter about table names when used with record()
|
||||
and primaryIndex(). If the tablename was not quoted when it was
|
||||
created, then the table name passed to record() and primaryIndex()
|
||||
needs to be in lower case so that PostgreSQL is able to find it.
|
||||
|
1
doc/config/exampleurl-qt3d.qdocconf
Normal file
1
doc/config/exampleurl-qt3d.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qt3d.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtactiveqt.qdocconf
Normal file
1
doc/config/exampleurl-qtactiveqt.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtactiveqt.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtandroidextras.qdocconf
Normal file
1
doc/config/exampleurl-qtandroidextras.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtandroidextras.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtbase.qdocconf
Normal file
1
doc/config/exampleurl-qtbase.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtbase.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtcharts.qdocconf
Normal file
1
doc/config/exampleurl-qtcharts.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtcharts.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtconnectivity.qdocconf
Normal file
1
doc/config/exampleurl-qtconnectivity.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtconnectivity.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtdatavis3d.qdocconf
Normal file
1
doc/config/exampleurl-qtdatavis3d.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtdatavis3d.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtdeclarative.qdocconf
Normal file
1
doc/config/exampleurl-qtdeclarative.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtdeclarative.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtdoc.qdocconf
Normal file
1
doc/config/exampleurl-qtdoc.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtdoc.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtgamepad.qdocconf
Normal file
1
doc/config/exampleurl-qtgamepad.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtgamepad.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtgraphicaleffects.qdocconf
Normal file
1
doc/config/exampleurl-qtgraphicaleffects.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtgraphicaleffects.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtimageformats.qdocconf
Normal file
1
doc/config/exampleurl-qtimageformats.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtimageformats.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtlocation.qdocconf
Normal file
1
doc/config/exampleurl-qtlocation.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtlocation.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtlottie.qdocconf
Normal file
1
doc/config/exampleurl-qtlottie.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtlottie.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtmacextras.qdocconf
Normal file
1
doc/config/exampleurl-qtmacextras.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtmacextras.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtmultimedia.qdocconf
Normal file
1
doc/config/exampleurl-qtmultimedia.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtmultimedia.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtnetworkauth.qdocconf
Normal file
1
doc/config/exampleurl-qtnetworkauth.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtnetworkauth.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtpurchasing.qdocconf
Normal file
1
doc/config/exampleurl-qtpurchasing.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtpurchasing.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtquickcontrols.qdocconf
Normal file
1
doc/config/exampleurl-qtquickcontrols.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtquickcontrols.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtquickcontrols2.qdocconf
Normal file
1
doc/config/exampleurl-qtquickcontrols2.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtquickcontrols2.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtremoteobjects.qdocconf
Normal file
1
doc/config/exampleurl-qtremoteobjects.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtremoteobjects.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtscript.qdocconf
Normal file
1
doc/config/exampleurl-qtscript.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtscript.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtscxml.qdocconf
Normal file
1
doc/config/exampleurl-qtscxml.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtscxml.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtsensors.qdocconf
Normal file
1
doc/config/exampleurl-qtsensors.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtsensors.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtserialbus.qdocconf
Normal file
1
doc/config/exampleurl-qtserialbus.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtserialbus.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtserialport.qdocconf
Normal file
1
doc/config/exampleurl-qtserialport.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtserialport.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtspeech.qdocconf
Normal file
1
doc/config/exampleurl-qtspeech.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtspeech.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtsvg.qdocconf
Normal file
1
doc/config/exampleurl-qtsvg.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtsvg.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qttools.qdocconf
Normal file
1
doc/config/exampleurl-qttools.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qttools.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtvirtualkeyboard.qdocconf
Normal file
1
doc/config/exampleurl-qtvirtualkeyboard.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtvirtualkeyboard.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwayland.qdocconf
Normal file
1
doc/config/exampleurl-qtwayland.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwayland.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwebchannel.qdocconf
Normal file
1
doc/config/exampleurl-qtwebchannel.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwebchannel.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwebengine.qdocconf
Normal file
1
doc/config/exampleurl-qtwebengine.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwebengine.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwebsockets.qdocconf
Normal file
1
doc/config/exampleurl-qtwebsockets.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwebsockets.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwebview.qdocconf
Normal file
1
doc/config/exampleurl-qtwebview.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwebview.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtwinextras.qdocconf
Normal file
1
doc/config/exampleurl-qtwinextras.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtwinextras.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtx11extras.qdocconf
Normal file
1
doc/config/exampleurl-qtx11extras.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtx11extras.git/tree/examples/\1?h=$QT_VER"
|
1
doc/config/exampleurl-qtxmlpatterns.qdocconf
Normal file
1
doc/config/exampleurl-qtxmlpatterns.qdocconf
Normal file
@ -0,0 +1 @@
|
||||
url.examples = "https://code.qt.io/cgit/qt/qtxmlpatterns.git/tree/examples/\1?h=$QT_VER"
|
@ -118,6 +118,7 @@ Cpp.ignoretokens += \
|
||||
Q_POSITIONING_EXPORT \
|
||||
Q_MULTIMEDIA_EXPORT \
|
||||
Q_NAMESPACE \
|
||||
Q_NAMESPACE_EXPORT \
|
||||
Q_NETWORK_EXPORT \
|
||||
Q_NEVER_INLINE \
|
||||
Q_NORETURN \
|
||||
|
@ -132,7 +132,7 @@ void DownloadManager::startNextDownload()
|
||||
|
||||
// prepare the output
|
||||
printf("Downloading %s...\n", url.toEncoded().constData());
|
||||
downloadTime.start();
|
||||
downloadTimer.start();
|
||||
}
|
||||
|
||||
void DownloadManager::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
|
||||
@ -140,7 +140,7 @@ void DownloadManager::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
|
||||
progressBar.setStatus(bytesReceived, bytesTotal);
|
||||
|
||||
// calculate the download speed
|
||||
double speed = bytesReceived * 1000.0 / downloadTime.elapsed();
|
||||
double speed = bytesReceived * 1000.0 / downloadTimer.elapsed();
|
||||
QString unit;
|
||||
if (speed < 1024) {
|
||||
unit = "bytes/sec";
|
||||
|
@ -83,7 +83,7 @@ private:
|
||||
QQueue<QUrl> downloadQueue;
|
||||
QNetworkReply *currentDownload = nullptr;
|
||||
QFile output;
|
||||
QTime downloadTime;
|
||||
QElapsedTimer downloadTimer;
|
||||
TextProgressBar progressBar;
|
||||
|
||||
int downloadedCount = 0;
|
||||
|
@ -62,7 +62,7 @@ QString peer_info(const QHostAddress &address, quint16 port)
|
||||
return info.arg(address.toString()).arg(port);
|
||||
}
|
||||
|
||||
QString connection_info(QSharedPointer<QDtls> connection)
|
||||
QString connection_info(QDtls *connection)
|
||||
{
|
||||
QString info(DtlsServer::tr("Session cipher: "));
|
||||
info += connection->sessionCipher().name();
|
||||
@ -157,7 +157,7 @@ void DtlsServer::readyRead()
|
||||
}
|
||||
|
||||
const auto client = std::find_if(knownClients.begin(), knownClients.end(),
|
||||
[&](const DtlsConnection &connection){
|
||||
[&](const std::unique_ptr<QDtls> &connection){
|
||||
return connection->peerAddress() == peerAddress
|
||||
&& connection->peerPort() == peerPort;
|
||||
});
|
||||
@ -170,7 +170,7 @@ void DtlsServer::readyRead()
|
||||
|
||||
//! [6]
|
||||
if ((*client)->isConnectionEncrypted()) {
|
||||
decryptDatagram(*client, dgram);
|
||||
decryptDatagram(client->get(), dgram);
|
||||
if ((*client)->dtlsError() == QDtlsError::RemoteClosedConnectionError)
|
||||
knownClients.erase(client);
|
||||
return;
|
||||
@ -178,7 +178,7 @@ void DtlsServer::readyRead()
|
||||
//! [6]
|
||||
|
||||
//! [7]
|
||||
doHandshake(*client, dgram);
|
||||
doHandshake(client->get(), dgram);
|
||||
//! [7]
|
||||
}
|
||||
|
||||
@ -205,13 +205,13 @@ void DtlsServer::handleNewConnection(const QHostAddress &peerAddress,
|
||||
emit infoMessage(peerInfo + tr(": verified, starting a handshake"));
|
||||
//! [8]
|
||||
//! [9]
|
||||
DtlsConnection newConnection(new QDtls(QSslSocket::SslServerMode));
|
||||
std::unique_ptr<QDtls> newConnection{new QDtls{QSslSocket::SslServerMode}};
|
||||
newConnection->setDtlsConfiguration(serverConfiguration);
|
||||
newConnection->setPeer(peerAddress, peerPort);
|
||||
newConnection->connect(newConnection.data(), &QDtls::pskRequired,
|
||||
newConnection->connect(newConnection.get(), &QDtls::pskRequired,
|
||||
this, &DtlsServer::pskRequired);
|
||||
knownClients.push_back(newConnection);
|
||||
doHandshake(newConnection, clientHello);
|
||||
knownClients.push_back(std::move(newConnection));
|
||||
doHandshake(knownClients.back().get(), clientHello);
|
||||
//! [9]
|
||||
} else if (cookieSender.dtlsError() != QDtlsError::NoError) {
|
||||
emit errorMessage(tr("DTLS error: ") + cookieSender.dtlsErrorString());
|
||||
@ -221,7 +221,7 @@ void DtlsServer::handleNewConnection(const QHostAddress &peerAddress,
|
||||
}
|
||||
|
||||
//! [11]
|
||||
void DtlsServer::doHandshake(DtlsConnection newConnection, const QByteArray &clientHello)
|
||||
void DtlsServer::doHandshake(QDtls *newConnection, const QByteArray &clientHello)
|
||||
{
|
||||
const bool result = newConnection->doHandshake(&serverSocket, clientHello);
|
||||
if (!result) {
|
||||
@ -246,7 +246,7 @@ void DtlsServer::doHandshake(DtlsConnection newConnection, const QByteArray &cli
|
||||
//! [11]
|
||||
|
||||
//! [12]
|
||||
void DtlsServer::decryptDatagram(DtlsConnection connection, const QByteArray &clientMessage)
|
||||
void DtlsServer::decryptDatagram(QDtls *connection, const QByteArray &clientMessage)
|
||||
{
|
||||
Q_ASSERT(connection->isConnectionEncrypted());
|
||||
|
||||
@ -266,10 +266,9 @@ void DtlsServer::decryptDatagram(DtlsConnection connection, const QByteArray &cl
|
||||
//! [14]
|
||||
void DtlsServer::shutdown()
|
||||
{
|
||||
for (DtlsConnection &connection : knownClients)
|
||||
for (const auto &connection : qExchange(knownClients, {}))
|
||||
connection->shutdown(&serverSocket);
|
||||
|
||||
knownClients.clear();
|
||||
serverSocket.close();
|
||||
}
|
||||
//! [14]
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include <QtNetwork>
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -86,9 +87,8 @@ private:
|
||||
void handleNewConnection(const QHostAddress &peerAddress, quint16 peerPort,
|
||||
const QByteArray &clientHello);
|
||||
|
||||
using DtlsConnection = QSharedPointer<QDtls>;
|
||||
void doHandshake(DtlsConnection newConnection, const QByteArray &clientHello);
|
||||
void decryptDatagram(DtlsConnection connection, const QByteArray &clientMessage);
|
||||
void doHandshake(QDtls *newConnection, const QByteArray &clientHello);
|
||||
void decryptDatagram(QDtls *connection, const QByteArray &clientMessage);
|
||||
void shutdown();
|
||||
|
||||
bool listening = false;
|
||||
@ -96,7 +96,7 @@ private:
|
||||
|
||||
QSslConfiguration serverConfiguration;
|
||||
QDtlsClientVerifier cookieSender;
|
||||
QVector<DtlsConnection> knownClients;
|
||||
std::vector<std::unique_ptr<QDtls>> knownClients;
|
||||
|
||||
Q_DISABLE_COPY(DtlsServer)
|
||||
};
|
||||
|
@ -96,8 +96,8 @@ void RateController::transfer()
|
||||
if (sockets.isEmpty())
|
||||
return;
|
||||
|
||||
int msecs = 1000;
|
||||
if (!stopWatch.isNull())
|
||||
qint64 msecs = 1000;
|
||||
if (stopWatch.isValid())
|
||||
msecs = qMin(msecs, stopWatch.elapsed());
|
||||
|
||||
qint64 bytesToWrite = (upLimit * msecs) / 1000;
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
#include <QObject>
|
||||
#include <QSet>
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
class PeerWireClient;
|
||||
|
||||
@ -79,7 +79,7 @@ public slots:
|
||||
void scheduleTransfer();
|
||||
|
||||
private:
|
||||
QTime stopWatch;
|
||||
QElapsedTimer stopWatch;
|
||||
QSet<PeerWireClient *> sockets;
|
||||
int upLimit;
|
||||
int downLimit;
|
||||
|
@ -56,7 +56,7 @@
|
||||
#include <QOpenGLBuffer>
|
||||
#include <QVector3D>
|
||||
#include <QMatrix4x4>
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
#include <QVector>
|
||||
#include <QPushButton>
|
||||
|
||||
@ -106,7 +106,7 @@ private:
|
||||
bool m_qtLogo;
|
||||
QList<Bubble *> m_bubbles;
|
||||
int m_frames;
|
||||
QTime m_time;
|
||||
QElapsedTimer m_time;
|
||||
QOpenGLShader *m_vshader1;
|
||||
QOpenGLShader *m_fshader1;
|
||||
QOpenGLShader *m_vshader2;
|
||||
|
@ -54,7 +54,7 @@
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QDir>
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
|
||||
@ -146,19 +146,19 @@ int main(int argc, char** argv)
|
||||
|
||||
int singleThreadTime = 0;
|
||||
{
|
||||
QTime time;
|
||||
time.start();
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
WordCount total = singleThreadedWordCount(files);
|
||||
singleThreadTime = time.elapsed();
|
||||
singleThreadTime = timer.elapsed();
|
||||
qDebug() << "single thread" << singleThreadTime;
|
||||
}
|
||||
|
||||
int mapReduceTime = 0;
|
||||
{
|
||||
QTime time;
|
||||
time.start();
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
WordCount total = mappedReduced(files, countWords, reduce);
|
||||
mapReduceTime = time.elapsed();
|
||||
mapReduceTime = timer.elapsed();
|
||||
qDebug() << "MapReduce" << mapReduceTime;
|
||||
}
|
||||
qDebug() << "MapReduce speedup x" << ((double)singleThreadTime - (double)mapReduceTime) / (double)mapReduceTime + 1;
|
||||
|
@ -79,6 +79,32 @@ QVariant addAuthor(QSqlQuery &q, const QString &name, const QDate &birthdate)
|
||||
return q.lastInsertId();
|
||||
}
|
||||
|
||||
const auto BOOKS_SQL = QLatin1String(R"(
|
||||
create table books(id integer primary key, title varchar, author integer,
|
||||
genre integer, year integer, rating integer)
|
||||
)");
|
||||
|
||||
const auto AUTHORS_SQL = QLatin1String(R"(
|
||||
create table authors(id integer primary key, name varchar, birthdate date)
|
||||
)");
|
||||
|
||||
const auto GENRES_SQL = QLatin1String(R"(
|
||||
create table genres(id integer primary key, name varchar)
|
||||
)");
|
||||
|
||||
const auto INSERT_AUTHOR_SQL = QLatin1String(R"(
|
||||
insert into authors(name, birthdate) values(?, ?)
|
||||
)");
|
||||
|
||||
const auto INSERT_BOOK_SQL = QLatin1String(R"(
|
||||
insert into books(title, year, author, genre, rating)
|
||||
values(?, ?, ?, ?, ?)
|
||||
)");
|
||||
|
||||
const auto INSERT_GENRE_SQL = QLatin1String(R"(
|
||||
insert into genres(name) values(?)
|
||||
)");
|
||||
|
||||
QSqlError initDb()
|
||||
{
|
||||
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
|
||||
@ -93,26 +119,26 @@ QSqlError initDb()
|
||||
return QSqlError();
|
||||
|
||||
QSqlQuery q;
|
||||
if (!q.exec(QLatin1String("create table books(id integer primary key, title varchar, author integer, genre integer, year integer, rating integer)")))
|
||||
if (!q.exec(BOOKS_SQL))
|
||||
return q.lastError();
|
||||
if (!q.exec(QLatin1String("create table authors(id integer primary key, name varchar, birthdate date)")))
|
||||
if (!q.exec(AUTHORS_SQL))
|
||||
return q.lastError();
|
||||
if (!q.exec(QLatin1String("create table genres(id integer primary key, name varchar)")))
|
||||
if (!q.exec(GENRES_SQL))
|
||||
return q.lastError();
|
||||
|
||||
if (!q.prepare(QLatin1String("insert into authors(name, birthdate) values(?, ?)")))
|
||||
if (!q.prepare(INSERT_AUTHOR_SQL))
|
||||
return q.lastError();
|
||||
QVariant asimovId = addAuthor(q, QLatin1String("Isaac Asimov"), QDate(1920, 2, 1));
|
||||
QVariant greeneId = addAuthor(q, QLatin1String("Graham Greene"), QDate(1904, 10, 2));
|
||||
QVariant pratchettId = addAuthor(q, QLatin1String("Terry Pratchett"), QDate(1948, 4, 28));
|
||||
|
||||
if (!q.prepare(QLatin1String("insert into genres(name) values(?)")))
|
||||
if (!q.prepare(INSERT_GENRE_SQL))
|
||||
return q.lastError();
|
||||
QVariant sfiction = addGenre(q, QLatin1String("Science Fiction"));
|
||||
QVariant fiction = addGenre(q, QLatin1String("Fiction"));
|
||||
QVariant fantasy = addGenre(q, QLatin1String("Fantasy"));
|
||||
|
||||
if (!q.prepare(QLatin1String("insert into books(title, year, author, genre, rating) values(?, ?, ?, ?, ?)")))
|
||||
if (!q.prepare(INSERT_BOOK_SQL))
|
||||
return q.lastError();
|
||||
addBook(q, QLatin1String("Foundation"), 1951, asimovId, sfiction, 3);
|
||||
addBook(q, QLatin1String("Foundation and Empire"), 1952, asimovId, sfiction, 4);
|
||||
|
@ -327,9 +327,12 @@
|
||||
\snippet mainwindows/application/mainwindow.cpp 44
|
||||
\snippet mainwindows/application/mainwindow.cpp 45
|
||||
|
||||
Saving a file is very similar to loading one. Here, the
|
||||
QFile::Text flag ensures that on Windows, "\\n" is converted into
|
||||
"\\r\\n" to conform to the Windows convension.
|
||||
Saving a file is similar to loading one. We use QSaveFile to ensure
|
||||
all data are safely written and existing files are not damaged
|
||||
should writing fail.
|
||||
We use the QFile::Text flag to make sure that on Windows, "\\n"
|
||||
is converted into "\\r\\n" to conform to the Windows convention.
|
||||
|
||||
|
||||
\snippet mainwindows/application/mainwindow.cpp 46
|
||||
\snippet mainwindows/application/mainwindow.cpp 47
|
||||
|
@ -30,7 +30,7 @@
|
||||
\title Class Wizard Example
|
||||
\ingroup examples-dialogs
|
||||
|
||||
\brief The License Wizard example shows how to implement linear
|
||||
\brief The Class Wizard example shows how to implement linear
|
||||
wizards using QWizard.
|
||||
|
||||
\image classwizard.png Screenshot of the Class Wizard example
|
||||
|
@ -269,7 +269,7 @@
|
||||
\codeline
|
||||
\snippet itemviews/stardelegate/main.cpp 4
|
||||
|
||||
Notice the call to qVariantFromValue to convert a \c
|
||||
Notice the call to QVariant::fromValue to convert a \c
|
||||
StarRating to a QVariant.
|
||||
|
||||
\section1 Possible Extensions and Suggestions
|
||||
|
@ -533,8 +533,6 @@ Scene::Scene(int width, int height, int maxTextureSize)
|
||||
m_timer->setInterval(20);
|
||||
connect(m_timer, &QTimer::timeout, this, [this](){ update(); });
|
||||
m_timer->start();
|
||||
|
||||
m_time.start();
|
||||
}
|
||||
|
||||
Scene::~Scene()
|
||||
|
@ -220,7 +220,7 @@ private:
|
||||
void initGL();
|
||||
QPointF pixelPosToViewPos(const QPointF& p);
|
||||
|
||||
QTime m_time;
|
||||
QTime m_time; // ### Qt 6: remove (unused)
|
||||
int m_lastTime;
|
||||
int m_mouseEventTime;
|
||||
int m_distExp;
|
||||
|
@ -353,24 +353,28 @@ void MainWindow::loadFile(const QString &fileName)
|
||||
bool MainWindow::saveFile(const QString &fileName)
|
||||
//! [44] //! [45]
|
||||
{
|
||||
QFile file(fileName);
|
||||
if (!file.open(QFile::WriteOnly | QFile::Text)) {
|
||||
QMessageBox::warning(this, tr("Application"),
|
||||
tr("Cannot write file %1:\n%2.")
|
||||
.arg(QDir::toNativeSeparators(fileName),
|
||||
file.errorString()));
|
||||
QString errorMessage;
|
||||
|
||||
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
QSaveFile file(fileName);
|
||||
if (file.open(QFile::WriteOnly | QFile::Text)) {
|
||||
QTextStream out(&file);
|
||||
out << textEdit->toPlainText();
|
||||
if (!file.commit()) {
|
||||
errorMessage = tr("Cannot write file %1:\n%2.")
|
||||
.arg(QDir::toNativeSeparators(fileName), file.errorString());
|
||||
}
|
||||
} else {
|
||||
errorMessage = tr("Cannot open file %1 for writing:\n%2.")
|
||||
.arg(QDir::toNativeSeparators(fileName), file.errorString());
|
||||
}
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
|
||||
if (!errorMessage.isEmpty()) {
|
||||
QMessageBox::warning(this, tr("Application"), errorMessage);
|
||||
return false;
|
||||
}
|
||||
|
||||
QTextStream out(&file);
|
||||
#ifndef QT_NO_CURSOR
|
||||
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
#endif
|
||||
out << textEdit->toPlainText();
|
||||
#ifndef QT_NO_CURSOR
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
#endif
|
||||
|
||||
setCurrentFile(fileName);
|
||||
statusBar()->showMessage(tr("File saved"), 2000);
|
||||
return true;
|
||||
|
@ -115,19 +115,28 @@ bool MdiChild::saveAs()
|
||||
|
||||
bool MdiChild::saveFile(const QString &fileName)
|
||||
{
|
||||
QFile file(fileName);
|
||||
if (!file.open(QFile::WriteOnly | QFile::Text)) {
|
||||
QMessageBox::warning(this, tr("MDI"),
|
||||
tr("Cannot write file %1:\n%2.")
|
||||
.arg(QDir::toNativeSeparators(fileName), file.errorString()));
|
||||
QString errorMessage;
|
||||
|
||||
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
QSaveFile file(fileName);
|
||||
if (file.open(QFile::WriteOnly | QFile::Text)) {
|
||||
QTextStream out(&file);
|
||||
out << toPlainText();
|
||||
if (!file.commit()) {
|
||||
errorMessage = tr("Cannot write file %1:\n%2.")
|
||||
.arg(QDir::toNativeSeparators(fileName), file.errorString());
|
||||
}
|
||||
} else {
|
||||
errorMessage = tr("Cannot open file %1 for writing:\n%2.")
|
||||
.arg(QDir::toNativeSeparators(fileName), file.errorString());
|
||||
}
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
|
||||
if (!errorMessage.isEmpty()) {
|
||||
QMessageBox::warning(this, tr("MDI"), errorMessage);
|
||||
return false;
|
||||
}
|
||||
|
||||
QTextStream out(&file);
|
||||
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
out << toPlainText();
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
|
||||
setCurrentFile(fileName);
|
||||
return true;
|
||||
}
|
||||
|
@ -425,19 +425,28 @@ void MainWindow::openRecentFile()
|
||||
|
||||
bool MainWindow::saveFile(const QString &fileName)
|
||||
{
|
||||
QFile file(fileName);
|
||||
if (!file.open(QFile::WriteOnly | QFile::Text)) {
|
||||
QMessageBox::warning(this, tr("SDI"),
|
||||
tr("Cannot write file %1:\n%2.")
|
||||
.arg(QDir::toNativeSeparators(fileName), file.errorString()));
|
||||
QString errorMessage;
|
||||
|
||||
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
QSaveFile file(fileName);
|
||||
if (file.open(QFile::WriteOnly | QFile::Text)) {
|
||||
QTextStream out(&file);
|
||||
out << textEdit->toPlainText();
|
||||
if (!file.commit()) {
|
||||
errorMessage = tr("Cannot write file %1:\n%2.")
|
||||
.arg(QDir::toNativeSeparators(fileName), file.errorString());
|
||||
}
|
||||
} else {
|
||||
errorMessage = tr("Cannot open file %1 for writing:\n%2.")
|
||||
.arg(QDir::toNativeSeparators(fileName), file.errorString());
|
||||
}
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
|
||||
if (!errorMessage.isEmpty()) {
|
||||
QMessageBox::warning(this, tr("SDI"), errorMessage);
|
||||
return false;
|
||||
}
|
||||
|
||||
QTextStream out(&file);
|
||||
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
out << textEdit->toPlainText();
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
|
||||
setCurrentFile(fileName);
|
||||
statusBar()->showMessage(tr("File saved"), 2000);
|
||||
return true;
|
||||
|
@ -54,7 +54,7 @@
|
||||
#include "arthurwidgets.h"
|
||||
|
||||
#include <QBasicTimer>
|
||||
#include <QDateTime>
|
||||
#include <QElapsedTimer>
|
||||
#include <QPainterPath>
|
||||
|
||||
class PathDeformRenderer : public ArthurFrame
|
||||
@ -103,7 +103,7 @@ private:
|
||||
QBasicTimer m_repaintTimer;
|
||||
// QBasicTimer m_fpsTimer;
|
||||
// int m_fpsCounter;
|
||||
QTime m_repaintTracker;
|
||||
QElapsedTimer m_repaintTracker;
|
||||
|
||||
QVector<QPainterPath> m_paths;
|
||||
QVector<QPointF> m_advances;
|
||||
|
@ -64,9 +64,9 @@ void NorwegianWoodStyle::polish(QPalette &palette)
|
||||
QColor beige(236, 182, 120);
|
||||
QColor slightlyOpaqueBlack(0, 0, 0, 63);
|
||||
|
||||
QPixmap backgroundImage(":/images/woodbackground.png");
|
||||
QPixmap buttonImage(":/images/woodbutton.png");
|
||||
QPixmap midImage = buttonImage;
|
||||
QImage backgroundImage(":/images/woodbackground.png");
|
||||
QImage buttonImage(":/images/woodbutton.png");
|
||||
QImage midImage = buttonImage.convertToFormat(QImage::Format_RGB32);
|
||||
|
||||
QPainter painter;
|
||||
painter.begin(&midImage);
|
||||
@ -311,11 +311,12 @@ void NorwegianWoodStyle::drawControl(ControlElement element,
|
||||
//! [37]
|
||||
void NorwegianWoodStyle::setTexture(QPalette &palette, QPalette::ColorRole role,
|
||||
//! [37] //! [38]
|
||||
const QPixmap &pixmap)
|
||||
const QImage &image)
|
||||
{
|
||||
for (int i = 0; i < QPalette::NColorGroups; ++i) {
|
||||
QColor color = palette.brush(QPalette::ColorGroup(i), role).color();
|
||||
palette.setBrush(QPalette::ColorGroup(i), role, QBrush(color, pixmap));
|
||||
QBrush brush(image);
|
||||
brush.setColor(palette.brush(QPalette::ColorGroup(i), role).color());
|
||||
palette.setBrush(QPalette::ColorGroup(i), role, brush);
|
||||
}
|
||||
}
|
||||
//! [38]
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
|
||||
private:
|
||||
static void setTexture(QPalette &palette, QPalette::ColorRole role,
|
||||
const QPixmap &pixmap);
|
||||
const QImage &image);
|
||||
static QPainterPath roundRectPath(const QRect &rect);
|
||||
};
|
||||
//! [0]
|
||||
|
@ -27,7 +27,7 @@ else: equals(ANDROID_TARGET_ARCH, x86_64): \
|
||||
|
||||
QMAKE_CFLAGS += -gcc-toolchain $$NDK_TOOLCHAIN_PATH -fno-limit-debug-info
|
||||
|
||||
QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a
|
||||
QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a -nostdlib++
|
||||
equals(ANDROID_TARGET_ARCH, armeabi-v7a): QMAKE_LINK += -Wl,--exclude-libs,libunwind.a
|
||||
|
||||
QMAKE_CFLAGS += -DANDROID_HAS_WSTRING --sysroot=$$NDK_ROOT/sysroot \
|
||||
|
@ -57,8 +57,10 @@
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
|
||||
#include "../posix/qplatformdefs.h"
|
||||
#define __LINUX_ERRNO_EXTENSIONS__
|
||||
#include <errno.h>
|
||||
|
||||
#include "../posix/qplatformdefs.h"
|
||||
|
||||
#ifdef __STRICT_ANSI__
|
||||
#undef __STRICT_ANSI__
|
||||
|
@ -31,7 +31,7 @@ QMAKE_LIBS_OPENGL_ES2 = $${VC_LINK_LINE} -lGLESv2
|
||||
# The official opt vc EGL references GLESv2 symbols: need to link it
|
||||
QMAKE_LIBS_EGL = $${VC_LINK_LINE} -lEGL -lGLESv2
|
||||
|
||||
QMAKE_LIBDIR_BCM_HOST = $$VC_LIBRARY_PATH
|
||||
QMAKE_LIBDIR_BCM_HOST = =$$VC_LIBRARY_PATH
|
||||
QMAKE_INCDIR_BCM_HOST = $$VC_INCLUDE_PATH
|
||||
QMAKE_LIBS_BCM_HOST = -lbcm_host
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
# output check that "EGLFS GBM .......... yes" is present, otherwise
|
||||
# eglfs will not be functional.
|
||||
#
|
||||
# ./configure -release -opengl es2 -device linux-rpi3-vc4-g++ \
|
||||
# ./configure -release -opengl es2 -device linux-rasp-pi3-vc4-g++ \
|
||||
# -device-option CROSS_COMPILE=~/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \
|
||||
# -sysroot ~/raspbian/sysroot \
|
||||
# -prefix /usr/local/qt5pi -extprefix ~/raspbian/qt5pi -hostprefix ~/raspbian/qt5 \
|
||||
|
@ -1,3 +1,21 @@
|
||||
APK_PATH = $$shell_path($$OUT_PWD/android-build/$${TARGET}.apk)
|
||||
!contains(TEMPLATE, subdirs): {
|
||||
apk_install_target.target = apk_install_target
|
||||
apk_install_target.depends = first
|
||||
apk_install_target.commands = $(MAKE) -f $(MAKEFILE) INSTALL_ROOT=$$OUT_PWD/android-build install
|
||||
|
||||
apk.target = apk
|
||||
apk.depends = apk_install_target
|
||||
qtPrepareTool(ANDROIDDEPLOYQT, androiddeployqt)
|
||||
isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET-deployment-settings.json
|
||||
contains(QMAKE_HOST.os, Windows): extension = .exe
|
||||
apk.commands = $$ANDROIDDEPLOYQT --input $$ANDROID_DEPLOYMENT_SETTINGS_FILE --output $$OUT_PWD/android-build --apk $$APK_PATH
|
||||
} else {
|
||||
prepareRecursiveTarget(apk)
|
||||
prepareRecursiveTarget(apk_install_target)
|
||||
}
|
||||
QMAKE_EXTRA_TARGETS *= apk apk_install_target
|
||||
|
||||
contains(TEMPLATE, ".*app") {
|
||||
!android_app {
|
||||
!contains(TARGET, ".so"): TARGET = lib$${TARGET}.so
|
||||
|
6
mkspecs/features/android/spec_post.prf
Normal file
6
mkspecs/features/android/spec_post.prf
Normal file
@ -0,0 +1,6 @@
|
||||
load(spec_post)
|
||||
|
||||
# Work around idiosyncracy in Android NDK's make executable
|
||||
# which tries to call the shell-builtin "move" as direct process
|
||||
equals(QMAKE_HOST.os, Windows):equals(QMAKE_MOVE, move): \
|
||||
QMAKE_MOVE = cmd /c move
|
@ -34,10 +34,20 @@ CMAKE_INCLUDE_NAME = $$eval(QT.$${MODULE}.name)
|
||||
|
||||
# TARGET here is the one changed at the end of qt_module.prf,
|
||||
# which already contains the Qt5 prefix and QT_LIBINFIX suffix :
|
||||
# Qt5Core_suffix, Qt5Network_suffix, Foo_suffix
|
||||
# (or QtCore_suffix, Foo_suffix on macos with -framework)
|
||||
# Qt5Core_{libinfix_suffix}, Qt5Network_{libinfix_suffix}, Foo_{libinfix_suffix}
|
||||
# (or QtCore_{libinfix_suffix}, Foo_{libinfix_suffix} on macos with -framework).
|
||||
CMAKE_QT_STEM = $${TARGET}
|
||||
|
||||
# On macOS when building just a debug configuration which is not part of debug_and_release,
|
||||
# $${TARGET} already contains a _debug suffix, as per the following call chain:
|
||||
# qt_module.prf -> qt5LibraryTarget -> qtLibraryTarget -> qtPlatformTargetSuffix.
|
||||
# Remove the _debug suffix in the stem, to keep all further uses of CMAKE_QT_STEM consistent.
|
||||
# The _debug suffix is then re-added where needed regardless if it's a debug_and_release build
|
||||
# or just debug.
|
||||
darwin:!qt_framework:!debug_and_release:CONFIG(debug, debug|release) {
|
||||
CMAKE_QT_STEM = $$replace(CMAKE_QT_STEM, _debug$, )
|
||||
}
|
||||
|
||||
!generated_privates {
|
||||
isEmpty(SYNCQT.INJECTED_PRIVATE_HEADER_FILES):isEmpty(SYNCQT.PRIVATE_HEADER_FILES): \
|
||||
CMAKE_NO_PRIVATE_INCLUDES = true
|
||||
@ -211,18 +221,18 @@ CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";")
|
||||
|
||||
mac {
|
||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
|
||||
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.prl
|
||||
CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.prl
|
||||
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
|
||||
} else {
|
||||
qt_framework {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}_debug
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
|
||||
CMAKE_BUILD_IS_FRAMEWORK = "true"
|
||||
} else {
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.$$eval(QT.$${MODULE}.VERSION).dylib
|
||||
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.$$eval(QT.$${MODULE}.VERSION).dylib
|
||||
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$$eval(QT.$${MODULE}.VERSION).dylib
|
||||
}
|
||||
}
|
||||
|
@ -56,9 +56,17 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
|
||||
get_filename_component(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" ABSOLUTE)
|
||||
|
||||
if(EXISTS \"${prl_file_location}\")
|
||||
file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS[ \\t]*=\")
|
||||
string(REGEX REPLACE \"QMAKE_PRL_LIBS[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends ${_prl_strings})
|
||||
string(REGEX REPLACE \"[ \\t]+\" \";\" _static_depends ${_static_depends})
|
||||
file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=\")
|
||||
|
||||
# file(STRINGS) replaces all semicolons read from the file with backslash semicolons.
|
||||
# We need to do a reverse transformation in CMake. For that we replace all backslash
|
||||
# semicolons with just semicolons, but due to the qmake substitution feature
|
||||
# creating this file, we need to double the amount of backslashes, so the final file
|
||||
# should have three backslashes and one semicolon.
|
||||
string(REGEX REPLACE \"\\\\\\;\" \";\" _prl_strings \"${_prl_strings}\")
|
||||
|
||||
string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends \"${_prl_strings}\")
|
||||
string(REGEX REPLACE \"[ \\t]+\" \";\" _standard_libraries \"${CMAKE_CXX_STANDARD_LIBRARIES}\")
|
||||
set(_search_paths)
|
||||
string(REPLACE \"\\$\\$[QT_INSTALL_LIBS]\" \"${_qt5_install_libs}\" _static_depends \"${_static_depends}\")
|
||||
foreach(_flag ${_static_depends})
|
||||
@ -66,7 +74,15 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
|
||||
if(_flag MATCHES \"^-l(.*)$\")
|
||||
# Handle normal libraries passed as -lfoo
|
||||
set(_lib \"${CMAKE_MATCH_1}\")
|
||||
if(_lib MATCHES \"^pthread$\")
|
||||
foreach(_standard_library ${_standard_libraries})
|
||||
if(_standard_library MATCHES \"^${_lib}(\\.lib)?$\")
|
||||
set(_lib_is_default_linked TRUE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
if (_lib_is_default_linked)
|
||||
unset(_lib_is_default_linked)
|
||||
elseif(_lib MATCHES \"^pthread$\")
|
||||
find_package(Threads REQUIRED)
|
||||
list(APPEND _lib_deps Threads::Threads)
|
||||
else()
|
||||
|
@ -21,7 +21,9 @@ RUN echo "#!/usr/bin/env bash\n" \
|
||||
RUN chmod +x startup.sh
|
||||
|
||||
# rewrite the default configurations of avahi-daemon
|
||||
# Disable IPv6 of avahi-daemon to resolve the unstable connections on Windows
|
||||
ARG test_domain
|
||||
RUN sed -i -e "s,#domain-name=local,domain-name=${test_domain:-test-net.qt.local}," \
|
||||
-e "s,#publish-aaaa-on-ipv4=yes,publish-aaaa-on-ipv4=no," \
|
||||
-e "s,use-ipv6=yes,use-ipv6=no," \
|
||||
/etc/avahi/avahi-daemon.conf
|
||||
|
38
mkspecs/features/data/testserver/docker-compose-common.yml
Normal file
38
mkspecs/features/data/testserver/docker-compose-common.yml
Normal file
@ -0,0 +1,38 @@
|
||||
version: '2.1'
|
||||
|
||||
# This is a template docker-compose file shared with all modules. It is based
|
||||
# on 'extending services' feature of compose file version 2.1.
|
||||
# See https://docs.docker.com/compose/extends/#extending-services for details.
|
||||
#
|
||||
# Example: testserver/docker-compose.yml
|
||||
# services:
|
||||
# foo:
|
||||
# extends:
|
||||
# file: ${SHARED_DATA}/docker-compose-common.yml
|
||||
# service: ${SHARED_SERVICE}
|
||||
# container_name: qt-test-server-foo
|
||||
# hostname: ${HOST_NAME:-foo}
|
||||
# build:
|
||||
# context: .
|
||||
# args:
|
||||
# provisioningImage: qt-test-server-foo:537fe302f61851d1663...
|
||||
# serviceDir: ./foo
|
||||
# command: service/foo.sh
|
||||
|
||||
x-services:
|
||||
&default-service
|
||||
domainname: ${TEST_DOMAIN}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ${SHARED_DATA}/Dockerfile
|
||||
args:
|
||||
test_domain: ${TEST_DOMAIN}
|
||||
entrypoint: ./startup.sh
|
||||
|
||||
services:
|
||||
bridge-network: *default-service
|
||||
host-network:
|
||||
<< : *default-service
|
||||
network_mode: "host"
|
||||
extra_hosts:
|
||||
- "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
|
@ -38,5 +38,5 @@ defineTest(addExclusiveBuilds) {
|
||||
}
|
||||
|
||||
# Default directories to process
|
||||
QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR QGLTF_DIR DESTDIR TRACEGEN_DIR QMLCACHE_DIR LRELEASE_DIR
|
||||
QMAKE_DIR_REPLACE_SANE += QGLTF_DIR TRACEGEN_DIR QMLCACHE_DIR LRELEASE_DIR
|
||||
QMAKE_DIR_REPLACE_SANE += QGLTF_DIR TRACEGEN_DIR QMLCACHE_DIR LRELEASE_DIR LEX_DIR YACC_DIR
|
||||
QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR DESTDIR $$QMAKE_DIR_REPLACE_SANE
|
||||
|
@ -2,6 +2,38 @@
|
||||
# Lex extra-compiler for handling files specified in the LEXSOURCES variable
|
||||
#
|
||||
|
||||
isEmpty(LEX_DIR): LEX_DIR = .
|
||||
|
||||
defineReplace(lexCommands) {
|
||||
input = $$relative_path($$absolute_path($$1, $$OUT_PWD), $$OUT_PWD/$$LEX_DIR)
|
||||
output = $$basename(2)
|
||||
input_base = $$basename(1)
|
||||
input_base ~= s/\.[^.]*$//
|
||||
|
||||
isEmpty(QMAKE_LEXFLAGS_MANGLE): QMAKE_LEXFLAGS_MANGLE = -P$${input_base}
|
||||
QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS
|
||||
!yacc_no_name_mangle: QMAKE_LEXEXTRAFLAGS += $$QMAKE_LEXFLAGS_MANGLE
|
||||
|
||||
contains(QMAKE_LEX, .*flex) {
|
||||
# GNU flex, we can use -o outfile
|
||||
commands = $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS --nounistd -o $$output $$input
|
||||
} else {
|
||||
# stupid POSIX lex, it only generates a file called lex.yy.c
|
||||
# or lex.prefix.c if the -P<prefix> option is active
|
||||
intermediate_file = lex.yy.c
|
||||
QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS $$QMAKE_LEXFLAGS_MANGLE
|
||||
|
||||
commands = \
|
||||
-$(DEL_FILE) $${output}$$escape_expand(\\n\\t) \
|
||||
$$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS $${input}$$escape_expand(\\n\\t) \
|
||||
$(MOVE) $$intermediate_file $$output $$escape_expand(\\n\\t)
|
||||
}
|
||||
!equals(LEX_DIR, .): \
|
||||
commands = cd $$LEX_DIR && $$commands
|
||||
silent: commands = @echo Lex $$1 && $$commands
|
||||
return($$commands)
|
||||
}
|
||||
|
||||
{
|
||||
lex.name = Lex ${QMAKE_FILE_IN}
|
||||
lex.input = LEXSOURCES
|
||||
@ -12,27 +44,7 @@
|
||||
lex.variable_out = GENERATED_SOURCES
|
||||
}
|
||||
|
||||
isEmpty(QMAKE_LEXFLAGS_MANGLE):QMAKE_LEXFLAGS_MANGLE = -P${QMAKE_FILE_BASE}
|
||||
QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS
|
||||
!yacc_no_name_mangle:QMAKE_LEXEXTRAFLAGS += $$QMAKE_LEXFLAGS_MANGLE
|
||||
|
||||
contains(QMAKE_LEX, .*flex) {
|
||||
# GNU flex, we can use -o outfile
|
||||
lex.commands = $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS --nounistd -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
|
||||
} else {
|
||||
# stupid POSIX lex, it only generates a file called lex.yy.c
|
||||
# or lex.prefix.c if the -P<prefix> option is active
|
||||
intermediate_file = lex.yy.c
|
||||
QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS $$QMAKE_LEXFLAGS_MANGLE
|
||||
|
||||
lex.commands = \
|
||||
-$(DEL_FILE) ${QMAKE_FILE_OUT}$$escape_expand(\\n\\t) \
|
||||
$$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS ${QMAKE_FILE_IN}$$escape_expand(\\n\\t) \
|
||||
$(MOVE) $$intermediate_file ${QMAKE_FILE_OUT} $$escape_expand(\\n\\t)
|
||||
unset(intermediate_file)
|
||||
}
|
||||
lex.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_LEX}$${first(QMAKE_EXT_CPP)}
|
||||
|
||||
silent:lex.commands = @echo Lex ${QMAKE_FILE_IN} && $$lex.commands
|
||||
lex.commands = ${QMAKE_FUNC_lexCommands}
|
||||
lex.output = $$LEX_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_LEX}$${first(QMAKE_EXT_CPP)}
|
||||
QMAKE_EXTRA_COMPILERS += lex
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
CONFIG(release, debug|release) {
|
||||
static:no-static-ltcg {
|
||||
# Static library but no-static-ltcg enabled: skip LTCG
|
||||
} else: CONFIG(release, debug|release) {
|
||||
# We need fat object files when creating static libraries on some platforms
|
||||
# so the linker will know to load a particular object from the library
|
||||
# in the first place. On others, we have special ar and nm to create the symbol
|
||||
@ -22,13 +24,16 @@ CONFIG(release, debug|release) {
|
||||
}
|
||||
}
|
||||
|
||||
fat-lto {
|
||||
fat-lto|if(static:fat-static-lto) {
|
||||
QMAKE_CFLAGS_LTCG += $$QMAKE_CFLAGS_LTCG_FATOBJECTS
|
||||
QMAKE_CXXFLAGS_LTCG += $$QMAKE_CXXFLAGS_LTCG_FATOBJECTS
|
||||
}
|
||||
|
||||
load(link_ltcg)
|
||||
QMAKE_CFLAGS *= $$QMAKE_CFLAGS_LTCG
|
||||
QMAKE_CXXFLAGS *= $$QMAKE_CXXFLAGS_LTCG
|
||||
QMAKE_LFLAGS *= $$QMAKE_LFLAGS_LTCG
|
||||
QMAKE_CFLAGS -= $$QMAKE_CFLAGS_LTCG
|
||||
QMAKE_CFLAGS += $$QMAKE_CFLAGS_LTCG
|
||||
QMAKE_CXXFLAGS -= $$QMAKE_CXXFLAGS_LTCG
|
||||
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_LTCG
|
||||
QMAKE_LFLAGS -= $$QMAKE_LFLAGS_LTCG
|
||||
QMAKE_LFLAGS += $$QMAKE_LFLAGS_LTCG
|
||||
}
|
||||
|
@ -1,8 +1,14 @@
|
||||
!isEmpty(SOURCES) {
|
||||
QT += qml qmltest
|
||||
load(testcase)
|
||||
contains(TEMPLATE, vc.*): DEFINES += QUICK_TEST_SOURCE_DIR=\"$$_PRO_FILE_PWD_\"
|
||||
else: DEFINES += QUICK_TEST_SOURCE_DIR=$$shell_quote(\"$$_PRO_FILE_PWD_\")
|
||||
!android {
|
||||
contains(TEMPLATE, vc.*): DEFINES += QUICK_TEST_SOURCE_DIR=\"$$_PRO_FILE_PWD_\"
|
||||
else: DEFINES += QUICK_TEST_SOURCE_DIR=$$shell_quote(\"$$_PRO_FILE_PWD_\")
|
||||
} else {
|
||||
!isEmpty(RESOURCES): warning("The RESOURCES qmake variable is empty, the test will probably fail to run")
|
||||
DEFINES += QUICK_TEST_SOURCE_DIR=\":/\"
|
||||
}
|
||||
|
||||
} else {
|
||||
# Allow a project to run tests without a CPP stub
|
||||
TEMPLATE = aux
|
||||
|
@ -37,8 +37,10 @@ intel_icl {
|
||||
|
||||
QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR
|
||||
|
||||
load(qt_prefix_build_check)
|
||||
|
||||
# force_independent can be set externally. prefix_build not.
|
||||
!exists($$[QT_HOST_DATA]/.qmake.cache): \
|
||||
qtIsPrefixBuild($$[QT_HOST_DATA]): \
|
||||
CONFIG += prefix_build force_independent
|
||||
|
||||
!build_pass:!isEmpty(_QMAKE_SUPER_CACHE_):force_independent {
|
||||
|
@ -51,6 +51,12 @@ contains(TEMPLATE, .*lib) {
|
||||
}
|
||||
lib_replace.CONFIG = path
|
||||
QMAKE_PRL_INSTALL_REPLACE += lib_replace
|
||||
!equals(qt_libdir, $$rplbase/lib) {
|
||||
qtlibdir_replace.match = $$qt_libdir
|
||||
qtlibdir_replace.replace = $$qqt_libdir
|
||||
qtlibdir_replace.CONFIG = path
|
||||
QMAKE_PRL_INSTALL_REPLACE += qtlibdir_replace
|
||||
}
|
||||
}
|
||||
|
||||
# The remainder of this file must not apply to host tools/libraries,
|
||||
@ -146,8 +152,8 @@ warnings_are_errors:warning_clean {
|
||||
android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix
|
||||
}
|
||||
} else:msvc:!intel_icl {
|
||||
# enable for MSVC 2012, MSVC 2013, MSVC 2015
|
||||
contains(MSVC_VER, "1[124].0"): QMAKE_CXXFLAGS_WARN_ON += -WX
|
||||
# enable for MSVC 2015, MSVC 2017
|
||||
contains(MSVC_VER, "1[45].0"): QMAKE_CXXFLAGS_WARN_ON += -WX
|
||||
}
|
||||
unset(ver)
|
||||
}
|
||||
|
@ -2517,17 +2517,19 @@ logn("Configure summary:")
|
||||
logn()
|
||||
qtConfPrintReport()
|
||||
|
||||
load(qt_prefix_build_check)
|
||||
|
||||
# final notes for the user
|
||||
logn()
|
||||
logn("Qt is now configured for building. Just run '$$QMAKE_MAKE_NAME'.")
|
||||
pfx = $$[QT_INSTALL_PREFIX]
|
||||
exists($$pfx/.qmake.cache) {
|
||||
qtIsPrefixBuild($$pfx) {
|
||||
logn("Once everything is built, you must run '$$QMAKE_MAKE_NAME install'.")
|
||||
logn("Qt will be installed into '$$system_path($$pfx)'.")
|
||||
} else {
|
||||
logn("Once everything is built, Qt is installed.")
|
||||
logn("You should NOT run '$$QMAKE_MAKE_NAME install'.")
|
||||
logn("Note that this build cannot be deployed to other machines or devices.")
|
||||
} else {
|
||||
logn("Once everything is built, you must run '$$QMAKE_MAKE_NAME install'.")
|
||||
logn("Qt will be installed into '$$system_path($$pfx)'.")
|
||||
}
|
||||
logn()
|
||||
logn("Prior to reconfiguration, make sure you remove any leftovers from")
|
||||
|
@ -82,6 +82,11 @@ header_module {
|
||||
CONFIG += force_qt # Needed for the headers_clean tests.
|
||||
!lib_bundle: \
|
||||
CONFIG += qt_no_install_library
|
||||
|
||||
# Allow creation of .prl, .la and .pc files.
|
||||
target.path = $$[QT_INSTALL_LIBS]
|
||||
target.CONFIG += dummy_install
|
||||
INSTALLS += target
|
||||
} else {
|
||||
TEMPLATE = lib
|
||||
}
|
||||
@ -286,6 +291,12 @@ load(qt_targets)
|
||||
QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))$$qtPlatformTargetSuffix()
|
||||
isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \
|
||||
QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module
|
||||
!isEmpty(lib_replace0.match) {
|
||||
pclib_replace0.match = $$lib_replace0.match
|
||||
pclib_replace0.replace = $$QMAKE_PKGCONFIG_LIBDIR/
|
||||
pclib_replace0.CONFIG = path
|
||||
QMAKE_PKGCONFIG_INSTALL_REPLACE += pclib_replace0
|
||||
}
|
||||
pclib_replace.match = $$lib_replace.match
|
||||
!isEmpty(lib_replace.replace): \
|
||||
pclib_replace.replace = $$QMAKE_PKGCONFIG_LIBDIR
|
||||
@ -298,6 +309,12 @@ load(qt_targets)
|
||||
QMAKE_LIBTOOL_LIBDIR = $$[QT_HOST_LIBS]
|
||||
else: \
|
||||
QMAKE_LIBTOOL_LIBDIR = "=$$[QT_INSTALL_LIBS/raw]"
|
||||
!isEmpty(lib_replace0.match) {
|
||||
ltlib_replace0.match = $$lib_replace0.match
|
||||
ltlib_replace0.replace = $$QMAKE_LIBTOOL_LIBDIR/
|
||||
ltlib_replace0.CONFIG = path
|
||||
QMAKE_LIBTOOL_INSTALL_REPLACE += ltlib_replace0
|
||||
}
|
||||
ltlib_replace.match = $$lib_replace.match
|
||||
!isEmpty(lib_replace.replace): \
|
||||
ltlib_replace.replace = $$QMAKE_LIBTOOL_LIBDIR
|
||||
|
@ -272,7 +272,7 @@ headersclean:!internal_module {
|
||||
hcleanFLAGS += -std=c++98
|
||||
}
|
||||
|
||||
hcleanCOMMAND = $$QMAKE_CXX -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -xc++ ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
hcleanCOMMAND = $(CXX) -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -xc++ ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
|
||||
} else: msvc:!intel_icl {
|
||||
# 4180: qualifier applied to function type has no meaning; ignored
|
||||
# 4458: declaration of 'identifier' hides class member
|
||||
@ -284,7 +284,7 @@ headersclean:!internal_module {
|
||||
# 4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc
|
||||
greaterThan(QMAKE_MSC_VER, 18): hcleanFLAGS += -wd4577
|
||||
|
||||
hcleanCOMMAND = $$QMAKE_CXX -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -FI${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT} \
|
||||
hcleanCOMMAND = $(CXX) -c $(CXXFLAGS) $$hcleanFLAGS $(INCPATH) $$hcleanDEFS -FI${QMAKE_FILE_IN} -Fo${QMAKE_FILE_OUT} \
|
||||
$$[QT_INSTALL_DATA/src]/mkspecs/features/data/dummy.cpp
|
||||
}
|
||||
|
||||
|
21
mkspecs/features/qt_prefix_build_check.prf
Normal file
21
mkspecs/features/qt_prefix_build_check.prf
Normal file
@ -0,0 +1,21 @@
|
||||
#
|
||||
# W A R N I N G
|
||||
# -------------
|
||||
#
|
||||
# This file is not part of the Qt API. It exists purely as an
|
||||
# implementation detail. It may change from version to version
|
||||
# without notice, or even be removed.
|
||||
#
|
||||
# We mean it.
|
||||
#
|
||||
|
||||
defineTest(qtIsPrefixBuild) {
|
||||
prefixdir = $$1
|
||||
# qtbase non-prefix build?
|
||||
exists($$prefixdir/.qmake.cache): \
|
||||
return(false)
|
||||
# top-level non-prefix build?
|
||||
contains(prefixdir, .*/qtbase):exists($$dirname(prefixdir)/.qmake.super): \
|
||||
return(false)
|
||||
return(true)
|
||||
}
|
@ -1,10 +1,33 @@
|
||||
# Sanitizer flags
|
||||
|
||||
|
||||
sanitize_address {
|
||||
QMAKE_CFLAGS += $$QMAKE_SANITIZE_ADDRESS_CFLAGS
|
||||
QMAKE_CXXFLAGS += $$QMAKE_SANITIZE_ADDRESS_CXXFLAGS
|
||||
QMAKE_LFLAGS += $$QMAKE_SANITIZE_ADDRESS_LFLAGS
|
||||
android {
|
||||
# ARM 32 (armeabi-v7a & arm5) are not supported because Qt must be rebuilt with -marm
|
||||
equals(ANDROID_TARGET_ARCH, arm64-v8a): ANDROID_LIBCLANG_RT_FILE = "libclang_rt.asan-aarch64-android.so"
|
||||
else: equals(ANDROID_TARGET_ARCH, x86): ANDROID_LIBCLANG_RT_FILE = "libclang_rt.asan-i686-android.so"
|
||||
else: equals(ANDROID_TARGET_ARCH, x86_64): ANDROID_LIBCLANG_RT_FILE = "libclang_rt.asan-x86_64-android.so"
|
||||
else: error("ASAN: Unsupported platform $${ANDROID_TARGET_ARCH}")
|
||||
|
||||
ANDROID_LIBCLANG_RT_PATH = $${NDK_LLVM_PATH}/lib64/clang
|
||||
ANDROID_CLANG_RT_VERSIONS = $$files($$ANDROID_LIBCLANG_RT_PATH/*)
|
||||
for (VERSION, ANDROID_CLANG_RT_VERSIONS) {
|
||||
greaterThan(VERSION, $$ANDROID_LIBCLANG_RT_PATH): ANDROID_LIBCLANG_RT_PATH = $$VERSION
|
||||
}
|
||||
ANDROID_LIBCLANG_RT_PATH = "$${ANDROID_LIBCLANG_RT_PATH}/lib/linux/"
|
||||
ANDROID_WRAP_SH_CONTENT = "$$LITERAL_HASH!/system/bin/sh"
|
||||
ANDROID_WRAP_SH_CONTENT += "HERE=\"$(cd \"$(dirname \"$0\")\" && pwd)\""
|
||||
isEmpty(ANDROID_ASAN_OPTIONS): ANDROID_ASAN_OPTIONS = "log_to_syslog=false,allow_user_segv_handler=1"
|
||||
ANDROID_WRAP_SH_CONTENT += "export ASAN_OPTIONS=$${ANDROID_ASAN_OPTIONS}"
|
||||
ANDROID_WRAP_SH_CONTENT += "export LD_PRELOAD=$HERE/$${ANDROID_LIBCLANG_RT_FILE}"
|
||||
ANDROID_WRAP_SH_CONTENT += "exec \"$@\""
|
||||
write_file($$OUT_PWD/android-build/resources/lib/$${ANDROID_TARGET_ARCH}/wrap.sh, ANDROID_WRAP_SH_CONTENT) | error()
|
||||
libclang_rt.path = /libs/$$ANDROID_TARGET_ARCH/
|
||||
libclang_rt.files = "$${ANDROID_LIBCLANG_RT_PATH}/$${ANDROID_LIBCLANG_RT_FILE}"
|
||||
INSTALLS += libclang_rt
|
||||
}
|
||||
}
|
||||
|
||||
sanitize_memory {
|
||||
|
@ -52,14 +52,26 @@ debug_and_release:debug_and_release_target {
|
||||
}
|
||||
|
||||
# Allow for a custom test runner script
|
||||
$${type}.commands += $(TESTRUNNER)
|
||||
|
||||
android: isEmpty($(TESTRUNNER)) {
|
||||
APK_PATH = $$shell_path($$OUT_PWD/android-build/$${TARGET}.apk)
|
||||
qtPrepareTool(ANDROIDTESTRUNNER, androidtestrunner)
|
||||
qtPrepareTool(ANDROIDDEPLOYQT, androiddeployqt)
|
||||
isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET-deployment-settings.json
|
||||
contains(QMAKE_HOST.os, Windows): extension = .exe
|
||||
$${type}.commands = $$ANDROIDTESTRUNNER --androiddeployqt \"$$ANDROIDDEPLOYQT --input $$ANDROID_DEPLOYMENT_SETTINGS_FILE\"
|
||||
$${type}.commands += --path \"$$OUT_PWD/android-build\"
|
||||
$${type}.commands += --adb \"$$shell_path($${ANDROID_SDK_ROOT}$${QMAKE_DIR_SEP}platform-tools$${QMAKE_DIR_SEP}adb$${extension})\"
|
||||
$${type}.commands += --make \"$(MAKE) -f $(MAKEFILE)\"
|
||||
$${type}.commands += --apk $$APK_PATH
|
||||
} else: $${type}.commands += $(TESTRUNNER)
|
||||
|
||||
unix {
|
||||
isEmpty(TEST_TARGET_DIR): TEST_TARGET_DIR = .
|
||||
|
||||
app_bundle: \
|
||||
$${type}.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
|
||||
else: \
|
||||
else: !android: \
|
||||
$${type}.commands += $${TEST_TARGET_DIR}/$(QMAKE_TARGET)
|
||||
} else {
|
||||
# Windows
|
||||
|
@ -94,29 +94,33 @@ isEmpty(TESTSERVER_VERSION) {
|
||||
# binds the same port on the host. An alternative solution is to deploy
|
||||
# the docker environment into VirtualBox using docker-machine.
|
||||
isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-for-macOS.yml
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-host-network.yml
|
||||
|
||||
# The connection configuration for the target machine
|
||||
MACHINE_CONFIG = $(shell docker-machine config qt-test-server)
|
||||
|
||||
# The environment variables passed to the docker-compose file
|
||||
TEST_ENV = 'MACHINE_IP=$(shell docker-machine ip qt-test-server)'
|
||||
TEST_ENV += 'HOST_NAME=qt-test-server'
|
||||
TEST_ENV += 'TEST_DOMAIN=$$DNSDOMAIN'
|
||||
TEST_ENV += 'SHARED_DATA=$$PWD/../data/testserver'
|
||||
TEST_ENV += 'SHARED_SERVICE=host-network'
|
||||
TEST_CMD = env
|
||||
} else:equals(QMAKE_HOST.os, Windows) {
|
||||
# There is no docker bridge on Windows. It is impossible to ping a container.
|
||||
# Use docker-machine to deploy the docker environment into VirtualBox.
|
||||
isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-for-windows.yml
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-host-network.yml
|
||||
|
||||
# The connection configuration for the target machine
|
||||
MACHINE_CONFIG = (docker-machine config qt-test-server)
|
||||
|
||||
# The environment variables passed to the docker-compose file
|
||||
TEST_ENV = '\$\$env:MACHINE_IP = docker-machine ip qt-test-server;'
|
||||
TEST_ENV += '\$\$env:HOST_NAME = $$shell_quote(\"qt-test-server\");'
|
||||
TEST_ENV += '\$\$env:TEST_DOMAIN = $$shell_quote(\"$$DNSDOMAIN\");'
|
||||
TEST_ENV += '\$\$env:SHARED_DATA = $$shell_quote(\"$$PWD/../data/testserver\");'
|
||||
TEST_ENV += '\$\$env:SHARED_SERVICE = $$shell_quote(\"host-network\");'
|
||||
|
||||
# Docker-compose CLI environment variables:
|
||||
# Enable path conversion from Windows-style to Unix-style in volume definitions.
|
||||
@ -126,12 +130,18 @@ isEmpty(TESTSERVER_VERSION) {
|
||||
CONFIG += PowerShell
|
||||
} else {
|
||||
isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-bridge-network.yml
|
||||
# The environment variables passed to the docker-compose file
|
||||
TEST_ENV = 'TEST_DOMAIN=$$DNSDOMAIN'
|
||||
TEST_ENV += 'SHARED_DATA=$$PWD/../data/testserver'
|
||||
TEST_ENV += 'SHARED_SERVICE=bridge-network'
|
||||
TEST_CMD = env
|
||||
}
|
||||
|
||||
# If $$TESTSERVER_COMPOSE_FILE defined by platform doesn't exist, the default
|
||||
# docker-compose.yml is used as a fallback.
|
||||
!exists($$TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
|
||||
$$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml
|
||||
!exists($$TESTSERVER_COMPOSE_FILE): error("Invalid TESTSERVER_COMPOSE_FILE specified")
|
||||
|
||||
|
||||
|
@ -22,15 +22,15 @@ dumpcpp_impl.depends += ${QMAKE_FILE_BASE}.h
|
||||
QMAKE_EXTRA_COMPILERS += dumpcpp_impl
|
||||
|
||||
|
||||
# Create dependencies from every object file to our generated header files.
|
||||
if(isEmpty(BUILDS)|build_pass):have_target:!contains(TEMPLATE, vc.*) {
|
||||
# Call dumpcpp the first time if the files do not exist to help find dependencies
|
||||
!build_pass:have_target:!contains(TEMPLATE, vc.*) {
|
||||
for(tlb, TYPELIBS) {
|
||||
tlbCopy = $$replace(tlb, \", )
|
||||
hdr = $$basename(tlb)
|
||||
hdr = $$section(hdr, ., 0, -2).h
|
||||
TYPELIB_HEADERS += $$hdr
|
||||
hdr = $$section(hdr, ., 0, -2)
|
||||
tmp_command = $$QMAKE_DUMPCPP $$system_quote($$absolute_path($$tlb, $$_PRO_FILE_PWD_)) \
|
||||
-o $$system_quote($$OUT_PWD/$$hdr)
|
||||
qaxcontainer_compat: tmp_command += -compat
|
||||
!exists($$OUT_PWD/$${hdr}.h): system($$tmp_command)
|
||||
}
|
||||
|
||||
objtgt.target = $(OBJECTS)
|
||||
objtgt.depends += $$TYPELIB_HEADERS
|
||||
QMAKE_EXTRA_TARGETS += objtgt
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
isEmpty(QMAKE_INCDIR_VULKAN) {
|
||||
# Pick up the VULKAN_SDK env var set by the LunarG SDK so that the Vulkan
|
||||
# headers are found out-of-the-box on typical Windows setups.
|
||||
QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)\\include
|
||||
QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)/include
|
||||
|
||||
# Do not export the include dir but resolve it on every qmake call.
|
||||
QMAKE_EXPORT_INCDIR_VULKAN = -
|
||||
|
@ -2,32 +2,49 @@
|
||||
# Yacc extra-compiler for handling files specified in the YACCSOURCES variable
|
||||
#
|
||||
|
||||
isEmpty(YACC_DIR): YACC_DIR = .
|
||||
|
||||
defineReplace(yaccCommands) {
|
||||
input = $$relative_path($$absolute_path($$1, $$OUT_PWD), $$OUT_PWD/$$YACC_DIR)
|
||||
input_base = $$basename(1)
|
||||
input_base ~= s/\.[^.]*$//
|
||||
hpp_output = $$2
|
||||
cpp_output = $$hpp_output
|
||||
cpp_output ~= s/$$re_escape($$first(QMAKE_EXT_H))$/$$first(QMAKE_EXT_CPP)/
|
||||
|
||||
isEmpty(QMAKE_YACCFLAGS_MANGLE) {
|
||||
QMAKE_YACCFLAGS_MANGLE = -p $${input_base} -b $${input_base}
|
||||
QMAKE_YACC_HEADER = $${input_base}.tab.h
|
||||
QMAKE_YACC_SOURCE = $${input_base}.tab.c
|
||||
} else {
|
||||
QMAKE_YACCFLAGS_MANGLE ~= s/\\$base/$${input_base}/g #backwards compat
|
||||
QMAKE_YACC_HEADER ~= s/\\$base/$${input_base}/g
|
||||
QMAKE_YACC_SOURCE ~= s/\\$base/$${input_base}/g
|
||||
}
|
||||
QMAKE_YACCDECLFLAGS = $$QMAKE_YACCFLAGS
|
||||
!yacc_no_name_mangle: QMAKE_YACCDECLFLAGS += $$QMAKE_YACCFLAGS_MANGLE
|
||||
|
||||
!equals(YACC_DIR, .): yacc_call = cd $$YACC_DIR &&
|
||||
yacc_call += $$QMAKE_YACC $$QMAKE_YACCDECLFLAGS $${input}
|
||||
|
||||
commands = \
|
||||
-$(DEL_FILE) $${hpp_output} $${cpp_output}$$escape_expand(\\n\\t) \
|
||||
$${yacc_call}$$escape_expand(\\n\\t) \
|
||||
$(MOVE) $${YACC_DIR}/$${QMAKE_YACC_HEADER} $${hpp_output}$$escape_expand(\\n\\t) \
|
||||
$(MOVE) $${YACC_DIR}/$${QMAKE_YACC_SOURCE} $${cpp_output}$$escape_expand(\\n\\t)
|
||||
|
||||
silent: commands = @echo Yacc $$1 && $$commands
|
||||
return($$commands)
|
||||
}
|
||||
|
||||
yacc_output_base = $${YACC_DIR}/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}
|
||||
|
||||
{
|
||||
yacc_decl.name = Yacc header
|
||||
yacc_decl.input = YACCSOURCES
|
||||
yacc_decl.variable_out = GENERATED_FILES
|
||||
|
||||
|
||||
isEmpty(QMAKE_YACCFLAGS_MANGLE) {
|
||||
QMAKE_YACCFLAGS_MANGLE = -p ${QMAKE_FILE_BASE} -b ${QMAKE_FILE_BASE}
|
||||
QMAKE_YACC_HEADER = ${QMAKE_FILE_BASE}.tab.h
|
||||
QMAKE_YACC_SOURCE = ${QMAKE_FILE_BASE}.tab.c
|
||||
} else {
|
||||
QMAKE_YACCFLAGS_MANGLE ~= s/\\$base/${QMAKE_FILE_BASE}/g #backwards compat
|
||||
QMAKE_YACC_HEADER ~= s/\\$base/${QMAKE_FILE_BASE}/g
|
||||
QMAKE_YACC_SOURCE ~= s/\\$base/${QMAKE_FILE_BASE}/g
|
||||
}
|
||||
QMAKE_YACCDECLFLAGS = $$QMAKE_YACCFLAGS
|
||||
!yacc_no_name_mangle:QMAKE_YACCDECLFLAGS += $$QMAKE_YACCFLAGS_MANGLE
|
||||
|
||||
yacc_decl.commands = \
|
||||
-$(DEL_FILE) $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_CPP)}$$escape_expand(\\n\\t) \
|
||||
$$QMAKE_YACC $$QMAKE_YACCDECLFLAGS ${QMAKE_FILE_IN}$$escape_expand(\\n\\t) \
|
||||
$(MOVE) $${QMAKE_YACC_HEADER} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)}$$escape_expand(\\n\\t) \
|
||||
$(MOVE) $${QMAKE_YACC_SOURCE} $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_CPP)}$$escape_expand(\\n\\t)
|
||||
yacc_decl.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)}
|
||||
|
||||
silent:yacc_decl.commands = @echo Yacc ${QMAKE_FILE_IN} && $$yacc_decl.commands
|
||||
yacc_decl.commands = ${QMAKE_FUNC_yaccCommands}
|
||||
yacc_decl.output = $${yacc_output_base}$$first(QMAKE_EXT_H)
|
||||
QMAKE_EXTRA_COMPILERS += yacc_decl
|
||||
}
|
||||
|
||||
@ -37,7 +54,9 @@
|
||||
yacc_impl.variable_out = GENERATED_SOURCES
|
||||
yacc_impl.dependency_type = TYPE_C
|
||||
yacc_impl.commands = $$escape_expand(\\n) # We don't want any commands where, but if command is empty no rules are created
|
||||
yacc_impl.depends += $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_H)} # Make sure we depend on the step above
|
||||
yacc_impl.output = $${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_MOD_YACC}$${first(QMAKE_EXT_CPP)} # Faked output from this step, output really created in step above
|
||||
yacc_impl.depends += $${yacc_output_base}$$first(QMAKE_EXT_H) # Make sure we depend on the step above
|
||||
yacc_impl.output = $${yacc_output_base}$$first(QMAKE_EXT_CPP) # Faked output from this step, output really created in step above
|
||||
QMAKE_EXTRA_COMPILERS += yacc_impl
|
||||
}
|
||||
|
||||
unset(yacc_output_base)
|
||||
|
@ -94,6 +94,12 @@ QMAKE_PREFIX_STATICLIB = lib
|
||||
QMAKE_EXTENSION_STATICLIB = a # llvm bitcode
|
||||
|
||||
QMAKE_AR = emar cqs
|
||||
equals(QMAKE_HOST.os, Windows) {
|
||||
QMAKE_AR_CMD = \
|
||||
"$(file >$(OBJECTS_DIR)/$(TARGET).rsp, $(subst \\,/,$(OBJECTS)))$$escape_expand(\\n\\t)" \
|
||||
"$(AR) $(DESTDIR)$(TARGET) @$(OBJECTS_DIR)/$(TARGET).rsp"
|
||||
}
|
||||
|
||||
QMAKE_DISTCLEAN += *.html *.js *.wasm
|
||||
|
||||
load(qt_config)
|
||||
|
@ -892,9 +892,8 @@ MakefileGenerator::processPrlFile(QString &file, bool baseOnly)
|
||||
|
||||
bool
|
||||
MakefileGenerator::processPrlFileBase(QString &origFile, const QStringRef &origName,
|
||||
const QStringRef &fixedBase, int slashOff)
|
||||
const QStringRef &fixedBase, int /*slashOff*/)
|
||||
{
|
||||
Q_UNUSED(slashOff)
|
||||
return processPrlFileCore(origFile, origName, fixedBase + Option::prl_ext);
|
||||
}
|
||||
|
||||
@ -1016,6 +1015,14 @@ MakefileGenerator::writePrlFile(QTextStream &t)
|
||||
for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it)
|
||||
t << qv(project->values((*it).toKey()));
|
||||
t << Qt::endl;
|
||||
|
||||
t << "QMAKE_PRL_LIBS_FOR_CMAKE = ";
|
||||
QString sep;
|
||||
for (ProStringList::Iterator it = libs.begin(); it != libs.end(); ++it) {
|
||||
t << sep << project->values((*it).toKey()).join(';').replace('\\', "\\\\");
|
||||
sep = ';';
|
||||
}
|
||||
t << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1113,7 +1120,8 @@ MakefileGenerator::writePrlFile()
|
||||
&& project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()
|
||||
&& project->isActiveConfig("create_prl")
|
||||
&& (project->first("TEMPLATE") == "lib"
|
||||
|| project->first("TEMPLATE") == "vclib")
|
||||
|| project->first("TEMPLATE") == "vclib"
|
||||
|| project->first("TEMPLATE") == "aux")
|
||||
&& (!project->isActiveConfig("plugin") || project->isActiveConfig("static"))) { //write prl file
|
||||
QString local_prl = prlFileName();
|
||||
QString prl = fileFixify(local_prl);
|
||||
@ -2370,8 +2378,15 @@ MakefileGenerator::findSubDirsSubTargets() const
|
||||
st->profile = file;
|
||||
}
|
||||
} else {
|
||||
if(!file.isEmpty() && !project->isActiveConfig("subdir_first_pro"))
|
||||
st->profile = file.section(Option::dir_sep, -1) + Option::pro_ext;
|
||||
if (!file.isEmpty() && !project->isActiveConfig("subdir_first_pro")) {
|
||||
const QString baseName = file.section(Option::dir_sep, -1);
|
||||
if (baseName.isEmpty()) {
|
||||
warn_msg(WarnLogic, "Ignoring invalid SUBDIRS entry %s",
|
||||
subdirs[subdir].toLatin1().constData());
|
||||
continue;
|
||||
}
|
||||
st->profile = baseName + Option::pro_ext;
|
||||
}
|
||||
st->in_directory = file;
|
||||
}
|
||||
while(st->in_directory.endsWith(Option::dir_sep))
|
||||
@ -3356,42 +3371,44 @@ MakefileGenerator::writePkgConfigFile()
|
||||
if (!version.isEmpty())
|
||||
t << "Version: " << version << Qt::endl;
|
||||
|
||||
// libs
|
||||
t << "Libs: ";
|
||||
QString pkgConfiglibName;
|
||||
if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle")) {
|
||||
if (libDir != QLatin1String("/Library/Frameworks"))
|
||||
t << "-F${libdir} ";
|
||||
ProString bundle;
|
||||
if (!project->isEmpty("QMAKE_FRAMEWORK_BUNDLE_NAME"))
|
||||
bundle = project->first("QMAKE_FRAMEWORK_BUNDLE_NAME");
|
||||
else
|
||||
bundle = project->first("TARGET");
|
||||
int suffix = bundle.lastIndexOf(".framework");
|
||||
if (suffix != -1)
|
||||
bundle = bundle.left(suffix);
|
||||
t << "-framework ";
|
||||
pkgConfiglibName = bundle.toQString();
|
||||
} else {
|
||||
if (!project->values("QMAKE_DEFAULT_LIBDIRS").contains(libDir))
|
||||
t << "-L${libdir} ";
|
||||
pkgConfiglibName = "-l" + project->first("QMAKE_ORIG_TARGET");
|
||||
if (project->isActiveConfig("shared"))
|
||||
pkgConfiglibName += project->first("TARGET_VERSION_EXT").toQString();
|
||||
}
|
||||
t << shellQuote(pkgConfiglibName) << " \n";
|
||||
if (project->first("TEMPLATE") == "lib") {
|
||||
// libs
|
||||
t << "Libs: ";
|
||||
QString pkgConfiglibName;
|
||||
if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle")) {
|
||||
if (libDir != QLatin1String("/Library/Frameworks"))
|
||||
t << "-F${libdir} ";
|
||||
ProString bundle;
|
||||
if (!project->isEmpty("QMAKE_FRAMEWORK_BUNDLE_NAME"))
|
||||
bundle = project->first("QMAKE_FRAMEWORK_BUNDLE_NAME");
|
||||
else
|
||||
bundle = project->first("TARGET");
|
||||
int suffix = bundle.lastIndexOf(".framework");
|
||||
if (suffix != -1)
|
||||
bundle = bundle.left(suffix);
|
||||
t << "-framework ";
|
||||
pkgConfiglibName = bundle.toQString();
|
||||
} else {
|
||||
if (!project->values("QMAKE_DEFAULT_LIBDIRS").contains(libDir))
|
||||
t << "-L${libdir} ";
|
||||
pkgConfiglibName = "-l" + project->first("QMAKE_ORIG_TARGET");
|
||||
if (project->isActiveConfig("shared"))
|
||||
pkgConfiglibName += project->first("TARGET_VERSION_EXT").toQString();
|
||||
}
|
||||
t << shellQuote(pkgConfiglibName) << " \n";
|
||||
|
||||
if (project->isActiveConfig("staticlib")) {
|
||||
ProStringList libs;
|
||||
libs << "LIBS"; // FIXME: this should not be conditional on staticlib
|
||||
libs << "LIBS_PRIVATE";
|
||||
libs << "QMAKE_LIBS"; // FIXME: this should not be conditional on staticlib
|
||||
libs << "QMAKE_LIBS_PRIVATE";
|
||||
libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread?
|
||||
t << "Libs.private:";
|
||||
for (ProStringList::ConstIterator it = libs.cbegin(); it != libs.cend(); ++it)
|
||||
t << ' ' << fixLibFlags((*it).toKey()).join(' ');
|
||||
t << Qt::endl;
|
||||
if (project->isActiveConfig("staticlib")) {
|
||||
ProStringList libs;
|
||||
libs << "LIBS"; // FIXME: this should not be conditional on staticlib
|
||||
libs << "LIBS_PRIVATE";
|
||||
libs << "QMAKE_LIBS"; // FIXME: this should not be conditional on staticlib
|
||||
libs << "QMAKE_LIBS_PRIVATE";
|
||||
libs << "QMAKE_LFLAGS_THREAD"; //not sure about this one, but what about things like -pthread?
|
||||
t << "Libs.private:";
|
||||
for (ProStringList::ConstIterator it = libs.cbegin(); it != libs.cend(); ++it)
|
||||
t << ' ' << fixLibFlags((*it).toKey()).join(' ');
|
||||
t << Qt::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// flags
|
||||
@ -3432,21 +3449,25 @@ QString MakefileGenerator::installMetaFile(const ProKey &replace_rule, const QSt
|
||||
QString ret;
|
||||
if (project->isEmpty(replace_rule)
|
||||
|| project->isActiveConfig("no_sed_meta_install")) {
|
||||
ret += "-$(INSTALL_FILE) " + escapeFilePath(src) + ' ' + escapeFilePath(dst);
|
||||
ret += "$(INSTALL_FILE) " + escapeFilePath(src) + ' ' + escapeFilePath(dst);
|
||||
} else {
|
||||
ret += "-$(SED)";
|
||||
QString sedargs;
|
||||
const ProStringList &replace_rules = project->values(replace_rule);
|
||||
for (int r = 0; r < replace_rules.size(); ++r) {
|
||||
const ProString match = project->first(ProKey(replace_rules.at(r) + ".match")),
|
||||
replace = project->first(ProKey(replace_rules.at(r) + ".replace"));
|
||||
if (!match.isEmpty() /*&& match != replace*/) {
|
||||
ret += " -e " + shellQuote("s," + match + "," + replace + ",g");
|
||||
sedargs += " -e " + shellQuote("s," + match + "," + replace + ",g");
|
||||
if (isWindowsShell() && project->first(ProKey(replace_rules.at(r) + ".CONFIG")).contains("path"))
|
||||
ret += " -e " + shellQuote("s," + windowsifyPath(match.toQString())
|
||||
sedargs += " -e " + shellQuote("s," + windowsifyPath(match.toQString())
|
||||
+ "," + windowsifyPath(replace.toQString()) + ",gi");
|
||||
}
|
||||
}
|
||||
ret += ' ' + escapeFilePath(src) + " > " + escapeFilePath(dst);
|
||||
if (sedargs.isEmpty()) {
|
||||
ret += "$(INSTALL_FILE) " + escapeFilePath(src) + ' ' + escapeFilePath(dst);
|
||||
} else {
|
||||
ret += "$(SED) " + sedargs + ' ' + escapeFilePath(src) + " > " + escapeFilePath(dst);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -815,7 +815,7 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file)
|
||||
break;
|
||||
}
|
||||
cpp_state = InCode;
|
||||
// ... and fall through to handle buffer[x] as such.
|
||||
Q_FALLTHROUGH(); // to handle buffer[x] as such.
|
||||
case InCode:
|
||||
// matching quotes (string literals and character literals)
|
||||
if (buffer[x] == '\'' || buffer[x] == '"') {
|
||||
@ -946,10 +946,12 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file)
|
||||
|
||||
debug_msg(2, "findMocs: %s", file->file.local().toLatin1().constData());
|
||||
int line_count = 1;
|
||||
bool ignore[3] = { false, false, false }; // [0] for Q_OBJECT, [1] for Q_GADGET, [2] for Q_NAMESPACE
|
||||
// [0] for Q_OBJECT, [1] for Q_GADGET, [2] for Q_NAMESPACE, [3] for Q_NAMESPACE_EXPORT
|
||||
bool ignore[4] = { false, false, false, false };
|
||||
/* qmake ignore Q_GADGET */
|
||||
/* qmake ignore Q_OBJECT */
|
||||
/* qmake ignore Q_NAMESPACE */
|
||||
/* qmake ignore Q_NAMESPACE_EXPORT */
|
||||
for(int x = 0; x < buffer_len; x++) {
|
||||
#define SKIP_BSNL(pos) skipEscapedLineEnds(buffer, buffer_len, (pos), &line_count)
|
||||
x = SKIP_BSNL(x);
|
||||
@ -988,6 +990,12 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file)
|
||||
file->file.real().toLatin1().constData(), line_count);
|
||||
x += 23;
|
||||
ignore[2] = true;
|
||||
} else if (buffer_len >= (x + 30) &&
|
||||
!strncmp(buffer + x + 1, "make ignore Q_NAMESPACE_EXPORT", 30)) {
|
||||
debug_msg(2, "Mocgen: %s:%d Found \"qmake ignore Q_NAMESPACE_EXPORT\"",
|
||||
file->file.real().toLatin1().constData(), line_count);
|
||||
x += 30;
|
||||
ignore[3] = true;
|
||||
}
|
||||
} else if (buffer[x] == '*') {
|
||||
extralines = 0;
|
||||
@ -1015,8 +1023,8 @@ bool QMakeSourceFileInfo::findMocs(SourceFile *file)
|
||||
int morelines = 0;
|
||||
int y = skipEscapedLineEnds(buffer, buffer_len, x + 1, &morelines);
|
||||
if (buffer[y] == 'Q') {
|
||||
static const char interesting[][12] = { "Q_OBJECT", "Q_GADGET", "Q_NAMESPACE"};
|
||||
for (int interest = 0; interest < 3; ++interest) {
|
||||
static const char interesting[][19] = { "Q_OBJECT", "Q_GADGET", "Q_NAMESPACE", "Q_NAMESPACE_EXPORT" };
|
||||
for (int interest = 0; interest < 4; ++interest) {
|
||||
if (ignore[interest])
|
||||
continue;
|
||||
|
||||
|
@ -43,7 +43,7 @@ protected:
|
||||
void init() override;
|
||||
bool writeMakefile(QTextStream &) override;
|
||||
|
||||
QString escapeFilePath(const QString &path) const override { Q_UNUSED(path); Q_ASSERT(false); return QString(); }
|
||||
QString escapeFilePath(const QString &) const override { Q_ASSERT(false); return QString(); }
|
||||
|
||||
public:
|
||||
bool supportsMetaBuild() override { return false; }
|
||||
|
@ -725,7 +725,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(project->first("TEMPLATE") == "lib") {
|
||||
if (isAux || project->first("TEMPLATE") == "lib") {
|
||||
QStringList types;
|
||||
types << "prl" << "libtool" << "pkgconfig";
|
||||
for(int i = 0; i < types.size(); ++i) {
|
||||
|
@ -43,12 +43,15 @@ void
|
||||
UnixMakefileGenerator::writePrlFile(QTextStream &t)
|
||||
{
|
||||
MakefileGenerator::writePrlFile(t);
|
||||
const ProString tmplt = project->first("TEMPLATE");
|
||||
if (tmplt != "lib" && tmplt != "aux")
|
||||
return;
|
||||
// libtool support
|
||||
if(project->isActiveConfig("create_libtool") && project->first("TEMPLATE") == "lib") { //write .la
|
||||
if (project->isActiveConfig("create_libtool")) {
|
||||
writeLibtoolFile();
|
||||
}
|
||||
// pkg-config support
|
||||
if(project->isActiveConfig("create_pc") && project->first("TEMPLATE") == "lib")
|
||||
if (project->isActiveConfig("create_pc"))
|
||||
writePkgConfigFile();
|
||||
}
|
||||
|
||||
@ -164,6 +167,16 @@ static QString rfc1034Identifier(const QString &str)
|
||||
return s;
|
||||
}
|
||||
|
||||
static QString escapeDir(const QString &dir)
|
||||
{
|
||||
// When building on non-MSys MinGW, the path ends with a backslash, which
|
||||
// GNU make will interpret that as a line continuation. Doubling the backslash
|
||||
// avoids the problem, at the cost of the variable containing *both* backslashes.
|
||||
if (dir.endsWith('\\'))
|
||||
return dir + '\\';
|
||||
return dir;
|
||||
}
|
||||
|
||||
void
|
||||
UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
{
|
||||
@ -226,7 +239,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "####### Output directory\n\n";
|
||||
// This is used in commands by some .prf files.
|
||||
if (! project->values("OBJECTS_DIR").isEmpty())
|
||||
t << "OBJECTS_DIR = " << fileVar("OBJECTS_DIR") << Qt::endl;
|
||||
t << "OBJECTS_DIR = " << escapeDir(fileVar("OBJECTS_DIR")) << Qt::endl;
|
||||
else
|
||||
t << "OBJECTS_DIR = ./\n";
|
||||
t << Qt::endl;
|
||||
@ -272,13 +285,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "DIST = " << valList(fileFixify(project->values("DISTFILES").toQStringList())) << " "
|
||||
<< fileVarList("HEADERS") << ' ' << fileVarList("SOURCES") << Qt::endl;
|
||||
t << "QMAKE_TARGET = " << fileVar("QMAKE_ORIG_TARGET") << Qt::endl;
|
||||
QString destd = fileVar("DESTDIR");
|
||||
// When building on non-MSys MinGW, the path ends with a backslash, which
|
||||
// GNU make will interpret that as a line continuation. Doubling the backslash
|
||||
// avoids the problem, at the cost of the variable containing *both* backslashes.
|
||||
if (destd.endsWith('\\'))
|
||||
destd += '\\';
|
||||
t << "DESTDIR = " << destd << Qt::endl;
|
||||
t << "DESTDIR = " << escapeDir(fileVar("DESTDIR")) << Qt::endl;
|
||||
t << "TARGET = " << fileVar("TARGET") << Qt::endl;
|
||||
if(project->isActiveConfig("plugin")) {
|
||||
t << "TARGETD = " << fileVar("TARGET") << Qt::endl;
|
||||
@ -1194,7 +1201,8 @@ void UnixMakefileGenerator::init2()
|
||||
project->values("QMAKE_FRAMEWORK_VERSION").append(project->first("VER_MAJ"));
|
||||
|
||||
if (project->first("TEMPLATE") == "aux") {
|
||||
// nothing
|
||||
project->values("PRL_TARGET") =
|
||||
project->values("TARGET").first().prepend(project->first("QMAKE_PREFIX_STATICLIB"));
|
||||
} else if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
|
||||
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
ProString bundle_loc = project->first("QMAKE_BUNDLE_LOCATION");
|
||||
|
@ -250,7 +250,7 @@ void MingwMakefileGenerator::init()
|
||||
}
|
||||
|
||||
if(project->isActiveConfig("dll")) {
|
||||
project->values("QMAKE_CLEAN").append(project->first("MINGW_IMPORT_LIB"));
|
||||
project->values("QMAKE_DISTCLEAN").append(project->first("MINGW_IMPORT_LIB"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1991,6 +1991,7 @@ bool VCMIDLTool::parseOption(const char* option)
|
||||
break;
|
||||
case 0x5eb7af2: // /header filename
|
||||
offset = 5;
|
||||
Q_FALLTHROUGH();
|
||||
case 0x0000358: // /h filename
|
||||
HeaderFileName = option + offset + 3;
|
||||
break;
|
||||
|
@ -1521,6 +1521,18 @@ void VcprojGenerator::initDistributionFiles()
|
||||
vcProject.DistributionFiles.Config = &(vcProject.Configuration);
|
||||
}
|
||||
|
||||
QString VcprojGenerator::extraCompilerName(const ProString &extraCompiler,
|
||||
const QStringList &inputs,
|
||||
const QStringList &outputs)
|
||||
{
|
||||
QString name = project->values(ProKey(extraCompiler + ".name")).join(' ');
|
||||
if (name.isEmpty())
|
||||
name = extraCompiler.toQString();
|
||||
else
|
||||
name = replaceExtraCompilerVariables(name, inputs, outputs, NoShell);
|
||||
return name;
|
||||
}
|
||||
|
||||
void VcprojGenerator::initExtraCompilerOutputs()
|
||||
{
|
||||
ProStringList otherFilters;
|
||||
@ -1538,13 +1550,16 @@ void VcprojGenerator::initExtraCompilerOutputs()
|
||||
<< "YACCSOURCES";
|
||||
const ProStringList &quc = project->values("QMAKE_EXTRA_COMPILERS");
|
||||
for (ProStringList::ConstIterator it = quc.begin(); it != quc.end(); ++it) {
|
||||
ProString extracompilerName = project->first(ProKey(*it + ".name"));
|
||||
if (extracompilerName.isEmpty())
|
||||
extracompilerName = (*it);
|
||||
const ProStringList &inputVars = project->values(ProKey(*it + ".input"));
|
||||
ProStringList inputFiles;
|
||||
for (auto var : inputVars)
|
||||
inputFiles.append(project->values(var.toKey()));
|
||||
const ProStringList &outputs = project->values(ProKey(*it + ".output"));
|
||||
|
||||
// Create an extra compiler filter and add the files
|
||||
VCFilter extraCompile;
|
||||
extraCompile.Name = extracompilerName.toQString();
|
||||
extraCompile.Name = extraCompilerName(it->toQString(), inputFiles.toQStringList(),
|
||||
outputs.toQStringList());
|
||||
extraCompile.ParseFiles = _False;
|
||||
extraCompile.Filter = "";
|
||||
extraCompile.Guid = QString(_GUIDExtraCompilerFiles) + "-" + (*it);
|
||||
@ -1557,14 +1572,14 @@ void VcprojGenerator::initExtraCompilerOutputs()
|
||||
if (!outputVar.isEmpty() && otherFilters.contains(outputVar))
|
||||
continue;
|
||||
|
||||
QString tmp_out = project->first(ProKey(*it + ".output")).toQString();
|
||||
QString tmp_out = project->first(outputs.first().toKey()).toQString();
|
||||
if (project->values(ProKey(*it + ".CONFIG")).indexOf("combine") != -1) {
|
||||
// Combined output, only one file result
|
||||
extraCompile.addFile(Option::fixPathToTargetOS(
|
||||
replaceExtraCompilerVariables(tmp_out, QString(), QString(), NoShell), false));
|
||||
} else {
|
||||
// One output file per input
|
||||
const ProStringList &tmp_in = project->values(project->first(ProKey(*it + ".input")).toKey());
|
||||
const ProStringList &tmp_in = project->values(inputVars.first().toKey());
|
||||
for (int i = 0; i < tmp_in.count(); ++i) {
|
||||
const QString &filename = tmp_in.at(i).toQString();
|
||||
if (extraCompilerSources.contains(filename) && !otherFiltersContain(filename))
|
||||
@ -1577,7 +1592,6 @@ void VcprojGenerator::initExtraCompilerOutputs()
|
||||
// build steps there. So, we turn it around and add it to the input files instead,
|
||||
// provided that the input file variable is not handled already (those in otherFilters
|
||||
// are handled, so we avoid them).
|
||||
const ProStringList &inputVars = project->values(ProKey(*it + ".input"));
|
||||
for (const ProString &inputVar : inputVars) {
|
||||
if (!otherFilters.contains(inputVar)) {
|
||||
const ProStringList &tmp_in = project->values(inputVar.toKey());
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user