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

Proposed by Benjamin Zeller on 2015-07-08
Status: Merged
Approved by: Zoltan Balogh on 2015-07-20
Approved revision: 404
Merged at revision: 405
Proposed branch: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/mzanettis_switches
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 590 lines (+309/-17)
13 files modified
src/ubuntu/ubuntu.pro (+6/-3)
src/ubuntu/ubuntuconstants.h (+5/-0)
src/ubuntu/ubuntupackageoutputparser.cpp (+8/-2)
src/ubuntu/ubuntupackageoutputparser.h (+3/-0)
src/ubuntu/ubuntupackagestep.cpp (+54/-7)
src/ubuntu/ubuntupackagestep.h (+8/-0)
src/ubuntu/ubuntupackagestepconfigwidget.ui (+9/-2)
src/ubuntu/ubuntuplugin.cpp (+5/-0)
src/ubuntu/ubuntuplugin.h (+0/-3)
src/ubuntu/ubunturemoterunconfiguration.cpp (+12/-0)
src/ubuntu/ubuntusettingsprojectdefaultspage.cpp (+78/-0)
src/ubuntu/ubuntusettingsprojectdefaultspage.h (+40/-0)
src/ubuntu/ubuntusettingsprojectdefaultspage.ui (+81/-0)
To merge this branch: bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/mzanettis_switches
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-07-08
Zoltan Balogh 2015-07-08 Pending
Michael Zanetti 2015-07-08 Pending
Review via email: mp+264168@code.launchpad.net

Commit Message

- Add settings page for project configuration default values

Description of the Change

- Add settings page for project configuration default values

To post a comment you must log in.
404. By Benjamin Zeller on 2015-07-08

- Fix Typo
- Actually use the treatClickErrorsAsWarnings property

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ubuntu/ubuntu.pro'
2--- src/ubuntu/ubuntu.pro 2015-02-16 12:27:25 +0000
3+++ src/ubuntu/ubuntu.pro 2015-07-08 15:43:21 +0000
4@@ -30,7 +30,8 @@
5 ubuntumanifesteditor.ui \
6 ubuntuapparmoreditor.ui \
7 ubunturemoterunconfigurationwidget.ui \
8- targetupgrademanagerdialog.ui
9+ targetupgrademanagerdialog.ui \
10+ ubuntusettingsprojectdefaultspage.ui
11
12 RESOURCES += \
13 resources.qrc
14@@ -124,7 +125,8 @@
15 targetupgrademanager.cpp \
16 ubuntupackagingmodel.cpp \
17 ubuntufixmanifeststep.cpp \
18- wizards/ubuntufatpackagingwizard.cpp
19+ wizards/ubuntufatpackagingwizard.cpp \
20+ ubuntusettingsprojectdefaultspage.cpp
21
22 HEADERS += \
23 ubuntuplugin.h \
24@@ -212,7 +214,8 @@
25 targetupgrademanager.h \
26 ubuntupackagingmodel.h \
27 ubuntufixmanifeststep.h \
28- wizards/ubuntufatpackagingwizard.h
29+ wizards/ubuntufatpackagingwizard.h \
30+ ubuntusettingsprojectdefaultspage.h
31
32 INCLUDEPATH+=$$OUT_PWD
33
34
35=== modified file 'src/ubuntu/ubuntuconstants.h'
36--- src/ubuntu/ubuntuconstants.h 2015-06-14 13:27:37 +0000
37+++ src/ubuntu/ubuntuconstants.h 2015-07-08 15:43:21 +0000
38@@ -415,6 +415,7 @@
39 const char SETTINGS_PRODUCT[] = "UbuntuSDK";
40 const char SETTINGS_GROUP_MODE[] = "Mode";
41 const char SETTINGS_GROUP_CLICK[] = "Click";
42+const char SETTINGS_GROUP_PROJECT_DEFAULTS[] = "ProjectDefaults";
43 const char SETTINGS_GROUP_DEVICE_CONNECTIVITY[] = "DeviceConnectivity";
44 const char SETTINGS_GROUP_DEVICES[] = "Devices";
45
46@@ -430,6 +431,10 @@
47 const char SETTINGS_KEY_AUTOTOGGLE[] = "Auto_Toggle";
48 const char SETTINGS_KEY_AUTO_CHECK_CHROOT_UPDATES[] = "Auto_Check_Chroot_Updates";
49 const char SETTINGS_KEY_CHROOT_USE_LOCAL_MIRROR[] = "Chroot_Use_Local_Mirror";
50+const char SETTINGS_KEY_TREAT_REVIEW_ERRORS_AS_WARNINGS[] = "Treat_Review_Warnings_As_Errors";
51+const char SETTINGS_KEY_ENABLE_DEBUG_HELPER_DEFAULT[] = "Enable_Debug_Helper_By_Default";
52+const char SETTINGS_KEY_UNINSTALL_APPS_FROM_DEVICE_DEFAULT[] = "Uninstall_Apps_From_Device_By_Default";
53+const char SETTINGS_KEY_OVERRIDE_APPS_BY_DEFAULT[] = "Override_Apps_By_Default";
54
55 //const char SETTINGS_GROUP_CLICK[] = "Click";
56 //const char SETTINGS_KEY_CLICK_REVIEWERSTOOLS[] = "ReviewersToolsEnabled";
57
58=== modified file 'src/ubuntu/ubuntupackageoutputparser.cpp'
59--- src/ubuntu/ubuntupackageoutputparser.cpp 2015-02-27 11:56:34 +0000
60+++ src/ubuntu/ubuntupackageoutputparser.cpp 2015-07-08 15:43:21 +0000
61@@ -18,7 +18,8 @@
62 UbuntuPackageOutputParser::UbuntuPackageOutputParser() :
63 ProjectExplorer::IOutputParser(),
64 m_fatalError(false),
65- m_endOfData(false)
66+ m_endOfData(false),
67+ m_treatAllErrorsAsWarnings(false)
68 {
69 m_subParser.beginRecieveData();
70 connect(&m_subParser,&ClickRunChecksParser::parsedNewTopLevelItem,this,&UbuntuPackageOutputParser::onParsedNewTopLevelItem);
71@@ -43,6 +44,11 @@
72 return IOutputParser::hasFatalErrors();
73 }
74
75+void UbuntuPackageOutputParser::setTreatAllErrorsAsWarnings(const bool set)
76+{
77+ m_treatAllErrorsAsWarnings = set;
78+}
79+
80 /*!
81 * \brief UbuntuPackageOutputParser::setEndOfData
82 * Tells the parser that the next flush() call can read till end of buffer,
83@@ -85,7 +91,7 @@
84 if(error)
85 m_fatalError = true;
86
87- ProjectExplorer::Task task(error ? ProjectExplorer::Task::Error : ProjectExplorer::Task::Warning,
88+ ProjectExplorer::Task task(error && !m_treatAllErrorsAsWarnings ? ProjectExplorer::Task::Error : ProjectExplorer::Task::Warning,
89 QStringLiteral(""), //empty description for now
90 Utils::FileName(), //we have no file to show
91 -1, //line number
92
93=== modified file 'src/ubuntu/ubuntupackageoutputparser.h'
94--- src/ubuntu/ubuntupackageoutputparser.h 2014-10-01 11:48:41 +0000
95+++ src/ubuntu/ubuntupackageoutputparser.h 2015-07-08 15:43:21 +0000
96@@ -20,6 +20,8 @@
97 virtual void stdError(const QString &line);
98 virtual bool hasFatalErrors() const;
99
100+ void setTreatAllErrorsAsWarnings ( const bool set );
101+
102 public slots:
103 void setEndOfData ();
104
105@@ -33,6 +35,7 @@
106 ClickRunChecksParser m_subParser;
107 bool m_fatalError;
108 bool m_endOfData;
109+ bool m_treatAllErrorsAsWarnings;
110
111 };
112
113
114=== modified file 'src/ubuntu/ubuntupackagestep.cpp'
115--- src/ubuntu/ubuntupackagestep.cpp 2015-04-20 19:51:08 +0000
116+++ src/ubuntu/ubuntupackagestep.cpp 2015-07-08 15:43:21 +0000
117@@ -31,6 +31,7 @@
118 };
119
120 const char PACKAGE_MODE_KEY[] = "Ubuntu.UbuntuPackageStep.PackageMode";
121+const char ERROR_MODE_KEY[] = "Ubuntu.UbuntuPackageStep.TreatErrorsAsWarnings";
122
123 /*!
124 * \class UbuntuPackageStep
125@@ -51,6 +52,20 @@
126 m_cleanDeployDirectory(true)
127 {
128 setDefaultDisplayName(tr("UbuntuSDK Click build"));
129+
130+ QSettings settings(QLatin1String(Constants::SETTINGS_COMPANY),
131+ QLatin1String(Constants::SETTINGS_PRODUCT));
132+
133+ settings.beginGroup(QLatin1String(Constants::SETTINGS_GROUP_PROJECT_DEFAULTS));
134+ m_treatClickErrorsAsWarnings =
135+ settings.value(QLatin1String(Constants::SETTINGS_KEY_TREAT_REVIEW_ERRORS_AS_WARNINGS),
136+ false).toBool();
137+
138+ if (!settings.value(QLatin1String(Constants::SETTINGS_KEY_ENABLE_DEBUG_HELPER_DEFAULT),
139+ false).toBool())
140+ m_debugMode = DisableDebugScript;
141+
142+ settings.endGroup();
143 }
144
145 UbuntuPackageStep::UbuntuPackageStep(ProjectExplorer::BuildStepList *bsl, UbuntuPackageStep *other) :
146@@ -314,6 +329,9 @@
147 if(mode >= AutoEnableDebugScript && mode <= DisableDebugScript)
148 setDebugMode(static_cast<DebugMode>(mode));
149 }
150+ if (map.contains(QLatin1String(ERROR_MODE_KEY))) {
151+ setTreatClickErrorsAsWarnings(map[QLatin1String(ERROR_MODE_KEY)].toBool());
152+ }
153 return true;
154 }
155
156@@ -324,6 +342,7 @@
157 return map;
158
159 map.insert(QLatin1String(PACKAGE_MODE_KEY),static_cast<int>(m_debugMode));
160+ map.insert(QLatin1String(ERROR_MODE_KEY),m_treatClickErrorsAsWarnings);
161 return map;
162 }
163
164@@ -389,6 +408,7 @@
165 //add special parser on click review step
166 if(m_state == ClickReview) {
167 UbuntuPackageOutputParser *packageStepParser = new UbuntuPackageOutputParser;
168+ packageStepParser->setTreatAllErrorsAsWarnings(m_treatClickErrorsAsWarnings);
169 connect(this,SIGNAL(currentSubStepFinished()),packageStepParser,SLOT(setEndOfData()));
170 if (parser)
171 parser->appendOutputParser(packageStepParser);
172@@ -890,6 +910,19 @@
173 m_cleanDeployDirectory = cleanDeployDirectory;
174 }
175
176+bool UbuntuPackageStep::treatClickErrorsAsWarnings() const
177+{
178+ return m_treatClickErrorsAsWarnings;
179+}
180+
181+void UbuntuPackageStep::setTreatClickErrorsAsWarnings(bool arg)
182+{
183+ if (m_treatClickErrorsAsWarnings != arg) {
184+ m_treatClickErrorsAsWarnings = arg;
185+ emit treatClickErrorsAsWarningsChanged(arg);
186+ }
187+}
188+
189 ProjectExplorer::BuildConfiguration *UbuntuPackageStep::referenceBuildConfig() const
190 {
191 if(m_referenceBuildConfig)
192@@ -951,7 +984,9 @@
193 ui->comboBoxMode->addItem(tr("Yes") ,static_cast<int>(UbuntuPackageStep::EnableDebugScript));
194 ui->comboBoxMode->addItem(tr("No") ,static_cast<int>(UbuntuPackageStep::DisableDebugScript));
195 connect(step,SIGNAL(packageModeChanged(PackageMode)),this,SLOT(updateMode()));
196+ connect(step,SIGNAL(treatClickErrorsAsWarningsChanged(bool)),this,SLOT(updateMode()));
197 connect(ui->comboBoxMode,SIGNAL(activated(int)),this,SLOT(onModeSelected(int)));
198+ connect(ui->checkBox,SIGNAL(clicked(bool)), this, SLOT(onClickErrorsToggled(bool)));
199
200 updateMode();
201 }
202@@ -971,14 +1006,17 @@
203 if (m_isUpdating)
204 return;
205
206- int mode = static_cast<UbuntuPackageStep*>(step())->debugMode();
207+ UbuntuPackageStep *myStep = static_cast<UbuntuPackageStep*>(step());
208+ int mode = myStep->debugMode();
209+
210+ m_isUpdating = true;
211 int idx = ui->comboBoxMode->findData(mode);
212-
213- if(idx >= 0) {
214- m_isUpdating = true;
215+ if(idx >= 0)
216 ui->comboBoxMode->setCurrentIndex(idx);
217- m_isUpdating = false;
218- }
219+
220+ ui->checkBox->setChecked(myStep->treatClickErrorsAsWarnings());
221+
222+ m_isUpdating = false;
223 }
224
225 void UbuntuPackageStepConfigWidget::onModeSelected(const int index)
226@@ -992,7 +1030,16 @@
227 static_cast<UbuntuPackageStep*>(step())->setDebugMode(static_cast<UbuntuPackageStep::DebugMode>(mode));
228 m_isUpdating = false;
229 }
230-
231+}
232+
233+void UbuntuPackageStepConfigWidget::onClickErrorsToggled(const bool checked)
234+{
235+ if (m_isUpdating)
236+ return;
237+
238+ m_isUpdating = true;
239+ static_cast<UbuntuPackageStep*>(step())->setTreatClickErrorsAsWarnings(checked);
240+ m_isUpdating = false;
241 }
242
243 } // namespace Internal
244
245=== modified file 'src/ubuntu/ubuntupackagestep.h'
246--- src/ubuntu/ubuntupackagestep.h 2015-04-20 19:51:08 +0000
247+++ src/ubuntu/ubuntupackagestep.h 2015-07-08 15:43:21 +0000
248@@ -21,6 +21,7 @@
249 {
250 Q_OBJECT
251 Q_PROPERTY(DebugMode debugMode READ debugMode WRITE setDebugMode NOTIFY packageModeChanged)
252+ Q_PROPERTY(bool treatClickErrorsAsWarnings READ treatClickErrorsAsWarnings WRITE setTreatClickErrorsAsWarnings NOTIFY treatClickErrorsAsWarningsChanged)
253 public:
254
255 enum State {
256@@ -86,10 +87,15 @@
257 bool cleanDeployDirectory() const;
258 void setCleanDeployDirectory(bool cleanDeployDirectory);
259
260+ bool treatClickErrorsAsWarnings() const;
261+ void setTreatClickErrorsAsWarnings(bool arg);
262+
263 signals:
264 void packageModeChanged(DebugMode arg);
265 void currentSubStepFinished();
266
267+ void treatClickErrorsAsWarningsChanged(bool arg);
268+
269 protected:
270 void internalInit ();
271 void setupAndStartProcess ( const ProjectExplorer::ProcessParameters &params );
272@@ -132,6 +138,7 @@
273 QString m_overrideClickWorkingDir;
274 QPointer<ProjectExplorer::BuildConfiguration> m_referenceBuildConfig;
275 bool m_cleanDeployDirectory;
276+ bool m_treatClickErrorsAsWarnings;
277 };
278
279 class UbuntuPackageStepConfigWidget : public ProjectExplorer::SimpleBuildStepConfigWidget
280@@ -147,6 +154,7 @@
281 public slots:
282 void updateMode ();
283 void onModeSelected (const int index);
284+ void onClickErrorsToggled (const bool checked);
285
286 private:
287 Ui::UbuntuPackageStepConfigWidget *ui;
288
289=== modified file 'src/ubuntu/ubuntupackagestepconfigwidget.ui'
290--- src/ubuntu/ubuntupackagestepconfigwidget.ui 2014-06-17 11:48:05 +0000
291+++ src/ubuntu/ubuntupackagestepconfigwidget.ui 2015-07-08 15:43:21 +0000
292@@ -14,7 +14,14 @@
293 <string>Form</string>
294 </property>
295 <layout class="QFormLayout" name="formLayout">
296- <item row="0" column="0">
297+ <item row="0" column="0" colspan="2">
298+ <widget class="QCheckBox" name="checkBox">
299+ <property name="text">
300+ <string>Treat click review errors as warnings</string>
301+ </property>
302+ </widget>
303+ </item>
304+ <item row="1" column="0">
305 <widget class="QLabel" name="label">
306 <property name="text">
307 <string>Enable debug helper</string>
308@@ -24,7 +31,7 @@
309 </property>
310 </widget>
311 </item>
312- <item row="0" column="1">
313+ <item row="1" column="1">
314 <widget class="QComboBox" name="comboBoxMode">
315 <property name="toolTip">
316 <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Specifies if the debug helper script &lt;br/&gt;is injected into the click package.&lt;/p&gt;&lt;p&gt;Auto will only package them when &lt;br/&gt;the project is compiled in debug mode.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
317
318=== modified file 'src/ubuntu/ubuntuplugin.cpp'
319--- src/ubuntu/ubuntuplugin.cpp 2015-01-13 16:37:58 +0000
320+++ src/ubuntu/ubuntuplugin.cpp 2015-07-08 15:43:21 +0000
321@@ -44,6 +44,10 @@
322 #include "ubuntuprojecthelper.h"
323 #include "ubuntuscopefinalizer.h"
324 #include "targetupgrademanager.h"
325+#include "ubuntusettingspage.h"
326+#include "ubuntusettingsdeviceconnectivitypage.h"
327+#include "ubuntusettingsclickpage.h"
328+#include "ubuntusettingsprojectdefaultspage.h"
329
330 #include "wizards/ubuntuprojectapplicationwizard.h"
331 #include "wizards/ubuntufirstrunwizard.h"
332@@ -167,6 +171,7 @@
333 addAutoReleasedObject(m_ubuntuPackagingMode);
334
335 addAutoReleasedObject(new UbuntuSettingsClickPage);
336+ addAutoReleasedObject(new UbuntuSettingsProjectDefaultsPage);
337 addAutoReleasedObject(new UbuntuSettingsDeviceConnectivityPage);
338 addAutoReleasedObject(new UbuntuSettingsPage);
339
340
341=== modified file 'src/ubuntu/ubuntuplugin.h'
342--- src/ubuntu/ubuntuplugin.h 2014-12-12 13:33:10 +0000
343+++ src/ubuntu/ubuntuplugin.h 2015-07-08 15:43:21 +0000
344@@ -32,9 +32,6 @@
345 #include "ubuntuwikimode.h"
346 #include "ubuntupackagingmode.h"
347 #include "ubuntupastebinmode.h"
348-#include "ubuntusettingspage.h"
349-#include "ubuntusettingsdeviceconnectivitypage.h"
350-#include "ubuntusettingsclickpage.h"
351
352 #include <extensionsystem/iplugin.h>
353 #include <coreplugin/mimedatabase.h>
354
355=== modified file 'src/ubuntu/ubunturemoterunconfiguration.cpp'
356--- src/ubuntu/ubunturemoterunconfiguration.cpp 2015-01-13 09:55:54 +0000
357+++ src/ubuntu/ubunturemoterunconfiguration.cpp 2015-07-08 15:43:21 +0000
358@@ -64,6 +64,18 @@
359 {
360 setDisplayName(appId());
361 addExtraAspect(new RemoteLinux::RemoteLinuxEnvironmentAspect(this));
362+
363+ QSettings settings(QLatin1String(Constants::SETTINGS_COMPANY),
364+ QLatin1String(Constants::SETTINGS_PRODUCT));
365+
366+ settings.beginGroup(QLatin1String(Constants::SETTINGS_GROUP_PROJECT_DEFAULTS));
367+ m_forceInstall = settings.value(
368+ QLatin1String(Constants::SETTINGS_KEY_OVERRIDE_APPS_BY_DEFAULT),
369+ m_running).toBool();
370+ m_uninstall = settings.value(
371+ QLatin1String(Constants::SETTINGS_KEY_UNINSTALL_APPS_FROM_DEVICE_DEFAULT),
372+ m_uninstall).toBool();
373+ settings.endGroup();
374 }
375
376 UbuntuRemoteRunConfiguration::UbuntuRemoteRunConfiguration(ProjectExplorer::Target *parent, UbuntuRemoteRunConfiguration *source)
377
378=== added file 'src/ubuntu/ubuntusettingsprojectdefaultspage.cpp'
379--- src/ubuntu/ubuntusettingsprojectdefaultspage.cpp 1970-01-01 00:00:00 +0000
380+++ src/ubuntu/ubuntusettingsprojectdefaultspage.cpp 2015-07-08 15:43:21 +0000
381@@ -0,0 +1,78 @@
382+#include "ubuntusettingsprojectdefaultspage.h"
383+#include "ubuntuconstants.h"
384+
385+#include <QWidget>
386+
387+namespace Ubuntu {
388+namespace Internal {
389+
390+UbuntuSettingsProjectDefaultsPage::UbuntuSettingsProjectDefaultsPage(QObject *parent)
391+ : Core::IOptionsPage(parent),
392+ m_ui(0)
393+{
394+ setId("B.ProjectDefaults");
395+ setDisplayName(tr("Project defaults"));
396+ setCategory("Ubuntu");
397+ setDisplayCategory(QLatin1String("Ubuntu"));
398+ setCategoryIcon(QLatin1String(Ubuntu::Constants::UBUNTU_SETTINGS_ICON));
399+
400+ m_settings = new QSettings(QLatin1String(Constants::SETTINGS_COMPANY),QLatin1String(Constants::SETTINGS_PRODUCT), this);
401+}
402+
403+UbuntuSettingsProjectDefaultsPage::~UbuntuSettingsProjectDefaultsPage()
404+{
405+ if (m_ui)
406+ delete m_ui;
407+}
408+
409+QWidget *UbuntuSettingsProjectDefaultsPage::widget()
410+{
411+ if (!m_widget) {
412+ m_widget = new QWidget();
413+ m_ui = new ::Ui::UbuntuSettingsDefaultPage;
414+ m_ui->setupUi(m_widget);
415+
416+ m_settings->sync();
417+ m_settings->beginGroup(QLatin1String(Constants::SETTINGS_GROUP_PROJECT_DEFAULTS));
418+ m_ui->checkBoxDebugHelper->setChecked(m_settings->value(QLatin1String(Constants::SETTINGS_KEY_ENABLE_DEBUG_HELPER_DEFAULT),true).toBool());
419+ m_ui->checkBoxOverrideApps->setChecked(m_settings->value(QLatin1String(Constants::SETTINGS_KEY_OVERRIDE_APPS_BY_DEFAULT),false).toBool());
420+ m_ui->checkBoxUninstallApps->setChecked(m_settings->value(QLatin1String(Constants::SETTINGS_KEY_UNINSTALL_APPS_FROM_DEVICE_DEFAULT),true).toBool());
421+ m_ui->checkBoxClickErrors->setChecked(m_settings->value(QLatin1String(Constants::SETTINGS_KEY_TREAT_REVIEW_ERRORS_AS_WARNINGS),false).toBool());
422+ m_settings->endGroup();
423+
424+
425+ }
426+
427+ return m_widget;
428+}
429+
430+void UbuntuSettingsProjectDefaultsPage::apply()
431+{
432+ m_settings->beginGroup(QLatin1String(Constants::SETTINGS_GROUP_PROJECT_DEFAULTS));
433+ m_settings->setValue(QLatin1String(Constants::SETTINGS_KEY_ENABLE_DEBUG_HELPER_DEFAULT),
434+ m_ui->checkBoxDebugHelper->checkState() == Qt::Checked);
435+
436+ m_settings->setValue(QLatin1String(Constants::SETTINGS_KEY_OVERRIDE_APPS_BY_DEFAULT),
437+ m_ui->checkBoxOverrideApps->checkState() == Qt::Checked);
438+
439+ m_settings->setValue(QLatin1String(Constants::SETTINGS_KEY_UNINSTALL_APPS_FROM_DEVICE_DEFAULT),
440+ m_ui->checkBoxUninstallApps->checkState() == Qt::Checked);
441+
442+ m_settings->setValue(QLatin1String(Constants::SETTINGS_KEY_TREAT_REVIEW_ERRORS_AS_WARNINGS),
443+ m_ui->checkBoxClickErrors->checkState() == Qt::Checked);
444+ m_settings->endGroup();
445+
446+ m_settings->sync();
447+}
448+
449+void UbuntuSettingsProjectDefaultsPage::finish()
450+{
451+ if (m_widget) {
452+ delete m_widget;
453+ delete m_ui;
454+ m_ui = 0;
455+ }
456+}
457+
458+} // namespace Internal
459+} // namespace Ubuntu
460
461=== added file 'src/ubuntu/ubuntusettingsprojectdefaultspage.h'
462--- src/ubuntu/ubuntusettingsprojectdefaultspage.h 1970-01-01 00:00:00 +0000
463+++ src/ubuntu/ubuntusettingsprojectdefaultspage.h 2015-07-08 15:43:21 +0000
464@@ -0,0 +1,40 @@
465+#ifndef UBUNTU_INTERNAL_UBUNTUSETTINGSPROJECTDEFAULTS_H
466+#define UBUNTU_INTERNAL_UBUNTUSETTINGSPROJECTDEFAULTS_H
467+
468+#include "ui_ubuntusettingsprojectdefaultspage.h"
469+
470+#include <coreplugin/dialogs/ioptionspage.h>
471+#include <QPointer>
472+
473+class QWidget;
474+class QSettings;
475+
476+namespace Ubuntu {
477+namespace Internal {
478+
479+class UbuntuSettingsProjectDefaultsPage: public Core::IOptionsPage
480+{
481+ Q_OBJECT
482+public:
483+ explicit UbuntuSettingsProjectDefaultsPage(QObject *parent = 0);
484+ ~UbuntuSettingsProjectDefaultsPage();
485+
486+ QWidget *widget( ) override;
487+ void apply() override;
488+ void finish() override;
489+
490+signals:
491+
492+public slots:
493+
494+private:
495+ QSettings *m_settings;
496+ QPointer<QWidget> m_widget;
497+ ::Ui::UbuntuSettingsDefaultPage *m_ui;
498+
499+};
500+
501+} // namespace Internal
502+} // namespace Ubuntu
503+
504+#endif // UBUNTU_INTERNAL_UBUNTUSETTINGSPROJECTDEFAULTS_H
505
506=== added file 'src/ubuntu/ubuntusettingsprojectdefaultspage.ui'
507--- src/ubuntu/ubuntusettingsprojectdefaultspage.ui 1970-01-01 00:00:00 +0000
508+++ src/ubuntu/ubuntusettingsprojectdefaultspage.ui 2015-07-08 15:43:21 +0000
509@@ -0,0 +1,81 @@
510+<?xml version="1.0" encoding="UTF-8"?>
511+<ui version="4.0">
512+ <class>UbuntuSettingsDefaultPage</class>
513+ <widget class="QWidget" name="UbuntuSettingsDefaultPage">
514+ <property name="geometry">
515+ <rect>
516+ <x>0</x>
517+ <y>0</y>
518+ <width>720</width>
519+ <height>300</height>
520+ </rect>
521+ </property>
522+ <property name="windowTitle">
523+ <string>Form</string>
524+ </property>
525+ <layout class="QVBoxLayout" name="verticalLayout">
526+ <item>
527+ <widget class="QGroupBox" name="groupBox">
528+ <property name="title">
529+ <string>Project default settings</string>
530+ </property>
531+ <layout class="QVBoxLayout" name="verticalLayout_2">
532+ <item>
533+ <widget class="QLabel" name="label">
534+ <property name="text">
535+ <string>This settings are used to initialize new project configurations, they will not change existing projects.</string>
536+ </property>
537+ <property name="wordWrap">
538+ <bool>true</bool>
539+ </property>
540+ </widget>
541+ </item>
542+ <item>
543+ <widget class="QCheckBox" name="checkBoxDebugHelper">
544+ <property name="text">
545+ <string>Enable debug helper</string>
546+ </property>
547+ </widget>
548+ </item>
549+ <item>
550+ <widget class="QCheckBox" name="checkBoxOverrideApps">
551+ <property name="text">
552+ <string>Override apps on the device if they are installed</string>
553+ </property>
554+ </widget>
555+ </item>
556+ <item>
557+ <widget class="QCheckBox" name="checkBoxUninstallApps">
558+ <property name="text">
559+ <string>Uninstall apps from the device after running</string>
560+ </property>
561+ </widget>
562+ </item>
563+ <item>
564+ <widget class="QCheckBox" name="checkBoxClickErrors">
565+ <property name="text">
566+ <string>Treat click review errors as warnings</string>
567+ </property>
568+ </widget>
569+ </item>
570+ <item>
571+ <spacer name="verticalSpacer">
572+ <property name="orientation">
573+ <enum>Qt::Vertical</enum>
574+ </property>
575+ <property name="sizeHint" stdset="0">
576+ <size>
577+ <width>20</width>
578+ <height>40</height>
579+ </size>
580+ </property>
581+ </spacer>
582+ </item>
583+ </layout>
584+ </widget>
585+ </item>
586+ </layout>
587+ </widget>
588+ <resources/>
589+ <connections/>
590+</ui>

Subscribers

People subscribed via source and target branches