Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.9' into dev
Browse files Browse the repository at this point in the history
Conflicts:
	src/corelib/io/qfilesystemengine_win.cpp
	src/gui/text/qdistancefield.cpp
	src/plugins/platforms/xcb/qxcbconnection.h

Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
  • Loading branch information
liangqi committed Mar 20, 2017
2 parents 8066ae4 + c1a2f97 commit ae26955
Show file tree
Hide file tree
Showing 232 changed files with 1,624 additions and 1,046 deletions.
52 changes: 0 additions & 52 deletions config.tests/x11/xrender/xrender.cpp

This file was deleted.

3 changes: 0 additions & 3 deletions config.tests/x11/xrender/xrender.pro

This file was deleted.

2 changes: 1 addition & 1 deletion configure.pri
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ defineTest(qtConfOutput_preparePaths) {
!equals(QT_SOURCE_TREE, $$QT_BUILD_TREE): \
cont += \
"[EffectiveSourcePaths]" \
"Prefix=$$QT_SOURCE_TREE"
"Prefix=$$[QT_INSTALL_PREFIX/src]"
write_file($$QT_BUILD_TREE/bin/qt.conf, cont)|error()
reload_properties()

Expand Down
14 changes: 14 additions & 0 deletions doc/global/macros.qdocconf
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,17 @@ macro.beginfloatright.HTML = "<div style=\"float: right; margin-left: 2em\">"
macro.endfloat.HTML = "</div>"
macro.clearfloat.HTML = "<br style=\"clear: both\" />"
macro.emptyspan.HTML = "<span></span>"

# Embed YouTube content by video ID - Example: \youtube dQw4w9WgXcQ
# Also requires a <ID>.jpg thumbnail for offline docs. In .qdocconf, add:
#
# HTML.extraimages += images/dQw4w9WgXcQ.jpg
# qhp.ProjectName.extraFiles += images/dQw4w9WgXcQ.jpg
#
macro.youtube.HTML = "<div class=\"video\">\n<span class=\"vspan\"></span>\n" \
"<iframe src=\"https://www.youtube.com/embed/\1\"" \
"frameborder=\"0\" allowfullscreen>\n" \
"<a href=\"https://www.youtube.com/watch/?v=\1\">\n"\
"<img src=\"images/\1.jpg\"" \
"title=\"Click to play in a browser\" /></a>\n" \
"</iframe></div>\n"
4 changes: 4 additions & 0 deletions doc/global/template/style/offline-simple.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,7 @@ td#buildversion {
.footer p {
margin: 0px;
}

.video {
margin: 15px 0 0 15px;
}
20 changes: 20 additions & 0 deletions doc/global/template/style/offline.css
Original file line number Diff line number Diff line change
Expand Up @@ -780,3 +780,23 @@ div.multi-column div {
margin-right: 4em;
width: 24em;
}

.mainContent .video {
width:40%;
max-width:640px;
margin: 15px 0 0 15px;
position:relative;
display:table
}

.mainContent .video > .vspan {
padding-top:60%;
display:block
}
.mainContent .video iframe {
width:100%;
height:100%;
position:absolute;
top:0;
left:0
}
19 changes: 19 additions & 0 deletions doc/global/template/style/online.css
Original file line number Diff line number Diff line change
Expand Up @@ -1721,3 +1721,22 @@ a.qa-mark:target:before {
color: #ff0000;
}

.mainContent .video {
width:60%;
max-width:640px;
margin: 0.5em 0 1.5em 0.5em;
position:relative;
display:table
}

.mainContent .video > .vspan {
padding-top:60%;
display:block
}
.mainContent .video iframe {
width:100%;
height:100%;
position:absolute;
top:0;
left:0
}
2 changes: 1 addition & 1 deletion examples/sql/relationaltablemodel/relationaltablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ int main(int argc, char *argv[])

initializeModel(&model);

QTableView *view = createView(QObject::tr("Relational Table Model"), &model);
QScopedPointer<QTableView> view(createView(QObject::tr("Relational Table Model"), &model));
view->show();

return app.exec();
Expand Down
9 changes: 5 additions & 4 deletions examples/widgets/tools/treemodelcompleter/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,17 @@ QAbstractItemModel *MainWindow::modelFromFile(const QString& fileName)
if (line.isEmpty() || trimmedLine.isEmpty())
continue;

QRegExp re("^\\s+");
int nonws = re.indexIn(line);
QRegularExpression re("^\\s+");
QRegularExpressionMatch match = re.match(line);
int nonws = match.capturedStart();
int level = 0;
if (nonws == -1) {
level = 0;
} else {
if (line.startsWith("\t")) {
level = re.cap(0).length();
level = match.capturedLength();
} else {
level = re.cap(0).length()/4;
level = match.capturedLength()/4;
}
}

Expand Down
5 changes: 5 additions & 0 deletions mkspecs/features/mac/default_post.prf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ qt {
equals(TEMPLATE, lib):!plugin:lib_bundle: QMAKE_RPATHDIR += @loader_path/Frameworks
}

# Don't pass -headerpad_max_install_names when using Bitcode.
# In that case the linker emits a warning stating that the flag is ignored when
# used with bitcode, for reasons that cannot be determined (rdar://problem/20748962).
# Using this flag is also unnecessary in practice on UIKit platforms since they
# are sandboxed, and only UIKit platforms support bitcode to begin with.
!bitcode: QMAKE_LFLAGS += $$QMAKE_LFLAGS_HEADERPAD

app_extension_api_only {
Expand Down
29 changes: 14 additions & 15 deletions mkspecs/features/qt_configure.prf
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ defineTest(qtConfValidateValue) {
defineTest(qtConfCommandline_string) {
opt = $${1}
val = $${2}
isEmpty(val): val = $$qtConfGetNextCommandlineArg()
nextok = $${3}
isEmpty(val):$$nextok: val = $$qtConfGetNextCommandlineArg()

# Note: Arguments which are variable assignments are legit here.
contains(val, "^-.*")|isEmpty(val) {
Expand All @@ -142,9 +143,10 @@ defineTest(qtConfCommandline_string) {
defineTest(qtConfCommandline_optionalString) {
opt = $${1}
val = $${2}
nextok = $${3}
isEmpty(val) {
v = $$qtConfPeekNextCommandlineArg()
contains(v, "^-.*|[A-Z_]+=.*")|isEmpty(v): \
$$nextok: val = $$qtConfPeekNextCommandlineArg()
contains(val, "^-.*|[A-Z_]+=.*")|isEmpty(val): \
val = "yes"
else: \
val = $$qtConfGetNextCommandlineArg()
Expand All @@ -160,7 +162,8 @@ defineTest(qtConfCommandline_optionalString) {
defineTest(qtConfCommandline_addString) {
opt = $${1}
val = $${2}
isEmpty(val): val = $$qtConfGetNextCommandlineArg()
nextok = $${3}
isEmpty(val):$$nextok: val = $$qtConfGetNextCommandlineArg()

# Note: Arguments which are variable assignments are legit here.
contains(val, "^-.*")|isEmpty(val) {
Expand Down Expand Up @@ -236,6 +239,7 @@ defineTest(qtConfParseCommandLine) {
}

# parse out opt and val
nextok = false
contains(c, "^--?enable-(.*)") {
opt = $$replace(c, "^--?enable-(.*)", "\\1")
val = yes
Expand All @@ -247,10 +251,11 @@ defineTest(qtConfParseCommandLine) {
val = $$replace(c, "^--([^=]+)=(.*)", "\\2")
} else: contains(c, "^--(.*)") {
opt = $$replace(c, "^--(.*)", "\\1")
val = yes
val =
} else: contains(c, "^-(.*)") {
opt = $$replace(c, "^-(.*)", "\\1")
val =
nextok = true
for (cc, allConfigs) {
type = $$eval($${cc}.commandline.options.$${opt})
!isEmpty(type): break()
Expand All @@ -277,6 +282,7 @@ defineTest(qtConfParseCommandLine) {
contains(c, $$e) {
opt = $$eval($${cc}.commandline.prefix.$${p})
val = $$replace(c, $$e, "\\1")
nextok = true
type = "addString"
break()
}
Expand Down Expand Up @@ -315,7 +321,7 @@ defineTest(qtConfParseCommandLine) {
error("Command line option '$$c' has unknown type '$$type'.")

# now that we have opt and value, process it
$${call}($$opt, $$val)
$${call}($$opt, $$val, $$nextok)
}
}

Expand Down Expand Up @@ -1743,10 +1749,6 @@ defineTest(qtConfProcessOneOutput) {
fpfx = $${currentConfig}.features.$${feature}
opfx = $${fpfx}.output.$${2}

condition = $$eval($${opfx}.condition)
!isEmpty(condition):!$$qtConfEvaluate($$condition): \
return()

call = $$eval($${opfx}.type)
isEmpty(call) {
# output is just a string, not an object
Expand All @@ -1755,11 +1757,8 @@ defineTest(qtConfProcessOneOutput) {
!defined("qtConfOutput_$$call", test): \
error("Undefined type '$$call' in output '$$2' of feature '$$feature'.")

condition = $$eval($${opfx}.condition)
!isEmpty(condition) {
!$$qtConfEvaluate($$condition): \
return(false)
}
!$$qtConfEvaluate($$eval($${opfx}.condition)): \
return()

$${opfx}.feature = $$feature
qtConfOutput_$${call}($$opfx, $$eval($${fpfx}.available))
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/qt_module_headers.prf
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ headersclean:!internal_module {
# Turn on some extra warnings not found in -Wall -Wextra.
# Common to GCC, Clang and ICC (and other compilers that masquerade as GCC):
hcleanFLAGS = -Wall -Wextra -Werror \
-Woverloaded-virtual -Wshadow -Wundef \
-Woverloaded-virtual -Wshadow -Wundef -Wfloat-equal \
-Wnon-virtual-dtor -Wpointer-arith -Wformat-security \
-Wno-long-long -Wno-variadic-macros -pedantic-errors

Expand Down
10 changes: 8 additions & 2 deletions mkspecs/features/uikit/bitcode.prf
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
lessThan(QMAKE_XCODE_VERSION, "7.0") {
warning("You need to update Xcode to version 7 or newer to support bitcode")
} else {
release:device {
} else: !macx-xcode {
# Simulator builds and all debug builds SHOULD use -fembed-bitcode-marker,
# but unfortunately the -fembed-bitcode and -fembed-bitcode-marker driver
# flags do not work in conjunction with -Xarch, so we'll have to let it use
# the "wrong" flags for now (note that this issue affects only the Makefile
# generator). We also don't want the flags to be passed in Xcode builds, as
# the Xcode ENABLE_BITCODE setting will take care of that for us.
release {
QMAKE_CFLAGS += -fembed-bitcode
QMAKE_CXXFLAGS += -fembed-bitcode
QMAKE_OBJECTIVE_CFLAGS += -fembed-bitcode
Expand Down
17 changes: 12 additions & 5 deletions qmake/generators/mac/pbuilder_pbx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,13 +1477,20 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)

QMap<QString, QString> settings;
if (!project->isActiveConfig("no_xcode_development_team")) {
const QList<QVariantMap> teams = provisioningTeams();
if (!teams.isEmpty()) {
// first suitable team we find is the one we'll use by default
settings.insert("DEVELOPMENT_TEAM",
teams.first().value(QLatin1String("teamID")).toString());
QString teamId;
if (!project->isEmpty("QMAKE_DEVELOPMENT_TEAM")) {
teamId = project->first("QMAKE_DEVELOPMENT_TEAM").toQString();
} else {
const QList<QVariantMap> teams = provisioningTeams();
if (!teams.isEmpty()) // first suitable team we find is the one we'll use by default
teamId = teams.first().value(QLatin1String("teamID")).toString();
}
if (!teamId.isEmpty())
settings.insert("DEVELOPMENT_TEAM", teamId);
if (!project->isEmpty("QMAKE_PROVISIONING_PROFILE"))
settings.insert("PROVISIONING_PROFILE_SPECIFIER", project->first("QMAKE_PROVISIONING_PROFILE").toQString());
}

settings.insert("COPY_PHASE_STRIP", (as_release ? "YES" : "NO"));
settings.insert("APPLICATION_EXTENSION_API_ONLY", project->isActiveConfig("app_extension_api_only") ? "YES" : "NO");
// required for tvOS (and watchos), optional on iOS (deployment target >= iOS 6.0)
Expand Down
7 changes: 6 additions & 1 deletion qmake/generators/win32/msvc_objectmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,12 @@ bool VCCLCompilerTool::parseOption(const char* option)
}
found = false; break;
case 'u':
UndefineAllPreprocessorDefinitions = _True;
if (!second)
UndefineAllPreprocessorDefinitions = _True;
else if (second == 't' && third == 'f' && fourth == '8')
AdditionalOptions += option;
else
found = false;
break;
case 'v':
if(second == 'd' || second == 'm') {
Expand Down
6 changes: 3 additions & 3 deletions qmake/library/qmakebuiltins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ QMakeEvaluator::writeFile(const QString &ctx, const QString &fn, QIODevice::Open
return ReturnTrue;
}

#ifndef QT_BOOTSTRAPPED
#if QT_CONFIG(process)
void QMakeEvaluator::runProcess(QProcess *proc, const QString &command) const
{
proc->setWorkingDirectory(currentDirectory());
Expand All @@ -491,7 +491,7 @@ void QMakeEvaluator::runProcess(QProcess *proc, const QString &command) const
QByteArray QMakeEvaluator::getCommandOutput(const QString &args, int *exitCode) const
{
QByteArray out;
#ifndef QT_BOOTSTRAPPED
#if QT_CONFIG(process)
QProcess proc;
runProcess(&proc, args);
*exitCode = (proc.exitStatus() == QProcess::NormalExit) ? proc.exitCode() : -1;
Expand Down Expand Up @@ -1712,7 +1712,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
#ifdef PROEVALUATOR_FULL
if (m_cumulative) // Anything else would be insanity
return ReturnFalse;
#ifndef QT_BOOTSTRAPPED
#if QT_CONFIG(process)
QProcess proc;
proc.setProcessChannelMode(QProcess::ForwardedChannels);
runProcess(&proc, args.at(0).toQString(m_tmp2));
Expand Down
4 changes: 2 additions & 2 deletions qmake/library/qmakeevaluator.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include <qstring.h>
#include <qstringlist.h>
#include <qshareddata.h>
#ifndef QT_BOOTSTRAPPED
#if QT_CONFIG(process)
# include <qprocess.h>
#else
# include <qiodevice.h>
Expand Down Expand Up @@ -237,7 +237,7 @@ class QMAKE_EXPORT QMakeEvaluator

VisitReturn writeFile(const QString &ctx, const QString &fn, QIODevice::OpenMode mode,
bool exe, const QString &contents);
#ifndef QT_BOOTSTRAPPED
#if QT_CONFIG(process)
void runProcess(QProcess *proc, const QString &command) const;
#endif
QByteArray getCommandOutput(const QString &args, int *exitCode) const;
Expand Down
Loading

0 comments on commit ae26955

Please sign in to comment.