summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qcalendarbackend_p.h
diff options
context:
space:
mode:
authorIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-07-22 14:28:30 +0200
committerIevgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>2021-07-27 14:58:41 +0200
commit25170b324b7db872be2a2bde5c04eb0c1e3972e5 (patch)
tree496c80ebcc36382a494f33f85fe3273bc087fdf3 /src/corelib/time/qcalendarbackend_p.h
parent7d49dc2222ddfd442face88c2243e28f5d26165f (diff)
QCalendarBackend: Use QAnyStringView to create backends by name
Combine two implementations of QCalendarBackend::byName() accepting QStringView and QLatin1String arguments into one accepting QAnyStringView to reduce code duplication. Add a note to QCalendar constructors accepting strings to do the same for Qt 7. Change-Id: Idfc3b9c61e22712543c723bd94fcd788da52780a Pick-to: 6.2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/time/qcalendarbackend_p.h')
-rw-r--r--src/corelib/time/qcalendarbackend_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/time/qcalendarbackend_p.h b/src/corelib/time/qcalendarbackend_p.h
index c3f57e7f74..83893571fc 100644
--- a/src/corelib/time/qcalendarbackend_p.h
+++ b/src/corelib/time/qcalendarbackend_p.h
@@ -56,6 +56,7 @@
#include <QtCore/qstringlist.h>
#include <QtCore/qstring.h>
#include <QtCore/qmap.h>
+#include <QtCore/qanystringview.h>
#include <QtCore/private/qlocale_p.h>
QT_BEGIN_NAMESPACE
@@ -145,8 +146,7 @@ protected:
private:
const QCalendar::SystemId m_id;
// QCalendar's access to its registry:
- static const QCalendarBackend *fromName(QStringView name);
- static const QCalendarBackend *fromName(QLatin1String name);
+ static const QCalendarBackend *fromName(QAnyStringView name);
static const QCalendarBackend *fromId(QCalendar::SystemId id);
// QCalendar's access to singletons:
static const QCalendarBackend *fromEnum(QCalendar::System system);