forked from qt-creator/qt-creator
Meson: partially clang-format all files
Change-Id: Ie621792417e89aa732311129f0cfa99a5147183a Reviewed-by: Alexis Jeandet <alexis.jeandet@member.fsf.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -46,7 +46,6 @@ class MesonTools : public QObject
|
||||
public:
|
||||
using Tool_t = std::shared_ptr<ToolWrapper>;
|
||||
|
||||
|
||||
static bool isMesonWrapper(const Tool_t &tool);
|
||||
static bool isNinjaWrapper(const Tool_t &tool);
|
||||
|
||||
|
@@ -36,14 +36,14 @@ void impl_option_cat(QStringList &list, const First &first)
|
||||
}
|
||||
|
||||
template<typename First, typename... T>
|
||||
void impl_option_cat(QStringList &list, const First &first, const T &... args)
|
||||
void impl_option_cat(QStringList &list, const First &first, const T &...args)
|
||||
{
|
||||
impl_option_cat(list, first);
|
||||
impl_option_cat(list, args...);
|
||||
}
|
||||
|
||||
template<typename... T>
|
||||
QStringList options_cat(const T &... args)
|
||||
QStringList options_cat(const T &...args)
|
||||
{
|
||||
QStringList result;
|
||||
impl_option_cat(result, args...);
|
||||
|
@@ -47,7 +47,7 @@ bool containsFiles(const QString &path, const File_t &file)
|
||||
}
|
||||
|
||||
template<typename File_t, typename... T>
|
||||
bool containsFiles(const QString &path, const File_t &file, const T &... files)
|
||||
bool containsFiles(const QString &path, const File_t &file, const T &...files)
|
||||
{
|
||||
return containsFiles(path, file) && containsFiles(path, files...);
|
||||
}
|
||||
@@ -69,14 +69,14 @@ inline bool isSetup(const Utils::FilePath &buildPath)
|
||||
{
|
||||
using namespace Utils;
|
||||
return containsFiles(buildPath.pathAppended(Constants::MESON_INFO_DIR).toString(),
|
||||
Constants::MESON_INTRO_TESTS,
|
||||
Constants::MESON_INTRO_TARGETS,
|
||||
Constants::MESON_INTRO_INSTALLED,
|
||||
Constants::MESON_INTRO_BENCHMARKS,
|
||||
Constants::MESON_INTRO_BUIDOPTIONS,
|
||||
Constants::MESON_INTRO_PROJECTINFO,
|
||||
Constants::MESON_INTRO_DEPENDENCIES,
|
||||
Constants::MESON_INTRO_BUILDSYSTEM_FILES);
|
||||
Constants::MESON_INTRO_TESTS,
|
||||
Constants::MESON_INTRO_TARGETS,
|
||||
Constants::MESON_INTRO_INSTALLED,
|
||||
Constants::MESON_INTRO_BENCHMARKS,
|
||||
Constants::MESON_INTRO_BUIDOPTIONS,
|
||||
Constants::MESON_INTRO_PROJECTINFO,
|
||||
Constants::MESON_INTRO_DEPENDENCIES,
|
||||
Constants::MESON_INTRO_BUILDSYSTEM_FILES);
|
||||
}
|
||||
|
||||
class MesonWrapper final : public ToolWrapper
|
||||
@@ -92,13 +92,13 @@ public:
|
||||
const QStringList &options = {}) const;
|
||||
|
||||
Command regenerate(const Utils::FilePath &sourceDirectory,
|
||||
const Utils::FilePath &buildDirectory)const;
|
||||
const Utils::FilePath &buildDirectory) const;
|
||||
|
||||
Command introspect(const Utils::FilePath &sourceDirectory) const;
|
||||
|
||||
static inline Utils::optional<Utils::FilePath> find()
|
||||
{
|
||||
return ToolWrapper::findTool({"meson.py","meson"});
|
||||
return ToolWrapper::findTool({"meson.py", "meson"});
|
||||
}
|
||||
|
||||
static inline QString toolName() { return {"Meson"}; };
|
||||
|
@@ -38,8 +38,7 @@ namespace Internal {
|
||||
class BuildSystemFilesParser
|
||||
{
|
||||
std::vector<Utils::FilePath> m_files;
|
||||
static void appendFiles(const Utils::optional<QJsonArray> &arr,
|
||||
std::vector<Utils::FilePath> &dest)
|
||||
static void appendFiles(const Utils::optional<QJsonArray> &arr, std::vector<Utils::FilePath> &dest)
|
||||
{
|
||||
if (arr)
|
||||
std::transform(std::cbegin(*arr),
|
||||
|
@@ -101,9 +101,7 @@ inline Utils::optional<QJsonObject> get<QJsonObject>(const QJsonObject &obj, con
|
||||
}
|
||||
|
||||
template<typename T, typename... Strings>
|
||||
inline Utils::optional<T> get(const QJsonObject &obj,
|
||||
const QString &firstPath,
|
||||
const Strings &... path)
|
||||
inline Utils::optional<T> get(const QJsonObject &obj, const QString &firstPath, const Strings &...path)
|
||||
{
|
||||
if (obj.contains(firstPath))
|
||||
return get<T>(obj[firstPath].toObject(), path...);
|
||||
|
@@ -32,7 +32,6 @@
|
||||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
|
||||
|
||||
namespace MesonProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
|
@@ -81,13 +81,12 @@ void ToolsModel::apply()
|
||||
if (item->hasUnsavedChanges()) {
|
||||
MesonTools::updateTool(item->id(), item->name(), item->executable());
|
||||
item->setSaved();
|
||||
emit this->dataChanged(item->index(),item->index());
|
||||
emit this->dataChanged(item->index(), item->index());
|
||||
}
|
||||
});
|
||||
while (!m_itemsToRemove.isEmpty()) {
|
||||
MesonTools::removeTool(m_itemsToRemove.dequeue());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ToolsModel::addMesonTool(const MesonTools::Tool_t &tool)
|
||||
|
@@ -26,8 +26,8 @@
|
||||
#pragma once
|
||||
#include "toolssettingspage.h"
|
||||
#include <exewrappers/mesontools.h>
|
||||
#include <utils/id.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/id.h>
|
||||
#include <utils/optional.h>
|
||||
#include <utils/treemodel.h>
|
||||
#include <QCoreApplication>
|
||||
|
Reference in New Issue
Block a user