summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@nokia.com>2011-02-17 17:44:50 (GMT)
committerZeno Albisser <zeno.albisser@nokia.com>2011-02-22 11:46:57 (GMT)
commit42ce38bc4db41ece082fba963f483a4ebfd78a01 (patch)
tree97b2df43619a0ee936c01283d2cc37d05e15a2d6 /tests
parentf08eb697ddc7bb473f3fe6b5545fca075d95481c (diff)
downloadQt-42ce38bc4db41ece082fba963f483a4ebfd78a01.zip
Qt-42ce38bc4db41ece082fba963f483a4ebfd78a01.tar.gz
Qt-42ce38bc4db41ece082fba963f483a4ebfd78a01.tar.bz2
Changed manual QLocale test to update FirstDayOfWeek automatically
Reviewed-by: Denis Dzyubenko
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/qlocale/calendar.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/manual/qlocale/calendar.cpp b/tests/manual/qlocale/calendar.cpp
index 8c8eca9..b59fae6 100644
--- a/tests/manual/qlocale/calendar.cpp
+++ b/tests/manual/qlocale/calendar.cpp
@@ -66,6 +66,7 @@ CalendarWidget::CalendarWidget()
void CalendarWidget::localeChanged(QLocale locale)
{
calendar->setLocale(locale);
+ firstDayCombo->setCurrentIndex(locale.firstDayOfWeek()-1);
}
void CalendarWidget::firstDayChanged(int index)
@@ -189,13 +190,13 @@ void CalendarWidget::createGeneralOptionsGroupBox()
generalOptionsGroupBox = new QGroupBox(tr("General Options"));
firstDayCombo = new QComboBox;
- firstDayCombo->addItem(tr("Sunday"), Qt::Sunday);
firstDayCombo->addItem(tr("Monday"), Qt::Monday);
firstDayCombo->addItem(tr("Tuesday"), Qt::Tuesday);
firstDayCombo->addItem(tr("Wednesday"), Qt::Wednesday);
firstDayCombo->addItem(tr("Thursday"), Qt::Thursday);
firstDayCombo->addItem(tr("Friday"), Qt::Friday);
firstDayCombo->addItem(tr("Saturday"), Qt::Saturday);
+ firstDayCombo->addItem(tr("Sunday"), Qt::Sunday);
firstDayLabel = new QLabel(tr("Wee&k starts on:"));
firstDayLabel->setBuddy(firstDayCombo);