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:
Alexis Jeandet
2020-10-27 22:36:27 +01:00
committed by hjk
parent e35dfd592f
commit 09eeab7737
8 changed files with 17 additions and 23 deletions

View File

@@ -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);

View File

@@ -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...);

View File

@@ -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...);
}
@@ -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"}; };

View File

@@ -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),

View File

@@ -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...);

View File

@@ -32,7 +32,6 @@
#include <QTimer>
#include <QWidget>
namespace MesonProjectManager {
namespace Internal {

View File

@@ -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)

View File

@@ -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>