forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.3'
Conflicts: src/plugins/coreplugin/coreplugin.cpp src/plugins/coreplugin/themesettingswidget.cpp src/plugins/qbsprojectmanager/qbsprojectmanager.cpp src/plugins/qbsprojectmanager/qbsprojectmanager.h src/plugins/qmlprofiler/qml/Overview.js src/shared/qbs Change-Id: Ibe92c166fc5bfbcb4d6964e50ca7298d8459d60e
This commit is contained in:
@@ -79,7 +79,7 @@ function drawBindingLoops(canvas, ctxt) {
|
||||
ii += canvas.increment) {
|
||||
if (qmlProfilerModelProxy.bindingLoopDest(modelIndex,ii) >= 0) {
|
||||
var xcenter = Math.round(qmlProfilerModelProxy.startTime(modelIndex,ii) +
|
||||
qmlProfilerModelProxy.duration(modelIndex,ii) -
|
||||
qmlProfilerModelProxy.duration(modelIndex,ii) / 2 -
|
||||
zoomControl.traceStart) * canvas.spacing;
|
||||
var ycenter = Math.round(canvas.bump + canvas.blockHeight * modelIndex +
|
||||
canvas.blockHeight / 2);
|
||||
|
||||
@@ -36,7 +36,9 @@ namespace QmlProfiler {
|
||||
|
||||
QmlProfilerBaseModel::QmlProfilerBaseModel(Utils::FileInProjectFinder *fileFinder,
|
||||
QmlProfilerModelManager *manager,
|
||||
QmlProfilerBaseModelPrivate *dd) : d_ptr(dd)
|
||||
QmlProfilerBaseModelPrivate *dd)
|
||||
: QObject(manager)
|
||||
, d_ptr(dd)
|
||||
{
|
||||
Q_D(QmlProfilerBaseModel);
|
||||
d->modelManager = manager;
|
||||
|
||||
@@ -328,14 +328,21 @@ void QmlProfilerTool::populateFileFinder(QString projectDirectory, QString activ
|
||||
|
||||
void QmlProfilerTool::recordingButtonChanged(bool recording)
|
||||
{
|
||||
// clientRecording is our intention for new sessions. That may differ from the state of the
|
||||
// current session, as indicated by the button. To synchronize it, toggle once.
|
||||
|
||||
if (recording && d->m_profilerState->currentState() == QmlProfilerStateManager::AppRunning) {
|
||||
if (checkForUnsavedNotes()) {
|
||||
clearData(); // clear right away, before the application starts
|
||||
if (d->m_profilerState->clientRecording())
|
||||
d->m_profilerState->setClientRecording(false);
|
||||
d->m_profilerState->setClientRecording(true);
|
||||
} else {
|
||||
d->m_recordButton->setChecked(false);
|
||||
}
|
||||
} else {
|
||||
if (d->m_profilerState->clientRecording() == recording)
|
||||
d->m_profilerState->setClientRecording(!recording);
|
||||
d->m_profilerState->setClientRecording(recording);
|
||||
}
|
||||
}
|
||||
@@ -348,7 +355,6 @@ void QmlProfilerTool::setRecording(bool recording)
|
||||
QLatin1String(":/qmlprofiler/recordOff.png")));
|
||||
|
||||
d->m_recordButton->setChecked(recording);
|
||||
d->m_profilerState->setClientRecording(recording);
|
||||
|
||||
// manage timer
|
||||
if (d->m_profilerState->currentState() == QmlProfilerStateManager::AppRunning) {
|
||||
@@ -375,16 +381,10 @@ void QmlProfilerTool::gotoSourceLocation(const QString &fileUrl, int lineNumber,
|
||||
if (!fileInfo.exists() || !fileInfo.isReadable())
|
||||
return;
|
||||
|
||||
IEditor *editor = EditorManager::openEditor(projectFileName);
|
||||
TextEditor::BaseTextEditor *textEditor = qobject_cast<TextEditor::BaseTextEditor*>(editor);
|
||||
|
||||
if (textEditor) {
|
||||
EditorManager::addCurrentPositionToNavigationHistory();
|
||||
// textEditor counts columns starting with 0, but the ASTs store the
|
||||
// location starting with 1, therefore the -1 in the call to gotoLine
|
||||
textEditor->gotoLine(lineNumber, columnNumber - 1);
|
||||
textEditor->widget()->setFocus();
|
||||
}
|
||||
// The text editors count columns starting with 0, but the ASTs store the
|
||||
// location starting with 1, therefore the -1.
|
||||
EditorManager::openEditorAt(projectFileName, lineNumber, columnNumber - 1, Id(),
|
||||
EditorManager::DoNotSwitchToDesignMode);
|
||||
}
|
||||
|
||||
void QmlProfilerTool::updateTimeDisplay()
|
||||
@@ -454,7 +454,6 @@ static void startRemoteTool(IAnalyzerTool *tool, StartMode mode)
|
||||
sp.analyzerPort = port;
|
||||
|
||||
AnalyzerRunControl *rc = tool->createRunControl(sp, 0);
|
||||
QObject::connect(AnalyzerManager::stopAction(), SIGNAL(triggered()), rc, SLOT(stopIt()));
|
||||
|
||||
ProjectExplorerPlugin::startRunControl(rc, tool->runMode());
|
||||
}
|
||||
|
||||
@@ -643,7 +643,7 @@ QV8ProfilerEventRelativesView::~QV8ProfilerEventRelativesView()
|
||||
void QV8ProfilerEventRelativesView::displayType(int index)
|
||||
{
|
||||
QV8ProfilerDataModel::QV8EventData *event = m_v8Model->v8EventDescription(index);
|
||||
QTC_CHECK(event);
|
||||
QTC_ASSERT(event, return);
|
||||
|
||||
QList<QV8ProfilerDataModel::QV8EventSub*> events;
|
||||
if (m_type == ParentsView)
|
||||
|
||||
@@ -315,14 +315,14 @@ void TimelineRenderer::drawBindingLoopMarkers(QPainter *p, int modelIndex, int f
|
||||
// to
|
||||
getItemXExtent(modelIndex, destindex, xto, width);
|
||||
xto += width / 2;
|
||||
yto = getYPosition(modelIndex, destindex) +
|
||||
m_profilerModelProxy->rowHeight(modelIndex, destindex) / 2 - y();
|
||||
yto = getYPosition(modelIndex, destindex) + m_profilerModelProxy->rowHeight(modelIndex,
|
||||
m_profilerModelProxy->row(modelIndex, destindex)) / 2 - y();
|
||||
|
||||
// from
|
||||
getItemXExtent(modelIndex, i, xfrom, width);
|
||||
xfrom += width / 2;
|
||||
yfrom = getYPosition(modelIndex, i) +
|
||||
m_profilerModelProxy->rowHeight(modelIndex, i) / 2 - y();
|
||||
yfrom = getYPosition(modelIndex, i) + m_profilerModelProxy->rowHeight(modelIndex,
|
||||
m_profilerModelProxy->row(modelIndex, i)) / 2 - y();
|
||||
|
||||
// radius (derived from width of origin event)
|
||||
radius = 5;
|
||||
|
||||
Reference in New Issue
Block a user