Akonadi

akstd.h
1 /*
2  SPDX-FileCopyrightText: 2019 Daniel Vrátil <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef AKSTD_H_
8 #define AKSTD_H_
9 
10 #include <functional>
11 
12 #include <QString>
13 #include <QHash>
14 
16 
17 namespace std {
18 
19 #if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
20 template<>
21 struct hash<QString> {
22  using argument_type = QString;
23  using result_type = std::size_t;
24 
25  result_type operator()(const QString &s) const noexcept
26  {
27  return qHash(s);
28  }
29 };
30 #endif
31 
32 }
33 
34 #endif
A glue between Qt and the standard library.
KCALENDARCORE_EXPORT uint qHash(const KCalendarCore::Period &key)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Nov 28 2020 23:17:14 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.