Merge remote-tracking branch 'origin/stable' into dev
For the conflicts in msvc_nmake.cpp the ifdefs are extended since we need to support windows phone in the target branch while it is not there in the current stable branch (as of Qt 5.2). Conflicts: configure qmake/generators/win32/msvc_nmake.cpp src/3rdparty/angle/src/libEGL/Surface.cpp src/angle/src/common/common.pri src/corelib/global/qglobal.h src/corelib/io/qstandardpaths.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxscreeneventhandler.h src/plugins/platforms/xcb/qglxintegration.h src/widgets/kernel/win.pri tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp tools/configure/configureapp.cpp Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
This commit is contained in:
commit
4a8273a6fc
6
config.tests/.qmake.conf
Normal file
6
config.tests/.qmake.conf
Normal file
@ -0,0 +1,6 @@
|
||||
mingw {
|
||||
TMPPATH = $$(INCLUDE)
|
||||
QMAKE_INCDIR_POST += $$split(TMPPATH, $$QMAKE_DIRLIST_SEP)
|
||||
TMPPATH = $$(LIB)
|
||||
QMAKE_LIBDIR_POST += $$split(TMPPATH, $$QMAKE_DIRLIST_SEP)
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
SOURCES = gstreamer.cpp
|
||||
CONFIG -= qt
|
||||
LIBS += -lgstinterfaces-0.10 -lgstvideo-0.10 -lgstbase-0.10
|
@ -1,4 +1,16 @@
|
||||
SOURCES = icu.cpp
|
||||
CONFIG += console
|
||||
CONFIG -= qt dylib
|
||||
unix:LIBS += -licuuc -licui18n
|
||||
win32:LIBS += -licuin
|
||||
win32 {
|
||||
CONFIG(static, static|shared) {
|
||||
CONFIG(debug, debug|release) {
|
||||
LIBS += -lsicuind -lsicuucd -lsicudtd
|
||||
} else {
|
||||
LIBS += -lsicuin -lsicuuc -lsicudt
|
||||
}
|
||||
} else {
|
||||
LIBS += -licuin -licuuc
|
||||
}
|
||||
} else {
|
||||
LIBS += -licui18n -licuuc
|
||||
}
|
||||
|
@ -15,13 +15,13 @@ elif [ "$OSTYPE" = "msys" -a -z "${FILE##[a-zA-Z]:[/\\]*}" ]; then
|
||||
true
|
||||
else
|
||||
RES="$PWD/$FILE"
|
||||
test -d "$RES" && RES="$RES/"
|
||||
RES=`echo "$RES" | sed "s,/\(\./\)*,/,g"`
|
||||
|
||||
# note: this will only strip 1 /path/../ from RES, i.e. given /a/b/c/../../../, it returns /a/b/../../
|
||||
RES=`echo "$RES" | sed "s,\(/[^/]*/\)\.\./,/,g"`
|
||||
|
||||
RES=`echo "$RES" | sed "s,//,/,g" | sed "s,/$,,"`
|
||||
fi
|
||||
RES=$RES/
|
||||
while true; do
|
||||
nres=`echo "$RES" | sed "s,/[^/][^/]*/\.\./,/,g; s,/\./,/,g"`
|
||||
test x"$nres" = x"$RES" && break
|
||||
RES=$nres
|
||||
done
|
||||
RES=`echo "$RES" | sed "s,//,/,g; s,/$,,"`
|
||||
echo $RES #return
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Copyright (C) 2013 BlackBerry Limited. All rights reserved.
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the config.tests of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -39,7 +39,12 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QACCESSIBLE2_H
|
||||
#define QACCESSIBLE2_H
|
||||
#include <sys/pps.h>
|
||||
|
||||
#endif
|
||||
int main(int, char **)
|
||||
{
|
||||
pps_decoder_t decoder;
|
||||
|
||||
pps_decoder_initialize(&decoder, NULL);
|
||||
return 0;
|
||||
}
|
3
config.tests/unix/pps/pps.pro
Normal file
3
config.tests/unix/pps/pps.pro
Normal file
@ -0,0 +1,3 @@
|
||||
SOURCES = pps.cpp
|
||||
CONFIG -= qt
|
||||
LIBS += -lpps
|
7
dist/changes-5.1.0
vendored
7
dist/changes-5.1.0
vendored
@ -99,6 +99,13 @@ QtNetwork
|
||||
- QHostInfo:
|
||||
* Allow QHostInfo::lookupHost() with no receiver to warm the DNS cache.
|
||||
|
||||
|
||||
QtSql
|
||||
-----
|
||||
This changelog as released was missing QtSql changes.
|
||||
Please refer to changes-5.2.0 for QtSql 5.1.0 changes.
|
||||
|
||||
|
||||
QtWidgets
|
||||
---------
|
||||
|
||||
|
543
dist/changes-5.2.0
vendored
543
dist/changes-5.2.0
vendored
@ -15,37 +15,70 @@ corresponding to tasks in the Qt Bug Tracker:
|
||||
Each of these identifiers can be entered in the bug tracker to obtain more
|
||||
information about a particular change.
|
||||
|
||||
****************************************************************************
|
||||
* Important Behavior Changes *
|
||||
****************************************************************************
|
||||
|
||||
- Qt is now compiled with qreal typedef'ed to double on all
|
||||
platforms. qreal was a float on ARM chipsets before. This guarantees more
|
||||
consistent behavior between all platforms Qt supports, but is binary
|
||||
incompatible to Qt 5.1 on ARM. The old behavior can be restored by
|
||||
passing -qreal float to configure.
|
||||
- The supported date range in QDateTime has been reduced to about +/- 292
|
||||
million years, the range supported by the number of msecs since the Unix
|
||||
epoch of 1 Jan 1970 as stored in a qint64, and as able to be used in the
|
||||
setMSecsSinceEpoch() and toMSecsSinceEpoch() methods.
|
||||
|
||||
- QUrl and QUrlQuery:
|
||||
* [QTBUG-31660] QUrl no longer considers all delimiter characters
|
||||
equivalent to their percent-encoded forms. Now, both classes always
|
||||
keep all delimiters exactly as they were in the original URL text.
|
||||
* [QTBUG-31660] QUrl no longer decodes %7B and %7D to "{" and "}" in the
|
||||
output of toString()
|
||||
* QUrl no longer supports QUrl::FullyDecoded mode in authority() and
|
||||
userInfo(), nor QUrl::DecodedMode in setAuthority() and setUserInfo().
|
||||
* [QTBUG-31945] QUrl no longer decodes %23 found in the fragment to "#"
|
||||
in the output of toString(QUrl::FullyEncoded) or toEncoded()
|
||||
* QUrl now defaults to decoded mode in the getters and setters for
|
||||
userName, password, host, topLevelDomain, path and fileName. This
|
||||
means a '%' in one of those fields is now returned (or set) as '%'
|
||||
rather than "%25". In the unlikely case where the former behavior was
|
||||
expected, pass PrettyDecoded to the getter and TolerantMode to the
|
||||
setter.
|
||||
* QUrl now normalizes the path given in setPath, removing ./ and ../ and
|
||||
duplicate slashes.
|
||||
|
||||
****************************************************************************
|
||||
* Library *
|
||||
****************************************************************************
|
||||
|
||||
QtWidgets
|
||||
---------
|
||||
|
||||
- QAbstractScrollArea now has a SizeAdjustPolicy. If it is set to AdjustToContents
|
||||
it will make use of the new protected viewportSizeHint() (binary compatible since it
|
||||
was reserved in Qt5). This function returns a suggested size based on contents.
|
||||
|
||||
- QTreeView now has setTreePosition to allow the treestructure to show data from other
|
||||
columns than logicalindex zero.
|
||||
|
||||
- [QTBUG-4206] QTableView resizeToContents will now adjust to actual contents
|
||||
and not just visible area. QHeaderView::setAutoResizePrecision() has been
|
||||
introduced to control how precise the autoResize should be.
|
||||
|
||||
- QFileDialog::setDefaultSuffix() removes leading dot characters.
|
||||
|
||||
- QSizePolicy got a retainSizeWhenHidden attribute.
|
||||
|
||||
- [QTBUG-31602] QSpinBox size calculation will now be fixed when stylesheets are
|
||||
used.
|
||||
|
||||
QtCore
|
||||
------
|
||||
- [QTBUG-30250] QTime, QDateTime:
|
||||
When calling QTime::toString(Qt::TextDate) and QTime::toString(Qt::ISODate),
|
||||
milliseconds are now included in the returned string. This also applies to
|
||||
QDateTime::toString(Qt::TextDate) and QDateTime::toString(ISODate).
|
||||
|
||||
- Added QCollator, a class to collate Unicode strings.
|
||||
- Added QCommandLineParser, a class to parse command lines.
|
||||
- Added QFileSelector, a class to select platform-specific file assets.
|
||||
- Added QLoggingCategory and related functions for logging
|
||||
- [QTBUG-23946] Fixed a bug that prevented Qt from being built in a
|
||||
namespace on Mac OS X.
|
||||
- Updated the locale database to CLDR 23.1
|
||||
- Added support for ARMv8 64-bit mode.
|
||||
|
||||
- Metatype system (QMetaType & QVariant):
|
||||
* Qt now handles metatypes automatically for std::vector, std::list,
|
||||
std::pair and std::map
|
||||
* The metatype system now supports registering explicit conversion
|
||||
functions via QMetaType::registerConverter
|
||||
* The metatype system now supports iteration over a container type via
|
||||
QSequentialIterable and QAssociativeIterable
|
||||
* Registering the same type name twice will now print only a warning (as
|
||||
opposed to aborting the execution of the program)
|
||||
|
||||
- Qt Containers:
|
||||
* In debug mode, the Qt containers will now verify whether the iterators
|
||||
passed to most mutating functions belong to the iterator in question.
|
||||
* Fixed a number of bugs that would modify shared containers when calling
|
||||
erase(), under corner-case conditions.
|
||||
|
||||
- QtAlgorithms
|
||||
With STL no longer being optional for building and using Qt, a number of parts
|
||||
@ -76,30 +109,458 @@ QtCore
|
||||
- qLess (std::less)
|
||||
- qGreater (std::greater)
|
||||
|
||||
- QByteArray:
|
||||
* Added QByteArray::Base64Url and QByteArray::OmitTrailingEquals flags
|
||||
for QByteArray::toBase64 and fromBase64.
|
||||
* [QTBUG-34694] Fixed a bug that would cause QByteArray to overflow some
|
||||
size calculations.
|
||||
|
||||
- QCoreApplication:
|
||||
* [QTBUG-15379][QTBUG-30628] Fixed a bug that caused Qt to mis-parse a
|
||||
command-line argument like -DKEY=\"VALUE\" on Windows.
|
||||
|
||||
- QDateTime:
|
||||
* [QTBUG-26161][QTBUG-29666] Fully implement support for Qt::TimeSpec of
|
||||
Qt::OffsetFromUTC, added new methods for offsetFromUTC(),
|
||||
toTimeSpec(), and toOffsetFromUTC().
|
||||
* Added convenience methods for fromMSecsSinceEpoch() and fromTime_t()
|
||||
to take time spec to be used in returned datetime.
|
||||
* Add method timeZoneAbbreviation() to return effective time zone
|
||||
abbreviation.
|
||||
* The debug datastream is now an ISO-like format instead of Qt::TextDate
|
||||
* The Standard Time to Daylight Time transition for Qt::LocalTime is now
|
||||
handled correctly. Any date set in the "missing" hour is now
|
||||
considered invalid. All date math results that fall into the missing
|
||||
hour will be automatically adjusted to a valid time in the following
|
||||
hour.
|
||||
* Added new method isDaylightTime() to return if the datetime is in
|
||||
Daylight Time or not.
|
||||
* Added support for a new Qt::TimeZone spec to be used with QTimeZone to
|
||||
define times in a specific time zone.
|
||||
* Added Qt::RFC2822Date format that can be passed to QDateTime and
|
||||
QLocale formatters and parsers.
|
||||
* Fixed a bug that caused QDate::toString() to return empty for dates
|
||||
with years beyond 9999.
|
||||
|
||||
- QFileSystemWatcher:
|
||||
* [QTBUG-33211] Fixed a bug that caused QFileSystemWatcher to emit change
|
||||
notifications with the wrong path on Linux.
|
||||
|
||||
- QJson:
|
||||
* [QTBUG-33229] The Writer and the Parser now fully accept non-character
|
||||
unicode points.
|
||||
* The Writer will no longer write inf, -inf and nan for infinites and NaN
|
||||
values, which resulted in parsing back as strings. Instead, it will now
|
||||
output null.
|
||||
* The Writer now emits numeric values with full numeric precision. This
|
||||
also allows QJson to support integer values with no loss of precision
|
||||
up to 2^53.
|
||||
|
||||
- QJsonValue:
|
||||
* Added QJsonValue::toInt(). QJsonValue can store 32-bit signed integers
|
||||
with no loss of precision.
|
||||
|
||||
- QObject:
|
||||
* New-style signal connections to functors, lambdas, and static functions
|
||||
now works with a receiver object. The connection will be removed when
|
||||
the either the sender or receiver objects are destroyed.
|
||||
|
||||
- QPluginLoader:
|
||||
* QPluginLoader will no longer load the plugins on Mac OS X and iOS
|
||||
systems when scanning for valid plugins.
|
||||
* Added QPluginLoader::staticPlugins(), which returns the list of
|
||||
built-in plugins (linked to the executable and any loaded libraries).
|
||||
|
||||
- QProcess:
|
||||
* [QTBUG-32958] Fixed a bug that would cause QProcess to crash if
|
||||
waitForStarted() were called after an unsuccessful start()
|
||||
* Added QProcess::nullDevice(), which returns the platform's "blackhole"
|
||||
device (/dev/null on Unix, NUL on Windows). This can be used with
|
||||
QProcess::setStandardOutputFile.
|
||||
* Added enum values QProcess::ForwardedOutputChannel and
|
||||
QProcess::ForwardedErrorChannel, which allow for more fine-grained
|
||||
control over which channel is forwarded and which one is captured.
|
||||
* Added QProcess::ForwardedInputChannel, which allows for stdin to be
|
||||
forwarded to this process's input.
|
||||
* [QTBUG-32979] On Unix, QProcess now correctly forwards the siginfo_t
|
||||
and context parameters of the signal handler to the previous handler.
|
||||
|
||||
- QScopedPointer:
|
||||
* Added QScopedPointerDeleteLater, a new class that can be used as the
|
||||
second template to QScopedPointer and will call deleteLater() on the
|
||||
pointer when it goes out of scope.
|
||||
|
||||
- QSocketNotifier:
|
||||
* Fixed a bug that caused socket notifiers not to be re-enabled after
|
||||
they had been activated on BlackBerry.
|
||||
|
||||
- QStandardPaths:
|
||||
* QStandardPaths::enableTestMode is deprecated and is replaced by
|
||||
QStandardPaths::setTestModeEnabled.
|
||||
* Added QStandardPaths::GenericConfigLocation, which refers to a location
|
||||
where applications can store config files to be shared with other
|
||||
applications.
|
||||
|
||||
- QThread:
|
||||
* Added an advisory interrupt mechanism (QThread::requestInterruption and
|
||||
QThread::isInterruptionRequested).
|
||||
|
||||
- QThreadPool:
|
||||
* Added method clear() to remove any queued QRunnables.
|
||||
* Fixed a number of race conditions.
|
||||
|
||||
- QTime:
|
||||
* [QTBUG-30250] When calling QTime::toString(Qt::TextDate) and
|
||||
QTime::toString(Qt::ISODate), milliseconds are now included in
|
||||
the returned string. This also applies to
|
||||
QDateTime::toString(Qt::TextDate) and
|
||||
QDateTime::toString(ISODate).
|
||||
* Added new methods fromMSecsSinceStartOfDay() to create a new QTime
|
||||
from an msecs value, and msecsSinceStartOfDay() to return the QTime as
|
||||
the number of msecs since the start of the day.
|
||||
|
||||
- QTimeZone:
|
||||
* Added new QTimeZone class to support time tone calculations using the
|
||||
host platform time zone database and the Olsen time zone ID's.
|
||||
|
||||
- QUrl:
|
||||
* [QTBUG-33229] QUrl now fully accepts non-character unicode points;
|
||||
they are encoded as percent characters; they can also be pretty
|
||||
decoded
|
||||
* Added QUrl::RemoveFilename flag which can be passed to path(),
|
||||
authority() and toString() and will cause the filename part of the path
|
||||
(the contents after the last '/') to be removed.
|
||||
* Added QUrl::fileName(), which returns just the filename part of the
|
||||
path.
|
||||
* Added QUrl::NormalizePathSegments flag, which will cause QUrl to
|
||||
remove "/./" or "/../" sequences as much as possible. It will not
|
||||
remove "/../" from the beginning of the path.
|
||||
* Added QUrl::adjusted(), which returns a new QUrl with certain parts of
|
||||
the original URL removed or normalized.
|
||||
* Added QUrl::matches(), which can be used to compare parts of two URLs
|
||||
or to compare two URLs after normalization.
|
||||
|
||||
- QUtf8:
|
||||
* [QTBUG-33229] UTF-8 now accepts non-character unicode points; these
|
||||
are not replaced by the replacement character anymore
|
||||
|
||||
- QVariant:
|
||||
* Fixed QVariant::canConvert with longlong
|
||||
* Variant containing enum types can now be converted to integer
|
||||
* [QTBUG-33981] Fixed a bug that would cause QPolygonF to be saved or
|
||||
loaded incorrectly in QDataStream.
|
||||
|
||||
QtDBus
|
||||
------
|
||||
|
||||
- Improved error handling so as to give more feedback to the developer when
|
||||
certain marshalling or demarshalling actions fail.
|
||||
- [QTBUG-27809] Fixed some race conditions related to delivering method
|
||||
reply deliveries.
|
||||
- Fixed a bug that made non-slot invokables not get listed in the
|
||||
auto-generated introspections.
|
||||
|
||||
QtDeclarative
|
||||
-------------
|
||||
|
||||
- ColorDialog:
|
||||
* Added currentColor property.
|
||||
|
||||
- [QTBUG-32928] ShortcutOverride events now work for QQuickItem
|
||||
subclasses
|
||||
|
||||
QtGui
|
||||
-----
|
||||
- [QTBUG-28228] Session Management:
|
||||
The new QPlatformSessionManager class brings back the session management
|
||||
functionality. It allows the implementation of platform specific behavior
|
||||
related to session management. For platform that don't support this
|
||||
feature the default behavior has not changed.
|
||||
Both X11 and Windows session management are supported.
|
||||
|
||||
- Accessibility classes are now public allowing accessibility
|
||||
information for custom widgets/QQuickItems
|
||||
|
||||
- Session Management:
|
||||
* [QTBUG-28228] The new QPlatformSessionManager class brings back
|
||||
the session management functionality. It allows the
|
||||
implementation of platform specific behavior related to session
|
||||
management. For platform that don't support this feature the
|
||||
default behavior has not changed. Both X11 and Windows session
|
||||
management are supported.
|
||||
|
||||
- QPolygonF:
|
||||
* When a QVariant holds a QPolygonF() then it will be correctly seen as
|
||||
a null QVariant.
|
||||
|
||||
- [QTBUG-27349] Reintroduced command line argument for positioning
|
||||
windows (-geometry on X11, -qwindowgeometry on other platforms)
|
||||
|
||||
QtNetwork
|
||||
---------
|
||||
|
||||
- API was added to store and resume TLS session tickets.
|
||||
- API was added to store and resume TLS session tickets.
|
||||
- The minimum support openssl version has been increased to openssl
|
||||
1.0. The code to support older versions has not been removed, but is no
|
||||
longer supported.
|
||||
- An off-by-one error in NTLM proxy authentication has been fixed.
|
||||
- Various improvements to reduce the memory used by qtnetwork have been
|
||||
made.
|
||||
- Improved support for HTTP proxy authentication.
|
||||
- Support for preconnecting to servers before making HTTP and HTTPS
|
||||
connections. This allows for much reduced latency when the hosts to be
|
||||
connected to are known.
|
||||
|
||||
- The minimum support openssl version has been increased to openssl 1.0. The
|
||||
code to support older versions has not been removed, but is no longer
|
||||
supported.
|
||||
QtPrintSupport
|
||||
--------------
|
||||
|
||||
- An off-by-one error in NTLM proxy authentication has been fixed.
|
||||
- QPrintDialog:
|
||||
* Added support for setting CUPS job options in the print dialog.
|
||||
* Added support for setting CUPS Banner pages in the print dialog.
|
||||
* Added support for setting CUPS Page Set (even/odd pages only) in the
|
||||
print dialog.
|
||||
* Added support for setting CUPS Pages Per Sheet and Pages Per Sheet
|
||||
Layout options
|
||||
* Added CUPS server-side print range support for apps that can't support
|
||||
print range option themselves
|
||||
|
||||
- Various improvements to reduce the memory used by qtnetwork have been made.
|
||||
QtSql
|
||||
-----
|
||||
|
||||
- Improved support for HTTP proxy authentication.
|
||||
Changes in Qt 5.1.0 (missing from released changelog dist/changes-5.1.0)
|
||||
- [QTBUG-28088] Remove dependency of DB driver headers on qsqlcachedresult_p.h.
|
||||
- Deprecate QSqlError setters. The constructor is sufficient, since it has
|
||||
a parameter for each member variable.
|
||||
- Rename the SQL driver header files to _p.h (make private)
|
||||
The drivers were never public API. They were exposed by mistake in
|
||||
public headers. What's more, they have #include'd a private header
|
||||
(qsqlcachedresult_p.h) since at least Qt 4.5.1. That means no one used
|
||||
those headers in Qt 4 (private headers weren't installed then) and
|
||||
it's unlikely anyone did in 5.0.
|
||||
- ODBC: Implemented lastInsertId() for some ODBC compatible databases.
|
||||
- PSQL: Make lastInsertID work for tables without OIDs.
|
||||
- [QTBUG-14904] SQLITE: Fix for Sql query aliases with dots
|
||||
- [QTBUG-2192] ODBC: fix loss of milliseconds when binding QDateTime
|
||||
- [QTBUG-30076] PSQL: escape backslashes only when server requires it
|
||||
IMPORTANT: Applications that implemented their own workarounds must be
|
||||
updated to avoid misbehavior and SQL injection vulnerabilities.
|
||||
- [QTBUG-10569] ODBC: fixed QODBCResult::exec() return value for DELETE
|
||||
operations when no rows are affected.
|
||||
- ODBC: Fixed loss of column metadata on SQL_NO_DATA.
|
||||
- QSqlTableModel: expose methods for getting primary values.
|
||||
- ODBC: Fixed possible cause of spurious errors (commit af35ee291a1bbbc8)
|
||||
|
||||
- Support for preconnecting to servers before making HTTP and HTTPS
|
||||
connections. This allows for much reduced latency when the hosts to be
|
||||
connected to are known.
|
||||
Changes in Qt 5.2.0
|
||||
- [QTBUG-29261] IBASE: Construct a valid QTime when creating timestamps for
|
||||
iBase SQL driver.
|
||||
- [QTBUG-33389] PSQL: Format QDateTime following ISO8601.
|
||||
- Add QSQLITE_OPEN_URI option to QSQLITE driver
|
||||
|
||||
QtWidgets
|
||||
---------
|
||||
|
||||
- [QTBUG-30255] Fixed a bug where spans across empty cells in a grid
|
||||
layout got broken.
|
||||
- [QTBUG-32788] Properly handles Qt::WidgetWithChildrenShortcut
|
||||
shortcuts in MDI subwindows now.
|
||||
- [QTBUG-33078] QWidget::setWindowOpacity() now works when called
|
||||
before QWidget::show().
|
||||
- [QTBUG-33247] Changed accessible trees and tables to always expose
|
||||
hidden headers, instead of only exposing the visible headers.
|
||||
- [QTBUG-34007] Fixed a crash in tablet support.
|
||||
- Fixed a bug where the maximum size hint of a layout with spans was
|
||||
wrong.
|
||||
- Item delegates now cycle through all three states of tri-state
|
||||
checkboxes, the same way QCheckBox itself does.
|
||||
|
||||
- QAbstractItemView:
|
||||
* [QTBUG-7232] In ItemViews scrollbars will now by default only
|
||||
scroll 1 pixel when scrollMode is set to scrollPerPixel. That is
|
||||
it will (when scrollMode is scrollPerPixel) do what is stated in
|
||||
the documentation, and no longer automatically adjust the
|
||||
scrollbar's singleStep. The user can now control that value.
|
||||
|
||||
- QAbstractScrollArea:
|
||||
* QAbstractScrollArea now has a SizeAdjustPolicy. If it is set to
|
||||
AdjustToContents it will make use of the protected viewportSizeHint()
|
||||
virtual function. This function returns a suggested size based on
|
||||
contents. Note that although the viewportSizeHint() virtual function
|
||||
was reserved in 5.0, user code was not supposed to be overriding it
|
||||
(as the function was private and undocumented). Code that was
|
||||
overriding viewportSizeHint() needs to be recompiled against 5.2 for
|
||||
this feature to work correctly.
|
||||
|
||||
- QColorDialog:
|
||||
* Added a web color QLineEdit.
|
||||
* [QTBUG-14332] Added a screen color picker button.
|
||||
* [QTBUG-31998] Does no longer create widgets when using the
|
||||
platform dialog.
|
||||
|
||||
- QComboBox:
|
||||
* Added currentData() convenience function which allows to retrieve
|
||||
the user data set for the current item.
|
||||
|
||||
- QCompleter:
|
||||
* [QTBUG-3414] Added filterMode property.
|
||||
|
||||
- QDesktopWidget:
|
||||
* [QTBUG-32567] Fixed emission of workAreaResized() signal.
|
||||
|
||||
- QDialogButtonBox:
|
||||
* Added a (StandardButtons,QWidget*) constructor.
|
||||
|
||||
- QDockWidget:
|
||||
* [QTBUG-31044] The position of a dock widget is now kept when
|
||||
undocking.
|
||||
* [QTBUG-32260] Fixed a bug where visibilityChanged was signaled
|
||||
wrongly in certain multi-screen setups.
|
||||
|
||||
- QFileDialog:
|
||||
* setDefaultSuffix() now removes leading dot characters.
|
||||
* Introduced DontUseCustomDirectoryIcons. This improves the file
|
||||
dialog performance under Windows for the case where there are
|
||||
lots of folders. Went from taking 60 seconds to 2 seconds, on a
|
||||
SDCard with 10k folders.
|
||||
* Added setMimeTypeFilters() for mimetype-based filtering, as an
|
||||
alternative to pattern matching.
|
||||
* Fixed removing of directories containing hidden or system files.
|
||||
* Added QUrl-based API for remote files.
|
||||
* [QTBUG-13182] Improved performance on Windows by
|
||||
+ not resolving NTFS symlinks (15x speedup on pessimistic
|
||||
workloads) and
|
||||
+ using extensions over calling GetFileAttributesEx() in certain
|
||||
cases.
|
||||
* [QTBUG-29403] Fixed potential crash in destructor of
|
||||
~QFileInfoGather in threaded applications.
|
||||
* [QTBUG-34132] QFileDialog does no longer instantiate widgets if a
|
||||
native dialog will be used instead. Therefore some accessors
|
||||
which previously returned unused objects will now return null.
|
||||
As before, you can set the DontUseNativeDialog option to ensure
|
||||
that widgets will be created and used instead.
|
||||
* [QTBUG-33039] Does no longer create widgets when using the
|
||||
platform dialog.
|
||||
|
||||
- QFontDialog:
|
||||
* Now has finer-grained control over the types of fonts listed,
|
||||
similar to what QFontComboBox already had.
|
||||
|
||||
- QGraphicsView etc
|
||||
* Fixed a crash in QGraphicsProxyWidget.
|
||||
* [QTBUG-8061] Allow handling of mouseDoubleClickEvent in
|
||||
QGraphicsItems.
|
||||
* [QTBUG-19036] Make QGraphicsScene::items(QPointF) work using
|
||||
Qt::{Contains,Intersets}ItemBoundingRect with items that contain
|
||||
the point in the bounding rectangle, but not their (custom)
|
||||
shape.
|
||||
|
||||
- QHeaderView:
|
||||
* [QTBUG-4346] A maximumSize for sections has been introduced. The
|
||||
maximum section size is by default the largest possible section
|
||||
size which in Qt 5.2 has been limited to 1048575 pixels.
|
||||
|
||||
- QInputDialog:
|
||||
* Added getMultiLineText static method.
|
||||
|
||||
- QLineEdit:
|
||||
* Keep placeholderText visible when focused, until text is added.
|
||||
* Context-menu actions now have icons.
|
||||
* Made it possible to add side widgets.
|
||||
* Made it possible to add a clear button commonly used for item
|
||||
view filtering as a side widget
|
||||
|
||||
- QListView:
|
||||
* [QTBUG-1180] Dragging an item outside the QListView in icon mode
|
||||
no longer loses the icon. Also fixed a bug where under certain
|
||||
conditions code overriding QAbstractItemView::viewOptions() would
|
||||
not be called.
|
||||
|
||||
- QMenuBar:
|
||||
* [QTBUG-32807] Menus now close again on second click.
|
||||
|
||||
- QMessageBox:
|
||||
* May use native message boxes on some platforms now.
|
||||
* [QTBUG-6731] It is now possible to select some or all text from a
|
||||
QMessageBox and copy it to the clipboard.
|
||||
|
||||
- QSizePolicy:
|
||||
* Added a retainSizeWhenHidden attribute.
|
||||
|
||||
- QSpinBox:
|
||||
* Values can now be displayed in different bases
|
||||
(cf. displayIntegerBase property)
|
||||
* [QTBUG-31602] Size calculation will now be fixed when stylesheets
|
||||
are used.
|
||||
|
||||
- QSplitter:
|
||||
* Now gets the default value of opaqueResize property from (new)
|
||||
QStyle::SH_Splitter_OpaqueResize styleHint.
|
||||
|
||||
- QSystemTrayIcon:
|
||||
* [QTBUG-31762] Fixed position of system tray icon on Linux/X11
|
||||
(except Unity).
|
||||
* [QTBUG-33461] Increased the maximum length of a system tray
|
||||
tooltip on Windows to what it was in Qt 4.
|
||||
|
||||
- QTableView:
|
||||
* [QTBUG-4206] resizeToContents will now adjust to actual contents
|
||||
and not just visible area. QHeaderView::setAutoResizePrecision()
|
||||
has been introduced to control how precise the autoResize should
|
||||
be.
|
||||
|
||||
- QTextEdit:
|
||||
* Added placeholderText akin to QLineEdit.
|
||||
* Context-menu actions now have icons.
|
||||
|
||||
- QTreeView:
|
||||
* QTreeView now has setTreePosition to allow the treestructure to
|
||||
show data from other columns than logicalindex zero.
|
||||
|
||||
- QWindowContainer:
|
||||
* [QTBUG-32177] Sets active window correctly now.
|
||||
|
||||
- QWizard:
|
||||
* [QTBUG-29924] Gave all buttons an objectName().
|
||||
|
||||
****************************************************************************
|
||||
* Platform Specific Changes *
|
||||
****************************************************************************
|
||||
|
||||
|
||||
Android
|
||||
-------
|
||||
|
||||
- Project structure and deployment has changed with the introduction of
|
||||
androiddeployqt. Source and build files are no longer mixed, and the
|
||||
build files for the APK package should not be touched. Customizing
|
||||
the build files is possible. Read the documentation for androiddeployqt
|
||||
for more information.
|
||||
- Status bar visibility is now controlled by Qt, so the window state will
|
||||
override settings in the AndroidManifest.xml. The default is still to
|
||||
show the status bar (QWindow::showMaximized()). Use
|
||||
QWindow::showFullScreen() to hide it.
|
||||
- Implemented support for accessibility on Android.
|
||||
|
||||
OS X
|
||||
----
|
||||
|
||||
- Qt for OS X is now identified by the macro Q_OS_OSX. This complements the
|
||||
existing Q_OS_DARWIN macro (which identifies the open source kernel and
|
||||
could identify non-Apple products) and Q_OS_MAC, which is defined for
|
||||
both OS X and iOS. The old macro Q_OS_MACX is now deprecated.
|
||||
- Qt no longer complains about new versions of OS X that haven't been
|
||||
released yet. This will allow Qt 5.2 and future versions to build on
|
||||
future versions yet to be released. Note that those versions are not
|
||||
supported until official announcement by the Qt Project.
|
||||
- Added a number of functions to QtCore to convert to and from
|
||||
CFString/NSString and QString, CFURL/NSURL and QUrl.
|
||||
|
||||
Windows
|
||||
-------
|
||||
|
||||
- [QTBUG-33409][QTBUG-8764][QTBUG-10032] Fixed virtual key mapping on
|
||||
Windows.
|
||||
- QCoreApplication::arguments() changed the handling of single quotes, double quotes
|
||||
and the backslash character, in order to match what argv[] contains.
|
||||
In particular, single quotes are no longer removed from the argument string.
|
||||
(QTBUG-15379, QTBUG-30628)
|
||||
|
||||
X11
|
||||
---
|
||||
|
||||
- [QTBUG-31762] Fix position of system tray icon (except Unity)
|
||||
- [QTBUG-27349] Reintroduced command line argument for positioning
|
||||
windows (-geometry)
|
||||
|
@ -29,6 +29,10 @@
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-deployment-qnx.html
|
||||
\title Qt Creator: Deploying Applications to QNX Devices
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-developing-baremetal.html
|
||||
\title Qt Creator: Connecting Bare Metal Devices
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-developing-bb10.html
|
||||
\title Qt Creator: Connecting BlackBerry 10 Devices
|
||||
@ -45,33 +49,9 @@
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-developing-generic-linux.html
|
||||
\title Qt Creator: Connecting Embedded Linux Devices
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-publish-ovi-maemo.html
|
||||
\title Qt Creator: Publishing Qt Content for Maemo Devices
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-maemo-emulator.html
|
||||
\title Qt Creator: Using Maemo or MeeGo Harmattan Emulator
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-developing-meego.html
|
||||
\title Qt Creator: Connecting MeeGo Harmattan Devices
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-developing-maemo.html
|
||||
\title Qt Creator: Connecting Maemo Devices
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-publish-ovi-meego.html
|
||||
\title Qt Creator: Publishing Qt Content for MeeGo Harmattan Devices
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-publishing-to-maemo-extras.html
|
||||
\title Qt Creator: Publishing Maemo Applications to Extras-devel
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-deployment-maemo.html
|
||||
\title Qt Creator: Deploying Applications to Linux-Based Devices
|
||||
\title Qt Creator: Deploying Applications to Embedded Linux Devices
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-faq.html
|
||||
@ -117,14 +97,6 @@
|
||||
\externalpage http://qt-project.org/doc/qtcreator/quick-screens.html
|
||||
\title Qt Creator: Creating Screens
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/quick-animations.html
|
||||
\title Qt Creator: Animating Screens
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/quick-user-interaction.html
|
||||
\title Qt Creator: Adding User Interaction Methods
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-qml-application.html
|
||||
\title Qt Creator: Creating a Qt Quick Application
|
||||
@ -141,10 +113,6 @@
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-visual-editor.html
|
||||
\title Qt Creator: Developing Qt Quick Applications
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/quick-application-logic.html
|
||||
\title Qt Creator: Implementing Application Logic
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-using-qt-quick-designer.html
|
||||
\title Qt Creator: Using Qt Quick Designer
|
||||
@ -369,6 +337,12 @@
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-deploying-android.html
|
||||
\title Qt Creator: Deploying Applications to Android Devices
|
||||
*/
|
||||
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-developing-ios.html
|
||||
\title Qt Creator: Connecting iOS devices
|
||||
*/
|
||||
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-developing-android.html
|
||||
\title Qt Creator: Connecting Android Devices
|
||||
@ -489,3 +463,7 @@
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-configuring.html
|
||||
\title Qt Creator: Configuring Qt Creator
|
||||
*/
|
||||
/*!
|
||||
\externalpage http://qt-project.org/doc/qtcreator/creator-debuggers.html
|
||||
\title Qt Creator: Adding Debuggers
|
||||
*/
|
||||
|
@ -7,24 +7,14 @@ HTML.footer = \
|
||||
" </div>\n" \
|
||||
"</div>\n" \
|
||||
"<div class=\"footer\">\n" \
|
||||
" <div class=\"qt13a-copyright\" id=\"copyright\">\n" \
|
||||
" <div class=\"qt13a-container\">\n" \
|
||||
" <p>\n" \
|
||||
" <acronym title=\"Copyright\">©</acronym> 2013 Digia Plc and/or its\n" \
|
||||
" subsidiaries. Documentation contributions included herein are the copyrights of\n" \
|
||||
" their respective owners.</p>\n" \
|
||||
" <p>\n" \
|
||||
" The documentation provided herein is licensed under the terms of the\n" \
|
||||
" <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation\n" \
|
||||
" License version 1.3</a> as published by the Free Software Foundation.</p>\n" \
|
||||
" <p>\n" \
|
||||
" Documentation sources may be obtained from <a href=\"http://www.qt-project.org\">\n" \
|
||||
" www.qt-project.org</a>.</p>\n" \
|
||||
" <p>\n" \
|
||||
" Digia, Qt and their respective logos are trademarks of Digia Plc \n" \
|
||||
" in Finland and/or other countries worldwide. All other trademarks are property\n" \
|
||||
" of their respective owners. <a title=\"Privacy Policy\"\n" \
|
||||
" href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \
|
||||
" </div>\n" \
|
||||
" </div>\n" \
|
||||
" <p>\n" \
|
||||
" <acronym title=\"Copyright\">©</acronym> 2013 Digia Plc and/or its\n" \
|
||||
" subsidiaries. Documentation contributions included herein are the copyrights of\n" \
|
||||
" their respective owners.<br>" \
|
||||
" The documentation provided herein is licensed under the terms of the" \
|
||||
" <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation" \
|
||||
" License version 1.3</a> as published by the Free Software Foundation.<br>" \
|
||||
" Digia, Qt and their respective logos are trademarks of Digia Plc " \
|
||||
" in Finland and/or other countries worldwide. All other trademarks are property\n" \
|
||||
" of their respective owners. </p>\n" \
|
||||
"</div>\n" \
|
||||
|
@ -32,7 +32,7 @@
|
||||
# manifestmeta.global.names = *
|
||||
# manifestmeta.global.tags = qt5
|
||||
|
||||
manifestmeta.filters = highlighted webkit1 webkit2 android thumbnail
|
||||
manifestmeta.filters = highlighted webkit1 webkit2 android thumbnail ios
|
||||
|
||||
manifestmeta.highlighted.names = "QtQuick/Qt Quick Demo - Same Game" \
|
||||
"QtQuick/Qt Quick Demo - Photo Surface" \
|
||||
@ -125,8 +125,11 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
|
||||
"QtLinguist/Arrow Pad Example" \
|
||||
"QtGui/Raster Window Example" \
|
||||
"QtGui/Analog Clock Window Example" \
|
||||
"QtMultimediaWidgets/Video Widget Example" \
|
||||
"QtMultimediaWidgets/Media Player Example" \
|
||||
"QtAndroidExtras/Qt Notifier" \
|
||||
"QtMultimedia/QML Video Shader Effects Example" \
|
||||
"QtMultimedia/QML Video Example" \
|
||||
"QtMultimedia/QML Camera Example" \
|
||||
"QtMultimedia/Audio Output Example" \
|
||||
"QtSVG/Text Object Example" \
|
||||
"QtQML/Qt Quick Examples - XMLHttpRequest" \
|
||||
"QtQuick/Qt Quick Particles Examples - *" \
|
||||
@ -138,6 +141,9 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
|
||||
"QtQuick/Qt Quick Examples - Animation" \
|
||||
"QtQuick/Qt Quick Examples - Shader Effects" \
|
||||
"QtQuick/Qt Quick Examples - Canvas" \
|
||||
"QtQuick/Qt Quick Examples - MouseArea" \
|
||||
"QtQuick/Qt Quick Examples - Positioners" \
|
||||
"QtQuick/Qt Quick Examples - Right to Left" \
|
||||
"QtWidgets/Interview" \
|
||||
"QtWidgets/Spreadsheet" \
|
||||
"QtWidgets/Pixelator Example" \
|
||||
@ -164,11 +170,106 @@ manifestmeta.android.names = "QtQuick/Qt Quick Demo - Maroon*" \
|
||||
"QtQML/Extending QML - Methods Example" \
|
||||
"QtQML/Extending QML - Signal Support Example" \
|
||||
"QtQML/Extending QML - Attached Properties Example" \
|
||||
"QtQuick/Qt Quick Examples - Window and Screen" \
|
||||
"QtWidgets/Address Book Example"
|
||||
|
||||
manifestmeta.android.tags = android
|
||||
|
||||
manifestmeta.ios.names = "QtCore/Contiguous Cache Example" \
|
||||
"QtCore/Mandelbrot Example" \
|
||||
"QtCore/Queued Custom Type Example" \
|
||||
"QtGui/Analog Clock Window Example" \
|
||||
"QtGui/OpenGL Window Example" \
|
||||
"QtGui/Raster Window Example" \
|
||||
"QtNetwork/Loopback Example" \
|
||||
"QtNetwork/Network Chat Example" \
|
||||
"QtNetwork/Torrent Example" \
|
||||
"QtOpenGL/2D Painting Example" \
|
||||
"QtOpenGL/Textures Example" \
|
||||
"QtWidgets/Animated Tiles Example" \
|
||||
"QtWidgets/Application Chooser Example" \
|
||||
"QtWidgets/Easing Curves Example" \
|
||||
"QtWidgets/Move Blocks Example" \
|
||||
"QtWidgets/States Example" \
|
||||
"QtWidgets/Class Wizard Example" \
|
||||
"QtWidgets/Find Files Example" \
|
||||
"QtWidgets/License Wizard Example" \
|
||||
"QtWidgets/Standard Dialogs Example" \
|
||||
"QtWidgets/Tab Dialog Example" \
|
||||
"QtWidgets/Trivial Wizard Example" \
|
||||
"QtWidgets/Draggable Text Example" \
|
||||
"QtWidgets/Fridge Magnets Example" \
|
||||
"QtWidgets/Blur Picker Effect Example" \
|
||||
"QtWidgets/Fade Message Effect Example" \
|
||||
"QtWidgets/Lighting Effect Example" \
|
||||
"QtWidgets/Anchor Layout Example" \
|
||||
"QtWidgets/Basic Graphics Layouts Example" \
|
||||
"QtWidgets/40000 Chips" \
|
||||
"QtWidgets/Colliding Mice Example" \
|
||||
"QtWidgets/Diagram Scene Example" \
|
||||
"QtWidgets/Elastic Nodes Example" \
|
||||
"QtWidgets/Embedded Dialogs" \
|
||||
"QtWidgets/Graphics View Flow Layout Example" \
|
||||
"QtWidgets/Simple Anchor Layout Example" \
|
||||
"QtWidgets/Weather Anchor Layout Example" \
|
||||
"QtWidgets/Address Book Example" \
|
||||
"QtWidgets/Basic Sort/Filter Model Example" \
|
||||
"QtWidgets/Chart Example" \
|
||||
"QtWidgets/Custom Sort/Filter Model Example" \
|
||||
"QtWidgets/Dir View Example" \
|
||||
"QtWidgets/Editable Tree Model Example" \
|
||||
"QtWidgets/Frozen Column Example" \
|
||||
"QtWidgets/Interview" \
|
||||
"QtWidgets/Simple Tree Model Example" \
|
||||
"QtWidgets/Simple Widget Mapper Example" \
|
||||
"QtWidgets/Basic Layouts Example" \
|
||||
"QtWidgets/Border Layout Example" \
|
||||
"QtWidgets/Flow Layout Example" \
|
||||
"QtWidgets/Basic Drawing Example" \
|
||||
"QtWidgets/Concentric Circles Example" \
|
||||
"QtWidgets/Font Sampler Example" \
|
||||
"QtWidgets/Gradients" \
|
||||
"QtWidgets/Image Composition Example" \
|
||||
"QtWidgets/Painter Paths Example" \
|
||||
"QtWidgets/Transformations Example" \
|
||||
"QtWidgets/Calendar Example" \
|
||||
"QtWidgets/Order Form Example" \
|
||||
"QtWidgets/Syntax Highlighter Example" \
|
||||
"QtWidgets/Text Edit" \
|
||||
"QtWidgets/Traffic Light Example" \
|
||||
"QtWidgets/Two-way Button Example" \
|
||||
"QtWidgets/Completer Example" \
|
||||
"QtWidgets/Custom Completer Example" \
|
||||
"QtWidgets/Undo Framework" \
|
||||
"QtWidgets/Analog Clock Example" \
|
||||
"QtWidgets/Calculator Example" \
|
||||
"QtWidgets/Calendar Widget Example" \
|
||||
"QtWidgets/Character Map Example" \
|
||||
"QtWidgets/Code Editor Example" \
|
||||
"QtWidgets/Digital Clock Example" \
|
||||
"QtWidgets/Elided Label Example" \
|
||||
"QtWidgets/Line Edits Example" \
|
||||
"QtWidgets/Scribble Example" \
|
||||
"QtWidgets/Shaped Clock Example" \
|
||||
"QtWidgets/Sliders Example" \
|
||||
"QtWidgets/Validators Example" \
|
||||
"QtWidgets/Window Flags Example" \
|
||||
"QtWidgets/Wiggly Example" \
|
||||
"QtQuick/Qt Quick Examples - Animation" \
|
||||
"QtQuick/Qt Quick Examples - Canvas" \
|
||||
"QtQuick/Qt Quick Examples - Drag and Drop" \
|
||||
"QtQuick/Qt Quick Examples - Image Elements" \
|
||||
"QtQuick/Qt Quick Examples - MouseArea" \
|
||||
"QtQuick/Qt Quick Examples - Positioners" \
|
||||
"QtQuick/Qt Quick Examples - Right to Left" \
|
||||
"QtQuick/Scene Graph - OpenGL Under QML" \
|
||||
"QtQuick/Qt Quick Examples - Shader Effects" \
|
||||
"QtQuick/Qt Quick Examples - Text" \
|
||||
"QtQuick/Qt Quick Examples - Touch Interaction" \
|
||||
"QtQuick/Qt Quick Examples - Views" \
|
||||
"QtQuick/Qt Quick Examples - Window and Screen"
|
||||
|
||||
manifestmeta.ios.tags = ios
|
||||
|
||||
# add a generic thumbnail image to examples that do not have any images in their documentation
|
||||
manifestmeta.thumbnail.attributes = "imageUrl:qthelp\://org.qt-project.qtdoc.$QT_VERSION_TAG/qtdoc/images/qt-codesample.png"
|
||||
|
||||
|
@ -15,6 +15,7 @@ defines += Q_QDOC \
|
||||
Q_NO_USING_KEYWORD \
|
||||
__cplusplus \
|
||||
Q_COMPILER_INITIALIZER_LISTS \
|
||||
Q_COMPILER_UNIFORM_INIT \
|
||||
Q_COMPILER_RVALUE_REFS
|
||||
|
||||
Cpp.ignoretokens += \
|
||||
|
@ -192,7 +192,29 @@ footer and license
|
||||
*/
|
||||
|
||||
.footer {
|
||||
text-align: center
|
||||
text-align: left;
|
||||
margin-top: 50px;
|
||||
padding-left: 5px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 10px;
|
||||
border-top: 1px solid #999;
|
||||
padding-top: 11px;
|
||||
}
|
||||
|
||||
.footer p {
|
||||
line-height: 14px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.footer a[href*="http://"], a[href*="ftp://"], a[href*="https://"] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.footerNavi {
|
||||
width: auto;
|
||||
text-align: right;
|
||||
margin-top: 50px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.navigationbar {
|
||||
@ -244,16 +266,6 @@ footer and license
|
||||
padding-right: 17px;
|
||||
}
|
||||
|
||||
/*
|
||||
-----------
|
||||
footer and license
|
||||
-----------
|
||||
*/
|
||||
|
||||
.footer {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
#buildversion {
|
||||
font-style: italic;
|
||||
font-size: small;
|
||||
@ -492,22 +504,6 @@ ol {
|
||||
padding: 20px 20px 20px 20px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
margin-top: 50px;
|
||||
padding-left: 5px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 10px;
|
||||
border-top: 1px solid #999;
|
||||
padding-top: 11px;
|
||||
}
|
||||
|
||||
.footerNavi {
|
||||
width: auto;
|
||||
text-align: right;
|
||||
margin-top: 50px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.memItemLeft {
|
||||
padding-right: 3px
|
||||
}
|
||||
|
@ -40,8 +40,6 @@
|
||||
#include "imagescaling.h"
|
||||
#include "math.h"
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
const int imageSize = 100;
|
||||
|
||||
QImage scale(const QString &imageFileName)
|
||||
@ -141,5 +139,3 @@ void Images::finished()
|
||||
cancelButton->setEnabled(false);
|
||||
pauseButton->setEnabled(false);
|
||||
}
|
||||
|
||||
#endif // QT_NO_CONCURRENT
|
||||
|
@ -43,8 +43,6 @@
|
||||
#include <QtWidgets>
|
||||
#include <QtConcurrent>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
class Images : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -65,18 +63,4 @@ private:
|
||||
QFutureWatcher<QImage> *imageScaling;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
// Dummy class required because QT_NO_CONCURRENT is not set when moc is run.
|
||||
class Images : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public Q_SLOTS:
|
||||
void open() {}
|
||||
void showImage(int) {}
|
||||
void finished() {}
|
||||
};
|
||||
|
||||
#endif // QT_NO_CONCURRENT
|
||||
|
||||
#endif // IMAGESCALING_H
|
||||
|
@ -40,8 +40,6 @@
|
||||
#include <QtWidgets>
|
||||
#include <QtConcurrent>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
#include "imagescaling.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@ -53,21 +51,3 @@ int main(int argc, char *argv[])
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
QString text("Qt Concurrent is not supported on this platform");
|
||||
|
||||
QLabel *label = new QLabel(text);
|
||||
label->setWordWrap(true);
|
||||
|
||||
label->show();
|
||||
qDebug() << text;
|
||||
|
||||
app.exec();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -41,8 +41,6 @@
|
||||
#include <QtWidgets>
|
||||
#include <QtConcurrent>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
using namespace QtConcurrent;
|
||||
|
||||
const int iterations = 20;
|
||||
@ -88,22 +86,3 @@ int main(int argc, char **argv)
|
||||
// Query the future to check if was canceled.
|
||||
qDebug() << "Canceled?" << futureWatcher.future().isCanceled();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
QString text("Qt Concurrent is not yet supported on this platform");
|
||||
|
||||
QLabel *label = new QLabel(text);
|
||||
label->setWordWrap(true);
|
||||
|
||||
label->show();
|
||||
qDebug() << text;
|
||||
|
||||
app.exec();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -44,8 +44,6 @@
|
||||
#include <qtconcurrentrun.h>
|
||||
#include <QApplication>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
using namespace QtConcurrent;
|
||||
|
||||
void hello(QString name)
|
||||
@ -61,23 +59,3 @@ int main(int argc, char **argv)
|
||||
f1.waitForFinished();
|
||||
f2.waitForFinished();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <QLabel>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
QString text("Qt Concurrent is not yet supported on this platform");
|
||||
|
||||
QLabel *label = new QLabel(text);
|
||||
label->setWordWrap(true);
|
||||
|
||||
label->show();
|
||||
qDebug() << text;
|
||||
|
||||
app.exec();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -50,8 +50,6 @@
|
||||
|
||||
#include <qtconcurrentmap.h>
|
||||
|
||||
#ifndef QT_NO_CONCURRENT
|
||||
|
||||
using namespace QtConcurrent;
|
||||
|
||||
/*
|
||||
@ -155,23 +153,3 @@ int main(int argc, char** argv)
|
||||
}
|
||||
qDebug() << "MapReduce speedup x" << ((double)singleThreadTime - (double)mapReduceTime) / (double)mapReduceTime + 1;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <QLabel>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
QString text("Qt Concurrent is not yet supported on this platform");
|
||||
|
||||
QLabel *label = new QLabel(text);
|
||||
label->setWordWrap(true);
|
||||
|
||||
label->show();
|
||||
qDebug() << text;
|
||||
|
||||
app.exec();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -42,8 +42,9 @@
|
||||
|
||||
\section1 Overview
|
||||
|
||||
In the \l{Custom Type Sending Example}, we showed how to use a custom type
|
||||
with signal-slot communication within the same thread.
|
||||
In the \l{Custom Type Example}, we showed how to integrate custom types with
|
||||
the meta-object system, enabling them to be stored in QVariant objects, written
|
||||
out in debugging information and used in signal-slot communication.
|
||||
|
||||
In this example, we create a new value class, \c Block, and register it
|
||||
with the meta-object system to enable us to send instances of it between
|
||||
@ -152,7 +153,7 @@
|
||||
meta-object system so that it can be used with signal-slot connections
|
||||
between threads. For ordinary communication involving direct signals and
|
||||
slots, it is enough to simply declare the type in the way described in the
|
||||
\l{Custom Type Sending Example}.
|
||||
\l{Custom Type Example}.
|
||||
|
||||
In practice, both the Q_DECLARE_METATYPE() macro and the qRegisterMetaType()
|
||||
template function can be used to register custom types, but
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
An alternative to using QSemaphore to solve the producer-consumer
|
||||
problem is to use QWaitCondition and QMutex. This is what the
|
||||
\l{threads/waitconditions}{Wait Conditions} example does.
|
||||
\l{Wait Conditions Example} does.
|
||||
|
||||
\section1 Global Variables
|
||||
|
||||
|
@ -54,7 +54,7 @@
|
||||
|
||||
An alternative to using QWaitCondition and QMutex to solve the
|
||||
producer-consumer problem is to use QSemaphore. This is what the
|
||||
\l{threads/semaphores}{Semaphores} example does.
|
||||
\l{Semaphores Example} does.
|
||||
|
||||
\section1 Global Variables
|
||||
|
||||
|
@ -132,8 +132,8 @@
|
||||
\section1 Further Reading
|
||||
|
||||
The custom \c Message type can also be used with direct signal-slot
|
||||
connections; see the \l{Custom Type Sending Example} for a demonstration
|
||||
of this.
|
||||
connections.
|
||||
|
||||
To register a custom type for use with queued signals and slots, such as
|
||||
those used in cross-thread communication, see the
|
||||
\l{Queued Custom Type Example}.
|
||||
|
@ -32,8 +32,8 @@
|
||||
\brief Demonstrates how to create animated user interface
|
||||
|
||||
The Pad Navigator Example shows how you can use Graphics View together with
|
||||
embedded widgets and Qt's \l{State Machine Framework} to create a simple
|
||||
but useful, dynamic, animated user interface.
|
||||
embedded widgets and Qt's \l{The State Machine Framework}{state machine
|
||||
framework} to create a simple but useful, dynamic, animated user interface.
|
||||
|
||||
\image padnavigator-example.png
|
||||
|
||||
|
@ -42,8 +42,8 @@
|
||||
time has passed, it sends a QTimerEvent to a QObject of our
|
||||
choice. This makes QBasicTimer a more lightweight alternative to
|
||||
QTimer. Qt's built-in widgets use it internally, and it is
|
||||
provided in Qt's API for highly-optimized applications (e.g.,
|
||||
\l{Qt for Embedded Linux} applications).
|
||||
provided in Qt's API for highly-optimized applications (such as
|
||||
embedded applications).
|
||||
|
||||
The example consists of two classes:
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
QT += widgets
|
||||
CONFIG += console
|
||||
TEMPLATE = app
|
||||
SOURCES += main.cpp \
|
||||
clockthread.cpp
|
||||
HEADERS += clockthread.h
|
||||
|
||||
# install
|
||||
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/threads/clock
|
||||
INSTALLS += target
|
@ -1,66 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#include "clockthread.h"
|
||||
|
||||
//This class starts another thread where it emits a signal for every new second.
|
||||
|
||||
//! [1]
|
||||
// clock/clockthread.cpp
|
||||
void ClockThread::run()
|
||||
{
|
||||
QTimer timer;
|
||||
connect(&timer, SIGNAL(timeout()), this, SLOT(timerHit()), Qt::DirectConnection);
|
||||
timer.setInterval(10);
|
||||
timer.start(); // puts one event in the threads event queue
|
||||
exec();
|
||||
timer.stop();
|
||||
}
|
||||
|
||||
void ClockThread::timerHit()
|
||||
{
|
||||
QString newTime= QDateTime::currentDateTime().toString("ddd MMMM d yy, hh:mm:ss");
|
||||
if(m_lastTime != newTime ){
|
||||
m_lastTime = newTime;
|
||||
emit sendTime(newTime) ;
|
||||
}
|
||||
}
|
||||
//! [1]
|
@ -1,64 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CLOCKTHREAD_H
|
||||
#define CLOCKTHREAD_H
|
||||
|
||||
#include <QString>
|
||||
#include <QThread>
|
||||
|
||||
|
||||
|
||||
//! [1]
|
||||
// clock/clockthread.h
|
||||
class ClockThread : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
signals:
|
||||
void sendTime(QString time);
|
||||
private:
|
||||
void run();
|
||||
QString m_lastTime;
|
||||
private slots:
|
||||
void timerHit();
|
||||
|
||||
};
|
||||
//! [1]
|
||||
#endif // CLOCKTHREAD_H
|
@ -1,67 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtWidgets>
|
||||
#include "clockthread.h"
|
||||
|
||||
//A clock that does time formatting in another thread
|
||||
|
||||
//! [1]
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
// build gui
|
||||
QWidget widget;
|
||||
QLabel *label = new QLabel;
|
||||
QHBoxLayout *layout = new QHBoxLayout(&widget);
|
||||
layout->addWidget(label);
|
||||
widget.setWindowTitle("clock");
|
||||
|
||||
//instantiate thread object
|
||||
ClockThread clockThread;
|
||||
QObject::connect(&clockThread, SIGNAL(sendTime(QString)), label, SLOT(setText(QString)), Qt::QueuedConnection);
|
||||
clockThread.start();
|
||||
widget.show();
|
||||
app.exec();
|
||||
clockThread.quit();
|
||||
clockThread.wait();
|
||||
return 0;
|
||||
}
|
||||
//! [1]
|
@ -1,63 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtCore>
|
||||
#include <QtConcurrent>
|
||||
|
||||
/*
|
||||
says hello from main thread and secondary thread using QtConcurrent
|
||||
*/
|
||||
|
||||
//! [1]
|
||||
// helloconcurrent/main.cpp
|
||||
void hello()
|
||||
{
|
||||
qDebug() << "Hello from thread " << QThread::currentThread();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
QFuture<void> future = QtConcurrent::run(hello);
|
||||
qDebug() << "hello from GUI thread " << QThread::currentThread();
|
||||
future.waitForFinished();
|
||||
return 0;
|
||||
}
|
||||
//! [1]
|
@ -1,14 +0,0 @@
|
||||
QT -= gui
|
||||
QT += concurrent
|
||||
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
TEMPLATE = app
|
||||
SOURCES += helloconcurrent.cpp
|
||||
|
||||
# install
|
||||
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/threads/helloconcurrent
|
||||
INSTALLS += target
|
||||
|
||||
|
||||
|
@ -1,50 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QDebug>
|
||||
#include "hellothread.h"
|
||||
/*
|
||||
* demonstrates use of QThread, says hello in another thread and terminates
|
||||
*/
|
||||
|
||||
void HelloThread::run()
|
||||
{
|
||||
qDebug() << "hello from worker thread " << thread()->currentThreadId();
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef HELLOTHREAD_H
|
||||
#define HELLOTHREAD_H
|
||||
|
||||
#include <QThread>
|
||||
|
||||
class HelloThread : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
void run();
|
||||
};
|
||||
|
||||
#endif // HELLOTHREAD_H
|
@ -1,14 +0,0 @@
|
||||
QT -= gui
|
||||
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
TEMPLATE = app
|
||||
SOURCES += main.cpp \
|
||||
hellothread.cpp
|
||||
HEADERS += hellothread.h
|
||||
|
||||
# install
|
||||
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/threads/hellothread
|
||||
INSTALLS += target
|
||||
|
||||
|
@ -1,52 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtCore>
|
||||
#include "hellothread.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
HelloThread thread;
|
||||
thread.start();
|
||||
qDebug() << "hello from GUI thread " << app.thread()->currentThreadId();
|
||||
thread.wait(); // do not exit before the thread is completed!
|
||||
return 0;
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include <QtCore>
|
||||
// A hello world program to demonstrate the use of the global thread pool
|
||||
|
||||
//! [1]
|
||||
// hellothreadpool/main.cpp
|
||||
class Work : public QRunnable
|
||||
{
|
||||
public:
|
||||
void run()
|
||||
{
|
||||
qDebug() << "Hello from thread " << QThread::currentThread();
|
||||
}
|
||||
};
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
Work work;
|
||||
work.setAutoDelete(false);
|
||||
QThreadPool *threadPool = QThreadPool::globalInstance();
|
||||
threadPool->start(&work);
|
||||
qDebug() << "hello from GUI thread " << QThread::currentThread();
|
||||
threadPool->waitForDone();
|
||||
return 0;
|
||||
}
|
||||
//! [1]
|
@ -1,14 +0,0 @@
|
||||
QT -= gui
|
||||
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
TEMPLATE = app
|
||||
SOURCES += hellothreadpool.cpp
|
||||
|
||||
# install
|
||||
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/threads/hellothreadpool
|
||||
INSTALLS += target
|
||||
|
||||
|
||||
|
||||
|
@ -1,69 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <QtCore>
|
||||
#include "workerobject.h"
|
||||
#include "thread.h"
|
||||
|
||||
/*
|
||||
* moves a class derived from QObject (WorkerObject) to another thread
|
||||
* and calls methods over thread boundaries.
|
||||
*/
|
||||
|
||||
//![1]
|
||||
// movedobject/main.cpp
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
Thread thread;
|
||||
qDebug() << "main thread ID: " << app.thread()->currentThreadId();
|
||||
WorkerObject *worker = new WorkerObject;
|
||||
thread.launchWorker(worker);
|
||||
QMetaObject::invokeMethod(worker, "doWork", Qt::QueuedConnection);
|
||||
QMetaObject::invokeMethod(worker, "startPolling", Qt::QueuedConnection, Q_ARG(int, 500));
|
||||
//let application produce output for 3 seconds and quit
|
||||
QTimer::singleShot(3000, &app, SLOT(quit()));
|
||||
app.exec();
|
||||
thread.stop();
|
||||
thread.wait();
|
||||
delete worker;
|
||||
return 0;
|
||||
}
|
||||
//![1]
|
@ -1,15 +0,0 @@
|
||||
QT += widgets
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
TEMPLATE = app
|
||||
SOURCES += main.cpp \
|
||||
workerobject.cpp \
|
||||
thread.cpp
|
||||
|
||||
HEADERS += \
|
||||
workerobject.h \
|
||||
thread.h
|
||||
|
||||
# install
|
||||
target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/threads/movedobject
|
||||
INSTALLS += target
|
@ -1,100 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "thread.h"
|
||||
|
||||
/*
|
||||
* QThread derived class with additional capability to move a QObject to the
|
||||
* new thread, to stop the thread and move the QObject back to the thread where
|
||||
*it came from.
|
||||
*/
|
||||
|
||||
Thread::Thread( QObject *parent)
|
||||
: QThread (parent)
|
||||
{
|
||||
//we need a class that receives signals from other threads and emits a signal in response
|
||||
shutDownHelper=new QSignalMapper;
|
||||
shutDownHelper->setMapping(this,0);
|
||||
connect(this, SIGNAL(started()), this, SLOT(setReadyStatus() ), Qt::DirectConnection);
|
||||
connect(this, SIGNAL(aboutToStop()), shutDownHelper, SLOT(map()) );
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
Thread::~Thread()
|
||||
{
|
||||
delete shutDownHelper;
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// starts thread, moves worker to this thread and blocks
|
||||
void Thread::launchWorker(QObject *worker)
|
||||
{
|
||||
this->worker = worker;
|
||||
start();
|
||||
worker->moveToThread(this);
|
||||
shutDownHelper->moveToThread(this);
|
||||
connect(shutDownHelper, SIGNAL(mapped(int) ), this, SLOT(stopExecutor()), Qt::DirectConnection );
|
||||
mutex.lock();
|
||||
waitCondition.wait(&mutex);
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
// puts a command to stop processing in the event queue of worker thread
|
||||
void Thread::stop()
|
||||
{
|
||||
emit aboutToStop();
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
|
||||
// methods above this line should be called in gui thread context
|
||||
// methods below this line are private and will be run in secondary thread context
|
||||
|
||||
//------------------------------------------------------
|
||||
void Thread::stopExecutor() //secondary thread context
|
||||
{
|
||||
exit();
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
void Thread::setReadyStatus()
|
||||
{
|
||||
waitCondition.wakeAll();
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifndef THREAD_H
|
||||
#define THREAD_H
|
||||
|
||||
#include <QtCore>
|
||||
|
||||
class Thread :public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Thread( QObject *parent=0);
|
||||
~Thread();
|
||||
void stop();
|
||||
void launchWorker(QObject *worker);
|
||||
private:
|
||||
QObject *worker;
|
||||
QSignalMapper *shutDownHelper;
|
||||
QWaitCondition waitCondition;
|
||||
QMutex mutex;
|
||||
private slots:
|
||||
void stopExecutor();
|
||||
void setReadyStatus();
|
||||
signals:
|
||||
void aboutToStop();
|
||||
};
|
||||
|
||||
#endif // THREAD_H
|
@ -1,87 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include <QtCore>
|
||||
#include "workerobject.h"
|
||||
|
||||
/*
|
||||
* represents an object that lives in another thread where it polls a resource
|
||||
* and communicates with the gui thread
|
||||
*/
|
||||
|
||||
WorkerObject::WorkerObject(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
timer = new QTimer(this);
|
||||
connect(timer, SIGNAL(timeout()), this, SLOT(poll()));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
void WorkerObject::doWork()
|
||||
{
|
||||
|
||||
qDebug() << "doing work in thread " << thread()->currentThreadId() ;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
WorkerObject::~WorkerObject()
|
||||
{
|
||||
qDebug() << "destruction WorkerObject in thread " << thread()->currentThreadId();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
void WorkerObject::startPolling(int milliseconds)
|
||||
{
|
||||
count=0;
|
||||
timer->start(milliseconds);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
void WorkerObject::stopPolling()
|
||||
{
|
||||
timer->stop();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
void WorkerObject::poll()
|
||||
{
|
||||
qDebug() << QString("timer hit %1").arg(count);
|
||||
count++;
|
||||
}
|
||||
|
@ -1,64 +0,0 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/legal
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
|
||||
** of its contributors may be used to endorse or promote products derived
|
||||
** from this software without specific prior written permission.
|
||||
**
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifndef WORKEROBJECT_H
|
||||
#define WORKEROBJECT_H
|
||||
|
||||
#include <QtCore>
|
||||
|
||||
class WorkerObject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit WorkerObject(QObject *parent = 0);
|
||||
~WorkerObject();
|
||||
public slots:
|
||||
void doWork();
|
||||
void startPolling(int milliseconds);
|
||||
void stopPolling();
|
||||
private slots:
|
||||
void poll();
|
||||
private:
|
||||
QTimer *timer;
|
||||
int count;
|
||||
};
|
||||
|
||||
#endif // WORKEROBJECT_H
|
@ -1,8 +0,0 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS = hellothread \
|
||||
hellothreadpool \
|
||||
clock \
|
||||
movedobject
|
||||
|
||||
qtHaveModule(concurrent): SUBDIRS += helloconcurrent
|
@ -1,2 +1,2 @@
|
||||
TEMPLATE = subdirs
|
||||
SUBDIRS += threads addressbook widgets modelview gettingStarted
|
||||
SUBDIRS += addressbook widgets modelview gettingStarted
|
||||
|
@ -4,7 +4,6 @@ QMAKE_PLATFORM = android
|
||||
QMAKE_COMPILER = gcc
|
||||
|
||||
CONFIG += android_install unversioned_soname android_deployment_settings
|
||||
DEFINES += QT_NO_PRINTER QT_NO_PRINTDIALOG
|
||||
|
||||
include(../common/linux.conf)
|
||||
include(../common/gcc-base-unix.conf)
|
||||
|
@ -47,18 +47,6 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-no-sdk {
|
||||
!isEmpty(ANDROID_PACKAGE_SOURCE_DIR): \
|
||||
FILE_CONTENT += " \"android-package-source-directory\": $$emitString($$ANDROID_PACKAGE_SOURCE_DIR),"
|
||||
|
||||
!isEmpty(ANDROID_PACKAGE): \
|
||||
FILE_CONTENT += " \"android-package\": $$emitString($$ANDROID_PACKAGE),"
|
||||
|
||||
!isEmpty(ANDROID_MINIMUM_VERSION): \
|
||||
FILE_CONTENT += " \"android-minimum-version\": $$ANDROID_MINIMUM_VERSION,"
|
||||
|
||||
!isEmpty(ANDROID_TARGET_VERSION): \
|
||||
FILE_CONTENT += " \"android-target-version\": $$ANDROID_TARGET_VERSION,"
|
||||
|
||||
!isEmpty(ANDROID_APP_NAME): \
|
||||
FILE_CONTENT += " \"android-app-name\": $$emitString($$ANDROID_APP_NAME),"
|
||||
|
||||
!isEmpty(ANDROID_EXTRA_LIBS): \
|
||||
FILE_CONTENT += " \"android-extra-libs\": $$emitString($$join(ANDROID_EXTRA_LIBS, ",")),"
|
||||
|
||||
|
@ -51,7 +51,7 @@ contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
|
||||
CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
|
||||
}
|
||||
|
||||
!exists($$first(QT.$${MODULE}.private_includes)): CMAKE_NO_PRIVATE_INCLUDES = true
|
||||
!exists($$first(QT.$${MODULE}_private.includes)): CMAKE_NO_PRIVATE_INCLUDES = true
|
||||
|
||||
CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
|
||||
contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
|
||||
@ -111,15 +111,15 @@ if(build_all|CONFIG(debug, debug|release)): CMAKE_DEBUG_TYPE = debug
|
||||
if(build_all|CONFIG(release, debug|release)): CMAKE_RELEASE_TYPE = release
|
||||
|
||||
contains(CONFIG, plugin) {
|
||||
equals(PLUGIN_TYPE, bearer): PLUGIN_MODULE_NAME = network
|
||||
else:equals(PLUGIN_TYPE, sqldrivers): PLUGIN_MODULE_NAME = sql
|
||||
else:equals(PLUGIN_TYPE, accessible): PLUGIN_MODULE_NAME = widgets
|
||||
else:equals(PLUGIN_TYPE, imageformats): PLUGIN_MODULE_NAME = gui
|
||||
else:equals(PLUGIN_TYPE, platforminputcontexts): PLUGIN_MODULE_NAME = gui
|
||||
else:equals(PLUGIN_TYPE, platformthemes): PLUGIN_MODULE_NAME = gui
|
||||
else:equals(PLUGIN_TYPE, generic): PLUGIN_MODULE_NAME = gui
|
||||
else:equals(PLUGIN_TYPE, platforms): PLUGIN_MODULE_NAME = gui
|
||||
else: return()
|
||||
PLUGIN_MODULE_NAME =
|
||||
for (mod, QT_MODULES) {
|
||||
types = $$replace(QT.$${mod}.plugin_types, /.*$, )
|
||||
contains(types, $$PLUGIN_TYPE) {
|
||||
PLUGIN_MODULE_NAME = $$mod
|
||||
break()
|
||||
}
|
||||
}
|
||||
isEmpty(PLUGIN_MODULE_NAME): return()
|
||||
|
||||
CMAKE_MODULE_NAME = $$cmakeModuleName($$PLUGIN_MODULE_NAME)
|
||||
|
||||
|
@ -95,7 +95,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}Qt$${CMAKE_MODULE_NAME}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
|
||||
)
|
||||
!!ELSE
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
||||
!!ENDIF
|
||||
!!ELSE
|
||||
!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
|
||||
@ -106,7 +106,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||
\"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
|
||||
)
|
||||
!!ELSE
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
||||
!!ENDIF
|
||||
!!ELSE
|
||||
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}\")
|
||||
@ -116,7 +116,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||
\"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
|
||||
)
|
||||
!!ELSE
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
||||
!!ENDIF
|
||||
!!ENDIF
|
||||
!!ENDIF
|
||||
@ -124,8 +124,8 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||
include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL)
|
||||
!!ENDIF
|
||||
!!ELSE
|
||||
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS)
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
|
||||
set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"\")
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
|
||||
!!ENDIF
|
||||
|
||||
foreach(_dir ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
|
||||
@ -163,6 +163,8 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||
set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT EXACT)
|
||||
endif()
|
||||
|
||||
set(Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS \"\")
|
||||
|
||||
foreach(_module_dep ${_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES})
|
||||
if (NOT Qt5${_module_dep}_FOUND)
|
||||
find_package(Qt5${_module_dep}
|
||||
@ -188,9 +190,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
|
||||
list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
|
||||
list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS)
|
||||
list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS)
|
||||
if (Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
|
||||
list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
|
||||
endif()
|
||||
list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
|
||||
|
||||
set(_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_QT5_MODULE_DEPS}\")
|
||||
|
||||
|
@ -67,6 +67,7 @@ for(group, groups) {
|
||||
$${group}_source.name = DBUSXML2CPP $${dbus_TYPE} SOURCE ${QMAKE_FILE_IN}
|
||||
$${group}_source.variable_out = SOURCES
|
||||
$${group}_source.input = $$input_list
|
||||
$${group}_source.depends = $$eval($${group}_header.output) # this actually belongs to the object file
|
||||
|
||||
$${group}_moc.commands = $$moc_header.commands
|
||||
$${group}_moc.output = $$moc_header.output
|
||||
|
@ -6,6 +6,8 @@ contains(TEMPLATE, ".*(lib|app)"):CONFIG += have_target
|
||||
|
||||
load(resolve_config)
|
||||
|
||||
exclusive_builds: load(exclusive_builds_post)
|
||||
|
||||
# If the TARGET looks like a path, split it into DESTDIR and the resulting TARGET
|
||||
target_dir_part = $$dirname(TARGET)
|
||||
!isEmpty(target_dir_part) {
|
||||
|
@ -1,92 +1,37 @@
|
||||
# fixExclusiveOutputDirs(1config, 2config)
|
||||
# Change all output paths that references 2config to have the string 1config in them
|
||||
defineTest(fixExclusiveOutputDirs) {
|
||||
firstBuild = $$1
|
||||
secondBuild = $$2
|
||||
count(ARGS, 2, greaterThan):isEqual($$list($$lower($$3)), false):appendFirstBuild = false
|
||||
else:appendFirstBuild = true
|
||||
|
||||
isEmpty(QMAKE_DIR_REPLACE):QMAKE_DIR_REPLACE += OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR
|
||||
lessThan(firstBuild, $$secondBuild):eval($${firstBuild}_and_$${secondBuild}_target:QMAKE_DIR_REPLACE += DESTDIR)
|
||||
else:eval($${secondBuild}_and_$${firstBuild}_target:QMAKE_DIR_REPLACE += DESTDIR)
|
||||
for(fix, QMAKE_DIR_REPLACE) {
|
||||
isEmpty($$fix)|isEqual($$fix, .) {
|
||||
eval($$fix = $${firstBuild})
|
||||
} else:contains($$list($$first($$fix)), .*$${secondBuild}.*) {
|
||||
eval($$fix ~= s/$${secondBuild}/$${firstBuild}/gi)
|
||||
} else:isEqual(appendFirstBuild, true):!contains($$list($$first($$fix)), .*$${firstBuild}.*) {
|
||||
contains($$list($${first($$fix)}), .*/$):eval($$fix = $${first($$fix)}$${firstBuild})
|
||||
else:eval($$fix = $${first($$fix)}-$${firstBuild})
|
||||
}
|
||||
export($$fix)
|
||||
}
|
||||
return(true)
|
||||
}
|
||||
|
||||
# addExclusiveBuilds(1config, 1name, 2config, 2name)
|
||||
# Adds two BUILDS which are exclusive to each other.
|
||||
defineTest(addExclusiveBuilds) {
|
||||
firstBuild = $$1
|
||||
firstBuildName = $$2
|
||||
secondBuild = $$3
|
||||
secondBuildName = $$4
|
||||
lessThan(ARGC, 2): \
|
||||
error("addExclusiveBuilds() requires at least two arguments")
|
||||
|
||||
contains(TEMPLATE, subdirs) {
|
||||
eval(sub_$${firstBuildName}.target = $$firstBuild)
|
||||
export(sub_$${firstBuildName}.target)
|
||||
eval(sub_$${firstBuildName}.CONFIG = recursive)
|
||||
export(sub_$${firstBuildName}.CONFIG)
|
||||
eval(sub_$${secondBuildName}.target = $$secondBuild)
|
||||
export(sub_$${secondBuildName}.target)
|
||||
eval(sub_$${secondBuildName}.CONFIG = recursive)
|
||||
export(sub_$${secondBuildName}.CONFIG)
|
||||
QMAKE_EXTRA_TARGETS += sub_$${firstBuildName} sub_$${secondBuildName}
|
||||
export(QMAKE_EXTRA_TARGETS)
|
||||
} else:!build_pass {
|
||||
first_BUILDS =
|
||||
second_BUILDS =
|
||||
suffix_BUILDS = Build
|
||||
!$$join(ARGS, _and_):!fix_output_dirs: \
|
||||
return(true)
|
||||
|
||||
isEmpty(BUILDS): BUILDPERMUTATIONS = $$suffix_BUILDS
|
||||
else: BUILDPERMUTATIONS = $$BUILDS
|
||||
|
||||
for(permutation, BUILDPERMUTATIONS) {
|
||||
permutation ~= s/$${suffix_BUILDS}$//
|
||||
isEmpty(permutation): permutationName =
|
||||
else: permutationName = -$$permutation
|
||||
# Makefile target rule
|
||||
eval($${firstBuildName}$${permutation}.target = $${firstBuild}$$lower($${permutationName}))
|
||||
export($${firstBuildName}$${permutation}.target)
|
||||
# IDE name
|
||||
eval($${firstBuildName}$${permutation}.name = $${firstBuildName}$${permutationName})
|
||||
export($${firstBuildName}$${permutation}.name)
|
||||
# prl import CONFIG option
|
||||
eval($${firstBuildName}$${permutation}.PRL_CONFIG = $${firstBuild}$${permutation})
|
||||
export($${firstBuildName}$${permutation}.PRL_CONFIG)
|
||||
# Individual CONFIG option
|
||||
eval($${firstBuildName}$${permutation}.CONFIG = $${firstBuild} $${firstBuildName}Build $$eval($${permutation}.CONFIG))
|
||||
export($${firstBuildName}$${permutation}.CONFIG)
|
||||
|
||||
eval($${secondBuildName}$${permutation}.target = $${secondBuild}$$lower($${permutationName}))
|
||||
export($${secondBuildName}$${permutation}.target)
|
||||
eval($${secondBuildName}$${permutation}.name = $${secondBuildName}$${permutationName})
|
||||
export($${secondBuildName}$${permutation}.name)
|
||||
eval($${secondBuildName}$${permutation}.PRL_CONFIG = $${secondBuild}$${permutation})
|
||||
export($${secondBuildName}$${permutation}.PRL_CONFIG)
|
||||
eval($${secondBuildName}$${permutation}.CONFIG = $${secondBuild} $${secondBuildName}Build $$eval($${permutation}.CONFIG))
|
||||
export($${secondBuildName}$${permutation}.CONFIG)
|
||||
|
||||
first_BUILDS += $${firstBuildName}$${permutation}
|
||||
second_BUILDS += $${secondBuildName}$${permutation}
|
||||
for(build, ARGS) {
|
||||
isEmpty($${build}.name) {
|
||||
$${build}.name = $$title($$build)
|
||||
export($${build}.name)
|
||||
}
|
||||
isEmpty($${build}.target) {
|
||||
$${build}.target = $$lower($$build)
|
||||
export($${build}.target)
|
||||
}
|
||||
isEmpty($${build}.dir_affix) {
|
||||
$${build}.dir_affix = $$lower($$build)
|
||||
export($${build}.dir_affix)
|
||||
}
|
||||
|
||||
# A mutual exclusive block.
|
||||
CONFIG($${firstBuild}, $${firstBuild}|$${secondBuild}): BUILDS = $$first_BUILDS $$second_BUILDS
|
||||
else: BUILDS = $$second_BUILDS $$first_BUILDS
|
||||
export(BUILDS)
|
||||
} else {
|
||||
eval($${firstBuildName}Build:fixExclusiveOutputDirs($$firstBuild, $$secondBuild, false))
|
||||
eval($${secondBuildName}Build:fixExclusiveOutputDirs($$secondBuild, $$firstBuild, false))
|
||||
$${build}.exclusive = $$ARGS
|
||||
export($${build}.exclusive)
|
||||
|
||||
QMAKE_EXCLUSIVE_BUILDS += $$build
|
||||
}
|
||||
|
||||
CONFIG *= exclusive_builds
|
||||
export(CONFIG)
|
||||
|
||||
export(QMAKE_EXCLUSIVE_BUILDS)
|
||||
return(true)
|
||||
}
|
||||
|
||||
# Default directories to process
|
||||
QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR PRECOMPILED_DIR DESTDIR
|
||||
|
160
mkspecs/features/exclusive_builds_post.prf
Normal file
160
mkspecs/features/exclusive_builds_post.prf
Normal file
@ -0,0 +1,160 @@
|
||||
|
||||
contains(TEMPLATE, subdirs) {
|
||||
for(build, QMAKE_EXCLUSIVE_BUILDS) {
|
||||
prepareRecursiveTarget($$build)
|
||||
QMAKE_EXTRA_TARGETS += $$build
|
||||
}
|
||||
} else {
|
||||
# Recursively combines a list of exclusive builds into combinations
|
||||
# of non-exclusive builds (separated by a ':' character), eg the
|
||||
# list [debug, release, static, shared] will result in the four
|
||||
# combinations [debug:static, debug:shared, release:static,
|
||||
# release:shared].
|
||||
defineReplace(combineExclusiveBuilds) {
|
||||
permutationBuilds = $$1
|
||||
existingBuilds = $$2
|
||||
|
||||
isEmpty(permutationBuilds): \
|
||||
# Exit-condition, no more recursing
|
||||
return($$existingBuilds)
|
||||
|
||||
# Choose the first build of the permutations and use the set of exclusive
|
||||
# builds associated with that build as the list of existing builds. This
|
||||
# partitions the permutations into one set of exclusive builds + the rest
|
||||
# of the unknown permutations.
|
||||
newExistingBuilds = $$eval($$first(permutationBuilds).exclusive)
|
||||
permutationBuilds -= $$newExistingBuilds
|
||||
|
||||
# Recursively compute the combination of these two sets
|
||||
recursiveCombination = $$combineExclusiveBuilds($$permutationBuilds, $$newExistingBuilds)
|
||||
|
||||
isEmpty(existingBuilds): \
|
||||
# No need to combine further
|
||||
return($$recursiveCombination)
|
||||
|
||||
result =
|
||||
for(existingBuild, existingBuilds) {
|
||||
for(combination, recursiveCombination): \
|
||||
result += "$${existingBuild}:$${combination}"
|
||||
}
|
||||
return($$result)
|
||||
}
|
||||
|
||||
buildCombinations = $$combineExclusiveBuilds($$QMAKE_EXCLUSIVE_BUILDS)
|
||||
|
||||
for(combination, buildCombinations) {
|
||||
builds = $$split(combination, :)
|
||||
key =
|
||||
config =
|
||||
target =
|
||||
priority =
|
||||
for(build, builds) {
|
||||
key = $${key}$$eval($${build}.name)
|
||||
config *= $$eval($${build}.CONFIG) $${build} $$eval($${build}.name)Build
|
||||
target += $$eval($${build}.target)
|
||||
|
||||
# If a build has been prioritized through CONFIG we prefer that
|
||||
CONFIG($$build, $$join($${build}.exclusive, |)): \
|
||||
priority += 1
|
||||
}
|
||||
|
||||
$${key}.name = $$key
|
||||
$${key}.target = $$join(target, -)
|
||||
$${key}.CONFIG = $$config
|
||||
$${key}.builds = $$builds
|
||||
|
||||
BUILDS.$$size(priority) += $$key
|
||||
|
||||
# Add makefile targets for each exclusive build that will aggregate all targets
|
||||
# that include the exclusive build. This matches the targets in the SUBDIR files
|
||||
# so that you can recursivly build a single exclusive build.
|
||||
!build_pass:count(builds, 1, >) {
|
||||
for(build, builds) {
|
||||
$${build}.depends += $$eval($${key}.target)
|
||||
QMAKE_EXTRA_TARGETS *= $$build
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BUILDS =
|
||||
priority =
|
||||
for(ever) {
|
||||
# Keep the order in BUILDS matching the priority from CONFIG, so that the first
|
||||
# entry in BUILDS will be the first/default target when not CONFIG(build_all).
|
||||
BUILDS = $$eval(BUILDS.$$size(priority)) $$BUILDS
|
||||
count(BUILDS, $$size(buildCombinations), >=): break()
|
||||
priority += 1
|
||||
}
|
||||
|
||||
build_pass|fix_output_dirs {
|
||||
!build_pass {
|
||||
# The builds are sorted by priority based on the current config
|
||||
# so choosing the first one gives us the most appropriate build.
|
||||
BUILD_PASS = $$first(BUILDS)
|
||||
}
|
||||
|
||||
for(dir, QMAKE_DIR_REPLACE) {
|
||||
|
||||
# Limit builds to ones that should affect the current $$dir
|
||||
builds =
|
||||
for(build, $${BUILD_PASS}.builds) {
|
||||
equals(dir, DESTDIR) {
|
||||
!$$join($${build}.exclusive, _and_)_target: \
|
||||
next()
|
||||
}
|
||||
|
||||
builds += $$build
|
||||
}
|
||||
|
||||
isEmpty(builds): \
|
||||
next()
|
||||
|
||||
affixes =
|
||||
for(build, builds): \
|
||||
affixes += $$eval($${build}.dir_affix)
|
||||
full_dir_affix = $$join(affixes, -)
|
||||
|
||||
isEmpty($$dir)|isEqual($$dir, .) {
|
||||
# Use affix directly
|
||||
$$dir = $$full_dir_affix
|
||||
next()
|
||||
}
|
||||
|
||||
contains(QMAKE_DIR_REPLACE_SANE, $$dir) {
|
||||
# Suffix output dir
|
||||
$$dir = $$clean_path($$eval($$dir)/$$full_dir_affix)
|
||||
} else {
|
||||
# "Compatibility mode" with QTBUG-491
|
||||
for(build, builds) {
|
||||
did_replace = false
|
||||
build_affix = $$eval($${build}.dir_affix)
|
||||
for(exclusive, $${build}.exclusive) {
|
||||
equals(exclusive, $$build): \
|
||||
next()
|
||||
|
||||
exclusive_affix = $$eval($${exclusive}.dir_affix)
|
||||
contains($$dir, .*$${exclusive_affix}.*) {
|
||||
$$dir ~= s/$${exclusive_affix}/$${build_affix}/gi
|
||||
did_replace = true
|
||||
}
|
||||
}
|
||||
$$did_replace: next()
|
||||
|
||||
# Append (as subdir or as suffix)
|
||||
!build_pass {
|
||||
dir_affix = $$eval($${build}.dir_affix)
|
||||
!contains($$dir, .*$${dir_affix}.*) {
|
||||
contains($$dir, .*/$) {
|
||||
# Subdir
|
||||
$$dir = $$eval($$dir)$$dir_affix
|
||||
} else {
|
||||
# Suffix
|
||||
$$dir = $$eval($$dir)-$${dir_affix}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -19,13 +19,10 @@ qt:!isEmpty(QT_CONFIG) {
|
||||
contains(QT_CONFIG, static):contains(QT_CONFIG, c++11): CONFIG += c++11
|
||||
}
|
||||
|
||||
isEmpty(_QMAKE_CACHE_) {
|
||||
warning("No .qmake.cache is present. This significantly slows down qmake with this makespec.")
|
||||
warning("Call 'cache()' in the top-level project file to rectify this problem.")
|
||||
} else {
|
||||
cache(QMAKE_XCODE_DEVELOPER_PATH)
|
||||
cache(QMAKE_XCODE_VERSION)
|
||||
}
|
||||
cache(QMAKE_XCODE_DEVELOPER_PATH, stash)
|
||||
cache(QMAKE_XCODE_VERSION, stash)
|
||||
|
||||
QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
|
||||
|
||||
# Ensure that we process sdk.prf first, as it will update QMAKE_CXX
|
||||
# and friends that other features/extra compilers may depend on.
|
||||
|
@ -24,8 +24,16 @@ isEmpty(QMAKE_XCODE_VERSION) {
|
||||
unset(xcode_version)
|
||||
}
|
||||
|
||||
# These two variables are used by the xcode_dynamic_library_suffix
|
||||
isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) {
|
||||
QMAKE_XCODE_PREFERENCES_FILE = $$(HOME)/Library/Preferences/com.apple.dt.Xcode.plist
|
||||
exists($$QMAKE_XCODE_PREFERENCES_FILE): \
|
||||
QMAKE_TARGET_BUNDLE_PREFIX = $$system("/usr/libexec/PlistBuddy -c 'print IDETemplateOptions:bundleIdentifierPrefix' $$QMAKE_XCODE_PREFERENCES_FILE 2>/dev/null")
|
||||
|
||||
!isEmpty(_QMAKE_CACHE_):!isEmpty(QMAKE_TARGET_BUNDLE_PREFIX): \
|
||||
cache(QMAKE_TARGET_BUNDLE_PREFIX)
|
||||
}
|
||||
|
||||
# This variable is used by the xcode_dynamic_library_suffix
|
||||
# feature, which allows Xcode to choose the Qt libraries to link to
|
||||
# at build time, depending on the current Xcode SDK and configuration.
|
||||
QMAKE_XCODE_LIBRARY_SUFFIX = $$qtPlatformTargetSuffix()
|
||||
QMAKE_XCODE_LIBRARY_SUFFIX_SETTING = QT_LIBRARY_SUFFIX
|
||||
|
@ -8,7 +8,7 @@ contains(QMAKE_MAC_SDK, .*/.*): \
|
||||
isEmpty(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path) {
|
||||
QMAKE_MAC_SDK_PATH = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version Path 2>/dev/null")
|
||||
isEmpty(QMAKE_MAC_SDK_PATH): error("Could not resolve SDK path for \'$$QMAKE_MAC_SDK\'")
|
||||
!isEmpty(_QMAKE_CACHE_): cache(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path, set, QMAKE_MAC_SDK_PATH)
|
||||
cache(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path, set stash, QMAKE_MAC_SDK_PATH)
|
||||
} else {
|
||||
QMAKE_MAC_SDK_PATH = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.path)
|
||||
}
|
||||
@ -41,7 +41,7 @@ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_
|
||||
isEmpty(sysrooted): next()
|
||||
|
||||
$$tool = $$sysrooted $$member(value, 1, -1)
|
||||
!isEmpty(_QMAKE_CACHE_): cache($$tool_variable, set, $$tool)
|
||||
cache($$tool_variable, set stash, $$tool)
|
||||
}
|
||||
|
||||
isEmpty(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.platform_name) {
|
||||
@ -52,7 +52,7 @@ isEmpty(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.platform_name) {
|
||||
"sed 's/.*Value: \\(.*\\)/\\1/'")
|
||||
|
||||
isEmpty(QMAKE_MAC_PLATFORM_NAME): error("Could not resolve platform name for SDK '$$QMAKE_MAC_SDK'")
|
||||
!isEmpty(_QMAKE_CACHE_): cache(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.platform_name, set, QMAKE_MAC_PLATFORM_NAME)
|
||||
cache(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.platform_name, set stash, QMAKE_MAC_PLATFORM_NAME)
|
||||
} else {
|
||||
QMAKE_MAC_PLATFORM_NAME = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.platform_name)
|
||||
}
|
||||
|
4
mkspecs/features/qfeatures.prf
Normal file
4
mkspecs/features/qfeatures.prf
Normal file
@ -0,0 +1,4 @@
|
||||
# This file needs to be loaded explicitly, as the evaluation is relatively
|
||||
# expensive, and not many projects will actually need it.
|
||||
QMAKE_QT_FEATURES = $$[QT_HOST_DATA/get]/mkspecs/qfeatures.pri
|
||||
include($$QMAKE_QT_FEATURES) | error("Failed to load $$QMAKE_QT_FEATURES")
|
@ -62,7 +62,7 @@ qaxserver {
|
||||
unset(using_privates)
|
||||
qtAddModules(QT, LIBS)
|
||||
qtAddModules(QT_PRIVATE, LIBS_PRIVATE)
|
||||
!isEmpty(using_privates):!auto_use_privates:!no_private_qt_headers_warning:if(!debug_and_release|!build_pass) {
|
||||
!isEmpty(using_privates):!no_private_qt_headers_warning:if(!debug_and_release|!build_pass) {
|
||||
message("This project is using private headers and will therefore be tied to this specific Qt module build version.")
|
||||
message("Running this project against other versions of the Qt modules may crash at any arbitrary point.")
|
||||
message("This is not a bug, but a result of using Qt internals. You have been warned!")
|
||||
@ -74,13 +74,16 @@ wince*:static:gui {
|
||||
}
|
||||
|
||||
# static builds: link qml import plugins into the app.
|
||||
if(contains(QT, qml)|contains(QT_PRIVATE, qml)): \
|
||||
qt_module_deps = $$QT $$QT_PRIVATE
|
||||
qt_module_deps = $$replace(qt_module_deps, -private$, _private)
|
||||
qt_module_deps = $$resolve_depends(qt_module_deps, "QT.")
|
||||
contains(qt_module_deps, qml): \
|
||||
contains(QT_CONFIG, static):contains(TEMPLATE, .*app):!host_build:!no_import_scan {
|
||||
# run qmlimportscanner
|
||||
qtPrepareTool(QMLIMPORTSCANNER, qmlimportscanner)
|
||||
for (MODULE, QT_MODULES) {
|
||||
PATH = $$eval(QT.$${MODULE}.qml)
|
||||
!isEmpty(PATH): QMLPATHS += $$PATH
|
||||
!isEmpty(PATH):exists($$PATH): QMLPATHS += $$PATH
|
||||
}
|
||||
QMLPATHS = $$unique(QMLPATHS)
|
||||
for (QMLPATH, QMLPATHS): \
|
||||
@ -96,7 +99,7 @@ if(contains(QT, qml)|contains(QT_PRIVATE, qml)): \
|
||||
for (key, IMPORTS._KEYS_): {
|
||||
PATH = $$eval(IMPORTS.$${key}.path)
|
||||
PLUGIN = $$eval(IMPORTS.$${key}.plugin)
|
||||
!isEmpty(PATH):!isEmpty(PLUGIN): LIBS *= -L$$PATH -l$$PLUGIN
|
||||
!isEmpty(PATH):!isEmpty(PLUGIN): LIBS *= -L$$PATH -l$${PLUGIN}$$qtPlatformTargetSuffix()
|
||||
}
|
||||
|
||||
# create qml_plugin_import.cpp
|
||||
@ -124,33 +127,37 @@ if(contains(QT, qml)|contains(QT_PRIVATE, qml)): \
|
||||
QMAKE_CLEAN += $$QML_IMPORT_CPP
|
||||
|
||||
# copy qml files. this part is platform spesific.
|
||||
macx {
|
||||
# copy to Contents/Resources in the bundle.
|
||||
QmlImports.path = Contents/Resources/
|
||||
QmlImports.files *= $$QMLPATHS
|
||||
QMAKE_BUNDLE_DATA += QmlImports
|
||||
mac {
|
||||
osx {
|
||||
# Note: user can override QMAKE_BUNDLE_QML from pro file to change target bundle path
|
||||
isEmpty(QMAKE_QML_BUNDLE_PATH):QMAKE_QML_BUNDLE_PATH = "Resources/qt_qml"
|
||||
qmlTargetPath = $$OUT_PWD/$${TARGET}.app/Contents/$$QMAKE_QML_BUNDLE_PATH
|
||||
qtconfTargetPath = $$OUT_PWD/$${TARGET}.app/Contents/Resources/qt.conf
|
||||
} else {
|
||||
# iOS: flat bundle layout (no Contents/Resources)
|
||||
isEmpty(QMAKE_QML_BUNDLE_PATH):QMAKE_QML_BUNDLE_PATH = "qt_qml"
|
||||
qmlTargetPath = $CODESIGNING_FOLDER_PATH/$$QMAKE_QML_BUNDLE_PATH
|
||||
qtconfTargetPath = $CODESIGNING_FOLDER_PATH/qt.conf
|
||||
}
|
||||
|
||||
# place qt.conf in Contents/Resources in the app bundle
|
||||
# set import path in qt.conf to point to the bundeled qml:
|
||||
QT_CONF_CONTENTS = \
|
||||
"[Paths]" \
|
||||
"Imports = Resources/qml" \
|
||||
"Qml2Imports = Resources/qml"
|
||||
QT_CONF = "$$OUT_PWD/$${TARGET}.app/Contents/Resources/qt.conf"
|
||||
write_file($$QT_CONF, QT_CONF_CONTENTS)|error("Aborting.")
|
||||
} else: ios {
|
||||
# flat bundle layout (no Contents/Resources)
|
||||
QmlImports.files *= $$QMLPATHS
|
||||
QMAKE_BUNDLE_DATA += QmlImports
|
||||
"Imports = $$QMAKE_QML_BUNDLE_PATH" \
|
||||
"Qml2Imports = $$QMAKE_QML_BUNDLE_PATH"
|
||||
write_file("$$OUT_PWD/qt.conf", QT_CONF_CONTENTS)|error("Aborting.")
|
||||
|
||||
# write qt.conf to OUT_PWD and make xcode copy it via QMAKE_BUNDLE_DATA
|
||||
QT_CONF_CONTENTS = \
|
||||
"[Paths]" \
|
||||
"Imports = qml" \
|
||||
"Qml2Imports = qml"
|
||||
QT_CONF = "$$OUT_PWD/qt.conf"
|
||||
write_file($$QT_CONF, QT_CONF_CONTENTS)|error("Aborting.")
|
||||
QtConf.files = $$QT_CONF
|
||||
QMAKE_BUNDLE_DATA += QtConf
|
||||
# write qt.conf and copy each qml import dir into the bundle.
|
||||
# But strip away archives and other files that are not needed:
|
||||
!isEmpty(QMAKE_POST_LINK): QMAKE_POST_LINK += ";"
|
||||
QMAKE_POST_LINK += \
|
||||
"cp $$OUT_PWD/qt.conf $$qtconfTargetPath; " \
|
||||
"test -d $$qmlTargetPath && rm -r $$qmlTargetPath; " \
|
||||
"mkdir -p $$qmlTargetPath && " \
|
||||
"for p in $$QMLPATHS; do" \
|
||||
"rsync -r --exclude='*.a' --exclude='*.prl' --exclude='*.qmltypes' "
|
||||
macx-xcode: QMAKE_POST_LINK += "$p/ $$qmlTargetPath; done"
|
||||
else: QMAKE_POST_LINK += "\$\$p/ $$qmlTargetPath; done"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,6 +64,19 @@ DEPENDENCY_FILE = $$ANDROID_DEPENDS_DIR$$TARGET-android-dependencies.xml
|
||||
}
|
||||
}
|
||||
|
||||
!isEmpty(ANDROID_PERMISSIONS) {
|
||||
for (ANDROID_PERMISSION, ANDROID_PERMISSIONS) {
|
||||
FILE_CONTENT += "<permission name=\"$$ANDROID_PERMISSION\" />"
|
||||
}
|
||||
}
|
||||
|
||||
!isEmpty(ANDROID_FEATURES) {
|
||||
for (ANDROID_FEATURE, ANDROID_FEATURES) {
|
||||
FILE_CONTENT += "<feature name=\"$$ANDROID_FEATURE\" />"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
!isEmpty(FILE_CONTENT) {
|
||||
FILE_CONTENT = "<rules><dependencies><lib name=\"$$TARGET\"><depends>" $$FILE_CONTENT "</depends></lib></dependencies></rules>"
|
||||
write_file($$DEPENDENCY_FILE, FILE_CONTENT) | error("Aborting.")
|
||||
|
@ -20,6 +20,14 @@
|
||||
debug(1, "Not loading qmodule.pri twice")
|
||||
}
|
||||
|
||||
PRECOMPILED_DIR = .pch
|
||||
OBJECTS_DIR = .obj
|
||||
MOC_DIR = .moc
|
||||
RCC_DIR = .rcc
|
||||
UI_DIR = .uic
|
||||
|
||||
QMAKE_DIR_REPLACE_SANE = PRECOMPILED_DIR OBJECTS_DIR MOC_DIR RCC_DIR UI_DIR
|
||||
|
||||
# force_independent can be set externally. prefix_build not.
|
||||
!exists($$[QT_HOST_DATA]/.qmake.cache): \
|
||||
CONFIG += prefix_build force_independent
|
||||
|
@ -9,6 +9,9 @@
|
||||
# We mean it.
|
||||
#
|
||||
|
||||
QMAKE_DIR_REPLACE_SANE += DESTDIR
|
||||
CONFIG -= debug_and_release_target
|
||||
|
||||
contains(QT_CONFIG, c++11): CONFIG += c++11
|
||||
contains(TEMPLATE, .*lib) {
|
||||
# module and plugins
|
||||
|
@ -1,11 +1,16 @@
|
||||
defineReplace(qtPlatformTargetSuffix) {
|
||||
ios:CONFIG(iphonesimulator, iphonesimulator|iphoneos): \
|
||||
suffix = _iphonesimulator
|
||||
else: \
|
||||
suffix =
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
!debug_and_release|build_pass {
|
||||
mac:return(_debug)
|
||||
win32:return(d)
|
||||
mac: return($${suffix}_debug)
|
||||
win32: return($${suffix}d)
|
||||
}
|
||||
}
|
||||
return()
|
||||
return($$suffix)
|
||||
}
|
||||
|
||||
defineReplace(qtLibraryTarget) {
|
||||
@ -28,7 +33,7 @@ defineTest(qtAddLibrary) {
|
||||
# Reverse-engineer the module name from the library name.
|
||||
for(var, QT_MODULES) {
|
||||
isEqual(QT.$${var}.name, $$1) {
|
||||
qtAddModule($$var, , LIBS)
|
||||
qtAddModule($$var, LIBS)
|
||||
return(true)
|
||||
}
|
||||
}
|
||||
@ -48,12 +53,12 @@ defineTest(qtProcessModuleFlags) {
|
||||
|
||||
# qt module
|
||||
defineTest(qtHaveModule) {
|
||||
!isEmpty(QT.$${1}.name): \
|
||||
!isEmpty(QT.$$replace(1, -, _).name): \
|
||||
return(true)
|
||||
return(false)
|
||||
}
|
||||
|
||||
# qt module, UsePrivate flag, libs variable
|
||||
# qt module, libs variable
|
||||
defineTest(qtAddModule) {
|
||||
MODULE_NAME = $$eval(QT.$${1}.name)
|
||||
MODULE_INCLUDES = $$eval(QT.$${1}.includes)
|
||||
@ -61,8 +66,10 @@ defineTest(qtAddModule) {
|
||||
MODULE_CONFIG = $$eval(QT.$${1}.module_config)
|
||||
MODULE_MAJOR_VERSION = $$eval(QT.$${1}.MAJOR_VERSION)
|
||||
|
||||
contains(MODULE_CONFIG, internal_module):!if(auto_use_privates|isEqual(2, UsePrivate)): \
|
||||
error("Module $$1 has no public API.")
|
||||
contains(MODULE_CONFIG, internal_module) {
|
||||
using_privates = true
|
||||
export(using_privates)
|
||||
}
|
||||
|
||||
qtProcessModuleFlags(CONFIG, QT.$${1}.CONFIG)
|
||||
qtProcessModuleFlags(DEFINES, QT.$${1}.DEFINES)
|
||||
@ -77,80 +84,75 @@ defineTest(qtAddModule) {
|
||||
!qt_no_framework_direct_includes:exists($$FRAMEWORK_INCLUDE) {
|
||||
INCLUDEPATH *= $$FRAMEWORK_INCLUDE
|
||||
}
|
||||
auto_use_privates|isEqual(2, UsePrivate): \
|
||||
contains(MODULE_CONFIG, internal_module): \
|
||||
INCLUDEPATH += \
|
||||
$$FRAMEWORK_INCLUDE/$$eval(QT.$${1}.VERSION) \
|
||||
$$FRAMEWORK_INCLUDE/$$eval(QT.$${1}.VERSION)/$$MODULE_NAME
|
||||
QMAKE_FRAMEWORKPATH *= $${MODULE_LIBS}
|
||||
LINKAGE += -framework $${MODULE_NAME}$${QT_LIBINFIX}
|
||||
export(QMAKE_FRAMEWORKPATH)
|
||||
!contains(MODULE_CONFIG, no_link): \
|
||||
LINKAGE += -framework $${MODULE_NAME}$${QT_LIBINFIX}
|
||||
} else {
|
||||
INCLUDEPATH *= $$MODULE_INCLUDES
|
||||
auto_use_privates|isEqual(2, UsePrivate): \
|
||||
INCLUDEPATH += $$eval(QT.$${1}.private_includes)
|
||||
}
|
||||
export(INCLUDEPATH)
|
||||
|
||||
# Re-insert the major version in the library name (cf qtLibraryTarget above)
|
||||
# unless it's a framework build
|
||||
!mac|!contains(MODULE_CONFIG, lib_bundle): \
|
||||
MODULE_NAME ~= s,^Qt,Qt$$MODULE_MAJOR_VERSION,
|
||||
|
||||
win32 {
|
||||
# Make sure the version number isn't appended again to the lib name
|
||||
ver_var = QMAKE_$${upper($$MODULE_NAME$$QT_LIBINFIX)}_VERSION_OVERRIDE
|
||||
dver_var = QMAKE_$${upper($$MODULE_NAME$$QT_LIBINFIX)}D_VERSION_OVERRIDE
|
||||
$$ver_var = 0
|
||||
$$dver_var = 0
|
||||
export($$ver_var)
|
||||
export($$dver_var)
|
||||
}
|
||||
|
||||
isEmpty(LINKAGE) {
|
||||
!isEmpty(MODULE_LIBS_ADD): LINKAGE = -L$$MODULE_LIBS_ADD
|
||||
lib = $${MODULE_NAME}$${QT_LIBINFIX}$$qtPlatformTargetSuffix()
|
||||
LINKAGE += -l$$lib
|
||||
|
||||
contains(QT_CONFIG, rpath): QMAKE_RPATHDIR *= $$eval(QT.$${1}.rpath)
|
||||
|
||||
contains(MODULE_CONFIG, staticlib): \
|
||||
PRE_TARGETDEPS *= $$MODULE_LIBS/$${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB}
|
||||
}
|
||||
# Only link to this module if a libs directory is set, else this is just a module
|
||||
# to give access to sources or include files, and not for linking.
|
||||
!isEmpty(MODULE_LIBS) {
|
||||
!isEmpty(QMAKE_LSB) {
|
||||
!isEmpty(MODULE_LIBS_ADD): QMAKE_LFLAGS *= --lsb-libpath=$$MODULE_LIBS_ADD
|
||||
QMAKE_LIBDIR *= /opt/lsb/lib
|
||||
QMAKE_LFLAGS *= --lsb-shared-libs=$${MODULE_NAME}$${QT_LIBINFIX}
|
||||
!isEmpty(MODULE_LIBS):!contains(MODULE_CONFIG, no_link) {
|
||||
|
||||
# Re-insert the major version in the library name (cf qtLibraryTarget above)
|
||||
# unless it's a framework build
|
||||
!mac|!contains(MODULE_CONFIG, lib_bundle): \
|
||||
MODULE_NAME ~= s,^Qt,Qt$$MODULE_MAJOR_VERSION,
|
||||
|
||||
win32 {
|
||||
# Make sure the version number isn't appended again to the lib name
|
||||
ver_var = QMAKE_$${upper($$MODULE_NAME$$QT_LIBINFIX)}_VERSION_OVERRIDE
|
||||
dver_var = QMAKE_$${upper($$MODULE_NAME$$QT_LIBINFIX)}D_VERSION_OVERRIDE
|
||||
$$ver_var = 0
|
||||
$$dver_var = 0
|
||||
export($$ver_var)
|
||||
export($$dver_var)
|
||||
}
|
||||
|
||||
isEmpty(LINKAGE) {
|
||||
!isEmpty(MODULE_LIBS_ADD): \
|
||||
LINKAGE = -L$$MODULE_LIBS_ADD
|
||||
lib = $${MODULE_NAME}$${QT_LIBINFIX}$$qtPlatformTargetSuffix()
|
||||
LINKAGE += -l$$lib
|
||||
|
||||
contains(QT_CONFIG, rpath) {
|
||||
QMAKE_RPATHDIR *= $$eval(QT.$${1}.rpath)
|
||||
export(QMAKE_RPATHDIR)
|
||||
}
|
||||
|
||||
contains(MODULE_CONFIG, staticlib) {
|
||||
PRE_TARGETDEPS *= $$MODULE_LIBS/$${QMAKE_PREFIX_STATICLIB}$${lib}.$${QMAKE_EXTENSION_STATICLIB}
|
||||
export(PRE_TARGETDEPS)
|
||||
}
|
||||
}
|
||||
|
||||
$$2 += $$LINKAGE
|
||||
export($$2)
|
||||
|
||||
!isEmpty(QMAKE_LSB) {
|
||||
!isEmpty(MODULE_LIBS_ADD): \
|
||||
QMAKE_LFLAGS *= --lsb-libpath=$$MODULE_LIBS_ADD
|
||||
QMAKE_LFLAGS *= --lsb-shared-libs=$${MODULE_NAME}$${QT_LIBINFIX}
|
||||
QMAKE_LIBDIR *= /opt/lsb/lib
|
||||
export(QMAKE_LFLAGS)
|
||||
export(QMAKE_LIBDIR)
|
||||
}
|
||||
$$3 += $$LINKAGE
|
||||
}
|
||||
export($$3)
|
||||
export(INCLUDEPATH)
|
||||
export(QMAKE_FRAMEWORKPATH)
|
||||
export(QMAKE_LFLAGS)
|
||||
export(QMAKE_LIBDIR)
|
||||
export(QMAKE_RPATHDIR)
|
||||
export(QMAKE_RPATHLINKDIR)
|
||||
export(PRE_TARGETDEPS)
|
||||
}
|
||||
|
||||
# qt variable, libs variable
|
||||
defineTest(qtAddModules) {
|
||||
# Figure out from which modules we're wanting to use the private headers
|
||||
NEWQT =
|
||||
for(QTLIB, $$1) {
|
||||
QTLIBRAW = $$replace(QTLIB, -private$, )
|
||||
!isEqual(QTLIBRAW, $$QTLIB) {
|
||||
want_var = QT.$${QTLIBRAW}.want_private
|
||||
$$want_var = UsePrivate
|
||||
using_privates = true
|
||||
NEWQT += $$eval(QT.$${QTLIBRAW}.private_depends)
|
||||
}
|
||||
NEWQT += $$QTLIBRAW
|
||||
contains(QT.$${QTLIBRAW}.CONFIG, auto_use_privates): CONFIG += auto_use_privates
|
||||
}
|
||||
# qmake variables cannot contain dashes, so normalize the names first
|
||||
$$1 = $$replace($$1, -private$, _private)
|
||||
# Topological resolution of modules based on their QT.<module>.depends variable
|
||||
$$1 = $$resolve_depends(NEWQT, "QT.")
|
||||
$$1 = $$resolve_depends($$1, "QT.")
|
||||
# Finally actually add the modules
|
||||
unset(BAD_QT)
|
||||
for(QTLIB, $$1) {
|
||||
@ -165,11 +167,9 @@ defineTest(qtAddModules) {
|
||||
next()
|
||||
}
|
||||
|
||||
qtAddModule($$QTLIB, $$eval(QT.$${QTLIB}.want_private), $$2)
|
||||
qtAddModule($$QTLIB, $$2)
|
||||
}
|
||||
!isEmpty(BAD_QT):error("Unknown module(s) in $$1: $$BAD_QT")
|
||||
|
||||
export(using_privates)
|
||||
!isEmpty(BAD_QT):error("Unknown module(s) in $$1: $$replace(BAD_QT, _private$, -private)")
|
||||
}
|
||||
|
||||
defineTest(qtAddRpathLink) {
|
||||
@ -178,7 +178,7 @@ defineTest(qtAddRpathLink) {
|
||||
# This means that paths of direct dependencies (QT & QT_PRIVATE)
|
||||
# don't need to appear here. However, their private dependencies'
|
||||
# paths OTOH need to be put there.
|
||||
pubqt = $$replace(1, -private$, )
|
||||
pubqt = $$replace(1, -private$, _private)
|
||||
pubdep = $$resolve_depends(pubqt, "QT.")
|
||||
privdep = $$resolve_depends(pubqt, "QT.", ".depends" ".private_depends" ".run_depends")
|
||||
privdep -= $$pubdep
|
||||
@ -246,7 +246,7 @@ defineTest(qtAddToolEnv) {
|
||||
|
||||
# target variable, dependency var name, [non-empty: prepare for system(), not make]
|
||||
defineTest(qtAddTargetEnv) {
|
||||
deps = $$replace($$2, -private$, )
|
||||
deps = $$replace($$2, -private$, _private)
|
||||
deps = $$resolve_depends(deps, "QT.", ".depends" ".private_depends" ".run_depends")
|
||||
!isEmpty(deps) {
|
||||
for(dep, deps) {
|
||||
|
@ -50,7 +50,12 @@ qt_install_module {
|
||||
pritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
||||
pritarget.files = $$MODULE_PRI
|
||||
INSTALLS += pritarget
|
||||
} else {
|
||||
} else: isEmpty(MODULE_PRIVATE_PRI) {
|
||||
warning("Project $$basename(_PRO_FILE_) is a module, but has not defined MODULE_PRI, which is required for Qt to expose the module to other projects.")
|
||||
}
|
||||
!isEmpty(MODULE_PRIVATE_PRI) {
|
||||
privpritarget.path = $$[QT_HOST_DATA]/mkspecs/modules
|
||||
privpritarget.files = $$MODULE_PRIVATE_PRI
|
||||
INSTALLS += privpritarget
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,10 @@ ucmodule = $$upper($$MODULE)
|
||||
|
||||
isEmpty(MODULE_INCNAME): MODULE_INCNAME = $$TARGET
|
||||
|
||||
MODULE_DEPENDS = $$replace(QT, -private$, )
|
||||
internal_module: \
|
||||
MODULE_DEPENDS = $$replace(QT, -private$, _private)
|
||||
else: \
|
||||
MODULE_DEPENDS = $$replace(QT, -private$, )
|
||||
MODULE_DEPENDS = $$unique(MODULE_DEPENDS)
|
||||
|
||||
contains(TARGET, QtAddOn.*): \
|
||||
@ -55,14 +58,14 @@ MODULE_DEFINES = $$MODULE_DEFINE $$MODULE_DEFINES
|
||||
|
||||
load(qt_module_pris)
|
||||
|
||||
INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}.private_includes)
|
||||
INCLUDEPATH *= $$eval(QT.$${MODULE}.includes) $$eval(QT.$${MODULE}_private.includes)
|
||||
|
||||
!no_module_headers: load(qt_module_headers)
|
||||
|
||||
#other
|
||||
TEMPLATE = lib
|
||||
DESTDIR = $$eval(QT.$${MODULE}.libs)
|
||||
win32:!wince*:!prefix_build: DLLDESTDIR = $$eval(QT.$${MODULE}.bins)
|
||||
DESTDIR = $$eval(QT.$${MODULE_ID}.libs)
|
||||
win32:!wince*:!prefix_build: DLLDESTDIR = $$eval(QT.$${MODULE_ID}.bins)
|
||||
|
||||
CONFIG += qmake_cache target_qt
|
||||
|
||||
@ -92,7 +95,7 @@ mac:CONFIG(shared, static|shared):contains(QT_CONFIG, qt_framework) {
|
||||
#QMAKE_FRAMEWORK_VERSION = 4.0
|
||||
CONFIG += lib_bundle sliced_bundle qt_framework
|
||||
CONFIG -= qt_install_headers #no need to install these as well
|
||||
!debug_and_release|if(build_all:CONFIG(release, debug|release)) {
|
||||
!debug_and_release|!build_all|CONFIG(release, debug|release) {
|
||||
FRAMEWORK_HEADERS.version = Versions
|
||||
FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
|
||||
FRAMEWORK_HEADERS.path = Headers
|
||||
|
@ -19,11 +19,25 @@ load(qt_build_paths)
|
||||
CONFIG += split_incpath
|
||||
force_independent|split_incpath: \
|
||||
CONFIG += need_fwd_pri
|
||||
MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri
|
||||
mod_work_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules
|
||||
need_fwd_pri: \
|
||||
MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
|
||||
mod_inst_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst
|
||||
else: \
|
||||
MODULE_PRI = $$MODULE_FWD_PRI
|
||||
mod_inst_pfx = $$mod_work_pfx
|
||||
!internal_module {
|
||||
MODULE_ID = $$MODULE
|
||||
MODULE_PRIVATE_PRI = $$mod_inst_pfx/qt_lib_$${MODULE}_private.pri
|
||||
mods_to_load = $$MODULE $${MODULE}_private
|
||||
} else {
|
||||
MODULE_ID = $${MODULE}_private
|
||||
mods_to_load = $${MODULE}_private
|
||||
}
|
||||
need_fwd_pri: \
|
||||
pris_to_load = $$MODULE_ID
|
||||
else: \
|
||||
pris_to_load = $$mods_to_load
|
||||
MODULE_PRI = $$mod_inst_pfx/qt_lib_$${MODULE_ID}.pri
|
||||
MODULE_FWD_PRI = $$mod_work_pfx/qt_lib_$${MODULE_ID}.pri
|
||||
|
||||
!build_pass {
|
||||
|
||||
@ -34,20 +48,14 @@ else: \
|
||||
module_libs = "\$\$QT_MODULE_LIB_BASE"
|
||||
unix:!static {
|
||||
host_build: \
|
||||
module_rpath = "QT.$${MODULE}.rpath = $$[QT_HOST_LIBS]"
|
||||
module_rpath = "QT.$${MODULE_ID}.rpath = $$[QT_HOST_LIBS]"
|
||||
else: \
|
||||
module_rpath = "QT.$${MODULE}.rpath = $$[QT_INSTALL_LIBS/raw]"
|
||||
module_rpath = "QT.$${MODULE_ID}.rpath = $$[QT_INSTALL_LIBS/raw]"
|
||||
} else {
|
||||
module_rpath =
|
||||
}
|
||||
!isEmpty(QT_FOR_PRIVATE) {
|
||||
contains(QT_FOR_PRIVATE, .*-private$):error("QT_FOR_PRIVATE may not contain *-private.")
|
||||
module_privdep = "QT.$${MODULE}.private_depends = $$QT_FOR_PRIVATE"
|
||||
} else {
|
||||
module_privdep =
|
||||
}
|
||||
!isEmpty(QT_PRIVATE): \
|
||||
module_rundep = "QT.$${MODULE}.run_depends = $$unique($$list($$replace(QT_PRIVATE, -private$, )))"
|
||||
module_rundep = "QT.$${MODULE_ID}.run_depends = $$replace(QT_PRIVATE, -private$, _private)"
|
||||
else: \
|
||||
module_rundep =
|
||||
static: \
|
||||
@ -58,10 +66,8 @@ else: \
|
||||
module_build_type =
|
||||
internal_module: \
|
||||
module_build_type += internal_module
|
||||
!isEmpty(module_build_type): \
|
||||
module_build_type = "QT.$${MODULE}.module_config = $$module_build_type"
|
||||
!isEmpty(MODULE_CONFIG): \
|
||||
module_config = "QT.$${MODULE}.CONFIG = $$MODULE_CONFIG"
|
||||
module_config = "QT.$${MODULE_ID}.CONFIG = $$MODULE_CONFIG"
|
||||
else: \
|
||||
module_config =
|
||||
!no_module_headers:!minimal_syncqt {
|
||||
@ -74,46 +80,52 @@ else: \
|
||||
$$MODULE_BASE_OUTDIR/include)
|
||||
MODULE_INCLUDES += $$MODULE_AUX_INCLUDES
|
||||
MODULE_PRIVATE_INCLUDES += $$MODULE_PRIVATE_AUX_INCLUDES
|
||||
internal_module {
|
||||
MODULE_PRIVATE_INCLUDES = $$MODULE_INCLUDES $$MODULE_PRIVATE_INCLUDES
|
||||
MODULE_INCLUDES =
|
||||
MODULE_PRIVATE_SHADOW_INCLUDES = $$MODULE_SHADOW_INCLUDES
|
||||
MODULE_SHADOW_INCLUDES =
|
||||
}
|
||||
split_incpath {
|
||||
!isEmpty(MODULE_SHADOW_INCLUDES): \
|
||||
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE}.includes += $$MODULE_SHADOW_INCLUDES"
|
||||
!isEmpty(MODULE_PRIVATE_SHADOW_INCLUDES): \
|
||||
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE}.private_includes += $$MODULE_PRIVATE_SHADOW_INCLUDES"
|
||||
}
|
||||
internal_module: \
|
||||
MODULE_INCLUDES += $$MODULE_PRIVATE_INCLUDES
|
||||
split_incpath: \
|
||||
MODULE_FWD_PRI_CONT_SUFFIX += "QT.$${MODULE_ID}.includes += $$MODULE_SHADOW_INCLUDES"
|
||||
MODULE_PRI_CONT = \
|
||||
"QT.$${MODULE}.VERSION = $${VERSION}" \
|
||||
"QT.$${MODULE}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
|
||||
"QT.$${MODULE}.MINOR_VERSION = $$section(VERSION, ., 1, 1)" \
|
||||
"QT.$${MODULE}.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \
|
||||
"QT.$${MODULE_ID}.VERSION = $${VERSION}" \
|
||||
"QT.$${MODULE_ID}.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
|
||||
"QT.$${MODULE_ID}.MINOR_VERSION = $$section(VERSION, ., 1, 1)" \
|
||||
"QT.$${MODULE_ID}.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \
|
||||
"" \
|
||||
"QT.$${MODULE}.name = $$TARGET" \
|
||||
"QT.$${MODULE}.libs = $$module_libs" \
|
||||
"QT.$${MODULE_ID}.name = $$TARGET" \
|
||||
"QT.$${MODULE_ID}.libs = $$module_libs" \
|
||||
$$module_rpath \
|
||||
"QT.$${MODULE}.private_includes = $$MODULE_PRIVATE_INCLUDES"
|
||||
"QT.$${MODULE_ID}.includes = $$MODULE_INCLUDES"
|
||||
!host_build: MODULE_PRI_CONT += \
|
||||
"QT.$${MODULE}.includes = $$MODULE_INCLUDES" \
|
||||
"QT.$${MODULE}.bins = \$\$QT_MODULE_BIN_BASE" \
|
||||
"QT.$${MODULE}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \
|
||||
"QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
|
||||
"QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE" \
|
||||
"QT.$${MODULE}.qml = \$\$QT_MODULE_QML_BASE"
|
||||
"QT.$${MODULE_ID}.bins = \$\$QT_MODULE_BIN_BASE" \
|
||||
"QT.$${MODULE_ID}.libexecs = \$\$QT_MODULE_LIBEXEC_BASE" \
|
||||
"QT.$${MODULE_ID}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
|
||||
"QT.$${MODULE_ID}.imports = \$\$QT_MODULE_IMPORT_BASE" \
|
||||
"QT.$${MODULE_ID}.qml = \$\$QT_MODULE_QML_BASE" \
|
||||
$$join(MODULE_PLUGIN_TYPES, " ", "QT.$${MODULE_ID}.plugin_types = ")
|
||||
MODULE_PRI_CONT += \
|
||||
"QT.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
|
||||
$$module_privdep \
|
||||
"QT.$${MODULE_ID}.depends =$$join(MODULE_DEPENDS, " ", " ")" \
|
||||
$$module_rundep \
|
||||
$$module_build_type \
|
||||
"QT.$${MODULE_ID}.module_config =$$join(module_build_type, " ", " ")" \
|
||||
$$module_config \
|
||||
"QT.$${MODULE}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting
|
||||
"QT.$${MODULE_ID}.DEFINES = $$MODULE_DEFINES" \ # assume sufficient quoting
|
||||
"" \
|
||||
"QT_MODULES += $$MODULE"
|
||||
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.")
|
||||
MODULE_PRI_FILES = $$MODULE_PRI
|
||||
!internal_module {
|
||||
module_build_type += internal_module no_link
|
||||
MODULE_PRIVATE_PRI_CONT = \
|
||||
"QT.$${MODULE}_private.VERSION = $${VERSION}" \
|
||||
"QT.$${MODULE}_private.MAJOR_VERSION = $$section(VERSION, ., 0, 0)" \
|
||||
"QT.$${MODULE}_private.MINOR_VERSION = $$section(VERSION, ., 1, 1)" \
|
||||
"QT.$${MODULE}_private.PATCH_VERSION = $$section(VERSION, ., 2, 2)" \
|
||||
"" \
|
||||
"QT.$${MODULE}_private.name = $${TARGET}" \ # Same name as base module
|
||||
"QT.$${MODULE}_private.libs = $$module_libs" \
|
||||
"QT.$${MODULE}_private.includes = $$MODULE_PRIVATE_INCLUDES" \
|
||||
"QT.$${MODULE}_private.depends = $$replace($$list($$MODULE $$QT_FOR_PRIVATE), -private$, _private)" \
|
||||
"QT.$${MODULE}_private.module_config =$$join(module_build_type, " ", " ")"
|
||||
write_file($$MODULE_PRIVATE_PRI, MODULE_PRIVATE_PRI_CONT)|error("Aborting.")
|
||||
}
|
||||
MODULE_PRI_FILES = $$MODULE_PRI $$MODULE_PRIVATE_PRI
|
||||
|
||||
need_fwd_pri {
|
||||
|
||||
@ -132,8 +144,10 @@ else: \
|
||||
"QT_MODULE_HOST_LIB_BASE = $$MODULE_BASE_OUTDIR/lib" \
|
||||
"QT_MODULE_LIBEXEC_BASE = $$MODULE_BASE_OUTDIR/libexec" \
|
||||
"QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \
|
||||
"include($$MODULE_PRI)" \
|
||||
$$MODULE_FWD_PRI_CONT_SUFFIX
|
||||
"include($$MODULE_PRI)"
|
||||
!internal_module: MODULE_FWD_PRI_CONT += \
|
||||
"include($$MODULE_PRIVATE_PRI)"
|
||||
MODULE_FWD_PRI_CONT += $$MODULE_FWD_PRI_CONT_SUFFIX
|
||||
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
|
||||
touch($$MODULE_FWD_PRI, $$MODULE_PRI)
|
||||
MODULE_PRI_FILES += $$MODULE_FWD_PRI
|
||||
@ -155,12 +169,15 @@ else: \
|
||||
# Then, inject the new module into the current cache state
|
||||
!contains(QMAKE_INTERNAL_INCLUDED_FILES, $$MODULE_PRI): \ # before the actual include()!
|
||||
cache(QMAKE_INTERNAL_INCLUDED_FILES, add transient, MODULE_PRI_FILES)
|
||||
include($$MODULE_FWD_PRI)
|
||||
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
|
||||
name depends private_depends module_config CONFIG DEFINES sources \
|
||||
includes private_includes bins libs libexecs plugins imports qml \
|
||||
rpath_link rpath_link_private \
|
||||
)):defined(QT.$${MODULE}.$$var, var):cache(QT.$${MODULE}.$$var, transient)
|
||||
for(pri, pris_to_load): \
|
||||
include($$mod_work_pfx/qt_lib_$${pri}.pri)
|
||||
for(mod, mods_to_load) {
|
||||
for(var, $$list(VERSION MAJOR_VERSION MINOR_VERSION PATCH_VERSION \
|
||||
name depends module_config CONFIG DEFINES sources \
|
||||
includes bins libs libexecs plugins imports qml \
|
||||
rpath_link \
|
||||
)):defined(QT.$${mod}.$$var, var):cache(QT.$${mod}.$$var, transient)
|
||||
}
|
||||
cache(QT_MODULES, transient)
|
||||
|
||||
} # !build_pass
|
||||
|
@ -19,7 +19,7 @@ CONFIG += console
|
||||
!build_pass:if(!host_build|!force_bootstrap|force_independent) {
|
||||
isEmpty(MODULE):MODULE = $$TARGET
|
||||
|
||||
!host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, )
|
||||
!host_build|!force_bootstrap: MODULE_DEPENDS = $$replace(QT, -private$, _private)
|
||||
|
||||
load(qt_build_paths)
|
||||
|
||||
|
@ -22,14 +22,8 @@ CONFIG(static, static|shared) {
|
||||
contains(TEMPLATE, ".*lib"): CONFIG += dll
|
||||
}
|
||||
|
||||
static_and_shared {
|
||||
!macx-xcode: addExclusiveBuilds(static, Static, shared, Shared)
|
||||
} else: fix_output_dirs {
|
||||
static: \
|
||||
fixExclusiveOutputDirs(static, shared)
|
||||
else: \
|
||||
fixExclusiveOutputDirs(shared, static)
|
||||
}
|
||||
!macx-xcode: \
|
||||
addExclusiveBuilds(shared, static)
|
||||
|
||||
CONFIG(debug, debug|release): \
|
||||
CONFIG -= release
|
||||
@ -37,14 +31,7 @@ else: \
|
||||
CONFIG -= debug
|
||||
|
||||
!macx-xcode {
|
||||
debug_and_release {
|
||||
addExclusiveBuilds(debug, Debug, release, Release)
|
||||
} else: fix_output_dirs {
|
||||
debug: \
|
||||
fixExclusiveOutputDirs(debug, release)
|
||||
else: \
|
||||
fixExclusiveOutputDirs(release, debug)
|
||||
}
|
||||
addExclusiveBuilds(debug, release)
|
||||
} else {
|
||||
# The Xcode generator always generates project files with
|
||||
# debug and release configurations, regardless of whether
|
||||
|
@ -11,6 +11,8 @@
|
||||
|
||||
load(resolve_config)
|
||||
|
||||
exclusive_builds: load(exclusive_builds_post)
|
||||
|
||||
QMAKE_RESOLVED_TARGET = $$absolute_path($$DESTDIR, $$OUT_PWD)/
|
||||
|
||||
win32 {
|
||||
|
@ -13,6 +13,7 @@ QMAKE_LEXFLAGS =
|
||||
QMAKE_YACC = yacc
|
||||
QMAKE_YACCFLAGS = -d
|
||||
QMAKE_CFLAGS =
|
||||
QMAKE_CFLAGS_APP = -fPIE
|
||||
QMAKE_CFLAGS_DEPS = -M
|
||||
QMAKE_CFLAGS_WARN_ON = -w1 -Wall -Wcheck -wd1572,873,2259,2261
|
||||
QMAKE_CFLAGS_WARN_OFF = -w
|
||||
@ -33,6 +34,7 @@ QMAKE_CFLAGS_AVX2 += -xCORE-AVX2
|
||||
|
||||
QMAKE_CXX = icpc
|
||||
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
|
||||
QMAKE_CXXFLAGS_APP = $$QMAKE_CFLAGS_APP
|
||||
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
|
||||
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
|
||||
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
|
||||
@ -63,6 +65,7 @@ QMAKE_LFLAGS_SONAME = -Wl,-soname,
|
||||
QMAKE_LFLAGS_THREAD =
|
||||
QMAKE_LFLAGS_NOUNDEF = -Wl,-z,defs
|
||||
QMAKE_LFLAGS_RPATH = -Wl,-rpath,
|
||||
QMAKE_LFLAGS_RPATHLINK = -Wl,-rpath-link,
|
||||
QMAKE_LFLAGS_CXX11 =
|
||||
|
||||
QMAKE_LIBS =
|
||||
|
@ -15,7 +15,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.@EXECUTABLE@</string>
|
||||
<string>@BUNDLEIDENTIFIER@</string>
|
||||
<key>NOTE</key>
|
||||
<string>This file was generated by Qt/QMake.</string>
|
||||
</dict>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.@EXECUTABLE@</string>
|
||||
<string>@BUNDLEIDENTIFIER@</string>
|
||||
<key>NOTE</key>
|
||||
<string>This file was generated by Qt/QMake.</string>
|
||||
</dict>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.@EXECUTABLE@</string>
|
||||
<string>@BUNDLEIDENTIFIER@</string>
|
||||
<key>NOTE</key>
|
||||
<string>This file was generated by Qt/QMake.</string>
|
||||
</dict>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.@EXECUTABLE@</string>
|
||||
<string>@BUNDLEIDENTIFIER@</string>
|
||||
<key>NOTE</key>
|
||||
<string>This file was generated by Qt/QMake.</string>
|
||||
</dict>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.@EXECUTABLE@</string>
|
||||
<string>@BUNDLEIDENTIFIER@</string>
|
||||
<key>NOTE</key>
|
||||
<string>This file was generated by Qt/QMake.</string>
|
||||
</dict>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.@EXECUTABLE@</string>
|
||||
<string>@BUNDLEIDENTIFIER@</string>
|
||||
<key>NOTE</key>
|
||||
<string>This file was generated by Qt/QMake.</string>
|
||||
</dict>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.@EXECUTABLE@</string>
|
||||
<string>@BUNDLEIDENTIFIER@</string>
|
||||
<key>NOTE</key>
|
||||
<string>This file was generated by Qt/QMake.</string>
|
||||
</dict>
|
||||
|
@ -13,7 +13,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.@BUNDLEIDENTIFIER@</string>
|
||||
<string>@BUNDLEIDENTIFIER@</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@ -1,6 +1,21 @@
|
||||
|
||||
# In case the user sets the SDK manually
|
||||
contains(QMAKE_MAC_SDK, ^iphonesimulator.*) {
|
||||
iphonesimulator_and_iphoneos: \
|
||||
error("iOS simulator is handled automatically for iphonesimulator_and_iphoneos")
|
||||
|
||||
CONFIG += iphonesimulator
|
||||
}
|
||||
|
||||
# Resolve config so we don't need to use CONFIG() later on
|
||||
CONFIG(iphonesimulator, iphonesimulator|iphoneos) {
|
||||
CONFIG -= iphoneos
|
||||
} else {
|
||||
CONFIG -= iphonesimulator
|
||||
CONFIG += iphoneos
|
||||
}
|
||||
|
||||
equals(TEMPLATE, app) {
|
||||
|
||||
# If the application uses Qt, it needs to be an application bundle
|
||||
# to be able to deploy and run on iOS. The only exception to this
|
||||
# is if you're working with a jailbroken device and can run the
|
||||
@ -8,47 +23,150 @@ equals(TEMPLATE, app) {
|
||||
# use-case we care about, so no need to complicate the logic.
|
||||
qt: CONFIG *= app_bundle
|
||||
|
||||
# Application bundles require building through Xcode
|
||||
app_bundle:!macx-xcode {
|
||||
# For Qt applications we want Xcode project files as the generated output,
|
||||
# but since qmake doesn't handle the transition between makefiles and Xcode
|
||||
# project files (which happens when using subdirs), we create a wrapper
|
||||
# makefile that takes care of generating the Xcode project, and allows
|
||||
# building by calling out to xcodebuild.
|
||||
TEMPLATE = aux
|
||||
app_bundle {
|
||||
macx-xcode {
|
||||
# There is no way to genereate Xcode projects that are limited to either
|
||||
# simulator or device builds, so iphonesimulator_and_iphoneos is always
|
||||
# effectivly active, even if the user disabled it explicitly.
|
||||
# The Xcode generator doesn't support multiple BUILDS though (exclusive
|
||||
# builds), so we have to manually set up the simulator suffix.
|
||||
library_suffix_iphonesimulator.name = "$${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING}[sdk=iphonesimulator*]"
|
||||
library_suffix_iphonesimulator.value = "_iphonesimulator$($${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING})"
|
||||
QMAKE_MAC_XCODE_SETTINGS += library_suffix_iphonesimulator
|
||||
CONFIG *= xcode_dynamic_library_suffix
|
||||
} else {
|
||||
# For Qt applications we want Xcode project files as the generated output,
|
||||
# but since qmake doesn't handle the transition between makefiles and Xcode
|
||||
# project files (which happens when using subdirs), we create a wrapper
|
||||
# makefile that takes care of generating the Xcode project, and allows
|
||||
# building by calling out to xcodebuild.
|
||||
TEMPLATE = aux
|
||||
|
||||
CONFIG =
|
||||
SOURCES =
|
||||
OBJECTIVE_SOURCES =
|
||||
RESOURCES =
|
||||
INSTALLS =
|
||||
QMAKE_EXTRA_COMPILERS =
|
||||
QMAKE_EXTRA_TARGETS =
|
||||
SOURCES =
|
||||
OBJECTIVE_SOURCES =
|
||||
RESOURCES =
|
||||
INSTALLS =
|
||||
QMAKE_EXTRA_COMPILERS =
|
||||
QMAKE_EXTRA_TARGETS =
|
||||
|
||||
TARGET_XCODE_PROJECT_DIR = $${TARGET}.xcodeproj
|
||||
!build_pass {
|
||||
CONFIG += debug_and_release
|
||||
load(resolve_config)
|
||||
|
||||
system("cd $$system_quote($$OUT_PWD) && $${QMAKE_QMAKE} $$system_quote($$_PRO_FILE_) -spec macx-xcode")
|
||||
CONFIG += iphonesimulator_and_iphoneos
|
||||
iphonesimulator.name = Simulator
|
||||
iphoneos.name = Device
|
||||
addExclusiveBuilds(iphonesimulator, iphoneos)
|
||||
|
||||
# We use xcodebuild to do the actual build, but filter out the verbose
|
||||
# output that shows all environment variables for each build step.
|
||||
xcodebuild_build.commands = "@bash -o pipefail -c 'xcodebuild | grep -v setenv'"
|
||||
QMAKE_EXTRA_TARGETS += xcodebuild_build
|
||||
all.depends = xcodebuild_build
|
||||
QMAKE_EXTRA_TARGETS += all
|
||||
load(exclusive_builds_post)
|
||||
|
||||
# We do the same for the clean action
|
||||
xcodebuild_clean.commands = "@xcodebuild clean"
|
||||
QMAKE_EXTRA_TARGETS += xcodebuild_clean
|
||||
clean.depends = xcodebuild_clean
|
||||
QMAKE_EXTRA_TARGETS += clean
|
||||
xcode_distclean.commands = "$(DEL_FILE) -R $${TARGET}.xcodeproj"
|
||||
xcode_distclean.depends = \
|
||||
debug-iphonesimulator-distclean debug-iphoneos-distclean \
|
||||
release-iphonesimulator-distclean release-iphoneos-distclean
|
||||
QMAKE_EXTRA_TARGETS += xcode_distclean
|
||||
distclean.depends = xcode_distclean
|
||||
QMAKE_EXTRA_TARGETS += distclean
|
||||
|
||||
# And distclean
|
||||
xcodebuild_distclean.commands = "$(DEL_FILE) -R $$TARGET_XCODE_PROJECT_DIR"
|
||||
xcodebuild_distclean.depends = xcodebuild_clean
|
||||
QMAKE_EXTRA_TARGETS += xcodebuild_distclean
|
||||
distclean.depends = xcodebuild_distclean
|
||||
QMAKE_EXTRA_TARGETS += distclean
|
||||
args =
|
||||
for(arg, QMAKE_ARGS): \
|
||||
args += $$system_quote($$arg)
|
||||
system("cd $$system_quote($$OUT_PWD) && $$QMAKE_QMAKE $$args $$system_quote($$_PRO_FILE_) -spec macx-xcode")
|
||||
|
||||
} else {
|
||||
load(resolve_config)
|
||||
|
||||
iphonesimulator: \
|
||||
sdk = iphonesimulator
|
||||
else: \
|
||||
sdk = iphoneos
|
||||
|
||||
debug: \
|
||||
cfg = debug
|
||||
else: \
|
||||
cfg = release
|
||||
|
||||
for(action, $$list(build install clean)) {
|
||||
equals(action, build) {
|
||||
action_target_suffix =
|
||||
action_target = all
|
||||
} else {
|
||||
action_target_suffix = -$$action
|
||||
action_target = $$action
|
||||
}
|
||||
|
||||
target = $${sdk}-$${cfg}$${action_target_suffix}
|
||||
|
||||
$${target}.commands = "@bash -o pipefail -c 'xcodebuild $$action -sdk $$sdk -configuration $$title($$cfg) | grep -v setenv'"
|
||||
QMAKE_EXTRA_TARGETS += $$target
|
||||
|
||||
$${action_target}.depends += $$target
|
||||
QMAKE_EXTRA_TARGETS *= $${action_target}
|
||||
}
|
||||
|
||||
xcode_build_dir_distclean.commands = "$(DEL_FILE) -R $$title($$cfg)-$${sdk}"
|
||||
xcode_build_dir_distclean.depends = clean
|
||||
QMAKE_EXTRA_TARGETS += xcode_build_dir_distclean
|
||||
distclean.depends = xcode_build_dir_distclean
|
||||
QMAKE_EXTRA_TARGETS += distclean
|
||||
}
|
||||
|
||||
CONFIG =
|
||||
}
|
||||
}
|
||||
} else: equals(TEMPLATE, lib) {
|
||||
iphonesimulator.name = Simulator
|
||||
iphoneos.name = Device
|
||||
addExclusiveBuilds(iphonesimulator, iphoneos)
|
||||
|
||||
iphonesimulator_and_iphoneos:iphonesimulator {
|
||||
QT_ARCH = i386
|
||||
QMAKE_MAC_SDK ~= s,^iphoneos,iphonesimulator,
|
||||
|
||||
# Since the CPU feature detection done by configure is limited to one
|
||||
# target at the moment, we disable SIMD support for simulator.
|
||||
CONFIG -= simd
|
||||
}
|
||||
} else: equals(TEMPLATE, subdirs) {
|
||||
# Prevent recursion into host_builds
|
||||
for(subdir, SUBDIRS) {
|
||||
contains($${subdir}.CONFIG, host_build) {
|
||||
$${subdir}.CONFIG += no_iphoneos_target no_iphonesimulator_target
|
||||
|
||||
# Other targets which we do want to recurse into may depend on this target,
|
||||
# for example corelib depends on moc, rcc, bootstrap, etc, and other libs
|
||||
# may depend on host-tools that are needed to build the lib, so we resolve
|
||||
# the final target name and redirect it to the base target, so that the
|
||||
# dependency chain is not broken for the other targets.
|
||||
|
||||
!isEmpty($${subdir}.target) {
|
||||
target = $$eval($${subdir}.target)
|
||||
} else {
|
||||
!isEmpty($${subdir}.file): \
|
||||
file = $$eval($${subdir}.file)
|
||||
else: !isEmpty($${subdir}.subdir): \
|
||||
file = $$eval($${subdir}.subdir)
|
||||
else: \
|
||||
file = $$subdir
|
||||
|
||||
target = sub-$$file
|
||||
}
|
||||
|
||||
target ~= s,[^a-zA-Z0-9_],-,
|
||||
|
||||
$${target}-iphonesimulator.depends = $$target
|
||||
$${target}-iphoneos.depends = $$target
|
||||
QMAKE_EXTRA_TARGETS += $${target}-iphonesimulator $${target}-iphoneos
|
||||
}
|
||||
}
|
||||
|
||||
prepareRecursiveTarget(iphonesimulator)
|
||||
prepareRecursiveTarget(iphoneos)
|
||||
QMAKE_EXTRA_TARGETS += iphonesimulator iphoneos
|
||||
|
||||
} else: equals(TEMPLATE, aux) {
|
||||
# Dummy targets for the 'aux' TEMPLATE, so we can always recurse
|
||||
QMAKE_EXTRA_TARGETS *= iphonesimulator iphoneos
|
||||
}
|
||||
|
||||
macx-xcode {
|
||||
@ -57,15 +175,21 @@ macx-xcode {
|
||||
QMAKE_MAC_XCODE_SETTINGS += ios_device_family
|
||||
}
|
||||
|
||||
# Be more specific about which architecture we're targeting
|
||||
equals(QT_ARCH, arm): \
|
||||
actual_archs = $$QMAKE_IOS_DEVICE_ARCHS
|
||||
else: \
|
||||
actual_archs = $$QMAKE_IOS_SIMULATOR_ARCHS
|
||||
|
||||
macx-xcode {
|
||||
QMAKE_XCODE_ARCHS = $$actual_archs
|
||||
arch_iphoneos.name = "ARCHS[sdk=iphoneos*]"
|
||||
arch_iphoneos.value = $$QMAKE_IOS_DEVICE_ARCHS
|
||||
arch_iphonesimulator.name = "ARCHS[sdk=iphonesimulator*]"
|
||||
arch_iphonesimulator.value = $$QMAKE_IOS_SIMULATOR_ARCHS
|
||||
|
||||
QMAKE_MAC_XCODE_SETTINGS += arch_iphoneos arch_iphonesimulator
|
||||
unset(QMAKE_XCODE_ARCHS)
|
||||
} else {
|
||||
# Be more specific about which architecture we're targeting
|
||||
equals(QT_ARCH, arm): \
|
||||
actual_archs = $$QMAKE_IOS_DEVICE_ARCHS
|
||||
else: \
|
||||
actual_archs = $$QMAKE_IOS_SIMULATOR_ARCHS
|
||||
|
||||
for(arch, actual_archs): \
|
||||
arch_flags += -arch $$arch
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
|
||||
load(default_pre)
|
||||
|
||||
# In case Qt was built for a specific SDK
|
||||
!iphonesimulator_and_iphoneos:contains(QMAKE_MAC_SDK, ^iphonesimulator.*): \
|
||||
CONFIG += iphonesimulator
|
||||
|
||||
# Check for supported Xcode versions
|
||||
lessThan(QMAKE_XCODE_VERSION, "4.3"): \
|
||||
error("This mkspec requires Xcode 4.3 or later")
|
||||
|
@ -31,14 +31,19 @@ equals(TEMPLATE, app):contains(QT, gui(-private)?) {
|
||||
# able to add symbolic breakpoints for 'main', not caring that the symbol is actually
|
||||
# called 'qt_main' now.
|
||||
|
||||
isEmpty(OBJECTS_DIR): \
|
||||
OBJECTS_DIR = .
|
||||
macx-xcode {
|
||||
objects_dir = "${OBJECT_FILE_DIR}-${CURRENT_VARIANT}/${CURRENT_ARCH}"
|
||||
} else {
|
||||
objects_dir = $$OBJECTS_DIR
|
||||
isEmpty(objects_dir): \
|
||||
objects_dir = .
|
||||
}
|
||||
|
||||
!isEmpty(QMAKE_PRE_LINK): \
|
||||
QMAKE_PRE_LINK += ";"
|
||||
|
||||
QMAKE_PRE_LINK += \
|
||||
"for f in $(find $${OBJECTS_DIR} -name '*.o'); do" \
|
||||
"for f in $(find $${objects_dir} -name '*.o'); do" \
|
||||
"(nm $f | grep -q 'T _main' && cp $f $f.original" \
|
||||
"&& ld -r -alias _main _qt_main -unexported_symbol _main $f.original -o $f)" \
|
||||
"|| true" \
|
||||
|
@ -15,7 +15,7 @@
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE@</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.yourcompany.@EXECUTABLE@</string>
|
||||
<string>@BUNDLEIDENTIFIER@</string>
|
||||
<key>NOTE</key>
|
||||
<string>This file was generated by Qt/QMake.</string>
|
||||
</dict>
|
||||
|
@ -81,6 +81,8 @@
|
||||
#define QT_STAT_MASK _S_IFMT
|
||||
#if defined(_S_IFLNK)
|
||||
# define QT_STAT_LNK _S_IFLNK
|
||||
#else
|
||||
# define QT_STAT_LNK 0120000
|
||||
#endif
|
||||
#define QT_FILENO _fileno
|
||||
#define QT_OPEN ::_open
|
||||
|
@ -21,7 +21,7 @@ QMAKE_LEX = flex
|
||||
QMAKE_LEXFLAGS =
|
||||
QMAKE_YACC = byacc
|
||||
QMAKE_YACCFLAGS = -d
|
||||
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t
|
||||
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t -FS
|
||||
QMAKE_CFLAGS_WARN_ON = -W3
|
||||
QMAKE_CFLAGS_WARN_OFF = -W0
|
||||
QMAKE_CFLAGS_RELEASE = -O2 -MD
|
||||
|
@ -2,7 +2,7 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
|
||||
|
||||
project = QMake
|
||||
description = QMake Manual
|
||||
url = http://qt-project.org/doc/qt-$QT_VER/qmake
|
||||
url = http://qt-project.org/doc/qt-$QT_VER
|
||||
|
||||
qhp.projects = qmake
|
||||
|
||||
@ -75,4 +75,3 @@ depends += \
|
||||
qtx11extras \
|
||||
qtxml \
|
||||
qtxmlpatterns
|
||||
|
||||
|
@ -2773,7 +2773,7 @@
|
||||
|
||||
Basic test functions are implemented as built-in functions.
|
||||
|
||||
\section2 cache(variablename, [set|add|sub] [transient] [super], [source variablename])
|
||||
\section2 cache(variablename, [set|add|sub] [transient] [super|stash], [source variablename])
|
||||
|
||||
This is an internal function that you will typically not need.
|
||||
|
||||
|
@ -417,6 +417,7 @@ QString GBuildMakefileGenerator::writeOne(QString filename, QString pathtoremove
|
||||
bool
|
||||
GBuildMakefileGenerator::openOutput(QFile &file, const QString &build) const
|
||||
{
|
||||
Q_UNUSED(build)
|
||||
debug_msg(1, "file is %s", file.fileName().toLatin1().constData());
|
||||
QFileInfo fi(file);
|
||||
if (fi.filePath().isEmpty())
|
||||
|
@ -463,12 +463,12 @@ ProjectBuilderSources::files(QMakeProject *project) const
|
||||
{
|
||||
QStringList ret = project->values(ProKey(key)).toQStringList();
|
||||
if(key == "QMAKE_INTERNAL_INCLUDED_FILES") {
|
||||
QStringList newret;
|
||||
for(int i = 0; i < ret.size(); ++i) {
|
||||
QStringList newret;
|
||||
if(!ret.at(i).endsWith(Option::prf_ext))
|
||||
newret.append(ret.at(i));
|
||||
ret = newret;
|
||||
}
|
||||
ret = newret;
|
||||
}
|
||||
if(key == "SOURCES" && project->first("TEMPLATE") == "app" && !project->isEmpty("ICON"))
|
||||
ret.append(project->first("ICON").toQString());
|
||||
@ -1260,11 +1260,33 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< "\t\t\t" << writeSettings("sourceTree", "<Group>") << ";\n"
|
||||
<< "\t\t};\n";
|
||||
|
||||
{
|
||||
QString aggregate_target_key = keyFor(pbx_dir + "QMAKE_PBX_AGGREGATE_TARGET");
|
||||
project->values("QMAKE_PBX_TARGETS").append(aggregate_target_key);
|
||||
t << "\t\t" << aggregate_target_key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("buildPhases", project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES"), SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("dependencies", ProStringList(), SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("buildConfigurationList", keyFor("QMAKE_PBX_BUILDCONFIG_LIST_TARGET"), SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXAggregateTarget", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("buildRules", ProStringList(), SettingsAsList) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("productName", "Qt Preprocess") << ";\n"
|
||||
<< "\t\t\t" << writeSettings("name", "Qt Preprocess") << ";\n"
|
||||
<< "\t\t};\n";
|
||||
|
||||
QString aggregate_target_dep_key = keyFor(pbx_dir + "QMAKE_PBX_AGGREGATE_TARGET_DEP");
|
||||
t << "\t\t" << aggregate_target_dep_key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("isa", "PBXTargetDependency", SettingsNoQuote) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("target", aggregate_target_key) << ";\n"
|
||||
<< "\t\t};\n";
|
||||
|
||||
project->values("QMAKE_PBX_TARGET_DEPENDS").append(aggregate_target_dep_key);
|
||||
}
|
||||
|
||||
//TARGET
|
||||
QString target_key = keyFor(pbx_dir + "QMAKE_PBX_TARGET");
|
||||
project->values("QMAKE_PBX_TARGETS").append(target_key);
|
||||
project->values("QMAKE_PBX_TARGETS").prepend(target_key);
|
||||
t << "\t\t" << target_key << " = {\n"
|
||||
<< "\t\t\t" << writeSettings("buildPhases", project->values("QMAKE_PBX_PRESCRIPT_BUILDPHASES") + project->values("QMAKE_PBX_BUILDPHASES"),
|
||||
<< "\t\t\t" << writeSettings("buildPhases", project->values("QMAKE_PBX_BUILDPHASES"),
|
||||
SettingsAsList, 4) << ";\n";
|
||||
t << "\t\t\t" << writeSettings("dependencies", project->values("QMAKE_PBX_TARGET_DEPENDS"), SettingsAsList, 4) << ";\n"
|
||||
<< "\t\t\t" << writeSettings("productReference", keyFor(pbx_dir + "QMAKE_PBX_REFERENCE")) << ";\n";
|
||||
@ -1367,7 +1389,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if ((project->first("TEMPLATE") == "app" && project->isActiveConfig("app_bundle")) ||
|
||||
(project->first("TEMPLATE") == "lib" && !project->isActiveConfig("staticlib") &&
|
||||
project->isActiveConfig("lib_bundle"))) {
|
||||
QString plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString());
|
||||
QString plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString(), Option::output_dir, input_dir);
|
||||
if (plist.isEmpty())
|
||||
plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE");
|
||||
if (exists(plist)) {
|
||||
@ -1382,7 +1404,10 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
} else {
|
||||
plist_in_text = plist_in_text.replace("@LIBRARY@", project->first("QMAKE_ORIG_TARGET").toQString());
|
||||
}
|
||||
plist_in_text = plist_in_text.replace("@BUNDLEIDENTIFIER@", QLatin1String("${PRODUCT_NAME:rfc1034identifier}"));
|
||||
QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString();
|
||||
if (bundlePrefix.isEmpty())
|
||||
bundlePrefix = "com.yourcompany";
|
||||
plist_in_text = plist_in_text.replace("@BUNDLEIDENTIFIER@", bundlePrefix + "." + QLatin1String("${PRODUCT_NAME:rfc1034identifier}"));
|
||||
if (!project->values("VERSION").isEmpty()) {
|
||||
plist_in_text = plist_in_text.replace("@SHORT_VERSION@", project->first("VER_MAJ") + "." +
|
||||
project->first("VER_MIN"));
|
||||
@ -1397,6 +1422,8 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\t\t\t\t" << writeSettings("INFOPLIST_FILE", "Info.plist") << ";\n";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
warn_msg(WarnLogic, "Could not resolve Info.plist: '%s'. Check if QMAKE_INFO_PLIST points to a valid file.", plist.toLatin1().constData());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1770,6 +1797,7 @@ ProjectBuilderMakefileGenerator::reftypeForFile(const QString &where)
|
||||
|
||||
QString ProjectBuilderMakefileGenerator::sourceTreeForFile(const QString &where)
|
||||
{
|
||||
Q_UNUSED(where)
|
||||
// We always use absolute paths, instead of maintaining the SRCROOT
|
||||
// build variable and making files relative to that.
|
||||
return QLatin1String("<absolute>");
|
||||
|
@ -43,6 +43,9 @@
|
||||
#include "option.h"
|
||||
#include "cachekeys.h"
|
||||
#include "meta.h"
|
||||
|
||||
#include <ioutils.h>
|
||||
|
||||
#include <qdir.h>
|
||||
#include <qfile.h>
|
||||
#include <qtextstream.h>
|
||||
@ -52,6 +55,7 @@
|
||||
#include <qbuffer.h>
|
||||
#include <qsettings.h>
|
||||
#include <qdatetime.h>
|
||||
|
||||
#if defined(Q_OS_UNIX)
|
||||
#include <unistd.h>
|
||||
#else
|
||||
@ -92,7 +96,7 @@ bool MakefileGenerator::canExecute(const QStringList &cmdline, int *a) const
|
||||
|
||||
QString MakefileGenerator::mkdir_p_asstring(const QString &dir, bool escape) const
|
||||
{
|
||||
QString edir = escape ? escapeFilePath(dir) : dir;
|
||||
QString edir = escape ? escapeFilePath(Option::fixPathToTargetOS(dir, false, false)) : dir;
|
||||
return "@" + makedir.arg(edir);
|
||||
}
|
||||
|
||||
@ -2261,7 +2265,7 @@ QString MakefileGenerator::buildArgs()
|
||||
{
|
||||
QString ret;
|
||||
|
||||
foreach (const QString &arg, Option::qmake_args)
|
||||
foreach (const QString &arg, Option::globals->qmake_args)
|
||||
ret += " " + escapeFilePath(arg);
|
||||
return ret;
|
||||
}
|
||||
@ -3270,7 +3274,11 @@ MakefileGenerator::writePkgConfigFile()
|
||||
}
|
||||
}
|
||||
t << "Description: " << desc << endl;
|
||||
t << "Version: " << project->first("VERSION") << endl;
|
||||
ProString version = project->first("QMAKE_PKGCONFIG_VERSION");
|
||||
if (version.isEmpty())
|
||||
version = project->first("VERSION");
|
||||
if (!version.isEmpty())
|
||||
t << "Version: " << version << endl;
|
||||
|
||||
// libs
|
||||
t << "Libs: ";
|
||||
@ -3341,11 +3349,17 @@ QString MakefileGenerator::installMetaFile(const ProKey &replace_rule, const QSt
|
||||
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 \"s," + match + "," + replace + ",g\"";
|
||||
ret += " -e " + shellQuote("s," + match + "," + replace + ",g");
|
||||
}
|
||||
ret += " \"" + src + "\" >\"" + dst + "\"";
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
QString MakefileGenerator::shellQuote(const QString &str)
|
||||
{
|
||||
return isWindowsShell() ? QMakeInternal::IoUtils::shellQuoteWin(str)
|
||||
: QMakeInternal::IoUtils::shellQuoteUnix(str);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -271,6 +271,7 @@ public:
|
||||
virtual bool mergeBuildProject(MakefileGenerator * /*other*/) { return false; }
|
||||
virtual bool openOutput(QFile &, const QString &build) const;
|
||||
bool isWindowsShell() const { return Option::dir_sep == QLatin1String("\\"); }
|
||||
QString shellQuote(const QString &str);
|
||||
};
|
||||
|
||||
inline void MakefileGenerator::setNoIO(bool o)
|
||||
|
@ -285,13 +285,13 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << odir << ".deps/%.d: " << pwd << "/%.cpp\n\t";
|
||||
if(project->isActiveConfig("echo_depend_creation"))
|
||||
t << "@echo Creating depend for $<\n\t";
|
||||
t << mkdir_p_asstring("$(@D)") << "\n\t"
|
||||
t << mkdir_p_asstring("$(@D)", false) << "\n\t"
|
||||
<< "@$(CXX) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@\n\n";
|
||||
|
||||
t << odir << ".deps/%.d: " << pwd << "/%.c\n\t";
|
||||
if(project->isActiveConfig("echo_depend_creation"))
|
||||
t << "@echo Creating depend for $<\n\t";
|
||||
t << mkdir_p_asstring("$(@D)") << "\n\t"
|
||||
t << mkdir_p_asstring("$(@D)", false) << "\n\t"
|
||||
<< "@$(CC) " << cmd << " $< | sed \"s,^\\($(*F).o\\):," << odir << "\\1:,g\" >$@\n\n";
|
||||
|
||||
static const char * const src[] = { "SOURCES", "GENERATED_SOURCES", 0 };
|
||||
@ -502,7 +502,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
incr_lflags += var("QMAKE_LFLAGS_RELEASE");
|
||||
t << incr_target_dir << ": $(INCREMENTAL_OBJECTS)\n\t";
|
||||
if(!destdir.isEmpty())
|
||||
t << mkdir_p_asstring(destdir) << "\n\t";
|
||||
t << mkdir_p_asstring(destdir, false) << "\n\t";
|
||||
t << "$(LINK) " << incr_lflags << " " << var("QMAKE_LINK_O_FLAG") << incr_target_dir <<
|
||||
" $(INCREMENTAL_OBJECTS)\n";
|
||||
//communicated below
|
||||
@ -528,7 +528,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
<< " " << var("POST_TARGETDEPS");
|
||||
}
|
||||
if(!destdir.isEmpty())
|
||||
t << "\n\t" << mkdir_p_asstring(destdir);
|
||||
t << "\n\t" << mkdir_p_asstring(destdir, false);
|
||||
if(!project->isEmpty("QMAKE_PRE_LINK"))
|
||||
t << "\n\t" << var("QMAKE_PRE_LINK");
|
||||
|
||||
@ -685,7 +685,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
|
||||
if(!project->first("QMAKE_PKGINFO").isEmpty()) {
|
||||
ProString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO"));
|
||||
QString destdir = escapeFilePath(project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents");
|
||||
QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents";
|
||||
t << pkginfo << ": \n\t";
|
||||
if(!destdir.isEmpty())
|
||||
t << mkdir_p_asstring(destdir) << "\n\t";
|
||||
@ -697,7 +697,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if(!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) {
|
||||
ProString resources = escapeFilePath(project->first("QMAKE_BUNDLE_RESOURCE_FILE"));
|
||||
bundledFiles << resources;
|
||||
QString destdir = escapeFilePath(project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources");
|
||||
QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources";
|
||||
t << resources << ": \n\t";
|
||||
t << mkdir_p_asstring(destdir) << "\n\t";
|
||||
t << "@touch " << resources << "\n\t\n";
|
||||
@ -710,7 +710,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
QString destdir = info_plist_out.section(Option::dir_sep, 0, -2);
|
||||
t << info_plist_out << ": \n\t";
|
||||
if(!destdir.isEmpty())
|
||||
t << mkdir_p_asstring(destdir) << "\n\t";
|
||||
t << mkdir_p_asstring(destdir, false) << "\n\t";
|
||||
ProStringList commonSedArgs;
|
||||
if (!project->values("VERSION").isEmpty())
|
||||
commonSedArgs << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "." << project->first("VER_MIN") << ",g\" ";
|
||||
@ -804,7 +804,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
project->first("OBJECTS_DIR")) + ddir,
|
||||
Option::output_dir, Option::output_dir));
|
||||
t << "dist: \n\t"
|
||||
<< mkdir_p_asstring(ddir_c) << "\n\t"
|
||||
<< mkdir_p_asstring(ddir_c, false) << "\n\t"
|
||||
<< "$(COPY_FILE) --parents $(SOURCES) $(DIST) " << ddir_c << Option::dir_sep << " && ";
|
||||
if(!project->isEmpty("QMAKE_EXTRA_COMPILERS")) {
|
||||
const ProStringList &quc = project->values("QMAKE_EXTRA_COMPILERS");
|
||||
@ -920,7 +920,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "\t-$(DEL_FILE) " << destdir << "$(TARGET0) " << destdir << "$(TARGET1) "
|
||||
<< destdir << "$(TARGET2) $(TARGETA)\n";
|
||||
} else {
|
||||
t << "\t-$(DEL_FILE) $(TARGET) \n";
|
||||
t << "\t-$(DEL_FILE) " << destdir << "$(TARGET) \n";
|
||||
}
|
||||
t << varGlue("QMAKE_DISTCLEAN","\t-$(DEL_FILE) "," ","\n");
|
||||
{
|
||||
@ -1266,6 +1266,8 @@ void UnixMakefileGenerator::init2()
|
||||
alldeps += path + Option::dir_sep + fileInfo(files[file].toQString()).fileName();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
warn_msg(WarnLogic, "Could not resolve Info.plist: '%s'. Check if QMAKE_INFO_PLIST points to a valid file.", plist.toLatin1().constData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -147,6 +147,7 @@ const char _HeapReserveSize[] = "HeapReserveSize";
|
||||
const char _IgnoreAllDefaultLibraries[] = "IgnoreAllDefaultLibraries";
|
||||
const char _IgnoreEmbeddedIDL[] = "IgnoreEmbeddedIDL";
|
||||
const char _IgnoreImportLibrary[] = "IgnoreImportLibrary";
|
||||
const char _ImageHasSafeExceptionHandlers[] = "ImageHasSafeExceptionHandlers";
|
||||
const char _IgnoreSpecificDefaultLibraries[] = "IgnoreSpecificDefaultLibraries";
|
||||
const char _IgnoreStandardIncludePath[] = "IgnoreStandardIncludePath";
|
||||
const char _ImportLibrary[] = "ImportLibrary";
|
||||
@ -1494,6 +1495,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCLinkerTool &tool)
|
||||
<< attrTagT(_IgnoreAllDefaultLibraries, tool.IgnoreAllDefaultLibraries)
|
||||
<< attrTagT(_IgnoreEmbeddedIDL, tool.IgnoreEmbeddedIDL)
|
||||
<< attrTagT(_IgnoreImportLibrary, tool.IgnoreImportLibrary)
|
||||
<< attrTagT(_ImageHasSafeExceptionHandlers, tool.ImageHasSafeExceptionHandlers)
|
||||
<< attrTagX(_IgnoreSpecificDefaultLibraries, tool.IgnoreDefaultLibraryNames, ";")
|
||||
<< attrTagS(_ImportLibrary, tool.ImportLibrary)
|
||||
<< attrTagS(_KeyContainer, tool.KeyContainer)
|
||||
@ -1760,9 +1762,6 @@ void VCXProjectWriter::outputFilter(VCProject &project, XmlOutput &xml, XmlOutpu
|
||||
else
|
||||
root = new XTreeNode;
|
||||
|
||||
QString name, extfilter;
|
||||
triState parse;
|
||||
|
||||
for (int i = 0; i < project.SingleProjects.count(); ++i) {
|
||||
VCFilter filter;
|
||||
const VCProjectSingleConfig &singleCfg = project.SingleProjects.at(i);
|
||||
@ -1792,14 +1791,6 @@ void VCXProjectWriter::outputFilter(VCProject &project, XmlOutput &xml, XmlOutpu
|
||||
// Merge all files in this filter to root tree
|
||||
for (int x = 0; x < filter.Files.count(); ++x)
|
||||
root->addElement(filter.Files.at(x));
|
||||
|
||||
// Save filter setting from first filter. Next filters
|
||||
// may differ but we cannot handle that. (ex. extfilter)
|
||||
if (name.isEmpty()) {
|
||||
name = filter.Name;
|
||||
extfilter = filter.Filter;
|
||||
parse = filter.ParseFiles;
|
||||
}
|
||||
}
|
||||
|
||||
if (!root->hasElements())
|
||||
|
@ -113,9 +113,7 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
qPrintable(variables["QMAKESPEC"].first().toQString()));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#ifdef Q_OS_WIN
|
||||
else if (project->isActiveConfig(QStringLiteral("winrt"))) {
|
||||
} else if (project->isActiveConfig(QStringLiteral("winrt"))) {
|
||||
QString arch = project->first("VCPROJ_ARCH").toQString().toLower();
|
||||
QString compiler;
|
||||
QString compilerArch;
|
||||
@ -143,6 +141,8 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool isPhone = project->isActiveConfig(QStringLiteral("winphone"));
|
||||
#ifdef Q_OS_WIN
|
||||
QString regKeyPrefix;
|
||||
#if !defined(Q_OS_WIN64) && _WIN32_WINNT >= 0x0501
|
||||
BOOL isWow64;
|
||||
@ -160,7 +160,6 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool isPhone = project->isActiveConfig(QStringLiteral("winphone"));
|
||||
regKey = regKeyPrefix
|
||||
+ (isPhone ? QStringLiteral("Microsoft\\Microsoft SDKs\\WindowsPhone\\v")
|
||||
: QStringLiteral("Microsoft\\Microsoft SDKs\\Windows\\v"))
|
||||
@ -170,6 +169,10 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
fprintf(stderr, "Failed to find the Windows Kit installation directory.\n");
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
const QString vcInstallDir = "/fake/vc_install_dir";
|
||||
const QString kitDir = "/fake/sdk_install_dir";
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
QStringList incDirs;
|
||||
QStringList libDirs;
|
||||
@ -209,7 +212,6 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
t << "\nLIB = " << nmakePathList(libDirs);
|
||||
t << "\nPATH = " << nmakePathList(binDirs) << '\n';
|
||||
}
|
||||
#endif // Q_OS_WIN
|
||||
}
|
||||
writeNmakeParts(t);
|
||||
return MakefileGenerator::writeMakefile(t);
|
||||
@ -251,8 +253,10 @@ QString NmakeMakefileGenerator::defaultInstall(const QString &t)
|
||||
if(targetdir.right(1) != Option::dir_sep)
|
||||
targetdir += Option::dir_sep;
|
||||
|
||||
if(t == "target" && project->first("TEMPLATE") == "lib") {
|
||||
if(project->isActiveConfig("shared") && project->isActiveConfig("debug")) {
|
||||
if (project->isActiveConfig("debug")) {
|
||||
if (t == "dlltarget"
|
||||
|| (project->first("TEMPLATE") == "lib"
|
||||
&& project->isActiveConfig("shared"))) {
|
||||
QString pdb_target = getPdbTarget();
|
||||
pdb_target.remove('"');
|
||||
QString src_targ = (project->isEmpty("DESTDIR") ? QString("$(DESTDIR)") : project->first("DESTDIR")) + pdb_target;
|
||||
|
@ -1172,6 +1172,7 @@ VCLinkerTool::VCLinkerTool()
|
||||
IgnoreAllDefaultLibraries(unset),
|
||||
IgnoreEmbeddedIDL(unset),
|
||||
IgnoreImportLibrary(_True),
|
||||
ImageHasSafeExceptionHandlers(unset),
|
||||
LargeAddressAware(addrAwareDefault),
|
||||
LinkDLL(unset),
|
||||
LinkIncremental(linkIncrementalDefault),
|
||||
@ -1198,7 +1199,6 @@ VCLinkerTool::VCLinkerTool()
|
||||
TurnOffAssemblyGeneration(unset),
|
||||
TypeLibraryResourceID(0),
|
||||
GenerateManifest(unset),
|
||||
GenerateWindowsMetadata(unset),
|
||||
EnableUAC(unset),
|
||||
UACUIAccess(unset),
|
||||
SectionAlignment(-1),
|
||||
@ -1206,7 +1206,8 @@ VCLinkerTool::VCLinkerTool()
|
||||
AllowIsolation(unset),
|
||||
AssemblyDebug(unset),
|
||||
CLRUnmanagedCodeCheck(unset),
|
||||
DelaySign(unset)
|
||||
DelaySign(unset),
|
||||
GenerateWindowsMetadata(unset)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1654,11 +1655,12 @@ bool VCLinkerTool::parseOption(const char* option)
|
||||
StackCommitSize = both[1].toLongLong();
|
||||
}
|
||||
break;
|
||||
case 0x75AA4D8: // /SAFESH:{NO}
|
||||
{
|
||||
case 0x75AA4D8: // /SAFESEH:{NO}
|
||||
if (config->CompilerVersion >= NET2010)
|
||||
ImageHasSafeExceptionHandlers = (option[8] == ':') ? _False : _True;
|
||||
else
|
||||
AdditionalOptions += option;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 0x9B3C00D:
|
||||
case 0x78dc00d: // /SUBSYSTEM:{CONSOLE|EFI_APPLICATION|EFI_BOOT_SERVICE_DRIVER|EFI_ROM|EFI_RUNTIME_DRIVER|NATIVE|POSIX|WINDOWS|WINDOWSCE}[,major[.minor]]
|
||||
{
|
||||
@ -2119,9 +2121,9 @@ VCPreLinkEventTool::VCPreLinkEventTool()
|
||||
// VCConfiguration --------------------------------------------------
|
||||
|
||||
VCConfiguration::VCConfiguration()
|
||||
: ATLMinimizesCRunTimeLibraryUsage(unset),
|
||||
WinRT(false),
|
||||
: WinRT(false),
|
||||
WinPhone(false),
|
||||
ATLMinimizesCRunTimeLibraryUsage(unset),
|
||||
BuildBrowserInformation(unset),
|
||||
CharacterSet(charSetNotSet),
|
||||
ConfigurationType(typeApplication),
|
||||
@ -2859,7 +2861,7 @@ void VCProjectWriter::outputFilter(VCProject &project, XmlOutput &xml, const QSt
|
||||
root = new TreeNode;
|
||||
|
||||
QString name, extfilter, guid;
|
||||
triState parse;
|
||||
triState parse = unset;
|
||||
|
||||
for (int i = 0; i < project.SingleProjects.count(); ++i) {
|
||||
VCFilter filter;
|
||||
|
@ -615,6 +615,7 @@ public:
|
||||
QStringList IgnoreDefaultLibraryNames;
|
||||
triState IgnoreEmbeddedIDL;
|
||||
triState IgnoreImportLibrary;
|
||||
triState ImageHasSafeExceptionHandlers;
|
||||
QString ImportLibrary;
|
||||
addressAwarenessType LargeAddressAware;
|
||||
triState LinkDLL;
|
||||
|
@ -124,17 +124,17 @@ DotNET which_dotnet_version()
|
||||
// Fallback to .NET 2002
|
||||
current_version = NET2002;
|
||||
|
||||
QStringList warnPath;
|
||||
const DotNetCombo *lowestInstalledVersion = 0;
|
||||
QHash<DotNET, QString> installPaths;
|
||||
int installed = 0;
|
||||
int i = 0;
|
||||
for(; dotNetCombo[i].version; ++i) {
|
||||
QString path = qt_readRegistryKey(HKEY_LOCAL_MACHINE, dotNetCombo[i].regKey);
|
||||
if (!path.isEmpty() && installPaths.value(dotNetCombo[i].version) != path) {
|
||||
installPaths.insert(dotNetCombo[i].version, path);
|
||||
lowestInstalledVersion = &dotNetCombo[i];
|
||||
installPaths.insert(lowestInstalledVersion->version, path);
|
||||
++installed;
|
||||
current_version = dotNetCombo[i].version;
|
||||
warnPath += QString("%1").arg(dotNetCombo[i].versionStr);
|
||||
current_version = lowestInstalledVersion->version;
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,35 +143,20 @@ DotNET which_dotnet_version()
|
||||
|
||||
// More than one version installed, search directory path
|
||||
QString paths = qgetenv("PATH");
|
||||
QStringList pathlist = paths.toLower().split(";");
|
||||
|
||||
i = installed = 0;
|
||||
for(; dotNetCombo[i].version; ++i) {
|
||||
QString productPath = qt_readRegistryKey(HKEY_LOCAL_MACHINE, dotNetCombo[i].regKey).toLower();
|
||||
if (productPath.isEmpty())
|
||||
continue;
|
||||
QStringList::iterator it;
|
||||
for(it = pathlist.begin(); it != pathlist.end(); ++it) {
|
||||
if((*it).contains(productPath)) {
|
||||
++installed;
|
||||
current_version = dotNetCombo[i].version;
|
||||
warnPath += QString("%1 in path").arg(dotNetCombo[i].versionStr);
|
||||
break;
|
||||
}
|
||||
const QStringList pathlist = paths.split(QLatin1Char(';'));
|
||||
foreach (const QString &path, pathlist) {
|
||||
for (i = 0; dotNetCombo[i].version; ++i) {
|
||||
const QString productPath = installPaths.value(dotNetCombo[i].version);
|
||||
if (productPath.isEmpty())
|
||||
continue;
|
||||
if (path.startsWith(productPath, Qt::CaseInsensitive))
|
||||
return dotNetCombo[i].version;
|
||||
}
|
||||
}
|
||||
switch(installed) {
|
||||
case 1:
|
||||
break;
|
||||
case 0:
|
||||
warn_msg(WarnLogic, "Generator: MSVC.NET: Found more than one version of Visual Studio, but"
|
||||
" none in your path! Fallback to lowest version (%s)", warnPath.join(", ").toLatin1().data());
|
||||
break;
|
||||
default:
|
||||
warn_msg(WarnLogic, "Generator: MSVC.NET: Found more than one version of Visual Studio in"
|
||||
" your path! Fallback to lowest version (%s)", warnPath.join(", ").toLatin1().data());
|
||||
break;
|
||||
}
|
||||
|
||||
warn_msg(WarnLogic, "Generator: MSVC.NET: Found more than one version of Visual Studio, but"
|
||||
" none in your PATH. Falling back to lowest version (%s)",
|
||||
qPrintable(lowestInstalledVersion->versionStr));
|
||||
|
||||
return current_version;
|
||||
#endif
|
||||
@ -514,7 +499,7 @@ ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QSt
|
||||
// We want to store it as the .lib name.
|
||||
if (newDep->target.endsWith(".dll"))
|
||||
newDep->target = newDep->target.left(newDep->target.length()-3) + "lib";
|
||||
projGuids.insert(val.first, newDep->target);
|
||||
projGuids.insert(newDep->orig_target, newDep->target);
|
||||
|
||||
if (val.second.size()) {
|
||||
const ProStringList depends = val.second;
|
||||
|
@ -1590,11 +1590,11 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
|
||||
}
|
||||
case T_CACHE: {
|
||||
if (args.count() > 3) {
|
||||
evalError(fL1S("cache(var, [set|add|sub] [transient] [super], [srcvar]) requires one to three arguments."));
|
||||
evalError(fL1S("cache(var, [set|add|sub] [transient] [super|stash], [srcvar]) requires one to three arguments."));
|
||||
return ReturnFalse;
|
||||
}
|
||||
bool persist = true;
|
||||
bool super = false;
|
||||
enum { TargetStash, TargetCache, TargetSuper } target = TargetCache;
|
||||
enum { CacheSet, CacheAdd, CacheSub } mode = CacheSet;
|
||||
ProKey srcvar;
|
||||
if (args.count() >= 2) {
|
||||
@ -1603,7 +1603,9 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
|
||||
if (m_tmp3 == QLatin1String("transient")) {
|
||||
persist = false;
|
||||
} else if (m_tmp3 == QLatin1String("super")) {
|
||||
super = true;
|
||||
target = TargetSuper;
|
||||
} else if (m_tmp3 == QLatin1String("stash")) {
|
||||
target = TargetStash;
|
||||
} else if (m_tmp3 == QLatin1String("set")) {
|
||||
mode = CacheSet;
|
||||
} else if (m_tmp3 == QLatin1String("add")) {
|
||||
@ -1642,7 +1644,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
|
||||
m_option->mutex.lock();
|
||||
#endif
|
||||
QMakeBaseEnv *baseEnv =
|
||||
m_option->baseEnvs.value(QMakeBaseKey(m_buildRoot, hostBuild));
|
||||
m_option->baseEnvs.value(QMakeBaseKey(m_buildRoot, m_stashfile, hostBuild));
|
||||
#ifdef PROEVALUATOR_THREAD_SAFE
|
||||
// It's ok to unlock this before locking baseEnv,
|
||||
// as we have no intention to initialize the env.
|
||||
@ -1675,21 +1677,23 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
|
||||
removeEach(&newval, diffval);
|
||||
}
|
||||
if (oldval != newval) {
|
||||
baseEval->valuesRef(dstvar) = newval;
|
||||
if (super) {
|
||||
do {
|
||||
if (dstvar == QLatin1String("QMAKEPATH")) {
|
||||
baseEval->m_qmakepath = newval.toQStringList();
|
||||
baseEval->updateMkspecPaths();
|
||||
} else if (dstvar == QLatin1String("QMAKEFEATURES")) {
|
||||
baseEval->m_qmakefeatures = newval.toQStringList();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
baseEval->updateFeaturePaths();
|
||||
if (hostBuild == m_hostBuild)
|
||||
m_featureRoots = baseEval->m_featureRoots;
|
||||
} while (false);
|
||||
if (target != TargetStash || !m_stashfile.isEmpty()) {
|
||||
baseEval->valuesRef(dstvar) = newval;
|
||||
if (target == TargetSuper) {
|
||||
do {
|
||||
if (dstvar == QLatin1String("QMAKEPATH")) {
|
||||
baseEval->m_qmakepath = newval.toQStringList();
|
||||
baseEval->updateMkspecPaths();
|
||||
} else if (dstvar == QLatin1String("QMAKEFEATURES")) {
|
||||
baseEval->m_qmakefeatures = newval.toQStringList();
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
baseEval->updateFeaturePaths();
|
||||
if (hostBuild == m_hostBuild)
|
||||
m_featureRoots = baseEval->m_featureRoots;
|
||||
} while (false);
|
||||
}
|
||||
}
|
||||
changed = true;
|
||||
}
|
||||
@ -1720,16 +1724,16 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
|
||||
varstr += QLatin1Char('\n');
|
||||
}
|
||||
QString fn;
|
||||
if (super) {
|
||||
if (target == TargetSuper) {
|
||||
if (m_superfile.isEmpty()) {
|
||||
m_superfile = m_outputDir + QLatin1String("/.qmake.super");
|
||||
m_superfile = QDir::cleanPath(m_outputDir + QLatin1String("/.qmake.super"));
|
||||
printf("Info: creating super cache file %s\n", qPrintable(m_superfile));
|
||||
valuesRef(ProKey("_QMAKE_SUPER_CACHE_")) << ProString(m_superfile);
|
||||
}
|
||||
fn = m_superfile;
|
||||
} else {
|
||||
} else if (target == TargetCache) {
|
||||
if (m_cachefile.isEmpty()) {
|
||||
m_cachefile = m_outputDir + QLatin1String("/.qmake.cache");
|
||||
m_cachefile = QDir::cleanPath(m_outputDir + QLatin1String("/.qmake.cache"));
|
||||
printf("Info: creating cache file %s\n", qPrintable(m_cachefile));
|
||||
valuesRef(ProKey("_QMAKE_CACHE_")) << ProString(m_cachefile);
|
||||
// We could update m_{source,build}Root and m_featureRoots here, or even
|
||||
@ -1739,6 +1743,14 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
|
||||
// The sub-projects will find the new cache all by themselves.
|
||||
}
|
||||
fn = m_cachefile;
|
||||
} else {
|
||||
fn = m_stashfile;
|
||||
if (fn.isEmpty())
|
||||
fn = QDir::cleanPath(m_outputDir + QLatin1String("/.qmake.stash"));
|
||||
if (!m_vfs->exists(fn)) {
|
||||
printf("Info: creating stash file %s\n", qPrintable(fn));
|
||||
valuesRef(ProKey("_QMAKE_STASH_")) << ProString(fn);
|
||||
}
|
||||
}
|
||||
return writeFile(fL1S("cache "), fn, QIODevice::Append, varstr);
|
||||
}
|
||||
|
@ -79,19 +79,19 @@ QT_BEGIN_NAMESPACE
|
||||
#define fL1S(s) QString::fromLatin1(s)
|
||||
|
||||
|
||||
QMakeBaseKey::QMakeBaseKey(const QString &_root, bool _hostBuild)
|
||||
: root(_root), hostBuild(_hostBuild)
|
||||
QMakeBaseKey::QMakeBaseKey(const QString &_root, const QString &_stash, bool _hostBuild)
|
||||
: root(_root), stash(_stash), hostBuild(_hostBuild)
|
||||
{
|
||||
}
|
||||
|
||||
uint qHash(const QMakeBaseKey &key)
|
||||
{
|
||||
return qHash(key.root) ^ (uint)key.hostBuild;
|
||||
return qHash(key.root) ^ qHash(key.stash) ^ (uint)key.hostBuild;
|
||||
}
|
||||
|
||||
bool operator==(const QMakeBaseKey &one, const QMakeBaseKey &two)
|
||||
{
|
||||
return one.root == two.root && one.hostBuild == two.hostBuild;
|
||||
return one.root == two.root && one.stash == two.stash && one.hostBuild == two.hostBuild;
|
||||
}
|
||||
|
||||
QMakeBaseEnv::QMakeBaseEnv()
|
||||
@ -982,6 +982,8 @@ void QMakeEvaluator::loadDefaults()
|
||||
vars[ProKey("_DATE_")] << ProString(QDateTime::currentDateTime().toString());
|
||||
if (!m_option->qmake_abslocation.isEmpty())
|
||||
vars[ProKey("QMAKE_QMAKE")] << ProString(m_option->qmake_abslocation);
|
||||
if (!m_option->qmake_args.isEmpty())
|
||||
vars[ProKey("QMAKE_ARGS")] = ProStringList(m_option->qmake_args);
|
||||
#if defined(Q_OS_WIN32)
|
||||
vars[ProKey("QMAKE_HOST.os")] << ProString("Windows");
|
||||
|
||||
@ -1137,6 +1139,19 @@ bool QMakeEvaluator::prepareProject(const QString &inDir)
|
||||
dir = qdfi.path();
|
||||
}
|
||||
|
||||
dir = m_outputDir;
|
||||
forever {
|
||||
QString stashfile = dir + QLatin1String("/.qmake.stash");
|
||||
if (dir == (!superdir.isEmpty() ? superdir : m_buildRoot) || m_vfs->exists(stashfile)) {
|
||||
m_stashfile = QDir::cleanPath(stashfile);
|
||||
break;
|
||||
}
|
||||
QFileInfo qdfi(dir);
|
||||
if (qdfi.isRoot())
|
||||
break;
|
||||
dir = qdfi.path();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1186,23 +1201,18 @@ bool QMakeEvaluator::loadSpec()
|
||||
QMakeEvaluator evaluator(m_option, m_parser, m_vfs, m_handler);
|
||||
evaluator.m_sourceRoot = m_sourceRoot;
|
||||
evaluator.m_buildRoot = m_buildRoot;
|
||||
if (!m_superfile.isEmpty()) {
|
||||
valuesRef(ProKey("_QMAKE_SUPER_CACHE_")) << ProString(m_superfile);
|
||||
if (evaluator.evaluateFile(
|
||||
m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue)
|
||||
return false;
|
||||
|
||||
if (!m_superfile.isEmpty() && evaluator.evaluateFile(
|
||||
m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue) {
|
||||
return false;
|
||||
}
|
||||
if (!m_conffile.isEmpty()) {
|
||||
valuesRef(ProKey("_QMAKE_CONF_")) << ProString(m_conffile);
|
||||
if (evaluator.evaluateFile(
|
||||
m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue)
|
||||
return false;
|
||||
if (!m_conffile.isEmpty() && evaluator.evaluateFile(
|
||||
m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue) {
|
||||
return false;
|
||||
}
|
||||
if (!m_cachefile.isEmpty()) {
|
||||
valuesRef(ProKey("_QMAKE_CACHE_")) << ProString(m_cachefile);
|
||||
if (evaluator.evaluateFile(
|
||||
m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue)
|
||||
return false;
|
||||
if (!m_cachefile.isEmpty() && evaluator.evaluateFile(
|
||||
m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue) {
|
||||
return false;
|
||||
}
|
||||
if (qmakespec.isEmpty()) {
|
||||
if (!m_hostBuild)
|
||||
@ -1236,19 +1246,31 @@ bool QMakeEvaluator::loadSpec()
|
||||
cool:
|
||||
m_qmakespec = QDir::cleanPath(qmakespec);
|
||||
|
||||
if (!m_superfile.isEmpty()
|
||||
&& evaluateFile(m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue) {
|
||||
return false;
|
||||
if (!m_superfile.isEmpty()) {
|
||||
valuesRef(ProKey("_QMAKE_SUPER_CACHE_")) << ProString(m_superfile);
|
||||
if (evaluateFile(
|
||||
m_superfile, QMakeHandler::EvalConfigFile, LoadProOnly|LoadHidden) != ReturnTrue)
|
||||
return false;
|
||||
}
|
||||
if (!loadSpecInternal())
|
||||
return false;
|
||||
if (!m_conffile.isEmpty()
|
||||
&& evaluateFile(m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) {
|
||||
return false;
|
||||
if (!m_conffile.isEmpty()) {
|
||||
valuesRef(ProKey("_QMAKE_CONF_")) << ProString(m_conffile);
|
||||
if (evaluateFile(
|
||||
m_conffile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue)
|
||||
return false;
|
||||
}
|
||||
if (!m_cachefile.isEmpty()
|
||||
&& evaluateFile(m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue) {
|
||||
return false;
|
||||
if (!m_cachefile.isEmpty()) {
|
||||
valuesRef(ProKey("_QMAKE_CACHE_")) << ProString(m_cachefile);
|
||||
if (evaluateFile(
|
||||
m_cachefile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue)
|
||||
return false;
|
||||
}
|
||||
if (!m_stashfile.isEmpty() && m_vfs->exists(m_stashfile)) {
|
||||
valuesRef(ProKey("_QMAKE_STASH_")) << ProString(m_stashfile);
|
||||
if (evaluateFile(
|
||||
m_stashfile, QMakeHandler::EvalConfigFile, LoadProOnly) != ReturnTrue)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -1327,7 +1349,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
|
||||
#ifdef PROEVALUATOR_THREAD_SAFE
|
||||
m_option->mutex.lock();
|
||||
#endif
|
||||
QMakeBaseEnv **baseEnvPtr = &m_option->baseEnvs[QMakeBaseKey(m_buildRoot, m_hostBuild)];
|
||||
QMakeBaseEnv **baseEnvPtr = &m_option->baseEnvs[QMakeBaseKey(m_buildRoot, m_stashfile, m_hostBuild)];
|
||||
if (!*baseEnvPtr)
|
||||
*baseEnvPtr = new QMakeBaseEnv;
|
||||
QMakeBaseEnv *baseEnv = *baseEnvPtr;
|
||||
@ -1354,6 +1376,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile(
|
||||
baseEval->m_superfile = m_superfile;
|
||||
baseEval->m_conffile = m_conffile;
|
||||
baseEval->m_cachefile = m_cachefile;
|
||||
baseEval->m_stashfile = m_stashfile;
|
||||
baseEval->m_sourceRoot = m_sourceRoot;
|
||||
baseEval->m_buildRoot = m_buildRoot;
|
||||
baseEval->m_hostBuild = m_hostBuild;
|
||||
|
@ -298,6 +298,7 @@ public:
|
||||
QString m_superfile;
|
||||
QString m_conffile;
|
||||
QString m_cachefile;
|
||||
QString m_stashfile;
|
||||
QString m_sourceRoot;
|
||||
QString m_buildRoot;
|
||||
QStringList m_qmakepath;
|
||||
|
@ -66,9 +66,10 @@ class QMakeEvaluator;
|
||||
class QMakeBaseKey
|
||||
{
|
||||
public:
|
||||
QMakeBaseKey(const QString &_root, bool _hostBuild);
|
||||
QMakeBaseKey(const QString &_root, const QString &_stash, bool _hostBuild);
|
||||
|
||||
QString root;
|
||||
QString stash;
|
||||
bool hostBuild;
|
||||
};
|
||||
|
||||
@ -117,6 +118,7 @@ public:
|
||||
QProcessEnvironment environment;
|
||||
#endif
|
||||
QString qmake_abslocation;
|
||||
QStringList qmake_args;
|
||||
|
||||
QString qmakespec, xqmakespec;
|
||||
QString user_template, user_template_prefix;
|
||||
|
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