Commit ebe62299 authored by hjk's avatar hjk

profilechooser: run init() in constructor

Change-Id: I4387b52f2d929ffa096bf2d931eb692b6798f45a
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent e67ff7d8
......@@ -226,8 +226,7 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
d->overrideStartScriptLabel = new QLabel(tr("Override &start script:"), this);
d->overrideStartScriptLabel->setBuddy(d->overrideStartScriptFileName);
d->profileComboBox = new ProfileChooser(this);
d->profileComboBox->init(false);
d->profileComboBox = new ProfileChooser(this, false);
d->profileLabel = new QLabel(tr("&Target:"), this);
d->profileLabel->setBuddy(d->profileComboBox);
......@@ -364,8 +363,7 @@ AttachExternalDialog::AttachExternalDialog(QWidget *parent)
d->filterWidget = new Utils::FilterLineEdit(this);
d->filterWidget->setFocus(Qt::TabFocusReason);
d->profileComboBox = new ProfileChooser(this);
d->profileComboBox->init(true);
d->profileComboBox = new ProfileChooser(this, true);
d->profileLabel = new QLabel(tr("&Target:"), this);
d->profileLabel->setBuddy(d->profileComboBox);
......@@ -664,8 +662,7 @@ StartExternalDialog::StartExternalDialog(QWidget *parent)
d->runInTerminalLabel = new QLabel(tr("Run in &terminal:"), this);
d->runInTerminalLabel->setBuddy(d->runInTerminalCheckBox);
d->profileChooser = new ProfileChooser(this);
d->profileChooser->init(true);
d->profileChooser = new ProfileChooser(this, true);
d->profileLabel = new QLabel(tr("&Target:"), this);
d->profileLabel->setBuddy(d->profileChooser);
......@@ -991,7 +988,6 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent, bool enableStartScript)
setWindowTitle(tr("Start Debugger"));
d->profileChooser = new ProfileChooser(this);
d->profileChooser->init(false);
d->profileLabel = new QLabel(tr("Target:"), this);
d->profileLabel->setBuddy(d->profileChooser);
......
......@@ -45,12 +45,8 @@
namespace ProjectExplorer {
ProfileChooser::ProfileChooser(QWidget *parent) :
ProfileChooser::ProfileChooser(QWidget *parent, bool hostAbiOnly) :
QComboBox(parent)
{
}
void ProfileChooser::init(bool hostAbiOnly)
{
const Abi hostAbi = Abi::hostAbi();
foreach (const Profile *profile, ProfileManager::instance()->profiles()) {
......
......@@ -49,9 +49,7 @@ class PROJECTEXPLORER_EXPORT ProfileChooser : public QComboBox
Q_OBJECT
public:
explicit ProfileChooser(QWidget *parent);
void init(bool hostAbiOnly);
explicit ProfileChooser(QWidget *parent, bool hostAbiOnly = false);
void setCurrentProfileId(Core::Id id);
Core::Id currentProfileId() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment