diff --git a/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs b/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs index 823e827b347..2f392772fba 100644 --- a/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs +++ b/dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs @@ -60,11 +60,8 @@ Component.prototype.beginInstallation = function() else if (installer.value("os") == "mac") component.qtCreatorBinaryPath = component.qtCreatorBinaryPath + "/Qt Creator.app/Contents/MacOS/Qt Creator"; - if ( installer.value("os") === "win" ) { + if ( installer.value("os") === "win" ) component.setStopProcessForUpdateRequest(component.qtCreatorBinaryPath, true); - component.setStopProcessForUpdateRequest("@TargetDir@/bin/linguist.exe", true); - component.setStopProcessForUpdateRequest("@TargetDir@/bin/qmlviewer.exe", true); - } } registerCommonWindowsFileTypeExtensions = function() diff --git a/doc/src/analyze/cpu-usage-analyzer.qdoc b/doc/src/analyze/cpu-usage-analyzer.qdoc index e3eb74cdfdc..432e9fb917d 100644 --- a/doc/src/analyze/cpu-usage-analyzer.qdoc +++ b/doc/src/analyze/cpu-usage-analyzer.qdoc @@ -132,6 +132,14 @@ data, and the processing delay may grow excessively. You should then lower the \uicontrol {Sampling frequency} or the \uicontrol {Stack snapshot size}. + \section2 Adding Command Line Options For Perf + + You can specify additional command line options to be passed to Perf when + recording data in the \uicontrol {Additional arguments} field. You may want + to specify \c{--no-delay} or \c{--no-buffering} to reduce the processing delay. + However, those options are not supported by all versions of Perf and Perf may + not start if an unsupported option is given. + \section1 Analyzing Collected Data The \uicontrol Timeline view displays a graphical representation of CPU @@ -248,4 +256,26 @@ back its own data in a sensible way by checking the output of \c {perf report} or \c {perf script} in the recorded Perf data files. + \section1 Troubleshooting + + The CPU Usage Analyzer might fail to record data for the following reasons: + + \list 1 + \li The connection between the target device and the host may not be + fast enough to transfer the data produced by Perf. Try lowering + the \uicontrol {Stack snapshot size} or + \uicontrol {Sampling Frequency} settings. + \li Perf may be buffering the data forever, never sending it. Add + \c {--no-delay} or \c {--no-buffering} to the + \uicontrol {Additional arguments} field. + \li Some versions of Perf will not start recording unless given a + certain minimum sampling frequency. Try with a + \uicontrol {Sampling Frequency} of 1000. + \li On some devices, Perf support is not very stable and the Linux + kernel may randomly fail to record data after some time. Reboot the + device and try again. + \endlist + + Output from the helper program that processes the data is displayed in the + \uicontrol {General Messages} output pane. */ diff --git a/share/qtcreator/qml-type-descriptions/qt5QtQuick2-bundle.json b/share/qtcreator/qml-type-descriptions/qt5QtQuick2-bundle.json index 733e0c95449..961697918bb 100644 --- a/share/qtcreator/qml-type-descriptions/qt5QtQuick2-bundle.json +++ b/share/qtcreator/qml-type-descriptions/qt5QtQuick2-bundle.json @@ -25,6 +25,11 @@ "QtPositioning 5.2", "QtPositioning 5.3", "QtPurchasing 1.0", + "QtQml 2.0", + "QtQml 2.1", + "QtQml 2.2", + "QtQml.Models 2.1", + "QtQml.Models 2.2", "QtQuick.Controls 1.0", "QtQuick.Controls 1.1", "QtQuick.Controls 1.2", diff --git a/share/qtcreator/templates/qtquick/qtquick_2_4/MainForm.ui.qml b/share/qtcreator/templates/qtquick/qtquick_2_4/MainForm.ui.qml index 2e696443642..2443b996e2d 100644 --- a/share/qtcreator/templates/qtquick/qtquick_2_4/MainForm.ui.qml +++ b/share/qtcreator/templates/qtquick/qtquick_2_4/MainForm.ui.qml @@ -1,4 +1,4 @@ -import QtQuick 2.3 +import QtQuick 2.4 Rectangle { property alias mouseArea: mouseArea diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index b78237a6e1e..7b6927eccce 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -25125,11 +25125,23 @@ These files are preserved. The name of the debug build configuration created by default for a qbs project. Отладка + + Debug + Shadow build directory suffix + Non-ASCII characters in directory suffix may cause build issues. + Debug + Release The name of the release build configuration created by default for a qbs project. Выпуск + + Release + Shadow build directory suffix + Non-ASCII characters in directory suffix may cause build issues. + Release + QbsProjectManager::Internal::QbsBuildConfigurationWidget @@ -25173,7 +25185,7 @@ These files are preserved. Keep going - Не сдаваться + Пропускать ошибки Properties: @@ -25217,11 +25229,11 @@ These files are preserved. Install - Установить + Устанавливать Clean install root - Очищать корень установки + Очищать каталог установки diff --git a/src/libs/timeline/timelinemodel.cpp b/src/libs/timeline/timelinemodel.cpp index 2b1d7d50cc1..5498077bfd8 100644 --- a/src/libs/timeline/timelinemodel.cpp +++ b/src/libs/timeline/timelinemodel.cpp @@ -121,8 +121,10 @@ void TimelineModel::setCollapsedRowCount(int rows) if (d->collapsedRowCount != rows) { d->collapsedRowCount = rows; emit collapsedRowCountChanged(); - if (!d->expanded) + if (!d->expanded) { emit rowCountChanged(); + emit heightChanged(); // collapsed rows have a fixed size + } } } @@ -136,12 +138,16 @@ void TimelineModel::setExpandedRowCount(int rows) { Q_D(TimelineModel); if (d->expandedRowCount != rows) { + int prevHeight = height(); if (d->rowOffsets.length() > rows) d->rowOffsets.resize(rows); d->expandedRowCount = rows; emit expandedRowCountChanged(); - if (d->expanded) + if (d->expanded) { emit rowCountChanged(); + if (height() != prevHeight) + emit heightChanged(); + } } } @@ -156,25 +162,16 @@ TimelineModel::TimelineModelPrivate::TimelineModelPrivate(int modelId, const QSt { } -void TimelineModel::TimelineModelPrivate::init(TimelineModel *q) -{ - q_ptr = q; - connect(q,SIGNAL(expandedChanged()),q,SIGNAL(heightChanged())); - connect(q,SIGNAL(hiddenChanged()),q,SIGNAL(heightChanged())); - connect(q,SIGNAL(emptyChanged()),q,SIGNAL(heightChanged())); -} - - TimelineModel::TimelineModel(TimelineModelPrivate &dd, QObject *parent) : QObject(parent), d_ptr(&dd) { - d_ptr->init(this); + d_ptr->q_ptr = this; } TimelineModel::TimelineModel(int modelId, const QString &displayName, QObject *parent) : QObject(parent), d_ptr(new TimelineModelPrivate(modelId, displayName)) { - d_ptr->init(this); + d_ptr->q_ptr = this; } TimelineModel::~TimelineModel() @@ -492,8 +489,11 @@ void TimelineModel::setExpanded(bool expanded) { Q_D(TimelineModel); if (expanded != d->expanded) { + int prevHeight = height(); d->expanded = expanded; emit expandedChanged(); + if (prevHeight != height()) + emit heightChanged(); if (d->collapsedRowCount != d->expandedRowCount) emit rowCountChanged(); } @@ -509,8 +509,11 @@ void TimelineModel::setHidden(bool hidden) { Q_D(TimelineModel); if (hidden != d->hidden) { + int prevHeight = height(); d->hidden = hidden; emit hiddenChanged(); + if (height() != prevHeight) + emit heightChanged(); } } diff --git a/src/libs/timeline/timelinemodelaggregator.cpp b/src/libs/timeline/timelinemodelaggregator.cpp index bad5462fc5e..b363752058a 100644 --- a/src/libs/timeline/timelinemodelaggregator.cpp +++ b/src/libs/timeline/timelinemodelaggregator.cpp @@ -53,10 +53,6 @@ TimelineModelAggregator::TimelineModelAggregator(TimelineNotesModel *notes, QObj : QObject(parent), d(new TimelineModelAggregatorPrivate(this)) { d->notesModel = notes; - connect(this, &TimelineModelAggregator::modelsChanged, - this, &TimelineModelAggregator::heightChanged); - connect(this, &TimelineModelAggregator::stateChanged, - this, &TimelineModelAggregator::heightChanged); } TimelineModelAggregator::~TimelineModelAggregator() @@ -76,6 +72,8 @@ void TimelineModelAggregator::addModel(TimelineModel *m) if (d->notesModel) d->notesModel->addTimelineModel(m); emit modelsChanged(); + if (m->height() != 0) + emit heightChanged(); } const TimelineModel *TimelineModelAggregator::model(int modelIndex) const @@ -98,10 +96,13 @@ TimelineNotesModel *TimelineModelAggregator::notes() const void TimelineModelAggregator::clear() { + int prevHeight = height(); d->modelList.clear(); if (d->notesModel) d->notesModel->clear(); emit modelsChanged(); + if (height() != prevHeight) + emit heightChanged(); } int TimelineModelAggregator::modelOffset(int modelIndex) const diff --git a/src/libs/timeline/timelineoverviewrenderer.cpp b/src/libs/timeline/timelineoverviewrenderer.cpp index 765e346ef6f..ab3a09cd5d9 100644 --- a/src/libs/timeline/timelineoverviewrenderer.cpp +++ b/src/libs/timeline/timelineoverviewrenderer.cpp @@ -54,6 +54,11 @@ QSGNode *TimelineOverviewRenderer::updatePaintNode(QSGNode *oldNode, Q_D(TimelineOverviewRenderer); Q_UNUSED(updatePaintNodeData) + if (!d->model || d->model->isEmpty() || !d->zoomer || d->zoomer->traceDuration() <= 0) { + delete oldNode; + return 0; + } + if (d->modelDirty) { delete d->renderState; d->renderState = 0; diff --git a/src/libs/timeline/timelinerenderer.cpp b/src/libs/timeline/timelinerenderer.cpp index 48690c6a9f5..3d7b169282f 100644 --- a/src/libs/timeline/timelinerenderer.cpp +++ b/src/libs/timeline/timelinerenderer.cpp @@ -203,7 +203,6 @@ void TimelineRenderer::mouseMoveEvent(QMouseEvent *event) void TimelineRenderer::hoverMoveEvent(QHoverEvent *event) { Q_D(TimelineRenderer); - Q_UNUSED(event); d->manageHovered(event->pos().x(), event->pos().y()); if (d->currentSelection.eventIndex == -1) event->setAccepted(false); diff --git a/src/libs/timeline/timelinerenderstate.cpp b/src/libs/timeline/timelinerenderstate.cpp index 75238660729..725946def7a 100644 --- a/src/libs/timeline/timelinerenderstate.cpp +++ b/src/libs/timeline/timelinerenderstate.cpp @@ -29,6 +29,7 @@ ****************************************************************************/ #include "timelinerenderstate_p.h" +#include namespace Timeline { @@ -139,6 +140,8 @@ void TimelineRenderState::assembleNodeTree(const TimelineModel *model, int defau int defaultRowOffset) { Q_D(TimelineRenderState); + QTC_ASSERT(isEmpty(), return); + for (int pass = 0; pass < d->passes.length(); ++pass) { const TimelineRenderPass::State *passState = d->passes[pass]; if (!passState) diff --git a/src/plugins/android/androiddeployqtstep.cpp b/src/plugins/android/androiddeployqtstep.cpp index 396e8b7a376..7d05e3e4737 100644 --- a/src/plugins/android/androiddeployqtstep.cpp +++ b/src/plugins/android/androiddeployqtstep.cpp @@ -69,6 +69,7 @@ const QLatin1String VerboseOutputKey("VerboseOutput"); const QLatin1String InputFile("InputFile"); const QLatin1String ProFilePathForInputFile("ProFilePathForInputFile"); const QLatin1String InstallFailedInconsistentCertificatesString("INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES"); +const QLatin1String InstallFailedInconsistentCertificatesString2("INSTALL_FAILED_UPDATE_INCOMPATIBLE"); const Core::Id AndroidDeployQtStep::Id("Qt4ProjectManager.AndroidDeployQtStep"); ////////////////// @@ -490,7 +491,8 @@ void AndroidDeployQtStep::processReadyReadStdOutput() void AndroidDeployQtStep::stdOutput(const QString &line) { - if (line.contains(InstallFailedInconsistentCertificatesString)) + if (line.contains(InstallFailedInconsistentCertificatesString) + || line.contains(InstallFailedInconsistentCertificatesString2)) m_installOk = false; emit addOutput(line, BuildStep::NormalOutput, BuildStep::DontAppendNewline); } @@ -506,7 +508,8 @@ void AndroidDeployQtStep::processReadyReadStdError() void AndroidDeployQtStep::stdError(const QString &line) { - if (line.contains(InstallFailedInconsistentCertificatesString)) + if (line.contains(InstallFailedInconsistentCertificatesString) + || line.contains(InstallFailedInconsistentCertificatesString2)) m_installOk = false; emit addOutput(line, BuildStep::ErrorOutput, BuildStep::DontAppendNewline); } diff --git a/src/plugins/clangcodemodel/clang_installation.pri b/src/plugins/clangcodemodel/clang_installation.pri index 67a13ff4133..ec2f3749b1f 100644 --- a/src/plugins/clangcodemodel/clang_installation.pri +++ b/src/plugins/clangcodemodel/clang_installation.pri @@ -66,7 +66,7 @@ unix { LLVM_CONFIG = $$findLLVMConfig() LLVM_VERSION = $$system($$LLVM_CONFIG --version 2>/dev/null) - LLVM_VERSION = $$replace(LLVM_VERSION, ^(\\d+\\.\\d+).*$, \\1) + LLVM_VERSION = $$replace(LLVM_VERSION, ^(\\d+\\.\\d+\\.\\d+).*$, \\1) message("... version $$LLVM_VERSION") LLVM_INCLUDEPATH = $$system($$LLVM_CONFIG --includedir 2>/dev/null) diff --git a/src/plugins/clangcodemodel/clangutils.cpp b/src/plugins/clangcodemodel/clangutils.cpp index 8f2f6ddd4d8..0626a1fbde5 100644 --- a/src/plugins/clangcodemodel/clangutils.cpp +++ b/src/plugins/clangcodemodel/clangutils.cpp @@ -151,6 +151,14 @@ QStringList createClangOptions(const ProjectPart::Ptr &pPart, ProjectFile::Kind maybeIncludeBorlandExtensions()); result << CompilerOptionsBuilder::createDefineOptions(pPart->toolchainDefines); result << CompilerOptionsBuilder::createDefineOptions(pPart->projectDefines); + + static const QString resourceDir = getResourceDir(); + if (!resourceDir.isEmpty()) { + result << QLatin1String("-nostdlibinc"); + result << (QLatin1String("-I") + resourceDir); + result << QLatin1String("-undef"); + } + result << CompilerOptionsBuilder::createHeaderPathOptions(pPart->headerPaths, isBlacklisted); // Inject header file @@ -164,13 +172,6 @@ QStringList createClangOptions(const ProjectPart::Ptr &pPart, ProjectFile::Kind if (!pPart->projectConfigFile.isEmpty()) result << QLatin1String("-include") << pPart->projectConfigFile; - static const QString resourceDir = getResourceDir(); - if (!resourceDir.isEmpty()) { - result << QLatin1String("-nostdlibinc"); - result << (QLatin1String("-I") + resourceDir); - result << QLatin1String("-undef"); - } - result << QLatin1String("-fmessage-length=0"); result << QLatin1String("-fdiagnostics-show-note-include-stack"); result << QLatin1String("-fmacro-backtrace-limit=0"); diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index 4b97b40e289..b4736f23280 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -251,8 +251,11 @@ void DebuggerItemManager::autoDetectGdbOrLldbDebuggers() dir.setFilter(QDir::Files | QDir::Executable); foreach (const QString &base, path) { dir.setPath(base); - foreach (const QString &entry, dir.entryList()) + foreach (const QString &entry, dir.entryList()) { + if (entry.startsWith(QLatin1String("lldb-platform-"))) + continue; suspects.append(FileName::fromString(dir.absoluteFilePath(entry))); + } } foreach (const FileName &command, suspects) { diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp index a62d93b793a..2cdb3417246 100644 --- a/src/plugins/debugger/debuggertooltipmanager.cpp +++ b/src/plugins/debugger/debuggertooltipmanager.cpp @@ -219,7 +219,7 @@ ToolTipWatchItem::ToolTipWatchItem(WatchItem *item) value = item->displayValue(); type = item->displayType(); iname = item->iname; - valueColor = item->valueColor(); + valueColor = item->valueColor(1); expandable = item->hasChildren(); expression = item->expression(); foreach (TreeItem *child, item->children()) diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 7362a242117..97ff3bbca59 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -868,13 +868,14 @@ void LldbEngine::assignValueInDebugger(WatchItem *, void LldbEngine::updateWatchItem(WatchItem *) { - updateLocals(); + doUpdateLocals(UpdateParameters()); } void LldbEngine::updateLocals() { - UpdateParameters params; - doUpdateLocals(params); + watchHandler()->resetValueCache(); + watchHandler()->notifyUpdateStarted(); + doUpdateLocals(UpdateParameters()); } void LldbEngine::doUpdateLocals(UpdateParameters params) @@ -923,7 +924,6 @@ void LldbEngine::doUpdateLocals(UpdateParameters params) m_lastDebuggableCommand = cmd; m_lastDebuggableCommand.args.replace("\"passexceptions\":0", "\"passexceptions\":1"); - watchHandler()->notifyUpdateStarted(); runCommand(cmd); reloadRegisters(); diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index a7cf1237bb6..3c29346452b 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -776,21 +776,24 @@ QString WatchItem::displayType() const return result; } -QColor WatchItem::valueColor() const +QColor WatchItem::valueColor(int column) const { - using Utils::Theme; - Theme *theme = Utils::creatorTheme(); - if (watchModel()) { - if (!valueEnabled) - return theme->color(Theme::Debugger_WatchItem_ValueInvalid); - if (!watchModel()->m_contentsValid && !isInspect()) - return theme->color(Theme::Debugger_WatchItem_ValueInvalid); - if (value.isEmpty()) // This might still show 0x... - return theme->color(Theme::Debugger_WatchItem_ValueInvalid); - if (value != watchModel()->m_valueCache.value(iname)) - return theme->color(Theme::Debugger_WatchItem_ValueChanged); + Theme::Color color = Theme::Debugger_WatchItem_ValueNormal; + if (const WatchModel *model = watchModel()) { + if (!model->m_contentsValid && !isInspect()) { + color = Theme::Debugger_WatchItem_ValueInvalid; + } else if (column == 1) { + if (!valueEnabled) + color = Theme::Debugger_WatchItem_ValueInvalid; + else if (!model->m_contentsValid && !isInspect()) + color = Theme::Debugger_WatchItem_ValueInvalid; + else if (column == 1 && value.isEmpty()) // This might still show 0x... + color = Theme::Debugger_WatchItem_ValueInvalid; + else if (column == 1 && value != model->m_valueCache.value(iname)) + color = Theme::Debugger_WatchItem_ValueChanged; + } } - return theme->color(Theme::Debugger_WatchItem_ValueNormal); + return creatorTheme()->color(color); } QVariant WatchItem::data(int column, int role) const @@ -837,8 +840,7 @@ QVariant WatchItem::data(int column, int role) const ? toToolTip() : QVariant(); case Qt::ForegroundRole: - if (column == 1) - return valueColor(); + return valueColor(column); case LocalsExpressionRole: return expression(); diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h index 0d9f53abec3..b01a3110c47 100644 --- a/src/plugins/debugger/watchhandler.h +++ b/src/plugins/debugger/watchhandler.h @@ -107,7 +107,7 @@ public: QVariant editValue() const; int editType() const; - QColor valueColor() const; + QColor valueColor(int column) const; int requestedFormat() const; WatchItem *findItem(const QByteArray &iname); diff --git a/src/plugins/help/helpwidget.cpp b/src/plugins/help/helpwidget.cpp index 0d62fa81a1c..69d07e4b21c 100644 --- a/src/plugins/help/helpwidget.cpp +++ b/src/plugins/help/helpwidget.cpp @@ -303,7 +303,7 @@ void HelpWidget::addSideBar() auto contentWindow = new ContentWindow; auto contentItem = new Core::SideBarItem(contentWindow, QLatin1String(Constants::HELP_CONTENTS)); contentWindow->setOpenInNewPageActionVisible(supportsNewPages); - contentWindow->setWindowTitle(tr(Constants::SB_CONTENTS)); + contentWindow->setWindowTitle(HelpPlugin::tr(Constants::SB_CONTENTS)); connect(contentWindow, &ContentWindow::linkActivated, this, &HelpWidget::open); m_contentsAction = new QAction(tr(Constants::SB_CONTENTS), this); @@ -315,7 +315,7 @@ void HelpWidget::addSideBar() auto indexWindow = new IndexWindow(); auto indexItem = new Core::SideBarItem(indexWindow, QLatin1String(Constants::HELP_INDEX)); indexWindow->setOpenInNewPageActionVisible(supportsNewPages); - indexWindow->setWindowTitle(tr(Constants::SB_INDEX)); + indexWindow->setWindowTitle(HelpPlugin::tr(Constants::SB_INDEX)); connect(indexWindow, &IndexWindow::linkActivated, this, &HelpWidget::open); connect(indexWindow, &IndexWindow::linksActivated, @@ -327,7 +327,7 @@ void HelpWidget::addSideBar() shortcutMap.insert(QLatin1String(Constants::HELP_INDEX), cmd); auto bookmarkWidget = new BookmarkWidget(&LocalHelpManager::bookmarkManager()); - bookmarkWidget->setWindowTitle(tr(Constants::SB_BOOKMARKS)); + bookmarkWidget->setWindowTitle(HelpPlugin::tr(Constants::SB_BOOKMARKS)); bookmarkWidget->setOpenInNewPageActionVisible(supportsNewPages); auto bookmarkItem = new Core::SideBarItem(bookmarkWidget, QLatin1String(Constants::HELP_BOOKMARKS)); @@ -351,7 +351,7 @@ void HelpWidget::addSideBar() Core::SideBarItem *openPagesItem = 0; if (m_style == ModeWidget) { QWidget *openPagesWidget = OpenPagesManager::instance().openPagesWidget(); - openPagesWidget->setWindowTitle(tr(Constants::SB_OPENPAGES)); + openPagesWidget->setWindowTitle(HelpPlugin::tr(Constants::SB_OPENPAGES)); openPagesItem = new Core::SideBarItem(openPagesWidget, QLatin1String(Constants::HELP_OPENPAGES)); m_openPagesAction = new QAction(tr("Activate Open Help Pages View"), this); diff --git a/src/plugins/help/searchwidget.cpp b/src/plugins/help/searchwidget.cpp index 27dba03a9d5..8a993eb9420 100644 --- a/src/plugins/help/searchwidget.cpp +++ b/src/plugins/help/searchwidget.cpp @@ -30,6 +30,7 @@ #include "searchwidget.h" #include "helpconstants.h" +#include "helpplugin.h" #include "localhelpmanager.h" #include "openpagesmanager.h" @@ -303,7 +304,7 @@ QStringList SearchWidget::currentSearchTerms() const SearchSideBarItem::SearchSideBarItem() : SideBarItem(new SearchWidget, QLatin1String(Constants::HELP_SEARCH)) { - widget()->setWindowTitle(tr(Constants::SB_SEARCH)); + widget()->setWindowTitle(HelpPlugin::tr(Constants::SB_SEARCH)); connect(widget(), SIGNAL(linkActivated(QUrl,QStringList,bool)), this, SIGNAL(linkActivated(QUrl,QStringList,bool))); } diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp index ed3aadaba07..bfc0dcf7ac7 100644 --- a/src/plugins/ios/iostoolhandler.cpp +++ b/src/plugins/ios/iostoolhandler.cpp @@ -443,7 +443,7 @@ void IosToolHandlerPrivate::processXml() else if (statusStr.compare(QLatin1String("failure"), Qt::CaseInsensitive) == 0) status = Ios::IosToolHandler::Failure; emit didTransferApp(bundlePath, deviceId, status); - } else if (elName == QLatin1String("device_info")) { + } else if (elName == QLatin1String("device_info") || elName == QLatin1String("deviceinfo")) { stack.append(ParserState(ParserState::DeviceInfo)); } else if (elName == QLatin1String("inferior_pid")) { stack.append(ParserState(ParserState::InferiorPid)); diff --git a/src/plugins/projectexplorer/applicationlauncher.cpp b/src/plugins/projectexplorer/applicationlauncher.cpp index 64577eb28d9..4fe94198340 100644 --- a/src/plugins/projectexplorer/applicationlauncher.cpp +++ b/src/plugins/projectexplorer/applicationlauncher.cpp @@ -126,7 +126,7 @@ ApplicationLauncher::ApplicationLauncher(QObject *parent) connect(WinDebugInterface::instance(), SIGNAL(cannotRetrieveDebugOutput()), this, SLOT(cannotRetrieveDebugOutput())); connect(WinDebugInterface::instance(), SIGNAL(debugOutput(qint64,QString)), - this, SLOT(checkDebugOutput(qint64,QString))); + this, SLOT(checkDebugOutput(qint64,QString)), Qt::BlockingQueuedConnection); #endif #ifdef WITH_JOURNALD connect(JournaldWatcher::instance(), &JournaldWatcher::journaldOutput, diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 73a4348d8af..6073564656d 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -3021,29 +3021,33 @@ void ProjectExplorerPluginPrivate::addNewSubproject() void ProjectExplorerPluginPrivate::handleAddExistingFiles() { - QTC_ASSERT(ProjectTree::currentNode(), return); + Node *node = ProjectTree::currentNode(); + FolderNode *folderNode = node ? node->asFolderNode() : 0; + + QTC_ASSERT(folderNode, return); QStringList fileNames = QFileDialog::getOpenFileNames(ICore::mainWindow(), tr("Add Existing Files"), directoryFor(ProjectTree::currentNode())); if (fileNames.isEmpty()) return; - ProjectExplorerPlugin::addExistingFiles(fileNames); + ProjectExplorerPlugin::addExistingFiles(fileNames, folderNode); } void ProjectExplorerPluginPrivate::addExistingDirectory() { - QTC_ASSERT(ProjectTree::currentNode(), return); + Node *node = ProjectTree::currentNode(); + FolderNode *folderNode = node ? node->asFolderNode() : 0; + + QTC_ASSERT(folderNode, return); SelectableFilesDialogAddDirectory dialog(directoryFor(ProjectTree::currentNode()), QStringList(), ICore::mainWindow()); if (dialog.exec() == QDialog::Accepted) - ProjectExplorerPlugin::addExistingFiles(dialog.selectedFiles()); + ProjectExplorerPlugin::addExistingFiles(dialog.selectedFiles(), folderNode); } -void ProjectExplorerPlugin::addExistingFiles(const QStringList &filePaths) +void ProjectExplorerPlugin::addExistingFiles(const QStringList &filePaths, FolderNode *folderNode) { - Node *node = ProjectTree::currentNode(); - FolderNode *folderNode = node ? node->asFolderNode() : 0; addExistingFiles(folderNode, filePaths); } diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h index a4157c36229..e548268f712 100644 --- a/src/plugins/projectexplorer/projectexplorer.h +++ b/src/plugins/projectexplorer/projectexplorer.h @@ -104,7 +104,7 @@ public: const bool forceSkipDeploy = false); static void addExistingFiles(FolderNode *projectNode, const QStringList &filePaths); - static void addExistingFiles(const QStringList &filePaths); + static void addExistingFiles(const QStringList &filePaths, FolderNode *folderNode); static void buildProject(Project *p); /// Normally there's no need to call this function. diff --git a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp index 97a82d9c59b..9fb3877e21f 100644 --- a/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp +++ b/src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp @@ -62,7 +62,9 @@ static QString extractToolchainPrefix(QString *compilerName) { QString prefix; if (compilerName->endsWith(QLatin1String("-g++")) - || compilerName->endsWith(QLatin1String("-clang++"))) { + || compilerName->endsWith(QLatin1String("-clang++")) + || compilerName->endsWith(QLatin1String("-gcc")) + || compilerName->endsWith(QLatin1String("-clang"))) { const int idx = compilerName->lastIndexOf(QLatin1Char('-')) + 1; prefix = compilerName->left(idx); compilerName->remove(0, idx); diff --git a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp index 28e8d1184ea..d7fdac80f75 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp @@ -419,13 +419,15 @@ QList QbsBuildConfigurationFactory::availableSetups(const Kit *k, c BuildInfo *info = createBuildInfo(k, BuildConfiguration::Debug); //: The name of the debug build configuration created by default for a qbs project. info->displayName = tr("Debug"); - info->buildDirectory = defaultBuildDirectory(projectPath, k, info->displayName); + //: Non-ASCII characters in directory suffix may cause build issues. + info->buildDirectory = defaultBuildDirectory(projectPath, k, tr("Debug", "Shadow build directory suffix")); result << info; info = createBuildInfo(k, BuildConfiguration::Release); //: The name of the release build configuration created by default for a qbs project. info->displayName = tr("Release"); - info->buildDirectory = defaultBuildDirectory(projectPath, k, info->displayName); + //: Non-ASCII characters in directory suffix may cause build issues. + info->buildDirectory = defaultBuildDirectory(projectPath, k, tr("Release", "Shadow build directory suffix")); result << info; return result; diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index b365da3e095..c07ca861a76 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -414,10 +414,6 @@ struct Type expectedType.replace(' ', ""); expectedType.replace("const", ""); expectedType.replace('@', context.nameSpace); - if (fullNamespaceMatch) - expectedType.replace('?', context.nameSpace); - else - expectedType.replace('?', ""); if (isPattern) { QString actual = QString::fromLatin1(actualType); @@ -425,6 +421,11 @@ struct Type return QRegExp(expected).exactMatch(actual); } + if (fullNamespaceMatch) + expectedType.replace('?', context.nameSpace); + else + expectedType.replace('?', ""); + if (actualType == expectedType) return true; @@ -4382,24 +4383,6 @@ void tst_Dumpers::dumper_data() + Check("v2.3", "[3]", "", "Foo"); - QTest::newRow("StdStream") - << Data("#include \n" - "#include \n", - - "using namespace std;\n" - "ifstream is0, is;\n" - "#ifdef Q_OS_WIN\n" - "is.open(\"C:\\\\Program Files\\\\Windows NT\\\\Accessories\\\\wordpad.exe\");\n" - "#else\n" - "is.open(\"/etc/passwd\");\n" - "#endif\n" - "bool ok = is.good();\n" - "unused(&ok, &is, &is0);\n") - - + Check("is", "", "std::ifstream") - + Check("ok", "true", "bool"); - - QTest::newRow("StdUnorderedMap") << Data("#include \n" "#include \n", diff --git a/tests/auto/timeline/timeline.pro b/tests/auto/timeline/timeline.pro index 509a6c2a288..86bf4342bbd 100644 --- a/tests/auto/timeline/timeline.pro +++ b/tests/auto/timeline/timeline.pro @@ -2,8 +2,9 @@ include(../../../qtcreator.pri) TEMPLATE = subdirs SUBDIRS = \ + timelineabstractrenderer \ timelinemodel \ - timelineabstractrenderer + timelinemodelaggregator minQtVersion(5,4,0) { SUBDIRS += \ diff --git a/tests/auto/timeline/timeline.qbs b/tests/auto/timeline/timeline.qbs index ebc2d65bd67..a7121bedcae 100644 --- a/tests/auto/timeline/timeline.qbs +++ b/tests/auto/timeline/timeline.qbs @@ -7,6 +7,7 @@ Project { + "/src/libs/timeline" references: [ "timelinemodel/timelinemodel.qbs", + "timelinemodelaggregator/timelinemodelaggregator.qbs", "timelineabstractrenderer/timelineabstractrenderer.qbs", "timelineitemsrenderpass/timelineitemsrenderpass.qbs", ] diff --git a/tests/auto/timeline/timelinemodel/tst_timelinemodel.cpp b/tests/auto/timeline/timelinemodel/tst_timelinemodel.cpp index 078bcbb04eb..0c8032ae7ad 100644 --- a/tests/auto/timeline/timelinemodel/tst_timelinemodel.cpp +++ b/tests/auto/timeline/timelinemodel/tst_timelinemodel.cpp @@ -227,14 +227,23 @@ void tst_TimelineModel::rowOffset() void tst_TimelineModel::height() { DummyModel dummy; + QSignalSpy spy(&dummy, SIGNAL(heightChanged())); QCOMPARE(dummy.height(), 0); dummy.loadData(); + QCOMPARE(spy.count(), 1); QCOMPARE(dummy.height(), 2 * DefaultRowHeight); dummy.setExpanded(true); + QCOMPARE(spy.count(), 2); QCOMPARE(dummy.height(), 3 * DefaultRowHeight); dummy.setExpandedRowHeight(1, 80); + QCOMPARE(spy.count(), 3); QCOMPARE(dummy.height(), 2 * DefaultRowHeight + 80); + dummy.setHidden(true); + QCOMPARE(spy.count(), 4); + QCOMPARE(dummy.height(), 0); dummy.clear(); + // When clearing the height can change several times in a row. + QVERIFY(spy.count() > 4); dummy.loadData(); dummy.setExpanded(true); QCOMPARE(dummy.rowHeight(1), DefaultRowHeight); // Make sure the row height gets reset. diff --git a/tests/auto/timeline/timelinemodelaggregator/timelinemodelaggregator.pro b/tests/auto/timeline/timelinemodelaggregator/timelinemodelaggregator.pro new file mode 100644 index 00000000000..61a8a31c28e --- /dev/null +++ b/tests/auto/timeline/timelinemodelaggregator/timelinemodelaggregator.pro @@ -0,0 +1,5 @@ +QTC_LIB_DEPENDS += timeline +include(../../qttest.pri) + +SOURCES += \ + tst_timelinemodelaggregator.cpp diff --git a/tests/auto/timeline/timelinemodelaggregator/timelinemodelaggregator.qbs b/tests/auto/timeline/timelinemodelaggregator/timelinemodelaggregator.qbs new file mode 100644 index 00000000000..563b4fd1e30 --- /dev/null +++ b/tests/auto/timeline/timelinemodelaggregator/timelinemodelaggregator.qbs @@ -0,0 +1,14 @@ +import qbs + +QtcAutotest { + Depends { name: "Timeline" } + Depends { name: "Qt.gui" } + + name: "TimelineModelAggregator autotest" + Group { + name: "Test sources" + files: [ + "tst_timelinemodelaggregator.cpp" + ] + } +} diff --git a/tests/auto/timeline/timelinemodelaggregator/tst_timelinemodelaggregator.cpp b/tests/auto/timeline/timelinemodelaggregator/tst_timelinemodelaggregator.cpp new file mode 100644 index 00000000000..5de05069d1c --- /dev/null +++ b/tests/auto/timeline/timelinemodelaggregator/tst_timelinemodelaggregator.cpp @@ -0,0 +1,170 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms and +** conditions see http://www.qt.io/terms-conditions. For further information +** use the contact form at http://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 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include +#include + +class tst_TimelineModelAggregator : public QObject +{ + Q_OBJECT + +private slots: + void height(); + void addRemoveModel(); + void prevNext(); +}; + +class HeightTestModel : public Timeline::TimelineModel { +public: + HeightTestModel() : TimelineModel(2, QString()) + { + insert(0, 1, 1); + } +}; + +void tst_TimelineModelAggregator::height() +{ + Timeline::TimelineModelAggregator aggregator(0); + QCOMPARE(aggregator.height(), 0); + + QSignalSpy heightSpy(&aggregator, SIGNAL(heightChanged())); + Timeline::TimelineModel *model = new Timeline::TimelineModel(25, QString()); + aggregator.addModel(model); + QCOMPARE(aggregator.height(), 0); + QCOMPARE(heightSpy.count(), 0); + aggregator.addModel(new HeightTestModel); + QVERIFY(aggregator.height() > 0); + QCOMPARE(heightSpy.count(), 1); + aggregator.clear(); + QCOMPARE(aggregator.height(), 0); + QCOMPARE(heightSpy.count(), 2); +} + +void tst_TimelineModelAggregator::addRemoveModel() +{ + Timeline::TimelineNotesModel notes; + Timeline::TimelineModelAggregator aggregator(¬es); + QSignalSpy spy(&aggregator, SIGNAL(modelsChanged())); + + QCOMPARE(aggregator.notes(), ¬es); + + Timeline::TimelineModel *model1 = new Timeline::TimelineModel(25, QString()); + Timeline::TimelineModel *model2 = new Timeline::TimelineModel(26, QString()); + aggregator.addModel(model1); + QCOMPARE(spy.count(), 1); + QCOMPARE(aggregator.modelCount(), 1); + QCOMPARE(aggregator.model(0), model1); + QCOMPARE(aggregator.models().count(), 1); + + aggregator.addModel(model2); + QCOMPARE(spy.count(), 2); + QCOMPARE(aggregator.modelCount(), 2); + QCOMPARE(aggregator.model(1), model2); + QCOMPARE(aggregator.models().count(), 2); + + QCOMPARE(aggregator.modelIndexById(25), 0); + QCOMPARE(aggregator.modelIndexById(26), 1); + QCOMPARE(aggregator.modelIndexById(27), -1); + + QCOMPARE(aggregator.modelOffset(0), 0); + QCOMPARE(aggregator.modelOffset(1), 0); + + aggregator.clear(); + QCOMPARE(spy.count(), 3); + QCOMPARE(aggregator.modelCount(), 0); +} + +class PrevNextTestModel : public Timeline::TimelineModel +{ +public: + PrevNextTestModel(int x) : TimelineModel(x, QString()) + { + for (int i = 0; i < 20; ++i) + insert(i + x, i * x, x); + } +}; + +void tst_TimelineModelAggregator::prevNext() +{ + Timeline::TimelineModelAggregator aggregator(0); + aggregator.addModel(new PrevNextTestModel(1)); + aggregator.addModel(new PrevNextTestModel(2)); + aggregator.addModel(new PrevNextTestModel(3)); + + // Add an empty model to trigger the special code paths that skip it + aggregator.addModel(new Timeline::TimelineModel(4, QString())); + QLatin1String item("item"); + QLatin1String model("model"); + QVariantMap result; + + { + int indexes[] = {-1, -1, -1}; + int lastModel = -1; + int lastIndex = -1; + for (int i = 0; i < 60; ++i) { + result = aggregator.nextItem(lastModel, lastIndex, -1); + int nextModel = result.value(model).toInt(); + int nextIndex = result.value(item).toInt(); + QVERIFY(nextModel < 3); + QVERIFY(nextModel >= 0); + QCOMPARE(nextIndex, ++indexes[nextModel]); + lastModel = nextModel; + lastIndex = nextIndex; + } + + result = aggregator.nextItem(lastModel, lastIndex, -1); + QCOMPARE(result.value(model).toInt(), 0); + QCOMPARE(result.value(item).toInt(), 0); + } + + { + int indexes[] = {20, 20, 20}; + int lastModel = -1; + int lastIndex = -1; + for (int i = 0; i < 60; ++i) { + result = aggregator.prevItem(lastModel, lastIndex, -1); + int prevModel = result.value(model).toInt(); + int prevIndex = result.value(item).toInt(); + QVERIFY(prevModel < 3); + QVERIFY(prevModel >= 0); + QCOMPARE(prevIndex, --indexes[prevModel]); + lastModel = prevModel; + lastIndex = prevIndex; + } + + result = aggregator.prevItem(lastModel, lastIndex, -1); + QCOMPARE(result.value(model).toInt(), 2); + QCOMPARE(result.value(item).toInt(), 19); + } +} + +QTEST_MAIN(tst_TimelineModelAggregator) + +#include "tst_timelinemodelaggregator.moc" diff --git a/tests/system/suite_WELP/tst_WELP04/test.py b/tests/system/suite_WELP/tst_WELP04/test.py index 4d4db9e082b..5422d78c25d 100644 --- a/tests/system/suite_WELP/tst_WELP04/test.py +++ b/tests/system/suite_WELP/tst_WELP04/test.py @@ -74,11 +74,11 @@ def main(): # close help widget again to avoid focus issues sendEvent("QCloseEvent", waitForObject(":Help Widget_Help::Internal::HelpWidget")) # check a demonstration video link - replaceEditorContent(waitForObject(searchTut), "embedded linux") + replaceEditorContent(waitForObject(searchTut), "embedded device") test.verify(checkIfObjectExists(getQmlItem("Delegate", ":WelcomePageStyledBar.WelcomePage_QQuickView", False, "id='delegate' radius='0' caption=" - "'Developing Embedded Linux Applications with Qt'")), + "'Device Creation with Qt'")), "Verifying: Link to the expected demonstration video exists.") # exit Qt Creator invokeMenuItem("File", "Exit")