summaryrefslogtreecommitdiffstats
path: root/examples/widgets/richtext
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-03-24 17:21:34 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-03-27 16:50:01 +0000
commit10db31f933f696b2e61dde640f09c57989617011 (patch)
tree00833e59e69ab8cea042da1904074d92329b92bd /examples/widgets/richtext
parent1c33e8945d8daff44783ec379788ec8af67aa6cb (diff)
Examples: replace QDate::longMonthName()/longDayName()
QDate::longMonthName()/longDayName was deprecated in 5.10 and replaced by QLocale::system().monthName()/dayName() in this case Change-Id: I666cccfa1b8a437cc830804bbe3504511265ea9b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'examples/widgets/richtext')
-rw-r--r--examples/widgets/richtext/calendar/mainwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/widgets/richtext/calendar/mainwindow.cpp b/examples/widgets/richtext/calendar/mainwindow.cpp
index 12c418e0b1..38dc0e2849 100644
--- a/examples/widgets/richtext/calendar/mainwindow.cpp
+++ b/examples/widgets/richtext/calendar/mainwindow.cpp
@@ -66,7 +66,7 @@ MainWindow::MainWindow()
QComboBox *monthCombo = new QComboBox;
for (int month = 1; month <= 12; ++month)
- monthCombo->addItem(QDate::longMonthName(month));
+ monthCombo->addItem(QLocale::system().monthName(month));
QDateTimeEdit *yearEdit = new QDateTimeEdit;
yearEdit->setDisplayFormat("yyyy");
@@ -168,7 +168,7 @@ void MainWindow::insertCalendar()
QTextTableCell cell = table->cellAt(0, weekDay-1);
//! [11] //! [12]
QTextCursor cellCursor = cell.firstCursorPosition();
- cellCursor.insertText(QString("%1").arg(QDate::longDayName(weekDay)), boldFormat);
+ cellCursor.insertText(QLocale::system().dayName(weekDay), boldFormat);
}
//! [12]
@@ -194,7 +194,7 @@ void MainWindow::insertCalendar()
cursor.endEditBlock();
//! [14]
setWindowTitle(tr("Calendar for %1 %2"
- ).arg(QDate::longMonthName(selectedDate.month())
+ ).arg(QLocale::system().monthName(selectedDate.month())
).arg(selectedDate.year()));
}
//! [14]