Merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/qtc41-beta into lp:qtcreator-plugin-ubuntu
- qtc41-beta
- Merge into trunk
Proposed by
Benjamin Zeller
Status: | Merged |
---|---|
Merged at revision: | 467 |
Proposed branch: | lp:~zeller-benjamin/qtcreator-plugin-ubuntu/qtc41-beta |
Merge into: | lp:qtcreator-plugin-ubuntu |
Diff against target: |
3158 lines (+596/-466) 70 files modified
UbuntuPlugin.pro (+6/-6) src/ubuntu/clicktoolchain.cpp (+25/-14) src/ubuntu/clicktoolchain.h (+4/-3) src/ubuntu/device/container/containerdeviceprocess.cpp (+17/-15) src/ubuntu/device/container/containerdeviceprocess.h (+1/-3) src/ubuntu/device/container/ubuntulocaldeployconfiguration.cpp (+1/-1) src/ubuntu/device/container/ubuntulocalrunconfiguration.cpp (+21/-3) src/ubuntu/device/container/ubuntulocalrunconfiguration.h (+8/-8) src/ubuntu/device/container/ubuntulocalrunconfigurationfactory.cpp (+1/-1) src/ubuntu/device/container/ubuntulocalruncontrolfactory.cpp (+54/-22) src/ubuntu/device/container/ubuntulocalscopedebugsupport.cpp (+7/-8) src/ubuntu/device/container/ubuntulocalscopedebugsupport.h (+1/-1) src/ubuntu/device/remote/abstractremoterunsupport.cpp (+6/-5) src/ubuntu/device/remote/abstractremoterunsupport.h (+1/-1) src/ubuntu/device/remote/ubuntudeploystepfactory.cpp (+25/-38) src/ubuntu/device/remote/ubuntudeploystepfactory.h (+4/-5) src/ubuntu/device/remote/ubuntudevice.cpp (+9/-13) src/ubuntu/device/remote/ubuntudevice.h (+1/-4) src/ubuntu/device/remote/ubuntudevicesignaloperation.cpp (+3/-3) src/ubuntu/device/remote/ubuntudevicesignaloperation.h (+3/-3) src/ubuntu/device/remote/ubuntudirectuploadstep.cpp (+16/-13) src/ubuntu/device/remote/ubuntudirectuploadstep.h (+3/-0) src/ubuntu/device/remote/ubunturemoteanalyzesupport.cpp (+18/-15) src/ubuntu/device/remote/ubunturemoteanalyzesupport.h (+2/-2) src/ubuntu/device/remote/ubunturemotedebugsupport.cpp (+17/-9) src/ubuntu/device/remote/ubunturemoterunconfiguration.cpp (+20/-5) src/ubuntu/device/remote/ubunturemoterunconfiguration.h (+8/-8) src/ubuntu/device/remote/ubunturemoteruncontrol.cpp (+2/-2) src/ubuntu/device/remote/ubunturemoteruncontrolfactory.cpp (+51/-20) src/ubuntu/device/remote/ubunturemoterunner.cpp (+1/-1) src/ubuntu/localportsmanager.cpp (+5/-5) src/ubuntu/ubuntuabstractguieditordocument.cpp (+0/-10) src/ubuntu/ubuntuabstractguieditordocument.h (+0/-4) src/ubuntu/ubuntuclickdialog.cpp (+1/-1) src/ubuntu/ubuntuclicktool.cpp (+17/-6) src/ubuntu/ubuntuclicktool.h (+3/-1) src/ubuntu/ubuntucmakecache.cpp (+1/-0) src/ubuntu/ubuntuconstants.h (+2/-0) src/ubuntu/ubuntudevicemode.cpp (+0/-6) src/ubuntu/ubuntudevicemode.h (+0/-3) src/ubuntu/ubuntudevicesmodel.cpp (+45/-44) src/ubuntu/ubuntudevicesmodel.h (+9/-9) src/ubuntu/ubuntufixmanifeststep.cpp (+2/-1) src/ubuntu/ubuntufixmanifeststep.h (+1/-1) src/ubuntu/ubuntuhtmlbuildconfiguration.cpp (+2/-1) src/ubuntu/ubuntukitmanager.cpp (+17/-7) src/ubuntu/ubuntumenu.cpp (+1/-1) src/ubuntu/ubuntupackagestep.cpp (+19/-17) src/ubuntu/ubuntupackagestep.h (+1/-1) src/ubuntu/ubuntupackagingmode.cpp (+0/-6) src/ubuntu/ubuntupackagingmode.h (+0/-3) src/ubuntu/ubuntupackagingmodel.cpp (+2/-2) src/ubuntu/ubuntuplugin.cpp (+2/-2) src/ubuntu/ubuntuplugin.h (+0/-1) src/ubuntu/ubuntuproject.cpp (+7/-8) src/ubuntu/ubuntuproject.h (+4/-2) src/ubuntu/ubuntuprojectfile.cpp (+0/-8) src/ubuntu/ubuntuprojectfile.h (+0/-4) src/ubuntu/ubuntuprojectnode.cpp (+1/-1) src/ubuntu/ubuntuqmlbuildconfiguration.cpp (+33/-38) src/ubuntu/ubuntuqmlbuildconfiguration.h (+7/-7) src/ubuntu/ubuntuqtversion.cpp (+50/-15) src/ubuntu/ubuntuqtversion.h (+5/-3) src/ubuntu/ubuntuwelcomemode.cpp (+5/-1) src/ubuntu/wizards/createtargetwizard.cpp (+1/-1) src/ubuntu/wizards/ubuntufatpackagingwizard.cpp (+1/-1) src/ubuntu/wizards/ubuntufirstrunwizard.cpp (+1/-1) src/ubuntu/wizards/ubuntuprojectapplicationwizard.cpp (+9/-6) src/ubuntu/wizards/ubuntuprojectapplicationwizard.h (+1/-1) src/ubuntu/wizards/ubuntuprojectmigrationwizard.cpp (+5/-5) |
To merge this branch: | bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/qtc41-beta |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Zoltan Balogh | Pending | ||
Review via email: mp+300621@code.launchpad.net |
Commit message
- Make QtC-P-U actually compile against Qt 4.1 beta
Description of the change
- Make QtC-P-U actually compile against Qt 4.1 beta
To post a comment you must log in.
- 467. By Benjamin Zeller
-
- More fixes
- Upgrading to latest QtC checkout - 468. By Benjamin Zeller
-
Merge trunk
- 469. By Benjamin Zeller
-
Fix the profiler
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'UbuntuPlugin.pro' | |||
2 | --- UbuntuPlugin.pro 2016-05-17 16:33:36 +0000 | |||
3 | +++ UbuntuPlugin.pro 2016-08-24 15:35:12 +0000 | |||
4 | @@ -52,9 +52,9 @@ | |||
5 | 52 | src/ubuntu/ubuntuproject.cpp \ | 52 | src/ubuntu/ubuntuproject.cpp \ |
6 | 53 | src/ubuntu/ubuntuprojectfile.cpp \ | 53 | src/ubuntu/ubuntuprojectfile.cpp \ |
7 | 54 | src/ubuntu/ubuntuprojectnode.cpp \ | 54 | src/ubuntu/ubuntuprojectnode.cpp \ |
11 | 55 | src/ubuntu/ubuntuversion.cpp \ | 55 | #src/ubuntu/ubuntuversion.cpp \ |
12 | 56 | src/ubuntu/ubuntufeatureprovider.cpp \ | 56 | #src/ubuntu/ubuntufeatureprovider.cpp \ |
13 | 57 | src/ubuntu/ubuntuversionmanager.cpp \ | 57 | #src/ubuntu/ubuntuversionmanager.cpp \ |
14 | 58 | src/ubuntu/ubuntupackagingmode.cpp \ | 58 | src/ubuntu/ubuntupackagingmode.cpp \ |
15 | 59 | src/ubuntu/ubuntubzr.cpp \ | 59 | src/ubuntu/ubuntubzr.cpp \ |
16 | 60 | src/ubuntu/ubuntuclickmanifest.cpp \ | 60 | src/ubuntu/ubuntuclickmanifest.cpp \ |
17 | @@ -121,9 +121,9 @@ | |||
18 | 121 | src/ubuntu/ubuntuproject.h \ | 121 | src/ubuntu/ubuntuproject.h \ |
19 | 122 | src/ubuntu/ubuntuprojectfile.h \ | 122 | src/ubuntu/ubuntuprojectfile.h \ |
20 | 123 | src/ubuntu/ubuntuprojectnode.h \ | 123 | src/ubuntu/ubuntuprojectnode.h \ |
24 | 124 | src/ubuntu/ubuntuversion.h \ | 124 | #src/ubuntu/ubuntuversion.h \ |
25 | 125 | src/ubuntu/ubuntufeatureprovider.h \ | 125 | #src/ubuntu/ubuntufeatureprovider.h \ |
26 | 126 | src/ubuntu/ubuntuversionmanager.h \ | 126 | #src/ubuntu/ubuntuversionmanager.h \ |
27 | 127 | src/ubuntu/ubuntupackagingmode.h \ | 127 | src/ubuntu/ubuntupackagingmode.h \ |
28 | 128 | src/ubuntu/ubuntubzr.h \ | 128 | src/ubuntu/ubuntubzr.h \ |
29 | 129 | src/ubuntu/ubuntuclickmanifest.h \ | 129 | src/ubuntu/ubuntuclickmanifest.h \ |
30 | 130 | 130 | ||
31 | === modified file 'src/ubuntu/clicktoolchain.cpp' | |||
32 | --- src/ubuntu/clicktoolchain.cpp 2016-03-18 13:13:22 +0000 | |||
33 | +++ src/ubuntu/clicktoolchain.cpp 2016-08-24 15:35:12 +0000 | |||
34 | @@ -20,6 +20,7 @@ | |||
35 | 20 | #include "ubuntuconstants.h" | 20 | #include "ubuntuconstants.h" |
36 | 21 | 21 | ||
37 | 22 | #include <utils/fileutils.h> | 22 | #include <utils/fileutils.h> |
38 | 23 | #include <utils/algorithm.h> | ||
39 | 23 | #include <projectexplorer/abi.h> | 24 | #include <projectexplorer/abi.h> |
40 | 24 | #include <QDebug> | 25 | #include <QDebug> |
41 | 25 | #include <QVariant> | 26 | #include <QVariant> |
42 | @@ -79,11 +80,6 @@ | |||
43 | 79 | return Utils::FileName::fromString(QLatin1String("/usr/bin/gdb-multiarch")); | 80 | return Utils::FileName::fromString(QLatin1String("/usr/bin/gdb-multiarch")); |
44 | 80 | } | 81 | } |
45 | 81 | 82 | ||
46 | 82 | QString ClickToolChain::type() const | ||
47 | 83 | { | ||
48 | 84 | return QString::fromLatin1(Constants::UBUNTU_CLICK_TOOLCHAIN_ID); | ||
49 | 85 | } | ||
50 | 86 | |||
51 | 87 | QString ClickToolChain::typeDisplayName() const | 83 | QString ClickToolChain::typeDisplayName() const |
52 | 88 | { | 84 | { |
53 | 89 | return ClickToolChainFactory::tr("Ubuntu GCC"); | 85 | return ClickToolChainFactory::tr("Ubuntu GCC"); |
54 | @@ -139,6 +135,11 @@ | |||
55 | 139 | return clickArchitectures.keys(); | 135 | return clickArchitectures.keys(); |
56 | 140 | } | 136 | } |
57 | 141 | 137 | ||
58 | 138 | QString ClickToolChain::remoteCompilerCommand() const | ||
59 | 139 | { | ||
60 | 140 | return QString::fromLatin1("/usr/bin/%1").arg(compilerCommand().fileName()); | ||
61 | 141 | } | ||
62 | 142 | |||
63 | 142 | QVariantMap ClickToolChain::toMap() const | 143 | QVariantMap ClickToolChain::toMap() const |
64 | 143 | { | 144 | { |
65 | 144 | QVariantMap map = GccToolChain::toMap(); | 145 | QVariantMap map = GccToolChain::toMap(); |
66 | @@ -196,7 +197,7 @@ | |||
67 | 196 | } | 197 | } |
68 | 197 | 198 | ||
69 | 198 | ClickToolChain::ClickToolChain(const UbuntuClickTool::Target &target, Detection d) | 199 | ClickToolChain::ClickToolChain(const UbuntuClickTool::Target &target, Detection d) |
71 | 199 | : GccToolChain(QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID), d) | 200 | : GccToolChain(Constants::UBUNTU_CLICK_TOOLCHAIN_ID, d) |
72 | 200 | , m_clickTarget(target) | 201 | , m_clickTarget(target) |
73 | 201 | { | 202 | { |
74 | 202 | resetToolChain(Utils::FileName::fromString( | 203 | resetToolChain(Utils::FileName::fromString( |
75 | @@ -216,24 +217,24 @@ | |||
76 | 216 | } | 217 | } |
77 | 217 | 218 | ||
78 | 218 | ClickToolChain::ClickToolChain() | 219 | ClickToolChain::ClickToolChain() |
80 | 219 | : GccToolChain(QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID),ManualDetection) | 220 | : GccToolChain(Constants::UBUNTU_CLICK_TOOLCHAIN_ID,ManualDetection) |
81 | 220 | { | 221 | { |
82 | 221 | } | 222 | } |
83 | 222 | 223 | ||
84 | 223 | ClickToolChainFactory::ClickToolChainFactory() | 224 | ClickToolChainFactory::ClickToolChainFactory() |
85 | 224 | { | 225 | { |
86 | 225 | setId(Constants::UBUNTU_CLICK_TOOLCHAIN_ID); | ||
87 | 226 | setDisplayName(tr("Ubuntu GCC")); | 226 | setDisplayName(tr("Ubuntu GCC")); |
88 | 227 | } | 227 | } |
89 | 228 | 228 | ||
91 | 229 | QList<ProjectExplorer::ToolChain *> ClickToolChainFactory::autoDetect() | 229 | QList<ProjectExplorer::ToolChain *> ClickToolChainFactory::autoDetect( |
92 | 230 | const QList<ProjectExplorer::ToolChain *> &alreadyKnown) | ||
93 | 230 | { | 231 | { |
95 | 231 | return createToolChainsForClickTargets(); | 232 | return createToolChainsForClickTargets(alreadyKnown); |
96 | 232 | } | 233 | } |
97 | 233 | 234 | ||
98 | 234 | bool ClickToolChainFactory::canRestore(const QVariantMap &data) | 235 | bool ClickToolChainFactory::canRestore(const QVariantMap &data) |
99 | 235 | { | 236 | { |
101 | 236 | return idFromMap(data).startsWith(QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID) + QLatin1Char(':')); | 237 | return typeIdFromMap(data) == Constants::UBUNTU_CLICK_TOOLCHAIN_ID; |
102 | 237 | } | 238 | } |
103 | 238 | 239 | ||
104 | 239 | ProjectExplorer::ToolChain *ClickToolChainFactory::restore(const QVariantMap &data) | 240 | ProjectExplorer::ToolChain *ClickToolChainFactory::restore(const QVariantMap &data) |
105 | @@ -259,7 +260,7 @@ | |||
106 | 259 | return 0; | 260 | return 0; |
107 | 260 | } | 261 | } |
108 | 261 | 262 | ||
110 | 262 | QList<ProjectExplorer::ToolChain *> ClickToolChainFactory::createToolChainsForClickTargets() | 263 | QList<ProjectExplorer::ToolChain *> ClickToolChainFactory::createToolChainsForClickTargets(const QList<ProjectExplorer::ToolChain *> &alreadyKnown) |
111 | 263 | { | 264 | { |
112 | 264 | QList<ProjectExplorer::ToolChain*> toolChains; | 265 | QList<ProjectExplorer::ToolChain*> toolChains; |
113 | 265 | 266 | ||
114 | @@ -270,10 +271,20 @@ | |||
115 | 270 | if(!clickArchitectures.contains(target.architecture)) | 271 | if(!clickArchitectures.contains(target.architecture)) |
116 | 271 | continue; | 272 | continue; |
117 | 272 | 273 | ||
119 | 273 | if(UbuntuClickTool::findOrCreateGccWrapper(target).isEmpty()) | 274 | QString comp = UbuntuClickTool::findOrCreateGccWrapper(target); |
120 | 275 | if(comp.isEmpty()) | ||
121 | 274 | continue; | 276 | continue; |
122 | 275 | 277 | ||
124 | 276 | ClickToolChain* tc = new ClickToolChain(target, ProjectExplorer::ToolChain::AutoDetection); | 278 | auto predicate = [&](ProjectExplorer::ToolChain *tc) { |
125 | 279 | if (tc->typeId() != Constants::UBUNTU_CLICK_TOOLCHAIN_ID) | ||
126 | 280 | return false; | ||
127 | 281 | auto clickTc = static_cast<ClickToolChain *>(tc); | ||
128 | 282 | return clickTc->clickTarget().containerName == target.containerName; | ||
129 | 283 | }; | ||
130 | 284 | |||
131 | 285 | ProjectExplorer::ToolChain *tc = Utils::findOrDefault(alreadyKnown, predicate); | ||
132 | 286 | if (!tc) | ||
133 | 287 | tc = new ClickToolChain(target, ProjectExplorer::ToolChain::AutoDetection); | ||
134 | 277 | toolChains.append(tc); | 288 | toolChains.append(tc); |
135 | 278 | } | 289 | } |
136 | 279 | 290 | ||
137 | 280 | 291 | ||
138 | === modified file 'src/ubuntu/clicktoolchain.h' | |||
139 | --- src/ubuntu/clicktoolchain.h 2015-06-30 13:34:14 +0000 | |||
140 | +++ src/ubuntu/clicktoolchain.h 2016-08-24 15:35:12 +0000 | |||
141 | @@ -37,7 +37,6 @@ | |||
142 | 37 | 37 | ||
143 | 38 | virtual QList<Utils::FileName> suggestedMkspecList() const override; | 38 | virtual QList<Utils::FileName> suggestedMkspecList() const override; |
144 | 39 | virtual Utils::FileName suggestedDebugger() const override; | 39 | virtual Utils::FileName suggestedDebugger() const override; |
145 | 40 | virtual QString type() const override; | ||
146 | 41 | virtual QString typeDisplayName() const override; | 40 | virtual QString typeDisplayName() const override; |
147 | 42 | virtual bool isValid() const override; | 41 | virtual bool isValid() const override; |
148 | 43 | virtual void addToEnvironment(Utils::Environment &env) const override; | 42 | virtual void addToEnvironment(Utils::Environment &env) const override; |
149 | @@ -53,6 +52,8 @@ | |||
150 | 53 | static ProjectExplorer::Abi architectureNameToAbi ( const QString &arch ); | 52 | static ProjectExplorer::Abi architectureNameToAbi ( const QString &arch ); |
151 | 54 | static QList<QString> supportedArchitectures (); | 53 | static QList<QString> supportedArchitectures (); |
152 | 55 | 54 | ||
153 | 55 | QString remoteCompilerCommand () const; | ||
154 | 56 | |||
155 | 56 | protected: | 57 | protected: |
156 | 57 | virtual bool fromMap(const QVariantMap &data) override; | 58 | virtual bool fromMap(const QVariantMap &data) override; |
157 | 58 | 59 | ||
158 | @@ -75,11 +76,11 @@ | |||
159 | 75 | 76 | ||
160 | 76 | // ToolChainFactory interface | 77 | // ToolChainFactory interface |
161 | 77 | public: | 78 | public: |
163 | 78 | virtual QList<ProjectExplorer::ToolChain *> autoDetect() override; | 79 | virtual QList<ProjectExplorer::ToolChain *> autoDetect(const QList<ProjectExplorer::ToolChain *> &alreadyKnown) override; |
164 | 79 | virtual bool canRestore(const QVariantMap &data) override; | 80 | virtual bool canRestore(const QVariantMap &data) override; |
165 | 80 | virtual ProjectExplorer::ToolChain *restore(const QVariantMap &data) override; | 81 | virtual ProjectExplorer::ToolChain *restore(const QVariantMap &data) override; |
166 | 81 | 82 | ||
168 | 82 | static QList<ProjectExplorer::ToolChain *> createToolChainsForClickTargets(); | 83 | static QList<ProjectExplorer::ToolChain *> createToolChainsForClickTargets(const QList<ProjectExplorer::ToolChain *> &alreadyKnown); |
169 | 83 | }; | 84 | }; |
170 | 84 | 85 | ||
171 | 85 | } // namespace Internal | 86 | } // namespace Internal |
172 | 86 | 87 | ||
173 | === modified file 'src/ubuntu/device/container/containerdeviceprocess.cpp' | |||
174 | --- src/ubuntu/device/container/containerdeviceprocess.cpp 2016-05-23 07:26:49 +0000 | |||
175 | +++ src/ubuntu/device/container/containerdeviceprocess.cpp 2016-08-24 15:35:12 +0000 | |||
176 | @@ -3,6 +3,7 @@ | |||
177 | 3 | 3 | ||
178 | 4 | #include <utils/qtcassert.h> | 4 | #include <utils/qtcassert.h> |
179 | 5 | #include <utils/qtcprocess.h> | 5 | #include <utils/qtcprocess.h> |
180 | 6 | #include <projectexplorer/runnables.h> | ||
181 | 6 | 7 | ||
182 | 7 | #include <QProcess> | 8 | #include <QProcess> |
183 | 8 | #include <QDebug> | 9 | #include <QDebug> |
184 | @@ -30,13 +31,11 @@ | |||
185 | 30 | }; | 31 | }; |
186 | 31 | 32 | ||
187 | 32 | connect(cleaner, &SshDeviceProcess::finished, callback); | 33 | connect(cleaner, &SshDeviceProcess::finished, callback); |
188 | 33 | cleaner->start(QStringLiteral("rm"), QStringList{m_pidFile}); | ||
189 | 34 | } | ||
190 | 35 | 34 | ||
195 | 36 | void ContainerDeviceProcess::setWorkingDirectory(const QString &directory) | 35 | ProjectExplorer::StandardRunnable r; |
196 | 37 | { | 36 | r.executable = QStringLiteral("rm"); |
197 | 38 | m_workingDir = directory; | 37 | r.commandLineArguments = m_pidFile; |
198 | 39 | LinuxDeviceProcess::setWorkingDirectory(directory); | 38 | cleaner->start(r); |
199 | 40 | } | 39 | } |
200 | 41 | 40 | ||
201 | 42 | void ContainerDeviceProcess::doSignal(const int sig) | 41 | void ContainerDeviceProcess::doSignal(const int sig) |
202 | @@ -50,11 +49,14 @@ | |||
203 | 50 | } | 49 | } |
204 | 51 | signaler->deleteLater(); | 50 | signaler->deleteLater(); |
205 | 52 | }); | 51 | }); |
208 | 53 | QString cmd = QString::fromLatin1("kill -%2 `cat %1`").arg(m_pidFile).arg(sig); | 52 | |
209 | 54 | signaler->start(cmd, QStringList()); | 53 | ProjectExplorer::StandardRunnable r; |
210 | 54 | r.executable = QStringLiteral("kill"); | ||
211 | 55 | r.commandLineArguments = QString::fromLatin1("-%2 `cat %1`").arg(m_pidFile).arg(sig); | ||
212 | 56 | signaler->start(r); | ||
213 | 55 | } | 57 | } |
214 | 56 | 58 | ||
216 | 57 | QString ContainerDeviceProcess::fullCommandLine() const | 59 | QString ContainerDeviceProcess::fullCommandLine(const ProjectExplorer::StandardRunnable &runnable) const |
217 | 58 | { | 60 | { |
218 | 59 | QString fullCommandLine; | 61 | QString fullCommandLine; |
219 | 60 | QStringList rcFiles { | 62 | QStringList rcFiles { |
220 | @@ -63,12 +65,12 @@ | |||
221 | 63 | }; | 65 | }; |
222 | 64 | foreach (const QString &filePath, rcFiles) | 66 | foreach (const QString &filePath, rcFiles) |
223 | 65 | fullCommandLine += QString::fromLatin1("test -f %1 && . %1;").arg(filePath); | 67 | fullCommandLine += QString::fromLatin1("test -f %1 && . %1;").arg(filePath); |
226 | 66 | if (!m_workingDir.isEmpty()) { | 68 | if (runnable.workingDirectory.isEmpty()) { |
227 | 67 | fullCommandLine.append(QLatin1String("cd ")).append(Utils::QtcProcess::quoteArgUnix(m_workingDir)) | 69 | fullCommandLine.append(QLatin1String("cd ")).append(Utils::QtcProcess::quoteArgUnix(runnable.workingDirectory)) |
228 | 68 | .append(QLatin1String(" && ")); | 70 | .append(QLatin1String(" && ")); |
229 | 69 | } | 71 | } |
230 | 70 | QString envString; | 72 | QString envString; |
232 | 71 | for (auto it = environment().constBegin(); it != environment().constEnd(); ++it) { | 73 | for (auto it = runnable.environment.constBegin(); it != runnable.environment.constEnd(); ++it) { |
233 | 72 | if (!envString.isEmpty()) | 74 | if (!envString.isEmpty()) |
234 | 73 | envString += QLatin1Char(' '); | 75 | envString += QLatin1Char(' '); |
235 | 74 | envString.append(it.key()).append(QLatin1String("='")).append(it.value()) | 76 | envString.append(it.key()).append(QLatin1String("='")).append(it.value()) |
236 | @@ -82,10 +84,10 @@ | |||
237 | 82 | 84 | ||
238 | 83 | fullCommandLine.append(Utils::QtcProcess::quoteArgUnix(QStringLiteral("dbus-run-session"))); | 85 | fullCommandLine.append(Utils::QtcProcess::quoteArgUnix(QStringLiteral("dbus-run-session"))); |
239 | 84 | fullCommandLine += QString::fromLatin1(" bash -c \"echo \\$\\$ > %1; exec ").arg(m_pidFile); | 86 | fullCommandLine += QString::fromLatin1(" bash -c \"echo \\$\\$ > %1; exec ").arg(m_pidFile); |
242 | 85 | fullCommandLine.append(Utils::QtcProcess::quoteArgUnix(executable())); | 87 | fullCommandLine.append(Utils::QtcProcess::quoteArgUnix(runnable.executable)); |
243 | 86 | if (!arguments().isEmpty()) { | 88 | if (!runnable.commandLineArguments.isEmpty()) { |
244 | 87 | fullCommandLine.append(QLatin1Char(' ')); | 89 | fullCommandLine.append(QLatin1Char(' ')); |
246 | 88 | fullCommandLine.append(Utils::QtcProcess::joinArgs(arguments(), Utils::OsTypeLinux)); | 90 | fullCommandLine.append(runnable.commandLineArguments); |
247 | 89 | } | 91 | } |
248 | 90 | fullCommandLine.append(QStringLiteral("\"")); | 92 | fullCommandLine.append(QStringLiteral("\"")); |
249 | 91 | return fullCommandLine; | 93 | return fullCommandLine; |
250 | 92 | 94 | ||
251 | === modified file 'src/ubuntu/device/container/containerdeviceprocess.h' | |||
252 | --- src/ubuntu/device/container/containerdeviceprocess.h 2016-04-08 09:01:23 +0000 | |||
253 | +++ src/ubuntu/device/container/containerdeviceprocess.h 2016-08-24 15:35:12 +0000 | |||
254 | @@ -17,7 +17,6 @@ | |||
255 | 17 | public: | 17 | public: |
256 | 18 | ContainerDeviceProcess(const QSharedPointer<const ProjectExplorer::IDevice> &device, QObject *parent = 0); | 18 | ContainerDeviceProcess(const QSharedPointer<const ProjectExplorer::IDevice> &device, QObject *parent = 0); |
257 | 19 | ~ContainerDeviceProcess(); | 19 | ~ContainerDeviceProcess(); |
258 | 20 | virtual void setWorkingDirectory(const QString &directory) override; | ||
259 | 21 | 20 | ||
260 | 22 | // DeviceProcess interface | 21 | // DeviceProcess interface |
261 | 23 | virtual void interrupt() override { doSignal(2); } | 22 | virtual void interrupt() override { doSignal(2); } |
262 | @@ -27,8 +26,7 @@ | |||
263 | 27 | void doSignal (const int sig); | 26 | void doSignal (const int sig); |
264 | 28 | private: | 27 | private: |
265 | 29 | // SshDeviceProcess interface | 28 | // SshDeviceProcess interface |
268 | 30 | virtual QString fullCommandLine() const override; | 29 | virtual QString fullCommandLine(const ProjectExplorer::StandardRunnable &) const override; |
267 | 31 | QString m_workingDir; | ||
269 | 32 | QString m_pidFile; | 30 | QString m_pidFile; |
270 | 33 | 31 | ||
271 | 34 | }; | 32 | }; |
272 | 35 | 33 | ||
273 | === modified file 'src/ubuntu/device/container/ubuntulocaldeployconfiguration.cpp' | |||
274 | --- src/ubuntu/device/container/ubuntulocaldeployconfiguration.cpp 2016-04-06 09:35:59 +0000 | |||
275 | +++ src/ubuntu/device/container/ubuntulocaldeployconfiguration.cpp 2016-08-24 15:35:12 +0000 | |||
276 | @@ -134,7 +134,7 @@ | |||
277 | 134 | 134 | ||
278 | 135 | void UbuntuLocalDeployConfiguration::selectAsDefaultHack() | 135 | void UbuntuLocalDeployConfiguration::selectAsDefaultHack() |
279 | 136 | { | 136 | { |
281 | 137 | target()->setActiveDeployConfiguration(this); | 137 | //target()->setActiveDeployConfiguration(this); |
282 | 138 | } | 138 | } |
283 | 139 | 139 | ||
284 | 140 | } // namespace Internal | 140 | } // namespace Internal |
285 | 141 | 141 | ||
286 | === modified file 'src/ubuntu/device/container/ubuntulocalrunconfiguration.cpp' | |||
287 | --- src/ubuntu/device/container/ubuntulocalrunconfiguration.cpp 2016-07-22 10:17:50 +0000 | |||
288 | +++ src/ubuntu/device/container/ubuntulocalrunconfiguration.cpp 2016-08-24 15:35:12 +0000 | |||
289 | @@ -30,6 +30,7 @@ | |||
290 | 30 | #include <qtsupport/qtkitinformation.h> | 30 | #include <qtsupport/qtkitinformation.h> |
291 | 31 | #include <projectexplorer/target.h> | 31 | #include <projectexplorer/target.h> |
292 | 32 | #include <projectexplorer/buildconfiguration.h> | 32 | #include <projectexplorer/buildconfiguration.h> |
293 | 33 | #include <projectexplorer/runnables.h> | ||
294 | 33 | #include <utils/environment.h> | 34 | #include <utils/environment.h> |
295 | 34 | #include <utils/qtcprocess.h> | 35 | #include <utils/qtcprocess.h> |
296 | 35 | #include <cmakeprojectmanager/cmakeproject.h> | 36 | #include <cmakeprojectmanager/cmakeproject.h> |
297 | @@ -60,14 +61,14 @@ | |||
298 | 60 | } | 61 | } |
299 | 61 | 62 | ||
300 | 62 | UbuntuLocalRunConfiguration::UbuntuLocalRunConfiguration(ProjectExplorer::Target *parent, Core::Id id) | 63 | UbuntuLocalRunConfiguration::UbuntuLocalRunConfiguration(ProjectExplorer::Target *parent, Core::Id id) |
302 | 63 | : RemoteLinux::AbstractRemoteLinuxRunConfiguration(parent, id) | 64 | : ProjectExplorer::RunConfiguration(parent, id) |
303 | 64 | { | 65 | { |
304 | 65 | setDisplayName(appId()); | 66 | setDisplayName(appId()); |
305 | 66 | addExtraAspect(new UbuntuLocalEnvironmentAspect(this)); | 67 | addExtraAspect(new UbuntuLocalEnvironmentAspect(this)); |
306 | 67 | } | 68 | } |
307 | 68 | 69 | ||
308 | 69 | UbuntuLocalRunConfiguration::UbuntuLocalRunConfiguration(ProjectExplorer::Target *parent, UbuntuLocalRunConfiguration *source) | 70 | UbuntuLocalRunConfiguration::UbuntuLocalRunConfiguration(ProjectExplorer::Target *parent, UbuntuLocalRunConfiguration *source) |
310 | 70 | : RemoteLinux::AbstractRemoteLinuxRunConfiguration(parent,source) | 71 | : ProjectExplorer::RunConfiguration(parent,source) |
311 | 71 | { | 72 | { |
312 | 72 | } | 73 | } |
313 | 73 | 74 | ||
314 | @@ -126,6 +127,23 @@ | |||
315 | 126 | return Configured; | 127 | return Configured; |
316 | 127 | } | 128 | } |
317 | 128 | 129 | ||
318 | 130 | ProjectExplorer::Runnable UbuntuLocalRunConfiguration::runnable() const | ||
319 | 131 | { | ||
320 | 132 | if (m_executable.isEmpty()) | ||
321 | 133 | return ProjectExplorer::Runnable(); | ||
322 | 134 | |||
323 | 135 | ProjectExplorer::StandardRunnable r; | ||
324 | 136 | r.executable = remoteExecutableFilePath(); | ||
325 | 137 | r.device = ProjectExplorer::DeviceKitInformation::device(target()->kit()); | ||
326 | 138 | r.commandLineArguments = Utils::QtcProcess::joinArgs(arguments(), Utils::OsTypeLinux); | ||
327 | 139 | |||
328 | 140 | // Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...) | ||
329 | 141 | r.workingDirectory = Utils::FileUtils::normalizePathName(m_workingDir.toString()); | ||
330 | 142 | r.environment = environment(); | ||
331 | 143 | |||
332 | 144 | return r; | ||
333 | 145 | } | ||
334 | 146 | |||
335 | 129 | bool UbuntuLocalRunConfiguration::aboutToStart(QString *errorMessage) | 147 | bool UbuntuLocalRunConfiguration::aboutToStart(QString *errorMessage) |
336 | 130 | { | 148 | { |
337 | 131 | if(target()->project()->id() != Constants::UBUNTUPROJECT_ID) { | 149 | if(target()->project()->id() != Constants::UBUNTUPROJECT_ID) { |
338 | @@ -628,7 +646,7 @@ | |||
339 | 628 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit()); | 646 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit()); |
340 | 629 | ClickToolChain *uTc = nullptr; | 647 | ClickToolChain *uTc = nullptr; |
341 | 630 | 648 | ||
343 | 631 | if (tc && tc->type() == QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) | 649 | if (tc && tc->typeId() == Constants::UBUNTU_CLICK_TOOLCHAIN_ID) |
344 | 632 | uTc = static_cast<ClickToolChain *>(tc); | 650 | uTc = static_cast<ClickToolChain *>(tc); |
345 | 633 | 651 | ||
346 | 634 | if (uTc) { | 652 | if (uTc) { |
347 | 635 | 653 | ||
348 | === modified file 'src/ubuntu/device/container/ubuntulocalrunconfiguration.h' | |||
349 | --- src/ubuntu/device/container/ubuntulocalrunconfiguration.h 2016-07-22 10:17:50 +0000 | |||
350 | +++ src/ubuntu/device/container/ubuntulocalrunconfiguration.h 2016-08-24 15:35:12 +0000 | |||
351 | @@ -20,7 +20,7 @@ | |||
352 | 20 | #define UBUNTURUNCONFIGURATION_H | 20 | #define UBUNTURUNCONFIGURATION_H |
353 | 21 | 21 | ||
354 | 22 | #include <QObject> | 22 | #include <QObject> |
356 | 23 | #include <remotelinux/abstractremotelinuxrunconfiguration.h> | 23 | #include <projectexplorer/runconfiguration.h> |
357 | 24 | #include <projectexplorer/deployconfiguration.h> | 24 | #include <projectexplorer/deployconfiguration.h> |
358 | 25 | #include <projectexplorer/applicationlauncher.h> | 25 | #include <projectexplorer/applicationlauncher.h> |
359 | 26 | #include <remotelinux/remotelinuxenvironmentaspect.h> | 26 | #include <remotelinux/remotelinuxenvironmentaspect.h> |
360 | @@ -46,7 +46,7 @@ | |||
361 | 46 | 46 | ||
362 | 47 | }; | 47 | }; |
363 | 48 | 48 | ||
365 | 49 | class UbuntuLocalRunConfiguration : public RemoteLinux::AbstractRemoteLinuxRunConfiguration | 49 | class UbuntuLocalRunConfiguration : public ProjectExplorer::RunConfiguration |
366 | 50 | { | 50 | { |
367 | 51 | Q_OBJECT | 51 | Q_OBJECT |
368 | 52 | public: | 52 | public: |
369 | @@ -60,16 +60,16 @@ | |||
370 | 60 | QString appId() const; | 60 | QString appId() const; |
371 | 61 | void addToBaseEnvironment(Utils::Environment &env) const; | 61 | void addToBaseEnvironment(Utils::Environment &env) const; |
372 | 62 | 62 | ||
379 | 63 | // AbstractRemoteLinuxRunConfiguration interface | 63 | QString localExecutableFilePath() const; |
380 | 64 | virtual QString localExecutableFilePath() const override; | 64 | QString remoteExecutableFilePath() const; |
381 | 65 | virtual QString remoteExecutableFilePath() const override; | 65 | QStringList arguments() const; |
382 | 66 | virtual QStringList arguments() const override; | 66 | Utils::Environment environment() const; |
383 | 67 | virtual Utils::Environment environment() const override; | 67 | QString workingDirectory() const; |
378 | 68 | virtual QString workingDirectory() const override; | ||
384 | 69 | 68 | ||
385 | 70 | // RunConfiguration interface | 69 | // RunConfiguration interface |
386 | 71 | virtual bool isConfigured () const override; | 70 | virtual bool isConfigured () const override; |
387 | 72 | virtual ConfigurationState ensureConfigured(QString *) override; | 71 | virtual ConfigurationState ensureConfigured(QString *) override; |
388 | 72 | virtual ProjectExplorer::Runnable runnable() const override; | ||
389 | 73 | 73 | ||
390 | 74 | //static helpers | 74 | //static helpers |
391 | 75 | static QString getDesktopFile (RunConfiguration *config, QString appId, QString *errorMessage = 0); | 75 | static QString getDesktopFile (RunConfiguration *config, QString appId, QString *errorMessage = 0); |
392 | 76 | 76 | ||
393 | === modified file 'src/ubuntu/device/container/ubuntulocalrunconfigurationfactory.cpp' | |||
394 | --- src/ubuntu/device/container/ubuntulocalrunconfigurationfactory.cpp 2016-04-06 10:52:54 +0000 | |||
395 | +++ src/ubuntu/device/container/ubuntulocalrunconfigurationfactory.cpp 2016-08-24 15:35:12 +0000 | |||
396 | @@ -67,7 +67,7 @@ | |||
397 | 67 | if (isRemote) { | 67 | if (isRemote) { |
398 | 68 | //IF we have a remote device we just support a ubuntu toolchain | 68 | //IF we have a remote device we just support a ubuntu toolchain |
399 | 69 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(parent->kit()); | 69 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(parent->kit()); |
401 | 70 | if(tc && tc->type() != QLatin1String(Ubuntu::Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) | 70 | if(tc && tc->typeId() != Ubuntu::Constants::UBUNTU_CLICK_TOOLCHAIN_ID) |
402 | 71 | return types; | 71 | return types; |
403 | 72 | } | 72 | } |
404 | 73 | 73 | ||
405 | 74 | 74 | ||
406 | === modified file 'src/ubuntu/device/container/ubuntulocalruncontrolfactory.cpp' | |||
407 | --- src/ubuntu/device/container/ubuntulocalruncontrolfactory.cpp 2016-05-23 07:26:49 +0000 | |||
408 | +++ src/ubuntu/device/container/ubuntulocalruncontrolfactory.cpp 2016-08-24 15:35:12 +0000 | |||
409 | @@ -6,14 +6,16 @@ | |||
410 | 6 | 6 | ||
411 | 7 | #include "containerdevice.h" | 7 | #include "containerdevice.h" |
412 | 8 | 8 | ||
416 | 9 | #include <analyzerbase/analyzerstartparameters.h> | 9 | #include <debugger/analyzer/analyzermanager.h> |
417 | 10 | #include <analyzerbase/analyzerruncontrol.h> | 10 | #include <debugger/analyzer/analyzerruncontrol.h> |
418 | 11 | #include <analyzerbase/analyzermanager.h> | 11 | #include <debugger/analyzer/analyzerstartparameters.h> |
419 | 12 | #include <projectexplorer/kitinformation.h> | 12 | #include <projectexplorer/kitinformation.h> |
420 | 13 | #include <projectexplorer/target.h> | 13 | #include <projectexplorer/target.h> |
421 | 14 | #include <projectexplorer/abi.h> | 14 | #include <projectexplorer/abi.h> |
422 | 15 | #include <debugger/debuggerruncontrol.h> | 15 | #include <debugger/debuggerruncontrol.h> |
423 | 16 | #include <debugger/debuggerstartparameters.h> | 16 | #include <debugger/debuggerstartparameters.h> |
424 | 17 | #include <debugger/debuggerrunconfigurationaspect.h> | ||
425 | 18 | #include <qmldebug/qmldebugcommandlinearguments.h> | ||
426 | 17 | #include <utils/fileutils.h> | 19 | #include <utils/fileutils.h> |
427 | 18 | #include <utils/portlist.h> | 20 | #include <utils/portlist.h> |
428 | 19 | #include <qmlprofiler/localqmlprofilerrunner.h> | 21 | #include <qmlprofiler/localqmlprofilerrunner.h> |
429 | @@ -36,10 +38,7 @@ | |||
430 | 36 | if (mode != ProjectExplorer::Constants::NORMAL_RUN_MODE | 38 | if (mode != ProjectExplorer::Constants::NORMAL_RUN_MODE |
431 | 37 | && mode != ProjectExplorer::Constants::DEBUG_RUN_MODE | 39 | && mode != ProjectExplorer::Constants::DEBUG_RUN_MODE |
432 | 38 | && mode != ProjectExplorer::Constants::DEBUG_RUN_MODE_WITH_BREAK_ON_MAIN | 40 | && mode != ProjectExplorer::Constants::DEBUG_RUN_MODE_WITH_BREAK_ON_MAIN |
437 | 39 | && mode != ProjectExplorer::Constants::QML_PROFILER_RUN_MODE | 41 | && mode != ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) { |
434 | 40 | && mode != Valgrind::Internal::CALLGRIND_RUN_MODE | ||
435 | 41 | && mode != Valgrind::MEMCHECK_RUN_MODE | ||
436 | 42 | && mode != Valgrind::MEMCHECK_WITH_GDB_RUN_MODE) { | ||
438 | 43 | return false; | 42 | return false; |
439 | 44 | } | 43 | } |
440 | 45 | 44 | ||
441 | @@ -54,7 +53,13 @@ | |||
442 | 54 | if (!ubuntuRC) | 53 | if (!ubuntuRC) |
443 | 55 | return 0; | 54 | return 0; |
444 | 56 | 55 | ||
445 | 56 | if (!ubuntuRC->aboutToStart(errorMessage)) | ||
446 | 57 | return 0; | ||
447 | 58 | |||
448 | 57 | QTC_ASSERT(canRun(runConfiguration, mode), return 0); | 59 | QTC_ASSERT(canRun(runConfiguration, mode), return 0); |
449 | 60 | const auto rcRunnable = runConfiguration->runnable(); | ||
450 | 61 | QTC_ASSERT(rcRunnable.is<ProjectExplorer::StandardRunnable>(), return 0); | ||
451 | 62 | const auto stdRunnable = rcRunnable.as<ProjectExplorer::StandardRunnable>(); | ||
452 | 58 | 63 | ||
453 | 59 | ProjectExplorer::IDevice::ConstPtr genericDev = ProjectExplorer::DeviceKitInformation::device(runConfiguration->target()->kit()); | 64 | ProjectExplorer::IDevice::ConstPtr genericDev = ProjectExplorer::DeviceKitInformation::device(runConfiguration->target()->kit()); |
454 | 60 | if (!genericDev || !genericDev->type().toString().startsWith(QLatin1String(Constants::UBUNTU_CONTAINER_DEVICE_TYPE_ID))) { | 65 | if (!genericDev || !genericDev->type().toString().startsWith(QLatin1String(Constants::UBUNTU_CONTAINER_DEVICE_TYPE_ID))) { |
455 | @@ -64,7 +69,7 @@ | |||
456 | 64 | } | 69 | } |
457 | 65 | 70 | ||
458 | 66 | ProjectExplorer::ToolChain *genericToolchain = ProjectExplorer::ToolChainKitInformation::toolChain(runConfiguration->target()->kit()); | 71 | ProjectExplorer::ToolChain *genericToolchain = ProjectExplorer::ToolChainKitInformation::toolChain(runConfiguration->target()->kit()); |
460 | 67 | if (!genericToolchain || genericToolchain->type() != QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) { | 72 | if (!genericToolchain || genericToolchain->typeId() != Constants::UBUNTU_CLICK_TOOLCHAIN_ID) { |
461 | 68 | if(!errorMessage) | 73 | if(!errorMessage) |
462 | 69 | *errorMessage = tr("Wrong toolchain type in runconfiguration."); | 74 | *errorMessage = tr("Wrong toolchain type in runconfiguration."); |
463 | 70 | return 0; | 75 | return 0; |
464 | @@ -73,9 +78,6 @@ | |||
465 | 73 | ContainerDevice::ConstPtr dev = qSharedPointerCast<const ContainerDevice>(genericDev); | 78 | ContainerDevice::ConstPtr dev = qSharedPointerCast<const ContainerDevice>(genericDev); |
466 | 74 | ClickToolChain *tc = static_cast<ClickToolChain *>(genericToolchain); | 79 | ClickToolChain *tc = static_cast<ClickToolChain *>(genericToolchain); |
467 | 75 | 80 | ||
468 | 76 | if (!ubuntuRC->aboutToStart(errorMessage)) | ||
469 | 77 | return 0; | ||
470 | 78 | |||
471 | 79 | if (mode == ProjectExplorer::Constants::NORMAL_RUN_MODE) { | 81 | if (mode == ProjectExplorer::Constants::NORMAL_RUN_MODE) { |
472 | 80 | RemoteLinux::RemoteLinuxRunControl *runControl = new RemoteLinux::RemoteLinuxRunControl(ubuntuRC); | 82 | RemoteLinux::RemoteLinuxRunControl *runControl = new RemoteLinux::RemoteLinuxRunControl(ubuntuRC); |
473 | 81 | return runControl; | 83 | return runControl; |
474 | @@ -89,8 +91,8 @@ | |||
475 | 89 | 91 | ||
476 | 90 | if (isScope) { | 92 | if (isScope) { |
477 | 91 | Debugger::DebuggerStartParameters params; | 93 | Debugger::DebuggerStartParameters params; |
480 | 92 | // Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...) | 94 | |
481 | 93 | params.workingDirectory = Utils::FileUtils::normalizePathName(ubuntuRC->workingDirectory()); | 95 | params.inferior = stdRunnable; |
482 | 94 | 96 | ||
483 | 95 | QString triplet = tc->gnutriplet(); | 97 | QString triplet = tc->gnutriplet(); |
484 | 96 | if (triplet.isEmpty()) { | 98 | if (triplet.isEmpty()) { |
485 | @@ -101,12 +103,11 @@ | |||
486 | 101 | 103 | ||
487 | 102 | QString scoperunnerPth = QString::fromLatin1("/usr/lib/%1/unity-scopes/scoperunner") | 104 | QString scoperunnerPth = QString::fromLatin1("/usr/lib/%1/unity-scopes/scoperunner") |
488 | 103 | .arg(triplet); | 105 | .arg(triplet); |
490 | 104 | params.executable = QString(UbuntuClickTool::targetBasePath(tc->clickTarget())+scoperunnerPth); | 106 | params.symbolFile = QString(UbuntuClickTool::targetBasePath(tc->clickTarget())+scoperunnerPth); |
491 | 105 | params.continueAfterAttach = true; | 107 | params.continueAfterAttach = true; |
492 | 106 | params.startMode = Debugger::AttachToRemoteServer; | 108 | params.startMode = Debugger::AttachToRemoteServer; |
493 | 107 | params.remoteSetupNeeded = true; | 109 | params.remoteSetupNeeded = true; |
494 | 108 | params.connParams.host = dev->sshParameters().host; | 110 | params.connParams.host = dev->sshParameters().host; |
495 | 109 | params.environment = ubuntuRC->environment(); | ||
496 | 110 | params.solibSearchPath.append(ubuntuRC->soLibSearchPaths()); | 111 | params.solibSearchPath.append(ubuntuRC->soLibSearchPaths()); |
497 | 111 | 112 | ||
498 | 112 | Debugger::DebuggerRunControl *runControl | 113 | Debugger::DebuggerRunControl *runControl |
499 | @@ -117,28 +118,59 @@ | |||
500 | 117 | 118 | ||
501 | 118 | return runControl; | 119 | return runControl; |
502 | 119 | } else { | 120 | } else { |
504 | 120 | if (ubuntuRC->portsUsedByDebuggers() > dev->freePorts().count()) { | 121 | auto aspect = ubuntuRC->extraAspect<Debugger::DebuggerRunConfigurationAspect>(); |
505 | 122 | if (aspect->portsUsedByDebugger() > dev->freePorts().count()) { | ||
506 | 121 | *errorMessage = tr("Cannot debug: Not enough free ports available."); | 123 | *errorMessage = tr("Cannot debug: Not enough free ports available."); |
507 | 122 | return 0; | 124 | return 0; |
508 | 123 | } | 125 | } |
509 | 124 | 126 | ||
511 | 125 | Debugger::DebuggerStartParameters params = RemoteLinux::LinuxDeviceDebugSupport::startParameters(ubuntuRC); | 127 | /* |
512 | 128 | * Taken from remotelinuxruncontrolfactory.cpp and adapted | ||
513 | 129 | * to work here. | ||
514 | 130 | */ | ||
515 | 131 | Debugger::DebuggerStartParameters params; | ||
516 | 132 | params.startMode = Debugger::AttachToRemoteServer; | ||
517 | 133 | params.closeMode = Debugger::KillAndExitMonitorAtClose; | ||
518 | 134 | params.remoteSetupNeeded = true; | ||
519 | 135 | |||
520 | 136 | if (aspect->useQmlDebugger()) { | ||
521 | 137 | params.qmlServer.host = dev->sshParameters().host; | ||
522 | 138 | params.qmlServer.port = Utils::Port(); // port is selected later on | ||
523 | 139 | } | ||
524 | 140 | if (aspect->useCppDebugger()) { | ||
525 | 141 | aspect->setUseMultiProcess(true); | ||
526 | 142 | params.inferior.executable = stdRunnable.executable; | ||
527 | 143 | params.inferior.commandLineArguments = stdRunnable.commandLineArguments; | ||
528 | 144 | if (aspect->useQmlDebugger()) { | ||
529 | 145 | params.inferior.commandLineArguments.prepend(QLatin1Char(' ')); | ||
530 | 146 | params.inferior.commandLineArguments.prepend(QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlDebuggerServices)); | ||
531 | 147 | } | ||
532 | 148 | params.remoteChannel = dev->sshParameters().host + QLatin1String(":-1"); | ||
533 | 149 | params.symbolFile = ubuntuRC->localExecutableFilePath(); | ||
534 | 150 | } | ||
535 | 151 | |||
536 | 126 | params.solibSearchPath.append(ubuntuRC->soLibSearchPaths()); | 152 | params.solibSearchPath.append(ubuntuRC->soLibSearchPaths()); |
537 | 127 | 153 | ||
538 | 128 | Debugger::DebuggerRunControl * const runControl = Debugger::createDebuggerRunControl(params, ubuntuRC, errorMessage, mode); | 154 | Debugger::DebuggerRunControl * const runControl = Debugger::createDebuggerRunControl(params, ubuntuRC, errorMessage, mode); |
539 | 129 | if (!runControl) | 155 | if (!runControl) |
540 | 130 | return 0; | 156 | return 0; |
541 | 131 | 157 | ||
545 | 132 | RemoteLinux::LinuxDeviceDebugSupport * const debugSupport = | 158 | (void) new RemoteLinux::LinuxDeviceDebugSupport(ubuntuRC, runControl); |
543 | 133 | new RemoteLinux::LinuxDeviceDebugSupport(ubuntuRC, runControl); | ||
544 | 134 | connect(runControl, SIGNAL(finished()), debugSupport, SLOT(handleDebuggingFinished())); | ||
546 | 135 | return runControl; | 159 | return runControl; |
547 | 136 | } | 160 | } |
548 | 137 | return 0; | 161 | return 0; |
549 | 138 | } | 162 | } |
550 | 139 | else if(mode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) { | 163 | else if(mode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) { |
553 | 140 | Analyzer::AnalyzerStartParameters params = RemoteLinux::RemoteLinuxAnalyzeSupport::startParameters(ubuntuRC, mode); | 164 | /* |
554 | 141 | Analyzer::AnalyzerRunControl *runControl = Analyzer::AnalyzerManager::createRunControl(params, ubuntuRC); | 165 | * Taken from remotelinuxruncontrolfactory.cpp and adapted |
555 | 166 | * to work here. | ||
556 | 167 | */ | ||
557 | 168 | auto runControl = Debugger::createAnalyzerRunControl(ubuntuRC, mode); | ||
558 | 169 | Debugger::AnalyzerConnection connection; | ||
559 | 170 | connection.connParams = | ||
560 | 171 | ProjectExplorer::DeviceKitInformation::device(ubuntuRC->target()->kit())->sshParameters(); | ||
561 | 172 | connection.analyzerHost = connection.connParams.host; | ||
562 | 173 | runControl->setConnection(connection); | ||
563 | 142 | (void) new RemoteLinux::RemoteLinuxAnalyzeSupport(ubuntuRC, runControl, mode); | 174 | (void) new RemoteLinux::RemoteLinuxAnalyzeSupport(ubuntuRC, runControl, mode); |
564 | 143 | return runControl; | 175 | return runControl; |
565 | 144 | } | 176 | } |
566 | 145 | 177 | ||
567 | === modified file 'src/ubuntu/device/container/ubuntulocalscopedebugsupport.cpp' | |||
568 | --- src/ubuntu/device/container/ubuntulocalscopedebugsupport.cpp 2016-05-23 07:26:49 +0000 | |||
569 | +++ src/ubuntu/device/container/ubuntulocalscopedebugsupport.cpp 2016-08-24 15:35:12 +0000 | |||
570 | @@ -38,7 +38,7 @@ | |||
571 | 38 | 38 | ||
572 | 39 | void UbuntuLocalScopeDebugSupport::startExecution() | 39 | void UbuntuLocalScopeDebugSupport::startExecution() |
573 | 40 | { | 40 | { |
575 | 41 | QTC_ASSERT(state() == GatheringPorts, return); | 41 | QTC_ASSERT(state() == GatheringResources, return); |
576 | 42 | 42 | ||
577 | 43 | setState(StartingRunner); | 43 | setState(StartingRunner); |
578 | 44 | m_gdbserverOutput.clear(); | 44 | m_gdbserverOutput.clear(); |
579 | @@ -47,7 +47,8 @@ | |||
580 | 47 | // as it will stick even for the next non debug run, and even though | 47 | // as it will stick even for the next non debug run, and even though |
581 | 48 | // we can then start without gdbserver the timouts will be always set | 48 | // we can then start without gdbserver the timouts will be always set |
582 | 49 | // high, because the DebugMode=true setting is still there | 49 | // high, because the DebugMode=true setting is still there |
584 | 50 | if(!setPort(m_port)) { | 50 | m_port = findPort(); |
585 | 51 | if(!m_port.isValid()) { | ||
586 | 51 | Debugger::RemoteSetupResult res; | 52 | Debugger::RemoteSetupResult res; |
587 | 52 | res.success = false; | 53 | res.success = false; |
588 | 53 | res.reason = tr("Could not assign a free port for debugging."); | 54 | res.reason = tr("Could not assign a free port for debugging."); |
589 | @@ -118,7 +119,7 @@ | |||
590 | 118 | } | 119 | } |
591 | 119 | 120 | ||
592 | 120 | args.append(QStringLiteral("--cppdebug")); | 121 | args.append(QStringLiteral("--cppdebug")); |
594 | 121 | args.append(QString::number(m_port)); | 122 | args.append(QString::number(m_port.number())); |
595 | 122 | 123 | ||
596 | 123 | 124 | ||
597 | 124 | setState(StartingRunner); | 125 | setState(StartingRunner); |
598 | @@ -138,9 +139,7 @@ | |||
599 | 138 | connect(m_runControl, &Debugger::DebuggerRunControl::stateChanged, | 139 | connect(m_runControl, &Debugger::DebuggerRunControl::stateChanged, |
600 | 139 | this, &UbuntuLocalScopeDebugSupport::handleStateChanged); | 140 | this, &UbuntuLocalScopeDebugSupport::handleStateChanged); |
601 | 140 | 141 | ||
605 | 141 | runner->setEnvironment(environment()); | 142 | runner->start(device(), runnable()); |
603 | 142 | runner->setWorkingDirectory(workingDirectory()); | ||
604 | 143 | runner->start(device(), m_executable, args); | ||
606 | 144 | } | 143 | } |
607 | 145 | 144 | ||
608 | 146 | void UbuntuLocalScopeDebugSupport::handleRemoteSetupRequested() | 145 | void UbuntuLocalScopeDebugSupport::handleRemoteSetupRequested() |
609 | @@ -148,7 +147,7 @@ | |||
610 | 148 | QTC_ASSERT(state() == Inactive, return); | 147 | QTC_ASSERT(state() == Inactive, return); |
611 | 149 | 148 | ||
612 | 150 | showMessage(tr("Checking available ports...") + QLatin1Char('\n'), Debugger::LogStatus); | 149 | showMessage(tr("Checking available ports...") + QLatin1Char('\n'), Debugger::LogStatus); |
614 | 151 | AbstractRemoteLinuxRunSupport::handleRemoteSetupRequested(); | 150 | startPortsGathering(); |
615 | 152 | } | 151 | } |
616 | 153 | 152 | ||
617 | 154 | void UbuntuLocalScopeDebugSupport::handleAppRunnerError(const QString &error) | 153 | void UbuntuLocalScopeDebugSupport::handleAppRunnerError(const QString &error) |
618 | @@ -171,7 +170,7 @@ | |||
619 | 171 | 170 | ||
620 | 172 | void UbuntuLocalScopeDebugSupport::handleRemoteErrorOutput(const QByteArray &output) | 171 | void UbuntuLocalScopeDebugSupport::handleRemoteErrorOutput(const QByteArray &output) |
621 | 173 | { | 172 | { |
623 | 174 | QTC_ASSERT(state() != GatheringPorts, return); | 173 | QTC_ASSERT(state() != GatheringResources, return); |
624 | 175 | 174 | ||
625 | 176 | if (!m_runControl) | 175 | if (!m_runControl) |
626 | 177 | return; | 176 | return; |
627 | 178 | 177 | ||
628 | === modified file 'src/ubuntu/device/container/ubuntulocalscopedebugsupport.h' | |||
629 | --- src/ubuntu/device/container/ubuntulocalscopedebugsupport.h 2016-05-23 07:26:49 +0000 | |||
630 | +++ src/ubuntu/device/container/ubuntulocalscopedebugsupport.h 2016-08-24 15:35:12 +0000 | |||
631 | @@ -42,7 +42,7 @@ | |||
632 | 42 | void showMessage(const QString &msg, int channel); | 42 | void showMessage(const QString &msg, int channel); |
633 | 43 | 43 | ||
634 | 44 | private: | 44 | private: |
636 | 45 | int m_port; | 45 | Utils::Port m_port; |
637 | 46 | QString m_scopeRunnerPath; | 46 | QString m_scopeRunnerPath; |
638 | 47 | QString m_executable; | 47 | QString m_executable; |
639 | 48 | QString m_buildDir; | 48 | QString m_buildDir; |
640 | 49 | 49 | ||
641 | === modified file 'src/ubuntu/device/remote/abstractremoterunsupport.cpp' | |||
642 | --- src/ubuntu/device/remote/abstractremoterunsupport.cpp 2016-03-29 09:41:07 +0000 | |||
643 | +++ src/ubuntu/device/remote/abstractremoterunsupport.cpp 2016-08-24 15:35:12 +0000 | |||
644 | @@ -84,14 +84,15 @@ | |||
645 | 84 | return &d->runner; | 84 | return &d->runner; |
646 | 85 | } | 85 | } |
647 | 86 | 86 | ||
649 | 87 | bool AbstractRemoteRunSupport::assignNextFreePort(int *port) | 87 | Utils::Port AbstractRemoteRunSupport::findFreePort( ) |
650 | 88 | { | 88 | { |
653 | 89 | *port = d->portScanner.getNextFreePort(&d->freePorts); | 89 | Utils::Port thePort = d->portScanner.getNextFreePort(&d->freePorts); |
654 | 90 | if (*port == -1) { | 90 | if (!thePort.isValid()){ |
655 | 91 | handleAdapterSetupFailed(tr("Not enough free ports on device for debugging.")); | 91 | handleAdapterSetupFailed(tr("Not enough free ports on device for debugging.")); |
657 | 92 | return false; | 92 | return Utils::Port(); |
658 | 93 | } | 93 | } |
660 | 94 | return true; | 94 | |
661 | 95 | return thePort; | ||
662 | 95 | } | 96 | } |
663 | 96 | 97 | ||
664 | 97 | void AbstractRemoteRunSupport::setFinished() | 98 | void AbstractRemoteRunSupport::setFinished() |
665 | 98 | 99 | ||
666 | === modified file 'src/ubuntu/device/remote/abstractremoterunsupport.h' | |||
667 | --- src/ubuntu/device/remote/abstractremoterunsupport.h 2016-03-29 09:41:07 +0000 | |||
668 | +++ src/ubuntu/device/remote/abstractremoterunsupport.h 2016-08-24 15:35:12 +0000 | |||
669 | @@ -34,7 +34,7 @@ | |||
670 | 34 | virtual void handleAdapterSetupFailed(const QString &error); | 34 | virtual void handleAdapterSetupFailed(const QString &error); |
671 | 35 | virtual void handleAdapterSetupDone(); | 35 | virtual void handleAdapterSetupDone(); |
672 | 36 | 36 | ||
674 | 37 | bool assignNextFreePort(int *port); | 37 | Utils::Port findFreePort(); |
675 | 38 | void setFinished (); | 38 | void setFinished (); |
676 | 39 | void reset(); | 39 | void reset(); |
677 | 40 | 40 | ||
678 | 41 | 41 | ||
679 | === modified file 'src/ubuntu/device/remote/ubuntudeploystepfactory.cpp' | |||
680 | --- src/ubuntu/device/remote/ubuntudeploystepfactory.cpp 2016-03-29 10:39:39 +0000 | |||
681 | +++ src/ubuntu/device/remote/ubuntudeploystepfactory.cpp 2016-08-24 15:35:12 +0000 | |||
682 | @@ -6,6 +6,7 @@ | |||
683 | 6 | #include <ubuntu/ubuntupackagestep.h> | 6 | #include <ubuntu/ubuntupackagestep.h> |
684 | 7 | 7 | ||
685 | 8 | #include <utils/qtcassert.h> | 8 | #include <utils/qtcassert.h> |
686 | 9 | #include <utils/algorithm.h> | ||
687 | 9 | 10 | ||
688 | 10 | #include <projectexplorer/buildstep.h> | 11 | #include <projectexplorer/buildstep.h> |
689 | 11 | #include <projectexplorer/buildsteplist.h> | 12 | #include <projectexplorer/buildsteplist.h> |
690 | @@ -23,9 +24,9 @@ | |||
691 | 23 | namespace Ubuntu { | 24 | namespace Ubuntu { |
692 | 24 | namespace Internal { | 25 | namespace Internal { |
693 | 25 | 26 | ||
695 | 26 | QList<Core::Id> UbuntuDeployStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const | 27 | QList<ProjectExplorer::BuildStepInfo> UbuntuDeployStepFactory::availableSteps(ProjectExplorer::BuildStepList *parent) const |
696 | 27 | { | 28 | { |
698 | 28 | QList<Core::Id> types; | 29 | QList<ProjectExplorer::BuildStepInfo> types; |
699 | 29 | 30 | ||
700 | 30 | if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY) | 31 | if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY) |
701 | 31 | return types; | 32 | return types; |
702 | @@ -43,34 +44,37 @@ | |||
703 | 43 | if (isRemote) { | 44 | if (isRemote) { |
704 | 44 | //IF we have a remote device we just support a ubuntu toolchain | 45 | //IF we have a remote device we just support a ubuntu toolchain |
705 | 45 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(parent->target()->kit()); | 46 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(parent->target()->kit()); |
707 | 46 | if(tc && tc->type() != QLatin1String(Ubuntu::Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) | 47 | if(tc && tc->typeId() != Ubuntu::Constants::UBUNTU_CLICK_TOOLCHAIN_ID) |
708 | 47 | return types; | 48 | return types; |
709 | 48 | } | 49 | } |
710 | 49 | 50 | ||
714 | 50 | if(isRemote && ( isHTML || isQML || isCMake || isQMake ) ) | 51 | if(isRemote && ( isHTML || isQML || isCMake || isQMake ) ) { |
715 | 51 | types << Constants::UBUNTU_DEPLOY_UPLOADSTEP_ID | 52 | |
716 | 52 | << Constants::UBUNTU_CLICK_PACKAGESTEP_ID; | 53 | types << ProjectExplorer::BuildStepInfo (Constants::UBUNTU_DEPLOY_UPLOADSTEP_ID, |
717 | 54 | UbuntuDirectUploadStep::displayName(), | ||
718 | 55 | ProjectExplorer::BuildStepInfo::UniqueStep) | ||
719 | 56 | << ProjectExplorer::BuildStepInfo (Constants::UBUNTU_CLICK_PACKAGESTEP_ID, | ||
720 | 57 | tr("UbuntuSDK create click package", "Display name for UbuntuPackageStep id."), | ||
721 | 58 | ProjectExplorer::BuildStepInfo::UniqueStep) | ||
722 | 59 | //backwards compatibility to older projects | ||
723 | 60 | << ProjectExplorer::BuildStepInfo (Constants::UBUNTU_DEPLOY_MAKESTEP_ID, | ||
724 | 61 | tr("UbuntuSDK create click package", "Display name for UbuntuPackageStep id."), | ||
725 | 62 | ProjectExplorer::BuildStepInfo::Flags(ProjectExplorer::BuildStepInfo::UniqueStep | ||
726 | 63 | | ProjectExplorer::BuildStepInfo::Uncreatable | ||
727 | 64 | | ProjectExplorer::BuildStepInfo::Unclonable)); | ||
728 | 65 | } | ||
729 | 53 | 66 | ||
730 | 54 | return types; | 67 | return types; |
731 | 55 | } | 68 | } |
732 | 56 | 69 | ||
745 | 57 | QString UbuntuDeployStepFactory::displayNameForId(const Core::Id id) const | 70 | bool UbuntuDeployStepFactory::canHandle(ProjectExplorer::BuildStepList *parent, const Core::Id id) const |
746 | 58 | { | 71 | { |
747 | 59 | if (id == Constants::UBUNTU_DEPLOY_UPLOADSTEP_ID) | 72 | return Utils::contains(availableSteps(parent), Utils::equal(&ProjectExplorer::BuildStepInfo::id, id)); |
736 | 60 | return UbuntuDirectUploadStep::displayName(); | ||
737 | 61 | else if (id == Constants::UBUNTU_CLICK_PACKAGESTEP_ID) | ||
738 | 62 | return tr("UbuntuSDK create click package", "Display name for UbuntuPackageStep id."); | ||
739 | 63 | return QString(); | ||
740 | 64 | } | ||
741 | 65 | |||
742 | 66 | bool UbuntuDeployStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const | ||
743 | 67 | { | ||
744 | 68 | return availableCreationIds(parent).contains(id); | ||
748 | 69 | } | 73 | } |
749 | 70 | 74 | ||
750 | 71 | ProjectExplorer::BuildStep *UbuntuDeployStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id) | 75 | ProjectExplorer::BuildStep *UbuntuDeployStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id) |
751 | 72 | { | 76 | { |
753 | 73 | if (!canCreate(parent, id)) | 77 | if (!canHandle(parent, id)) |
754 | 74 | return 0; | 78 | return 0; |
755 | 75 | 79 | ||
756 | 76 | if(id == Constants::UBUNTU_DEPLOY_UPLOADSTEP_ID) | 80 | if(id == Constants::UBUNTU_DEPLOY_UPLOADSTEP_ID) |
757 | @@ -83,24 +87,12 @@ | |||
758 | 83 | return 0; | 87 | return 0; |
759 | 84 | } | 88 | } |
760 | 85 | 89 | ||
761 | 86 | bool UbuntuDeployStepFactory::canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const | ||
762 | 87 | { | ||
763 | 88 | Core::Id toRestore = ProjectExplorer::idFromMap(map); | ||
764 | 89 | |||
765 | 90 | //backwards compatibility to older projects | ||
766 | 91 | if( toRestore == Constants::UBUNTU_DEPLOY_MAKESTEP_ID ) | ||
767 | 92 | return canCreate(parent,Core::Id(Constants::UBUNTU_CLICK_PACKAGESTEP_ID)); | ||
768 | 93 | |||
769 | 94 | return canCreate(parent,toRestore); | ||
770 | 95 | } | ||
771 | 96 | |||
772 | 97 | ProjectExplorer::BuildStep *UbuntuDeployStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) | 90 | ProjectExplorer::BuildStep *UbuntuDeployStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) |
773 | 98 | { | 91 | { |
774 | 99 | Core::Id id = ProjectExplorer::idFromMap(map); | 92 | Core::Id id = ProjectExplorer::idFromMap(map); |
776 | 100 | if(!canCreate(parent,id)) | 93 | if(!canHandle(parent,id)) |
777 | 101 | return 0; | 94 | return 0; |
778 | 102 | 95 | ||
779 | 103 | //backwards compatibility to older projects | ||
780 | 104 | if( id == Constants::UBUNTU_DEPLOY_MAKESTEP_ID ) { | 96 | if( id == Constants::UBUNTU_DEPLOY_MAKESTEP_ID ) { |
781 | 105 | UbuntuPackageStep *step = new UbuntuPackageStep(parent); | 97 | UbuntuPackageStep *step = new UbuntuPackageStep(parent); |
782 | 106 | return step; | 98 | return step; |
783 | @@ -115,14 +107,9 @@ | |||
784 | 115 | return step; | 107 | return step; |
785 | 116 | } | 108 | } |
786 | 117 | 109 | ||
787 | 118 | bool UbuntuDeployStepFactory::canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) const | ||
788 | 119 | { | ||
789 | 120 | return canCreate(parent,product->id()); | ||
790 | 121 | } | ||
791 | 122 | |||
792 | 123 | ProjectExplorer::BuildStep *UbuntuDeployStepFactory::clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) | 110 | ProjectExplorer::BuildStep *UbuntuDeployStepFactory::clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) |
793 | 124 | { | 111 | { |
795 | 125 | if (!canClone(parent, product)) | 112 | if (!canHandle(parent, product->id())) |
796 | 126 | return 0; | 113 | return 0; |
797 | 127 | 114 | ||
798 | 128 | const Core::Id id = product->id(); | 115 | const Core::Id id = product->id(); |
799 | 129 | 116 | ||
800 | === modified file 'src/ubuntu/device/remote/ubuntudeploystepfactory.h' | |||
801 | --- src/ubuntu/device/remote/ubuntudeploystepfactory.h 2016-03-29 10:39:39 +0000 | |||
802 | +++ src/ubuntu/device/remote/ubuntudeploystepfactory.h 2016-08-24 15:35:12 +0000 | |||
803 | @@ -13,14 +13,13 @@ | |||
804 | 13 | 13 | ||
805 | 14 | public: | 14 | public: |
806 | 15 | // IBuildStepFactory interface | 15 | // IBuildStepFactory interface |
810 | 16 | virtual QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const override; | 16 | virtual QList<ProjectExplorer::BuildStepInfo> availableSteps(ProjectExplorer::BuildStepList *parent) const override; |
808 | 17 | virtual QString displayNameForId(const Core::Id id) const override; | ||
809 | 18 | virtual bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const override; | ||
811 | 19 | virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id) override; | 17 | virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id) override; |
812 | 20 | virtual bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const override; | ||
813 | 21 | virtual ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) override; | 18 | virtual ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) override; |
814 | 22 | virtual bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) const override; | ||
815 | 23 | virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) override; | 19 | virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) override; |
816 | 20 | |||
817 | 21 | private: | ||
818 | 22 | bool canHandle(ProjectExplorer::BuildStepList *parent, const Core::Id id) const; | ||
819 | 24 | }; | 23 | }; |
820 | 25 | 24 | ||
821 | 26 | } // namespace Internal | 25 | } // namespace Internal |
822 | 27 | 26 | ||
823 | === modified file 'src/ubuntu/device/remote/ubuntudevice.cpp' | |||
824 | --- src/ubuntu/device/remote/ubuntudevice.cpp 2016-03-29 09:41:07 +0000 | |||
825 | +++ src/ubuntu/device/remote/ubuntudevice.cpp 2016-08-24 15:35:12 +0000 | |||
826 | @@ -28,6 +28,7 @@ | |||
827 | 28 | #include <ubuntu/settings.h> | 28 | #include <ubuntu/settings.h> |
828 | 29 | 29 | ||
829 | 30 | #include <projectexplorer/devicesupport/devicemanager.h> | 30 | #include <projectexplorer/devicesupport/devicemanager.h> |
830 | 31 | #include <projectexplorer/runnables.h> | ||
831 | 31 | #include <remotelinux/genericlinuxdeviceconfigurationwidget.h> | 32 | #include <remotelinux/genericlinuxdeviceconfigurationwidget.h> |
832 | 32 | #include <coreplugin/messagemanager.h> | 33 | #include <coreplugin/messagemanager.h> |
833 | 33 | #include <ssh/sshconnection.h> | 34 | #include <ssh/sshconnection.h> |
834 | @@ -744,14 +745,14 @@ | |||
835 | 744 | 745 | ||
836 | 745 | //first port is SSH port | 746 | //first port is SSH port |
837 | 746 | QSsh::SshConnectionParameters connParms = m_dev->sshParameters(); | 747 | QSsh::SshConnectionParameters connParms = m_dev->sshParameters(); |
839 | 747 | connParms.port = copy.getNext(); | 748 | connParms.port = copy.getNext().number(); |
840 | 748 | m_dev->setSshParameters(connParms); | 749 | m_dev->setSshParameters(connParms); |
841 | 749 | 750 | ||
842 | 750 | m_dev->setFreePorts(copy); | 751 | m_dev->setFreePorts(copy); |
843 | 751 | 752 | ||
844 | 752 | QStringList ports; | 753 | QStringList ports; |
845 | 753 | while(copy.hasMore()) | 754 | while(copy.hasMore()) |
847 | 754 | ports.append(QString::number(copy.getNext())); | 755 | ports.append(QString::number(copy.getNext().number())); |
848 | 755 | 756 | ||
849 | 756 | //@TODO per device settings | 757 | //@TODO per device settings |
850 | 757 | QString deviceSshPort = QString::number(connParms.port); | 758 | QString deviceSshPort = QString::number(connParms.port); |
851 | @@ -1349,17 +1350,12 @@ | |||
852 | 1349 | { | 1350 | { |
853 | 1350 | } | 1351 | } |
854 | 1351 | 1352 | ||
855 | 1352 | void UbuntuDeviceProcess::setWorkingDirectory(const QString &directory) | ||
856 | 1353 | { | ||
857 | 1354 | m_workingDir = directory; | ||
858 | 1355 | } | ||
859 | 1356 | |||
860 | 1357 | void UbuntuDeviceProcess::terminate() | 1353 | void UbuntuDeviceProcess::terminate() |
861 | 1358 | { | 1354 | { |
862 | 1359 | LinuxDeviceProcess::terminate(); | 1355 | LinuxDeviceProcess::terminate(); |
863 | 1360 | } | 1356 | } |
864 | 1361 | 1357 | ||
866 | 1362 | QString UbuntuDeviceProcess::fullCommandLine() const | 1358 | QString UbuntuDeviceProcess::fullCommandLine(const ProjectExplorer::StandardRunnable &runnable) const |
867 | 1363 | { | 1359 | { |
868 | 1364 | //return QStringLiteral("%1 %2").arg(quote(executable()),Utils::QtcProcess::joinArgsUnix(arguments())); | 1360 | //return QStringLiteral("%1 %2").arg(quote(executable()),Utils::QtcProcess::joinArgsUnix(arguments())); |
869 | 1365 | 1361 | ||
870 | @@ -1371,15 +1367,15 @@ | |||
871 | 1371 | QString fullCommandLine; | 1367 | QString fullCommandLine; |
872 | 1372 | foreach (const QString &filePath, rcFiles) | 1368 | foreach (const QString &filePath, rcFiles) |
873 | 1373 | fullCommandLine += QString::fromLatin1("test -f %1 && . %1;").arg(filePath); | 1369 | fullCommandLine += QString::fromLatin1("test -f %1 && . %1;").arg(filePath); |
876 | 1374 | if (!m_workingDir.isEmpty()) { | 1370 | if (!runnable.workingDirectory.isEmpty()) { |
877 | 1375 | fullCommandLine.append(QLatin1String("cd ")).append(quote(m_workingDir)) | 1371 | fullCommandLine.append(QLatin1String("cd ")).append(quote(runnable.workingDirectory)) |
878 | 1376 | .append(QLatin1String(" && ")); | 1372 | .append(QLatin1String(" && ")); |
879 | 1377 | } | 1373 | } |
880 | 1378 | 1374 | ||
883 | 1379 | fullCommandLine.append(quote(executable())); | 1375 | fullCommandLine.append(quote(runnable.executable)); |
884 | 1380 | if (!arguments().isEmpty()) { | 1376 | if (!runnable.commandLineArguments.isEmpty()) { |
885 | 1381 | fullCommandLine.append(QLatin1Char(' ')); | 1377 | fullCommandLine.append(QLatin1Char(' ')); |
887 | 1382 | fullCommandLine.append(Utils::QtcProcess::joinArgs(arguments(),Utils::OsTypeLinux)); | 1378 | fullCommandLine.append(runnable.commandLineArguments); |
888 | 1383 | } | 1379 | } |
889 | 1384 | 1380 | ||
890 | 1385 | if(debug) qDebug()<<fullCommandLine; | 1381 | if(debug) qDebug()<<fullCommandLine; |
891 | 1386 | 1382 | ||
892 | === modified file 'src/ubuntu/device/remote/ubuntudevice.h' | |||
893 | --- src/ubuntu/device/remote/ubuntudevice.h 2016-03-29 09:41:07 +0000 | |||
894 | +++ src/ubuntu/device/remote/ubuntudevice.h 2016-08-24 15:35:12 +0000 | |||
895 | @@ -246,16 +246,13 @@ | |||
896 | 246 | explicit UbuntuDeviceProcess(const QSharedPointer<const ProjectExplorer::IDevice> &device, | 246 | explicit UbuntuDeviceProcess(const QSharedPointer<const ProjectExplorer::IDevice> &device, |
897 | 247 | QObject *parent = 0); | 247 | QObject *parent = 0); |
898 | 248 | 248 | ||
899 | 249 | void setWorkingDirectory(const QString &directory) override; | ||
900 | 250 | |||
901 | 251 | // DeviceProcess interface | 249 | // DeviceProcess interface |
902 | 252 | public: | 250 | public: |
903 | 253 | virtual void terminate() override; | 251 | virtual void terminate() override; |
904 | 254 | 252 | ||
905 | 255 | private: | 253 | private: |
906 | 256 | // SshDeviceProcess interface | 254 | // SshDeviceProcess interface |
909 | 257 | virtual QString fullCommandLine() const override; | 255 | virtual QString fullCommandLine(const ProjectExplorer::StandardRunnable &runnable) const override; |
908 | 258 | QString m_workingDir; | ||
910 | 259 | }; | 256 | }; |
911 | 260 | 257 | ||
912 | 261 | } // namespace Internal | 258 | } // namespace Internal |
913 | 262 | 259 | ||
914 | === modified file 'src/ubuntu/device/remote/ubuntudevicesignaloperation.cpp' | |||
915 | --- src/ubuntu/device/remote/ubuntudevicesignaloperation.cpp 2016-03-29 09:41:07 +0000 | |||
916 | +++ src/ubuntu/device/remote/ubuntudevicesignaloperation.cpp 2016-08-24 15:35:12 +0000 | |||
917 | @@ -10,7 +10,7 @@ | |||
918 | 10 | 10 | ||
919 | 11 | } | 11 | } |
920 | 12 | 12 | ||
922 | 13 | void UbuntuDeviceSignalOperation::killProcess(int pid) | 13 | void UbuntuDeviceSignalOperation::killProcess(qint64 pid) |
923 | 14 | { | 14 | { |
924 | 15 | sendSignal(pid,9); | 15 | sendSignal(pid,9); |
925 | 16 | } | 16 | } |
926 | @@ -21,7 +21,7 @@ | |||
927 | 21 | emit finished(tr("Sending signals to processes by filePath is not supported on Ubuntu Devices")); | 21 | emit finished(tr("Sending signals to processes by filePath is not supported on Ubuntu Devices")); |
928 | 22 | } | 22 | } |
929 | 23 | 23 | ||
931 | 24 | void UbuntuDeviceSignalOperation::interruptProcess(int pid) | 24 | void UbuntuDeviceSignalOperation::interruptProcess(qint64 pid) |
932 | 25 | { | 25 | { |
933 | 26 | sendSignal(pid,2); | 26 | sendSignal(pid,2); |
934 | 27 | } | 27 | } |
935 | @@ -32,7 +32,7 @@ | |||
936 | 32 | emit finished(tr("Sending signals to processes by filePath is not supported on Ubuntu Devices")); | 32 | emit finished(tr("Sending signals to processes by filePath is not supported on Ubuntu Devices")); |
937 | 33 | } | 33 | } |
938 | 34 | 34 | ||
940 | 35 | void UbuntuDeviceSignalOperation::sendSignal(int pid, int signal) | 35 | void UbuntuDeviceSignalOperation::sendSignal(qint64 pid, int signal) |
941 | 36 | { | 36 | { |
942 | 37 | QProcess *proc = new QProcess(this); | 37 | QProcess *proc = new QProcess(this); |
943 | 38 | 38 | ||
944 | 39 | 39 | ||
945 | === modified file 'src/ubuntu/device/remote/ubuntudevicesignaloperation.h' | |||
946 | --- src/ubuntu/device/remote/ubuntudevicesignaloperation.h 2016-07-22 10:17:50 +0000 | |||
947 | +++ src/ubuntu/device/remote/ubuntudevicesignaloperation.h 2016-08-24 15:35:12 +0000 | |||
948 | @@ -17,13 +17,13 @@ | |||
949 | 17 | typedef QSharedPointer<UbuntuDeviceSignalOperation> Ptr; | 17 | typedef QSharedPointer<UbuntuDeviceSignalOperation> Ptr; |
950 | 18 | 18 | ||
951 | 19 | // DeviceProcessSignalOperation interface | 19 | // DeviceProcessSignalOperation interface |
953 | 20 | virtual void killProcess(int pid) override; | 20 | virtual void killProcess(qint64 pid) override; |
954 | 21 | virtual void killProcess(const QString &filePath) override; | 21 | virtual void killProcess(const QString &filePath) override; |
956 | 22 | virtual void interruptProcess(int pid) override; | 22 | virtual void interruptProcess(qint64 pid) override; |
957 | 23 | virtual void interruptProcess(const QString &filePath) override; | 23 | virtual void interruptProcess(const QString &filePath) override; |
958 | 24 | 24 | ||
959 | 25 | private: | 25 | private: |
961 | 26 | void sendSignal (int pid, int signal); | 26 | void sendSignal (qint64 pid, int signal); |
962 | 27 | 27 | ||
963 | 28 | private slots: | 28 | private slots: |
964 | 29 | void processFinished (int exitCode, QProcess::ExitStatus exitState); | 29 | void processFinished (int exitCode, QProcess::ExitStatus exitState); |
965 | 30 | 30 | ||
966 | === modified file 'src/ubuntu/device/remote/ubuntudirectuploadstep.cpp' | |||
967 | --- src/ubuntu/device/remote/ubuntudirectuploadstep.cpp 2016-03-29 10:39:39 +0000 | |||
968 | +++ src/ubuntu/device/remote/ubuntudirectuploadstep.cpp 2016-08-24 15:35:12 +0000 | |||
969 | @@ -65,12 +65,13 @@ | |||
970 | 65 | 65 | ||
971 | 66 | void UbuntuDirectUploadStep::run(QFutureInterface<bool> &fi) | 66 | void UbuntuDirectUploadStep::run(QFutureInterface<bool> &fi) |
972 | 67 | { | 67 | { |
973 | 68 | m_future = &fi; | ||
974 | 69 | |||
975 | 68 | m_foundClickPackage = false; | 70 | m_foundClickPackage = false; |
976 | 69 | projectNameChanged(); | 71 | projectNameChanged(); |
977 | 70 | if(!m_foundClickPackage) { | 72 | if(!m_foundClickPackage) { |
981 | 71 | emit addOutput(tr("Deploy step failed. No click package was created"), ErrorMessageOutput); | 73 | doFail(tr("Deploy step failed. No click package was created")); |
982 | 72 | fi.reportResult(false); | 74 | m_future = 0; |
980 | 73 | emit finished(); | ||
983 | 74 | return; | 75 | return; |
984 | 75 | } | 76 | } |
985 | 76 | 77 | ||
986 | @@ -80,13 +81,11 @@ | |||
987 | 80 | 81 | ||
988 | 81 | UbuntuDevice::ConstPtr dev = deviceFromTarget(target()); | 82 | UbuntuDevice::ConstPtr dev = deviceFromTarget(target()); |
989 | 82 | if(!dev) { | 83 | if(!dev) { |
993 | 83 | emit addOutput(tr("Deploy step failed. No valid device configured"), ErrorMessageOutput); | 84 | doFail(tr("Deploy step failed. No valid device configured")); |
994 | 84 | fi.reportResult(false); | 85 | m_future = 0; |
992 | 85 | emit finished(); | ||
995 | 86 | return; | 86 | return; |
996 | 87 | } | 87 | } |
997 | 88 | 88 | ||
998 | 89 | m_future = &fi; | ||
999 | 90 | if(dev->deviceState() != ProjectExplorer::IDevice::DeviceReadyToUse) { | 89 | if(dev->deviceState() != ProjectExplorer::IDevice::DeviceReadyToUse) { |
1000 | 91 | //we are already waiting | 90 | //we are already waiting |
1001 | 92 | if (m_waitDialog) | 91 | if (m_waitDialog) |
1002 | @@ -109,10 +108,8 @@ | |||
1003 | 109 | { | 108 | { |
1004 | 110 | m_waitDialog->deleteLater(); | 109 | m_waitDialog->deleteLater(); |
1005 | 111 | 110 | ||
1008 | 112 | emit addOutput(tr("Deploy step failed"), ErrorMessageOutput); | 111 | doFail(tr("Deploy step failed")); |
1007 | 113 | m_future->reportResult(false); | ||
1009 | 114 | m_future = 0; | 112 | m_future = 0; |
1010 | 115 | emit finished(); | ||
1011 | 116 | } | 113 | } |
1012 | 117 | 114 | ||
1013 | 118 | void UbuntuDirectUploadStep::handleDeviceReady() | 115 | void UbuntuDirectUploadStep::handleDeviceReady() |
1014 | @@ -121,10 +118,8 @@ | |||
1015 | 121 | 118 | ||
1016 | 122 | QString whyNot; | 119 | QString whyNot; |
1017 | 123 | if(!deployService()->isDeploymentPossible(&whyNot)) { | 120 | if(!deployService()->isDeploymentPossible(&whyNot)) { |
1020 | 124 | emit addOutput(tr("Deploy step failed. %1").arg(whyNot), ErrorMessageOutput); | 121 | doFail(tr("Deploy step failed. %1").arg(whyNot)); |
1019 | 125 | m_future->reportResult(false); | ||
1021 | 126 | m_future = 0; | 122 | m_future = 0; |
1022 | 127 | emit finished(); | ||
1023 | 128 | return; | 123 | return; |
1024 | 129 | } | 124 | } |
1025 | 130 | 125 | ||
1026 | @@ -132,6 +127,14 @@ | |||
1027 | 132 | m_future = 0; | 127 | m_future = 0; |
1028 | 133 | } | 128 | } |
1029 | 134 | 129 | ||
1030 | 130 | void UbuntuDirectUploadStep::doFail(const QString &err) | ||
1031 | 131 | { | ||
1032 | 132 | emit addOutput(err, ErrorMessageOutput); | ||
1033 | 133 | disconnect(deployService(), 0, this, 0); | ||
1034 | 134 | if (m_future) | ||
1035 | 135 | reportRunResult(*m_future, false); | ||
1036 | 136 | } | ||
1037 | 137 | |||
1038 | 135 | ProjectExplorer::BuildStepConfigWidget *UbuntuDirectUploadStep::createConfigWidget() | 138 | ProjectExplorer::BuildStepConfigWidget *UbuntuDirectUploadStep::createConfigWidget() |
1039 | 136 | { | 139 | { |
1040 | 137 | return new ProjectExplorer::SimpleBuildStepConfigWidget(this); | 140 | return new ProjectExplorer::SimpleBuildStepConfigWidget(this); |
1041 | 138 | 141 | ||
1042 | === modified file 'src/ubuntu/device/remote/ubuntudirectuploadstep.h' | |||
1043 | --- src/ubuntu/device/remote/ubuntudirectuploadstep.h 2016-07-22 10:17:50 +0000 | |||
1044 | +++ src/ubuntu/device/remote/ubuntudirectuploadstep.h 2016-08-24 15:35:12 +0000 | |||
1045 | @@ -39,6 +39,9 @@ | |||
1046 | 39 | void handleDeviceReady (); | 39 | void handleDeviceReady (); |
1047 | 40 | 40 | ||
1048 | 41 | private: | 41 | private: |
1049 | 42 | void doFail (const QString &err); | ||
1050 | 43 | |||
1051 | 44 | private: | ||
1052 | 42 | RemoteLinux::GenericDirectUploadService *m_deployService; | 45 | RemoteLinux::GenericDirectUploadService *m_deployService; |
1053 | 43 | bool m_foundClickPackage; | 46 | bool m_foundClickPackage; |
1054 | 44 | 47 | ||
1055 | 45 | 48 | ||
1056 | === modified file 'src/ubuntu/device/remote/ubunturemoteanalyzesupport.cpp' | |||
1057 | --- src/ubuntu/device/remote/ubunturemoteanalyzesupport.cpp 2016-03-29 09:41:07 +0000 | |||
1058 | +++ src/ubuntu/device/remote/ubunturemoteanalyzesupport.cpp 2016-08-24 15:35:12 +0000 | |||
1059 | @@ -4,7 +4,7 @@ | |||
1060 | 4 | #include <ubuntu/ubuntuconstants.h> | 4 | #include <ubuntu/ubuntuconstants.h> |
1061 | 5 | 5 | ||
1062 | 6 | #include <remotelinux/remotelinuxrunconfiguration.h> | 6 | #include <remotelinux/remotelinuxrunconfiguration.h> |
1064 | 7 | #include <analyzerbase/analyzerruncontrol.h> | 7 | #include <debugger/analyzer/analyzerruncontrol.h> |
1065 | 8 | 8 | ||
1066 | 9 | #include <projectexplorer/buildconfiguration.h> | 9 | #include <projectexplorer/buildconfiguration.h> |
1067 | 10 | #include <projectexplorer/project.h> | 10 | #include <projectexplorer/project.h> |
1068 | @@ -14,6 +14,7 @@ | |||
1069 | 14 | #include <projectexplorer/kitinformation.h> | 14 | #include <projectexplorer/kitinformation.h> |
1070 | 15 | 15 | ||
1071 | 16 | #include <utils/qtcassert.h> | 16 | #include <utils/qtcassert.h> |
1072 | 17 | #include <utils/port.h> | ||
1073 | 17 | #include <qmldebug/qmloutputparser.h> | 18 | #include <qmldebug/qmloutputparser.h> |
1074 | 18 | 19 | ||
1075 | 19 | #include <QPointer> | 20 | #include <QPointer> |
1076 | @@ -24,30 +25,31 @@ | |||
1077 | 24 | class UbuntuRemoteAnalyzeSupportPrivate | 25 | class UbuntuRemoteAnalyzeSupportPrivate |
1078 | 25 | { | 26 | { |
1079 | 26 | public: | 27 | public: |
1081 | 27 | UbuntuRemoteAnalyzeSupportPrivate(Analyzer::AnalyzerRunControl *rc, Core::Id runMode) | 28 | UbuntuRemoteAnalyzeSupportPrivate(Debugger::AnalyzerRunControl *rc, Core::Id runMode) |
1082 | 28 | : runControl(rc), | 29 | : runControl(rc), |
1085 | 29 | qmlProfiling(runMode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE), | 30 | qmlPort(-1), |
1086 | 30 | qmlPort(-1) | 31 | qmlProfiling(runMode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) |
1087 | 31 | { | 32 | { |
1088 | 32 | } | 33 | } |
1089 | 33 | 34 | ||
1090 | 34 | QString clickPackage; | 35 | QString clickPackage; |
1092 | 35 | const QPointer<Analyzer::AnalyzerRunControl> runControl; | 36 | |
1093 | 37 | const QPointer<Debugger::AnalyzerRunControl> runControl; | ||
1094 | 38 | QmlDebug::QmlOutputParser outputParser; | ||
1095 | 39 | |||
1096 | 40 | Utils::Port qmlPort; | ||
1097 | 36 | bool qmlProfiling; | 41 | bool qmlProfiling; |
1098 | 37 | int qmlPort; | ||
1099 | 38 | |||
1100 | 39 | QmlDebug::QmlOutputParser outputParser; | ||
1101 | 40 | }; | 42 | }; |
1102 | 41 | 43 | ||
1103 | 42 | UbuntuRemoteAnalyzeSupport::UbuntuRemoteAnalyzeSupport(UbuntuRemoteRunConfiguration *runConfig, | 44 | UbuntuRemoteAnalyzeSupport::UbuntuRemoteAnalyzeSupport(UbuntuRemoteRunConfiguration *runConfig, |
1105 | 43 | Analyzer::AnalyzerRunControl *engine, Core::Id runMode) | 45 | Debugger::AnalyzerRunControl *engine, Core::Id runMode) |
1106 | 44 | : AbstractRemoteRunSupport(runConfig, engine), | 46 | : AbstractRemoteRunSupport(runConfig, engine), |
1107 | 45 | d(new UbuntuRemoteAnalyzeSupportPrivate(engine, runMode)) | 47 | d(new UbuntuRemoteAnalyzeSupportPrivate(engine, runMode)) |
1108 | 46 | { | 48 | { |
1109 | 47 | d->clickPackage = runConfig->clickPackage(); | 49 | d->clickPackage = runConfig->clickPackage(); |
1113 | 48 | connect(d->runControl, SIGNAL(starting(const Analyzer::AnalyzerRunControl*)), | 50 | connect(d->runControl, &Debugger::AnalyzerRunControl::starting, |
1114 | 49 | SLOT(handleRemoteSetupRequested())); | 51 | this, &UbuntuRemoteAnalyzeSupport::handleRemoteSetupRequested); |
1115 | 50 | connect(&d->outputParser, SIGNAL(waitingForConnectionOnPort(quint16)), | 52 | connect(&d->outputParser, SIGNAL(waitingForConnectionOnPort(Utils::Port)), |
1116 | 51 | SLOT(remoteIsRunning())); | 53 | SLOT(remoteIsRunning())); |
1117 | 52 | } | 54 | } |
1118 | 53 | 55 | ||
1119 | @@ -59,7 +61,7 @@ | |||
1120 | 59 | void UbuntuRemoteAnalyzeSupport::showMessage(const QString &msg, Utils::OutputFormat format) | 61 | void UbuntuRemoteAnalyzeSupport::showMessage(const QString &msg, Utils::OutputFormat format) |
1121 | 60 | { | 62 | { |
1122 | 61 | if (state() != Idle && d->runControl) | 63 | if (state() != Idle && d->runControl) |
1124 | 62 | d->runControl->logApplicationMessage(msg, format); | 64 | d->runControl->appendMessage(msg, format); |
1125 | 63 | d->outputParser.processOutput(msg); | 65 | d->outputParser.processOutput(msg); |
1126 | 64 | } | 66 | } |
1127 | 65 | 67 | ||
1128 | @@ -78,7 +80,8 @@ | |||
1129 | 78 | // Currently we support only QML profiling | 80 | // Currently we support only QML profiling |
1130 | 79 | QTC_ASSERT(d->qmlProfiling, return); | 81 | QTC_ASSERT(d->qmlProfiling, return); |
1131 | 80 | 82 | ||
1133 | 81 | if (!assignNextFreePort(&d->qmlPort)) | 83 | d->qmlPort = findFreePort(); |
1134 | 84 | if (!d->qmlPort.isValid()) | ||
1135 | 82 | return; | 85 | return; |
1136 | 83 | 86 | ||
1137 | 84 | setState(Starting); | 87 | setState(Starting); |
1138 | @@ -91,7 +94,7 @@ | |||
1139 | 91 | connect(runner, SIGNAL(reportError(QString)), SLOT(handleAppRunnerError(QString))); | 94 | connect(runner, SIGNAL(reportError(QString)), SLOT(handleAppRunnerError(QString))); |
1140 | 92 | 95 | ||
1141 | 93 | runner->setEnv(environment()); | 96 | runner->setEnv(environment()); |
1143 | 94 | runner->setQmlDebugPort(d->qmlPort); | 97 | runner->setQmlDebugPort(d->qmlPort.number()); |
1144 | 95 | 98 | ||
1145 | 96 | QTC_ASSERT(device()->type().toString().startsWith(QLatin1String(Constants::UBUNTU_DEVICE_TYPE_ID)),return); | 99 | QTC_ASSERT(device()->type().toString().startsWith(QLatin1String(Constants::UBUNTU_DEVICE_TYPE_ID)),return); |
1146 | 97 | runner->start(qSharedPointerCast<const UbuntuDevice>(device()),clickPackage(),hook()); | 100 | runner->start(qSharedPointerCast<const UbuntuDevice>(device()),clickPackage(),hook()); |
1147 | 98 | 101 | ||
1148 | === modified file 'src/ubuntu/device/remote/ubunturemoteanalyzesupport.h' | |||
1149 | --- src/ubuntu/device/remote/ubunturemoteanalyzesupport.h 2016-03-29 09:41:07 +0000 | |||
1150 | +++ src/ubuntu/device/remote/ubunturemoteanalyzesupport.h 2016-08-24 15:35:12 +0000 | |||
1151 | @@ -3,7 +3,7 @@ | |||
1152 | 3 | 3 | ||
1153 | 4 | #include <QObject> | 4 | #include <QObject> |
1154 | 5 | #include "abstractremoterunsupport.h" | 5 | #include "abstractremoterunsupport.h" |
1156 | 6 | #include <analyzerbase/analyzerruncontrol.h> | 6 | #include <debugger/analyzer/analyzerruncontrol.h> |
1157 | 7 | 7 | ||
1158 | 8 | namespace Ubuntu { | 8 | namespace Ubuntu { |
1159 | 9 | namespace Internal { | 9 | namespace Internal { |
1160 | @@ -16,7 +16,7 @@ | |||
1161 | 16 | Q_OBJECT | 16 | Q_OBJECT |
1162 | 17 | public: | 17 | public: |
1163 | 18 | UbuntuRemoteAnalyzeSupport(UbuntuRemoteRunConfiguration *runConfig, | 18 | UbuntuRemoteAnalyzeSupport(UbuntuRemoteRunConfiguration *runConfig, |
1165 | 19 | Analyzer::AnalyzerRunControl *engine, Core::Id runMode); | 19 | Debugger::AnalyzerRunControl *engine, Core::Id runMode); |
1166 | 20 | ~UbuntuRemoteAnalyzeSupport() override; | 20 | ~UbuntuRemoteAnalyzeSupport() override; |
1167 | 21 | 21 | ||
1168 | 22 | protected: | 22 | protected: |
1169 | 23 | 23 | ||
1170 | === modified file 'src/ubuntu/device/remote/ubunturemotedebugsupport.cpp' | |||
1171 | --- src/ubuntu/device/remote/ubunturemotedebugsupport.cpp 2016-03-29 09:41:07 +0000 | |||
1172 | +++ src/ubuntu/device/remote/ubunturemotedebugsupport.cpp 2016-08-24 15:35:12 +0000 | |||
1173 | @@ -70,8 +70,8 @@ | |||
1174 | 70 | bool qmlDebugging; | 70 | bool qmlDebugging; |
1175 | 71 | bool cppDebugging; | 71 | bool cppDebugging; |
1176 | 72 | QByteArray gdbserverOutput; | 72 | QByteArray gdbserverOutput; |
1179 | 73 | int gdbServerPort; | 73 | Utils::Port gdbServerPort; |
1180 | 74 | int qmlPort; | 74 | Utils::Port qmlPort; |
1181 | 75 | }; | 75 | }; |
1182 | 76 | 76 | ||
1183 | 77 | UbuntuRemoteDebugSupport::UbuntuRemoteDebugSupport(UbuntuRemoteRunConfiguration* runConfig, | 77 | UbuntuRemoteDebugSupport::UbuntuRemoteDebugSupport(UbuntuRemoteRunConfiguration* runConfig, |
1184 | @@ -80,6 +80,8 @@ | |||
1185 | 80 | d(new UbuntuRemoteDebugSupportPrivate(runConfig, runControl)) | 80 | d(new UbuntuRemoteDebugSupportPrivate(runConfig, runControl)) |
1186 | 81 | { | 81 | { |
1187 | 82 | connect(d->runControl, SIGNAL(requestRemoteSetup()), this, SLOT(handleRemoteSetupRequested())); | 82 | connect(d->runControl, SIGNAL(requestRemoteSetup()), this, SLOT(handleRemoteSetupRequested())); |
1188 | 83 | connect(d->runControl,&Debugger::DebuggerRunControl::finished, | ||
1189 | 84 | this, &UbuntuRemoteDebugSupport::handleDebuggingFinished); | ||
1190 | 83 | } | 85 | } |
1191 | 84 | 86 | ||
1192 | 85 | UbuntuRemoteDebugSupport::~UbuntuRemoteDebugSupport() | 87 | UbuntuRemoteDebugSupport::~UbuntuRemoteDebugSupport() |
1193 | @@ -105,10 +107,16 @@ | |||
1194 | 105 | 107 | ||
1195 | 106 | setState(Starting); | 108 | setState(Starting); |
1196 | 107 | 109 | ||
1201 | 108 | if (d->cppDebugging && !assignNextFreePort(&d->gdbServerPort)) | 110 | if (d->cppDebugging) { |
1202 | 109 | return; | 111 | d->gdbServerPort = findFreePort(); |
1203 | 110 | if (d->qmlDebugging && !assignNextFreePort(&d->qmlPort)) | 112 | if (!d->gdbServerPort.isValid()) |
1204 | 111 | return; | 113 | return; |
1205 | 114 | } | ||
1206 | 115 | if (d->qmlDebugging) { | ||
1207 | 116 | d->qmlPort = findFreePort(); | ||
1208 | 117 | if (!d->qmlPort.isValid()) | ||
1209 | 118 | return; | ||
1210 | 119 | } | ||
1211 | 112 | 120 | ||
1212 | 113 | d->gdbserverOutput.clear(); | 121 | d->gdbserverOutput.clear(); |
1213 | 114 | 122 | ||
1214 | @@ -120,9 +128,9 @@ | |||
1215 | 120 | connect(launcher, SIGNAL(clickApplicationStarted(quint16)), SLOT(handleRemoteProcessStarted(quint16))); | 128 | connect(launcher, SIGNAL(clickApplicationStarted(quint16)), SLOT(handleRemoteProcessStarted(quint16))); |
1216 | 121 | 129 | ||
1217 | 122 | if(d->cppDebugging) | 130 | if(d->cppDebugging) |
1219 | 123 | launcher->setCppDebugPort(d->gdbServerPort); | 131 | launcher->setCppDebugPort(d->gdbServerPort.number()); |
1220 | 124 | if(d->qmlDebugging) | 132 | if(d->qmlDebugging) |
1222 | 125 | launcher->setQmlDebugPort(d->qmlPort); | 133 | launcher->setQmlDebugPort(d->qmlPort.number()); |
1223 | 126 | 134 | ||
1224 | 127 | launcher->setEnv(environment()); | 135 | launcher->setEnv(environment()); |
1225 | 128 | 136 | ||
1226 | @@ -222,7 +230,7 @@ | |||
1227 | 222 | 230 | ||
1228 | 223 | Debugger::RemoteSetupResult result; | 231 | Debugger::RemoteSetupResult result; |
1229 | 224 | result.success = true; | 232 | result.success = true; |
1231 | 225 | result.inferiorPid = d->runControl->startParameters().attachPID; | 233 | //result.inferiorPid = d->runControl->startParameters().attachPID; |
1232 | 226 | result.gdbServerPort = d->gdbServerPort; | 234 | result.gdbServerPort = d->gdbServerPort; |
1233 | 227 | result.qmlServerPort = d->qmlPort; | 235 | result.qmlServerPort = d->qmlPort; |
1234 | 228 | d->runControl->notifyEngineRemoteSetupFinished(result); | 236 | d->runControl->notifyEngineRemoteSetupFinished(result); |
1235 | 229 | 237 | ||
1236 | === modified file 'src/ubuntu/device/remote/ubunturemoterunconfiguration.cpp' | |||
1237 | --- src/ubuntu/device/remote/ubunturemoterunconfiguration.cpp 2016-04-06 10:52:54 +0000 | |||
1238 | +++ src/ubuntu/device/remote/ubunturemoterunconfiguration.cpp 2016-08-24 15:35:12 +0000 | |||
1239 | @@ -31,6 +31,7 @@ | |||
1240 | 31 | #include <projectexplorer/target.h> | 31 | #include <projectexplorer/target.h> |
1241 | 32 | #include <projectexplorer/project.h> | 32 | #include <projectexplorer/project.h> |
1242 | 33 | #include <projectexplorer/buildsteplist.h> | 33 | #include <projectexplorer/buildsteplist.h> |
1243 | 34 | #include <projectexplorer/runnables.h> | ||
1244 | 34 | #include <remotelinux/remotelinuxenvironmentaspect.h> | 35 | #include <remotelinux/remotelinuxenvironmentaspect.h> |
1245 | 35 | #include <utils/qtcprocess.h> | 36 | #include <utils/qtcprocess.h> |
1246 | 36 | #include <cmakeprojectmanager/cmakeproject.h> | 37 | #include <cmakeprojectmanager/cmakeproject.h> |
1247 | @@ -57,7 +58,7 @@ | |||
1248 | 57 | const char UNINSTALL_KEY[]="UbuntuRemoteRunConfiguration.Uninstall"; | 58 | const char UNINSTALL_KEY[]="UbuntuRemoteRunConfiguration.Uninstall"; |
1249 | 58 | 59 | ||
1250 | 59 | UbuntuRemoteRunConfiguration::UbuntuRemoteRunConfiguration(ProjectExplorer::Target *parent, Core::Id id) | 60 | UbuntuRemoteRunConfiguration::UbuntuRemoteRunConfiguration(ProjectExplorer::Target *parent, Core::Id id) |
1252 | 60 | : AbstractRemoteLinuxRunConfiguration(parent,id), | 61 | : RunConfiguration(parent,id), |
1253 | 61 | m_running(false), | 62 | m_running(false), |
1254 | 62 | m_forceInstall(false), | 63 | m_forceInstall(false), |
1255 | 63 | m_uninstall(true) | 64 | m_uninstall(true) |
1256 | @@ -70,7 +71,7 @@ | |||
1257 | 70 | } | 71 | } |
1258 | 71 | 72 | ||
1259 | 72 | UbuntuRemoteRunConfiguration::UbuntuRemoteRunConfiguration(ProjectExplorer::Target *parent, UbuntuRemoteRunConfiguration *source) | 73 | UbuntuRemoteRunConfiguration::UbuntuRemoteRunConfiguration(ProjectExplorer::Target *parent, UbuntuRemoteRunConfiguration *source) |
1261 | 73 | : AbstractRemoteLinuxRunConfiguration(parent,source), | 74 | : RunConfiguration(parent,source), |
1262 | 74 | m_running(false), | 75 | m_running(false), |
1263 | 75 | m_forceInstall(false), | 76 | m_forceInstall(false), |
1264 | 76 | m_uninstall(true) | 77 | m_uninstall(true) |
1265 | @@ -176,6 +177,20 @@ | |||
1266 | 176 | return ProjectExplorer::RunConfiguration::Configured; | 177 | return ProjectExplorer::RunConfiguration::Configured; |
1267 | 177 | } | 178 | } |
1268 | 178 | 179 | ||
1269 | 180 | ProjectExplorer::Runnable UbuntuRemoteRunConfiguration::runnable() const | ||
1270 | 181 | { | ||
1271 | 182 | if (m_remoteExecutable.isEmpty()) | ||
1272 | 183 | return ProjectExplorer::Runnable(); | ||
1273 | 184 | |||
1274 | 185 | ProjectExplorer::StandardRunnable r; | ||
1275 | 186 | r.executable = m_remoteExecutable; | ||
1276 | 187 | r.device = ProjectExplorer::DeviceKitInformation::device(target()->kit()); | ||
1277 | 188 | |||
1278 | 189 | r.environment = environment(); | ||
1279 | 190 | |||
1280 | 191 | return r; | ||
1281 | 192 | } | ||
1282 | 193 | |||
1283 | 179 | /*! | 194 | /*! |
1284 | 180 | * \brief UbuntuRemoteRunConfiguration::aboutToStart | 195 | * \brief UbuntuRemoteRunConfiguration::aboutToStart |
1285 | 181 | * Configures the internal parameters and fetched the informations from | 196 | * Configures the internal parameters and fetched the informations from |
1286 | @@ -225,7 +240,7 @@ | |||
1287 | 225 | } | 240 | } |
1288 | 226 | 241 | ||
1289 | 227 | ProjectExplorer::ToolChain* tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit()); | 242 | ProjectExplorer::ToolChain* tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit()); |
1291 | 228 | if(tc->type() != QString::fromLatin1(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) { | 243 | if(tc->typeId() != Constants::UBUNTU_CLICK_TOOLCHAIN_ID) { |
1292 | 229 | if(errorMessage) | 244 | if(errorMessage) |
1293 | 230 | *errorMessage = tr("Wrong toolchain type. Please check your build configuration."); | 245 | *errorMessage = tr("Wrong toolchain type. Please check your build configuration."); |
1294 | 231 | return false; | 246 | return false; |
1295 | @@ -407,7 +422,7 @@ | |||
1296 | 407 | { | 422 | { |
1297 | 408 | if(debug) qDebug()<<Q_FUNC_INFO; | 423 | if(debug) qDebug()<<Q_FUNC_INFO; |
1298 | 409 | 424 | ||
1300 | 410 | if(!AbstractRemoteLinuxRunConfiguration::fromMap(map)) | 425 | if(!RunConfiguration::fromMap(map)) |
1301 | 411 | return false; | 426 | return false; |
1302 | 412 | 427 | ||
1303 | 413 | m_uninstall = map.value(QLatin1String(UNINSTALL_KEY),true).toBool(); | 428 | m_uninstall = map.value(QLatin1String(UNINSTALL_KEY),true).toBool(); |
1304 | @@ -418,7 +433,7 @@ | |||
1305 | 418 | QVariantMap UbuntuRemoteRunConfiguration::toMap() const | 433 | QVariantMap UbuntuRemoteRunConfiguration::toMap() const |
1306 | 419 | { | 434 | { |
1307 | 420 | if(debug) qDebug()<<Q_FUNC_INFO; | 435 | if(debug) qDebug()<<Q_FUNC_INFO; |
1309 | 421 | QVariantMap m = AbstractRemoteLinuxRunConfiguration::toMap(); | 436 | QVariantMap m = RunConfiguration::toMap(); |
1310 | 422 | m.insert(QLatin1String(UNINSTALL_KEY),m_uninstall); | 437 | m.insert(QLatin1String(UNINSTALL_KEY),m_uninstall); |
1311 | 423 | m.insert(QLatin1String(FORCE_INSTALL_KEY),m_forceInstall); | 438 | m.insert(QLatin1String(FORCE_INSTALL_KEY),m_forceInstall); |
1312 | 424 | return m; | 439 | return m; |
1313 | 425 | 440 | ||
1314 | === modified file 'src/ubuntu/device/remote/ubunturemoterunconfiguration.h' | |||
1315 | --- src/ubuntu/device/remote/ubunturemoterunconfiguration.h 2016-03-29 09:41:07 +0000 | |||
1316 | +++ src/ubuntu/device/remote/ubunturemoterunconfiguration.h 2016-08-24 15:35:12 +0000 | |||
1317 | @@ -18,7 +18,7 @@ | |||
1318 | 18 | #ifndef UBUNTU_INTERNAL_UBUNTUREMOTERUNCONFIGURATION_H | 18 | #ifndef UBUNTU_INTERNAL_UBUNTUREMOTERUNCONFIGURATION_H |
1319 | 19 | #define UBUNTU_INTERNAL_UBUNTUREMOTERUNCONFIGURATION_H | 19 | #define UBUNTU_INTERNAL_UBUNTUREMOTERUNCONFIGURATION_H |
1320 | 20 | 20 | ||
1322 | 21 | #include <remotelinux/abstractremotelinuxrunconfiguration.h> | 21 | #include <projectexplorer/runconfiguration.h> |
1323 | 22 | #include <coreplugin/id.h> | 22 | #include <coreplugin/id.h> |
1324 | 23 | 23 | ||
1325 | 24 | namespace Ui { | 24 | namespace Ui { |
1326 | @@ -28,7 +28,7 @@ | |||
1327 | 28 | namespace Ubuntu { | 28 | namespace Ubuntu { |
1328 | 29 | namespace Internal { | 29 | namespace Internal { |
1329 | 30 | 30 | ||
1331 | 31 | class UbuntuRemoteRunConfiguration : public RemoteLinux::AbstractRemoteLinuxRunConfiguration | 31 | class UbuntuRemoteRunConfiguration : public ProjectExplorer::RunConfiguration |
1332 | 32 | { | 32 | { |
1333 | 33 | Q_OBJECT | 33 | Q_OBJECT |
1334 | 34 | Q_PROPERTY(bool forceInstall READ forceInstall WRITE setForceInstall NOTIFY forceInstallChanged) | 34 | Q_PROPERTY(bool forceInstall READ forceInstall WRITE setForceInstall NOTIFY forceInstallChanged) |
1335 | @@ -38,13 +38,12 @@ | |||
1336 | 38 | UbuntuRemoteRunConfiguration(ProjectExplorer::Target *parent, Core::Id id); | 38 | UbuntuRemoteRunConfiguration(ProjectExplorer::Target *parent, Core::Id id); |
1337 | 39 | UbuntuRemoteRunConfiguration(ProjectExplorer::Target *parent, UbuntuRemoteRunConfiguration *source); | 39 | UbuntuRemoteRunConfiguration(ProjectExplorer::Target *parent, UbuntuRemoteRunConfiguration *source); |
1338 | 40 | 40 | ||
1339 | 41 | // AbstractRemoteLinuxRunConfiguration interface | ||
1340 | 42 | public: | 41 | public: |
1346 | 43 | virtual QString localExecutableFilePath() const override; | 42 | QString localExecutableFilePath() const; |
1347 | 44 | virtual QString remoteExecutableFilePath() const override; | 43 | QString remoteExecutableFilePath() const; |
1348 | 45 | virtual QStringList arguments() const override; | 44 | QStringList arguments() const; |
1349 | 46 | virtual QString workingDirectory() const override; | 45 | QString workingDirectory() const; |
1350 | 47 | virtual Utils::Environment environment() const override; | 46 | Utils::Environment environment() const; |
1351 | 48 | 47 | ||
1352 | 49 | virtual QStringList soLibSearchPaths () const; | 48 | virtual QStringList soLibSearchPaths () const; |
1353 | 50 | bool aboutToStart (QString *errorMessage); | 49 | bool aboutToStart (QString *errorMessage); |
1354 | @@ -55,6 +54,7 @@ | |||
1355 | 55 | virtual QString disabledReason() const override; | 54 | virtual QString disabledReason() const override; |
1356 | 56 | virtual bool isConfigured() const override; | 55 | virtual bool isConfigured() const override; |
1357 | 57 | virtual ConfigurationState ensureConfigured(QString *) override; | 56 | virtual ConfigurationState ensureConfigured(QString *) override; |
1358 | 57 | virtual ProjectExplorer::Runnable runnable ( ) const override; | ||
1359 | 58 | 58 | ||
1360 | 59 | // ProjectConfiguration interface | 59 | // ProjectConfiguration interface |
1361 | 60 | virtual bool fromMap(const QVariantMap &map) override; | 60 | virtual bool fromMap(const QVariantMap &map) override; |
1362 | 61 | 61 | ||
1363 | === modified file 'src/ubuntu/device/remote/ubunturemoteruncontrol.cpp' | |||
1364 | --- src/ubuntu/device/remote/ubunturemoteruncontrol.cpp 2016-03-29 09:41:07 +0000 | |||
1365 | +++ src/ubuntu/device/remote/ubunturemoteruncontrol.cpp 2016-08-24 15:35:12 +0000 | |||
1366 | @@ -34,12 +34,12 @@ | |||
1367 | 34 | #include "ubuntudevice.h" | 34 | #include "ubuntudevice.h" |
1368 | 35 | #include "ubuntuwaitfordevicedialog.h" | 35 | #include "ubuntuwaitfordevicedialog.h" |
1369 | 36 | 36 | ||
1370 | 37 | #include <remotelinux/abstractremotelinuxrunconfiguration.h> | ||
1371 | 38 | #include <projectexplorer/devicesupport/deviceapplicationrunner.h> | 37 | #include <projectexplorer/devicesupport/deviceapplicationrunner.h> |
1372 | 39 | #include <projectexplorer/kitinformation.h> | 38 | #include <projectexplorer/kitinformation.h> |
1373 | 40 | #include <projectexplorer/target.h> | 39 | #include <projectexplorer/target.h> |
1374 | 41 | #include <utils/environment.h> | 40 | #include <utils/environment.h> |
1375 | 42 | #include <coreplugin/icore.h> | 41 | #include <coreplugin/icore.h> |
1376 | 42 | #include <coreplugin/coreicons.h> | ||
1377 | 43 | 43 | ||
1378 | 44 | #include <QString> | 44 | #include <QString> |
1379 | 45 | #include <QIcon> | 45 | #include <QIcon> |
1380 | @@ -73,7 +73,7 @@ | |||
1381 | 73 | d->environment = d->runConfig->environment(); | 73 | d->environment = d->runConfig->environment(); |
1382 | 74 | d->clickPackage = d->runConfig->clickPackage(); | 74 | d->clickPackage = d->runConfig->clickPackage(); |
1383 | 75 | 75 | ||
1385 | 76 | setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL)); | 76 | setIcon(Core::Icons::RUN_SMALL); |
1386 | 77 | } | 77 | } |
1387 | 78 | 78 | ||
1388 | 79 | UbuntuRemoteRunControl::~UbuntuRemoteRunControl() | 79 | UbuntuRemoteRunControl::~UbuntuRemoteRunControl() |
1389 | 80 | 80 | ||
1390 | === modified file 'src/ubuntu/device/remote/ubunturemoteruncontrolfactory.cpp' | |||
1391 | --- src/ubuntu/device/remote/ubunturemoteruncontrolfactory.cpp 2016-03-29 09:41:07 +0000 | |||
1392 | +++ src/ubuntu/device/remote/ubunturemoteruncontrolfactory.cpp 2016-08-24 15:35:12 +0000 | |||
1393 | @@ -27,13 +27,13 @@ | |||
1394 | 27 | #include <debugger/debuggerplugin.h> | 27 | #include <debugger/debuggerplugin.h> |
1395 | 28 | #include <debugger/debuggerrunconfigurationaspect.h> | 28 | #include <debugger/debuggerrunconfigurationaspect.h> |
1396 | 29 | #include <debugger/debuggerruncontrol.h> | 29 | #include <debugger/debuggerruncontrol.h> |
1397 | 30 | #include <qmldebug/qmldebugcommandlinearguments.h> | ||
1398 | 30 | #include <remotelinux/remotelinuxdebugsupport.h> | 31 | #include <remotelinux/remotelinuxdebugsupport.h> |
1399 | 31 | #include <remotelinux/remotelinuxruncontrol.h> | 32 | #include <remotelinux/remotelinuxruncontrol.h> |
1400 | 32 | #include <remotelinux/remotelinuxanalyzesupport.h> | 33 | #include <remotelinux/remotelinuxanalyzesupport.h> |
1405 | 33 | #include <analyzerbase/analyzerstartparameters.h> | 34 | #include <debugger/analyzer/analyzerstartparameters.h> |
1406 | 34 | #include <analyzerbase/analyzermanager.h> | 35 | #include <debugger/analyzer/analyzermanager.h> |
1407 | 35 | #include <analyzerbase/analyzerruncontrol.h> | 36 | #include <debugger/analyzer/analyzerruncontrol.h> |
1404 | 36 | #include <analyzerbase/ianalyzertool.h> | ||
1408 | 37 | #include <utils/portlist.h> | 37 | #include <utils/portlist.h> |
1409 | 38 | #include <utils/qtcassert.h> | 38 | #include <utils/qtcassert.h> |
1410 | 39 | 39 | ||
1411 | @@ -45,7 +45,6 @@ | |||
1412 | 45 | 45 | ||
1413 | 46 | bool UbuntuRemoteRunControlFactory::canRun(ProjectExplorer::RunConfiguration *runConfiguration, | 46 | bool UbuntuRemoteRunControlFactory::canRun(ProjectExplorer::RunConfiguration *runConfiguration, |
1414 | 47 | Core::Id mode) const { | 47 | Core::Id mode) const { |
1415 | 48 | |||
1416 | 49 | if(qobject_cast<UbuntuRemoteRunConfiguration*>(runConfiguration)) { | 48 | if(qobject_cast<UbuntuRemoteRunConfiguration*>(runConfiguration)) { |
1417 | 50 | if (mode != ProjectExplorer::Constants::NORMAL_RUN_MODE | 49 | if (mode != ProjectExplorer::Constants::NORMAL_RUN_MODE |
1418 | 51 | && mode != ProjectExplorer::Constants::DEBUG_RUN_MODE | 50 | && mode != ProjectExplorer::Constants::DEBUG_RUN_MODE |
1419 | @@ -74,7 +73,11 @@ | |||
1420 | 74 | if (!rc->aboutToStart(errorMessage)) | 73 | if (!rc->aboutToStart(errorMessage)) |
1421 | 75 | return 0; | 74 | return 0; |
1422 | 76 | 75 | ||
1424 | 77 | QTC_ASSERT(rc, return 0); | 76 | QTC_ASSERT(rc, return 0); |
1425 | 77 | const auto rcRunnable = runConfiguration->runnable(); | ||
1426 | 78 | QTC_ASSERT(rcRunnable.is<ProjectExplorer::StandardRunnable>(), return 0); | ||
1427 | 79 | const auto stdRunnable = rcRunnable.as<ProjectExplorer::StandardRunnable>(); | ||
1428 | 80 | |||
1429 | 78 | 81 | ||
1430 | 79 | if (mode == ProjectExplorer::Constants::NORMAL_RUN_MODE) { | 82 | if (mode == ProjectExplorer::Constants::NORMAL_RUN_MODE) { |
1431 | 80 | return new UbuntuRemoteRunControl(rc); | 83 | return new UbuntuRemoteRunControl(rc); |
1432 | @@ -94,34 +97,62 @@ | |||
1433 | 94 | return 0; | 97 | return 0; |
1434 | 95 | } | 98 | } |
1435 | 96 | 99 | ||
1437 | 97 | if (2 > dev->freePorts().count()) { | 100 | auto aspect = rc->extraAspect<Debugger::DebuggerRunConfigurationAspect>(); |
1438 | 101 | if (aspect->portsUsedByDebugger() > dev->freePorts().count()) { | ||
1439 | 98 | *errorMessage = tr("Cannot debug: Not enough free ports available."); | 102 | *errorMessage = tr("Cannot debug: Not enough free ports available."); |
1440 | 99 | return 0; | 103 | return 0; |
1441 | 100 | } | 104 | } |
1443 | 101 | Debugger::DebuggerStartParameters params = RemoteLinux::LinuxDeviceDebugSupport::startParameters(rc); | 105 | |
1444 | 106 | /* | ||
1445 | 107 | * Taken from remotelinuxruncontrolfactory.cpp and adapted | ||
1446 | 108 | * to work here. | ||
1447 | 109 | */ | ||
1448 | 110 | Debugger::DebuggerStartParameters params; | ||
1449 | 111 | params.startMode = Debugger::AttachToRemoteServer; | ||
1450 | 112 | params.closeMode = Debugger::KillAndExitMonitorAtClose; | ||
1451 | 113 | params.remoteSetupNeeded = true; | ||
1452 | 114 | params.useContinueInsteadOfRun = true; | ||
1453 | 115 | |||
1454 | 116 | if (aspect->useQmlDebugger()) { | ||
1455 | 117 | params.qmlServer.host = dev->sshParameters().host; | ||
1456 | 118 | params.qmlServer.port = Utils::Port(); // port is selected later on | ||
1457 | 119 | } | ||
1458 | 120 | if (aspect->useCppDebugger()) { | ||
1459 | 121 | aspect->setUseMultiProcess(true); | ||
1460 | 122 | #if 1 | ||
1461 | 123 | params.inferior.executable = stdRunnable.executable; | ||
1462 | 124 | params.inferior.commandLineArguments = stdRunnable.commandLineArguments; | ||
1463 | 125 | if (aspect->useQmlDebugger()) { | ||
1464 | 126 | params.inferior.commandLineArguments.prepend(QLatin1Char(' ')); | ||
1465 | 127 | params.inferior.commandLineArguments.prepend(QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlDebuggerServices)); | ||
1466 | 128 | } | ||
1467 | 129 | #endif | ||
1468 | 130 | params.remoteChannel = dev->sshParameters().host + QLatin1String(":-1"); | ||
1469 | 131 | params.symbolFile = rc->localExecutableFilePath(); | ||
1470 | 132 | } | ||
1471 | 102 | 133 | ||
1472 | 103 | params.solibSearchPath.append(rc->soLibSearchPaths()); | 134 | params.solibSearchPath.append(rc->soLibSearchPaths()); |
1473 | 104 | 135 | ||
1484 | 105 | //Always leave this empty or the debugger backend tries to execute | 136 | Debugger::DebuggerRunControl * const runControl = Debugger::createDebuggerRunControl(params, rc, errorMessage, mode); |
1475 | 106 | //the binary on the phone instead of attaching and continuing the already | ||
1476 | 107 | //running app | ||
1477 | 108 | params.remoteExecutable = QString(); | ||
1478 | 109 | //params.expectedSignals.append("SIGTRAP"); | ||
1479 | 110 | |||
1480 | 111 | if(debug) qDebug()<<"Solib search path : "<<params.solibSearchPath; | ||
1481 | 112 | |||
1482 | 113 | Debugger::DebuggerRunControl * const runControl | ||
1483 | 114 | = Debugger::createDebuggerRunControl(params, rc, errorMessage, mode); | ||
1485 | 115 | if (!runControl) | 137 | if (!runControl) |
1486 | 116 | return 0; | 138 | return 0; |
1487 | 139 | |||
1488 | 117 | UbuntuRemoteDebugSupport * const debugSupport = | 140 | UbuntuRemoteDebugSupport * const debugSupport = |
1489 | 118 | new UbuntuRemoteDebugSupport(rc, runControl); | 141 | new UbuntuRemoteDebugSupport(rc, runControl); |
1490 | 119 | connect(runControl, SIGNAL(finished()), debugSupport, SLOT(handleDebuggingFinished())); | 142 | connect(runControl, SIGNAL(finished()), debugSupport, SLOT(handleDebuggingFinished())); |
1491 | 120 | return runControl; | 143 | return runControl; |
1492 | 121 | 144 | ||
1493 | 122 | } else if ( mode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE ) { | 145 | } else if ( mode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE ) { |
1496 | 123 | Analyzer::AnalyzerStartParameters params = RemoteLinux::RemoteLinuxAnalyzeSupport::startParameters(rc, mode); | 146 | /* |
1497 | 124 | Analyzer::AnalyzerRunControl *runControl = Analyzer::AnalyzerManager::createRunControl(params, runConfiguration); | 147 | * Taken from remotelinuxruncontrolfactory.cpp and adapted |
1498 | 148 | * to work here. | ||
1499 | 149 | */ | ||
1500 | 150 | auto runControl = Debugger::createAnalyzerRunControl(rc, mode); | ||
1501 | 151 | Debugger::AnalyzerConnection connection; | ||
1502 | 152 | connection.connParams = | ||
1503 | 153 | ProjectExplorer::DeviceKitInformation::device(rc->target()->kit())->sshParameters(); | ||
1504 | 154 | connection.analyzerHost = connection.connParams.host; | ||
1505 | 155 | runControl->setConnection(connection); | ||
1506 | 125 | UbuntuRemoteAnalyzeSupport * const analyzeSupport = | 156 | UbuntuRemoteAnalyzeSupport * const analyzeSupport = |
1507 | 126 | new UbuntuRemoteAnalyzeSupport(rc, runControl, mode); | 157 | new UbuntuRemoteAnalyzeSupport(rc, runControl, mode); |
1508 | 127 | connect(runControl, SIGNAL(finished()), analyzeSupport, SLOT(handleProfilingFinished())); | 158 | connect(runControl, SIGNAL(finished()), analyzeSupport, SLOT(handleProfilingFinished())); |
1509 | 128 | 159 | ||
1510 | === modified file 'src/ubuntu/device/remote/ubunturemoterunner.cpp' | |||
1511 | --- src/ubuntu/device/remote/ubunturemoterunner.cpp 2016-03-29 09:41:07 +0000 | |||
1512 | +++ src/ubuntu/device/remote/ubunturemoterunner.cpp 2016-08-24 15:35:12 +0000 | |||
1513 | @@ -19,7 +19,7 @@ | |||
1514 | 19 | const QString SSH_BASE_COMMAND = QStringLiteral("ssh -i %1 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p%2 %3@%4"); | 19 | const QString SSH_BASE_COMMAND = QStringLiteral("ssh -i %1 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p%2 %3@%4"); |
1515 | 20 | 20 | ||
1516 | 21 | enum { | 21 | enum { |
1518 | 22 | debug = 0 | 22 | debug = 1 |
1519 | 23 | }; | 23 | }; |
1520 | 24 | 24 | ||
1521 | 25 | class UbuntuRemoteClickApplicationRunnerPrivate | 25 | class UbuntuRemoteClickApplicationRunnerPrivate |
1522 | 26 | 26 | ||
1523 | === modified file 'src/ubuntu/localportsmanager.cpp' | |||
1524 | --- src/ubuntu/localportsmanager.cpp 2014-11-26 19:45:36 +0000 | |||
1525 | +++ src/ubuntu/localportsmanager.cpp 2016-08-24 15:35:12 +0000 | |||
1526 | @@ -100,13 +100,13 @@ | |||
1527 | 100 | if (serial == device && localPort >= m_instance->m_first && localPort <= m_instance->m_last) { | 100 | if (serial == device && localPort >= m_instance->m_first && localPort <= m_instance->m_last) { |
1528 | 101 | if(debug) qDebug()<<"Found port already linked to device: "<<localPort<<":"<<remotePort; | 101 | if(debug) qDebug()<<"Found port already linked to device: "<<localPort<<":"<<remotePort; |
1529 | 102 | 102 | ||
1531 | 103 | freePorts.addPort(localPort); | 103 | freePorts.addPort(Utils::Port(localPort)); |
1532 | 104 | 104 | ||
1533 | 105 | if (freePorts.count() == count) | 105 | if (freePorts.count() == count) |
1534 | 106 | break; | 106 | break; |
1535 | 107 | } else { | 107 | } else { |
1536 | 108 | if(debug) qDebug()<<"Found port in use: "<<localPort<<":"<<remotePort; | 108 | if(debug) qDebug()<<"Found port in use: "<<localPort<<":"<<remotePort; |
1538 | 109 | usedPorts.addPort(localPort); | 109 | usedPorts.addPort(Utils::Port(localPort)); |
1539 | 110 | } | 110 | } |
1540 | 111 | } | 111 | } |
1541 | 112 | 112 | ||
1542 | @@ -116,14 +116,14 @@ | |||
1543 | 116 | int port = firstPort + i; | 116 | int port = firstPort + i; |
1544 | 117 | 117 | ||
1545 | 118 | //is the port in use? | 118 | //is the port in use? |
1547 | 119 | if(usedPorts.contains(port)) | 119 | if(usedPorts.contains(Utils::Port(port))) |
1548 | 120 | continue; | 120 | continue; |
1549 | 121 | 121 | ||
1550 | 122 | //is that port already assigned to us? | 122 | //is that port already assigned to us? |
1552 | 123 | if(freePorts.contains(port)) | 123 | if(freePorts.contains(Utils::Port(port))) |
1553 | 124 | continue; | 124 | continue; |
1554 | 125 | 125 | ||
1556 | 126 | freePorts.addPort(port); | 126 | freePorts.addPort(Utils::Port(port)); |
1557 | 127 | found++; | 127 | found++; |
1558 | 128 | if(debug) qDebug()<<"Found free port: "<<port; | 128 | if(debug) qDebug()<<"Found free port: "<<port; |
1559 | 129 | } | 129 | } |
1560 | 130 | 130 | ||
1561 | === modified file 'src/ubuntu/ubuntuabstractguieditordocument.cpp' | |||
1562 | --- src/ubuntu/ubuntuabstractguieditordocument.cpp 2015-03-06 15:02:08 +0000 | |||
1563 | +++ src/ubuntu/ubuntuabstractguieditordocument.cpp 2016-08-24 15:35:12 +0000 | |||
1564 | @@ -59,16 +59,6 @@ | |||
1565 | 59 | return false; | 59 | return false; |
1566 | 60 | } | 60 | } |
1567 | 61 | 61 | ||
1568 | 62 | QString UbuntuAbstractGuiEditorDocument::defaultPath() const | ||
1569 | 63 | { | ||
1570 | 64 | return filePath().toFileInfo().absolutePath(); | ||
1571 | 65 | } | ||
1572 | 66 | |||
1573 | 67 | QString UbuntuAbstractGuiEditorDocument::suggestedFileName() const | ||
1574 | 68 | { | ||
1575 | 69 | return filePath().toFileInfo().fileName(); | ||
1576 | 70 | } | ||
1577 | 71 | |||
1578 | 72 | bool UbuntuAbstractGuiEditorDocument::isModified() const | 62 | bool UbuntuAbstractGuiEditorDocument::isModified() const |
1579 | 73 | { | 63 | { |
1580 | 74 | return TextDocument::isModified() || m_editorWidget->isModified(); | 64 | return TextDocument::isModified() || m_editorWidget->isModified(); |
1581 | 75 | 65 | ||
1582 | === modified file 'src/ubuntu/ubuntuabstractguieditordocument.h' | |||
1583 | --- src/ubuntu/ubuntuabstractguieditordocument.h 2016-07-22 10:17:50 +0000 | |||
1584 | +++ src/ubuntu/ubuntuabstractguieditordocument.h 2016-08-24 15:35:12 +0000 | |||
1585 | @@ -33,10 +33,6 @@ | |||
1586 | 33 | public: | 33 | public: |
1587 | 34 | UbuntuAbstractGuiEditorDocument(const QString &mimeType, UbuntuAbstractGuiEditorWidget *editorWidget); | 34 | UbuntuAbstractGuiEditorDocument(const QString &mimeType, UbuntuAbstractGuiEditorWidget *editorWidget); |
1588 | 35 | bool save(QString *errorString, const QString &fileName = QString(), bool autoSave = false) override; | 35 | bool save(QString *errorString, const QString &fileName = QString(), bool autoSave = false) override; |
1589 | 36 | |||
1590 | 37 | QString defaultPath() const override; | ||
1591 | 38 | QString suggestedFileName() const override; | ||
1592 | 39 | |||
1593 | 40 | bool isModified() const override; | 36 | bool isModified() const override; |
1594 | 41 | bool isSaveAsAllowed() const override; | 37 | bool isSaveAsAllowed() const override; |
1595 | 42 | private: | 38 | private: |
1596 | 43 | 39 | ||
1597 | === modified file 'src/ubuntu/ubuntuclickdialog.cpp' | |||
1598 | --- src/ubuntu/ubuntuclickdialog.cpp 2016-05-17 16:33:36 +0000 | |||
1599 | +++ src/ubuntu/ubuntuclickdialog.cpp 2016-08-24 15:35:12 +0000 | |||
1600 | @@ -113,7 +113,7 @@ | |||
1601 | 113 | int code = runProcessModal(paramList); | 113 | int code = runProcessModal(paramList); |
1602 | 114 | if(mode == UbuntuClickTool::Delete) { | 114 | if(mode == UbuntuClickTool::Delete) { |
1603 | 115 | //redetect documentation | 115 | //redetect documentation |
1605 | 116 | QtSupport::QtVersionManager::delayedInitialize(); | 116 | QtSupport::QtVersionManager::triggerDocumentationUpdate(); |
1606 | 117 | } | 117 | } |
1607 | 118 | return code; | 118 | return code; |
1608 | 119 | } | 119 | } |
1609 | 120 | 120 | ||
1610 | === modified file 'src/ubuntu/ubuntuclicktool.cpp' | |||
1611 | --- src/ubuntu/ubuntuclicktool.cpp 2016-07-12 08:47:56 +0000 | |||
1612 | +++ src/ubuntu/ubuntuclicktool.cpp 2016-08-24 15:35:12 +0000 | |||
1613 | @@ -105,7 +105,7 @@ | |||
1614 | 105 | const QMap<QString, QString> &envMap) | 105 | const QMap<QString, QString> &envMap) |
1615 | 106 | { | 106 | { |
1616 | 107 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target); | 107 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target); |
1618 | 108 | if (!tc || tc->type() != QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) { | 108 | if (!tc || tc->typeId() != Constants::UBUNTU_CLICK_TOOLCHAIN_ID) { |
1619 | 109 | ProjectExplorer::ProcessParameters p; | 109 | ProjectExplorer::ProcessParameters p; |
1620 | 110 | p.setArguments(Utils::QtcProcess::joinArgs(args)); | 110 | p.setArguments(Utils::QtcProcess::joinArgs(args)); |
1621 | 111 | p.setCommand(cmd); | 111 | p.setCommand(cmd); |
1622 | @@ -253,6 +253,10 @@ | |||
1623 | 253 | 253 | ||
1624 | 254 | QString UbuntuClickTool::targetBasePath(const UbuntuClickTool::Target &target) | 254 | QString UbuntuClickTool::targetBasePath(const UbuntuClickTool::Target &target) |
1625 | 255 | { | 255 | { |
1626 | 256 | static QMap<QString, QString> basePathCache; | ||
1627 | 257 | if (basePathCache.contains(target.containerName)) | ||
1628 | 258 | return basePathCache.value(target.containerName); | ||
1629 | 259 | |||
1630 | 256 | QProcess sdkTool; | 260 | QProcess sdkTool; |
1631 | 257 | sdkTool.setReadChannel(QProcess::StandardOutput); | 261 | sdkTool.setReadChannel(QProcess::StandardOutput); |
1632 | 258 | sdkTool.setProgram(Constants::UBUNTU_TARGET_TOOL); | 262 | sdkTool.setProgram(Constants::UBUNTU_TARGET_TOOL); |
1633 | @@ -264,7 +268,9 @@ | |||
1634 | 264 | return QString(); | 268 | return QString(); |
1635 | 265 | 269 | ||
1636 | 266 | QTextStream in(&sdkTool); | 270 | QTextStream in(&sdkTool); |
1638 | 267 | return in.readAll().trimmed(); | 271 | QString basePath = in.readAll().trimmed(); |
1639 | 272 | basePathCache.insert(target.containerName, basePath); | ||
1640 | 273 | return basePath; | ||
1641 | 268 | } | 274 | } |
1642 | 269 | 275 | ||
1643 | 270 | bool UbuntuClickTool::parseContainerName(const QString &name, UbuntuClickTool::Target *target, QStringList *allExt) | 276 | bool UbuntuClickTool::parseContainerName(const QString &name, UbuntuClickTool::Target *target, QStringList *allExt) |
1644 | @@ -292,9 +298,14 @@ | |||
1645 | 292 | */ | 298 | */ |
1646 | 293 | bool UbuntuClickTool::targetExists(const UbuntuClickTool::Target &target) | 299 | bool UbuntuClickTool::targetExists(const UbuntuClickTool::Target &target) |
1647 | 294 | { | 300 | { |
1648 | 301 | return targetExists(target.containerName); | ||
1649 | 302 | } | ||
1650 | 303 | |||
1651 | 304 | bool UbuntuClickTool::targetExists(const QString &targetName) | ||
1652 | 305 | { | ||
1653 | 295 | QProcess proc; | 306 | QProcess proc; |
1654 | 296 | proc.start(Constants::UBUNTU_TARGET_TOOL, | 307 | proc.start(Constants::UBUNTU_TARGET_TOOL, |
1656 | 297 | QStringList()<<QStringLiteral("exists")<<target.containerName); | 308 | QStringList()<<QStringLiteral("exists")<<targetName); |
1657 | 298 | if(!proc.waitForFinished(3000)) { | 309 | if(!proc.waitForFinished(3000)) { |
1658 | 299 | qWarning()<<"usdk-target did not return in time."; | 310 | qWarning()<<"usdk-target did not return in time."; |
1659 | 300 | return false; | 311 | return false; |
1660 | @@ -394,7 +405,7 @@ | |||
1661 | 394 | return nullptr; | 405 | return nullptr; |
1662 | 395 | 406 | ||
1663 | 396 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(t->kit()); | 407 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(t->kit()); |
1665 | 397 | if(!tc || (tc->type() != QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID))) | 408 | if(!tc || (tc->typeId() != Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) |
1666 | 398 | return nullptr; | 409 | return nullptr; |
1667 | 399 | 410 | ||
1668 | 400 | Internal::ClickToolChain *clickTc = static_cast<Internal::ClickToolChain*>(tc); | 411 | Internal::ClickToolChain *clickTc = static_cast<Internal::ClickToolChain*>(tc); |
1669 | @@ -460,13 +471,13 @@ | |||
1670 | 460 | return UbuntuClickTool::findOrCreateToolWrapper(QStringLiteral("make"),target); | 471 | return UbuntuClickTool::findOrCreateToolWrapper(QStringLiteral("make"),target); |
1671 | 461 | } | 472 | } |
1672 | 462 | 473 | ||
1674 | 463 | QString UbuntuClickTool::mapIncludePathsForCMake(ProjectExplorer::Kit *k, const QString &in) | 474 | QString UbuntuClickTool::mapIncludePathsForCMake(const ProjectExplorer::Kit *k, const QString &in) |
1675 | 464 | { | 475 | { |
1676 | 465 | if (in.isEmpty()) | 476 | if (in.isEmpty()) |
1677 | 466 | return in; | 477 | return in; |
1678 | 467 | 478 | ||
1679 | 468 | bool canMap = ProjectExplorer::ToolChainKitInformation::toolChain(k) | 479 | bool canMap = ProjectExplorer::ToolChainKitInformation::toolChain(k) |
1681 | 469 | && ProjectExplorer::ToolChainKitInformation::toolChain(k)->type() == QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID) | 480 | && ProjectExplorer::ToolChainKitInformation::toolChain(k)->typeId() == Constants::UBUNTU_CLICK_TOOLCHAIN_ID |
1682 | 470 | && !ProjectExplorer::SysRootKitInformation::sysRoot(k).isEmpty(); | 481 | && !ProjectExplorer::SysRootKitInformation::sysRoot(k).isEmpty(); |
1683 | 471 | 482 | ||
1684 | 472 | if (!canMap) | 483 | if (!canMap) |
1685 | 473 | 484 | ||
1686 | === modified file 'src/ubuntu/ubuntuclicktool.h' | |||
1687 | --- src/ubuntu/ubuntuclicktool.h 2016-07-12 08:47:56 +0000 | |||
1688 | +++ src/ubuntu/ubuntuclicktool.h 2016-08-24 15:35:12 +0000 | |||
1689 | @@ -25,6 +25,7 @@ | |||
1690 | 25 | #include <QFutureInterface> | 25 | #include <QFutureInterface> |
1691 | 26 | #include <QQueue> | 26 | #include <QQueue> |
1692 | 27 | #include <projectexplorer/processparameters.h> | 27 | #include <projectexplorer/processparameters.h> |
1693 | 28 | #include <cmakeprojectmanager/cmaketool.h> | ||
1694 | 28 | #include <utils/qtcprocess.h> | 29 | #include <utils/qtcprocess.h> |
1695 | 29 | #include <QDebug> | 30 | #include <QDebug> |
1696 | 30 | 31 | ||
1697 | @@ -85,11 +86,12 @@ | |||
1698 | 85 | static QString findOrCreateToolWrapper(const QString &tool, const UbuntuClickTool::Target &target); | 86 | static QString findOrCreateToolWrapper(const QString &tool, const UbuntuClickTool::Target &target); |
1699 | 86 | static QString findOrCreateQMakeWrapper(const UbuntuClickTool::Target &target); | 87 | static QString findOrCreateQMakeWrapper(const UbuntuClickTool::Target &target); |
1700 | 87 | static QString findOrCreateMakeWrapper(const UbuntuClickTool::Target &target); | 88 | static QString findOrCreateMakeWrapper(const UbuntuClickTool::Target &target); |
1702 | 88 | static QString mapIncludePathsForCMake(ProjectExplorer::Kit *k, const QString &in); | 89 | static QString mapIncludePathsForCMake(const ProjectExplorer::Kit *k, const QString &in); |
1703 | 89 | static QString hostArchitecture (); | 90 | static QString hostArchitecture (); |
1704 | 90 | static bool compatibleWithHostArchitecture (const QString &targetArch); | 91 | static bool compatibleWithHostArchitecture (const QString &targetArch); |
1705 | 91 | 92 | ||
1706 | 92 | static bool targetExists (const Target& target); | 93 | static bool targetExists (const Target& target); |
1707 | 94 | static bool targetExists (const QString& targetName); | ||
1708 | 93 | static QList<Target> listAvailableTargets (const QString &framework=QString()); | 95 | static QList<Target> listAvailableTargets (const QString &framework=QString()); |
1709 | 94 | static QList<Target> listPossibleDeviceContainers (); | 96 | static QList<Target> listPossibleDeviceContainers (); |
1710 | 95 | static const Target *clickTargetFromTarget(ProjectExplorer::Target *t); | 97 | static const Target *clickTargetFromTarget(ProjectExplorer::Target *t); |
1711 | 96 | 98 | ||
1712 | === modified file 'src/ubuntu/ubuntucmakecache.cpp' | |||
1713 | --- src/ubuntu/ubuntucmakecache.cpp 2014-11-14 11:12:31 +0000 | |||
1714 | +++ src/ubuntu/ubuntucmakecache.cpp 2016-08-24 15:35:12 +0000 | |||
1715 | @@ -8,6 +8,7 @@ | |||
1716 | 8 | 8 | ||
1717 | 9 | #include <QRegularExpression> | 9 | #include <QRegularExpression> |
1718 | 10 | #include <QDir> | 10 | #include <QDir> |
1719 | 11 | #include <QDebug> | ||
1720 | 11 | 12 | ||
1721 | 12 | namespace Ubuntu{ | 13 | namespace Ubuntu{ |
1722 | 13 | namespace Internal { | 14 | namespace Internal { |
1723 | 14 | 15 | ||
1724 | === modified file 'src/ubuntu/ubuntuconstants.h' | |||
1725 | --- src/ubuntu/ubuntuconstants.h 2016-07-06 09:18:16 +0000 | |||
1726 | +++ src/ubuntu/ubuntuconstants.h 2016-08-24 15:35:12 +0000 | |||
1727 | @@ -251,6 +251,7 @@ | |||
1728 | 251 | 251 | ||
1729 | 252 | const char UBUNTU_ICON[] = ":/ubuntu/images/ubuntu-32.png"; | 252 | const char UBUNTU_ICON[] = ":/ubuntu/images/ubuntu-32.png"; |
1730 | 253 | 253 | ||
1731 | 254 | /* | ||
1732 | 254 | const char FEATURE_UNITY_SCOPE[] = "Ubuntu.Wizards.FeatureUnityScope"; | 255 | const char FEATURE_UNITY_SCOPE[] = "Ubuntu.Wizards.FeatureUnityScope"; |
1733 | 255 | const char FEATURE_UBUNTU_PRECISE[] = "Ubuntu.Wizards.FeatureUbuntuPrecise"; | 256 | const char FEATURE_UBUNTU_PRECISE[] = "Ubuntu.Wizards.FeatureUbuntuPrecise"; |
1734 | 256 | const char FEATURE_UBUNTU_QUANTAL[] = "Ubuntu.Wizards.FeatureUbuntuQuantal"; | 257 | const char FEATURE_UBUNTU_QUANTAL[] = "Ubuntu.Wizards.FeatureUbuntuQuantal"; |
1735 | @@ -274,6 +275,7 @@ | |||
1736 | 274 | 275 | ||
1737 | 275 | const char PLATFORM_DESKTOP[] = "Desktop"; | 276 | const char PLATFORM_DESKTOP[] = "Desktop"; |
1738 | 276 | const char PLATFORM_DESKTOP_DISPLAYNAME[] = "Ubuntu %0"; | 277 | const char PLATFORM_DESKTOP_DISPLAYNAME[] = "Ubuntu %0"; |
1739 | 278 | */ | ||
1740 | 277 | 279 | ||
1741 | 278 | const char TASK_DEVICE_SCRIPT[] = "Ubuntu.Task.DeviceScript"; | 280 | const char TASK_DEVICE_SCRIPT[] = "Ubuntu.Task.DeviceScript"; |
1742 | 279 | 281 | ||
1743 | 280 | 282 | ||
1744 | === modified file 'src/ubuntu/ubuntudevicemode.cpp' | |||
1745 | --- src/ubuntu/ubuntudevicemode.cpp 2015-06-19 07:13:13 +0000 | |||
1746 | +++ src/ubuntu/ubuntudevicemode.cpp 2016-08-24 15:35:12 +0000 | |||
1747 | @@ -85,7 +85,6 @@ | |||
1748 | 85 | m_modeView->rootContext()->setContextProperty(QLatin1String("resourceRoot") ,Constants::UBUNTU_DEVICESCREEN_ROOT); | 85 | m_modeView->rootContext()->setContextProperty(QLatin1String("resourceRoot") ,Constants::UBUNTU_DEVICESCREEN_ROOT); |
1749 | 86 | m_modeView->setSource(QUrl::fromLocalFile(Constants::UBUNTU_DEVICESCREEN_QML)); | 86 | m_modeView->setSource(QUrl::fromLocalFile(Constants::UBUNTU_DEVICESCREEN_QML)); |
1750 | 87 | 87 | ||
1751 | 88 | connect(Core::ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)), SLOT(modeChanged(Core::IMode*))); | ||
1752 | 89 | setWidget(m_modeWidget); | 88 | setWidget(m_modeWidget); |
1753 | 90 | } | 89 | } |
1754 | 91 | 90 | ||
1755 | @@ -113,11 +112,6 @@ | |||
1756 | 113 | m_qmlControl->showAddEmulatorDialog(); | 112 | m_qmlControl->showAddEmulatorDialog(); |
1757 | 114 | } | 113 | } |
1758 | 115 | 114 | ||
1759 | 116 | void UbuntuDeviceMode::modeChanged(Core::IMode *mode) | ||
1760 | 117 | { | ||
1761 | 118 | Q_UNUSED(mode); | ||
1762 | 119 | } | ||
1763 | 120 | |||
1764 | 121 | void UbuntuDeviceMode::initialize() { | 115 | void UbuntuDeviceMode::initialize() { |
1765 | 122 | 116 | ||
1766 | 123 | } | 117 | } |
1767 | 124 | 118 | ||
1768 | === modified file 'src/ubuntu/ubuntudevicemode.h' | |||
1769 | --- src/ubuntu/ubuntudevicemode.h 2016-03-29 09:41:07 +0000 | |||
1770 | +++ src/ubuntu/ubuntudevicemode.h 2016-08-24 15:35:12 +0000 | |||
1771 | @@ -73,9 +73,6 @@ | |||
1772 | 73 | signals: | 73 | signals: |
1773 | 74 | void updateDeviceActions (); | 74 | void updateDeviceActions (); |
1774 | 75 | 75 | ||
1775 | 76 | protected slots: | ||
1776 | 77 | void modeChanged(Core::IMode*); | ||
1777 | 78 | |||
1778 | 79 | protected: | 76 | protected: |
1779 | 80 | static UbuntuDeviceMode *m_instance; | 77 | static UbuntuDeviceMode *m_instance; |
1780 | 81 | UbuntuDevicesModel *m_devicesModel; | 78 | UbuntuDevicesModel *m_devicesModel; |
1781 | 82 | 79 | ||
1782 | === modified file 'src/ubuntu/ubuntudevicesmodel.cpp' | |||
1783 | --- src/ubuntu/ubuntudevicesmodel.cpp 2015-11-11 14:50:13 +0000 | |||
1784 | +++ src/ubuntu/ubuntudevicesmodel.cpp 2016-08-24 15:35:12 +0000 | |||
1785 | @@ -209,7 +209,7 @@ | |||
1786 | 209 | case Qt::EditRole: | 209 | case Qt::EditRole: |
1787 | 210 | return m_knownDevices[index.row()]->device()->displayName(); | 210 | return m_knownDevices[index.row()]->device()->displayName(); |
1788 | 211 | case UniqueIdRole: | 211 | case UniqueIdRole: |
1790 | 212 | return m_knownDevices[index.row()]->id().uniqueIdentifier(); | 212 | return qVariantFromValue(m_knownDevices[index.row()]->id()); |
1791 | 213 | case DetectionStateRole: | 213 | case DetectionStateRole: |
1792 | 214 | return m_knownDevices[index.row()]->device()->detectionState(); | 214 | return m_knownDevices[index.row()]->device()->detectionState(); |
1793 | 215 | case DetectionStateStringRole: | 215 | case DetectionStateStringRole: |
1794 | @@ -294,62 +294,62 @@ | |||
1795 | 294 | return QAbstractListModel::flags(index) | Qt::ItemIsEditable; | 294 | return QAbstractListModel::flags(index) | Qt::ItemIsEditable; |
1796 | 295 | } | 295 | } |
1797 | 296 | 296 | ||
1799 | 297 | void UbuntuDevicesModel::triggerPortForwarding(const int devId) | 297 | void UbuntuDevicesModel::triggerPortForwarding(const QVariant &devId) |
1800 | 298 | { | 298 | { |
1802 | 299 | int row = findDevice(devId); | 299 | int row = findDevice(devId.value<Core::Id>()); |
1803 | 300 | if(row < 0) | 300 | if(row < 0) |
1804 | 301 | return; | 301 | return; |
1805 | 302 | m_knownDevices[row]->device()->enablePortForward(); | 302 | m_knownDevices[row]->device()->enablePortForward(); |
1806 | 303 | } | 303 | } |
1807 | 304 | 304 | ||
1809 | 305 | void UbuntuDevicesModel::triggerSSHSetup(const int devId) | 305 | void UbuntuDevicesModel::triggerSSHSetup(const QVariant &devId) |
1810 | 306 | { | 306 | { |
1812 | 307 | int row = findDevice(devId); | 307 | int row = findDevice(devId.value<Core::Id>()); |
1813 | 308 | if(row < 0) | 308 | if(row < 0) |
1814 | 309 | return; | 309 | return; |
1815 | 310 | m_knownDevices[row]->device()->deployPublicKey(); | 310 | m_knownDevices[row]->device()->deployPublicKey(); |
1816 | 311 | } | 311 | } |
1817 | 312 | 312 | ||
1819 | 313 | void UbuntuDevicesModel::triggerSSHConnection(const int devId) | 313 | void UbuntuDevicesModel::triggerSSHConnection(const QVariant &devId) |
1820 | 314 | { | 314 | { |
1822 | 315 | int row = findDevice(devId); | 315 | int row = findDevice(devId.value<Core::Id>()); |
1823 | 316 | if(row < 0) | 316 | if(row < 0) |
1824 | 317 | return; | 317 | return; |
1825 | 318 | m_knownDevices[row]->device()->openTerminal(); | 318 | m_knownDevices[row]->device()->openTerminal(); |
1826 | 319 | } | 319 | } |
1827 | 320 | 320 | ||
1829 | 321 | void UbuntuDevicesModel::triggerKitAutocreate(const int devId) | 321 | void UbuntuDevicesModel::triggerKitAutocreate(const QVariant &devId) |
1830 | 322 | { | 322 | { |
1832 | 323 | int row = findDevice(devId); | 323 | int row = findDevice(devId.value<Core::Id>()); |
1833 | 324 | if(row < 0) | 324 | if(row < 0) |
1834 | 325 | return; | 325 | return; |
1835 | 326 | UbuntuKitManager::autoCreateKit(m_knownDevices[row]->device()); | 326 | UbuntuKitManager::autoCreateKit(m_knownDevices[row]->device()); |
1836 | 327 | } | 327 | } |
1837 | 328 | 328 | ||
1839 | 329 | void UbuntuDevicesModel::triggerKitRemove(const int devId, const QVariant &kitid) | 329 | void UbuntuDevicesModel::triggerKitRemove(const QVariant &devId, const QVariant &kitid) |
1840 | 330 | { | 330 | { |
1842 | 331 | int row = findDevice(devId); | 331 | int row = findDevice(devId.value<Core::Id>()); |
1843 | 332 | if(row < 0) | 332 | if(row < 0) |
1844 | 333 | return; | 333 | return; |
1845 | 334 | 334 | ||
1846 | 335 | ProjectExplorer::Kit* k = ProjectExplorer::KitManager::find(Core::Id::fromSetting(kitid)); | 335 | ProjectExplorer::Kit* k = ProjectExplorer::KitManager::find(Core::Id::fromSetting(kitid)); |
1848 | 336 | if(ProjectExplorer::DeviceKitInformation::deviceId(k) == Core::Id::fromUniqueIdentifier(devId)) { | 336 | if(ProjectExplorer::DeviceKitInformation::deviceId(k) == devId.value<Core::Id>()) { |
1849 | 337 | //completely delete the kit | 337 | //completely delete the kit |
1850 | 338 | ProjectExplorer::KitManager::deregisterKit(k); | 338 | ProjectExplorer::KitManager::deregisterKit(k); |
1851 | 339 | } | 339 | } |
1852 | 340 | } | 340 | } |
1853 | 341 | 341 | ||
1855 | 342 | void UbuntuDevicesModel::triggerRedetect(const int devId) | 342 | void UbuntuDevicesModel::triggerRedetect(const QVariant &devId) |
1856 | 343 | { | 343 | { |
1858 | 344 | int row = findDevice(devId); | 344 | int row = findDevice(devId.value<Core::Id>()); |
1859 | 345 | if(row < 0) | 345 | if(row < 0) |
1860 | 346 | return; | 346 | return; |
1861 | 347 | m_knownDevices[row]->device()->helper()->refresh(); | 347 | m_knownDevices[row]->device()->helper()->refresh(); |
1862 | 348 | } | 348 | } |
1863 | 349 | 349 | ||
1865 | 350 | void UbuntuDevicesModel::deleteDevice(const int devId) | 350 | void UbuntuDevicesModel::deleteDevice(const QVariant &devId) |
1866 | 351 | { | 351 | { |
1868 | 352 | int index = findDevice(devId); | 352 | int index = findDevice(devId.value<Core::Id>()); |
1869 | 353 | if(index < 0) { | 353 | if(index < 0) { |
1870 | 354 | QMessageBox::critical(Core::ICore::mainWindow(),tr("Could not delete device"),tr("The device ID is unknown, please press the refresh button and try again.")); | 354 | QMessageBox::critical(Core::ICore::mainWindow(),tr("Could not delete device"),tr("The device ID is unknown, please press the refresh button and try again.")); |
1871 | 355 | return; | 355 | return; |
1872 | @@ -374,18 +374,18 @@ | |||
1873 | 374 | } | 374 | } |
1874 | 375 | } | 375 | } |
1875 | 376 | 376 | ||
1877 | 377 | int UbuntuDevicesModel::findDevice(int uniqueIdentifier) const | 377 | int UbuntuDevicesModel::findDevice(const Core::Id &devId) const |
1878 | 378 | { | 378 | { |
1879 | 379 | for ( int i = 0; i < m_knownDevices.size(); i++ ) { | 379 | for ( int i = 0; i < m_knownDevices.size(); i++ ) { |
1881 | 380 | if(m_knownDevices[i]->id().uniqueIdentifier() == uniqueIdentifier) | 380 | if(m_knownDevices[i]->id() == devId) |
1882 | 381 | return i; | 381 | return i; |
1883 | 382 | } | 382 | } |
1884 | 383 | return -1; | 383 | return -1; |
1885 | 384 | } | 384 | } |
1886 | 385 | 385 | ||
1888 | 386 | bool UbuntuDevicesModel::hasDevice(int uniqueIdentifier) const | 386 | bool UbuntuDevicesModel::hasDevice(const Core::Id &devId) const |
1889 | 387 | { | 387 | { |
1891 | 388 | return findDevice(uniqueIdentifier) >= 0; | 388 | return findDevice(devId) >= 0; |
1892 | 389 | } | 389 | } |
1893 | 390 | 390 | ||
1894 | 391 | UbuntuDevice::ConstPtr UbuntuDevicesModel::device(const int index) | 391 | UbuntuDevice::ConstPtr UbuntuDevicesModel::device(const int index) |
1895 | @@ -415,7 +415,7 @@ | |||
1896 | 415 | { | 415 | { |
1897 | 416 | UbuntuDevicesItem* hlpr = qobject_cast<UbuntuDevicesItem*>(possibleHelper); | 416 | UbuntuDevicesItem* hlpr = qobject_cast<UbuntuDevicesItem*>(possibleHelper); |
1898 | 417 | if(!hlpr) return -1; | 417 | if(!hlpr) return -1; |
1900 | 418 | return findDevice(hlpr->id().uniqueIdentifier()); | 418 | return findDevice(hlpr->id()); |
1901 | 419 | } | 419 | } |
1902 | 420 | 420 | ||
1903 | 421 | void UbuntuDevicesModel::deviceChanged(QObject *possibleHelper, const QVector<int> &relatedRoles) | 421 | void UbuntuDevicesModel::deviceChanged(QObject *possibleHelper, const QVector<int> &relatedRoles) |
1904 | @@ -529,7 +529,7 @@ | |||
1905 | 529 | 529 | ||
1906 | 530 | if(debug) qDebug()<<"Device Manager reports device added: "<<id.toString(); | 530 | if(debug) qDebug()<<"Device Manager reports device added: "<<id.toString(); |
1907 | 531 | 531 | ||
1909 | 532 | if (hasDevice(id.uniqueIdentifier())) | 532 | if (hasDevice(id)) |
1910 | 533 | return; | 533 | return; |
1911 | 534 | 534 | ||
1912 | 535 | Ubuntu::Internal::UbuntuDevice::ConstPtr ubuntuDev | 535 | Ubuntu::Internal::UbuntuDevice::ConstPtr ubuntuDev |
1913 | @@ -550,7 +550,7 @@ | |||
1914 | 550 | */ | 550 | */ |
1915 | 551 | void UbuntuDevicesModel::deviceRemoved(const Core::Id &id) | 551 | void UbuntuDevicesModel::deviceRemoved(const Core::Id &id) |
1916 | 552 | { | 552 | { |
1918 | 553 | int index = findDevice(id.uniqueIdentifier()); | 553 | int index = findDevice(id); |
1919 | 554 | if(index < 0) | 554 | if(index < 0) |
1920 | 555 | return; | 555 | return; |
1921 | 556 | 556 | ||
1922 | @@ -573,7 +573,7 @@ | |||
1923 | 573 | << Qt::DisplayRole << Qt::EditRole | 573 | << Qt::DisplayRole << Qt::EditRole |
1924 | 574 | << ConnectionStateRole << ConnectionStateStringRole; | 574 | << ConnectionStateRole << ConnectionStateStringRole; |
1925 | 575 | 575 | ||
1927 | 576 | int index = findDevice(id.uniqueIdentifier()); | 576 | int index = findDevice(id); |
1928 | 577 | if(index >= 0) { | 577 | if(index >= 0) { |
1929 | 578 | QModelIndex changed = createIndex(index,0); | 578 | QModelIndex changed = createIndex(index,0); |
1930 | 579 | emit dataChanged(changed, changed,relatedRoles); | 579 | emit dataChanged(changed, changed,relatedRoles); |
1931 | @@ -582,7 +582,7 @@ | |||
1932 | 582 | 582 | ||
1933 | 583 | void UbuntuDevicesModel::deviceConnected(const QString &id) | 583 | void UbuntuDevicesModel::deviceConnected(const QString &id) |
1934 | 584 | { | 584 | { |
1936 | 585 | int idx = findDevice(Core::Id::fromSetting(id).uniqueIdentifier()); | 585 | int idx = findDevice(Core::Id::fromSetting(id)); |
1937 | 586 | if(idx >= 0) | 586 | if(idx >= 0) |
1938 | 587 | return; | 587 | return; |
1939 | 588 | 588 | ||
1940 | @@ -599,7 +599,7 @@ | |||
1941 | 599 | */ | 599 | */ |
1942 | 600 | void UbuntuDevicesModel::registerNewDevice(const QString &serial, const QString &arch) | 600 | void UbuntuDevicesModel::registerNewDevice(const QString &serial, const QString &arch) |
1943 | 601 | { | 601 | { |
1945 | 602 | if(findDevice(Core::Id::fromSetting(serial).uniqueIdentifier()) >= 0) | 602 | if(findDevice(Core::Id::fromSetting(serial)) >= 0) |
1946 | 603 | return; | 603 | return; |
1947 | 604 | 604 | ||
1948 | 605 | if(!ClickToolChain::supportedArchitectures().contains(arch)) { | 605 | if(!ClickToolChain::supportedArchitectures().contains(arch)) { |
1949 | @@ -650,30 +650,24 @@ | |||
1950 | 650 | switch(m_state) { | 650 | switch(m_state) { |
1951 | 651 | case CheckEmulatorInstalled: { | 651 | case CheckEmulatorInstalled: { |
1952 | 652 | return tr("Checking if emulator tool is installed"); | 652 | return tr("Checking if emulator tool is installed"); |
1953 | 653 | break; | ||
1954 | 654 | } | 653 | } |
1955 | 655 | case InstallEmulator: { | 654 | case InstallEmulator: { |
1956 | 656 | return tr("Installing emulator tool"); | 655 | return tr("Installing emulator tool"); |
1957 | 657 | break; | ||
1958 | 658 | } | 656 | } |
1959 | 659 | case CreateEmulatorImage: { | 657 | case CreateEmulatorImage: { |
1960 | 660 | return tr("Creating emulator image"); | 658 | return tr("Creating emulator image"); |
1961 | 661 | break; | ||
1962 | 662 | } | 659 | } |
1963 | 663 | case ReadFromSettings:{ | 660 | case ReadFromSettings:{ |
1964 | 664 | return tr("Reading settings"); | 661 | return tr("Reading settings"); |
1965 | 665 | } | 662 | } |
1966 | 666 | case FindImages:{ | 663 | case FindImages:{ |
1967 | 667 | return tr("Searching for emulator images"); | 664 | return tr("Searching for emulator images"); |
1968 | 668 | break; | ||
1969 | 669 | } | 665 | } |
1970 | 670 | case AdbList:{ | 666 | case AdbList:{ |
1971 | 671 | return tr("Querying ADB"); | 667 | return tr("Querying ADB"); |
1972 | 672 | break; | ||
1973 | 673 | } | 668 | } |
1974 | 674 | default: | 669 | default: |
1975 | 675 | return QString(); | 670 | return QString(); |
1976 | 676 | break; | ||
1977 | 677 | } | 671 | } |
1978 | 678 | } | 672 | } |
1979 | 679 | 673 | ||
1980 | @@ -816,7 +810,7 @@ | |||
1981 | 816 | 810 | ||
1982 | 817 | void UbuntuDevicesModel::startEmulator(const QString &name) | 811 | void UbuntuDevicesModel::startEmulator(const QString &name) |
1983 | 818 | { | 812 | { |
1985 | 819 | int idx = findDevice(Core::Id::fromSetting(name).uniqueIdentifier()); | 813 | int idx = findDevice(Core::Id::fromSetting(name)); |
1986 | 820 | if(idx < 0) | 814 | if(idx < 0) |
1987 | 821 | return; | 815 | return; |
1988 | 822 | 816 | ||
1989 | @@ -828,7 +822,7 @@ | |||
1990 | 828 | 822 | ||
1991 | 829 | void UbuntuDevicesModel::stopEmulator(const QString &name) | 823 | void UbuntuDevicesModel::stopEmulator(const QString &name) |
1992 | 830 | { | 824 | { |
1994 | 831 | int idx = findDevice(Core::Id::fromSetting(name).uniqueIdentifier()); | 825 | int idx = findDevice(Core::Id::fromSetting(name)); |
1995 | 832 | if(idx < 0) | 826 | if(idx < 0) |
1996 | 833 | return; | 827 | return; |
1997 | 834 | 828 | ||
1998 | @@ -841,7 +835,7 @@ | |||
1999 | 841 | 835 | ||
2000 | 842 | void UbuntuDevicesModel::deleteEmulator(const QString &name) | 836 | void UbuntuDevicesModel::deleteEmulator(const QString &name) |
2001 | 843 | { | 837 | { |
2003 | 844 | int index = findDevice(Core::Id::fromSetting(name).uniqueIdentifier()); | 838 | int index = findDevice(Core::Id::fromSetting(name)); |
2004 | 845 | if(index < 0) | 839 | if(index < 0) |
2005 | 846 | return; | 840 | return; |
2006 | 847 | 841 | ||
2007 | @@ -865,7 +859,9 @@ | |||
2008 | 865 | QVariant UbuntuDevicesModel::validateEmulatorName(const QString &name) | 859 | QVariant UbuntuDevicesModel::validateEmulatorName(const QString &name) |
2009 | 866 | { | 860 | { |
2010 | 867 | QString error; | 861 | QString error; |
2012 | 868 | bool result = Utils::ProjectIntroPage::validateProjectName(name,&error); | 862 | |
2013 | 863 | QRegularExpression exp(QStringLiteral("^[a-zA-Z][a-zA-Z0-9]+")); | ||
2014 | 864 | bool result = exp.match(name).hasMatch(); | ||
2015 | 869 | 865 | ||
2016 | 870 | if(result) { | 866 | if(result) { |
2017 | 871 | foreach (UbuntuDevicesItem *item, m_knownDevices) { | 867 | foreach (UbuntuDevicesItem *item, m_knownDevices) { |
2018 | @@ -877,6 +873,8 @@ | |||
2019 | 877 | } | 873 | } |
2020 | 878 | } | 874 | } |
2021 | 879 | } | 875 | } |
2022 | 876 | } else { | ||
2023 | 877 | error = tr("Emulator names can only contain letters and numbers."); | ||
2024 | 880 | } | 878 | } |
2025 | 881 | 879 | ||
2026 | 882 | QVariantMap m; | 880 | QVariantMap m; |
2027 | @@ -966,10 +964,10 @@ | |||
2028 | 966 | case FindImages: { | 964 | case FindImages: { |
2029 | 967 | QStringList lines = m_reply.trimmed().split(QLatin1String(Constants::LINEFEED)); | 965 | QStringList lines = m_reply.trimmed().split(QLatin1String(Constants::LINEFEED)); |
2030 | 968 | 966 | ||
2032 | 969 | QSet<int> notFoundImages; | 967 | QSet<Core::Id> notFoundImages; |
2033 | 970 | foreach(UbuntuDevicesItem *item, m_knownDevices) { | 968 | foreach(UbuntuDevicesItem *item, m_knownDevices) { |
2034 | 971 | if(item->device()->machineType() == ProjectExplorer::IDevice::Emulator) | 969 | if(item->device()->machineType() == ProjectExplorer::IDevice::Emulator) |
2036 | 972 | notFoundImages.insert(item->device()->id().uniqueIdentifier()); | 970 | notFoundImages.insert(item->device()->id()); |
2037 | 973 | } | 971 | } |
2038 | 974 | 972 | ||
2039 | 975 | QMutableStringListIterator iter(lines); | 973 | QMutableStringListIterator iter(lines); |
2040 | @@ -1021,10 +1019,10 @@ | |||
2041 | 1021 | bool addToManager = false; | 1019 | bool addToManager = false; |
2042 | 1022 | Ubuntu::Internal::UbuntuDevice::Ptr dev; | 1020 | Ubuntu::Internal::UbuntuDevice::Ptr dev; |
2043 | 1023 | Core::Id devId = Core::Id::fromSetting(deviceSerial); | 1021 | Core::Id devId = Core::Id::fromSetting(deviceSerial); |
2045 | 1024 | int index = findDevice(devId.uniqueIdentifier()); | 1022 | int index = findDevice(devId); |
2046 | 1025 | 1023 | ||
2047 | 1026 | if(index >= 0) { | 1024 | if(index >= 0) { |
2049 | 1027 | notFoundImages.remove(devId.uniqueIdentifier()); | 1025 | notFoundImages.remove(devId); |
2050 | 1028 | dev = m_knownDevices[index]->device(); | 1026 | dev = m_knownDevices[index]->device(); |
2051 | 1029 | } else { | 1027 | } else { |
2052 | 1030 | dev = Ubuntu::Internal::UbuntuDevice::create( | 1028 | dev = Ubuntu::Internal::UbuntuDevice::create( |
2053 | @@ -1046,8 +1044,12 @@ | |||
2054 | 1046 | } | 1044 | } |
2055 | 1047 | 1045 | ||
2056 | 1048 | //remove all ubuntu emulators that are in the settings but don't exist in the system | 1046 | //remove all ubuntu emulators that are in the settings but don't exist in the system |
2059 | 1049 | foreach(int curr,notFoundImages) { | 1047 | foreach(const Core::Id &curr,notFoundImages) { |
2060 | 1050 | ProjectExplorer::DeviceManager::instance()->removeDevice(Core::Id::fromUniqueIdentifier(curr)); | 1048 | int row = findDevice(curr); |
2061 | 1049 | if (row < 0 || row >= rowCount()) | ||
2062 | 1050 | continue; | ||
2063 | 1051 | |||
2064 | 1052 | ProjectExplorer::DeviceManager::instance()->removeDevice(m_knownDevices.at(row)->id()); | ||
2065 | 1051 | } | 1053 | } |
2066 | 1052 | 1054 | ||
2067 | 1053 | queryAdb(); | 1055 | queryAdb(); |
2068 | @@ -1069,7 +1071,7 @@ | |||
2069 | 1069 | continue; | 1071 | continue; |
2070 | 1070 | } | 1072 | } |
2071 | 1071 | 1073 | ||
2073 | 1072 | QRegularExpression exp(QLatin1String(Constants::UBUNTUDEVICESWIDGET_ONFINISHED_ADB_REGEX)); | 1074 | QRegularExpression exp((QLatin1String(Constants::UBUNTUDEVICESWIDGET_ONFINISHED_ADB_REGEX))); |
2074 | 1073 | QRegularExpressionMatch match = exp.match(line); | 1075 | QRegularExpressionMatch match = exp.match(line); |
2075 | 1074 | 1076 | ||
2076 | 1075 | if(match.hasMatch()) { | 1077 | if(match.hasMatch()) { |
2077 | @@ -1231,4 +1233,3 @@ | |||
2078 | 1231 | 1233 | ||
2079 | 1232 | } | 1234 | } |
2080 | 1233 | } | 1235 | } |
2081 | 1234 | |||
2082 | 1235 | 1236 | ||
2083 | === modified file 'src/ubuntu/ubuntudevicesmodel.h' | |||
2084 | --- src/ubuntu/ubuntudevicesmodel.h 2016-07-22 10:17:50 +0000 | |||
2085 | +++ src/ubuntu/ubuntudevicesmodel.h 2016-08-24 15:35:12 +0000 | |||
2086 | @@ -88,8 +88,8 @@ | |||
2087 | 88 | 88 | ||
2088 | 89 | Q_INVOKABLE bool set(int index, const QString &role, const QVariant &value); | 89 | Q_INVOKABLE bool set(int index, const QString &role, const QVariant &value); |
2089 | 90 | 90 | ||
2092 | 91 | int findDevice(int uniqueIdentifier) const; | 91 | int findDevice(const Core::Id &devId) const; |
2093 | 92 | bool hasDevice (int uniqueIdentifier) const; | 92 | bool hasDevice (const Core::Id &devId) const; |
2094 | 93 | UbuntuDevice::ConstPtr device ( const int index ); | 93 | UbuntuDevice::ConstPtr device ( const int index ); |
2095 | 94 | 94 | ||
2096 | 95 | // QAbstractItemModel interface | 95 | // QAbstractItemModel interface |
2097 | @@ -116,13 +116,13 @@ | |||
2098 | 116 | void stateChanged(QString arg); | 116 | void stateChanged(QString arg); |
2099 | 117 | 117 | ||
2100 | 118 | public slots: | 118 | public slots: |
2108 | 119 | void triggerPortForwarding ( const int devId ); | 119 | void triggerPortForwarding ( const QVariant &devId ); |
2109 | 120 | void triggerSSHSetup ( const int devId ); | 120 | void triggerSSHSetup ( const QVariant &devId ); |
2110 | 121 | void triggerSSHConnection ( const int devId ); | 121 | void triggerSSHConnection ( const QVariant &devId ); |
2111 | 122 | void triggerKitAutocreate ( const int devId ); | 122 | void triggerKitAutocreate ( const QVariant &devId ); |
2112 | 123 | void triggerKitRemove ( const int devId, const QVariant &kitid ); | 123 | void triggerKitRemove ( const QVariant &devId, const QVariant &kitid ); |
2113 | 124 | void triggerRedetect ( const int devId ); | 124 | void triggerRedetect ( const QVariant &devId ); |
2114 | 125 | void deleteDevice ( const int devId ); | 125 | void deleteDevice ( const QVariant &devId ); |
2115 | 126 | void createEmulatorImage ( const QString &name, const QString &arch, const QString &channel, const QString &passwd ); | 126 | void createEmulatorImage ( const QString &name, const QString &arch, const QString &channel, const QString &passwd ); |
2116 | 127 | void startEmulator ( const QString &name ); | 127 | void startEmulator ( const QString &name ); |
2117 | 128 | void stopEmulator ( const QString &name ); | 128 | void stopEmulator ( const QString &name ); |
2118 | 129 | 129 | ||
2119 | === modified file 'src/ubuntu/ubuntufixmanifeststep.cpp' | |||
2120 | --- src/ubuntu/ubuntufixmanifeststep.cpp 2015-02-16 12:27:25 +0000 | |||
2121 | +++ src/ubuntu/ubuntufixmanifeststep.cpp 2016-08-24 15:35:12 +0000 | |||
2122 | @@ -42,8 +42,9 @@ | |||
2123 | 42 | m_packageDir = packageDir; | 42 | m_packageDir = packageDir; |
2124 | 43 | } | 43 | } |
2125 | 44 | 44 | ||
2127 | 45 | bool UbuntuFixManifestStep::init() | 45 | bool UbuntuFixManifestStep::init(QList<const BuildStep *> &earlierSteps) |
2128 | 46 | { | 46 | { |
2129 | 47 | Q_UNUSED(earlierSteps); | ||
2130 | 47 | return true; | 48 | return true; |
2131 | 48 | } | 49 | } |
2132 | 49 | 50 | ||
2133 | 50 | 51 | ||
2134 | === modified file 'src/ubuntu/ubuntufixmanifeststep.h' | |||
2135 | --- src/ubuntu/ubuntufixmanifeststep.h 2016-07-22 10:17:50 +0000 | |||
2136 | +++ src/ubuntu/ubuntufixmanifeststep.h 2016-08-24 15:35:12 +0000 | |||
2137 | @@ -18,7 +18,7 @@ | |||
2138 | 18 | void setPackageDir(const QString &packageDir); | 18 | void setPackageDir(const QString &packageDir); |
2139 | 19 | 19 | ||
2140 | 20 | // BuildStep interface | 20 | // BuildStep interface |
2142 | 21 | virtual bool init() override; | 21 | virtual bool init(QList<const BuildStep *> &earlierSteps) override; |
2143 | 22 | virtual void run(QFutureInterface<bool> &fi) override; | 22 | virtual void run(QFutureInterface<bool> &fi) override; |
2144 | 23 | virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override; | 23 | virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override; |
2145 | 24 | 24 | ||
2146 | 25 | 25 | ||
2147 | === modified file 'src/ubuntu/ubuntuhtmlbuildconfiguration.cpp' | |||
2148 | --- src/ubuntu/ubuntuhtmlbuildconfiguration.cpp 2015-04-28 14:32:58 +0000 | |||
2149 | +++ src/ubuntu/ubuntuhtmlbuildconfiguration.cpp 2016-08-24 15:35:12 +0000 | |||
2150 | @@ -162,7 +162,8 @@ | |||
2151 | 162 | QList<ProjectExplorer::BuildInfo *> builds; | 162 | QList<ProjectExplorer::BuildInfo *> builds; |
2152 | 163 | 163 | ||
2153 | 164 | ProjectExplorer::BuildInfo *info = new ProjectExplorer::BuildInfo(this); | 164 | ProjectExplorer::BuildInfo *info = new ProjectExplorer::BuildInfo(this); |
2155 | 165 | info->buildDirectory = Utils::FileName::fromString(UbuntuProject::shadowBuildDirectory(projectDir,k,QStringLiteral("default"))); | 165 | QString sBd = UbuntuProject::shadowBuildDirectory(projectDir,k,QStringLiteral("default"), ProjectExplorer::BuildConfiguration::Unknown); |
2156 | 166 | info->buildDirectory = Utils::FileName::fromString(sBd); | ||
2157 | 166 | info->typeName = tr("Html5"); | 167 | info->typeName = tr("Html5"); |
2158 | 167 | info->kitId = k->id(); | 168 | info->kitId = k->id(); |
2159 | 168 | info->displayName = tr("Default"); | 169 | info->displayName = tr("Default"); |
2160 | 169 | 170 | ||
2161 | === modified file 'src/ubuntu/ubuntukitmanager.cpp' | |||
2162 | --- src/ubuntu/ubuntukitmanager.cpp 2016-05-17 16:33:36 +0000 | |||
2163 | +++ src/ubuntu/ubuntukitmanager.cpp 2016-08-24 15:35:12 +0000 | |||
2164 | @@ -20,7 +20,9 @@ | |||
2165 | 20 | #include <qtsupport/qtkitinformation.h> | 20 | #include <qtsupport/qtkitinformation.h> |
2166 | 21 | 21 | ||
2167 | 22 | #include <cmakeprojectmanager/cmaketoolmanager.h> | 22 | #include <cmakeprojectmanager/cmaketoolmanager.h> |
2168 | 23 | #include <cmakeprojectmanager/cmaketool.h> | ||
2169 | 23 | #include <cmakeprojectmanager/cmakekitinformation.h> | 24 | #include <cmakeprojectmanager/cmakekitinformation.h> |
2170 | 25 | #include <cmakeprojectmanager/cmakeconfigitem.h> | ||
2171 | 24 | #include <qtsupport/qtversionmanager.h> | 26 | #include <qtsupport/qtversionmanager.h> |
2172 | 25 | 27 | ||
2173 | 26 | #include <QMessageBox> | 28 | #include <QMessageBox> |
2174 | @@ -86,7 +88,7 @@ | |||
2175 | 86 | if(tc) { | 88 | if(tc) { |
2176 | 87 | if (!tc->isAutoDetected()) | 89 | if (!tc->isAutoDetected()) |
2177 | 88 | continue; | 90 | continue; |
2179 | 89 | if (tc->type() != QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) | 91 | if (tc->typeId() != Constants::UBUNTU_CLICK_TOOLCHAIN_ID) |
2180 | 90 | continue; | 92 | continue; |
2181 | 91 | toolchains << static_cast<ClickToolChain *>(tc); | 93 | toolchains << static_cast<ClickToolChain *>(tc); |
2182 | 92 | } | 94 | } |
2183 | @@ -101,7 +103,7 @@ | |||
2184 | 101 | if (!tc) | 103 | if (!tc) |
2185 | 102 | return false; | 104 | return false; |
2186 | 103 | 105 | ||
2188 | 104 | if (tc->type() != QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) | 106 | if (tc->typeId() != Constants::UBUNTU_CLICK_TOOLCHAIN_ID) |
2189 | 105 | return false; | 107 | return false; |
2190 | 106 | 108 | ||
2191 | 107 | ClickToolChain *cTc = static_cast<ClickToolChain *>(tc); | 109 | ClickToolChain *cTc = static_cast<ClickToolChain *>(tc); |
2192 | @@ -127,7 +129,7 @@ | |||
2193 | 127 | } | 129 | } |
2194 | 128 | } | 130 | } |
2195 | 129 | 131 | ||
2197 | 130 | UbuntuQtVersion *qtVersion = new UbuntuQtVersion(Utils::FileName::fromString(qmakePath),false); | 132 | UbuntuQtVersion *qtVersion = new UbuntuQtVersion(tc->clickTarget().containerName, Utils::FileName::fromString(qmakePath),false); |
2198 | 131 | QtSupport::QtVersionManager::addVersion(qtVersion); | 133 | QtSupport::QtVersionManager::addVersion(qtVersion); |
2199 | 132 | return qtVersion; | 134 | return qtVersion; |
2200 | 133 | } | 135 | } |
2201 | @@ -159,7 +161,8 @@ | |||
2202 | 159 | { | 161 | { |
2203 | 160 | QString cmakePathStr = UbuntuClickTool::findOrCreateToolWrapper(QStringLiteral("cmake"), target); | 162 | QString cmakePathStr = UbuntuClickTool::findOrCreateToolWrapper(QStringLiteral("cmake"), target); |
2204 | 161 | Utils::FileName cmakePath = Utils::FileName::fromString(cmakePathStr); | 163 | Utils::FileName cmakePath = Utils::FileName::fromString(cmakePathStr); |
2206 | 162 | CMakeProjectManager::CMakeTool *cmake = new CMakeProjectManager::CMakeTool(CMakeProjectManager::CMakeTool::AutoDetection); | 164 | CMakeProjectManager::CMakeTool *cmake = new CMakeProjectManager::CMakeTool(CMakeProjectManager::CMakeTool::AutoDetection, |
2207 | 165 | CMakeProjectManager::CMakeTool::createId()); | ||
2208 | 163 | 166 | ||
2209 | 164 | cmake->setCMakeExecutable(cmakePath); | 167 | cmake->setCMakeExecutable(cmakePath); |
2210 | 165 | cmake->setDisplayName(tr("Ubuntu SDK cmake (%1-%2-%3)") | 168 | cmake->setDisplayName(tr("Ubuntu SDK cmake (%1-%2-%3)") |
2211 | @@ -322,7 +325,7 @@ | |||
2212 | 322 | continue; | 325 | continue; |
2213 | 323 | 326 | ||
2214 | 324 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k); | 327 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k); |
2216 | 325 | if (tc && tc->type() != QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) | 328 | if (tc && tc->typeId() != Constants::UBUNTU_CLICK_TOOLCHAIN_ID) |
2217 | 326 | continue; | 329 | continue; |
2218 | 327 | 330 | ||
2219 | 328 | //@TODO check for ubuntu device information | 331 | //@TODO check for ubuntu device information |
2220 | @@ -364,7 +367,7 @@ | |||
2221 | 364 | foreach (ProjectExplorer::Kit *k, existingKits) { | 367 | foreach (ProjectExplorer::Kit *k, existingKits) { |
2222 | 365 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k); | 368 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k); |
2223 | 366 | CMakeProjectManager::CMakeTool* cmake = CMakeProjectManager::CMakeKitInformation::cmakeTool(k); | 369 | CMakeProjectManager::CMakeTool* cmake = CMakeProjectManager::CMakeKitInformation::cmakeTool(k); |
2225 | 367 | if (tc && tc->type() == QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID) | 370 | if (tc && tc->typeId() == Constants::UBUNTU_CLICK_TOOLCHAIN_ID |
2226 | 368 | && cmake | 371 | && cmake |
2227 | 369 | && cmake->isValid()) { | 372 | && cmake->isValid()) { |
2228 | 370 | fixKit(k); | 373 | fixKit(k); |
2229 | @@ -562,13 +565,20 @@ | |||
2230 | 562 | k->setMutable(ProjectExplorer::SysRootKitInformation::id(),false); | 565 | k->setMutable(ProjectExplorer::SysRootKitInformation::id(),false); |
2231 | 563 | 566 | ||
2232 | 564 | //make sure we use a ubuntu Qt version | 567 | //make sure we use a ubuntu Qt version |
2234 | 565 | QtSupport::QtKitInformation::setQtVersion(k, createOrFindQtVersion(tc)); | 568 | UbuntuQtVersion *qtVer = createOrFindQtVersion(tc); |
2235 | 569 | QtSupport::QtKitInformation::setQtVersion(k, qtVer); | ||
2236 | 566 | 570 | ||
2237 | 567 | //make sure we use a ubuntu cmake | 571 | //make sure we use a ubuntu cmake |
2238 | 568 | CMakeProjectManager::CMakeTool *cmake = createOrFindCMakeTool(tc); | 572 | CMakeProjectManager::CMakeTool *cmake = createOrFindCMakeTool(tc); |
2239 | 569 | if(cmake) { | 573 | if(cmake) { |
2240 | 574 | CMakeProjectManager::CMakeConfig conf{ | ||
2241 | 575 | CMakeProjectManager::CMakeConfigItem("QT_QMAKE_EXECUTABLE", qtVer->remoteQMakeCommand().toUtf8()), | ||
2242 | 576 | CMakeProjectManager::CMakeConfigItem("CMAKE_CXX_COMPILER", tc->remoteCompilerCommand().toUtf8()) | ||
2243 | 577 | }; | ||
2244 | 578 | |||
2245 | 570 | cmake->setPathMapper(&UbuntuClickTool::mapIncludePathsForCMake); | 579 | cmake->setPathMapper(&UbuntuClickTool::mapIncludePathsForCMake); |
2246 | 571 | CMakeProjectManager::CMakeKitInformation::setCMakeTool(k, cmake->id()); | 580 | CMakeProjectManager::CMakeKitInformation::setCMakeTool(k, cmake->id()); |
2247 | 581 | CMakeProjectManager::CMakeConfigurationKitInformation::setConfiguration(k , conf); | ||
2248 | 572 | } | 582 | } |
2249 | 573 | 583 | ||
2250 | 574 | } | 584 | } |
2251 | 575 | 585 | ||
2252 | === modified file 'src/ubuntu/ubuntumenu.cpp' | |||
2253 | --- src/ubuntu/ubuntumenu.cpp 2016-03-29 09:41:07 +0000 | |||
2254 | +++ src/ubuntu/ubuntumenu.cpp 2016-08-24 15:35:12 +0000 | |||
2255 | @@ -116,7 +116,7 @@ | |||
2256 | 116 | isClickTarget = startupProject->activeTarget() | 116 | isClickTarget = startupProject->activeTarget() |
2257 | 117 | && startupProject->activeTarget()->kit() | 117 | && startupProject->activeTarget()->kit() |
2258 | 118 | && ProjectExplorer::ToolChainKitInformation::toolChain(startupProject->activeTarget()->kit()) | 118 | && ProjectExplorer::ToolChainKitInformation::toolChain(startupProject->activeTarget()->kit()) |
2260 | 119 | && ProjectExplorer::ToolChainKitInformation::toolChain(startupProject->activeTarget()->kit())->type() == QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID); | 119 | && ProjectExplorer::ToolChainKitInformation::toolChain(startupProject->activeTarget()->kit())->typeId() == Constants::UBUNTU_CLICK_TOOLCHAIN_ID; |
2261 | 120 | } | 120 | } |
2262 | 121 | 121 | ||
2263 | 122 | //bool canRun = projectExplorerInstance->canRun(startupProject,ProjectExplorer::NormalRunMode); | 122 | //bool canRun = projectExplorerInstance->canRun(startupProject,ProjectExplorer::NormalRunMode); |
2264 | 123 | 123 | ||
2265 | === modified file 'src/ubuntu/ubuntupackagestep.cpp' | |||
2266 | --- src/ubuntu/ubuntupackagestep.cpp 2015-11-27 10:06:33 +0000 | |||
2267 | +++ src/ubuntu/ubuntupackagestep.cpp 2016-08-24 15:35:12 +0000 | |||
2268 | @@ -77,8 +77,9 @@ | |||
2269 | 77 | cleanup(); | 77 | cleanup(); |
2270 | 78 | } | 78 | } |
2271 | 79 | 79 | ||
2273 | 80 | bool UbuntuPackageStep::init() | 80 | bool UbuntuPackageStep::init(QList<const BuildStep *> &earlierSteps) |
2274 | 81 | { | 81 | { |
2275 | 82 | Q_UNUSED(earlierSteps); | ||
2276 | 82 | //initialization happens in internalInit, | 83 | //initialization happens in internalInit, |
2277 | 83 | //because it requires informations that are only available at this | 84 | //because it requires informations that are only available at this |
2278 | 84 | //time | 85 | //time |
2279 | @@ -277,8 +278,9 @@ | |||
2280 | 277 | } | 278 | } |
2281 | 278 | emit addOutput(tr("Configuration is invalid. Aborting build") | 279 | emit addOutput(tr("Configuration is invalid. Aborting build") |
2282 | 279 | ,ProjectExplorer::BuildStep::MessageOutput); | 280 | ,ProjectExplorer::BuildStep::MessageOutput); |
2285 | 280 | fi.reportResult(false); | 281 | |
2286 | 281 | emit finished(); | 282 | reportRunResult(fi, false); |
2287 | 283 | cleanup(); | ||
2288 | 282 | return; | 284 | return; |
2289 | 283 | } | 285 | } |
2290 | 284 | 286 | ||
2291 | @@ -487,9 +489,9 @@ | |||
2292 | 487 | 489 | ||
2293 | 488 | //the process failed, lets clean up | 490 | //the process failed, lets clean up |
2294 | 489 | if (!success) { | 491 | if (!success) { |
2296 | 490 | m_futureInterface->reportResult(false); | 492 | if(m_futureInterface) |
2297 | 493 | reportRunResult(*m_futureInterface, false); | ||
2298 | 491 | cleanup(); | 494 | cleanup(); |
2299 | 492 | emit finished(); | ||
2300 | 493 | } | 495 | } |
2301 | 494 | return success; | 496 | return success; |
2302 | 495 | } | 497 | } |
2303 | @@ -572,9 +574,9 @@ | |||
2304 | 572 | .arg(m_deployDir), | 574 | .arg(m_deployDir), |
2305 | 573 | BuildStep::ErrorMessageOutput); | 575 | BuildStep::ErrorMessageOutput); |
2306 | 574 | 576 | ||
2308 | 575 | m_futureInterface->reportResult(false); | 577 | if(m_futureInterface) |
2309 | 578 | reportRunResult(*m_futureInterface, false); | ||
2310 | 576 | cleanup(); | 579 | cleanup(); |
2311 | 577 | emit finished(); | ||
2312 | 578 | return; | 580 | return; |
2313 | 579 | } | 581 | } |
2314 | 580 | 582 | ||
2315 | @@ -584,9 +586,9 @@ | |||
2316 | 584 | .arg(err), | 586 | .arg(err), |
2317 | 585 | BuildStep::ErrorMessageOutput); | 587 | BuildStep::ErrorMessageOutput); |
2318 | 586 | 588 | ||
2320 | 587 | m_futureInterface->reportResult(false); | 589 | if(m_futureInterface) |
2321 | 590 | reportRunResult(*m_futureInterface, false); | ||
2322 | 588 | cleanup(); | 591 | cleanup(); |
2323 | 589 | emit finished(); | ||
2324 | 590 | return; | 592 | return; |
2325 | 591 | } | 593 | } |
2326 | 592 | 594 | ||
2327 | @@ -623,7 +625,7 @@ | |||
2328 | 623 | continue; | 625 | continue; |
2329 | 624 | 626 | ||
2330 | 625 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit()); | 627 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit()); |
2332 | 626 | if(!tc || tc->type() != QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) { | 628 | if(!tc || tc->typeId() != Constants::UBUNTU_CLICK_TOOLCHAIN_ID) { |
2333 | 627 | qWarning()<<"Incompatible Toolchain for hook"<<hook.appId; | 629 | qWarning()<<"Incompatible Toolchain for hook"<<hook.appId; |
2334 | 628 | continue; | 630 | continue; |
2335 | 629 | } | 631 | } |
2336 | @@ -745,9 +747,9 @@ | |||
2337 | 745 | 747 | ||
2338 | 746 | if (m_packageMode == OnlyMakeInstall) { | 748 | if (m_packageMode == OnlyMakeInstall) { |
2339 | 747 | 749 | ||
2341 | 748 | m_futureInterface->reportResult(true); | 750 | if(m_futureInterface) |
2342 | 751 | reportRunResult(*m_futureInterface, true); | ||
2343 | 749 | cleanup(); | 752 | cleanup(); |
2344 | 750 | emit finished(); | ||
2345 | 751 | 753 | ||
2346 | 752 | return; | 754 | return; |
2347 | 753 | } | 755 | } |
2348 | @@ -772,7 +774,7 @@ | |||
2349 | 772 | if (!processFinished()) | 774 | if (!processFinished()) |
2350 | 773 | return; | 775 | return; |
2351 | 774 | 776 | ||
2353 | 775 | QRegularExpression exp(QLatin1String(Constants::UBUNTU_CLICK_SUCCESS_PACKAGE_REGEX)); | 777 | QRegularExpression exp((QLatin1String(Constants::UBUNTU_CLICK_SUCCESS_PACKAGE_REGEX))); |
2354 | 776 | QRegularExpressionMatch m = exp.match(m_lastLine); | 778 | QRegularExpressionMatch m = exp.match(m_lastLine); |
2355 | 777 | if(m.hasMatch()) { | 779 | if(m.hasMatch()) { |
2356 | 778 | m_clickPackageName = m.captured(1); | 780 | m_clickPackageName = m.captured(1); |
2357 | @@ -794,9 +796,9 @@ | |||
2358 | 794 | if (!processFinished(IgnoreReturnCode)) | 796 | if (!processFinished(IgnoreReturnCode)) |
2359 | 795 | return; | 797 | return; |
2360 | 796 | 798 | ||
2362 | 797 | m_futureInterface->reportResult(true); | 799 | if(m_futureInterface) |
2363 | 800 | reportRunResult(*m_futureInterface, true); | ||
2364 | 798 | cleanup(); | 801 | cleanup(); |
2365 | 799 | emit finished(); | ||
2366 | 800 | } | 802 | } |
2367 | 801 | 803 | ||
2368 | 802 | default: | 804 | default: |
2369 | @@ -824,7 +826,8 @@ | |||
2370 | 824 | 826 | ||
2371 | 825 | void UbuntuPackageStep::onProcessFailedToStart() | 827 | void UbuntuPackageStep::onProcessFailedToStart() |
2372 | 826 | { | 828 | { |
2374 | 827 | m_futureInterface->reportResult(false); | 829 | if(m_futureInterface) |
2375 | 830 | reportRunResult(*m_futureInterface, false); | ||
2376 | 828 | 831 | ||
2377 | 829 | ProjectExplorer::ProcessParameters *params; | 832 | ProjectExplorer::ProcessParameters *params; |
2378 | 830 | if (m_state == MakeInstall) | 833 | if (m_state == MakeInstall) |
2379 | @@ -837,7 +840,6 @@ | |||
2380 | 837 | params->prettyArguments()), | 840 | params->prettyArguments()), |
2381 | 838 | BuildStep::ErrorMessageOutput); | 841 | BuildStep::ErrorMessageOutput); |
2382 | 839 | 842 | ||
2383 | 840 | emit finished(); | ||
2384 | 841 | cleanup(); | 843 | cleanup(); |
2385 | 842 | 844 | ||
2386 | 843 | } | 845 | } |
2387 | 844 | 846 | ||
2388 | === modified file 'src/ubuntu/ubuntupackagestep.h' | |||
2389 | --- src/ubuntu/ubuntupackagestep.h 2015-07-08 15:38:37 +0000 | |||
2390 | +++ src/ubuntu/ubuntupackagestep.h 2016-08-24 15:35:12 +0000 | |||
2391 | @@ -55,7 +55,7 @@ | |||
2392 | 55 | 55 | ||
2393 | 56 | public: | 56 | public: |
2394 | 57 | // BuildStep interface | 57 | // BuildStep interface |
2396 | 58 | virtual bool init() override; | 58 | virtual bool init(QList<const ProjectExplorer::BuildStep *> &earlierSteps) override; |
2397 | 59 | virtual void run(QFutureInterface<bool> &fi) override; | 59 | virtual void run(QFutureInterface<bool> &fi) override; |
2398 | 60 | virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override; | 60 | virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override; |
2399 | 61 | virtual bool immutable() const override; | 61 | virtual bool immutable() const override; |
2400 | 62 | 62 | ||
2401 | === modified file 'src/ubuntu/ubuntupackagingmode.cpp' | |||
2402 | --- src/ubuntu/ubuntupackagingmode.cpp 2015-03-03 17:23:52 +0000 | |||
2403 | +++ src/ubuntu/ubuntupackagingmode.cpp 2016-08-24 15:35:12 +0000 | |||
2404 | @@ -80,8 +80,6 @@ | |||
2405 | 80 | m_modeView->rootContext()->setContextProperty(QLatin1String("resourceRoot") ,Constants::UBUNTU_DEVICESCREEN_ROOT); | 80 | m_modeView->rootContext()->setContextProperty(QLatin1String("resourceRoot") ,Constants::UBUNTU_DEVICESCREEN_ROOT); |
2406 | 81 | m_modeView->setSource(QUrl::fromLocalFile(Constants::UBUNTU_PUBLISHSCREEN_QML)); | 81 | m_modeView->setSource(QUrl::fromLocalFile(Constants::UBUNTU_PUBLISHSCREEN_QML)); |
2407 | 82 | 82 | ||
2408 | 83 | connect(Core::ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)), SLOT(modeChanged(Core::IMode*))); | ||
2409 | 84 | |||
2410 | 85 | QObject* sessionManager = ProjectExplorer::SessionManager::instance(); | 83 | QObject* sessionManager = ProjectExplorer::SessionManager::instance(); |
2411 | 86 | connect(sessionManager,SIGNAL(projectAdded(ProjectExplorer::Project*)),SLOT(on_projectAdded(ProjectExplorer::Project*))); | 84 | connect(sessionManager,SIGNAL(projectAdded(ProjectExplorer::Project*)),SLOT(on_projectAdded(ProjectExplorer::Project*))); |
2412 | 87 | connect(sessionManager,SIGNAL(projectRemoved(ProjectExplorer::Project*)),SLOT(on_projectRemoved(ProjectExplorer::Project*))); | 85 | connect(sessionManager,SIGNAL(projectRemoved(ProjectExplorer::Project*)),SLOT(on_projectRemoved(ProjectExplorer::Project*))); |
2413 | @@ -95,10 +93,6 @@ | |||
2414 | 95 | 93 | ||
2415 | 96 | } | 94 | } |
2416 | 97 | 95 | ||
2417 | 98 | void UbuntuPackagingMode::modeChanged(Core::IMode* currentMode) { | ||
2418 | 99 | previousMode = currentMode->id(); | ||
2419 | 100 | } | ||
2420 | 101 | |||
2421 | 102 | void UbuntuPackagingMode::updateModeState() { | 96 | void UbuntuPackagingMode::updateModeState() { |
2422 | 103 | ProjectExplorer::Project* startupProject = ProjectExplorer::SessionManager::startupProject(); | 97 | ProjectExplorer::Project* startupProject = ProjectExplorer::SessionManager::startupProject(); |
2423 | 104 | 98 | ||
2424 | 105 | 99 | ||
2425 | === modified file 'src/ubuntu/ubuntupackagingmode.h' | |||
2426 | --- src/ubuntu/ubuntupackagingmode.h 2015-01-29 07:49:13 +0000 | |||
2427 | +++ src/ubuntu/ubuntupackagingmode.h 2016-08-24 15:35:12 +0000 | |||
2428 | @@ -40,15 +40,12 @@ | |||
2429 | 40 | void initialize(); | 40 | void initialize(); |
2430 | 41 | 41 | ||
2431 | 42 | protected slots: | 42 | protected slots: |
2432 | 43 | void modeChanged(Core::IMode*); | ||
2433 | 44 | |||
2434 | 45 | void on_projectAdded(ProjectExplorer::Project *project); | 43 | void on_projectAdded(ProjectExplorer::Project *project); |
2435 | 46 | void on_projectRemoved(ProjectExplorer::Project *project); | 44 | void on_projectRemoved(ProjectExplorer::Project *project); |
2436 | 47 | void updateModeState(); | 45 | void updateModeState(); |
2437 | 48 | 46 | ||
2438 | 49 | protected: | 47 | protected: |
2439 | 50 | QWidget* m_modeWidget; | 48 | QWidget* m_modeWidget; |
2440 | 51 | Core::Id previousMode; | ||
2441 | 52 | 49 | ||
2442 | 53 | private: | 50 | private: |
2443 | 54 | static UbuntuPackagingMode* m_instance; | 51 | static UbuntuPackagingMode* m_instance; |
2444 | 55 | 52 | ||
2445 | === modified file 'src/ubuntu/ubuntupackagingmodel.cpp' | |||
2446 | --- src/ubuntu/ubuntupackagingmodel.cpp 2016-07-06 09:18:16 +0000 | |||
2447 | +++ src/ubuntu/ubuntupackagingmodel.cpp 2016-08-24 15:35:12 +0000 | |||
2448 | @@ -404,7 +404,7 @@ | |||
2449 | 404 | p->activeTarget() && | 404 | p->activeTarget() && |
2450 | 405 | p->activeTarget()->kit() && | 405 | p->activeTarget()->kit() && |
2451 | 406 | ProjectExplorer::ToolChainKitInformation::toolChain(p->activeTarget()->kit()) && | 406 | ProjectExplorer::ToolChainKitInformation::toolChain(p->activeTarget()->kit()) && |
2453 | 407 | (ProjectExplorer::ToolChainKitInformation::toolChain(p->activeTarget()->kit())->type() == QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID) | 407 | (ProjectExplorer::ToolChainKitInformation::toolChain(p->activeTarget()->kit())->typeId() == Constants::UBUNTU_CLICK_TOOLCHAIN_ID |
2454 | 408 | || p->projectManager()->mimeType() == QLatin1String(QmakeProjectManager::Constants::PROFILE_MIMETYPE)); | 408 | || p->projectManager()->mimeType() == QLatin1String(QmakeProjectManager::Constants::PROFILE_MIMETYPE)); |
2455 | 409 | 409 | ||
2456 | 410 | setCanBuild(buildButtonsEnabled); | 410 | setCanBuild(buildButtonsEnabled); |
2457 | @@ -467,7 +467,7 @@ | |||
2458 | 467 | m_packageBuildSteps.append(QSharedPointer<ProjectExplorer::BuildStepList> (new ProjectExplorer::BuildStepList(b,ProjectExplorer::Constants::BUILDSTEPS_BUILD))); | 467 | m_packageBuildSteps.append(QSharedPointer<ProjectExplorer::BuildStepList> (new ProjectExplorer::BuildStepList(b,ProjectExplorer::Constants::BUILDSTEPS_BUILD))); |
2459 | 468 | 468 | ||
2460 | 469 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(b->target()->kit()); | 469 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(b->target()->kit()); |
2462 | 470 | if(tc && tc->type() == QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)){ | 470 | if(tc && tc->typeId() == Constants::UBUNTU_CLICK_TOOLCHAIN_ID){ |
2463 | 471 | ClickToolChain *cTc = static_cast<ClickToolChain *>(tc); | 471 | ClickToolChain *cTc = static_cast<ClickToolChain *>(tc); |
2464 | 472 | usedArchitectures << cTc->clickTarget().architecture; | 472 | usedArchitectures << cTc->clickTarget().architecture; |
2465 | 473 | } | 473 | } |
2466 | 474 | 474 | ||
2467 | === modified file 'src/ubuntu/ubuntuplugin.cpp' | |||
2468 | --- src/ubuntu/ubuntuplugin.cpp 2016-07-07 09:11:32 +0000 | |||
2469 | +++ src/ubuntu/ubuntuplugin.cpp 2016-08-24 15:35:12 +0000 | |||
2470 | @@ -161,8 +161,8 @@ | |||
2471 | 161 | addAutoReleasedObject(new UbuntuSettingsProjectDefaultsPage); | 161 | addAutoReleasedObject(new UbuntuSettingsProjectDefaultsPage); |
2472 | 162 | addAutoReleasedObject(new UbuntuSettingsDeviceConnectivityPage); | 162 | addAutoReleasedObject(new UbuntuSettingsDeviceConnectivityPage); |
2473 | 163 | 163 | ||
2476 | 164 | addAutoReleasedObject(new UbuntuVersionManager); | 164 | //addAutoReleasedObject(new UbuntuVersionManager); |
2477 | 165 | Core::IWizardFactory::registerFeatureProvider(new UbuntuFeatureProvider); | 165 | //Core::IWizardFactory::registerFeatureProvider(new UbuntuFeatureProvider); |
2478 | 166 | 166 | ||
2479 | 167 | // welcome page plugin | 167 | // welcome page plugin |
2480 | 168 | addAutoReleasedObject(new UbuntuWelcomePage); | 168 | addAutoReleasedObject(new UbuntuWelcomePage); |
2481 | 169 | 169 | ||
2482 | === modified file 'src/ubuntu/ubuntuplugin.h' | |||
2483 | --- src/ubuntu/ubuntuplugin.h 2016-05-30 08:28:41 +0000 | |||
2484 | +++ src/ubuntu/ubuntuplugin.h 2016-08-24 15:35:12 +0000 | |||
2485 | @@ -24,7 +24,6 @@ | |||
2486 | 24 | #include "ubuntudevicemode.h" | 24 | #include "ubuntudevicemode.h" |
2487 | 25 | #include "ubuntumenu.h" | 25 | #include "ubuntumenu.h" |
2488 | 26 | #include "ubuntuprojectmanager.h" | 26 | #include "ubuntuprojectmanager.h" |
2489 | 27 | #include "ubuntufeatureprovider.h" | ||
2490 | 28 | #include "ubuntuversionmanager.h" | 27 | #include "ubuntuversionmanager.h" |
2491 | 29 | #include "ubuntupackagingmode.h" | 28 | #include "ubuntupackagingmode.h" |
2492 | 30 | #include "ubuntusettingsdeviceconnectivitypage.h" | 29 | #include "ubuntusettingsdeviceconnectivitypage.h" |
2493 | 31 | 30 | ||
2494 | === modified file 'src/ubuntu/ubuntuproject.cpp' | |||
2495 | --- src/ubuntu/ubuntuproject.cpp 2016-05-12 06:50:19 +0000 | |||
2496 | +++ src/ubuntu/ubuntuproject.cpp 2016-08-24 15:35:12 +0000 | |||
2497 | @@ -36,7 +36,6 @@ | |||
2498 | 36 | 36 | ||
2499 | 37 | setId(Constants::UBUNTUPROJECT_ID); | 37 | setId(Constants::UBUNTUPROJECT_ID); |
2500 | 38 | setRequiredKitMatcher(UbuntuKitMatcher()); | 38 | setRequiredKitMatcher(UbuntuKitMatcher()); |
2501 | 39 | setPreferredKitMatcher(QtSupport::QtKitInformation::qtVersionMatcher(Core::FeatureSet(QtSupport::Constants::FEATURE_DESKTOP))); | ||
2502 | 40 | 39 | ||
2503 | 41 | setProjectContext(Core::Context(Constants::UBUNTUPROJECT_PROJECTCONTEXT)); | 40 | setProjectContext(Core::Context(Constants::UBUNTUPROJECT_PROJECTCONTEXT)); |
2504 | 42 | 41 | ||
2505 | @@ -46,6 +45,7 @@ | |||
2506 | 46 | m_file = QSharedPointer<UbuntuProjectFile>(new UbuntuProjectFile(this, fileName)); | 45 | m_file = QSharedPointer<UbuntuProjectFile>(new UbuntuProjectFile(this, fileName)); |
2507 | 47 | 46 | ||
2508 | 48 | Core::DocumentManager::addDocument(m_file.data(), true); | 47 | Core::DocumentManager::addDocument(m_file.data(), true); |
2509 | 48 | setDocument(m_file.data()); | ||
2510 | 49 | 49 | ||
2511 | 50 | m_rootNode = QSharedPointer<UbuntuProjectNode>(new UbuntuProjectNode(this, m_file.data())); | 50 | m_rootNode = QSharedPointer<UbuntuProjectNode>(new UbuntuProjectNode(this, m_file.data())); |
2512 | 51 | m_manager->registerProject(this); | 51 | m_manager->registerProject(this); |
2513 | @@ -82,10 +82,6 @@ | |||
2514 | 82 | return m_projectName; | 82 | return m_projectName; |
2515 | 83 | } | 83 | } |
2516 | 84 | 84 | ||
2517 | 85 | Core::IDocument *UbuntuProject::document() const { | ||
2518 | 86 | return m_file.data(); | ||
2519 | 87 | } | ||
2520 | 88 | |||
2521 | 89 | ProjectExplorer::IProjectManager *UbuntuProject::projectManager() const { | 85 | ProjectExplorer::IProjectManager *UbuntuProject::projectManager() const { |
2522 | 90 | return m_manager; | 86 | return m_manager; |
2523 | 91 | } | 87 | } |
2524 | @@ -137,7 +133,10 @@ | |||
2525 | 137 | return true; | 133 | return true; |
2526 | 138 | } | 134 | } |
2527 | 139 | 135 | ||
2529 | 140 | QString UbuntuProject::shadowBuildDirectory(const QString &proFilePath, const ProjectExplorer::Kit *k, const QString &suffix) | 136 | QString UbuntuProject::shadowBuildDirectory(const QString &proFilePath |
2530 | 137 | , const ProjectExplorer::Kit *k | ||
2531 | 138 | , const QString &suffix | ||
2532 | 139 | , const ProjectExplorer::BuildConfiguration::BuildType buildType) | ||
2533 | 141 | { | 140 | { |
2534 | 142 | if (proFilePath.isEmpty()) | 141 | if (proFilePath.isEmpty()) |
2535 | 143 | return QString(); | 142 | return QString(); |
2536 | @@ -149,7 +148,7 @@ | |||
2537 | 149 | return info.absolutePath(); | 148 | return info.absolutePath(); |
2538 | 150 | 149 | ||
2539 | 151 | const QString projectName = QFileInfo(proFilePath).completeBaseName(); | 150 | const QString projectName = QFileInfo(proFilePath).completeBaseName(); |
2541 | 152 | ProjectExplorer::ProjectMacroExpander expander(projectName, k, suffix); | 151 | ProjectExplorer::ProjectMacroExpander expander(proFilePath, projectName, k, suffix, buildType); |
2542 | 153 | QDir projectDir = QDir(projectDirectory(Utils::FileName::fromString(proFilePath)).toString()); | 152 | QDir projectDir = QDir(projectDirectory(Utils::FileName::fromString(proFilePath)).toString()); |
2543 | 154 | QString buildPath = expander.expand(Core::DocumentManager::buildDirectory()); | 153 | QString buildPath = expander.expand(Core::DocumentManager::buildDirectory()); |
2544 | 155 | return QDir::cleanPath(projectDir.absoluteFilePath(buildPath)); | 154 | return QDir::cleanPath(projectDir.absoluteFilePath(buildPath)); |
2545 | @@ -164,7 +163,7 @@ | |||
2546 | 164 | bool UbuntuKitMatcher::matches(const ProjectExplorer::Kit *k) | 163 | bool UbuntuKitMatcher::matches(const ProjectExplorer::Kit *k) |
2547 | 165 | { | 164 | { |
2548 | 166 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k); | 165 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k); |
2550 | 167 | if (tc->type() == QLatin1String(Ubuntu::Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) | 166 | if (tc->typeId() == Ubuntu::Constants::UBUNTU_CLICK_TOOLCHAIN_ID) |
2551 | 168 | return true; | 167 | return true; |
2552 | 169 | 168 | ||
2553 | 170 | return false; | 169 | return false; |
2554 | 171 | 170 | ||
2555 | === modified file 'src/ubuntu/ubuntuproject.h' | |||
2556 | --- src/ubuntu/ubuntuproject.h 2015-03-03 17:23:52 +0000 | |||
2557 | +++ src/ubuntu/ubuntuproject.h 2016-08-24 15:35:12 +0000 | |||
2558 | @@ -42,6 +42,7 @@ | |||
2559 | 42 | #include <projectexplorer/session.h> | 42 | #include <projectexplorer/session.h> |
2560 | 43 | #include <projectexplorer/runconfiguration.h> | 43 | #include <projectexplorer/runconfiguration.h> |
2561 | 44 | #include <projectexplorer/applicationlauncher.h> | 44 | #include <projectexplorer/applicationlauncher.h> |
2562 | 45 | #include <projectexplorer/buildconfiguration.h> | ||
2563 | 45 | 46 | ||
2564 | 46 | namespace Ubuntu { | 47 | namespace Ubuntu { |
2565 | 47 | namespace Internal { | 48 | namespace Internal { |
2566 | @@ -65,7 +66,6 @@ | |||
2567 | 65 | UbuntuProject(UbuntuProjectManager *manager, const QString &fileName); | 66 | UbuntuProject(UbuntuProjectManager *manager, const QString &fileName); |
2568 | 66 | 67 | ||
2569 | 67 | QString displayName() const override; | 68 | QString displayName() const override; |
2570 | 68 | Core::IDocument *document() const override; | ||
2571 | 69 | ProjectExplorer::IProjectManager *projectManager() const override; | 69 | ProjectExplorer::IProjectManager *projectManager() const override; |
2572 | 70 | 70 | ||
2573 | 71 | ProjectExplorer::ProjectNode *rootProjectNode() const override; | 71 | ProjectExplorer::ProjectNode *rootProjectNode() const override; |
2574 | @@ -88,7 +88,9 @@ | |||
2575 | 88 | bool needsConfiguration() const override; | 88 | bool needsConfiguration() const override; |
2576 | 89 | bool requiresTargetPanel() const override; | 89 | bool requiresTargetPanel() const override; |
2577 | 90 | 90 | ||
2579 | 91 | static QString shadowBuildDirectory(const QString &proFilePath, const ProjectExplorer::Kit *k, const QString &suffix = QString()); | 91 | static QString shadowBuildDirectory(const QString &proFilePath, const ProjectExplorer::Kit *k, |
2580 | 92 | const QString &suffix = QString(), | ||
2581 | 93 | const ProjectExplorer::BuildConfiguration::BuildType buildType = ProjectExplorer::BuildConfiguration::Unknown); | ||
2582 | 92 | private: | 94 | private: |
2583 | 93 | void extractProjectFileData(const QString& filename); | 95 | void extractProjectFileData(const QString& filename); |
2584 | 94 | 96 | ||
2585 | 95 | 97 | ||
2586 | === modified file 'src/ubuntu/ubuntuprojectfile.cpp' | |||
2587 | --- src/ubuntu/ubuntuprojectfile.cpp 2015-03-03 17:23:52 +0000 | |||
2588 | +++ src/ubuntu/ubuntuprojectfile.cpp 2016-08-24 15:35:12 +0000 | |||
2589 | @@ -34,14 +34,6 @@ | |||
2590 | 34 | return false; | 34 | return false; |
2591 | 35 | } | 35 | } |
2592 | 36 | 36 | ||
2593 | 37 | QString UbuntuProjectFile::defaultPath() const { | ||
2594 | 38 | return QString(); | ||
2595 | 39 | } | ||
2596 | 40 | |||
2597 | 41 | QString UbuntuProjectFile::suggestedFileName() const { | ||
2598 | 42 | return QString(); | ||
2599 | 43 | } | ||
2600 | 44 | |||
2601 | 45 | bool UbuntuProjectFile::isModified() const { | 37 | bool UbuntuProjectFile::isModified() const { |
2602 | 46 | return false; | 38 | return false; |
2603 | 47 | } | 39 | } |
2604 | 48 | 40 | ||
2605 | === modified file 'src/ubuntu/ubuntuprojectfile.h' | |||
2606 | --- src/ubuntu/ubuntuprojectfile.h 2015-03-03 17:23:52 +0000 | |||
2607 | +++ src/ubuntu/ubuntuprojectfile.h 2016-08-24 15:35:12 +0000 | |||
2608 | @@ -47,10 +47,6 @@ | |||
2609 | 47 | ~UbuntuProjectFile() {} | 47 | ~UbuntuProjectFile() {} |
2610 | 48 | 48 | ||
2611 | 49 | bool save(QString *errorString, const QString &fileName, bool autoSave) override; | 49 | bool save(QString *errorString, const QString &fileName, bool autoSave) override; |
2612 | 50 | |||
2613 | 51 | QString defaultPath() const override; | ||
2614 | 52 | QString suggestedFileName() const override; | ||
2615 | 53 | |||
2616 | 54 | bool isModified() const override; | 50 | bool isModified() const override; |
2617 | 55 | bool isSaveAsAllowed() const override; | 51 | bool isSaveAsAllowed() const override; |
2618 | 56 | 52 | ||
2619 | 57 | 53 | ||
2620 | === modified file 'src/ubuntu/ubuntuprojectnode.cpp' | |||
2621 | --- src/ubuntu/ubuntuprojectnode.cpp 2015-03-03 17:23:52 +0000 | |||
2622 | +++ src/ubuntu/ubuntuprojectnode.cpp 2016-08-24 15:35:12 +0000 | |||
2623 | @@ -87,7 +87,7 @@ | |||
2624 | 87 | if (! end) | 87 | if (! end) |
2625 | 88 | return 0; | 88 | return 0; |
2626 | 89 | 89 | ||
2628 | 90 | QString baseDir = path().toFileInfo().path(); | 90 | QString baseDir = filePath().toFileInfo().path(); |
2629 | 91 | 91 | ||
2630 | 92 | QString folderName; | 92 | QString folderName; |
2631 | 93 | for (int i = 0; i < end; ++i) { | 93 | for (int i = 0; i < end; ++i) { |
2632 | 94 | 94 | ||
2633 | === modified file 'src/ubuntu/ubuntuqmlbuildconfiguration.cpp' | |||
2634 | --- src/ubuntu/ubuntuqmlbuildconfiguration.cpp 2015-04-28 14:47:49 +0000 | |||
2635 | +++ src/ubuntu/ubuntuqmlbuildconfiguration.cpp 2016-08-24 15:35:12 +0000 | |||
2636 | @@ -11,6 +11,7 @@ | |||
2637 | 11 | #include <projectexplorer/kitinformation.h> | 11 | #include <projectexplorer/kitinformation.h> |
2638 | 12 | #include <projectexplorer/buildsteplist.h> | 12 | #include <projectexplorer/buildsteplist.h> |
2639 | 13 | #include <utils/fancylineedit.h> | 13 | #include <utils/fancylineedit.h> |
2640 | 14 | #include <utils/algorithm.h> | ||
2641 | 14 | #include <utils/mimetypes/mimedatabase.h> | 15 | #include <utils/mimetypes/mimedatabase.h> |
2642 | 15 | #include <qmlprojectmanager/qmlprojectconstants.h> | 16 | #include <qmlprojectmanager/qmlprojectconstants.h> |
2643 | 16 | 17 | ||
2644 | @@ -184,7 +185,11 @@ | |||
2645 | 184 | QList<ProjectExplorer::BuildInfo *> builds; | 185 | QList<ProjectExplorer::BuildInfo *> builds; |
2646 | 185 | 186 | ||
2647 | 186 | ProjectExplorer::BuildInfo *info = new ProjectExplorer::BuildInfo(this); | 187 | ProjectExplorer::BuildInfo *info = new ProjectExplorer::BuildInfo(this); |
2649 | 187 | info->buildDirectory = Utils::FileName::fromString(UbuntuProject::shadowBuildDirectory(projectDir,k,QStringLiteral("default"))); | 188 | info->buildDirectory = Utils::FileName::fromString(UbuntuProject::shadowBuildDirectory( |
2650 | 189 | projectDir, | ||
2651 | 190 | k, | ||
2652 | 191 | QStringLiteral("default"), | ||
2653 | 192 | ProjectExplorer::BuildConfiguration::Unknown)); | ||
2654 | 188 | info->typeName = tr("Qml"); | 193 | info->typeName = tr("Qml"); |
2655 | 189 | info->kitId = k->id(); | 194 | info->kitId = k->id(); |
2656 | 190 | info->displayName = tr("Default"); | 195 | info->displayName = tr("Default"); |
2657 | @@ -231,8 +236,9 @@ | |||
2658 | 231 | : AbstractProcessStep(bsl,bs) | 236 | : AbstractProcessStep(bsl,bs) |
2659 | 232 | {} | 237 | {} |
2660 | 233 | 238 | ||
2662 | 234 | bool UbuntuQmlUpdateTranslationTemplateStep::init() | 239 | bool UbuntuQmlUpdateTranslationTemplateStep::init(QList<const BuildStep *> &earlierSteps) |
2663 | 235 | { | 240 | { |
2664 | 241 | Q_UNUSED(earlierSteps); | ||
2665 | 236 | QString projectDir = target()->project()->projectDirectory().toString(); | 242 | QString projectDir = target()->project()->projectDirectory().toString(); |
2666 | 237 | 243 | ||
2667 | 238 | ProjectExplorer::BuildConfiguration *bc = target()->activeBuildConfiguration(); | 244 | ProjectExplorer::BuildConfiguration *bc = target()->activeBuildConfiguration(); |
2668 | @@ -269,9 +275,9 @@ | |||
2669 | 269 | : UbuntuQmlUpdateTranslationTemplateStep(bsl,bs) | 275 | : UbuntuQmlUpdateTranslationTemplateStep(bsl,bs) |
2670 | 270 | {} | 276 | {} |
2671 | 271 | 277 | ||
2673 | 272 | bool UbuntuQmlBuildTranslationStep::init() | 278 | bool UbuntuQmlBuildTranslationStep::init(QList<const BuildStep *> &earlierSteps) |
2674 | 273 | { | 279 | { |
2676 | 274 | if(!UbuntuQmlUpdateTranslationTemplateStep::init()) | 280 | if(!UbuntuQmlUpdateTranslationTemplateStep::init(earlierSteps)) |
2677 | 275 | return false; | 281 | return false; |
2678 | 276 | 282 | ||
2679 | 277 | ProjectExplorer::BuildConfiguration *bc = target()->activeBuildConfiguration(); | 283 | ProjectExplorer::BuildConfiguration *bc = target()->activeBuildConfiguration(); |
2680 | @@ -303,36 +309,35 @@ | |||
2681 | 303 | return UbuntuQmlUpdateTranslationTemplateStep::run(fi); | 309 | return UbuntuQmlUpdateTranslationTemplateStep::run(fi); |
2682 | 304 | } | 310 | } |
2683 | 305 | 311 | ||
2686 | 306 | QList<Core::Id> UbuntuQmlBuildStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const | 312 | bool UbuntuQmlBuildStepFactory::canHandle(ProjectExplorer::BuildStepList *parent, const Core::Id id) const |
2687 | 307 | { | 313 | { |
2688 | 314 | return Utils::contains(availableSteps(parent), Utils::equal(&ProjectExplorer::BuildStepInfo::id, id)); | ||
2689 | 315 | } | ||
2690 | 316 | |||
2691 | 317 | QList<ProjectExplorer::BuildStepInfo> UbuntuQmlBuildStepFactory::availableSteps(ProjectExplorer::BuildStepList *parent) const | ||
2692 | 318 | { | ||
2693 | 319 | QList<ProjectExplorer::BuildStepInfo> res; | ||
2694 | 320 | |||
2695 | 308 | if(parent->id() != ProjectExplorer::Constants::BUILDSTEPS_BUILD) | 321 | if(parent->id() != ProjectExplorer::Constants::BUILDSTEPS_BUILD) |
2697 | 309 | return QList<Core::Id>(); | 322 | return res; |
2698 | 310 | 323 | ||
2699 | 311 | UbuntuKitMatcher m; | 324 | UbuntuKitMatcher m; |
2700 | 312 | if(!m.matches(parent->target()->kit()) | 325 | if(!m.matches(parent->target()->kit()) |
2701 | 313 | || parent->target()->project()->id() != "QmlProjectManager.QmlProject") | 326 | || parent->target()->project()->id() != "QmlProjectManager.QmlProject") |
2719 | 314 | return QList<Core::Id>(); | 327 | return res; |
2720 | 315 | 328 | ||
2721 | 316 | return QList<Core::Id>()<<Constants::UBUNTU_CLICK_QML_BUILD_TRANSL_MAKESTEP<<Constants::UBUNTU_CLICK_QML_UPDATE_TRANSL_MAKESTEP; | 329 | res << ProjectExplorer::BuildStepInfo(Constants::UBUNTU_CLICK_QML_BUILD_TRANSL_MAKESTEP, |
2722 | 317 | } | 330 | tr("Build translations"), |
2723 | 318 | 331 | ProjectExplorer::BuildStepInfo::UniqueStep) | |
2724 | 319 | QString UbuntuQmlBuildStepFactory::displayNameForId(const Core::Id id) const | 332 | << ProjectExplorer::BuildStepInfo(Constants::UBUNTU_CLICK_QML_UPDATE_TRANSL_MAKESTEP, |
2725 | 320 | { | 333 | tr("Update translations template"), |
2726 | 321 | if(id == Constants::UBUNTU_CLICK_QML_BUILD_TRANSL_MAKESTEP) | 334 | ProjectExplorer::BuildStepInfo::UniqueStep); |
2727 | 322 | return tr("Build translations"); | 335 | return res; |
2711 | 323 | else if(id == Constants::UBUNTU_CLICK_QML_UPDATE_TRANSL_MAKESTEP) | ||
2712 | 324 | return tr("Update translations template"); | ||
2713 | 325 | return QString(); | ||
2714 | 326 | } | ||
2715 | 327 | |||
2716 | 328 | bool UbuntuQmlBuildStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const | ||
2717 | 329 | { | ||
2718 | 330 | return availableCreationIds(parent).contains(id); | ||
2728 | 331 | } | 336 | } |
2729 | 332 | 337 | ||
2730 | 333 | ProjectExplorer::BuildStep *UbuntuQmlBuildStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id) | 338 | ProjectExplorer::BuildStep *UbuntuQmlBuildStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id) |
2731 | 334 | { | 339 | { |
2733 | 335 | QTC_ASSERT(canCreate(parent,id),return 0); | 340 | QTC_ASSERT(canHandle(parent,id),return 0); |
2734 | 336 | 341 | ||
2735 | 337 | if(id == Constants::UBUNTU_CLICK_QML_BUILD_TRANSL_MAKESTEP) | 342 | if(id == Constants::UBUNTU_CLICK_QML_BUILD_TRANSL_MAKESTEP) |
2736 | 338 | return new UbuntuQmlBuildTranslationStep(parent); | 343 | return new UbuntuQmlBuildTranslationStep(parent); |
2737 | @@ -342,18 +347,13 @@ | |||
2738 | 342 | return nullptr; | 347 | return nullptr; |
2739 | 343 | } | 348 | } |
2740 | 344 | 349 | ||
2741 | 345 | bool UbuntuQmlBuildStepFactory::canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const | ||
2742 | 346 | { | ||
2743 | 347 | return availableCreationIds(parent).contains(ProjectExplorer::idFromMap(map)); | ||
2744 | 348 | } | ||
2745 | 349 | |||
2746 | 350 | ProjectExplorer::BuildStep *UbuntuQmlBuildStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) | 350 | ProjectExplorer::BuildStep *UbuntuQmlBuildStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) |
2747 | 351 | { | 351 | { |
2748 | 352 | QTC_ASSERT(canRestore(parent,map),return 0); | ||
2749 | 353 | |||
2750 | 354 | ProjectExplorer::AbstractProcessStep *step = 0; | 352 | ProjectExplorer::AbstractProcessStep *step = 0; |
2751 | 355 | Core::Id id = ProjectExplorer::idFromMap(map); | 353 | Core::Id id = ProjectExplorer::idFromMap(map); |
2752 | 356 | 354 | ||
2753 | 355 | QTC_ASSERT(canHandle(parent,id),return 0); | ||
2754 | 356 | |||
2755 | 357 | if(id == Constants::UBUNTU_CLICK_QML_BUILD_TRANSL_MAKESTEP) | 357 | if(id == Constants::UBUNTU_CLICK_QML_BUILD_TRANSL_MAKESTEP) |
2756 | 358 | step = new UbuntuQmlBuildTranslationStep(parent); | 358 | step = new UbuntuQmlBuildTranslationStep(parent); |
2757 | 359 | else if(id == Constants::UBUNTU_CLICK_QML_UPDATE_TRANSL_MAKESTEP) | 359 | else if(id == Constants::UBUNTU_CLICK_QML_UPDATE_TRANSL_MAKESTEP) |
2758 | @@ -369,14 +369,9 @@ | |||
2759 | 369 | return step; | 369 | return step; |
2760 | 370 | } | 370 | } |
2761 | 371 | 371 | ||
2762 | 372 | bool UbuntuQmlBuildStepFactory::canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) const | ||
2763 | 373 | { | ||
2764 | 374 | return availableCreationIds(parent).contains(product->id()); | ||
2765 | 375 | } | ||
2766 | 376 | |||
2767 | 377 | ProjectExplorer::BuildStep *UbuntuQmlBuildStepFactory::clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) | 372 | ProjectExplorer::BuildStep *UbuntuQmlBuildStepFactory::clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) |
2768 | 378 | { | 373 | { |
2770 | 379 | QTC_ASSERT(canClone(parent,product),return 0); | 374 | QTC_ASSERT(canHandle(parent,product->id()),return 0); |
2771 | 380 | 375 | ||
2772 | 381 | const Core::Id id = product->id(); | 376 | const Core::Id id = product->id(); |
2773 | 382 | if(id == Constants::UBUNTU_CLICK_QML_BUILD_TRANSL_MAKESTEP) | 377 | if(id == Constants::UBUNTU_CLICK_QML_BUILD_TRANSL_MAKESTEP) |
2774 | 383 | 378 | ||
2775 | === modified file 'src/ubuntu/ubuntuqmlbuildconfiguration.h' | |||
2776 | --- src/ubuntu/ubuntuqmlbuildconfiguration.h 2016-07-22 10:17:50 +0000 | |||
2777 | +++ src/ubuntu/ubuntuqmlbuildconfiguration.h 2016-08-24 15:35:12 +0000 | |||
2778 | @@ -57,7 +57,7 @@ | |||
2779 | 57 | UbuntuQmlUpdateTranslationTemplateStep(ProjectExplorer::BuildStepList *bsl, UbuntuQmlUpdateTranslationTemplateStep *bs); | 57 | UbuntuQmlUpdateTranslationTemplateStep(ProjectExplorer::BuildStepList *bsl, UbuntuQmlUpdateTranslationTemplateStep *bs); |
2780 | 58 | 58 | ||
2781 | 59 | // BuildStep interface | 59 | // BuildStep interface |
2783 | 60 | virtual bool init() override; | 60 | virtual bool init(QList<const BuildStep *> &earlierSteps) override; |
2784 | 61 | virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override; | 61 | virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override; |
2785 | 62 | 62 | ||
2786 | 63 | QString makeCommand(ProjectExplorer::ToolChain *tc, const Utils::Environment &env) const; | 63 | QString makeCommand(ProjectExplorer::ToolChain *tc, const Utils::Environment &env) const; |
2787 | @@ -71,7 +71,7 @@ | |||
2788 | 71 | UbuntuQmlBuildTranslationStep(ProjectExplorer::BuildStepList *bsl, UbuntuQmlBuildTranslationStep *bs); | 71 | UbuntuQmlBuildTranslationStep(ProjectExplorer::BuildStepList *bsl, UbuntuQmlBuildTranslationStep *bs); |
2789 | 72 | 72 | ||
2790 | 73 | // BuildStep interface | 73 | // BuildStep interface |
2792 | 74 | virtual bool init() override; | 74 | virtual bool init(QList<const BuildStep *> &earlierSteps) override; |
2793 | 75 | virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override; | 75 | virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override; |
2794 | 76 | void run(QFutureInterface<bool> &fi) override; | 76 | void run(QFutureInterface<bool> &fi) override; |
2795 | 77 | 77 | ||
2796 | @@ -107,14 +107,14 @@ | |||
2797 | 107 | 107 | ||
2798 | 108 | public: | 108 | public: |
2799 | 109 | // IBuildStepFactory interface | 109 | // IBuildStepFactory interface |
2803 | 110 | virtual QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const override; | 110 | virtual QList<ProjectExplorer::BuildStepInfo> availableSteps(ProjectExplorer::BuildStepList *parent) const override; |
2801 | 111 | virtual QString displayNameForId(const Core::Id id) const override; | ||
2802 | 112 | virtual bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const override; | ||
2804 | 113 | virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id) override; | 111 | virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id) override; |
2805 | 114 | virtual bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const override; | ||
2806 | 115 | virtual ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) override; | 112 | virtual ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) override; |
2807 | 116 | virtual bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) const override; | ||
2808 | 117 | virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) override; | 113 | virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) override; |
2809 | 114 | |||
2810 | 115 | private: | ||
2811 | 116 | bool canHandle(ProjectExplorer::BuildStepList *parent, const Core::Id id) const; | ||
2812 | 117 | |||
2813 | 118 | }; | 118 | }; |
2814 | 119 | 119 | ||
2815 | 120 | } // namespace Internal | 120 | } // namespace Internal |
2816 | 121 | 121 | ||
2817 | === modified file 'src/ubuntu/ubuntuqtversion.cpp' | |||
2818 | --- src/ubuntu/ubuntuqtversion.cpp 2016-03-22 13:32:33 +0000 | |||
2819 | +++ src/ubuntu/ubuntuqtversion.cpp 2016-08-24 15:35:12 +0000 | |||
2820 | @@ -2,16 +2,20 @@ | |||
2821 | 2 | #include "ubuntuconstants.h" | 2 | #include "ubuntuconstants.h" |
2822 | 3 | #include "settings.h" | 3 | #include "settings.h" |
2823 | 4 | 4 | ||
2824 | 5 | #include <ubuntu/device/container/containerdevice.h> | ||
2825 | 6 | #include <ubuntu/ubuntuclicktool.h> | ||
2826 | 5 | #include <qtsupport/qtsupportconstants.h> | 7 | #include <qtsupport/qtsupportconstants.h> |
2827 | 6 | 8 | ||
2828 | 7 | #include <QCoreApplication> | 9 | #include <QCoreApplication> |
2829 | 8 | #include <QFileInfo> | 10 | #include <QFileInfo> |
2830 | 9 | #include <QDebug> | 11 | #include <QDebug> |
2831 | 12 | #include <QDir> | ||
2832 | 10 | 13 | ||
2833 | 11 | namespace Ubuntu { | 14 | namespace Ubuntu { |
2834 | 12 | namespace Internal { | 15 | namespace Internal { |
2835 | 13 | 16 | ||
2836 | 14 | const char SCRIPT_VERSION_KEY[] = "UbuntuQtVersion.ScriptVersion"; | 17 | const char SCRIPT_VERSION_KEY[] = "UbuntuQtVersion.ScriptVersion"; |
2837 | 18 | const char CONTAINER_NAME[] = "UbuntuQtVersion.ContainerName"; | ||
2838 | 15 | 19 | ||
2839 | 16 | /*! | 20 | /*! |
2840 | 17 | * \brief MIN_SCRIPT_VERSION | 21 | * \brief MIN_SCRIPT_VERSION |
2841 | @@ -25,9 +29,10 @@ | |||
2842 | 25 | m_scriptVersion(MIN_SCRIPT_VERSION) | 29 | m_scriptVersion(MIN_SCRIPT_VERSION) |
2843 | 26 | { } | 30 | { } |
2844 | 27 | 31 | ||
2846 | 28 | UbuntuQtVersion::UbuntuQtVersion(const Utils::FileName &path, bool isAutodetected, const QString &autodetectionSource) | 32 | UbuntuQtVersion::UbuntuQtVersion(const QString &containerName, const Utils::FileName &path, bool isAutodetected, const QString &autodetectionSource) |
2847 | 29 | : BaseQtVersion(path, isAutodetected, autodetectionSource), | 33 | : BaseQtVersion(path, isAutodetected, autodetectionSource), |
2849 | 30 | m_scriptVersion(MIN_SCRIPT_VERSION) | 34 | m_scriptVersion(MIN_SCRIPT_VERSION), |
2850 | 35 | m_containerName(containerName) | ||
2851 | 31 | { | 36 | { |
2852 | 32 | setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false)); | 37 | setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false)); |
2853 | 33 | } | 38 | } |
2854 | @@ -39,12 +44,21 @@ | |||
2855 | 39 | { | 44 | { |
2856 | 40 | BaseQtVersion::fromMap(map); | 45 | BaseQtVersion::fromMap(map); |
2857 | 41 | m_scriptVersion = map.value(QLatin1String(SCRIPT_VERSION_KEY),0).toInt(); | 46 | m_scriptVersion = map.value(QLatin1String(SCRIPT_VERSION_KEY),0).toInt(); |
2858 | 47 | m_containerName = map.value(QLatin1String(CONTAINER_NAME),QString()).toString(); | ||
2859 | 48 | |||
2860 | 49 | if (m_containerName.isEmpty()) { | ||
2861 | 50 | //ok, this is a old QtVersion, we need to restore the container name from the | ||
2862 | 51 | //qmake path | ||
2863 | 52 | Utils::FileName command = this->qmakeCommand(); | ||
2864 | 53 | m_containerName = command.toFileInfo().dir().dirName(); | ||
2865 | 54 | } | ||
2866 | 42 | } | 55 | } |
2867 | 43 | 56 | ||
2868 | 44 | QVariantMap UbuntuQtVersion::toMap() const | 57 | QVariantMap UbuntuQtVersion::toMap() const |
2869 | 45 | { | 58 | { |
2870 | 46 | QVariantMap map = BaseQtVersion::toMap(); | 59 | QVariantMap map = BaseQtVersion::toMap(); |
2871 | 47 | map.insert(QLatin1String(SCRIPT_VERSION_KEY),m_scriptVersion); | 60 | map.insert(QLatin1String(SCRIPT_VERSION_KEY),m_scriptVersion); |
2872 | 61 | map.insert(QLatin1String(CONTAINER_NAME), m_containerName); | ||
2873 | 48 | return map; | 62 | return map; |
2874 | 49 | } | 63 | } |
2875 | 50 | 64 | ||
2876 | @@ -68,15 +82,23 @@ | |||
2877 | 68 | return QCoreApplication::translate("QtVersion", "Ubuntu Phone", "Qt Version is used for Ubuntu Phone development"); | 82 | return QCoreApplication::translate("QtVersion", "Ubuntu Phone", "Qt Version is used for Ubuntu Phone development"); |
2878 | 69 | } | 83 | } |
2879 | 70 | 84 | ||
2889 | 71 | QString UbuntuQtVersion::platformName() const | 85 | QSet<Core::Id> UbuntuQtVersion::targetDeviceTypes() const |
2890 | 72 | { | 86 | { |
2891 | 73 | return QLatin1String(Constants::UBUNTU_PLATFORM_NAME); | 87 | QSet<Core::Id> set{ |
2892 | 74 | } | 88 | Constants::UBUNTU_DEVICE_TYPE_ID |
2893 | 75 | 89 | }; | |
2894 | 76 | QString UbuntuQtVersion::platformDisplayName() const | 90 | |
2895 | 77 | { | 91 | auto hostAbi = ProjectExplorer::Abi::hostAbi(); |
2896 | 78 | return QLatin1String(Constants::UBUNTU_PLATFORM_NAME_TR); | 92 | for (const ProjectExplorer::Abi &abi : qtAbis()) { |
2897 | 79 | } | 93 | if (abi.architecture() == hostAbi.architecture() && |
2898 | 94 | abi.os() == hostAbi.os()) { | ||
2899 | 95 | set << ContainerDevice::createIdForContainer(m_containerName); | ||
2900 | 96 | } | ||
2901 | 97 | } | ||
2902 | 98 | |||
2903 | 99 | return set; | ||
2904 | 100 | } | ||
2905 | 101 | |||
2906 | 80 | int UbuntuQtVersion::scriptVersion() const | 102 | int UbuntuQtVersion::scriptVersion() const |
2907 | 81 | { | 103 | { |
2908 | 82 | return m_scriptVersion; | 104 | return m_scriptVersion; |
2909 | @@ -92,6 +114,11 @@ | |||
2910 | 92 | return MIN_SCRIPT_VERSION; | 114 | return MIN_SCRIPT_VERSION; |
2911 | 93 | } | 115 | } |
2912 | 94 | 116 | ||
2913 | 117 | QString UbuntuQtVersion::remoteQMakeCommand() const | ||
2914 | 118 | { | ||
2915 | 119 | return QString::fromLatin1("/usr/bin/%2").arg(qmakeCommand().fileName()); | ||
2916 | 120 | } | ||
2917 | 121 | |||
2918 | 95 | bool UbuntuQtVersion::hasQmlDump() const | 122 | bool UbuntuQtVersion::hasQmlDump() const |
2919 | 96 | { | 123 | { |
2920 | 97 | return false; | 124 | return false; |
2921 | @@ -132,10 +159,18 @@ | |||
2922 | 132 | { | 159 | { |
2923 | 133 | Q_UNUSED(evaluator); | 160 | Q_UNUSED(evaluator); |
2924 | 134 | //we only care about our qmakes | 161 | //we only care about our qmakes |
2929 | 135 | if(!qmakePath.toFileInfo().absolutePath().contains(Settings::settingsPath().toString())) | 162 | QFileInfo qmakeInfo = qmakePath.toFileInfo(); |
2930 | 136 | return 0; | 163 | if(!qmakeInfo.absolutePath().contains(Settings::settingsPath().toString())) |
2931 | 137 | 164 | return 0; | |
2932 | 138 | return new UbuntuQtVersion(qmakePath,isAutoDetected,autoDetectionSource); | 165 | |
2933 | 166 | if(!qmakeInfo.isSymLink() || qmakeInfo.symLinkTarget() != Constants::UBUNTU_CLICK_TARGET_WRAPPER) | ||
2934 | 167 | return 0; | ||
2935 | 168 | |||
2936 | 169 | QString containerName = qmakePath.toFileInfo().dir().dirName(); | ||
2937 | 170 | if (!UbuntuClickTool::targetExists(containerName)) | ||
2938 | 171 | return 0; | ||
2939 | 172 | |||
2940 | 173 | return new UbuntuQtVersion(containerName, qmakePath,isAutoDetected,autoDetectionSource); | ||
2941 | 139 | } | 174 | } |
2942 | 140 | 175 | ||
2943 | 141 | } // namespace Internal | 176 | } // namespace Internal |
2944 | 142 | 177 | ||
2945 | === modified file 'src/ubuntu/ubuntuqtversion.h' | |||
2946 | --- src/ubuntu/ubuntuqtversion.h 2016-03-22 13:32:33 +0000 | |||
2947 | +++ src/ubuntu/ubuntuqtversion.h 2016-08-24 15:35:12 +0000 | |||
2948 | @@ -11,7 +11,7 @@ | |||
2949 | 11 | { | 11 | { |
2950 | 12 | public: | 12 | public: |
2951 | 13 | UbuntuQtVersion(); | 13 | UbuntuQtVersion(); |
2953 | 14 | UbuntuQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString()); | 14 | UbuntuQtVersion(const QString &containerName, const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString()); |
2954 | 15 | ~UbuntuQtVersion() override; | 15 | ~UbuntuQtVersion() override; |
2955 | 16 | 16 | ||
2956 | 17 | // BaseQtVersion interface | 17 | // BaseQtVersion interface |
2957 | @@ -26,14 +26,15 @@ | |||
2958 | 26 | 26 | ||
2959 | 27 | QString description() const override; | 27 | QString description() const override; |
2960 | 28 | 28 | ||
2963 | 29 | QString platformName() const override; | 29 | virtual QSet<Core::Id> targetDeviceTypes() const override; |
2962 | 30 | QString platformDisplayName() const override; | ||
2964 | 31 | 30 | ||
2965 | 32 | int scriptVersion() const; | 31 | int scriptVersion() const; |
2966 | 33 | void setScriptVersion(int scriptVersion); | 32 | void setScriptVersion(int scriptVersion); |
2967 | 34 | 33 | ||
2968 | 35 | static int minimalScriptVersion (); | 34 | static int minimalScriptVersion (); |
2969 | 36 | 35 | ||
2970 | 36 | QString remoteQMakeCommand () const; | ||
2971 | 37 | |||
2972 | 37 | // BaseQtVersion interface | 38 | // BaseQtVersion interface |
2973 | 38 | virtual bool hasQmlDump() const override; | 39 | virtual bool hasQmlDump() const override; |
2974 | 39 | virtual bool hasQmlDumpWithRelocatableFlag() const override; | 40 | virtual bool hasQmlDumpWithRelocatableFlag() const override; |
2975 | @@ -41,6 +42,7 @@ | |||
2976 | 41 | 42 | ||
2977 | 42 | private: | 43 | private: |
2978 | 43 | int m_scriptVersion; | 44 | int m_scriptVersion; |
2979 | 45 | QString m_containerName; | ||
2980 | 44 | }; | 46 | }; |
2981 | 45 | 47 | ||
2982 | 46 | class UbuntuQtVersionFactory : public QtSupport::QtVersionFactory | 48 | class UbuntuQtVersionFactory : public QtSupport::QtVersionFactory |
2983 | 47 | 49 | ||
2984 | === modified file 'src/ubuntu/ubuntuwelcomemode.cpp' | |||
2985 | --- src/ubuntu/ubuntuwelcomemode.cpp 2016-04-19 12:09:54 +0000 | |||
2986 | +++ src/ubuntu/ubuntuwelcomemode.cpp 2016-08-24 15:35:12 +0000 | |||
2987 | @@ -24,6 +24,7 @@ | |||
2988 | 24 | #include <QQmlContext> | 24 | #include <QQmlContext> |
2989 | 25 | 25 | ||
2990 | 26 | #include <utils/fileutils.h> | 26 | #include <utils/fileutils.h> |
2991 | 27 | #include <utils/algorithm.h> | ||
2992 | 27 | #include <coreplugin/iwizardfactory.h> | 28 | #include <coreplugin/iwizardfactory.h> |
2993 | 28 | #include <projectexplorer/projectexplorer.h> | 29 | #include <projectexplorer/projectexplorer.h> |
2994 | 29 | 30 | ||
2995 | @@ -69,7 +70,10 @@ | |||
2996 | 69 | 70 | ||
2997 | 70 | void UbuntuWelcomePage::newProject() | 71 | void UbuntuWelcomePage::newProject() |
2998 | 71 | { | 72 | { |
3000 | 72 | Core::ICore::showNewItemDialog(tr("New Project"), Core::IWizardFactory::wizardFactoriesOfKind(Core::IWizardFactory::ProjectWizard)); | 73 | Core::ICore::showNewItemDialog(tr("New Project"), Utils::filtered(Core::IWizardFactory::allWizardFactories(), |
3001 | 74 | [](Core::IWizardFactory *f) { | ||
3002 | 75 | return f->kind() == Core::IWizardFactory::ProjectWizard; | ||
3003 | 76 | })); | ||
3004 | 73 | } | 77 | } |
3005 | 74 | 78 | ||
3006 | 75 | void UbuntuWelcomePage::openProject() | 79 | void UbuntuWelcomePage::openProject() |
3007 | 76 | 80 | ||
3008 | === modified file 'src/ubuntu/wizards/createtargetwizard.cpp' | |||
3009 | --- src/ubuntu/wizards/createtargetwizard.cpp 2016-07-12 08:47:56 +0000 | |||
3010 | +++ src/ubuntu/wizards/createtargetwizard.cpp 2016-08-24 15:35:12 +0000 | |||
3011 | @@ -364,7 +364,7 @@ | |||
3012 | 364 | return true; | 364 | return true; |
3013 | 365 | }); | 365 | }); |
3014 | 366 | ui->lineEditName->setPlaceholderText(tr("Please select a name")); | 366 | ui->lineEditName->setPlaceholderText(tr("Please select a name")); |
3016 | 367 | ui->lineEditName->triggerChanged(); | 367 | ui->lineEditName->validate(); |
3017 | 368 | 368 | ||
3018 | 369 | setTitle(tr("Please type a name:")); | 369 | setTitle(tr("Please type a name:")); |
3019 | 370 | setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Name")); | 370 | setProperty(Utils::SHORT_TITLE_PROPERTY, tr("Name")); |
3020 | 371 | 371 | ||
3021 | === modified file 'src/ubuntu/wizards/ubuntufatpackagingwizard.cpp' | |||
3022 | --- src/ubuntu/wizards/ubuntufatpackagingwizard.cpp 2016-07-06 09:18:16 +0000 | |||
3023 | +++ src/ubuntu/wizards/ubuntufatpackagingwizard.cpp 2016-08-24 15:35:12 +0000 | |||
3024 | @@ -231,7 +231,7 @@ | |||
3025 | 231 | QString fw; | 231 | QString fw; |
3026 | 232 | foreach (ProjectExplorer::BuildConfiguration *conf, selectedSuspects()) { | 232 | foreach (ProjectExplorer::BuildConfiguration *conf, selectedSuspects()) { |
3027 | 233 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(conf->target()->kit()); | 233 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(conf->target()->kit()); |
3029 | 234 | if (tc && tc->type() == QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) { | 234 | if (tc && tc->typeId() == Constants::UBUNTU_CLICK_TOOLCHAIN_ID) { |
3030 | 235 | ClickToolChain *cTc = static_cast<ClickToolChain *>(tc); | 235 | ClickToolChain *cTc = static_cast<ClickToolChain *>(tc); |
3031 | 236 | if (fw.isEmpty()) | 236 | if (fw.isEmpty()) |
3032 | 237 | fw = cTc->clickTarget().framework; | 237 | fw = cTc->clickTarget().framework; |
3033 | 238 | 238 | ||
3034 | === modified file 'src/ubuntu/wizards/ubuntufirstrunwizard.cpp' | |||
3035 | --- src/ubuntu/wizards/ubuntufirstrunwizard.cpp 2016-05-17 16:33:36 +0000 | |||
3036 | +++ src/ubuntu/wizards/ubuntufirstrunwizard.cpp 2016-08-24 15:35:12 +0000 | |||
3037 | @@ -135,7 +135,7 @@ | |||
3038 | 135 | if (!tc || !QtSupport::QtKitInformation::qtVersion(curr)) | 135 | if (!tc || !QtSupport::QtKitInformation::qtVersion(curr)) |
3039 | 136 | continue; | 136 | continue; |
3040 | 137 | 137 | ||
3042 | 138 | if (tc->type() == QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) { | 138 | if (tc->typeId() == Constants::UBUNTU_CLICK_TOOLCHAIN_ID) { |
3043 | 139 | found = true; | 139 | found = true; |
3044 | 140 | 140 | ||
3045 | 141 | QTreeWidgetItem* kitItem = new QTreeWidgetItem; | 141 | QTreeWidgetItem* kitItem = new QTreeWidgetItem; |
3046 | 142 | 142 | ||
3047 | === modified file 'src/ubuntu/wizards/ubuntuprojectapplicationwizard.cpp' | |||
3048 | --- src/ubuntu/wizards/ubuntuprojectapplicationwizard.cpp 2016-05-12 06:50:19 +0000 | |||
3049 | +++ src/ubuntu/wizards/ubuntuprojectapplicationwizard.cpp 2016-08-24 15:35:12 +0000 | |||
3050 | @@ -33,6 +33,7 @@ | |||
3051 | 33 | #include <extensionsystem/pluginmanager.h> | 33 | #include <extensionsystem/pluginmanager.h> |
3052 | 34 | #include <cmakeprojectmanager/cmakekitinformation.h> | 34 | #include <cmakeprojectmanager/cmakekitinformation.h> |
3053 | 35 | #include <cmakeprojectmanager/cmaketool.h> | 35 | #include <cmakeprojectmanager/cmaketool.h> |
3054 | 36 | #include <coreplugin/id.h> | ||
3055 | 36 | 37 | ||
3056 | 37 | #include <projectexplorer/kitinformation.h> | 38 | #include <projectexplorer/kitinformation.h> |
3057 | 38 | #include <projectexplorer/toolchain.h> | 39 | #include <projectexplorer/toolchain.h> |
3058 | @@ -141,14 +142,16 @@ | |||
3059 | 141 | } | 142 | } |
3060 | 142 | 143 | ||
3061 | 143 | 144 | ||
3063 | 144 | Core::FeatureSet UbuntuProjectApplicationWizard::requiredFeatures() const | 145 | QSet<Core::Id> UbuntuProjectApplicationWizard::requiredFeatures() const |
3064 | 145 | { | 146 | { |
3065 | 146 | #ifdef Q_PROCESSOR_ARM | 147 | #ifdef Q_PROCESSOR_ARM |
3066 | 147 | return CustomProjectWizard::requiredFeatures(); | 148 | return CustomProjectWizard::requiredFeatures(); |
3067 | 148 | #else | 149 | #else |
3071 | 149 | return CustomProjectWizard::requiredFeatures() | 150 | QSet<Core::Id> features = CustomProjectWizard::requiredFeatures(); |
3072 | 150 | | Core::Feature(QtSupport::Constants::FEATURE_QMLPROJECT) | 151 | features << QtSupport::Constants::FEATURE_QMLPROJECT |
3073 | 151 | | Core::Feature::versionedFeature(QtSupport::Constants::FEATURE_QT_QUICK_PREFIX, 2); | 152 | << Core::Id::versionedId(QtSupport::Constants::FEATURE_QT_QUICK_PREFIX, 2); |
3074 | 153 | |||
3075 | 154 | return features; | ||
3076 | 152 | #endif | 155 | #endif |
3077 | 153 | } | 156 | } |
3078 | 154 | 157 | ||
3079 | @@ -220,7 +223,7 @@ | |||
3080 | 220 | bool found = false; | 223 | bool found = false; |
3081 | 221 | foreach(ProjectExplorer::Kit *curr, allKits) { | 224 | foreach(ProjectExplorer::Kit *curr, allKits) { |
3082 | 222 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(curr); | 225 | ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(curr); |
3084 | 223 | if (tc->type() == QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID)) { | 226 | if (tc->typeId() == Constants::UBUNTU_CLICK_TOOLCHAIN_ID) { |
3085 | 224 | found = true; | 227 | found = true; |
3086 | 225 | break; | 228 | break; |
3087 | 226 | } | 229 | } |
3088 | @@ -279,7 +282,7 @@ | |||
3089 | 279 | #endif | 282 | #endif |
3090 | 280 | //this is just a fallback for now to remove all ubuntu kits until cross compiling is sorted out | 283 | //this is just a fallback for now to remove all ubuntu kits until cross compiling is sorted out |
3091 | 281 | //it should not be hit at all but i keep it there just to be safe | 284 | //it should not be hit at all but i keep it there just to be safe |
3093 | 282 | m_targetSetupPage->setRequiredKitMatcher(QtSupport::QtKitInformation::platformMatcher(QLatin1String(QtSupport::Constants::DESKTOP_PLATFORM))); | 285 | m_targetSetupPage->setRequiredKitMatcher(QtSupport::QtKitInformation::platformMatcher(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE)); |
3094 | 283 | break; | 286 | break; |
3095 | 284 | } | 287 | } |
3096 | 285 | case UbuntuProjectApplicationWizard::QMakeProject: | 288 | case UbuntuProjectApplicationWizard::QMakeProject: |
3097 | 286 | 289 | ||
3098 | === modified file 'src/ubuntu/wizards/ubuntuprojectapplicationwizard.h' | |||
3099 | --- src/ubuntu/wizards/ubuntuprojectapplicationwizard.h 2015-06-11 14:03:50 +0000 | |||
3100 | +++ src/ubuntu/wizards/ubuntuprojectapplicationwizard.h 2016-08-24 15:35:12 +0000 | |||
3101 | @@ -58,7 +58,7 @@ | |||
3102 | 58 | bool postGenerateFiles(const QWizard *, const Core::GeneratedFiles &l, QString *errorMessage) const override; | 58 | bool postGenerateFiles(const QWizard *, const Core::GeneratedFiles &l, QString *errorMessage) const override; |
3103 | 59 | 59 | ||
3104 | 60 | private: | 60 | private: |
3106 | 61 | Core::FeatureSet requiredFeatures() const; | 61 | QSet<Core::Id> requiredFeatures() const; |
3107 | 62 | ProjectType m_type; | 62 | ProjectType m_type; |
3108 | 63 | }; | 63 | }; |
3109 | 64 | 64 | ||
3110 | 65 | 65 | ||
3111 | === modified file 'src/ubuntu/wizards/ubuntuprojectmigrationwizard.cpp' | |||
3112 | --- src/ubuntu/wizards/ubuntuprojectmigrationwizard.cpp 2015-04-28 14:47:49 +0000 | |||
3113 | +++ src/ubuntu/wizards/ubuntuprojectmigrationwizard.cpp 2016-08-24 15:35:12 +0000 | |||
3114 | @@ -135,7 +135,7 @@ | |||
3115 | 135 | { | 135 | { |
3116 | 136 | UbuntuProjectMigrationWizard wiz(project,parent); | 136 | UbuntuProjectMigrationWizard wiz(project,parent); |
3117 | 137 | if(wiz.exec() == QDialog::Accepted) { | 137 | if(wiz.exec() == QDialog::Accepted) { |
3119 | 138 | bool multiTargetProject = project->rootQmakeProjectNode()->projectType() == QmakeProjectManager::SubDirsTemplate; | 138 | bool multiTargetProject = project->rootProjectNode()->projectType() == QmakeProjectManager::SubDirsTemplate; |
3120 | 139 | 139 | ||
3121 | 140 | 140 | ||
3122 | 141 | QMap<QString,QString> base_replacements; | 141 | QMap<QString,QString> base_replacements; |
3123 | @@ -168,7 +168,7 @@ | |||
3124 | 168 | bool canRead = true; | 168 | bool canRead = true; |
3125 | 169 | //setup the file reader correctly | 169 | //setup the file reader correctly |
3126 | 170 | 170 | ||
3128 | 171 | if (ProFile *pro = reader->parsedProFile(node->path().toString())) { | 171 | if (ProFile *pro = reader->parsedProFile(node->filePath().toString())) { |
3129 | 172 | if(!reader->accept(pro, QMakeEvaluator::LoadAll)) { | 172 | if(!reader->accept(pro, QMakeEvaluator::LoadAll)) { |
3130 | 173 | canRead = false; | 173 | canRead = false; |
3131 | 174 | } | 174 | } |
3132 | @@ -179,7 +179,7 @@ | |||
3133 | 179 | 179 | ||
3134 | 180 | 180 | ||
3135 | 181 | if(!canRead) { | 181 | if(!canRead) { |
3137 | 182 | printToOutputPane(tr("Can not parse %1, skipping migration.").arg(node->path().toString())); | 182 | printToOutputPane(tr("Can not parse %1, skipping migration.").arg(node->filePath().toString())); |
3138 | 183 | continue; | 183 | continue; |
3139 | 184 | } | 184 | } |
3140 | 185 | 185 | ||
3141 | @@ -308,7 +308,7 @@ | |||
3142 | 308 | //now add required files | 308 | //now add required files |
3143 | 309 | if(projectType == QmakeProjectManager::ApplicationTemplate) { | 309 | if(projectType == QmakeProjectManager::ApplicationTemplate) { |
3144 | 310 | 310 | ||
3146 | 311 | QFileInfo proFilePath(node->path().toString()); | 311 | QFileInfo proFilePath(node->filePath().toFileInfo()); |
3147 | 312 | 312 | ||
3148 | 313 | QmakeProjectManager::TargetInformation targetInfo = node->targetInformation(); | 313 | QmakeProjectManager::TargetInformation targetInfo = node->targetInformation(); |
3149 | 314 | if(hookTargets.contains(targetInfo.target)) { | 314 | if(hookTargets.contains(targetInfo.target)) { |
3150 | @@ -441,7 +441,7 @@ | |||
3151 | 441 | manifestFile.write(doc.toJson()); | 441 | manifestFile.write(doc.toJson()); |
3152 | 442 | manifestFile.close(); | 442 | manifestFile.close(); |
3153 | 443 | 443 | ||
3155 | 444 | project->rootQmakeProjectNode()->addSubProjects(QStringList()<<QString::fromLatin1("%1/%2").arg(project->projectDirectory().toString()).arg(QStringLiteral("/manifest.pro"))); | 444 | project->rootProjectNode()->addSubProjects(QStringList()<<QString::fromLatin1("%1/%2").arg(project->projectDirectory().toString()).arg(QStringLiteral("/manifest.pro"))); |
3156 | 445 | } | 445 | } |
3157 | 446 | } | 446 | } |
3158 | 447 | } | 447 | } |