diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-08-16 20:37:55 +0300 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-08-16 20:37:55 +0300 |
commit | b52467bcbea35b81a1f4dcc14cd1870db2981a2e (patch) | |
tree | 3013ca032af77142fef7f62100dca00e1e26e594 | |
parent | 6583391282b02d0866975c224852b868a83be01a (diff) | |
parent | 63dc93cbba6ba00a7451de5bd783862904e64ce2 (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.6' into tqtc/lts-5.15-opensourcev5.15.6-lts-lgpl
Change-Id: I47940f0d599b23a8d3e1fc1a0735540170c0d0c3
-rw-r--r-- | .qmake.conf | 2 | ||||
-rw-r--r-- | examples/assistant/remotecontrol/remotecontrol.cpp | 11 | ||||
-rw-r--r-- | examples/assistant/simpletextviewer/assistant.cpp | 9 | ||||
-rw-r--r-- | examples/assistant/simpletextviewer/findfiledialog.cpp | 4 | ||||
-rw-r--r-- | src/assistant/help/doc/src/qthelp.qdoc | 46 | ||||
-rw-r--r-- | src/assistant/help/qhelpsearchresultwidget.cpp | 21 | ||||
-rw-r--r-- | src/qdoc/doc/qdoc-manual-intro.qdoc | 2 | ||||
-rw-r--r-- | src/windeployqt/main.cpp | 13 |
8 files changed, 50 insertions, 58 deletions
diff --git a/.qmake.conf b/.qmake.conf index 0eeba9a5b..02c9e618a 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,4 +2,4 @@ load(qt_build_config) DEFINES += QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST -MODULE_VERSION = 5.15.5 +MODULE_VERSION = 5.15.6 diff --git a/examples/assistant/remotecontrol/remotecontrol.cpp b/examples/assistant/remotecontrol/remotecontrol.cpp index 916a08efd..8b39aa6ff 100644 --- a/examples/assistant/remotecontrol/remotecontrol.cpp +++ b/examples/assistant/remotecontrol/remotecontrol.cpp @@ -98,11 +98,11 @@ void RemoteControl::on_launchButton_clicked() if (process->state() == QProcess::Running) return; - QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator(); + QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath); #if !defined(Q_OS_MAC) - app += QLatin1String("assistant"); + app += QLatin1String("/assistant"); #else - app += QLatin1String("Assistant.app/Contents/MacOS/Assistant"); + app += QLatin1String("/Assistant.app/Contents/MacOS/Assistant"); #endif ui.contentsCheckBox->setChecked(true); @@ -113,8 +113,9 @@ void RemoteControl::on_launchButton_clicked() args << QLatin1String("-enableRemoteControl"); process->start(app, args); if (!process->waitForStarted()) { - QMessageBox::critical(this, tr("Remote Control"), - tr("Could not start Qt Assistant from %1.").arg(app)); + QMessageBox::critical( + this, tr("Remote Control"), + tr("Could not start Qt Assistant from %1.").arg(QDir::toNativeSeparators(app))); return; } diff --git a/examples/assistant/simpletextviewer/assistant.cpp b/examples/assistant/simpletextviewer/assistant.cpp index ceda2c384..f6d7d3d33 100644 --- a/examples/assistant/simpletextviewer/assistant.cpp +++ b/examples/assistant/simpletextviewer/assistant.cpp @@ -115,11 +115,11 @@ bool Assistant::startAssistant() } if (m_process->state() != QProcess::Running) { - QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath) + QDir::separator(); + QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath); #ifndef Q_OS_DARWIN - app += QLatin1String("assistant"); + app += QLatin1String("/assistant"); #else - app += QLatin1String("Assistant.app/Contents/MacOS/Assistant"); + app += QLatin1String("/Assistant.app/Contents/MacOS/Assistant"); #endif const QString collectionDirectory = documentationDirectory(); @@ -135,7 +135,8 @@ bool Assistant::startAssistant() m_process->start(app, args); if (!m_process->waitForStarted()) { - showError(tr("Unable to launch Qt Assistant (%1): %2").arg(app, m_process->errorString())); + showError(tr("Unable to launch Qt Assistant (%1): %2") + .arg(QDir::toNativeSeparators(app), m_process->errorString())); return false; } } diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp index 1eab5ad7f..51b184075 100644 --- a/examples/assistant/simpletextviewer/findfiledialog.cpp +++ b/examples/assistant/simpletextviewer/findfiledialog.cpp @@ -112,9 +112,9 @@ void FindFileDialog::openFile() return; QString fileName = item->text(0); - QString path = directoryComboBox->currentText() + QDir::separator(); + QString path = QDir(directoryComboBox->currentText()).filePath(fileName); - currentEditor->setContents(path + fileName); + currentEditor->setContents(path); close(); } diff --git a/src/assistant/help/doc/src/qthelp.qdoc b/src/assistant/help/doc/src/qthelp.qdoc index 9b02c9612..0734d62a8 100644 --- a/src/assistant/help/doc/src/qthelp.qdoc +++ b/src/assistant/help/doc/src/qthelp.qdoc @@ -128,7 +128,7 @@ \li .qhc \li The help collection file that QHelpEngine operates on. It can contain references to any number of compressed help files as - well as additional information, such as custom filters. + well as additional information. \endtable \section1 Generating Qt Help @@ -275,48 +275,14 @@ The virtual folder tag is mandatory and the folder name must not contain any slashes (/). - \target Custom Filters - \section2 Custom Filters - - The Qt help project file contains optional definitions of - custom filters. A custom filter contains a list of filter - attributes which will be used later to display only the documentation - set that has all those attributes assigned. So, when setting the - current filter in the QHelpEngine to \e {My Application 1.0} only - the documentation which has \e myapp and \e {1.0} set as filter - attributes will be shown. - - \snippet doc_src_qthelp.qdoc 9 - - You can define any number of custom filters in a help project file. - It is important to know that you do not have to specify the filter - attributes in the same project file. These attributes can be defined - in any help file, in a filter section. - \target Filter Section \section2 Filter Section - A filter section contains the actual documentation. One Qt help project - file may contain more than one filter sections. Every filter section - consists of four parts, the filter attributes section, the table of - contents, the keywords and the files list. In theory all parts are - optional but not specifying anything there will result in an empty - documentation set. - - \section3 Filter Attributes - - Every filter section should have filter attributes assigned to it, to - enable documentation filtering. If no filter attribute is defined, the - documentation will only be shown if no filtering occurs, meaning the - current custom filter in the QHelpEngine does not contain any filter - attributes. - - \snippet doc_src_qthelp.qdoc 10 - - In this case, the filter attributes \e myapp and \e {1.0} are assigned to - the filter section. This means that all contents specified in this section - will only be shown if the current custom filter has \e myapp or \e {1.0}, - or both, as filter attributes. + A filter section contains the actual documentation. A Qt help project + file may contain more than one filter section. Every filter section + consists of the table of contents, the keywords, and the files list. + In theory all parts are optional but not specifying anything there will + result in an empty documentation set. \section3 Table of Contents diff --git a/src/assistant/help/qhelpsearchresultwidget.cpp b/src/assistant/help/qhelpsearchresultwidget.cpp index b7d61b494..ff3408f3f 100644 --- a/src/assistant/help/qhelpsearchresultwidget.cpp +++ b/src/assistant/help/qhelpsearchresultwidget.cpp @@ -60,6 +60,7 @@ QT_BEGIN_NAMESPACE class QResultWidget : public QTextBrowser { Q_OBJECT + Q_PROPERTY(QColor linkColor READ linkColor WRITE setLinkColor) public: QResultWidget(QWidget *parent = nullptr) @@ -68,6 +69,15 @@ public: connect(this, &QTextBrowser::anchorClicked, this, &QResultWidget::requestShowLink); setContextMenuPolicy(Qt::NoContextMenu); + setLinkColor(palette().color(QPalette::Link)); + } + + QColor linkColor() const { return m_linkColor; } + void setLinkColor(const QColor &color) + { + m_linkColor = color; + const QString sheet = QString::fromLatin1("a { text-decoration: underline; color: %1 }").arg(m_linkColor.name()); + document()->setDefaultStyleSheet(sheet); } void showResultPage(const QVector<QHelpSearchResult> results, bool isIndexing) @@ -88,10 +98,10 @@ public: } for (const QHelpSearchResult &result : results) { - str << "<div style=\"text-align:left; font-weight:bold\"><a href=\"" - << result.url().toString() << "\">" << result.title() << "</a>" - "<div style=\"color:green; font-weight:normal;" - " margin:5px\">" << result.snippet() << "</div></div><p></p>"; + str << "<div style=\"text-align:left\"><a href=\"" + << result.url().toString() << "\">" + << result.title() << "</a></div>" + "<div style =\"margin:5px\">" << result.snippet() << "</div>"; } } else { str << "<div align=\"center\"><br><br><h2>" @@ -114,6 +124,9 @@ signals: private slots: void setSource(const QUrl & /* name */) override {} + +private: + QColor m_linkColor; }; diff --git a/src/qdoc/doc/qdoc-manual-intro.qdoc b/src/qdoc/doc/qdoc-manual-intro.qdoc index 525445b4f..b18d9b0e0 100644 --- a/src/qdoc/doc/qdoc-manual-intro.qdoc +++ b/src/qdoc/doc/qdoc-manual-intro.qdoc @@ -205,7 +205,7 @@ module's, that module is said to depend on those other Qt modules. Hence when QDoc runs the \e {generate phase} for that module, it must also load the index files for those modules so it can create - those thinks. + those links. Hence, when the Qt build system generates the Qt documentation, it first runs QDoc once for each module to perform the \e {prepare diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index 0f5bde717..ed7be2f35 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -1334,7 +1334,18 @@ static DeployResult deploy(const Options &options, const QString icuVersion = icuLibs.front().mid(index, numberExpression.matchedLength()); if (optVerboseLevel > 1) std::wcout << "Adding ICU version " << icuVersion << '\n'; - icuLibs.push_back(QStringLiteral("icudt") + icuVersion + QLatin1String(windowsSharedLibrarySuffix)); + QString icuLib = QStringLiteral("icudt") + icuVersion + + QLatin1String(windowsSharedLibrarySuffix);; + // Some packages contain debug dlls of ICU libraries even though it's a C + // library and the official packages do not differentiate (QTBUG-87677) + if (result.isDebug) { + const QString icuLibCandidate = QStringLiteral("icudtd") + icuVersion + + QLatin1String(windowsSharedLibrarySuffix); + if (!findInPath(icuLibCandidate).isEmpty()) { + icuLib = icuLibCandidate; + } + } + icuLibs.push_back(icuLib); } for (const QString &icuLib : qAsConst(icuLibs)) { const QString icuPath = findInPath(icuLib); |