Merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/override-and-debug into lp:qtcreator-plugin-ubuntu

Proposed by Benjamin Zeller on 2016-07-22
Status: Merged
Approved by: Zoltan Balogh on 2016-07-22
Approved revision: 466
Merged at revision: 462
Proposed branch: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/override-and-debug
Merge into: lp:qtcreator-plugin-ubuntu
Prerequisite: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/more-image-info
Diff against target: 390 lines (+78/-61)
18 files modified
share/qtcreator/ubuntu/qml/DevicesPage/DevicePage.qml (+4/-1)
src/ubuntu/device/container/ubuntulocalrunconfiguration.cpp (+16/-0)
src/ubuntu/device/container/ubuntulocalrunconfiguration.h (+2/-4)
src/ubuntu/device/remote/ubuntudevicesignaloperation.h (+4/-4)
src/ubuntu/device/remote/ubuntudirectuploadstep.h (+1/-1)
src/ubuntu/ubuntuabstractguieditor.h (+5/-5)
src/ubuntu/ubuntuabstractguieditordocument.h (+1/-1)
src/ubuntu/ubuntuapparmoreditor.h (+3/-3)
src/ubuntu/ubuntudevicesmodel.h (+5/-5)
src/ubuntu/ubuntueditorfactory.h (+2/-2)
src/ubuntu/ubuntufixmanifeststep.h (+3/-3)
src/ubuntu/ubuntumanifesteditor.h (+1/-1)
src/ubuntu/ubuntumanifesteditorwidget.h (+3/-3)
src/ubuntu/ubuntupackageoutputparser.h (+7/-7)
src/ubuntu/ubuntuqmlbuildconfiguration.h (+5/-5)
src/ubuntu/ubuntuvalidationresultmodel.h (+7/-7)
src/ubuntu/ubuntuwelcomemode.h (+5/-5)
src/ubuntu/wizards/ubuntuprojectmigrationwizard.h (+4/-4)
To merge this branch: bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/override-and-debug
Reviewer Review Type Date Requested Status
Zoltan Balogh (community) 2016-07-22 Approve on 2016-07-22
ubuntu-sdk-build-bot continuous-integration Needs Fixing on 2016-07-22
Review via email: mp+300862@code.launchpad.net

Commit message

- Add some descriptive text when there is no framework detected for a device
- Mark all virtuals that override with the override keyword
- Fix local debugging by passing the directory where the ld loader is located

Description of the change

- Add some descriptive text when there is no framework detected for a device
- Mark all virtuals that override with the override keyword
- Fix local debugging by passing the directory where the ld loader is located

To post a comment you must log in.
review: Needs Fixing (continuous-integration)
Zoltan Balogh (bzoltan) wrote :

OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'share/qtcreator/ubuntu/qml/DevicesPage/DevicePage.qml'
2--- share/qtcreator/ubuntu/qml/DevicesPage/DevicePage.qml 2015-11-24 11:14:08 +0000
3+++ share/qtcreator/ubuntu/qml/DevicesPage/DevicePage.qml 2016-07-22 10:21:14 +0000
4@@ -372,8 +372,11 @@
5 visible: machineType === DeviceMachineType.Emulator
6 }
7 ListItem.SingleValue {
8+ property string connTxt: machineType == DeviceMachineType.Emulator ?
9+ i18n.tr("Please start the emulator to detect the framework version") :
10+ i18n.tr("Please attach the device to detect the framework version")
11 text: i18n.tr("Framework version")
12- value: frameworkVersion
13+ value: frameworkVersion.length === 0 ? connTxt : frameworkVersion
14 }
15 ListItem.Standard {
16 //show this listitem only when device is not connected
17
18=== modified file 'src/ubuntu/device/container/ubuntulocalrunconfiguration.cpp'
19--- src/ubuntu/device/container/ubuntulocalrunconfiguration.cpp 2016-05-31 08:21:29 +0000
20+++ src/ubuntu/device/container/ubuntulocalrunconfiguration.cpp 2016-07-22 10:21:14 +0000
21@@ -24,6 +24,7 @@
22 #include <ubuntu/ubuntucmakecache.h>
23 #include <ubuntu/ubuntuprojecthelper.h>
24 #include <ubuntu/ubuntuclicktool.h>
25+#include <ubuntu/clicktoolchain.h>
26
27 #include <qtsupport/baseqtversion.h>
28 #include <qtsupport/qtkitinformation.h>
29@@ -621,6 +622,21 @@
30 QStringList UbuntuLocalRunConfiguration::soLibSearchPaths() const
31 {
32 QStringList paths;
33+
34+ //lets tell GDB explicitely WHERE to look for debug syms
35+ //otherwise it might try to resolve some symlinks that are broken from the hosts point of view
36+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
37+ ClickToolChain *uTc = nullptr;
38+
39+ if (tc && tc->type() == QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID))
40+ uTc = static_cast<ClickToolChain *>(tc);
41+
42+ if (uTc) {
43+ paths << QString::fromLatin1("%1/lib/%2")
44+ .arg(UbuntuClickTool::targetBasePath(uTc->clickTarget()))
45+ .arg(uTc->gnutriplet());
46+ }
47+
48 CMakeProjectManager::CMakeProject *cmakeProj
49 = qobject_cast<CMakeProjectManager::CMakeProject *>(target()->project());
50
51
52=== modified file 'src/ubuntu/device/container/ubuntulocalrunconfiguration.h'
53--- src/ubuntu/device/container/ubuntulocalrunconfiguration.h 2016-05-23 07:26:49 +0000
54+++ src/ubuntu/device/container/ubuntulocalrunconfiguration.h 2016-07-22 10:21:14 +0000
55@@ -58,16 +58,14 @@
56 bool aboutToStart (QString *errorMessage);
57
58 QString appId() const;
59+ void addToBaseEnvironment(Utils::Environment &env) const;
60
61 // AbstractRemoteLinuxRunConfiguration interface
62 virtual QString localExecutableFilePath() const override;
63 virtual QString remoteExecutableFilePath() const override;
64 virtual QStringList arguments() const override;
65 virtual Utils::Environment environment() const override;
66- virtual QString workingDirectory() const;
67-
68- // LocalApplicationRunConfiguration interface
69- virtual void addToBaseEnvironment(Utils::Environment &env) const;
70+ virtual QString workingDirectory() const override;
71
72 // RunConfiguration interface
73 virtual bool isConfigured () const override;
74
75=== modified file 'src/ubuntu/device/remote/ubuntudevicesignaloperation.h'
76--- src/ubuntu/device/remote/ubuntudevicesignaloperation.h 2016-03-29 09:41:07 +0000
77+++ src/ubuntu/device/remote/ubuntudevicesignaloperation.h 2016-07-22 10:21:14 +0000
78@@ -17,10 +17,10 @@
79 typedef QSharedPointer<UbuntuDeviceSignalOperation> Ptr;
80
81 // DeviceProcessSignalOperation interface
82- virtual void killProcess(int pid);
83- virtual void killProcess(const QString &filePath);
84- virtual void interruptProcess(int pid);
85- virtual void interruptProcess(const QString &filePath);
86+ virtual void killProcess(int pid) override;
87+ virtual void killProcess(const QString &filePath) override;
88+ virtual void interruptProcess(int pid) override;
89+ virtual void interruptProcess(const QString &filePath) override;
90
91 private:
92 void sendSignal (int pid, int signal);
93
94=== modified file 'src/ubuntu/device/remote/ubuntudirectuploadstep.h'
95--- src/ubuntu/device/remote/ubuntudirectuploadstep.h 2016-03-29 10:39:39 +0000
96+++ src/ubuntu/device/remote/ubuntudirectuploadstep.h 2016-07-22 10:21:14 +0000
97@@ -23,7 +23,7 @@
98 // BuildStep interface
99 virtual void run(QFutureInterface<bool> &fi) override;
100
101- ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
102+ ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
103 bool initInternal(QString *error = 0) override;
104
105 RemoteLinux::AbstractRemoteLinuxDeployService *deployService() const override;
106
107=== modified file 'src/ubuntu/ubuntuabstractguieditor.h'
108--- src/ubuntu/ubuntuabstractguieditor.h 2015-06-11 14:03:50 +0000
109+++ src/ubuntu/ubuntuabstractguieditor.h 2016-07-22 10:21:14 +0000
110@@ -36,14 +36,14 @@
111 public:
112 UbuntuAbstractGuiEditor(const Core::Context &context);
113
114- QWidget *toolBar();
115+ QWidget *toolBar() override;
116 UbuntuAbstractGuiEditorWidget *editorWidget() const;
117- Core::IDocument *document();
118+ Core::IDocument *document() override;
119 TextEditor::TextEditorWidget *textEditor() const;
120
121- int currentLine() const;
122- int currentColumn() const;
123- void gotoLine(int line, int column = 0) { textEditor()->gotoLine(line, column); }
124+ int currentLine() const override;
125+ int currentColumn() const override;
126+ void gotoLine(int line, int column = 0, bool centerLine = true) override { textEditor()->gotoLine(line, column, centerLine); }
127
128 protected:
129 virtual UbuntuAbstractGuiEditorWidget * createGuiEditor () = 0;
130
131=== modified file 'src/ubuntu/ubuntuabstractguieditordocument.h'
132--- src/ubuntu/ubuntuabstractguieditordocument.h 2015-03-06 15:02:08 +0000
133+++ src/ubuntu/ubuntuabstractguieditordocument.h 2016-07-22 10:21:14 +0000
134@@ -32,7 +32,7 @@
135 {
136 public:
137 UbuntuAbstractGuiEditorDocument(const QString &mimeType, UbuntuAbstractGuiEditorWidget *editorWidget);
138- bool save(QString *errorString, const QString &fileName = QString(), bool autoSave = false);
139+ bool save(QString *errorString, const QString &fileName = QString(), bool autoSave = false) override;
140
141 QString defaultPath() const override;
142 QString suggestedFileName() const override;
143
144=== modified file 'src/ubuntu/ubuntuapparmoreditor.h'
145--- src/ubuntu/ubuntuapparmoreditor.h 2015-06-11 14:03:50 +0000
146+++ src/ubuntu/ubuntuapparmoreditor.h 2016-07-22 10:21:14 +0000
147@@ -61,10 +61,10 @@
148
149 protected:
150 virtual void updateAfterFileLoad() override;
151- virtual bool syncToWidgets();
152+ virtual bool syncToWidgets() override;
153 bool syncToWidgets(UbuntuClickManifest *source);
154- virtual void syncToSource();
155- virtual QWidget *createMainWidget();
156+ virtual void syncToSource() override;
157+ virtual QWidget *createMainWidget() override;
158
159 protected slots:
160 void on_pushButton_addpolicy_clicked();
161
162=== modified file 'src/ubuntu/ubuntudevicesmodel.h'
163--- src/ubuntu/ubuntudevicesmodel.h 2016-03-29 09:41:07 +0000
164+++ src/ubuntu/ubuntudevicesmodel.h 2016-07-22 10:21:14 +0000
165@@ -93,11 +93,11 @@
166 UbuntuDevice::ConstPtr device ( const int index );
167
168 // QAbstractItemModel interface
169- virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
170- virtual bool setData(const QModelIndex &index, const QVariant &value, int role);
171- virtual QVariant data(const QModelIndex &index, int role) const;
172- virtual QHash<int, QByteArray> roleNames() const;
173- virtual Qt::ItemFlags flags(const QModelIndex &index) const;
174+ virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
175+ virtual bool setData(const QModelIndex &index, const QVariant &value, int role) override;
176+ virtual QVariant data(const QModelIndex &index, int role) const override;
177+ virtual QHash<int, QByteArray> roleNames() const override;
178+ virtual Qt::ItemFlags flags(const QModelIndex &index) const override;
179
180 bool cancellable() const;
181 QString state() const;
182
183=== modified file 'src/ubuntu/ubuntueditorfactory.h'
184--- src/ubuntu/ubuntueditorfactory.h 2014-08-18 12:29:43 +0000
185+++ src/ubuntu/ubuntueditorfactory.h 2016-07-22 10:21:14 +0000
186@@ -11,7 +11,7 @@
187 Q_OBJECT
188 public:
189 explicit UbuntuManifestEditorFactory();
190- Core::IEditor *createEditor();
191+ Core::IEditor *createEditor() override;
192 };
193
194 class UbuntuApparmorEditorFactory : public Core::IEditorFactory
195@@ -19,7 +19,7 @@
196 Q_OBJECT
197 public:
198 explicit UbuntuApparmorEditorFactory();
199- Core::IEditor *createEditor();
200+ Core::IEditor *createEditor() override;
201 };
202
203 } // namespace Internal
204
205=== modified file 'src/ubuntu/ubuntufixmanifeststep.h'
206--- src/ubuntu/ubuntufixmanifeststep.h 2015-02-13 12:04:38 +0000
207+++ src/ubuntu/ubuntufixmanifeststep.h 2016-07-22 10:21:14 +0000
208@@ -18,9 +18,9 @@
209 void setPackageDir(const QString &packageDir);
210
211 // BuildStep interface
212- virtual bool init();
213- virtual void run(QFutureInterface<bool> &fi);
214- virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
215+ virtual bool init() override;
216+ virtual void run(QFutureInterface<bool> &fi) override;
217+ virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
218
219 private:
220 QString m_packageDir;
221
222=== modified file 'src/ubuntu/ubuntumanifesteditor.h'
223--- src/ubuntu/ubuntumanifesteditor.h 2014-08-19 06:15:32 +0000
224+++ src/ubuntu/ubuntumanifesteditor.h 2016-07-22 10:21:14 +0000
225@@ -37,7 +37,7 @@
226
227 // UbuntuAbstractGuiEditor interface
228 protected:
229- virtual UbuntuAbstractGuiEditorWidget *createGuiEditor();
230+ virtual UbuntuAbstractGuiEditorWidget *createGuiEditor() override;
231
232 private:
233 UbuntuManifestEditorWidget *m_editorWidget;
234
235=== modified file 'src/ubuntu/ubuntumanifesteditorwidget.h'
236--- src/ubuntu/ubuntumanifesteditorwidget.h 2015-06-11 14:03:50 +0000
237+++ src/ubuntu/ubuntumanifesteditorwidget.h 2016-07-22 10:21:14 +0000
238@@ -49,10 +49,10 @@
239 protected:
240 virtual void updateAfterFileLoad() override;
241 virtual void aboutToOpen(const QString &fileName, const QString &realFileName) override;
242- bool syncToWidgets ();
243+ bool syncToWidgets () override;
244 bool syncToWidgets (UbuntuClickManifest *source);
245- void syncToSource ();
246- QWidget *createMainWidget();
247+ void syncToSource () override;
248+ QWidget *createMainWidget() override;
249 void addMissingFieldsToManifest(QString fileName);
250
251 protected slots:
252
253=== modified file 'src/ubuntu/ubuntupackageoutputparser.h'
254--- src/ubuntu/ubuntupackageoutputparser.h 2015-07-08 15:43:11 +0000
255+++ src/ubuntu/ubuntupackageoutputparser.h 2016-07-22 10:21:14 +0000
256@@ -16,9 +16,9 @@
257
258 public:
259 // IOutputParser interface
260- virtual void stdOutput(const QString &line);
261- virtual void stdError(const QString &line);
262- virtual bool hasFatalErrors() const;
263+ virtual void stdOutput(const QString &line) override;
264+ virtual void stdError(const QString &line) override;
265+ virtual bool hasFatalErrors() const override;
266
267 void setTreatAllErrorsAsWarnings ( const bool set );
268
269@@ -29,7 +29,7 @@
270 void onParsedNewTopLevelItem (ClickRunChecksParser::DataItem* item);
271
272 private:
273- virtual void doFlush();
274+ virtual void doFlush() override;
275 void emitTasks (const ClickRunChecksParser::DataItem *item, int level = 0);
276 bool isError (const ClickRunChecksParser::DataItem *item);
277 ClickRunChecksParser m_subParser;
278@@ -45,9 +45,9 @@
279
280 // ITaskHandler interface
281 public:
282- virtual bool canHandle(const ProjectExplorer::Task &task) const;
283- virtual void handle(const ProjectExplorer::Task &task);
284- virtual QAction *createAction(QObject *parent) const;
285+ virtual bool canHandle(const ProjectExplorer::Task &task) const override;
286+ virtual void handle(const ProjectExplorer::Task &task) override;
287+ virtual QAction *createAction(QObject *parent) const override;
288
289 private:
290 QUrl getUrl (const ProjectExplorer::Task &task) const;
291
292=== modified file 'src/ubuntu/ubuntuqmlbuildconfiguration.h'
293--- src/ubuntu/ubuntuqmlbuildconfiguration.h 2015-04-17 09:21:16 +0000
294+++ src/ubuntu/ubuntuqmlbuildconfiguration.h 2016-07-22 10:21:14 +0000
295@@ -57,8 +57,8 @@
296 UbuntuQmlUpdateTranslationTemplateStep(ProjectExplorer::BuildStepList *bsl, UbuntuQmlUpdateTranslationTemplateStep *bs);
297
298 // BuildStep interface
299- virtual bool init();
300- virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
301+ virtual bool init() override;
302+ virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
303
304 QString makeCommand(ProjectExplorer::ToolChain *tc, const Utils::Environment &env) const;
305 };
306@@ -71,9 +71,9 @@
307 UbuntuQmlBuildTranslationStep(ProjectExplorer::BuildStepList *bsl, UbuntuQmlBuildTranslationStep *bs);
308
309 // BuildStep interface
310- virtual bool init();
311- virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
312- void run(QFutureInterface<bool> &fi);
313+ virtual bool init() override;
314+ virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
315+ void run(QFutureInterface<bool> &fi) override;
316
317 private:
318 QString m_translationDir;
319
320=== modified file 'src/ubuntu/ubuntuvalidationresultmodel.h'
321--- src/ubuntu/ubuntuvalidationresultmodel.h 2015-03-03 17:23:52 +0000
322+++ src/ubuntu/ubuntuvalidationresultmodel.h 2016-07-22 10:21:14 +0000
323@@ -92,13 +92,13 @@
324 ~UbuntuValidationResultModel();
325
326 // QAbstractItemModel interface
327- virtual QModelIndex index(int row, int column, const QModelIndex &parent) const;
328- virtual QModelIndex parent(const QModelIndex &child) const;
329- virtual int rowCount(const QModelIndex &parent) const;
330- virtual int columnCount(const QModelIndex &parent) const;
331- virtual QVariant data(const QModelIndex &index, int role) const;
332- virtual Qt::ItemFlags flags(const QModelIndex &index) const;
333- virtual QHash<int, QByteArray> roleNames() const;
334+ virtual QModelIndex index(int row, int column, const QModelIndex &parent) const override;
335+ virtual QModelIndex parent(const QModelIndex &child) const override;
336+ virtual int rowCount(const QModelIndex &parent) const override;
337+ virtual int columnCount(const QModelIndex &parent) const override;
338+ virtual QVariant data(const QModelIndex &index, int role) const override;
339+ virtual Qt::ItemFlags flags(const QModelIndex &index) const override;
340+ virtual QHash<int, QByteArray> roleNames() const override;
341
342 QModelIndex findFirstErrorItem () const;
343
344
345=== modified file 'src/ubuntu/ubuntuwelcomemode.h'
346--- src/ubuntu/ubuntuwelcomemode.h 2016-04-19 12:09:54 +0000
347+++ src/ubuntu/ubuntuwelcomemode.h 2016-07-22 10:21:14 +0000
348@@ -32,11 +32,11 @@
349
350 public:
351 // IWelcomePage interface
352- virtual QUrl pageLocation() const;
353- virtual QString title() const;
354- virtual int priority() const;
355- virtual void facilitateQml(QQmlEngine *engine);
356- virtual Core::Id id() const;
357+ virtual QUrl pageLocation() const override;
358+ virtual QString title() const override;
359+ virtual int priority() const override;
360+ virtual void facilitateQml(QQmlEngine *engine) override;
361+ virtual Core::Id id() const override;
362
363 public slots:
364 void newProject();
365
366=== modified file 'src/ubuntu/wizards/ubuntuprojectmigrationwizard.h'
367--- src/ubuntu/wizards/ubuntuprojectmigrationwizard.h 2014-12-02 14:20:35 +0000
368+++ src/ubuntu/wizards/ubuntuprojectmigrationwizard.h 2016-07-22 10:21:14 +0000
369@@ -50,8 +50,8 @@
370
371 // QWizardPage interface
372 public:
373- virtual void initializePage();
374- virtual bool isComplete() const;
375+ virtual void initializePage() override;
376+ virtual bool isComplete() const override;
377 };
378
379 class UbuntuProjectDetailsPage : public QWizardPage
380@@ -62,8 +62,8 @@
381
382 // QWizardPage interface
383 public:
384- virtual void initializePage();
385- virtual bool isComplete() const;
386+ virtual void initializePage() override;
387+ virtual bool isComplete() const override;
388
389 private:
390 bool m_initialized;

Subscribers

People subscribed via source and target branches