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

Proposed by Benjamin Zeller
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 416
Merged at revision: 418
Proposed branch: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/more_fixes
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 54 lines (+11/-4)
3 files modified
src/ubuntu/ubuntudevicesmodel.cpp (+5/-3)
src/ubuntu/ubuntulocalrunconfiguration.cpp (+1/-1)
src/ubuntu/wizards/ubuntufirstrunwizard.cpp (+5/-0)
To merge this branch: bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/more_fixes
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zoltan Balogh Approve
Review via email: mp+277257@code.launchpad.net

Commit message

- Fix crash when there are no devices in the settings
- Fix possible crash when a kit has not toolchain set
- Disable debug output

Description of the change

- Fix crash when there are no devices in the settings
- Fix possible crash when a kit has not toolchain set
- Disable debug output

To post a comment you must log in.
Revision history for this message
Zoltan Balogh (bzoltan) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ubuntu/ubuntudevicesmodel.cpp'
2--- src/ubuntu/ubuntudevicesmodel.cpp 2015-08-10 16:15:25 +0000
3+++ src/ubuntu/ubuntudevicesmodel.cpp 2015-11-11 14:53:39 +0000
4@@ -451,9 +451,11 @@
5 }
6 }
7
8- beginInsertRows(QModelIndex(),0,devs.count()-1);
9- m_knownDevices = devs;
10- endInsertRows();
11+ if (devs.count()) {
12+ beginInsertRows(QModelIndex(),0,devs.count()-1);
13+ m_knownDevices = devs;
14+ endInsertRows();
15+ }
16
17 connect(devMgr,SIGNAL(deviceAdded(Core::Id)),this,SLOT(deviceAdded(Core::Id)),Qt::UniqueConnection);
18 connect(devMgr,SIGNAL(deviceRemoved(Core::Id)),this,SLOT(deviceRemoved(Core::Id)),Qt::UniqueConnection);
19
20=== modified file 'src/ubuntu/ubuntulocalrunconfiguration.cpp'
21--- src/ubuntu/ubuntulocalrunconfiguration.cpp 2015-06-30 13:34:14 +0000
22+++ src/ubuntu/ubuntulocalrunconfiguration.cpp 2015-11-11 14:53:39 +0000
23@@ -41,7 +41,7 @@
24 using namespace Ubuntu::Internal;
25
26 enum {
27- debug = 1
28+ debug = 0
29 };
30
31 UbuntuLocalEnvironmentAspect::UbuntuLocalEnvironmentAspect(ProjectExplorer::RunConfiguration *parent)
32
33=== modified file 'src/ubuntu/wizards/ubuntufirstrunwizard.cpp'
34--- src/ubuntu/wizards/ubuntufirstrunwizard.cpp 2015-06-10 11:54:29 +0000
35+++ src/ubuntu/wizards/ubuntufirstrunwizard.cpp 2015-11-11 14:53:39 +0000
36@@ -11,6 +11,7 @@
37 #include <projectexplorer/kitinformation.h>
38 #include <projectexplorer/devicesupport/devicemanager.h>
39 #include <projectexplorer/projectexplorerconstants.h>
40+#include <qtsupport/qtkitinformation.h>
41
42 #include <QLabel>
43 #include <QPushButton>
44@@ -132,6 +133,10 @@
45 ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(curr);
46 const Core::Id devId = ProjectExplorer::DeviceKitInformation::deviceId(curr);
47
48+ //we just care about Kits with a toolchain and a qt version
49+ if (!tc || !QtSupport::QtKitInformation::qtVersion(curr))
50+ continue;
51+
52 if (tc->type() == QLatin1String(Constants::UBUNTU_CLICK_TOOLCHAIN_ID) ||
53 devId == ProjectExplorer::Constants::DESKTOP_DEVICE_ID) {
54 found = true;

Subscribers

People subscribed via source and target branches