diff options
author | Kai Koehne <kai.koehne@qt.io> | 2018-11-30 14:10:08 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2018-12-06 08:06:14 +0000 |
commit | b402c1cff5deefd382bbcc56900c66c7ed0124ed (patch) | |
tree | 140cfb6fa79d53447e5778e2773803978cf3fd3a | |
parent | a68d402df3bf2766a0c60b6183185a7137b502ca (diff) | |
download | qttools-b402c1cff5deefd382bbcc56900c66c7ed0124ed.tar.gz |
assistant: Set error string when failing to openCollectionFile()
Task-number: QTBUG-72095
Change-Id: I13063afe493232db4c60c3dee686473a3f6e5804
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
-rw-r--r-- | src/assistant/help/qhelpcollectionhandler.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/assistant/help/qhelpcollectionhandler.cpp b/src/assistant/help/qhelpcollectionhandler.cpp index b1a09d126..32ce01bf0 100644 --- a/src/assistant/help/qhelpcollectionhandler.cpp +++ b/src/assistant/help/qhelpcollectionhandler.cpp @@ -195,8 +195,10 @@ bool QHelpCollectionHandler::openCollectionFile() const FileInfoList &docList = registeredDocumentations(); if (indexAndNamespaceFilterTablesMissing) { for (const QHelpCollectionHandler::FileInfo &info : docList) { - if (!registerIndexAndNamespaceFilterTables(info.namespaceName)) + if (!registerIndexAndNamespaceFilterTables(info.namespaceName)) { + emit error(tr("Cannot register index tables in file %1.").arg(collectionFile())); return false; + } } return true; } @@ -224,8 +226,10 @@ bool QHelpCollectionHandler::openCollectionFile() // In this case we remove all records from tables. Transaction transaction(m_connectionName); for (const TimeStamp &timeStamp : toRemove) { - if (!unregisterIndexTable(timeStamp.namespaceId, timeStamp.folderId)) + if (!unregisterIndexTable(timeStamp.namespaceId, timeStamp.folderId)) { + emit error(tr("Cannot unregister index tables in file %1.").arg(collectionFile())); return false; + } } transaction.commit(); |