ProfileChooser: make more robust in case of no configured profiles

Change-Id: I53945617cc616d2bfe4726b4e6e45cad7b400c44
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
hjk
2012-08-24 14:45:25 +02:00
parent d39fc8088c
commit 29ec32a531
4 changed files with 14 additions and 5 deletions

View File

@@ -1702,10 +1702,12 @@ void DebuggerPluginPrivate::attachToQmlPort()
if (dlg.exec() != QDialog::Accepted)
return;
Profile *profile = dlg.profile();
QTC_ASSERT(profile, return);
setConfigValue(_("LastQmlServerPort"), dlg.port());
setConfigValue(_("LastProfile"), dlg.profile()->id().toString());
setConfigValue(_("LastProfile"), profile->id().toString());
fillParameters(&sp, dlg.profile());
fillParameters(&sp, profile);
sp.qmlServerAddress = sp.connParams.host;
sp.qmlServerPort = dlg.port();
sp.startMode = AttachToRemoteProcess;