Commit f925ecb3 authored by Kai Koehne's avatar Kai Koehne

QmlProfiler: Add "Sysroot" field to attach dialog

Change-Id: Id3c6a0eaa90096f2a7a0bdcfac10644e10e8858c
Reviewed-by: default avatarChristiaan Janssen <christiaan.janssen@nokia.com>
parent 8eb83681
...@@ -63,6 +63,7 @@ public: ...@@ -63,6 +63,7 @@ public:
QString displayName; QString displayName;
Utils::Environment environment; Utils::Environment environment;
QString workingDirectory; QString workingDirectory;
QString sysroot;
}; };
} // namespace Analyzer } // namespace Analyzer
......
...@@ -58,6 +58,11 @@ uint QmlProfilerAttachDialog::port() const ...@@ -58,6 +58,11 @@ uint QmlProfilerAttachDialog::port() const
return ui->portSpinBox->value(); return ui->portSpinBox->value();
} }
QString QmlProfilerAttachDialog::sysroot() const
{
return ui->sysrootChooser->path();
}
void QmlProfilerAttachDialog::setAddress(const QString &address) void QmlProfilerAttachDialog::setAddress(const QString &address)
{ {
ui->addressLineEdit->setText(address); ui->addressLineEdit->setText(address);
...@@ -68,5 +73,10 @@ void QmlProfilerAttachDialog::setPort(uint port) ...@@ -68,5 +73,10 @@ void QmlProfilerAttachDialog::setPort(uint port)
ui->portSpinBox->setValue(port); ui->portSpinBox->setValue(port);
} }
void QmlProfilerAttachDialog::setSysroot(const QString &sysroot)
{
ui->sysrootChooser->setPath(sysroot);
}
} // namespace Internal } // namespace Internal
} // namespace QmlProfiler } // namespace QmlProfiler
...@@ -52,9 +52,11 @@ public: ...@@ -52,9 +52,11 @@ public:
QString address() const; QString address() const;
uint port() const; uint port() const;
QString sysroot() const;
void setAddress(const QString &address); void setAddress(const QString &address);
void setPort(uint port); void setPort(uint port);
void setSysroot(const QString &sysroot);
private: private:
Ui::QmlProfilerAttachDialog *ui; Ui::QmlProfilerAttachDialog *ui;
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>185</width> <width>203</width>
<height>115</height> <height>136</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
...@@ -56,6 +56,19 @@ ...@@ -56,6 +56,19 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Sys&amp;root:</string>
</property>
<property name="buddy">
<cstring>sysrootChooser</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Utils::PathChooser" name="sysrootChooser" native="true"/>
</item>
</layout> </layout>
</item> </item>
<item> <item>
...@@ -70,6 +83,14 @@ ...@@ -70,6 +83,14 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>Utils::PathChooser</class>
<extends>QWidget</extends>
<header location="global">utils/pathchooser.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections> <connections>
<connection> <connection>
......
...@@ -120,6 +120,7 @@ public: ...@@ -120,6 +120,7 @@ public:
QString m_tcpHost; QString m_tcpHost;
quint64 m_tcpPort; quint64 m_tcpPort;
QString m_ostDevice; QString m_ostDevice;
QString m_sysroot;
}; };
QmlProfilerTool::QmlProfilerTool(QObject *parent) QmlProfilerTool::QmlProfilerTool(QObject *parent)
...@@ -254,6 +255,8 @@ IAnalyzerEngine *QmlProfilerTool::createEngine(const AnalyzerStartParameters &sp ...@@ -254,6 +255,8 @@ IAnalyzerEngine *QmlProfilerTool::createEngine(const AnalyzerStartParameters &sp
connect(d->m_project, SIGNAL(fileListChanged()), this, SLOT(updateProjectFileList())); connect(d->m_project, SIGNAL(fileListChanged()), this, SLOT(updateProjectFileList()));
} }
d->m_projectFinder.setSysroot(sp.sysroot);
connect(engine, SIGNAL(processRunning(int)), this, SLOT(connectClient(int))); connect(engine, SIGNAL(processRunning(int)), this, SLOT(connectClient(int)));
connect(engine, SIGNAL(finished()), this, SLOT(disconnectClient())); connect(engine, SIGNAL(finished()), this, SLOT(disconnectClient()));
connect(engine, SIGNAL(finished()), this, SLOT(correctTimer())); connect(engine, SIGNAL(finished()), this, SLOT(correctTimer()));
...@@ -509,6 +512,7 @@ static void startRemoteTool(IAnalyzerTool *tool, StartMode mode) ...@@ -509,6 +512,7 @@ static void startRemoteTool(IAnalyzerTool *tool, StartMode mode)
sp.startMode = mode; sp.startMode = mode;
sp.connParams.host = dialog.address(); sp.connParams.host = dialog.address();
sp.connParams.port = dialog.port(); sp.connParams.port = dialog.port();
sp.sysroot = dialog.sysroot();
AnalyzerRunControl *rc = new AnalyzerRunControl(tool, sp, 0); AnalyzerRunControl *rc = new AnalyzerRunControl(tool, sp, 0);
QObject::connect(AnalyzerManager::stopAction(), SIGNAL(triggered()), rc, SLOT(stopIt())); QObject::connect(AnalyzerManager::stopAction(), SIGNAL(triggered()), rc, SLOT(stopIt()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment