Libkleo

qtstlhelpers.cpp
1 /*
2  utils/qtstlhelpers.cpp
3 
4  This file is part of libkleopatra
5  SPDX-FileCopyrightText: 2021 g10 Code GmbH
6  SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
7 
8  SPDX-License-Identifier: GPL-2.0-or-later
9 */
10 
11 #include <config-libkleo.h>
12 
13 #include "qtstlhelpers.h"
14 
15 std::vector<std::string> Kleo::toStdStrings(const QList<QString> &list)
16 {
17  std::vector<std::string> result;
18 
19  result.reserve(list.size());
20  std::transform(std::begin(list), std::end(list), std::back_inserter(result), std::mem_fn(&QString::toStdString));
21 
22  return result;
23 }
KIOCORE_EXPORT QStringList list(const QString &fileClass)
int size() const const
std::string toStdString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 03:56:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.