Akonadi

akqt.h
1 /*
2  SPDX-FileCopyrightText: 2019 Daniel Vr├ítil <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <utility>
10 
11 #include <QString>
12 #include <QStringView>
13 
14 /// Helper integration between Akonadi and Qt
15 
16 namespace Akonadi
17 {
18 template<typename DPtr, typename Slot> auto akPrivSlot(DPtr &&dptr, Slot &&slot)
19 {
20  return [&dptr, &slot](auto &&...args) {
21  (dptr->*slot)(std::forward<decltype(args)>(args)...);
22  };
23 }
24 
25 } // namespace
26 
27 inline QString operator""_qs(const char16_t *str, std::size_t len)
28 {
29  return QString(reinterpret_cast<const QChar *>(str), len);
30 }
31 
32 constexpr QStringView operator""_qsv(const char16_t *str, std::size_t len)
33 {
34  return QStringView(str, len);
35 }
36 
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.