summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-09-11 09:35:52 +0200
committerLiang Qi <liang.qi@qt.io>2018-09-11 09:35:52 +0200
commit474af549e4fc8a662031ec87880a1ecb97da2154 (patch)
treebf9f734631189f771ff92a1215d6bda1978d61d0 /src
parent341d55b7cdf8bbb5a045ab21ac1396d1ea766344 (diff)
parentff440191de244307c968b251faee4122267d3094 (diff)
Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts: src/macdeployqt/shared/shared.h src/qdoc/sections.cpp Change-Id: I708a20d0061e82b99ecced7d24e7a2b8c475f706
Diffstat (limited to 'src')
-rw-r--r--src/designer/src/components/propertyeditor/designerpropertymanager.cpp1
-rw-r--r--src/linguist/shared/qmakebuiltins.cpp17
-rw-r--r--src/macdeployqt/shared/shared.cpp45
-rw-r--r--src/macdeployqt/shared/shared.h2
-rw-r--r--src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc26
-rw-r--r--src/qdoc/generator.cpp3
-rw-r--r--src/qdoc/node.cpp3
-rw-r--r--src/qdoc/sections.cpp2
8 files changed, 70 insertions, 29 deletions
diff --git a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
index 2027481e8..848ac8946 100644
--- a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
+++ b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
@@ -895,6 +895,7 @@ DesignerPropertyManager::DesignerPropertyManager(QDesignerFormEditorInterface *c
QtVariantPropertyManager(parent),
m_changingSubValue(false),
m_core(core),
+ m_object(nullptr),
m_sourceOfChange(0)
{
connect(this, &QtVariantPropertyManager::valueChanged,
diff --git a/src/linguist/shared/qmakebuiltins.cpp b/src/linguist/shared/qmakebuiltins.cpp
index dde02544d..107c5446a 100644
--- a/src/linguist/shared/qmakebuiltins.cpp
+++ b/src/linguist/shared/qmakebuiltins.cpp
@@ -51,6 +51,7 @@
#ifdef PROEVALUATOR_THREAD_SAFE
# include <qthreadpool.h>
#endif
+#include <qversionnumber.h>
#include <algorithm>
@@ -98,6 +99,7 @@ enum ExpandFunc {
enum TestFunc {
T_INVALID = 0, T_REQUIRES, T_GREATERTHAN, T_LESSTHAN, T_EQUALS,
+ T_VERSION_AT_LEAST, T_VERSION_AT_MOST,
T_EXISTS, T_EXPORT, T_CLEAR, T_UNSET, T_EVAL, T_CONFIG, T_SYSTEM,
T_DEFINED, T_DISCARD_FROM, T_CONTAINS, T_INFILE,
T_COUNT, T_ISEMPTY, T_PARSE_JSON, T_INCLUDE, T_LOAD, T_DEBUG, T_LOG, T_MESSAGE, T_WARNING, T_ERROR, T_IF,
@@ -171,6 +173,8 @@ void QMakeEvaluator::initFunctionStatics()
{ "lessThan", T_LESSTHAN },
{ "equals", T_EQUALS },
{ "isEqual", T_EQUALS },
+ { "versionAtLeast", T_VERSION_AT_LEAST },
+ { "versionAtMost", T_VERSION_AT_MOST },
{ "exists", T_EXISTS },
{ "export", T_EXPORT },
{ "clear", T_CLEAR },
@@ -1498,6 +1502,19 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
}
return returnBool(values(map(args.at(0))).join(statics.field_sep)
== args.at(1).toQString(m_tmp1));
+ case T_VERSION_AT_LEAST:
+ case T_VERSION_AT_MOST: {
+ if (args.count() != 2) {
+ evalError(fL1S("%1(variable, versionNumber) requires two arguments.")
+ .arg(function.toQString(m_tmp1)));
+ return ReturnFalse;
+ }
+ const QVersionNumber lvn = QVersionNumber::fromString(values(args.at(0).toKey()).join(QLatin1Char('.')));
+ const QVersionNumber rvn = QVersionNumber::fromString(args.at(1).toQString());
+ if (func_t == T_VERSION_AT_LEAST)
+ return returnBool(lvn >= rvn);
+ return returnBool(lvn <= rvn);
+ }
case T_CLEAR: {
if (args.count() != 1) {
evalError(fL1S("%1(variable) requires one argument.")
diff --git a/src/macdeployqt/shared/shared.cpp b/src/macdeployqt/shared/shared.cpp
index c01d0c896..33d29ecc2 100644
--- a/src/macdeployqt/shared/shared.cpp
+++ b/src/macdeployqt/shared/shared.cpp
@@ -496,7 +496,7 @@ QString resolveDyldPrefix(const QString &path, const QString &loaderPath, const
return QDir::cleanPath(QDir::currentPath() + "/" +
QFileInfo(executablePath).path() + path.mid(QStringLiteral("@executable_path").length()));
}
- } else if (path.startsWith(QStringLiteral("@loader_path/"))) {
+ } else if (path.startsWith(QStringLiteral("@loader_path"))) {
// path relative to loader dir
if (QDir::isAbsolutePath(loaderPath)) {
return QDir::cleanPath(QFileInfo(loaderPath).path() + path.mid(QStringLiteral("@loader_path").length()));
@@ -909,6 +909,19 @@ void stripAppBinary(const QString &bundlePath)
runStrip(findAppBinary(bundlePath));
}
+bool DeploymentInfo::containsModule(const QString &module, const QString &libInFix) const
+{
+ // Check for framework first
+ if (deployedFrameworks.contains(QLatin1String("Qt") + module + libInFix +
+ QLatin1String(".framework"))) {
+ return true;
+ }
+ // Check for dylib
+ const QRegularExpression dylibRegExp(QLatin1String("libQt[0-9]+") + module +
+ libInFix + QLatin1String(".[0-9]+.dylib"));
+ return deployedFrameworks.filter(dylibRegExp).size() > 0;
+}
+
/*
Deploys the the listed frameworks listed into an app bundle.
The frameworks are searched for dependencies, which are also deployed.
@@ -1016,7 +1029,7 @@ QString getLibInfix(const QStringList &deployedFrameworks)
{
QString libInfix;
foreach (const QString &framework, deployedFrameworks) {
- if (framework.startsWith(QStringLiteral("QtCore"))) {
+ if (framework.startsWith(QStringLiteral("QtCore")) && framework.endsWith(QStringLiteral(".framework"))) {
Q_ASSERT(framework.length() >= 16);
// 16 == "QtCore" + ".framework"
const int lengthOfLibInfix = framework.length() - 16;
@@ -1066,14 +1079,14 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl
addPlugins(QStringLiteral("styles"));
// Check if Qt was configured with -libinfix
- const QString libInfixWithFramework = getLibInfix(deploymentInfo.deployedFrameworks) + QStringLiteral(".framework");
+ const QString libInfix = getLibInfix(deploymentInfo.deployedFrameworks);
// Network
- if (deploymentInfo.deployedFrameworks.contains(QStringLiteral("QtNetwork") + libInfixWithFramework))
+ if (deploymentInfo.containsModule("Network", libInfix))
addPlugins(QStringLiteral("bearer"));
- // All image formats (svg if QtSvg.framework is used)
- const bool usesSvg = deploymentInfo.deployedFrameworks.contains(QStringLiteral("QtSvg") + libInfixWithFramework);
+ // All image formats (svg if QtSvg is used)
+ const bool usesSvg = deploymentInfo.containsModule("Svg", libInfix);
addPlugins(QStringLiteral("imageformats"), [usesSvg](const QString &lib) {
if (lib.contains(QStringLiteral("qsvg")) && !usesSvg)
return false;
@@ -1082,8 +1095,8 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl
addPlugins(QStringLiteral("iconengines"));
- // Sql plugins if QtSql.framework is in use
- if (deploymentInfo.deployedFrameworks.contains(QStringLiteral("QtSql") + libInfixWithFramework)) {
+ // Sql plugins if QtSql is in use
+ if (deploymentInfo.containsModule("Sql", libInfix)) {
addPlugins(QStringLiteral("sqldrivers"), [](const QString &lib) {
if (lib.startsWith(QStringLiteral("libqsqlodbc")) || lib.startsWith(QStringLiteral("libqsqlpsql"))) {
LogWarning() << "Plugin" << lib << "uses private API and is not Mac App store compliant.";
@@ -1096,8 +1109,8 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl
});
}
- // WebView plugins if QtWebView.framework is in use
- if (deploymentInfo.deployedFrameworks.contains(QStringLiteral("QtWebView") + libInfixWithFramework)) {
+ // WebView plugins if QtWebView is in use
+ if (deploymentInfo.containsModule("WebView", libInfix)) {
addPlugins(QStringLiteral("webview"), [](const QString &lib) {
if (lib.startsWith(QStringLiteral("libqtwebview_webengine"))) {
LogWarning() << "Plugin" << lib << "uses QtWebEngine and is not Mac App store compliant.";
@@ -1111,15 +1124,15 @@ void deployPlugins(const ApplicationBundleInfo &appBundleInfo, const QString &pl
}
static const std::map<QString, std::vector<QString>> map {
- {QStringLiteral("QtMultimedia"), {QStringLiteral("mediaservice"), QStringLiteral("audio")}},
- {QStringLiteral("Qt3DRender"), {QStringLiteral("sceneparsers"), QStringLiteral("geometryloaders")}},
- {QStringLiteral("Qt3DQuickRender"), {QStringLiteral("renderplugins")}},
- {QStringLiteral("QtPositioning"), {QStringLiteral("position")}},
- {QStringLiteral("QtLocation"), {QStringLiteral("geoservices")}}
+ {QStringLiteral("Multimedia"), {QStringLiteral("mediaservice"), QStringLiteral("audio")}},
+ {QStringLiteral("3DRender"), {QStringLiteral("sceneparsers"), QStringLiteral("geometryloaders")}},
+ {QStringLiteral("3DQuickRender"), {QStringLiteral("renderplugins")}},
+ {QStringLiteral("Positioning"), {QStringLiteral("position")}},
+ {QStringLiteral("Location"), {QStringLiteral("geoservices")}}
};
for (const auto &it : map) {
- if (deploymentInfo.deployedFrameworks.contains(it.first + libInfixWithFramework)) {
+ if (deploymentInfo.containsModule(it.first, libInfix)) {
for (const auto &pluginType : it.second) {
addPlugins(pluginType);
}
diff --git a/src/macdeployqt/shared/shared.h b/src/macdeployqt/shared/shared.h
index 587ca0fc0..588b5dd62 100644
--- a/src/macdeployqt/shared/shared.h
+++ b/src/macdeployqt/shared/shared.h
@@ -105,6 +105,8 @@ public:
bool useLoaderPath;
bool isFramework;
bool isDebug;
+
+ bool containsModule(const QString &module, const QString &libInFix) const;
};
inline QDebug operator<<(QDebug debug, const ApplicationBundleInfo &info);
diff --git a/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc b/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc
index 3ebd0c8de..71c8c81f3 100644
--- a/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc
+++ b/src/qdoc/doc/qdoc-guide/qdoc-guide.qdoc
@@ -27,7 +27,7 @@
/*!
\page qdoc-guide.html
\title Getting Started with QDoc
- \nextpage Installing clang for QDoc
+ \nextpage Installing Clang for QDoc
Qt uses QDoc to generate its documentation set into HTML and DITA XML
formats. QDoc uses a set of configuration files to generate documentation
@@ -44,9 +44,9 @@
\li \c Documentation in \c C++, \c QML, and \c .qdoc files
\endlist
- \note From Qt 5.11, \l{QDoc Manual}{QDoc} requires \l{http://clang.llvm.org}{clang}
- from LLVM 3.9 for parsing C++ header and source files, and for parsing the function
- signatures in \l {fn-command} {\\fn} commands. See \l {Installing clang for QDoc}
+ \note From Qt 5.11, \l{QDoc Manual}{QDoc} requires \l{http://clang.llvm.org}{Clang}
+ for parsing C++ header and source files, and for parsing the function
+ signatures in \l {fn-command} {\\fn} commands. See \l {Installing Clang for QDoc}
for details.
This section intends to cover the basic necessities for creating a
@@ -60,7 +60,7 @@
\section1 Chapters
\list 1
- \li \l{Installing clang for QDoc}
+ \li \l{Installing Clang for QDoc}
\li \l{Creating QDoc Configuration Files}
\li \l{Writing Documentation}
\li \l{Categories of Documentation}
@@ -76,7 +76,7 @@
/*!
\page qdoc-guide-conf.html
\title Creating QDoc Configuration Files
- \previouspage Installing clang for QDoc
+ \previouspage Installing Clang for QDoc
\nextpage Writing Documentation
To generate documentation, QDoc uses configuration files, with the
\c qdocconf extension, to store configuration settings.
@@ -628,7 +628,7 @@
/*!
\page qdoc-guide-clang.html
- \title Installing clang for QDoc
+ \title Installing Clang for QDoc
\previouspage Getting Started with QDoc
\nextpage Creating QDoc Configuration Files
@@ -636,15 +636,21 @@
apply:
\list 1
- \li Install \l{http://clang.llvm.org}{LLVM 3.9} or greater.
+ \li Install \l{http://clang.llvm.org}{LLVM 6.0} or greater.
The pre-built binaries needed can be found
\l {http://releases.llvm.org/download.html}{here}.
\li Set the environment variable \c LLVM_INSTALL_DIR to point to the
directory where LLVM is installed. This should be the top level
- directory. For example, on a Linux system with LLVM installed to
- \c /usr/llvm:
+ directory. For example, on a Linux or macOS system with LLVM
+ installed to \c /usr/llvm:
\badcode
$ export LLVM_INSTALL_DIR=/usr/llvm
\endcode
+
+ On a Windows system with LLVM installed to \c
+ {C:\Program Files\LLVM}:
+ \badcode
+ C:\> setx LLVM_INSTALL_DIR "C:\Program Files\LLVM"
+ \endcode
\endlist
*/
diff --git a/src/qdoc/generator.cpp b/src/qdoc/generator.cpp
index 0b586d4d9..58d882671 100644
--- a/src/qdoc/generator.cpp
+++ b/src/qdoc/generator.cpp
@@ -1025,7 +1025,8 @@ void Generator::generateFileList(const DocumentNode* dn,
QStringList(),
exampleDirs,
file,
- exampleImgExts);
+ exampleImgExts,
+ &userFriendlyFilePath);
outFileNames_ << prefix.mid(1) + userFriendlyFilePath;
userFriendlyFilePath.truncate(userFriendlyFilePath.lastIndexOf('/'));
QString imgOutDir = outDir_ + prefix + userFriendlyFilePath;
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
index 5207be7e3..e23b10d57 100644
--- a/src/qdoc/node.cpp
+++ b/src/qdoc/node.cpp
@@ -850,7 +850,8 @@ Node *Aggregate::findChildNode(const QString& name, Node::Genus genus, int findF
&& !node->isQmlType()
&& !node->isQmlBasicType()
&& !node->isJsType()
- && !node->isJsBasicType())
+ && !node->isJsBasicType()
+ && !node->isEnumType())
continue;
}
return node;
diff --git a/src/qdoc/sections.cpp b/src/qdoc/sections.cpp
index 9d63cbdf7..d9bfb624a 100644
--- a/src/qdoc/sections.cpp
+++ b/src/qdoc/sections.cpp
@@ -179,7 +179,7 @@ void Section::insert(Node *node)
}
}
- if (node->isPrivate()) {
+ if (node->isPrivate() || node->isInternal()) {
irrelevant = true;
}
else if (node->isFunction()) {