Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.7' into 5.8
Browse files Browse the repository at this point in the history
Conflicts:
	mkspecs/features/mac/default_pre.prf
	mkspecs/features/qpa/genericunixfontdatabase.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	src/corelib/io/qiodevice.cpp

Change-Id: I6f210f71f177a3c3278a4f380542195e14e4b491
  • Loading branch information
liangqi committed Oct 6, 2016
2 parents 669add9 + 6feec9d commit ef25620
Show file tree
Hide file tree
Showing 68 changed files with 189,476 additions and 196 deletions.
7 changes: 7 additions & 0 deletions doc/doc.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
TEMPLATE = aux

global_docs.files = $$PWD/global
global_docs.path = $$[QT_INSTALL_DOCS]
INSTALLS += global_docs
!prefix_build:!equals(OUT_PWD, $$PWD): \
COPIES += global_docs
2 changes: 2 additions & 0 deletions mkspecs/common/mac.conf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ QMAKE_LIBS_DYNLOAD =
QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL
QMAKE_LIBS_THREAD =

QMAKE_ACTOOL = actool

QMAKE_DSYMUTIL = dsymutil
QMAKE_STRIP = strip
QMAKE_STRIPFLAGS_LIB += -S -x
Expand Down
109 changes: 109 additions & 0 deletions mkspecs/features/mac/asset_catalogs.prf
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# QMAKE_ASSET_CATALOGS
# Paths to xcassets directories to be compiled
#
# QMAKE_ASSET_CATALOGS_BUILD_PATH
# Location which asset catalogs will be compiled to.
# If the current target is an app bundle, defaults to its Resources directory.
# Otherwise, this value must be set manually.
#
# QMAKE_ASSET_CATALOGS_APP_ICON
# Name of the icon resource in the asset catalogs that will be used as the app icon.
# Defaults to AppIcon.
#
# QMAKE_ASSET_CATALOGS_INSTALL_PATH
# Base path to install files to. Falls back to a path relative to the target install path,
# based on QMAKE_ASSET_CATALOGS_BUILD_PATH.

!have_target|if(!build_pass:!isEmpty(BUILDS)): \
return()

!isEmpty(QMAKE_ASSET_CATALOGS) {
load(resolve_target)

isEmpty(QMAKE_ASSET_CATALOGS_BUILD_PATH) {
!isEmpty(QMAKE_RESOLVED_BUNDLE):equals(TEMPLATE, app):app_bundle {
macos: \
QMAKE_ASSET_CATALOGS_BUILD_PATH = $$QMAKE_RESOLVED_BUNDLE/Contents/Resources
else: \
QMAKE_ASSET_CATALOGS_BUILD_PATH = $$QMAKE_RESOLVED_BUNDLE
} else {
error("QMAKE_ASSET_CATALOGS_BUILD_PATH must be set when using QMAKE_ASSET_CATALOGS.")
}
}

QMAKE_ASSET_CATALOGS_BUILD_PATH = $$clean_path($$QMAKE_ASSET_CATALOGS_BUILD_PATH)

macx-xcode {
!isEmpty(QMAKE_ASSET_CATALOGS_APP_ICON) {
asset_catalog_appicon.name = "ASSETCATALOG_COMPILER_APPICON_NAME"
asset_catalog_appicon.value = $$QMAKE_ASSET_CATALOGS_APP_ICON
QMAKE_MAC_XCODE_SETTINGS += asset_catalog_appicon
}

asset_catalog_compiler.files = $$QMAKE_ASSET_CATALOGS
macos: asset_catalog_compiler.path = Contents/Resources
QMAKE_BUNDLE_DATA += asset_catalog_compiler
} else {
!isEmpty(QMAKE_ASSET_CATALOGS_APP_ICON) {
asset_catalog_app_icon_arg = \
--app-icon $$shell_quote($$QMAKE_ASSET_CATALOGS_APP_ICON)
}

asset_catalog_compiler.target = $$OUT_PWD/asset_catalog_compiler.Info.plist
asset_catalog_compiler.commands = $$shell_quote($$QMAKE_ACTOOL) \
$$asset_catalog_app_icon_arg \
--output-partial-info-plist $$shell_quote($$asset_catalog_compiler.target) \
--platform $${version_identifier} \
--minimum-deployment-target $${deployment_target} \
--compile $$shell_quote($$QMAKE_ASSET_CATALOGS_BUILD_PATH)

for (catalog, QMAKE_ASSET_CATALOGS) {
asset_catalog_compiler.commands += $${catalog}
asset_catalog_compiler.depends += $$files($$catalog/*, true)
}

actool_output_files = $$system(\
mkdir -p $$system_quote($$QMAKE_ASSET_CATALOGS_BUILD_PATH) && \
/usr/libexec/PlistBuddy -c \'Print :com.apple.actool.compilation-results:output-files\' \
/dev/stdin <<< $($${asset_catalog_compiler.commands} 2>/dev/null) | grep \'^ .*$\', lines)

for (output_file, actool_output_files) {
!equals(output_file, $$asset_catalog_compiler.target): \
actool_output_files_rel += $$relative_path($$output_file, $$QMAKE_ASSET_CATALOGS_BUILD_PATH)
}

QMAKE_EXTRA_TARGETS += asset_catalog_compiler
PRE_TARGETDEPS += $$asset_catalog_compiler.target

isEmpty(QMAKE_ASSET_CATALOGS_INSTALL_PATH) {
!isEmpty(target.path): \
QMAKE_ASSET_CATALOGS_INSTALL_PATH = $${target.path}/
QMAKE_ASSET_CATALOGS_INSTALL_PATH = $${QMAKE_ASSET_CATALOGS_INSTALL_PATH}$$relative_path(\
$$QMAKE_ASSET_CATALOGS_BUILD_PATH, $$absolute_path($$DESTDIR, $$OUT_PWD))
}

for (ac_install_file, actool_output_files_rel) {
asset_catalogs_files.files += \
$$QMAKE_ASSET_CATALOGS_BUILD_PATH/$$ac_install_file
}
contains(INSTALLS, target): asset_catalogs_files.depends += install_target
asset_catalogs_files.path = $$QMAKE_ASSET_CATALOGS_INSTALL_PATH
asset_catalogs_files.CONFIG += no_check_exist
INSTALLS += asset_catalogs_files
}
} else: macx-xcode {
# Backwards compatibility
for (bundle_data, QMAKE_BUNDLE_DATA) {
for (bundle_file, $${bundle_data}.files) {
!contains(bundle_file, .*\.xcassets$): next()
warning("*.xcassets in QMAKE_BUNDLE_DATA is deprecated. Use QMAKE_ASSET_CATALOGS instead.")
!exists($$absolute_path($$bundle_file/AppIcon.appiconset, $$_PRO_FILE_PWD_)): next()

asset_catalog_appicon.name = "ASSETCATALOG_COMPILER_APPICON_NAME"
asset_catalog_appicon.value = "AppIcon"
QMAKE_MAC_XCODE_SETTINGS += asset_catalog_appicon
break()
}
!isEmpty(asset_catalog_appicon.name): break()
}
}
4 changes: 3 additions & 1 deletion mkspecs/features/mac/default_pre.prf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONFIG = sdk rez $$CONFIG
CONFIG = asset_catalogs sdk rez $$CONFIG
load(default_pre)

isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
Expand Down Expand Up @@ -33,6 +33,8 @@ isEmpty(QMAKE_TARGET_BUNDLE_PREFIX) {
cache(QMAKE_TARGET_BUNDLE_PREFIX)
}

QMAKE_ASSET_CATALOGS_APP_ICON = AppIcon

# Make the default debug info format for static debug builds
# DWARF instead of DWARF with dSYM. This cuts down build times
# for application debug builds significantly, as Xcode doesn't
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/mac/sdk.prf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ QMAKE_INCDIR_OPENGL = $$sysrootified
QMAKESPEC_NAME = $$basename(QMAKESPEC)

# Resolve SDK version of various tools
for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB)) {
for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_ACTOOL)) {
tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool}
!isEmpty($$tool_variable) {
$$tool = $$eval($$tool_variable)
Expand Down
4 changes: 0 additions & 4 deletions mkspecs/features/qpa/genericunixfontdatabase.prf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@ CONFIG += qpa/basicunixfontdatabase
qtConfig(fontconfig) {
DEFINES += Q_FONTCONFIGDATABASE
QMAKE_USE_PRIVATE += fontconfig/linkonly
} else:!android {
fonts.path = $$[QT_INSTALL_LIBS]/fonts
fonts.files = $$QT_SOURCE_TREE/lib/fonts/*
INSTALLS += fonts
}

15 changes: 0 additions & 15 deletions mkspecs/features/uikit/default_post.prf
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,6 @@ macx-xcode {
QMAKE_MAC_XCODE_SETTINGS += device_family

ios {
# If QMAKE_BUNDLE_DATA contains an asset catalog that includes an
# AppIcon.appiconset, we configure Xcode to use it for app icons.
for(bundle_data, QMAKE_BUNDLE_DATA) {
for(bundle_file, $${bundle_data}.files) {
!contains(bundle_file, .*\.xcassets$): next()
!exists($$absolute_path($$bundle_file/AppIcon.appiconset, $$_PRO_FILE_PWD_)): next()

asset_catalog_appicon.name = "ASSETCATALOG_COMPILER_APPICON_NAME"
asset_catalog_appicon.value = "AppIcon"
QMAKE_MAC_XCODE_SETTINGS += asset_catalog_appicon
break()
}
!isEmpty(asset_catalog_appicon.name): break()
}

# Set up default 4-inch iPhone/iPod launch image so that our apps
# support the full screen resolution of those devices.
qmake_launch_image = [email protected]
Expand Down
8 changes: 7 additions & 1 deletion mkspecs/features/uikit/resolve_config.prf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ xcodebuild {

load(resolve_config)

!macx-xcode:xcodebuild: addExclusiveBuilds(simulator, device)
!macx-xcode:xcodebuild {
# Switch the order to make sure that the first Makefile target is the right one
!qtConfig(simulator_and_device):contains(QMAKE_MAC_SDK, ^$${simulator.sdk}.*): \
addExclusiveBuilds(simulator, device)
else: \
addExclusiveBuilds(device, simulator)
}
1 change: 1 addition & 0 deletions mkspecs/win32-g++/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
Expand Down
4 changes: 3 additions & 1 deletion qmake/library/qmakebuiltins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,9 @@ QByteArray QMakeEvaluator::getCommandOutput(const QString &args, int *exitCode)
if (!errout.isEmpty()) {
if (errout.endsWith('\n'))
errout.chop(1);
m_handler->message(QMakeHandler::EvalError, QString::fromLocal8Bit(errout));
m_handler->message(
QMakeHandler::EvalError | (m_cumulative ? QMakeHandler::CumulativeEvalMessage : 0),
QString::fromLocal8Bit(errout));
}
# endif
out = proc.readAllStandardOutput();
Expand Down
2 changes: 1 addition & 1 deletion qmake/library/qmakeevaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2037,7 +2037,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFileInto(
void QMakeEvaluator::message(int type, const QString &msg) const
{
if (!m_skipLevel)
m_handler->message(type, msg,
m_handler->message(type | (m_cumulative ? QMakeHandler::CumulativeEvalMessage : 0), msg,
m_current.line ? m_current.pro->fileName() : QString(),
m_current.line != 0xffff ? m_current.line : -1);
}
Expand Down
1 change: 1 addition & 0 deletions qmake/library/qmakevfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ bool QMakeVfs::writeFile(const QString &fn, QIODevice::OpenMode mode, bool exe,
else
*cont = contents;
Q_UNUSED(errStr)
Q_UNUSED(exe)
return true;
#else
QFileInfo qfi(fn);
Expand Down
6 changes: 1 addition & 5 deletions qtbase.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

load(qt_parts)

SUBDIRS += qmake/qmake-aux.pro
SUBDIRS += qmake/qmake-aux.pro doc

cross_compile: CONFIG += nostrip

Expand Down Expand Up @@ -84,10 +84,6 @@ mkspecs.files = \
mkspecs.files -= $$PWD/mkspecs/modules $$PWD/mkspecs/modules-inst
INSTALLS += mkspecs

global_docs.files = $$PWD/doc/global
global_docs.path = $$[QT_INSTALL_DOCS]
INSTALLS += global_docs

OTHER_FILES += \
configure \
header.BSD \
Expand Down
4 changes: 2 additions & 2 deletions src/3rdparty/atspi2/xml/Cache.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

<signal name="AddAccessible">
<arg name="nodeAdded" type="((so)(so)a(so)assusau)"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiAccessibleCacheItem"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAccessibleCacheItem"/>
</signal>

<signal name="RemoveAccessible">
<arg name="nodeRemoved" type="(so)"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
</signal>

</interface>
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/global/qglobal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3441,7 +3441,7 @@ Q_GLOBAL_STATIC(AndroidRandomStorage, randomTLS)
pseudo random integers to be returned by qrand().
The sequence of random numbers generated is deterministic per thread. For example,
if two threads call qsrand(1) and subsequently calls qrand(), the threads will get
if two threads call qsrand(1) and subsequently call qrand(), the threads will get
the same random number sequence.
\sa qrand()
Expand Down
13 changes: 1 addition & 12 deletions src/corelib/global/qnamespace.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -1761,17 +1761,6 @@
\value Key_Zoom
\value Key_Exit
\value Key_Cancel
\value Key_MicVolumeUp
\value Key_Find
\value Key_Open
\value Key_MicVolumeDown
\value Key_New
\value Key_Settings
\value Key_Redo
\value Key_Exit
\value Key_Info
\value Key_Undo
\value Key_Guide

\sa QKeyEvent::key()
*/
Expand Down Expand Up @@ -2300,7 +2289,7 @@
\enum Qt::ItemSelectionMode

This enum is used in QGraphicsItem, QGraphicsScene and QGraphicsView to
specify how items are selected, or how to determine if a shapes and items
specify how items are selected, or how to determine if shapes and items
collide.

\value ContainsItemShape The output list contains only items whose
Expand Down
19 changes: 10 additions & 9 deletions src/corelib/io/qiodevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ static void checkWarnMessage(const QIODevice *device, const char *function, cons
} \
} while (0)

#define CHECK_MAXBYTEARRAYSIZE(function) \
do { \
if (maxSize >= MaxByteArraySize) { \
checkWarnMessage(this, #function, "maxSize argument exceeds QByteArray size limit"); \
maxSize = MaxByteArraySize - 1; \
} \
} while (0)

#define CHECK_WRITABLE(function, returnType) \
do { \
if ((d->openMode & WriteOnly) == 0) { \
Expand Down Expand Up @@ -1178,10 +1186,7 @@ QByteArray QIODevice::read(qint64 maxSize)
}

CHECK_MAXLEN(read, result);
if (maxSize >= MaxByteArraySize) {
checkWarnMessage(this, "read", "maxSize argument exceeds QByteArray size limit");
maxSize = MaxByteArraySize - 1;
}
CHECK_MAXBYTEARRAYSIZE(read);

result.resize(int(maxSize));
qint64 readBytes = read(result.data(), result.size());
Expand Down Expand Up @@ -1402,17 +1407,13 @@ QByteArray QIODevice::readLine(qint64 maxSize)
QByteArray result;

CHECK_MAXLEN(readLine, result);
CHECK_MAXBYTEARRAYSIZE(readLine);

#if defined QIODEVICE_DEBUG
printf("%p QIODevice::readLine(%lld), d->pos = %lld, d->buffer.size() = %lld\n",
this, maxSize, d->pos, d->buffer.size());
#endif

if (maxSize >= MaxByteArraySize) {
qWarning("QIODevice::read: maxSize argument exceeds QByteArray size limit");
maxSize = MaxByteArraySize - 1;
}

result.resize(int(maxSize));
qint64 readBytes = 0;
if (!result.size()) {
Expand Down
8 changes: 4 additions & 4 deletions src/corelib/kernel/qfunctions_winrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,15 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr<T> &asyncOp, Awai
t.start();
switch (awaitStyle) {
case ProcessMainThreadEvents:
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == Started) {
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
QCoreApplication::processEvents();
if (timeout && t.hasExpired(timeout))
return ERROR_TIMEOUT;
}
break;
case ProcessThreadEvents:
if (QAbstractEventDispatcher *dispatcher = QThread::currentThread()->eventDispatcher()) {
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == Started) {
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
dispatcher->processEvents(QEventLoop::AllEvents);
if (timeout && t.hasExpired(timeout))
return ERROR_TIMEOUT;
Expand All @@ -198,15 +198,15 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr<T> &asyncOp, Awai
// fall through
default:
case YieldThread:
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == Started) {
while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
QThread::yieldCurrentThread();
if (timeout && t.hasExpired(timeout))
return ERROR_TIMEOUT;
}
break;
}

if (FAILED(hr) || status != Completed) {
if (FAILED(hr) || status != AsyncStatus::Completed) {
HRESULT ec;
hr = asyncInfo->get_ErrorCode(&ec);
if (FAILED(hr))
Expand Down
2 changes: 1 addition & 1 deletion src/corelib/tools/qlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ void **QListData::erase(void **xi)
application must interface with a C API.
\note Iterators into a QLinkedList and references into
heap-allocating QLists remain valid long as the referenced items
heap-allocating QLists remain valid as long as the referenced items
remain in the container. This is not true for iterators and
references into a QVector and non-heap-allocating QLists.
Expand Down
Loading

0 comments on commit ef25620

Please sign in to comment.