forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.4'
This commit is contained in:
@@ -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()
|
||||
|
@@ -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.
|
||||
*/
|
||||
|
@@ -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",
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import QtQuick 2.3
|
||||
import QtQuick 2.4
|
||||
|
||||
Rectangle {
|
||||
property alias mouseArea: mouseArea
|
||||
|
@@ -25125,11 +25125,23 @@ These files are preserved.</source>
|
||||
<extracomment>The name of the debug build configuration created by default for a qbs project.</extracomment>
|
||||
<translation>Отладка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Debug</source>
|
||||
<comment>Shadow build directory suffix</comment>
|
||||
<extracomment>Non-ASCII characters in directory suffix may cause build issues.</extracomment>
|
||||
<translation>Debug</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Release</source>
|
||||
<extracomment>The name of the release build configuration created by default for a qbs project.</extracomment>
|
||||
<translation>Выпуск</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Release</source>
|
||||
<comment>Shadow build directory suffix</comment>
|
||||
<extracomment>Non-ASCII characters in directory suffix may cause build issues.</extracomment>
|
||||
<translation>Release</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QbsProjectManager::Internal::QbsBuildConfigurationWidget</name>
|
||||
@@ -25173,7 +25185,7 @@ These files are preserved.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Keep going</source>
|
||||
<translation>Не сдаваться</translation>
|
||||
<translation>Пропускать ошибки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Properties:</source>
|
||||
@@ -25217,11 +25229,11 @@ These files are preserved.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Install</source>
|
||||
<translation>Установить</translation>
|
||||
<translation>Устанавливать</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Clean install root</source>
|
||||
<translation>Очищать корень установки</translation>
|
||||
<translation>Очищать каталог установки</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -29,6 +29,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "timelinerenderstate_p.h"
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
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)
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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)
|
||||
|
@@ -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");
|
||||
|
@@ -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) {
|
||||
|
@@ -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())
|
||||
|
@@ -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();
|
||||
|
@@ -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();
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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)));
|
||||
}
|
||||
|
@@ -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));
|
||||
|
@@ -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,
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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.
|
||||
|
@@ -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);
|
||||
|
@@ -419,13 +419,15 @@ QList<BuildInfo *> 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;
|
||||
|
@@ -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 <istream>\n"
|
||||
"#include <fstream>\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 <unordered_map>\n"
|
||||
"#include <string>\n",
|
||||
|
@@ -2,8 +2,9 @@ include(../../../qtcreator.pri)
|
||||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS = \
|
||||
timelineabstractrenderer \
|
||||
timelinemodel \
|
||||
timelineabstractrenderer
|
||||
timelinemodelaggregator
|
||||
|
||||
minQtVersion(5,4,0) {
|
||||
SUBDIRS += \
|
||||
|
@@ -7,6 +7,7 @@ Project {
|
||||
+ "/src/libs/timeline"
|
||||
references: [
|
||||
"timelinemodel/timelinemodel.qbs",
|
||||
"timelinemodelaggregator/timelinemodelaggregator.qbs",
|
||||
"timelineabstractrenderer/timelineabstractrenderer.qbs",
|
||||
"timelineitemsrenderpass/timelineitemsrenderpass.qbs",
|
||||
]
|
||||
|
@@ -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.
|
||||
|
@@ -0,0 +1,5 @@
|
||||
QTC_LIB_DEPENDS += timeline
|
||||
include(../../qttest.pri)
|
||||
|
||||
SOURCES += \
|
||||
tst_timelinemodelaggregator.cpp
|
@@ -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"
|
||||
]
|
||||
}
|
||||
}
|
@@ -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 <QtTest>
|
||||
#include <timeline/timelinemodelaggregator.h>
|
||||
|
||||
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"
|
@@ -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")
|
||||
|
Reference in New Issue
Block a user