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
15std::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)
qsizetype 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 Fri Dec 6 2024 12:02:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.