equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the tools applications of the Qt Toolkit. |
7 ** This file is part of the tools applications of the Qt Toolkit. |
8 ** |
8 ** |
215 |
215 |
216 int normalIndex = -1; |
216 int normalIndex = -1; |
217 const QString normalStyle = QLatin1String("Normal"); |
217 const QString normalStyle = QLatin1String("Normal"); |
218 |
218 |
219 if (hasStyles) { |
219 if (hasStyles) { |
220 foreach (QString style, styles) { |
220 foreach (const QString &style, styles) { |
221 // try to maintain selection or select 'normal' preferably |
221 // try to maintain selection or select 'normal' preferably |
222 const int newIndex = m_styleComboBox->count(); |
222 const int newIndex = m_styleComboBox->count(); |
223 m_styleComboBox->addItem(style); |
223 m_styleComboBox->addItem(style); |
224 if (oldStyleString == style) { |
224 if (oldStyleString == style) { |
225 m_styleComboBox->setCurrentIndex(newIndex); |
225 m_styleComboBox->setCurrentIndex(newIndex); |