From 3e75c2965c96fa014ab74121e84d623fd04a27f7 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 10 Jun 2019 00:09:10 +0200 Subject: Remove QLatin1Literal usages That's an undocumented Qt 4/3/2 remnant, start remove usages. Fix incorrect include header in qclass_lib_map.h as a drive-by. Change-Id: I939be2621bc03e5c75f7e3f152546d3af6d37b91 Reviewed-by: Marc Mutz Reviewed-by: Thiago Macieira --- .../widgets/qdatetimeedit/tst_qdatetimeedit.cpp | 30 +++++++++++----------- .../widgets/qdoublespinbox/tst_qdoublespinbox.cpp | 18 ++++++------- .../auto/widgets/widgets/qspinbox/tst_qspinbox.cpp | 18 ++++++------- 3 files changed, 33 insertions(+), 33 deletions(-) (limited to 'tests/auto/widgets/widgets') diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp index b5ef454b14..c6f6900def 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp @@ -307,19 +307,19 @@ static QLatin1String modifierToName(Qt::KeyboardModifier modifier) { switch (modifier) { case Qt::NoModifier: - return QLatin1Literal("No"); + return QLatin1String("No"); break; case Qt::ControlModifier: - return QLatin1Literal("Ctrl"); + return QLatin1String("Ctrl"); break; case Qt::ShiftModifier: - return QLatin1Literal("Shift"); + return QLatin1String("Shift"); break; case Qt::AltModifier: - return QLatin1Literal("Alt"); + return QLatin1String("Alt"); break; case Qt::MetaModifier: - return QLatin1Literal("Meta"); + return QLatin1String("Meta"); break; default: qFatal("Unexpected keyboard modifier"); @@ -331,17 +331,17 @@ static QLatin1String sectionToName(const QDateTimeEdit::Section section) { switch (section) { case QDateTimeEdit::SecondSection: - return QLatin1Literal("Second"); + return QLatin1String("Second"); case QDateTimeEdit::MinuteSection: - return QLatin1Literal("Minute"); + return QLatin1String("Minute"); case QDateTimeEdit::HourSection: - return QLatin1Literal("Hours"); + return QLatin1String("Hours"); case QDateTimeEdit::DaySection: - return QLatin1Literal("Day"); + return QLatin1String("Day"); case QDateTimeEdit::MonthSection: - return QLatin1Literal("Month"); + return QLatin1String("Month"); case QDateTimeEdit::YearSection: - return QLatin1Literal("Year"); + return QLatin1String("Year"); default: qFatal("Unexpected section"); return QLatin1String(); @@ -3217,16 +3217,16 @@ void tst_QDateTimeEdit::wheelEvent_data() QLatin1String sourceName; switch (source) { case Qt::MouseEventNotSynthesized: - sourceName = QLatin1Literal("NotSynthesized"); + sourceName = QLatin1String("NotSynthesized"); break; case Qt::MouseEventSynthesizedBySystem: - sourceName = QLatin1Literal("SynthesizedBySystem"); + sourceName = QLatin1String("SynthesizedBySystem"); break; case Qt::MouseEventSynthesizedByQt: - sourceName = QLatin1Literal("SynthesizedByQt"); + sourceName = QLatin1String("SynthesizedByQt"); break; case Qt::MouseEventSynthesizedByApplication: - sourceName = QLatin1Literal("SynthesizedByApplication"); + sourceName = QLatin1String("SynthesizedByApplication"); break; default: qFatal("Unexpected wheel event source"); diff --git a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp index 954ee6471d..a20b5568da 100644 --- a/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp +++ b/tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp @@ -221,19 +221,19 @@ static QLatin1String modifierToName(Qt::KeyboardModifier modifier) { switch (modifier) { case Qt::NoModifier: - return QLatin1Literal("No"); + return QLatin1String("No"); break; case Qt::ControlModifier: - return QLatin1Literal("Ctrl"); + return QLatin1String("Ctrl"); break; case Qt::ShiftModifier: - return QLatin1Literal("Shift"); + return QLatin1String("Shift"); break; case Qt::AltModifier: - return QLatin1Literal("Alt"); + return QLatin1String("Alt"); break; case Qt::MetaModifier: - return QLatin1Literal("Meta"); + return QLatin1String("Meta"); break; default: qFatal("Unexpected keyboard modifier"); @@ -1448,16 +1448,16 @@ void tst_QDoubleSpinBox::wheelEvents_data() QLatin1String sourceName; switch (source) { case Qt::MouseEventNotSynthesized: - sourceName = QLatin1Literal("NotSynthesized"); + sourceName = QLatin1String("NotSynthesized"); break; case Qt::MouseEventSynthesizedBySystem: - sourceName = QLatin1Literal("SynthesizedBySystem"); + sourceName = QLatin1String("SynthesizedBySystem"); break; case Qt::MouseEventSynthesizedByQt: - sourceName = QLatin1Literal("SynthesizedByQt"); + sourceName = QLatin1String("SynthesizedByQt"); break; case Qt::MouseEventSynthesizedByApplication: - sourceName = QLatin1Literal("SynthesizedByApplication"); + sourceName = QLatin1String("SynthesizedByApplication"); break; default: qFatal("Unexpected wheel event source"); diff --git a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp index 7bce23af26..3dd29b0214 100644 --- a/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp @@ -222,19 +222,19 @@ static QLatin1String modifierToName(Qt::KeyboardModifier modifier) { switch (modifier) { case Qt::NoModifier: - return QLatin1Literal("No"); + return QLatin1String("No"); break; case Qt::ControlModifier: - return QLatin1Literal("Ctrl"); + return QLatin1String("Ctrl"); break; case Qt::ShiftModifier: - return QLatin1Literal("Shift"); + return QLatin1String("Shift"); break; case Qt::AltModifier: - return QLatin1Literal("Alt"); + return QLatin1String("Alt"); break; case Qt::MetaModifier: - return QLatin1Literal("Meta"); + return QLatin1String("Meta"); break; default: qFatal("Unexpected keyboard modifier"); @@ -1402,16 +1402,16 @@ void tst_QSpinBox::wheelEvents_data() QLatin1String sourceName; switch (source) { case Qt::MouseEventNotSynthesized: - sourceName = QLatin1Literal("NotSynthesized"); + sourceName = QLatin1String("NotSynthesized"); break; case Qt::MouseEventSynthesizedBySystem: - sourceName = QLatin1Literal("SynthesizedBySystem"); + sourceName = QLatin1String("SynthesizedBySystem"); break; case Qt::MouseEventSynthesizedByQt: - sourceName = QLatin1Literal("SynthesizedByQt"); + sourceName = QLatin1String("SynthesizedByQt"); break; case Qt::MouseEventSynthesizedByApplication: - sourceName = QLatin1Literal("SynthesizedByApplication"); + sourceName = QLatin1String("SynthesizedByApplication"); break; default: qFatal("Unexpected wheel event source"); -- cgit v1.2.3