qt5-tools qt kde patch
This commit is contained in:
@@ -0,0 +1,616 @@
|
||||
diff --git a/dist/changes-5.12.10 b/dist/changes-5.12.10
|
||||
new file mode 100644
|
||||
index 00000000..95c6a0b2
|
||||
--- /dev/null
|
||||
+++ b/dist/changes-5.12.10
|
||||
@@ -0,0 +1,26 @@
|
||||
+Qt 5.12.10 is a bug-fix release. It maintains both forward and backward
|
||||
+compatibility (source and binary) with Qt 5.12.9.
|
||||
+
|
||||
+For more details, refer to the online documentation included in this
|
||||
+distribution. The documentation is also available online:
|
||||
+
|
||||
+ https://doc.qt.io/qt-5.12/index.html
|
||||
+
|
||||
+The Qt version 5.12 series is binary compatible with the 5.11.x series.
|
||||
+Applications compiled for 5.11 will continue to run with 5.12.
|
||||
+
|
||||
+Some of the changes listed in this file include issue tracking numbers
|
||||
+corresponding to tasks in the Qt Bug Tracker:
|
||||
+
|
||||
+ https://bugreports.qt.io/
|
||||
+
|
||||
+Each of these identifiers can be entered in the bug tracker to obtain more
|
||||
+information about a particular change.
|
||||
+
|
||||
+****************************************************************************
|
||||
+* Important Behavior Changes *
|
||||
+****************************************************************************
|
||||
+
|
||||
+****************************************************************************
|
||||
+* Library *
|
||||
+****************************************************************************
|
||||
diff --git a/src/assistant/help/qhelpcollectionhandler.cpp b/src/assistant/help/qhelpcollectionhandler.cpp
|
||||
index 69782d45..d7b319d1 100644
|
||||
--- a/src/assistant/help/qhelpcollectionhandler.cpp
|
||||
+++ b/src/assistant/help/qhelpcollectionhandler.cpp
|
||||
@@ -2197,7 +2197,15 @@ bool QHelpCollectionHandler::registerIndexTable(const QHelpDBReader::IndexTable
|
||||
m_query->addBindValue(fileName);
|
||||
const QFileInfo fi(absoluteDocPath(fileName));
|
||||
m_query->addBindValue(fi.size());
|
||||
- m_query->addBindValue(fi.lastModified().toString(Qt::ISODate));
|
||||
+ QDateTime lastModified = fi.lastModified();
|
||||
+ if (qEnvironmentVariableIsSet("SOURCE_DATE_EPOCH")) {
|
||||
+ const QString sourceDateEpochStr = qEnvironmentVariable("SOURCE_DATE_EPOCH");
|
||||
+ bool ok;
|
||||
+ const qlonglong sourceDateEpoch = sourceDateEpochStr.toLongLong(&ok);
|
||||
+ if (ok && sourceDateEpoch < lastModified.toSecsSinceEpoch())
|
||||
+ lastModified.setSecsSinceEpoch(sourceDateEpoch);
|
||||
+ }
|
||||
+ m_query->addBindValue(lastModified.toString(Qt::ISODate));
|
||||
if (!m_query->exec())
|
||||
return false;
|
||||
|
||||
diff --git a/src/linguist/Qt5LinguistToolsMacros.cmake b/src/linguist/Qt5LinguistToolsMacros.cmake
|
||||
index ab271d56..20fb1493 100644
|
||||
--- a/src/linguist/Qt5LinguistToolsMacros.cmake
|
||||
+++ b/src/linguist/Qt5LinguistToolsMacros.cmake
|
||||
@@ -41,6 +41,17 @@ function(QT5_CREATE_TRANSLATION _qm_files)
|
||||
set(_lupdate_files ${_LUPDATE_UNPARSED_ARGUMENTS})
|
||||
set(_lupdate_options ${_LUPDATE_OPTIONS})
|
||||
|
||||
+ list(FIND _lupdate_options "-extensions" _extensions_index)
|
||||
+ if(_extensions_index GREATER -1)
|
||||
+ math(EXPR _extensions_index "${_extensions_index} + 1")
|
||||
+ list(GET _lupdate_options ${_extensions_index} _extensions_list)
|
||||
+ string(REPLACE "," ";" _extensions_list "${_extensions_list}")
|
||||
+ list(TRANSFORM _extensions_list STRIP)
|
||||
+ list(TRANSFORM _extensions_list REPLACE "^\." "")
|
||||
+ list(TRANSFORM _extensions_list PREPEND "*.")
|
||||
+ else()
|
||||
+ set(_extensions_list "*.java;*.jui;*.ui;*.c;*.c++;*.cc;*.cpp;*.cxx;*.ch;*.h;*.h++;*.hh;*.hpp;*.hxx;*.js;*.qs;*.qml;*.qrc")
|
||||
+ endif()
|
||||
set(_my_sources)
|
||||
set(_my_tsfiles)
|
||||
foreach(_file ${_lupdate_files})
|
||||
@@ -59,8 +70,16 @@ function(QT5_CREATE_TRANSLATION _qm_files)
|
||||
get_filename_component(_ts_name ${_ts_file} NAME)
|
||||
set(_ts_lst_file "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lst_file")
|
||||
set(_lst_file_srcs)
|
||||
+ set(_dependencies)
|
||||
foreach(_lst_file_src ${_my_sources})
|
||||
set(_lst_file_srcs "${_lst_file_src}\n${_lst_file_srcs}")
|
||||
+ if(IS_DIRECTORY ${_lst_file_src})
|
||||
+ list(TRANSFORM _extensions_list PREPEND "${_lst_file_src}/" OUTPUT_VARIABLE _directory_glob)
|
||||
+ file(GLOB_RECURSE _directory_contents CONFIGURE_DEPENDS ${_directory_glob})
|
||||
+ list(APPEND _dependencies ${_directory_contents})
|
||||
+ else()
|
||||
+ list(APPEND _dependencies "${_lst_file_src}")
|
||||
+ endif()
|
||||
endforeach()
|
||||
|
||||
get_directory_property(_inc_DIRS INCLUDE_DIRECTORIES)
|
||||
@@ -74,8 +93,8 @@ function(QT5_CREATE_TRANSLATION _qm_files)
|
||||
add_custom_command(OUTPUT ${_ts_file}
|
||||
COMMAND ${Qt5_LUPDATE_EXECUTABLE}
|
||||
ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file}
|
||||
- DEPENDS ${_my_sources}
|
||||
- BYPRODUCTS ${_ts_lst_file} VERBATIM)
|
||||
+ DEPENDS ${_dependencies}
|
||||
+ VERBATIM)
|
||||
endforeach()
|
||||
qt5_add_translation(${_qm_files} ${_my_tsfiles})
|
||||
set(${_qm_files} ${${_qm_files}} PARENT_SCOPE)
|
||||
diff --git a/src/qdbus/qdbusviewer/qdbusviewer.pro b/src/qdbus/qdbusviewer/qdbusviewer.pro
|
||||
index 02ec7a2d..07a47cd4 100644
|
||||
--- a/src/qdbus/qdbusviewer/qdbusviewer.pro
|
||||
+++ b/src/qdbus/qdbusviewer/qdbusviewer.pro
|
||||
@@ -23,7 +23,7 @@ mac {
|
||||
}
|
||||
|
||||
win32 {
|
||||
- RC_FILE = qdbusviewer.rc
|
||||
+ RC_ICONS = images/qdbusviewer.ico
|
||||
}
|
||||
|
||||
load(qt_app)
|
||||
diff --git a/src/qdbus/qdbusviewer/qdbusviewer.rc b/src/qdbus/qdbusviewer/qdbusviewer.rc
|
||||
deleted file mode 100644
|
||||
index c4b1d60b..00000000
|
||||
--- a/src/qdbus/qdbusviewer/qdbusviewer.rc
|
||||
+++ /dev/null
|
||||
@@ -1 +0,0 @@
|
||||
-IDI_ICON1 ICON DISCARDABLE "images/qdbusviewer.ico"
|
||||
diff --git a/src/qdoc/doc/qdoc-manual-topiccmds.qdoc b/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
|
||||
index 0837648b..7d906ce6 100644
|
||||
--- a/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
|
||||
+++ b/src/qdoc/doc/qdoc-manual-topiccmds.qdoc
|
||||
@@ -930,22 +930,24 @@
|
||||
|
||||
\list
|
||||
|
||||
+ \li api - This is the type of page used for C++ class references and
|
||||
+ QML type references. You should never use this one for the pages
|
||||
+ you write, because this one is reserved for QDoc.
|
||||
+
|
||||
+ \li attribution - A page describing (code) attributions.
|
||||
+
|
||||
+ \li example - A page that describes a working example.
|
||||
+
|
||||
\li faq - A frequently asked question.
|
||||
|
||||
\li howto - A user guide on how to use some components of the
|
||||
software.
|
||||
|
||||
- \li example - A page that describes a working example.
|
||||
-
|
||||
\li overview - For text pages that provide an overview of some
|
||||
important subject.
|
||||
|
||||
\li tutorial - For text pages that are part of a tutorial.
|
||||
|
||||
- \li api - This is the type of page used for C++ class references and
|
||||
- QML type references. You should never use this one for the pages
|
||||
- you write, because this one is reserved for QDoc.
|
||||
-
|
||||
\endlist
|
||||
|
||||
The page title is set using the \l {title-command} {\\title}
|
||||
diff --git a/src/qdoc/docbookgenerator.cpp b/src/qdoc/docbookgenerator.cpp
|
||||
index 3e4f03cf..82893be9 100644
|
||||
--- a/src/qdoc/docbookgenerator.cpp
|
||||
+++ b/src/qdoc/docbookgenerator.cpp
|
||||
@@ -2436,12 +2436,10 @@ void DocBookGenerator::generateCppReferencePage(Node *node)
|
||||
QString title;
|
||||
QString rawTitle;
|
||||
QString fullTitle;
|
||||
- const NamespaceNode *ns = nullptr;
|
||||
if (aggregate->isNamespace()) {
|
||||
rawTitle = aggregate->plainName();
|
||||
fullTitle = aggregate->plainFullName();
|
||||
title = rawTitle + " Namespace";
|
||||
- ns = static_cast<const NamespaceNode *>(aggregate);
|
||||
} else if (aggregate->isClass()) {
|
||||
rawTitle = aggregate->plainName();
|
||||
QString templateDecl = node->templateDecl();
|
||||
@@ -2449,6 +2447,8 @@ void DocBookGenerator::generateCppReferencePage(Node *node)
|
||||
fullTitle = QString("%1 %2 ").arg(templateDecl, aggregate->typeWord(false));
|
||||
fullTitle += aggregate->plainFullName();
|
||||
title = rawTitle + QLatin1Char(' ') + aggregate->typeWord(true);
|
||||
+ } else if (aggregate->isHeader()) {
|
||||
+ title = fullTitle = rawTitle = aggregate->fullTitle();
|
||||
}
|
||||
|
||||
QString subtitleText;
|
||||
@@ -2479,8 +2479,10 @@ void DocBookGenerator::generateCppReferencePage(Node *node)
|
||||
}
|
||||
|
||||
Sections sections(const_cast<Aggregate *>(aggregate));
|
||||
- SectionVector *sectionVector =
|
||||
- ns ? §ions.stdDetailsSections() : §ions.stdCppClassDetailsSections();
|
||||
+ auto *sectionVector =
|
||||
+ (aggregate->isNamespace() || aggregate->isHeader()) ?
|
||||
+ §ions.stdDetailsSections() :
|
||||
+ §ions.stdCppClassDetailsSections();
|
||||
SectionVector::ConstIterator section = sectionVector->constBegin();
|
||||
while (section != sectionVector->constEnd()) {
|
||||
bool headerGenerated = false;
|
||||
diff --git a/src/qdoc/helpprojectwriter.cpp b/src/qdoc/helpprojectwriter.cpp
|
||||
index d411802d..c534d399 100644
|
||||
--- a/src/qdoc/helpprojectwriter.cpp
|
||||
+++ b/src/qdoc/helpprojectwriter.cpp
|
||||
@@ -234,7 +234,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project, QXmlStreamWriter &
|
||||
if (!node->url().isEmpty() && !(project.includeIndexNodes && !node->url().startsWith("http")))
|
||||
return false;
|
||||
|
||||
- if (node->isPrivate() || node->isInternal())
|
||||
+ if (node->isPrivate() || node->isInternal() || node->isDontDocument())
|
||||
return false;
|
||||
|
||||
if (node->name().isEmpty())
|
||||
diff --git a/src/qdoc/htmlgenerator.cpp b/src/qdoc/htmlgenerator.cpp
|
||||
index a554f1ac..24735237 100644
|
||||
--- a/src/qdoc/htmlgenerator.cpp
|
||||
+++ b/src/qdoc/htmlgenerator.cpp
|
||||
@@ -1286,8 +1286,12 @@ void HtmlGenerator::generateCppReferencePage(Aggregate *aggregate, CodeMarker *m
|
||||
QString command = "documentation";
|
||||
if (aggregate->isClassNode())
|
||||
command = "\'\\class\' comment";
|
||||
- aggregate->location().warning(
|
||||
- tr("No %1 for '%2'").arg(command).arg(aggregate->plainSignature()));
|
||||
+ if (!ns || ns->isDocumentedHere()) {
|
||||
+ aggregate->location().warning(
|
||||
+ tr("No %1 for '%2'")
|
||||
+ .arg(command)
|
||||
+ .arg(aggregate->plainSignature()));
|
||||
+ }
|
||||
} else {
|
||||
generateExtractionMark(aggregate, DetailedDescriptionMark);
|
||||
out() << "<div class=\"descr\">\n" // QTBUG-9504
|
||||
diff --git a/src/qdoc/jscodemarker.cpp b/src/qdoc/jscodemarker.cpp
|
||||
index b3c675d5..0e1eb226 100644
|
||||
--- a/src/qdoc/jscodemarker.cpp
|
||||
+++ b/src/qdoc/jscodemarker.cpp
|
||||
@@ -78,16 +78,16 @@ bool JsCodeMarker::recognizeCode(const QString &code)
|
||||
*/
|
||||
bool JsCodeMarker::recognizeExtension(const QString &ext)
|
||||
{
|
||||
- return ext == "js" || ext == "json";
|
||||
+ return ext == "js";
|
||||
}
|
||||
|
||||
/*!
|
||||
- Returns \c true if the \a language is recognized. We recognize JavaScript,
|
||||
- ECMAScript and JSON.
|
||||
+ Returns \c true if the \a language is recognized. We recognize JavaScript and
|
||||
+ ECMAScript.
|
||||
*/
|
||||
bool JsCodeMarker::recognizeLanguage(const QString &language)
|
||||
{
|
||||
- return language == "JavaScript" || language == "ECMAScript" || language == "JSON";
|
||||
+ return language == "JavaScript" || language == "ECMAScript";
|
||||
}
|
||||
|
||||
/*!
|
||||
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
|
||||
index 82306eee..29985a8b 100644
|
||||
--- a/src/qdoc/node.cpp
|
||||
+++ b/src/qdoc/node.cpp
|
||||
@@ -2749,6 +2749,8 @@ void Aggregate::findAllAttributions(NodeMultiMap &attributions)
|
||||
void Aggregate::findAllSince()
|
||||
{
|
||||
for (auto *node : qAsConst(children_)) {
|
||||
+ if (node->isRelatedNonmember() && node->parent() != this)
|
||||
+ continue;
|
||||
QString sinceString = node->since();
|
||||
// Insert a new entry into each map for each new since string found.
|
||||
if (!node->isPrivate() && !sinceString.isEmpty()) {
|
||||
diff --git a/src/qtpaths/qtpaths.cpp b/src/qtpaths/qtpaths.cpp
|
||||
index 340a2ac4..9a9c9057 100644
|
||||
--- a/src/qtpaths/qtpaths.cpp
|
||||
+++ b/src/qtpaths/qtpaths.cpp
|
||||
@@ -79,30 +79,44 @@ Q_NORETURN static void error(const QString &message)
|
||||
::exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
-
|
||||
-/*
|
||||
- * NOTE: that DataLocation and CacheLocation are missing as
|
||||
- * they don't really make sense for a utility like this because
|
||||
- * they include the application name.
|
||||
- */
|
||||
-static const struct StringEnum {
|
||||
+class StringEnum {
|
||||
+public:
|
||||
const char *stringvalue;
|
||||
QStandardPaths::StandardLocation enumvalue;
|
||||
-} lookupTableData[] = {
|
||||
- { "ApplicationsLocation", QStandardPaths::ApplicationsLocation },
|
||||
- { "DesktopLocation", QStandardPaths::DesktopLocation },
|
||||
- { "DocumentsLocation", QStandardPaths::DocumentsLocation },
|
||||
- { "FontsLocation", QStandardPaths::FontsLocation },
|
||||
- { "MusicLocation", QStandardPaths::MusicLocation },
|
||||
- { "MoviesLocation", QStandardPaths::MoviesLocation },
|
||||
- { "PicturesLocation", QStandardPaths::PicturesLocation },
|
||||
- { "HomeLocation", QStandardPaths::HomeLocation },
|
||||
- { "GenericCacheLocation", QStandardPaths::GenericCacheLocation },
|
||||
- { "GenericDataLocation", QStandardPaths::GenericDataLocation },
|
||||
- { "RuntimeLocation", QStandardPaths::RuntimeLocation },
|
||||
- { "ConfigLocation", QStandardPaths::ConfigLocation },
|
||||
- { "GenericConfigLocation", QStandardPaths::GenericConfigLocation },
|
||||
- { "DownloadLocation", QStandardPaths::DownloadLocation }
|
||||
+ bool hasappname;
|
||||
+
|
||||
+ /**
|
||||
+ * Replace application name by generic name if requested
|
||||
+ */
|
||||
+ QString mapName(const QString &s) const
|
||||
+ {
|
||||
+ return hasappname ? QString(s).replace("qtpaths", "<APPNAME>") : s;
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+static const StringEnum lookupTableData[] = {
|
||||
+ { "AppConfigLocation", QStandardPaths::AppConfigLocation, true },
|
||||
+ { "AppDataLocation", QStandardPaths::AppDataLocation, true },
|
||||
+ { "AppLocalDataLocation", QStandardPaths::AppLocalDataLocation, true },
|
||||
+ { "ApplicationsLocation", QStandardPaths::ApplicationsLocation, false },
|
||||
+ { "CacheLocation", QStandardPaths::CacheLocation, true },
|
||||
+ { "ConfigLocation", QStandardPaths::ConfigLocation, false },
|
||||
+#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
+ { "DataLocation", QStandardPaths::DataLocation, true },
|
||||
+#endif
|
||||
+ { "DesktopLocation", QStandardPaths::DesktopLocation, false },
|
||||
+ { "DocumentsLocation", QStandardPaths::DocumentsLocation, false },
|
||||
+ { "DownloadLocation", QStandardPaths::DownloadLocation, false },
|
||||
+ { "FontsLocation", QStandardPaths::FontsLocation, false },
|
||||
+ { "GenericCacheLocation", QStandardPaths::GenericCacheLocation, false },
|
||||
+ { "GenericConfigLocation", QStandardPaths::GenericConfigLocation, false },
|
||||
+ { "GenericDataLocation", QStandardPaths::GenericDataLocation, false },
|
||||
+ { "HomeLocation", QStandardPaths::HomeLocation, false },
|
||||
+ { "MoviesLocation", QStandardPaths::MoviesLocation, false },
|
||||
+ { "MusicLocation", QStandardPaths::MusicLocation, false },
|
||||
+ { "PicturesLocation", QStandardPaths::PicturesLocation, false },
|
||||
+ { "RuntimeLocation", QStandardPaths::RuntimeLocation, false },
|
||||
+ { "TempLocation", QStandardPaths::TempLocation, false }
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -118,14 +132,14 @@ static QStringList types()
|
||||
}
|
||||
|
||||
/**
|
||||
- * Tries to parse the location string into a StandardLocation or alternatively
|
||||
+ * Tries to arse the location string into a reference to a StringEnum entry or alternatively
|
||||
* calls \ref error with a error message
|
||||
*/
|
||||
-static QStandardPaths::StandardLocation parseLocationOrError(const QString &locationString)
|
||||
+static const StringEnum &parseLocationOrError(const QString &locationString)
|
||||
{
|
||||
for (const StringEnum &se : lookupTableData)
|
||||
if (locationString == QLatin1String(se.stringvalue))
|
||||
- return se.enumvalue;
|
||||
+ return se;
|
||||
|
||||
QString message = QCoreApplication::translate("qtpaths", "Unknown location: %1");
|
||||
error(message.arg(locationString));
|
||||
@@ -246,21 +260,21 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (parser.isSet(display)) {
|
||||
- QStandardPaths::StandardLocation location = parseLocationOrError(parser.value(display));
|
||||
- QString text = QStandardPaths::displayName(location);
|
||||
- results << text;
|
||||
+ const StringEnum &location = parseLocationOrError(parser.value(display));
|
||||
+ QString text = QStandardPaths::displayName(location.enumvalue);
|
||||
+ results << location.mapName(text);
|
||||
}
|
||||
|
||||
if (parser.isSet(paths)) {
|
||||
- QStandardPaths::StandardLocation location = parseLocationOrError(parser.value(paths));
|
||||
- QStringList paths = QStandardPaths::standardLocations(location);
|
||||
- results << paths.join(pathsep);
|
||||
+ const StringEnum &location = parseLocationOrError(parser.value(paths));
|
||||
+ QStringList paths = QStandardPaths::standardLocations(location.enumvalue);
|
||||
+ results << location.mapName(paths.join(pathsep));
|
||||
}
|
||||
|
||||
if (parser.isSet(writablePath)) {
|
||||
- QStandardPaths::StandardLocation location = parseLocationOrError(parser.value(writablePath));
|
||||
- QString path = QStandardPaths::writableLocation(location);
|
||||
- results << path;
|
||||
+ const StringEnum &location = parseLocationOrError(parser.value(writablePath));
|
||||
+ QString path = QStandardPaths::writableLocation(location.enumvalue);
|
||||
+ results << location.mapName(path);
|
||||
}
|
||||
|
||||
if (parser.isSet(findExe)) {
|
||||
@@ -270,31 +284,31 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
if (parser.isSet(locateDir)) {
|
||||
- QStandardPaths::StandardLocation location = parseLocationOrError(parser.value(locateDir));
|
||||
+ const StringEnum &location = parseLocationOrError(parser.value(locateDir));
|
||||
QString searchitem = searchStringOrError(&parser);
|
||||
- QString path = QStandardPaths::locate(location, searchitem, QStandardPaths::LocateDirectory);
|
||||
- results << path;
|
||||
+ QString path = QStandardPaths::locate(location.enumvalue, searchitem, QStandardPaths::LocateDirectory);
|
||||
+ results << location.mapName(path);
|
||||
}
|
||||
|
||||
if (parser.isSet(locateFile)) {
|
||||
- QStandardPaths::StandardLocation location = parseLocationOrError(parser.value(locateFile));
|
||||
+ const StringEnum &location = parseLocationOrError(parser.value(locateFile));
|
||||
QString searchitem = searchStringOrError(&parser);
|
||||
- QString path = QStandardPaths::locate(location, searchitem, QStandardPaths::LocateFile);
|
||||
- results << path;
|
||||
+ QString path = QStandardPaths::locate(location.enumvalue, searchitem, QStandardPaths::LocateFile);
|
||||
+ results << location.mapName(path);
|
||||
}
|
||||
|
||||
if (parser.isSet(locateDirs)) {
|
||||
- QStandardPaths::StandardLocation location = parseLocationOrError(parser.value(locateDirs));
|
||||
+ const StringEnum &location = parseLocationOrError(parser.value(locateDirs));
|
||||
QString searchitem = searchStringOrError(&parser);
|
||||
- QStringList paths = QStandardPaths::locateAll(location, searchitem, QStandardPaths::LocateDirectory);
|
||||
- results << paths.join(pathsep);
|
||||
+ QStringList paths = QStandardPaths::locateAll(location.enumvalue, searchitem, QStandardPaths::LocateDirectory);
|
||||
+ results << location.mapName(paths.join(pathsep));
|
||||
}
|
||||
|
||||
if (parser.isSet(locateFiles)) {
|
||||
- QStandardPaths::StandardLocation location = parseLocationOrError(parser.value(locateFiles));
|
||||
+ const StringEnum &location = parseLocationOrError(parser.value(locateFiles));
|
||||
QString searchitem = searchStringOrError(&parser);
|
||||
- QStringList paths = QStandardPaths::locateAll(location, searchitem, QStandardPaths::LocateFile);
|
||||
- results << paths.join(pathsep);
|
||||
+ QStringList paths = QStandardPaths::locateAll(location.enumvalue, searchitem, QStandardPaths::LocateFile);
|
||||
+ results << location.mapName(paths.join(pathsep));
|
||||
}
|
||||
if (results.isEmpty()) {
|
||||
parser.showHelp();
|
||||
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/dontdocument/dontdocument.qhp b/tests/auto/qdoc/generatedoutput/expected_output/dontdocument/dontdocument.qhp
|
||||
new file mode 100644
|
||||
index 00000000..098200a9
|
||||
--- /dev/null
|
||||
+++ b/tests/auto/qdoc/generatedoutput/expected_output/dontdocument/dontdocument.qhp
|
||||
@@ -0,0 +1,55 @@
|
||||
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<QtHelpProject version="1.0">
|
||||
+ <namespace>org.qt-project.dontdocument.001</namespace>
|
||||
+ <virtualFolder>test</virtualFolder>
|
||||
+ <metaData name="version" value=""/>
|
||||
+ <filterSection>
|
||||
+ <toc>
|
||||
+ <section ref="testcpp-module.html" title="QDoc Test C++ Classes">
|
||||
+ <section ref="testcpp-module.html" title="Classes">
|
||||
+ <section ref="seenclass.html" title="SeenClass Class Reference"/>
|
||||
+ <section ref="testqdoc-test.html" title="TestQDoc::Test Class Reference">
|
||||
+ <section ref="testqdoc-test-members.html" title="List of all members"/>
|
||||
+ <section ref="testqdoc-test-obsolete.html" title="Obsolete members"/>
|
||||
+ </section>
|
||||
+ <section ref="testqdoc-testderived.html" title="TestQDoc::TestDerived Class Reference">
|
||||
+ <section ref="testqdoc-testderived-members.html" title="List of all members"/>
|
||||
+ </section>
|
||||
+ </section>
|
||||
+ </section>
|
||||
+ </toc>
|
||||
+ <keywords>
|
||||
+ <keyword name="Classes" id="Classes" ref="classes.html"/>
|
||||
+ <keyword name="QDOCTEST_MACRO" id="QDOCTEST_MACRO" ref="testqdoc.html#QDOCTEST_MACRO"/>
|
||||
+ <keyword name="QDOCTEST_MACRO2" id="QDOCTEST_MACRO2" ref="testqdoc-test.html#QDOCTEST_MACRO2"/>
|
||||
+ <keyword name="QDoc Test C++ Classes" id="QDoc Test C++ Classes" ref="testcpp-module.html"/>
|
||||
+ <keyword name="SeenClass" id="SeenClass" ref="seenclass.html"/>
|
||||
+ <keyword name="Test" id="TestQDoc::Test" ref="testqdoc-test.html"/>
|
||||
+ <keyword name="Test::SomeType" id="Test::SomeType" ref="testqdoc-test.html#SomeType-typedef"/>
|
||||
+ <keyword name="TestDerived" id="TestQDoc::TestDerived" ref="testqdoc-testderived.html"/>
|
||||
+ <keyword name="TestDerived::DerivedType" id="TestDerived::DerivedType" ref="testqdoc-testderived.html#DerivedType-alias"/>
|
||||
+ <keyword name="TestDerived::NotTypedef" id="TestDerived::NotTypedef" ref="testqdoc-testderived.html#NotTypedef-alias"/>
|
||||
+ <keyword name="TestQDoc" id="TestQDoc" ref="testqdoc.html"/>
|
||||
+ <keyword name="anotherObsoleteMember" id="Test::anotherObsoleteMember" ref="testqdoc-test-obsolete.html#anotherObsoleteMember"/>
|
||||
+ <keyword name="deprecatedMember" id="Test::deprecatedMember" ref="testqdoc-test-obsolete.html#deprecatedMember"/>
|
||||
+ <keyword name="inlineFunction" id="Test::inlineFunction" ref="testqdoc-test.html#inlineFunction"/>
|
||||
+ <keyword name="obsoleteMember" id="Test::obsoleteMember" ref="testqdoc-test-obsolete.html#obsoleteMember"/>
|
||||
+ <keyword name="overload" id="Test::overload" ref="testqdoc-test.html#overload"/>
|
||||
+ <keyword name="someFunction" id="Test::someFunction" ref="testqdoc-test.html#someFunction"/>
|
||||
+ <keyword name="someFunctionDefaultArg" id="Test::someFunctionDefaultArg" ref="testqdoc-test.html#someFunctionDefaultArg"/>
|
||||
+ <keyword name="virtualFun" id="Test::virtualFun" ref="testqdoc-test.html#virtualFun"/>
|
||||
+ <keyword name="virtualFun" id="TestDerived::virtualFun" ref="testqdoc-testderived.html#virtualFun"/>
|
||||
+ </keywords>
|
||||
+ <files>
|
||||
+ <file>classes.html</file>
|
||||
+ <file>seenclass.html</file>
|
||||
+ <file>testcpp-module.html</file>
|
||||
+ <file>testqdoc-test-members.html</file>
|
||||
+ <file>testqdoc-test-obsolete.html</file>
|
||||
+ <file>testqdoc-test.html</file>
|
||||
+ <file>testqdoc-testderived-members.html</file>
|
||||
+ <file>testqdoc-testderived.html</file>
|
||||
+ <file>testqdoc.html</file>
|
||||
+ </files>
|
||||
+ </filterSection>
|
||||
+</QtHelpProject>
|
||||
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/headerfile-docbook/testheader.xml b/tests/auto/qdoc/generatedoutput/expected_output/headerfile-docbook/testheader.xml
|
||||
index f3461fb1..afa0b20a 100644
|
||||
--- a/tests/auto/qdoc/generatedoutput/expected_output/headerfile-docbook/testheader.xml
|
||||
+++ b/tests/auto/qdoc/generatedoutput/expected_output/headerfile-docbook/testheader.xml
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
|
||||
<db:info>
|
||||
-<db:title></db:title>
|
||||
+<db:title><TestHeader> - Test Header</db:title>
|
||||
<db:productname>HeaderFile</db:productname>
|
||||
<db:titleabbrev>HeaderFile Reference Documentation</db:titleabbrev>
|
||||
<db:abstract>
|
||||
@@ -19,4 +19,72 @@
|
||||
<db:section xml:id="details">
|
||||
<db:title>Detailed Description</db:title>
|
||||
</db:section>
|
||||
+<db:section xml:id="type-documentation">
|
||||
+<db:title>Type Documentation</db:title>
|
||||
+<db:section xml:id="Globals-enum">
|
||||
+<db:title>enum Globals</db:title>
|
||||
+<db:enumsynopsis>
|
||||
+<db:enumname>Globals</db:enumname>
|
||||
+<db:synopsisinfo db:role="access">public</db:synopsisinfo>
|
||||
+<db:synopsisinfo db:role="status">active</db:synopsisinfo>
|
||||
+<db:synopsisinfo db:role="threadsafeness">unspecified</db:synopsisinfo>
|
||||
+<db:synopsisinfo db:role="module">HeaderFile</db:synopsisinfo>
|
||||
+<db:enumitem db:enumidentifier="Glo" db:enumvalue="0"/>
|
||||
+<db:enumitem db:enumidentifier="Bal" db:enumvalue="1"/>
|
||||
+</db:enumsynopsis>
|
||||
+<db:informaltable>
|
||||
+<db:thead>
|
||||
+<db:tr>
|
||||
+<db:th>Constant</db:th>
|
||||
+<db:th>Description</db:th>
|
||||
+</db:tr>
|
||||
+</db:thead>
|
||||
+<db:tr>
|
||||
+<db:td>
|
||||
+<db:para><db:code>Glo</db:code></db:para>
|
||||
+</db:td>
|
||||
+<db:td><db:code>0</db:code></db:td>
|
||||
+</db:tr>
|
||||
+<db:tr>
|
||||
+<db:td>
|
||||
+<db:para><db:code>Bal</db:code></db:para>
|
||||
+</db:td>
|
||||
+<db:td><db:code>1</db:code></db:td>
|
||||
+</db:tr>
|
||||
+</db:informaltable>
|
||||
+</db:section>
|
||||
+</db:section>
|
||||
+<db:section xml:id="variable-documentation">
|
||||
+<db:title>Variable Documentation</db:title>
|
||||
+<db:section xml:id="globalVar-var">
|
||||
+<db:title>const int globalVar</db:title>
|
||||
+<db:fieldsynopsis>
|
||||
+<db:type>const int</db:type>
|
||||
+<db:varname>globalVar</db:varname>
|
||||
+<db:synopsisinfo db:role="access">public</db:synopsisinfo>
|
||||
+<db:synopsisinfo db:role="status">active</db:synopsisinfo>
|
||||
+<db:synopsisinfo db:role="threadsafeness">unspecified</db:synopsisinfo>
|
||||
+<db:synopsisinfo db:role="module">HeaderFile</db:synopsisinfo>
|
||||
+</db:fieldsynopsis>
|
||||
+<db:para>Global variable.</db:para>
|
||||
+</db:section>
|
||||
+</db:section>
|
||||
+<db:section xml:id="function-documentation">
|
||||
+<db:title>Function Documentation</db:title>
|
||||
+<db:section xml:id="globalFunc">
|
||||
+<db:title>void globalFunc()</db:title>
|
||||
+<db:methodsynopsis>
|
||||
+<db:void/>
|
||||
+<db:methodname>globalFunc</db:methodname>
|
||||
+<db:void/>
|
||||
+<db:synopsisinfo db:role="meta">plain</db:synopsisinfo>
|
||||
+<db:synopsisinfo db:role="signature">void globalFunc()</db:synopsisinfo>
|
||||
+<db:synopsisinfo db:role="access">public</db:synopsisinfo>
|
||||
+<db:synopsisinfo db:role="status">active</db:synopsisinfo>
|
||||
+<db:synopsisinfo db:role="threadsafeness">unspecified</db:synopsisinfo>
|
||||
+<db:synopsisinfo db:role="module">HeaderFile</db:synopsisinfo>
|
||||
+</db:methodsynopsis>
|
||||
+<db:para>Global function.</db:para>
|
||||
+</db:section>
|
||||
+</db:section>
|
||||
</db:article>
|
||||
diff --git a/tests/auto/qdoc/generatedoutput/testdata/dontdocument/dontdocument.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/dontdocument/dontdocument.qdocconf
|
||||
index 117920e5..ef45f50a 100644
|
||||
--- a/tests/auto/qdoc/generatedoutput/testdata/dontdocument/dontdocument.qdocconf
|
||||
+++ b/tests/auto/qdoc/generatedoutput/testdata/dontdocument/dontdocument.qdocconf
|
||||
@@ -3,5 +3,19 @@ include(../configs/testcpp.qdocconf)
|
||||
headers += dont.h
|
||||
sources += dont.cpp test.qdoc
|
||||
|
||||
+qhp.projects = DontDocument
|
||||
+
|
||||
+qhp.DontDocument.file = dontdocument.qhp
|
||||
+qhp.DontDocument.namespace = org.qt-project.dontdocument.001
|
||||
+qhp.DontDocument.virtualFolder = test
|
||||
+qhp.DontDocument.indexTitle = QDoc Test C++ Classes
|
||||
+qhp.DontDocument.indexRoot =
|
||||
+
|
||||
+qhp.DontDocument.subprojects = classes
|
||||
+qhp.DontDocument.subprojects.classes.title = Classes
|
||||
+qhp.DontDocument.subprojects.classes.indexTitle = QDoc Test C++ Classes
|
||||
+qhp.DontDocument.subprojects.classes.selectors = class
|
||||
+qhp.DontDocument.subprojects.classes.sortPages = true
|
||||
+
|
||||
HTML.nosubdirs = true
|
||||
HTML.outputsubdir = dontdocument
|
||||
diff --git a/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp b/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
|
||||
index fd68159a..a83ba337 100644
|
||||
--- a/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
|
||||
+++ b/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
|
||||
@@ -349,7 +349,8 @@ void tst_generatedOutput::dontDocument()
|
||||
{
|
||||
testAndCompare("testdata/dontdocument/dontdocument.qdocconf",
|
||||
"dontdocument/classes.html "
|
||||
- "dontdocument/seenclass.html");
|
||||
+ "dontdocument/seenclass.html "
|
||||
+ "dontdocument/dontdocument.qhp");
|
||||
}
|
||||
|
||||
void tst_generatedOutput::inheritedQmlPropertyGroups()
|
||||
@@ -22,7 +22,7 @@
|
||||
<Dependency versionFrom="5.15.2">qt5-declarative-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- <Patch level="1">qt5-tools-qtwebkit.patch</Patch> -->
|
||||
<Patch level="1">qt_kde.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user