From a134cb1855622694355d8564b2f6aa0b7bf08b29 Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Wed, 22 Nov 2017 14:19:24 +0100 Subject: windeployqt: winrt: Do not list translation files that are not deployed Visual Studio projects for winrt usage rely on a proper list of files that are deployed. We concat translation files into a single qt_.qm file using lconvert, but also mention every "sub file" (qtbase_.qm etc) in json. That breaks deployment on winrt and thus should not be done on that platform. Change-Id: I3086b923ce4703ec159202cfe8df9447cdd51571 Reviewed-by: Friedemann Kleint --- src/windeployqt/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index fd21a6949..a7008acb8 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -985,7 +985,8 @@ static bool deployTranslations(const QString &sourcePath, quint64 usedQtModules, arguments.append(QDir::toNativeSeparators(targetFilePath)); const QFileInfoList &langQmFiles = sourceDir.entryInfoList(translationNameFilters(usedQtModules, prefix)); for (const QFileInfo &langQmFileFi : langQmFiles) { - if (options.json) { + // winrt relies on a proper list of deployed files. We cannot cheat an mention files we do not ship here. + if (options.json && !options.isWinRt()) { options.json->addFile(langQmFileFi.absoluteFilePath(), absoluteTarget); } -- cgit v1.2.1 From ba7fe8fe13fc4984b4cd162df1f3dafa92233664 Mon Sep 17 00:00:00 2001 From: Martin Leutelt Date: Thu, 9 Nov 2017 09:22:08 +0100 Subject: Fix qt5_add_translation macro to return correct file names The CMake macro now determines the file names of the given ts files correctly when a file name contains multiple dots. Instead of using the first dot to identify the file extension now the last one is used. Task-number: QTBUG-64317 Change-Id: I9a8423307679fb722fb4b0bc2f0af19f0f7ee821 Reviewed-by: Oswald Buddenhagen Reviewed-by: Kevin Funk --- src/linguist/Qt5LinguistToolsMacros.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/linguist/Qt5LinguistToolsMacros.cmake b/src/linguist/Qt5LinguistToolsMacros.cmake index 6013cc6ee..8e363a40f 100644 --- a/src/linguist/Qt5LinguistToolsMacros.cmake +++ b/src/linguist/Qt5LinguistToolsMacros.cmake @@ -84,13 +84,15 @@ endfunction() function(QT5_ADD_TRANSLATION _qm_files) foreach(_current_FILE ${ARGN}) get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE) - get_filename_component(qm ${_abs_FILE} NAME_WE) + get_filename_component(qm ${_abs_FILE} NAME) + # everything before the last dot has to be considered the file name (including other dots) + string(REGEX REPLACE "\\.[^.]*$" "" FILE_NAME ${qm}) get_source_file_property(output_location ${_abs_FILE} OUTPUT_LOCATION) if(output_location) file(MAKE_DIRECTORY "${output_location}") - set(qm "${output_location}/${qm}.qm") + set(qm "${output_location}/${FILE_NAME}.qm") else() - set(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm") + set(qm "${CMAKE_CURRENT_BINARY_DIR}/${FILE_NAME}.qm") endif() add_custom_command(OUTPUT ${qm} -- cgit v1.2.1 From f8bb798ade81f152bc8ff2028e4974150171fa08 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 7 Dec 2017 10:32:24 +0100 Subject: windeployqt: Fix deployment of MSVC 2017 15.5 release redistributable The file name was changed. Task-number: QTBUG-65015 Change-Id: I0a81a42abae3bcf9b124acbea55ba4e275594016 Reviewed-by: Maurice Kalinowski --- src/windeployqt/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index a7008acb8..235080f5c 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -1118,9 +1118,12 @@ static QStringList compilerRunTimeLibs(Platform platform, bool isDebug, unsigned const QStringList countryCodes = vcRedistDir.entryList(QStringList(QStringLiteral("[0-9]*")), QDir::Dirs); if (!countryCodes.isEmpty()) // Pre MSVC2017 releaseRedistDir += QLatin1Char('/') + countryCodes.constFirst(); - const QFileInfo fi(releaseRedistDir + QLatin1Char('/') - + QStringLiteral("vcredist_") + wordSizeString - + QStringLiteral(".exe")); + QFileInfo fi(releaseRedistDir + QLatin1Char('/') + QStringLiteral("vc_redist.") + + wordSizeString + QStringLiteral(".exe")); + if (!fi.isFile()) { // Pre MSVC2017/15.5 + fi.setFile(releaseRedistDir + QLatin1Char('/') + QStringLiteral("vcredist_") + + wordSizeString + QStringLiteral(".exe")); + } if (fi.isFile()) redistFiles.append(fi.absoluteFilePath()); } -- cgit v1.2.1 From a28de1b8b1848df489298b34b8330bf41a70ce40 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 12 Dec 2017 09:55:08 +0100 Subject: Bump version Change-Id: I9786562c1fab729ae11ce71cda26c2f571a80fac --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 2108ac6fd..4f571fb57 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,3 +1,3 @@ load(qt_build_config) -MODULE_VERSION = 5.9.3 +MODULE_VERSION = 5.9.4 -- cgit v1.2.1 From 796a5e005fa1ae2bfe6f9278fc482723eb89f429 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Fri, 17 Nov 2017 09:56:15 +0100 Subject: Assistant: Fix search results for content in .txt files The search index writer would treat all input files as html. This led to .txt files being stored with empty titles (no tag would be found). That again led to unusable search results in Assistant, showing only the snippet, but no clickable title link. Fix by special casing for .txt files, using the file name as title, just as QHelpGenerator does. Task-number: QTBUG-62250 Change-Id: Id82a780dadc2d4ff5866a565337f86c798b952a5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> --- src/assistant/help/qhelpsearchindexwriter_default.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/assistant/help/qhelpsearchindexwriter_default.cpp b/src/assistant/help/qhelpsearchindexwriter_default.cpp index 2dbbb30d2..72e92ecab 100644 --- a/src/assistant/help/qhelpsearchindexwriter_default.cpp +++ b/src/assistant/help/qhelpsearchindexwriter_default.cpp @@ -501,11 +501,18 @@ void QHelpSearchIndexWriter::run() if (text.isEmpty()) continue; - QTextDocument doc; - doc.setHtml(text); - - const QString &title = doc.metaInformation(QTextDocument::DocumentTitle).toHtmlEscaped(); - const QString &contents = doc.toPlainText().toHtmlEscaped(); + QString title; + QString contents; + if (url.endsWith(QLatin1String(".txt"))) { + title = url.mid(url.lastIndexOf(QLatin1Char('/')) + 1); + contents = text.toHtmlEscaped(); + } else { + QTextDocument doc; + doc.setHtml(text); + + title = doc.metaInformation(QTextDocument::DocumentTitle).toHtmlEscaped(); + contents = doc.toPlainText().toHtmlEscaped(); + } writer.insertDoc(namespaceName, attributesString, url, title, contents); } -- cgit v1.2.1 From 2f3dc790aefadc74debfa25efe958078def34146 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland <eirik.aavitsland@qt.io> Date: Mon, 11 Dec 2017 15:11:05 +0100 Subject: Assistant: ensure bookmarks are persistently stored when changed The bookmark manager would only update the persistent storage in its destructor. Since that is not called on an unclean process termination, bookmark changes would be lost. Fix by updating the persistent storage after every bookmark change. Task-number: QTBUG-50350 Change-Id: Id03d5ea96df15d01fdf482203aaf1db7166a7036 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> --- src/assistant/assistant/bookmarkmanager.cpp | 22 +++++++++++++++++++++- src/assistant/assistant/bookmarkmanager.h | 7 +++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/assistant/assistant/bookmarkmanager.cpp b/src/assistant/assistant/bookmarkmanager.cpp index 9016c2c6e..fe1b04067 100644 --- a/src/assistant/assistant/bookmarkmanager.cpp +++ b/src/assistant/assistant/bookmarkmanager.cpp @@ -81,6 +81,12 @@ void BookmarkManager::BookmarkTreeView::subclassKeyPressEvent(QKeyEvent *event) QTreeView::keyPressEvent(event); } +void BookmarkManager::BookmarkTreeView::commitData(QWidget *editor) +{ + QTreeView::commitData(editor); + emit editingDone(); +} + void BookmarkManager::BookmarkTreeView::setExpandedData(const QModelIndex &index) { TRACE_OBJ @@ -142,6 +148,8 @@ void BookmarkManager::addBookmark(const QString &title, const QString &url) TRACE_OBJ showBookmarkDialog(title.isEmpty() ? tr("Untitled") : title, url.isEmpty() ? QLatin1String("about:blank") : url); + + storeBookmarks(); } // -- private @@ -178,6 +186,8 @@ BookmarkManager::BookmarkManager() [this](const QModelIndex &index) { setSourceFromIndex(index, false); }); connect(bookmarkTreeView, &QWidget::customContextMenuRequested, this, &BookmarkManager::customContextMenuRequested); + connect(bookmarkTreeView, &BookmarkTreeView::editingDone, + this, &BookmarkManager::storeBookmarks); connect(&HelpEngineWrapper::instance(), &HelpEngineWrapper::setupFinished, this, &BookmarkManager::setupFinished); @@ -195,13 +205,14 @@ BookmarkManager::BookmarkManager() this, &BookmarkManager::refreshBookmarkToolBar); connect(bookmarkModel, &QAbstractItemModel::dataChanged, this, &BookmarkManager::refreshBookmarkToolBar); + } BookmarkManager::~BookmarkManager() { TRACE_OBJ delete bookmarkManagerWidget; - HelpEngineWrapper::instance().setBookmarks(bookmarkModel->bookmarks()); + storeBookmarks(); delete bookmarkModel; } @@ -225,6 +236,8 @@ void BookmarkManager::removeItem(const QModelIndex &index) return; } bookmarkModel->removeItem(current); + + storeBookmarks(); } bool BookmarkManager::eventFilter(QObject *object, QEvent *event) @@ -332,6 +345,11 @@ void BookmarkManager::setupFinished() typeAndSearchModel->setSourceModel(bookmarkFilterModel); } +void BookmarkManager::storeBookmarks() +{ + HelpEngineWrapper::instance().setBookmarks(bookmarkModel->bookmarks()); +} + void BookmarkManager::addBookmarkActivated() { TRACE_OBJ @@ -517,6 +535,8 @@ void BookmarkManager::managerWidgetAboutToClose() { delete bookmarkManagerWidget; bookmarkManagerWidget = 0; + + storeBookmarks(); } void BookmarkManager::textChanged(const QString &text) diff --git a/src/assistant/assistant/bookmarkmanager.h b/src/assistant/assistant/bookmarkmanager.h index fcdebf4d1..ac3a13a9e 100644 --- a/src/assistant/assistant/bookmarkmanager.h +++ b/src/assistant/assistant/bookmarkmanager.h @@ -77,6 +77,7 @@ private: private slots: void setupFinished(); + void storeBookmarks(); void addBookmarkActivated(); void removeBookmarkActivated(); @@ -137,6 +138,12 @@ public: void subclassKeyPressEvent(QKeyEvent *event); +signals: + void editingDone(); + +protected slots: + void commitData(QWidget *editor); + private slots: void setExpandedData(const QModelIndex &index); }; -- cgit v1.2.1 From 1a60dc756f35b3b19a444c976dcb547f51c30d76 Mon Sep 17 00:00:00 2001 From: Kai Koehne <kai.koehne@qt.io> Date: Mon, 27 Nov 2017 17:22:09 +0100 Subject: SimpleTextViewer example: Remove QObject::tr antipattern Change-Id: I8e7d1dcf9cd2a5a1ccc563032324528fe3262611 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> --- examples/assistant/simpletextviewer/assistant.cpp | 5 +++-- examples/assistant/simpletextviewer/assistant.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/assistant/simpletextviewer/assistant.cpp b/examples/assistant/simpletextviewer/assistant.cpp index 9e668bb7f..58103c14a 100644 --- a/examples/assistant/simpletextviewer/assistant.cpp +++ b/examples/assistant/simpletextviewer/assistant.cpp @@ -108,8 +108,9 @@ bool Assistant::startAssistant() proc->start(app, args); if (!proc->waitForStarted()) { - QMessageBox::critical(nullptr, QObject::tr("Simple Text Viewer"), - QObject::tr("Unable to launch Qt Assistant (%1)").arg(app)); + QMessageBox::critical(nullptr, + tr("Simple Text Viewer"), + tr("Unable to launch Qt Assistant (%1)").arg(app)); return false; } } diff --git a/examples/assistant/simpletextviewer/assistant.h b/examples/assistant/simpletextviewer/assistant.h index dada5a1ee..1ea7dd78f 100644 --- a/examples/assistant/simpletextviewer/assistant.h +++ b/examples/assistant/simpletextviewer/assistant.h @@ -51,6 +51,7 @@ #ifndef ASSISTANT_H #define ASSISTANT_H +#include <QCoreApplication> #include <QString> QT_BEGIN_NAMESPACE @@ -59,6 +60,8 @@ QT_END_NAMESPACE class Assistant { + Q_DECLARE_TR_FUNCTIONS(Assistant) + public: Assistant(); ~Assistant(); -- cgit v1.2.1 From e44c9c4fc1f0fdb20aed13cc2adab3757b1d67f8 Mon Sep 17 00:00:00 2001 From: Oliver Wolff <oliver.wolff@qt.io> Date: Thu, 4 Jan 2018 12:15:44 +0100 Subject: winrtrunner: Do not close handle twice for local apps The handle is closed in AppxEngine's destructor. Change-Id: If672f247537d57705cc18b70e3e5842fca40cb4c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> --- src/winrtrunner/appxlocalengine.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/winrtrunner/appxlocalengine.cpp b/src/winrtrunner/appxlocalengine.cpp index d7cf35b31..b5692cddc 100644 --- a/src/winrtrunner/appxlocalengine.cpp +++ b/src/winrtrunner/appxlocalengine.cpp @@ -349,8 +349,6 @@ AppxLocalEngine::AppxLocalEngine(Runner *runner) AppxLocalEngine::~AppxLocalEngine() { - Q_D(const AppxLocalEngine); - CloseHandle(d->processHandle); } bool AppxLocalEngine::installPackage(IAppxManifestReader *reader, const QString &filePath) -- cgit v1.2.1 From 0d7363be567a99181df53ddfa71f146a88ad1e2f Mon Sep 17 00:00:00 2001 From: Antti Kokko <antti.kokko@qt.io> Date: Thu, 4 Jan 2018 13:50:18 +0200 Subject: Add changes file for Qt 5.9.4 Change-Id: Idaaeec1e0f84573fe87c32b9714a3c9f490dd7dd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> --- dist/changes-5.9.4 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dist/changes-5.9.4 diff --git a/dist/changes-5.9.4 b/dist/changes-5.9.4 new file mode 100644 index 000000000..bbfe8a210 --- /dev/null +++ b/dist/changes-5.9.4 @@ -0,0 +1,24 @@ +Qt 5.9.4 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.9.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.9 series is binary compatible with the 5.8.x series. +Applications compiled for 5.8 will continue to run with 5.9. + +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. + +**************************************************************************** +* Qt 5.9.4 Changes * +**************************************************************************** + + - This release contains only minor code improvements. -- cgit v1.2.1 From 98f8f4971e6c2ffcb0ac5793ffe834197ab034ab Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Date: Tue, 9 Jan 2018 15:04:07 +0100 Subject: update changelog Change-Id: I3e95fd8746c22bcde69605b15ee845f977679d24 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> --- dist/changes-5.9.4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/changes-5.9.4 b/dist/changes-5.9.4 index bbfe8a210..9a713660a 100644 --- a/dist/changes-5.9.4 +++ b/dist/changes-5.9.4 @@ -21,4 +21,8 @@ information about a particular change. * Qt 5.9.4 Changes * **************************************************************************** - - This release contains only minor code improvements. +Build system +------------ + + - [QTBUG-64317] Fixed qt5_add_translation() CMake macro for TS files whose + names contain multiple dots. -- cgit v1.2.1 From e2a971c07422f70436930e71b80c12c5c4e313e1 Mon Sep 17 00:00:00 2001 From: Samuel Gaist <samuel.gaist@edeltech.ch> Date: Thu, 9 Nov 2017 23:45:48 +0100 Subject: windeployqt: Add deployment of the Qt3DAnimation dll Windeployqt currently doesn't deploy the Qt3DAnimation dll when the module is used. This patch fixes this. [ChangeLog][Windows][deployment] The Qt3DAnimation dll is now deployed when the module is used. Change-Id: Ibff744192f6a3e028bb096e33f596cba948b229b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> --- src/windeployqt/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index 235080f5c..6d6d5e5df 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -100,7 +100,8 @@ enum QtModule QtWebChannelModule = 0x0000200000000000, QtTextToSpeechModule = 0x0000400000000000, QtSerialBusModule = 0x0000800000000000, - QtGamePadModule = 0x0001000000000000 + QtGamePadModule = 0x0001000000000000, + Qt3DAnimationModule = 0x0002000000000000 }; struct QtModuleEntry { @@ -156,6 +157,7 @@ static QtModuleEntry qtModuleEntries[] = { { Qt3DQuickModule, "3dquick", "Qt53DQuick", 0 }, { Qt3DQuickRendererModule, "3dquickrenderer", "Qt53DQuickRender", 0 }, { Qt3DInputModule, "3dinput", "Qt53DInput", 0 }, + { Qt3DAnimationModule, "3danimation", "Qt53DAnimation", 0 }, { QtLocationModule, "geoservices", "Qt5Location", 0 }, { QtWebChannelModule, "webchannel", "Qt5WebChannel", 0 }, { QtTextToSpeechModule, "texttospeech", "Qt5TextToSpeech", 0 }, -- cgit v1.2.1