diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 2 | ||||
-rw-r--r-- | src/plugins/marketplace/productlistmodel.cpp | 2 | ||||
-rw-r--r-- | src/plugins/mcusupport/mcusupportoptionspage.cpp | 64 | ||||
-rw-r--r-- | src/plugins/projectexplorer/msvcparser.cpp | 25 |
4 files changed, 63 insertions, 30 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 1518e1ee8e..0fadcc150a 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -3261,7 +3261,7 @@ void GdbEngine::handlePeripheralRegisterListValues( const QString output = response.consoleStreamOutput; // Regexp to match for '0x50060800:\t0\n'. - const QRegularExpression re("^(0x[0-9A-F]+):\\t(\\d+)\\n$"); + const QRegularExpression re("^(0x[0-9A-Fa-f]+):\\t(\\d+)\\n$"); const QRegularExpressionMatch m = re.match(output); if (!m.hasMatch()) return; diff --git a/src/plugins/marketplace/productlistmodel.cpp b/src/plugins/marketplace/productlistmodel.cpp index a49f544c3d..cded10ee37 100644 --- a/src/plugins/marketplace/productlistmodel.cpp +++ b/src/plugins/marketplace/productlistmodel.cpp @@ -106,7 +106,7 @@ void ProductListModel::onFetchCollectionsFinished(QNetworkReply *reply) const auto handle = obj.value("handle").toString(); const int productsCount = obj.value("products_count").toInt(); - if (productsCount > 0 && handle != "all-products") + if (productsCount > 0 && handle != "all-products" && handle != "qt-education-1") m_pendingCollections.append(handle); } if (!m_pendingCollections.isEmpty()) diff --git a/src/plugins/mcusupport/mcusupportoptionspage.cpp b/src/plugins/mcusupport/mcusupportoptionspage.cpp index b06a97f174..56db70972a 100644 --- a/src/plugins/mcusupport/mcusupportoptionspage.cpp +++ b/src/plugins/mcusupport/mcusupportoptionspage.cpp @@ -43,6 +43,7 @@ #include <QFormLayout> #include <QGroupBox> #include <QLabel> +#include <QPushButton> #include <QVBoxLayout> namespace McuSupport { @@ -77,6 +78,8 @@ private: QGroupBox *m_kitCreationGroupBox = nullptr; Utils::InfoLabel *m_kitCreationInfoLabel = nullptr; Utils::InfoLabel *m_statusInfoLabel = nullptr; + QPushButton *m_kitCreationPushButton = nullptr; + QPushButton *m_kitRemovalPushButton = nullptr; }; McuSupportOptionsWidget::McuSupportOptionsWidget() @@ -130,10 +133,24 @@ McuSupportOptionsWidget::McuSupportOptionsWidget() m_kitCreationGroupBox->setFlat(true); mainLayout->addWidget(m_kitCreationGroupBox); m_kitCreationInfoLabel = new Utils::InfoLabel; - m_kitCreationInfoLabel->setElideMode(Qt::ElideNone); - m_kitCreationInfoLabel->setWordWrap(true); - auto layout = new QVBoxLayout(m_kitCreationGroupBox); - layout->addWidget(m_kitCreationInfoLabel); + auto vLayout = new QHBoxLayout(m_kitCreationGroupBox); + vLayout->addWidget(m_kitCreationInfoLabel); + m_kitCreationPushButton = new QPushButton(tr("Create Kit")); + m_kitCreationPushButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); + connect(m_kitCreationPushButton, &QPushButton::clicked, this, [this] { + McuSupportOptions::newKit(currentMcuTarget(), m_options.qtForMCUsSdkPackage); + McuSupportOptions::registerQchFiles(); + updateStatus(); + }); + m_kitRemovalPushButton = new QPushButton(tr("Remove Kit")); + m_kitRemovalPushButton->setSizePolicy(m_kitCreationPushButton->sizePolicy()); + connect(m_kitRemovalPushButton, &QPushButton::clicked, this, [this] { + for (auto existingKit : McuSupportOptions::existingKits(currentMcuTarget())) + ProjectExplorer::KitManager::deregisterKit(existingKit); + updateStatus(); + }); + vLayout->addWidget(m_kitCreationPushButton); + vLayout->addWidget(m_kitRemovalPushButton); } mainLayout->addStretch(); @@ -162,15 +179,23 @@ void McuSupportOptionsWidget::updateStatus() // Kit creation status if (mcuTarget) { const bool mcuTargetValid = mcuTarget->isValid(); - m_kitCreationInfoLabel->setType(mcuTargetValid ? Utils::InfoLabel::Ok - : Utils::InfoLabel::NotOk); - m_kitCreationInfoLabel->setText( - mcuTargetValid ? QString::fromLatin1( - "A kit <b>%1</b> for the selected target can be " - "generated. Press Apply to generate it.") - .arg(McuSupportOptions::kitName(mcuTarget)) - : "Provide the package paths in order to create a kit " - "for your target."); + m_kitCreationPushButton->setVisible(mcuTargetValid); + m_kitRemovalPushButton->setVisible(mcuTargetValid); + if (mcuTargetValid) { + const bool mcuTargetKitExists = !McuSupportOptions::existingKits(mcuTarget).isEmpty(); + m_kitCreationInfoLabel->setType(mcuTargetKitExists + ? Utils::InfoLabel::Information + : Utils::InfoLabel::Ok); + m_kitCreationInfoLabel->setText(mcuTargetKitExists + ? tr("A kit for the selected target exists.") + : tr("A kit for the selected target can be created.")); + m_kitCreationPushButton->setEnabled(!mcuTargetKitExists); + m_kitRemovalPushButton->setEnabled(mcuTargetKitExists); + } else { + m_kitCreationInfoLabel->setType(Utils::InfoLabel::NotOk); + m_kitCreationInfoLabel->setText("Provide the package paths in order to create a kit " + "for your target."); + } } // Status label in the bottom @@ -226,19 +251,6 @@ void McuSupportOptionsWidget::apply() m_options.qtForMCUsSdkPackage->writeToSettings(); for (auto package : m_options.packages) package->writeToSettings(); - - if (!isVisible()) - return; - - McuSupportOptions::registerQchFiles(); - - const McuTarget *mcuTarget = currentMcuTarget(); - if (!mcuTarget) - return; - - for (auto existingKit : McuSupportOptions::existingKits(mcuTarget)) - ProjectExplorer::KitManager::deregisterKit(existingKit); - McuSupportOptions::newKit(mcuTarget, m_options.qtForMCUsSdkPackage); } void McuSupportOptionsWidget::populateMcuTargetsComboBox() diff --git a/src/plugins/projectexplorer/msvcparser.cpp b/src/plugins/projectexplorer/msvcparser.cpp index 39a41f3663..9512ed94a3 100644 --- a/src/plugins/projectexplorer/msvcparser.cpp +++ b/src/plugins/projectexplorer/msvcparser.cpp @@ -202,7 +202,7 @@ void MsvcParser::doFlush() // ".\qwindowsgdinativeinterface.cpp(48,3) : error: unknown type name 'errr'" static inline QString clangClCompilePattern() { - return QLatin1String(FILE_POS_PATTERN) + " (warning|error): (.*)$"; + return QLatin1String(FILE_POS_PATTERN) + " ?(warning|error): (.*)$"; } ClangClParser::ClangClParser() @@ -624,6 +624,27 @@ void ProjectExplorerPlugin::testClangClOutputParsers_data() << CompileTask(Task::Error, error2.trimmed(), FilePath::fromUserInput(".\\qwindowsgdinativeinterface.cpp"), 51)) << ""; + + QTest::newRow("other error") + << "C:\\Program Files\\LLVM\\bin\\clang-cl.exe /nologo /c /EHsc /Od -m64 /Zi /MDd " + "/DUNICODE /D_UNICODE /DWIN32 /FdTestForError.cl.pdb " + "/FoC:\\MyData\\Project_home\\cpp\build-TestForError-msvc_2017_clang-Debug\\Debug_msvc_201_47eca974c876c8b3\\TestForError.b6dd39ae\\3a52ce780950d4d9\\main.cpp.obj " + "C:\\MyData\\Project_home\\cpp\\TestForError\\main.cpp /TP\r\n" + "C:\\MyData\\Project_home\\cpp\\TestForError\\main.cpp(3,10): error: expected ';' after return statement\r\n" + "return 0\r\n" + " ^\r\n" + " ;" + << OutputParserTester::STDERR + << "" + << "C:\\Program Files\\LLVM\\bin\\clang-cl.exe /nologo /c /EHsc /Od -m64 /Zi /MDd " + "/DUNICODE /D_UNICODE /DWIN32 /FdTestForError.cl.pdb " + "/FoC:\\MyData\\Project_home\\cpp\build-TestForError-msvc_2017_clang-Debug\\Debug_msvc_201_47eca974c876c8b3\\TestForError.b6dd39ae\\3a52ce780950d4d9\\main.cpp.obj " + "C:\\MyData\\Project_home\\cpp\\TestForError\\main.cpp /TP\r\n" + " ;\n" + << Tasks{CompileTask(Task::Error, "expected ';' after return statement\nreturn 0", + FilePath::fromUserInput("C:\\MyData\\Project_home\\cpp\\TestForError\\main.cpp"), + 3)} + << ""; } void ProjectExplorerPlugin::testClangClOutputParsers() @@ -632,9 +653,9 @@ void ProjectExplorerPlugin::testClangClOutputParsers() testbench.appendOutputParser(new ClangClParser); QFETCH(QString, input); QFETCH(OutputParserTester::Channel, inputChannel); - QFETCH(Tasks, tasks); QFETCH(QString, childStdOutLines); QFETCH(QString, childStdErrLines); + QFETCH(Tasks, tasks); QFETCH(QString, outputLines); testbench.testParsing(input, inputChannel, |