Project name in new project wizard was not pre-selected.

Instead of relying on magic in setFocus(TabFocusReason) use selectAll()

Task-number: QTCREATORBUG-369
This commit is contained in:
con
2009-11-30 15:45:16 +01:00
parent 01ce6f0e2e
commit b4be611e1b

View File

@@ -63,7 +63,7 @@ ProjectIntroPage::ProjectIntroPage(QWidget *parent) :
m_d->m_ui.setupUi(this); m_d->m_ui.setupUi(this);
hideStatusLabel(); hideStatusLabel();
m_d->m_ui.nameLineEdit->setInitialText(tr("<Enter_Name>")); m_d->m_ui.nameLineEdit->setInitialText(tr("<Enter_Name>"));
m_d->m_ui.nameLineEdit->setFocus(Qt::TabFocusReason); m_d->m_ui.nameLineEdit->setFocus();
connect(m_d->m_ui.pathChooser, SIGNAL(changed(QString)), this, SLOT(slotChanged())); connect(m_d->m_ui.pathChooser, SIGNAL(changed(QString)), this, SLOT(slotChanged()));
connect(m_d->m_ui.nameLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotChanged())); connect(m_d->m_ui.nameLineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotChanged()));
connect(m_d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated())); connect(m_d->m_ui.pathChooser, SIGNAL(returnPressed()), this, SLOT(slotActivated()));
@@ -98,6 +98,7 @@ void ProjectIntroPage::setPath(const QString &path)
void ProjectIntroPage::setName(const QString &name) void ProjectIntroPage::setName(const QString &name)
{ {
m_d->m_ui.nameLineEdit->setText(name); m_d->m_ui.nameLineEdit->setText(name);
m_d->m_ui.nameLineEdit->selectAll();
} }
QString ProjectIntroPage::description() const QString ProjectIntroPage::description() const