Merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/start_agent into lp:qtcreator-plugin-ubuntu

Proposed by Benjamin Zeller
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 417
Merged at revision: 416
Proposed branch: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/start_agent
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 37 lines (+12/-6)
1 file modified
src/ubuntu/ubuntuplugin.cpp (+12/-6)
To merge this branch: bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/start_agent
Reviewer Review Type Date Requested Status
Zoltan Balogh Approve
Review via email: mp+274369@code.launchpad.net

Commit message

Start click-chroot-agent from the install path when packaged as ubuntu-
sdk-ide

Description of the change

Start click-chroot-agent from the install path when packaged as ubuntu-
sdk-ide

To post a comment you must log in.
417. By Benjamin Zeller

remove unused commit

Revision history for this message
Zoltan Balogh (bzoltan) wrote :

Cool

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ubuntu/ubuntuplugin.cpp'
2--- src/ubuntu/ubuntuplugin.cpp 2015-09-03 09:20:52 +0000
3+++ src/ubuntu/ubuntuplugin.cpp 2015-10-14 09:24:19 +0000
4@@ -84,22 +84,28 @@
5 UbuntuPlugin::UbuntuPlugin()
6 {
7 if(UbuntuClickTool::clickChrootSuffix() == QLatin1String(Constants::UBUNTU_CLICK_CHROOT_DEFAULT_NAME)) {
8+
9+ bool started = false;
10 #ifdef UBUNTU_BUILD_ROOT
11 Utils::FileName chrootAgent = Utils::FileName::fromString(QStringLiteral(UBUNTU_BUILD_ROOT));
12 chrootAgent.appendPath(QStringLiteral("chroot-agent")) //append dir
13 .appendPath(QStringLiteral("click-chroot-agent")); //append binary
14
15- bool started = false;
16 if(chrootAgent.toFileInfo().isExecutable()) {
17 started = QProcess::startDetached(chrootAgent.toFileInfo().absoluteFilePath());
18 }
19+#endif
20 if(!started) {
21- QProcess::startDetached(QStringLiteral("click-chroot-agent"));
22+ Utils::FileName agent = Utils::FileName::fromString(QCoreApplication::applicationDirPath())
23+ .appendPath(QStringLiteral("click-chroot-agent"));
24+
25+ if (agent.toFileInfo().isExecutable()) {
26+ QProcess::startDetached(agent.toString());
27+ } else {
28+ //start the chroot-agent
29+ QProcess::startDetached(QStringLiteral("click-chroot-agent"));
30+ }
31 }
32-#else
33- //start the chroot-agent
34- QProcess::startDetached(QStringLiteral("click-chroot-agent"));
35-#endif
36 }
37 }
38

Subscribers

People subscribed via source and target branches