diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-09-05 16:46:13 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-09-05 16:46:33 +0200 |
commit | 99dfabc44a46be0a1a16600435a911a4816afc8c (patch) | |
tree | 647ee6c958d35c25dfea133fdfb4aa3b17f8b48c | |
parent | 29ca3235df5430965b788daf78a8fd8a34ad6c96 (diff) | |
parent | cfe5b8686e58e4f4e0020dd2a7d2972acc421f43 (diff) | |
download | qttools-99dfabc44a46be0a1a16600435a911a4816afc8c.tar.gz |
Merge remote-tracking branch 'origin/dev' into wip/qdoc-clang
Change-Id: I1ed3009c1ffa4494fcb3880db7ae4ec1bbdc4e22
19 files changed, 169 insertions, 69 deletions
diff --git a/.qmake.conf b/.qmake.conf index 138038d54..dc68d3884 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,3 +1,3 @@ load(qt_build_config) -MODULE_VERSION = 5.10.0 +MODULE_VERSION = 5.11.0 diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp index dd5b74bd6..51b514f51 100644 --- a/src/androiddeployqt/main.cpp +++ b/src/androiddeployqt/main.cpp @@ -774,7 +774,8 @@ bool readInputFile(Options *options) { const QJsonValue deploymentDependencies = jsonObject.value(QStringLiteral("deployment-dependencies")); if (!deploymentDependencies.isUndefined()) { - const auto dependencies = deploymentDependencies.toString().splitRef(QLatin1Char(',')); + QString deploymentDependenciesString = deploymentDependencies.toString(); + const auto dependencies = deploymentDependenciesString.splitRef(QLatin1Char(',')); for (const QStringRef &dependency : dependencies) { QString path = options->qtInstallDirectory + QLatin1Char('/') + dependency; if (QFileInfo(path).isDir()) { diff --git a/src/assistant/help/qhelpgenerator.cpp b/src/assistant/help/qhelpgenerator.cpp index c8722499e..d341a04de 100644 --- a/src/assistant/help/qhelpgenerator.cpp +++ b/src/assistant/help/qhelpgenerator.cpp @@ -311,9 +311,6 @@ bool QHelpGenerator::createTables() "NamespaceId INTEGER, " "FileId INTEGER, " "Anchor TEXT )") - << QLatin1String("CREATE TABLE IndexItemTable (" - "Id INTEGER, " - "IndexId INTEGER )") << QLatin1String("CREATE TABLE IndexFilterTable (" "FilterAttributeId INTEGER, " "IndexId INTEGER )") diff --git a/src/designer/src/components/formeditor/formwindow.h b/src/designer/src/components/formeditor/formwindow.h index bda20077f..aca354728 100644 --- a/src/designer/src/components/formeditor/formwindow.h +++ b/src/designer/src/components/formeditor/formwindow.h @@ -70,6 +70,13 @@ class QT_FORMEDITOR_EXPORT FormWindow: public FormWindowBase Q_OBJECT public: + enum HandleOperation + { + NoHandleOperation, + ResizeHandleOperation, + ChangeLayoutSpanHandleOperation + }; + explicit FormWindow(FormEditor *core, QWidget *parent = 0, Qt::WindowFlags flags = 0); virtual ~FormWindow(); @@ -199,6 +206,9 @@ public: bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; + HandleOperation handleOperation() const { return m_handleOperation; } + void setHandleOperation(HandleOperation o) { m_handleOperation = o; } + signals: void contextMenuRequested(QMenu *menu, QWidget *widget); @@ -354,6 +364,7 @@ private: QStringList m_includeHints; QPoint m_contextMenuPosition; + HandleOperation m_handleOperation = NoHandleOperation; private: friend class WidgetEditorTool; diff --git a/src/designer/src/components/formeditor/formwindowmanager.cpp b/src/designer/src/components/formeditor/formwindowmanager.cpp index 2cccd851e..0341c920b 100644 --- a/src/designer/src/components/formeditor/formwindowmanager.cpp +++ b/src/designer/src/components/formeditor/formwindowmanager.cpp @@ -209,6 +209,14 @@ bool FormWindowManager::eventFilter(QObject *o, QEvent *e) return true; } switch (eventType) { + case QEvent::LayoutRequest: + // QTBUG-61439: Suppress layout request while changing the QGridLayout + // span of a QTabWidget, which sends LayoutRequest in resizeEvent(). + if (fw->handleOperation() == FormWindow::ChangeLayoutSpanHandleOperation) { + e->ignore(); + return true; + } + break; case QEvent::WindowActivate: { if (fw->parentWidget()->isWindow() && fw->isMainContainer(managedWidget) && activeFormWindow() != fw) { diff --git a/src/designer/src/components/formeditor/widgetselection.cpp b/src/designer/src/components/formeditor/widgetselection.cpp index eda77e213..fcb54de92 100644 --- a/src/designer/src/components/formeditor/widgetselection.cpp +++ b/src/designer/src/components/formeditor/widgetselection.cpp @@ -178,6 +178,17 @@ void WidgetHandle::mousePressEvent(QMouseEvent *e) m_origPressPos = container->mapFromGlobal(e->globalPos()); m_geom = m_origGeom = m_widget->geometry(); + + switch (WidgetSelection::widgetState(m_formWindow->core(), m_widget)) { + case WidgetSelection::UnlaidOut: + case WidgetSelection::LaidOut: + m_formWindow->setHandleOperation(FormWindow::ResizeHandleOperation); + break; + case WidgetSelection::ManagedGridLayout: + case WidgetSelection::ManagedFormLayout: + m_formWindow->setHandleOperation(FormWindow::ChangeLayoutSpanHandleOperation); + break; + } } void WidgetHandle::mouseMoveEvent(QMouseEvent *e) @@ -326,6 +337,8 @@ void WidgetHandle::mouseMoveEvent(QMouseEvent *e) void WidgetHandle::mouseReleaseEvent(QMouseEvent *e) { + m_formWindow->setHandleOperation(FormWindow::NoHandleOperation); + if (e->button() != Qt::LeftButton || !m_active) return; diff --git a/src/designer/src/components/lib/lib_pch.h b/src/designer/src/components/lib/lib_pch.h index f2f226797..d03a498c2 100644 --- a/src/designer/src/components/lib/lib_pch.h +++ b/src/designer/src/components/lib/lib_pch.h @@ -26,5 +26,7 @@ ** ****************************************************************************/ +#if defined __cplusplus #include <QtDesigner/QtDesigner> #include <QtDesigner/QExtensionManager> +#endif diff --git a/src/designer/src/uitools/quiloader_p.h b/src/designer/src/uitools/quiloader_p.h index f9371fac4..86e970f49 100644 --- a/src/designer/src/uitools/quiloader_p.h +++ b/src/designer/src/uitools/quiloader_p.h @@ -1,11 +1,11 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Designer of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:GPL-EXCEPT$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the @@ -14,13 +14,24 @@ ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** ** $QT_END_LICENSE$ ** diff --git a/src/qtattributionsscanner/main.cpp b/src/qtattributionsscanner/main.cpp index cd9bc1fed..700bf8814 100644 --- a/src/qtattributionsscanner/main.cpp +++ b/src/qtattributionsscanner/main.cpp @@ -44,12 +44,13 @@ int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); a.setApplicationName(QStringLiteral("Qt Attributions Scanner")); - a.setApplicationVersion(QStringLiteral("1.0")); + a.setApplicationVersion(QStringLiteral("1.1")); QCommandLineParser parser; - parser.setApplicationDescription(tr("Searches and processes qt_attribution.json files in Qt sources.")); - parser.addPositionalArgument(QStringLiteral("directory"), - tr("The directory to scan recursively.")); + parser.setApplicationDescription(tr("Processes qt_attribution.json files in Qt sources.")); + parser.addPositionalArgument(QStringLiteral("path"), + tr("Path to a qt_attribution.json file, " + "or a directory to be scannned recursively.")); parser.addHelpOption(); parser.addVersionOption(); @@ -60,6 +61,10 @@ int main(int argc, char *argv[]) QCommandLineOption filterOption(QStringLiteral("filter"), tr("Filter packages according to <filter> (e.g. QDocModule=qtcore)"), QStringLiteral("expression")); + QCommandLineOption baseDirOption(QStringLiteral("basedir"), + tr("Paths in documentation are made relative to this " + "directory."), + QStringLiteral("directory")); QCommandLineOption outputOption({ QStringLiteral("o"), QStringLiteral("output") }, tr("Write generated data to <file>."), QStringLiteral("file")); @@ -70,6 +75,7 @@ int main(int argc, char *argv[]) parser.addOption(generatorOption); parser.addOption(filterOption); + parser.addOption(baseDirOption); parser.addOption(outputOption); parser.addOption(verboseOption); parser.addOption(silentOption); @@ -90,13 +96,22 @@ int main(int argc, char *argv[]) if (parser.positionalArguments().size() != 1) parser.showHelp(2); - const QString directory = parser.positionalArguments().last(); - - if (logLevel == VerboseLog) - std::cerr << qPrintable(tr("Recursively scanning %1 for qt_attribution.json files...").arg( - QDir::toNativeSeparators(directory))) << std::endl; - - QVector<Package> packages = Scanner::scanDirectory(directory, logLevel); + const QString path = parser.positionalArguments().last(); + + QVector<Package> packages; + const QFileInfo pathInfo(path); + if (pathInfo.isDir()) { + if (logLevel == VerboseLog) + std::cerr << qPrintable(tr("Recursively scanning %1 for qt_attribution.json files...").arg( + QDir::toNativeSeparators(path))) << std::endl; + packages = Scanner::scanDirectory(path, logLevel); + } else if (pathInfo.isFile()) { + packages = Scanner::readFile(path, logLevel); + } else { + std::cerr << qPrintable(tr("%1 is not a valid file or directory.").arg( + QDir::toNativeSeparators(path))) << std::endl << std::endl; + parser.showHelp(7); + } if (parser.isSet(filterOption)) { PackageFilter filter(parser.value(filterOption)); @@ -124,8 +139,16 @@ int main(int argc, char *argv[]) QString generator = parser.value(generatorOption); if (generator == QLatin1String("qdoc")) { - // include top level module name in printed paths - QString baseDirectory = QDir(directory).absoluteFilePath(QStringLiteral("..")); + QString baseDirectory = parser.value(baseDirOption); + if (baseDirectory.isEmpty()) { + if (pathInfo.isDir()) { + // include top level module name in printed paths + baseDirectory = pathInfo.dir().absoluteFilePath(QStringLiteral("..")); + } else { + baseDirectory = pathInfo.absoluteDir().absoluteFilePath(QStringLiteral("..")); + } + } + QDocGenerator::generate(out, packages, baseDirectory, logLevel); } else if (generator == QLatin1String("json")) { JsonGenerator::generate(out, packages, logLevel); diff --git a/src/qtattributionsscanner/scanner.cpp b/src/qtattributionsscanner/scanner.cpp index 488417e89..d7d958138 100644 --- a/src/qtattributionsscanner/scanner.cpp +++ b/src/qtattributionsscanner/scanner.cpp @@ -140,7 +140,7 @@ static Package readPackage(const QJsonObject &object, const QString &filePath, L return p; } -static QVector<Package> readFile(const QString &filePath, LogLevel logLevel) +QVector<Package> readFile(const QString &filePath, LogLevel logLevel) { if (logLevel == VerboseLog) { std::cerr << qPrintable(tr("Reading file %1...").arg( diff --git a/src/qtattributionsscanner/scanner.h b/src/qtattributionsscanner/scanner.h index 5d93cb8ee..f3ae9f0ea 100644 --- a/src/qtattributionsscanner/scanner.h +++ b/src/qtattributionsscanner/scanner.h @@ -37,6 +37,7 @@ namespace Scanner { +QVector<Package> readFile(const QString &filePath, LogLevel logLevel); QVector<Package> scanDirectory(const QString &directory, LogLevel logLevel); } diff --git a/src/windeployqt/main.cpp b/src/windeployqt/main.cpp index 8ec4a6205..8ed6fffdf 100644 --- a/src/windeployqt/main.cpp +++ b/src/windeployqt/main.cpp @@ -817,7 +817,8 @@ static const PluginModuleMapping pluginModuleMappings[] = {"qtwebengine", QtWebEngineModule | QtWebEngineCoreModule | QtWebEngineWidgetsModule}, {"styles", QtWidgetsModule}, {"sceneparsers", Qt3DRendererModule}, - {"renderplugins", Qt3DRendererModule} + {"renderplugins", Qt3DRendererModule}, + {"geometryloaders", Qt3DRendererModule} }; static inline quint64 qtModuleForPlugin(const QString &subDirName) @@ -1048,7 +1049,10 @@ static QString vcRedistDir() const QFileInfoList subDirs = QDir(vc2017RedistDirName).entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name | QDir::Reversed); for (const QFileInfo &f : subDirs) { - const QString path = f.absoluteFilePath(); + QString path = f.absoluteFilePath(); + if (QFileInfo(path + slash + vcDebugRedistDir()).isDir()) + return path; + path += QStringLiteral("/onecore"); if (QFileInfo(path + slash + vcDebugRedistDir()).isDir()) return path; } @@ -1547,6 +1551,7 @@ static bool deployWebEngineCore(const QMap<QString, QString> &qmakeVariables, const Options &options, bool isDebug, QString *errorMessage) { static const char *installDataFiles[] = {"icudtl.dat", + "qtwebengine_devtools_resources.pak", "qtwebengine_resources.pak", "qtwebengine_resources_100p.pak", "qtwebengine_resources_200p.pak"}; diff --git a/src/windeployqt/qmlutils.cpp b/src/windeployqt/qmlutils.cpp index 9e8bb09e2..52f044068 100644 --- a/src/windeployqt/qmlutils.cpp +++ b/src/windeployqt/qmlutils.cpp @@ -39,6 +39,11 @@ QT_BEGIN_NAMESPACE +bool operator==(const QmlImportScanResult::Module &m1, const QmlImportScanResult::Module &m2) +{ + return m1.className.isEmpty() ? m1.name == m2.name : m1.className == m2.className; +} + // Return install path (cp -r semantics) QString QmlImportScanResult::Module::installPath(const QString &root) const { @@ -153,19 +158,10 @@ QmlImportScanResult runQmlImportScanner(const QString &directory, const QString return result; } -static inline bool contains(const QList<QmlImportScanResult::Module> &modules, const QString &className) -{ - for (const QmlImportScanResult::Module &m : modules) { - if (m.className == className) - return true; - } - return false; -} - void QmlImportScanResult::append(const QmlImportScanResult &other) { for (const QmlImportScanResult::Module &module : other.modules) { - if (!contains(modules, module.className)) + if (std::find(modules.cbegin(), modules.cend(), module) == modules.cend()) modules.append(module); } for (const QString &plugin : other.plugins) { diff --git a/src/windeployqt/qmlutils.h b/src/windeployqt/qmlutils.h index 5e1ddc619..895c7f1de 100644 --- a/src/windeployqt/qmlutils.h +++ b/src/windeployqt/qmlutils.h @@ -55,6 +55,8 @@ struct QmlImportScanResult { QStringList plugins; }; +bool operator==(const QmlImportScanResult::Module &m1, const QmlImportScanResult::Module &m2); + QmlImportScanResult runQmlImportScanner(const QString &directory, const QString &qmlImportPath, bool usesWidgets, int platform, DebugMatchMode debugMatchMode, QString *errorMessage); diff --git a/src/winrtrunner/appxlocalengine.cpp b/src/winrtrunner/appxlocalengine.cpp index 3c89d715c..d7cf35b31 100644 --- a/src/winrtrunner/appxlocalengine.cpp +++ b/src/winrtrunner/appxlocalengine.cpp @@ -412,18 +412,6 @@ bool AppxLocalEngine::installPackage(IAppxManifestReader *reader, const QString return false; } - ComPtr<IAsyncInfo> asyncInfo; - hr = deploymentOperation.As(&asyncInfo); - RETURN_FALSE_IF_FAILED("Failed to cast deployment operation to info."); - AsyncStatus status; - hr = asyncInfo->get_Status(&status); - RETURN_FALSE_IF_FAILED("Failed to retrieve deployment operation's status."); - - if (status != Completed) { - qCWarning(lcWinRtRunner) << "Deployment operation did not succeed."; - return false; - } - ComPtr<IDeploymentResult> results; hr = deploymentOperation->GetResults(&results); RETURN_FALSE_IF_FAILED("Failed to retrieve package registration results."); @@ -433,10 +421,15 @@ bool AppxLocalEngine::installPackage(IAppxManifestReader *reader, const QString RETURN_FALSE_IF_FAILED("Failed to retrieve extended error code."); if (FAILED(errorCode)) { - HString errorText; - if (SUCCEEDED(results->get_ErrorText(errorText.GetAddressOf()))) { - qCWarning(lcWinRtRunner) << "Unable to register package:" - << QString::fromWCharArray(errorText.GetRawBuffer(NULL)); + if (HRESULT_CODE(errorCode) == ERROR_INSTALL_PREREQUISITE_FAILED) { + qCWarning(lcWinRtRunner) << "Unable to register package: A requirement for installation was not met. " + "Check that your Windows version matches TargetDeviceFamily's MinVersion set in your AppxManifest.xml."; + } else { + HString errorText; + if (SUCCEEDED(results->get_ErrorText(errorText.GetAddressOf()))) { + qCWarning(lcWinRtRunner) << "Unable to register package:" + << QString::fromWCharArray(errorText.GetRawBuffer(NULL)); + } } if (HRESULT_CODE(errorCode) == ERROR_INSTALL_POLICY_FAILURE) { // The user's license has expired. Give them the opportunity to renew it. diff --git a/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp b/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp index da7e03779..10cfff9ac 100644 --- a/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp +++ b/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp @@ -137,12 +137,6 @@ void tst_QHelpGenerator::checkIndices() || m_query->value(1).toString() != QLatin1String("foo")) QFAIL("Index Error!"); - /* - m_query->exec("SELECT COUNT(DISTINCT Id) FROM IndexItemTable"); - if (!m_query->next() || m_query->value(0).toInt() != 7) - QFAIL("Index Error!"); - */ - m_query->exec("SELECT COUNT(a.Id) FROM IndexTable a, " "IndexFilterTable b, FilterAttributeTable c WHERE a.Id=b.IndexId " "AND b.FilterAttributeId=c.Id AND c.Name=\'filter2\'"); diff --git a/tests/auto/qtattributionsscanner/testdata/good/minimal/expected.error b/tests/auto/qtattributionsscanner/testdata/good/minimal/expected.error new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/auto/qtattributionsscanner/testdata/good/minimal/expected.error diff --git a/tests/auto/qtattributionsscanner/testdata/good/minimal/expected.json b/tests/auto/qtattributionsscanner/testdata/good/minimal/expected.json new file mode 100644 index 000000000..6a75269c0 --- /dev/null +++ b/tests/auto/qtattributionsscanner/testdata/good/minimal/expected.json @@ -0,0 +1,21 @@ +[ + { + "Copyright": "Copyright", + "Description": "", + "Homepage": "", + "Id": "minimal", + "License": "License", + "LicenseFile": "", + "LicenseId": "", + "Name": "Minimal", + "Path": "%{PWD}", + "Files": "", + "QDocModule": "qtest", + "QtParts": [ + "libs" + ], + "QtUsage": "Usage", + "Version": "", + "DownloadLocation": "" + } +] diff --git a/tests/auto/qtattributionsscanner/tst_qtattributionsscanner.cpp b/tests/auto/qtattributionsscanner/tst_qtattributionsscanner.cpp index c3e8bb9b6..7740fde9b 100644 --- a/tests/auto/qtattributionsscanner/tst_qtattributionsscanner.cpp +++ b/tests/auto/qtattributionsscanner/tst_qtattributionsscanner.cpp @@ -47,6 +47,8 @@ private slots: void test(); private: + void readExpectedFile(const QString &baseDir, const QString &fileName, QByteArray *content); + QString m_cmd; QString m_basePath; }; @@ -62,25 +64,45 @@ tst_qtattributionsscanner::tst_qtattributionsscanner() void tst_qtattributionsscanner::test_data() { - QTest::addColumn<QString>("directory"); - QTest::newRow("good") << QStringLiteral("good"); - QTest::newRow("warnings (incomplete)") << QStringLiteral("warnings/incomplete"); - QTest::newRow("warnings (unknown attribute)") << QStringLiteral("warnings/unknown"); + QTest::addColumn<QString>("input"); + QTest::addColumn<QString>("stdout_file"); + QTest::addColumn<QString>("stderr_file"); + + QTest::newRow("good") + << QStringLiteral("good") + << QStringLiteral("good/expected.json") + << QStringLiteral("good/expected.error"); + QTest::newRow("warnings (incomplete)") + << QStringLiteral("warnings/incomplete") + << QStringLiteral("warnings/incomplete/expected.json") + << QStringLiteral("warnings/incomplete/expected.error"); + QTest::newRow("warnings (unknown attribute)") + << QStringLiteral("warnings/unknown") + << QStringLiteral("warnings/unknown/expected.json") + << QStringLiteral("warnings/unknown/expected.error"); + QTest::newRow("singlefile") + << QStringLiteral("good/minimal/qt_attribution.json") + << QStringLiteral("good/minimal/expected.json") + << QStringLiteral("good/minimal/expected.error"); } -static void readExpectedFile(const QString &dir, const QString &fileName, QByteArray *content) +void tst_qtattributionsscanner::readExpectedFile(const QString &baseDir, const QString &fileName, QByteArray *content) { - QFile file(QDir(dir).absoluteFilePath(fileName)); + QFile file(QDir(m_basePath).absoluteFilePath(fileName)); QVERIFY2(file.open(QIODevice::ReadOnly | QIODevice::Text), "Could not open " + file.fileName().toLocal8Bit()); *content = file.readAll(); - content->replace("%{PWD}", dir.toUtf8()); + content->replace("%{PWD}", baseDir.toUtf8()); } void tst_qtattributionsscanner::test() { - QFETCH(QString, directory); + QFETCH(QString, input); + QFETCH(QString, stdout_file); + QFETCH(QString, stderr_file); - QString dir = QDir(m_basePath).absoluteFilePath(directory); + QString dir = QDir(m_basePath).absoluteFilePath(input); + if (QFileInfo(dir).isFile()) + dir = QFileInfo(dir).absolutePath(); QProcess proc; QString command = m_cmd + " " + dir + " --output-format json"; @@ -100,7 +122,7 @@ void tst_qtattributionsscanner::test() stdErr.replace(QDir::separator(), "/"); QByteArray expectedErrorOutput; - readExpectedFile(dir, "expected.error", &expectedErrorOutput); + readExpectedFile(dir, stderr_file, &expectedErrorOutput); QCOMPARE(stdErr, expectedErrorOutput); } @@ -113,7 +135,7 @@ void tst_qtattributionsscanner::test() QVERIFY2(!actualJson.isNull(), "Invalid output: " + jsonError.errorString().toLatin1()); QByteArray expectedOutput; - readExpectedFile(dir, "expected.json", &expectedOutput); + readExpectedFile(dir, stdout_file, &expectedOutput); QJsonDocument expectedJson = QJsonDocument::fromJson(expectedOutput); if (!QTest::qCompare(actualJson, expectedJson, "actualJson", "expectedJson", __FILE__, __LINE__)) { |