Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
profileutils.h
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef PROFILEUTILS_H
5#define PROFILEUTILS_H
6
7#include <QtCore/qstring.h>
8#include <QtCore/qstringlist.h>
9
10#include <algorithm>
11
12using namespace Qt::Literals::StringLiterals;
13
14inline bool isProOrPriFile(const QString &filePath)
15{
16 return filePath.endsWith(".pro"_L1, Qt::CaseInsensitive)
17 || filePath.endsWith(".pri"_L1, Qt::CaseInsensitive);
18}
19
20inline QStringList extractProFiles(QStringList *files)
21{
22 QStringList result;
23 auto it = std::remove_if(files->begin(), files->end(), &isProOrPriFile);
24 if (it == files->end())
25 return result;
26 std::move(it, files->end(), std::back_inserter(result));
27 files->erase(it, files->end());
28 return result;
29}
30
31#endif // PROFILEUTILS_H
bool m_ignoreUnfinished
Definition translator.h:57
bool isProOrPriFile(const QString &filePath)
QStringList extractProFiles(QStringList *files)
std::vector< Project > Projects
static void printUsage()
Definition main.cpp:24
int main(int argc, char *argv[])
[ctor_close]
bool failOnInvalid
bool failOnUnfinished
bool removeIdentical