Commit 3ed88e12 authored by Kai Koehne's avatar Kai Koehne
Browse files

MobileAppWizard: Code beautification

Change-Id: If81cb01dba64a205a6143fa24882a64ef8041137
Reviewed-on: http://codereview.qt.nokia.com/612

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@nokia.com>
parent 2964f7a9
......@@ -67,7 +67,6 @@ class MobileAppWizardMaemoOptionsPagePrivate
friend class MobileAppWizardMaemoOptionsPage;
};
MobileAppWizardGenericOptionsPage::MobileAppWizardGenericOptionsPage(QWidget *parent)
: QWizardPage(parent)
, m_d(new MobileAppWizardGenericOptionsPagePrivate)
......@@ -89,17 +88,19 @@ MobileAppWizardGenericOptionsPage::~MobileAppWizardGenericOptionsPage()
void MobileAppWizardGenericOptionsPage::setOrientation(AbstractMobileApp::ScreenOrientation orientation)
{
QComboBox *const comboBox = m_d->ui.orientationBehaviorComboBox;
for (int i = 0; i < comboBox->count(); ++i)
for (int i = 0; i < comboBox->count(); ++i) {
if (comboBox->itemData(i).toInt() == static_cast<int>(orientation)) {
comboBox->setCurrentIndex(i);
break;
}
}
}
AbstractMobileApp::ScreenOrientation MobileAppWizardGenericOptionsPage::orientation() const
{
const int index = m_d->ui.orientationBehaviorComboBox->currentIndex();
return static_cast<AbstractMobileApp::ScreenOrientation>(m_d->ui.orientationBehaviorComboBox->itemData(index).toInt());
QComboBox *const comboBox = m_d->ui.orientationBehaviorComboBox;
const int index = comboBox->currentIndex();
return static_cast<AbstractMobileApp::ScreenOrientation>(comboBox->itemData(index).toInt());
}
......
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