Meson: Make spacing and #include ordering a bit more consistent

Not 100%, but a step forward.

Change-Id: I6957edbd24c1652b228a96a68424b857603aae45
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-10-29 10:20:14 +01:00
parent 09eeab7737
commit eedb702bb9
84 changed files with 394 additions and 130 deletions

View File

@@ -24,6 +24,7 @@
****************************************************************************/ ****************************************************************************/
#include "mesontools.h" #include "mesontools.h"
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -22,16 +22,16 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "mesonpluginconstants.h"
#include "mesonwrapper.h" #include "mesonwrapper.h"
#include "ninjawrapper.h" #include "ninjawrapper.h"
#include "toolwrapper.h" #include "toolwrapper.h"
#include <mesonpluginconstants.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <QObject>
#include <memory> #include <memory>
namespace MesonProjectManager { namespace MesonProjectManager {

View File

@@ -24,8 +24,10 @@
****************************************************************************/ ****************************************************************************/
#include "mesonwrapper.h" #include "mesonwrapper.h"
#include "utils/algorithm.h"
#include "utils/qtcassert.h" #include <utils/algorithm.h>
#include <utils/qtcassert.h>
#include <QUuid> #include <QUuid>
namespace { namespace {

View File

@@ -24,19 +24,22 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "../mesonpluginconstants.h" #include "../mesonpluginconstants.h"
#include "toolwrapper.h" #include "toolwrapper.h"
#include "utils/environment.h"
#include "utils/fileutils.h" #include <utils/environment.h>
#include <utils/fileutils.h>
#include <utils/id.h> #include <utils/id.h>
#include "utils/optional.h" #include <utils/optional.h>
#include <tuple>
#include <QFile> #include <QFile>
#include <QFileInfo> #include <QFileInfo>
#include <QObject>
#include <QProcess> #include <QProcess>
#include <QTemporaryFile> #include <QTemporaryFile>
#include <tuple>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -21,10 +21,13 @@
** information to ensure the GNU General Public License requirements will ** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ **************************************************************************/
#pragma once #pragma once
#include "../mesonpluginconstants.h" #include "../mesonpluginconstants.h"
#include "toolwrapper.h" #include "toolwrapper.h"
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -22,6 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#include "toolwrapper.h" #include "toolwrapper.h"
namespace MesonProjectManager { namespace MesonProjectManager {

View File

@@ -22,15 +22,18 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "versionhelper.h"
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/id.h> #include <utils/id.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <versionhelper.h>
#include <QFileInfo> #include <QFileInfo>
#include <QProcess> #include <QProcess>
#include <QString>
#include <QUuid> #include <QUuid>
#include <QVariant> #include <QVariant>
#include <QVariantMap> #include <QVariantMap>

View File

@@ -22,11 +22,16 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <utils/cpplanguage_details.h> #include <utils/cpplanguage_details.h>
#include <QString> #include <QString>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
struct KitData struct KitData
{ {
QString cCompilerPath; QString cCompilerPath;

View File

@@ -22,22 +22,29 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once
#include "kitdata.h" #include "kitdata.h"
#include "versionhelper.h"
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
#include <utils/macroexpander.h> #include <utils/macroexpander.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <versionhelper.h>
#include <QString>
#pragma once
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
namespace KitHelper { namespace KitHelper {
namespace details { namespace details {
inline QString expand(const ProjectExplorer::Kit *kit, const QString &macro) inline QString expand(const ProjectExplorer::Kit *kit, const QString &macro)
{ {
return kit->macroExpander()->expand(macro); return kit->macroExpander()->expand(macro);
} }
} // namespace details } // namespace details
inline QString cCompilerPath(const ProjectExplorer::Kit *kit) inline QString cCompilerPath(const ProjectExplorer::Kit *kit)

View File

@@ -24,12 +24,16 @@
****************************************************************************/ ****************************************************************************/
#include "machinefilemanager.h" #include "machinefilemanager.h"
#include "kithelper/kitdata.h"
#include "kithelper/kithelper.h"
#include "nativefilegenerator.h" #include "nativefilegenerator.h"
#include <kithelper/kitdata.h>
#include <kithelper/kithelper.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <utils/optional.h> #include <utils/optional.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <QDir> #include <QDir>
#include <QFile> #include <QFile>
#include <QRegularExpression> #include <QRegularExpression>

View File

@@ -22,11 +22,13 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <projectexplorer/kitmanager.h> #include <projectexplorer/kitmanager.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <QObject>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -22,17 +22,22 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#include "nativefilegenerator.h" #include "nativefilegenerator.h"
#include <kithelper/kithelper.h>
#include "kithelper/kithelper.h"
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/kitmanager.h> #include <projectexplorer/kitmanager.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/toolchain.h> #include <projectexplorer/toolchain.h>
#include <utils/macroexpander.h> #include <utils/macroexpander.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
NativeFileGenerator::NativeFileGenerator() {} NativeFileGenerator::NativeFileGenerator() {}
inline void addEntry(QIODevice *nativeFile, const QString &key, const QString &value) inline void addEntry(QIODevice *nativeFile, const QString &key, const QString &value)
@@ -58,5 +63,6 @@ void NativeFileGenerator::makeNativeFile(QIODevice *nativeFile, const KitData &k
QTC_ASSERT(nativeFile, return ); QTC_ASSERT(nativeFile, return );
writeBinariesSection(nativeFile, kitData); writeBinariesSection(nativeFile, kitData);
} }
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,12 +22,18 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <kithelper/kitdata.h>
#include "kithelper/kitdata.h"
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <QIODevice> #include <QIODevice>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class NativeFileGenerator class NativeFileGenerator
{ {
NativeFileGenerator(); NativeFileGenerator();
@@ -35,5 +41,6 @@ class NativeFileGenerator
public: public:
static void makeNativeFile(QIODevice *nativeFile, const KitData &kitData); static void makeNativeFile(QIODevice *nativeFile, const KitData &kitData);
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,14 +24,18 @@
****************************************************************************/ ****************************************************************************/
#include "mesonactionsmanager.h" #include "mesonactionsmanager.h"
#include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <project/mesonbuildsystem.h> #include <project/mesonbuildsystem.h>
#include <project/projecttree/mesonprojectnodes.h> #include <project/projecttree/mesonprojectnodes.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projecttree.h> #include <projectexplorer/projecttree.h>
#include <utils/parameteraction.h> #include <utils/parameteraction.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -22,12 +22,14 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <utils/parameteraction.h> #include <utils/parameteraction.h>
#include <QAction>
#include <QObject>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonActionsManager : public QObject class MesonActionsManager : public QObject
{ {
Q_OBJECT Q_OBJECT
@@ -42,5 +44,6 @@ class MesonActionsManager : public QObject
public: public:
MesonActionsManager(); MesonActionsManager();
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,17 +22,19 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/optional.h> #include <utils/optional.h>
#include <QCheckBox> #include <QCheckBox>
#include <QComboBox> #include <QComboBox>
#include <QLabel> #include <QLabel>
#include <QLineEdit> #include <QLineEdit>
#include <QSpinBox> #include <QSpinBox>
#include <QString>
#include <QVariant> #include <QVariant>
#include <QWidget>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -22,13 +22,18 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <versionhelper.h>
#include "versionhelper.h"
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
struct MesonInfo struct MesonInfo
{ {
Version mesonVersion; Version mesonVersion;
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,7 +22,9 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "buildoptions.h" #include "buildoptions.h"
#include "mesoninfo.h" #include "mesoninfo.h"
#include "parsers/buildoptionsparser.h" #include "parsers/buildoptionsparser.h"
@@ -30,15 +32,17 @@
#include "parsers/infoparser.h" #include "parsers/infoparser.h"
#include "parsers/targetparser.h" #include "parsers/targetparser.h"
#include "target.h" #include "target.h"
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/optional.h> #include <utils/optional.h>
#include <QString>
#include <QVariant>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonInfoParserPrivate; class MesonInfoParserPrivate;
namespace MesonInfoParser { namespace MesonInfoParser {
struct Result struct Result
{ {
TargetsList targets; TargetsList targets;

View File

@@ -22,10 +22,12 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "../../mesonpluginconstants.h" #include "../../mesonpluginconstants.h"
#include "../buildoptions.h" #include "../buildoptions.h"
#include "./common.h" #include "common.h"
#include <QFile> #include <QFile>
#include <QJsonArray> #include <QJsonArray>
@@ -113,5 +115,6 @@ public:
return std::move(m_buildOptions); return std::move(m_buildOptions);
} }
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,10 +22,14 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "../../mesonpluginconstants.h" #include "../../mesonpluginconstants.h"
#include "./common.h" #include "common.h"
#include "utils/fileutils.h"
#include <utils/fileutils.h>
#include <QFile> #include <QFile>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
@@ -72,5 +76,6 @@ public:
std::vector<Utils::FilePath> files() { return m_files; }; std::vector<Utils::FilePath> files() { return m_files; };
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,8 +22,11 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <utils/optional.h> #include <utils/optional.h>
#include <QFile> #include <QFile>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>

View File

@@ -22,10 +22,12 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "../../mesonpluginconstants.h" #include "../../mesonpluginconstants.h"
#include "../mesoninfo.h" #include "../mesoninfo.h"
#include "./common.h"
#include <QFile> #include <QFile>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
@@ -65,5 +67,6 @@ public:
} }
MesonInfo info() { return m_info; } MesonInfo info() { return m_info; }
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,10 +22,12 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "../../mesonpluginconstants.h" #include "../../mesonpluginconstants.h"
#include "../target.h" #include "../target.h"
#include "./common.h"
#include <QFile> #include <QFile>
#include <QJsonArray> #include <QJsonArray>
#include <QJsonDocument> #include <QJsonDocument>
@@ -102,5 +104,6 @@ public:
inline TargetsList targetList() { return m_targets; } inline TargetsList targetList() { return m_targets; }
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,12 +22,14 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/optional.h> #include <utils/optional.h>
#include <QDir> #include <QDir>
#include <QString>
#include <QVariant> #include <QVariant>
namespace MesonProjectManager { namespace MesonProjectManager {

View File

@@ -24,6 +24,7 @@
****************************************************************************/ ****************************************************************************/
#include "mesonprojectplugin.h" #include "mesonprojectplugin.h"
#include "exewrappers/mesonwrapper.h" #include "exewrappers/mesonwrapper.h"
#include "machinefiles/machinefilemanager.h" #include "machinefiles/machinefilemanager.h"
#include "mesonactionsmanager/mesonactionsmanager.h" #include "mesonactionsmanager/mesonactionsmanager.h"

View File

@@ -22,18 +22,22 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#include <coreplugin/find/itemviewfind.h>
#include <projectexplorer/buildaspects.h> #include "mesonbuildsettingswidget.h"
#include <projectexplorer/projectconfiguration.h>
#include <utils/detailswidget.h>
#include <utils/headerviewstretcher.h>
#include <utils/layoutbuilder.h>
#include "../mesonbuildconfiguration.h" #include "../mesonbuildconfiguration.h"
#include "../mesonbuildsystem.h" #include "../mesonbuildsystem.h"
#include "mesonbuildsettingswidget.h"
#include "ui_mesonbuildsettingswidget.h" #include "ui_mesonbuildsettingswidget.h"
#include <coreplugin/find/itemviewfind.h>
#include <projectexplorer/buildaspects.h>
#include <projectexplorer/projectconfiguration.h>
#include <utils/detailswidget.h>
#include <utils/headerviewstretcher.h>
#include <utils/layoutbuilder.h>
using namespace Utils; using namespace Utils;
namespace MesonProjectManager { namespace MesonProjectManager {

View File

@@ -22,15 +22,17 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "optionsmodel/buildoptionsmodel.h" #include "optionsmodel/buildoptionsmodel.h"
#include <projectexplorer/namedwidget.h>
#include <utils/categorysortfiltermodel.h> #include <utils/categorysortfiltermodel.h>
#include <utils/progressindicator.h> #include <utils/progressindicator.h>
#include <projectexplorer/namedwidget.h>
#include <QTimer> #include <QTimer>
#include <QWidget>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -24,8 +24,10 @@
****************************************************************************/ ****************************************************************************/
#include "arrayoptionlineedit.h" #include "arrayoptionlineedit.h"
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
ArrayOptionLineEdit::ArrayOptionLineEdit(QWidget *parent) ArrayOptionLineEdit::ArrayOptionLineEdit(QWidget *parent)
: QPlainTextEdit(parent) : QPlainTextEdit(parent)
{ {
@@ -84,5 +86,6 @@ void RegexHighlighter::highlightBlock(const QString &text)
} }
} }
} }
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,12 +22,13 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <QColor> #include <QColor>
#include <QPlainTextEdit> #include <QPlainTextEdit>
#include <QRegularExpression> #include <QRegularExpression>
#include <QSyntaxHighlighter> #include <QSyntaxHighlighter>
#include <QWidget>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
@@ -56,5 +57,6 @@ public:
protected: protected:
void keyPressEvent(QKeyEvent *e) override; void keyPressEvent(QKeyEvent *e) override;
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,7 +24,9 @@
****************************************************************************/ ****************************************************************************/
#include "buildoptionsmodel.h" #include "buildoptionsmodel.h"
#include "arrayoptionlineedit.h" #include "arrayoptionlineedit.h"
#include <QComboBox> #include <QComboBox>
#include <QLabel> #include <QLabel>
#include <QLineEdit> #include <QLineEdit>

View File

@@ -22,7 +22,9 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "mesoninfoparser/mesoninfoparser.h" #include "mesoninfoparser/mesoninfoparser.h"
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -31,7 +33,6 @@
#include <QAbstractTableModel> #include <QAbstractTableModel>
#include <QFont> #include <QFont>
#include <QItemEditorFactory> #include <QItemEditorFactory>
#include <QObject>
#include <QStyledItemDelegate> #include <QStyledItemDelegate>
namespace MesonProjectManager { namespace MesonProjectManager {

View File

@@ -23,6 +23,15 @@
** **
****************************************************************************/ ****************************************************************************/
#include "mesonbuildconfiguration.h"
#include "buildoptions/mesonbuildsettingswidget.h"
#include "exewrappers/mesonwrapper.h"
#include "mesonbuildsystem.h"
#include "mesonpluginconstants.h"
#include "mesonpluginconstants.h"
#include "ninjabuildstep.h"
#include <projectexplorer/buildinfo.h> #include <projectexplorer/buildinfo.h>
#include <projectexplorer/buildmanager.h> #include <projectexplorer/buildmanager.h>
#include <projectexplorer/buildstep.h> #include <projectexplorer/buildstep.h>
@@ -31,20 +40,14 @@
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectmacroexpander.h> #include <projectexplorer/projectmacroexpander.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <QDir> #include <QDir>
#include "buildoptions/mesonbuildsettingswidget.h"
#include "mesonbuildconfiguration.h"
#include "mesonbuildsystem.h"
#include "mesonpluginconstants.h"
#include "ninjabuildstep.h"
#include <exewrappers/mesonwrapper.h>
#include <mesonpluginconstants.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
MesonBuildConfiguration::MesonBuildConfiguration(ProjectExplorer::Target *target, Utils::Id id) MesonBuildConfiguration::MesonBuildConfiguration(ProjectExplorer::Target *target, Utils::Id id)
: ProjectExplorer::BuildConfiguration{target, id} : ProjectExplorer::BuildConfiguration{target, id}
{ {

View File

@@ -125,5 +125,6 @@ class MesonBuildConfigurationFactory final : public ProjectExplorer::BuildConfig
public: public:
MesonBuildConfigurationFactory(); MesonBuildConfigurationFactory();
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,17 +24,20 @@
****************************************************************************/ ****************************************************************************/
#include "mesonbuildsystem.h" #include "mesonbuildsystem.h"
#include "mesonbuildconfiguration.h" #include "mesonbuildconfiguration.h"
#include <kithelper/kithelper.h> #include "kithelper/kithelper.h"
#include <machinefiles/machinefilemanager.h> #include "machinefiles/machinefilemanager.h"
#include "settings/general/settings.h"
#include "settings/tools/kitaspect/mesontoolkitaspect.h"
#include <projectexplorer/buildconfiguration.h> #include <projectexplorer/buildconfiguration.h>
#include <settings/general/settings.h>
#include <settings/tools/kitaspect/mesontoolkitaspect.h> #include <qtsupport/qtcppkitinfo.h>
#include <qtsupport/qtkitinformation.h>
#include <QDir> #include <QDir>
#include <QLoggingCategory> #include <QLoggingCategory>
#include <qtsupport/qtcppkitinfo.h>
#include <qtsupport/qtkitinformation.h>
#define LEAVE_IF_BUSY() \ #define LEAVE_IF_BUSY() \
{ \ { \

View File

@@ -22,19 +22,23 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "mesonprojectparser.h" #include "mesonprojectparser.h"
#include <exewrappers/mesonwrapper.h> #include "exewrappers/mesonwrapper.h"
#include <kithelper/kitdata.h> #include "kithelper/kitdata.h"
#include <cpptools/cppprojectupdater.h> #include <cpptools/cppprojectupdater.h>
#include <projectexplorer/buildsystem.h> #include <projectexplorer/buildsystem.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <utils/filesystemwatcher.h> #include <utils/filesystemwatcher.h>
#include <QObject>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonBuildConfiguration; class MesonBuildConfiguration;
class MesonBuildSystem final : public ProjectExplorer::BuildSystem class MesonBuildSystem final : public ProjectExplorer::BuildSystem
{ {
@@ -73,5 +77,6 @@ private:
Utils::FileSystemWatcher m_IntroWatcher; Utils::FileSystemWatcher m_IntroWatcher;
KitData m_kitData; KitData m_kitData;
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,18 +24,22 @@
****************************************************************************/ ****************************************************************************/
#include "mesonprocess.h" #include "mesonprocess.h"
#include "outputparsers/mesonoutputparser.h" #include "outputparsers/mesonoutputparser.h"
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
#include <coreplugin/progressmanager/progressmanager.h> #include <coreplugin/progressmanager/progressmanager.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/taskhub.h> #include <projectexplorer/taskhub.h>
#include <utils/stringutils.h> #include <utils/stringutils.h>
#include <QLoggingCategory> #include <QLoggingCategory>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
static Q_LOGGING_CATEGORY(mesonProcessLog, "qtc.meson.buildsystem", QtDebugMsg); static Q_LOGGING_CATEGORY(mesonProcessLog, "qtc.meson.buildsystem", QtDebugMsg);
MesonProcess::MesonProcess() MesonProcess::MesonProcess()

View File

@@ -22,8 +22,10 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <exewrappers/mesonwrapper.h>
#include "exewrappers/mesonwrapper.h"
#include <utils/qtcprocess.h> #include <utils/qtcprocess.h>
@@ -39,6 +41,7 @@
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonProcess final : public QObject class MesonProcess final : public QObject
{ {
Q_OBJECT Q_OBJECT
@@ -83,5 +86,6 @@ private:
QByteArray m_stderr; QByteArray m_stderr;
Command m_currentCommand; Command m_currentCommand;
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,18 +24,22 @@
****************************************************************************/ ****************************************************************************/
#include "mesonproject.h" #include "mesonproject.h"
#include "mesonbuildsystem.h" #include "mesonbuildsystem.h"
#include "mesonpluginconstants.h" #include "mesonpluginconstants.h"
#include <exewrappers/mesontools.h> #include "exewrappers/mesontools.h"
#include <settings/tools/kitaspect/mesontoolkitaspect.h> #include "settings/tools/kitaspect/mesontoolkitaspect.h"
#include <settings/tools/kitaspect/ninjatoolkitaspect.h> #include "settings/tools/kitaspect/ninjatoolkitaspect.h"
#include <coreplugin/icontext.h> #include <coreplugin/icontext.h>
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
MesonProject::MesonProject(const Utils::FilePath &path) MesonProject::MesonProject(const Utils::FilePath &path)
: ProjectExplorer::Project{Constants::Project::MIMETYPE, path} : ProjectExplorer::Project{Constants::Project::MIMETYPE, path}
{ {

View File

@@ -22,18 +22,21 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "exewrappers/mesonwrapper.h" #include "exewrappers/mesonwrapper.h"
#include "mesonprojectimporter.h" #include "mesonprojectimporter.h"
#include "projectexplorer/project.h" #include <projectexplorer/project.h>
#include "projectexplorer/projectimporter.h" #include <projectexplorer/projectimporter.h>
#include "projectexplorer/task.h" #include <projectexplorer/task.h>
#include "utils/fileutils.h"
#include <QObject> #include <utils/fileutils.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonProject final : public ProjectExplorer::Project class MesonProject final : public ProjectExplorer::Project
{ {
Q_OBJECT Q_OBJECT

View File

@@ -22,6 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#include "mesonprojectimporter.h" #include "mesonprojectimporter.h"
#include <QLoggingCategory> #include <QLoggingCategory>
@@ -32,6 +33,7 @@ static Q_LOGGING_CATEGORY(mInputLog, "qtc.meson.import", QtWarningMsg);
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
MesonProjectImporter::MesonProjectImporter(const Utils::FilePath &path) MesonProjectImporter::MesonProjectImporter(const Utils::FilePath &path)
: QtSupport::QtProjectImporter{path} : QtSupport::QtProjectImporter{path}
{} {}

View File

@@ -22,16 +22,19 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "exewrappers/mesonwrapper.h" #include "exewrappers/mesonwrapper.h"
#include "projectexplorer/buildinfo.h" #include <projectexplorer/buildinfo.h>
#include "projectexplorer/kit.h" #include <projectexplorer/kit.h>
#include "qtsupport/qtprojectimporter.h"
#include <qtsupport/qtprojectimporter.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonProjectImporter final : public QtSupport::QtProjectImporter class MesonProjectImporter final : public QtSupport::QtProjectImporter
{ {
public: public:
@@ -50,5 +53,6 @@ private:
virtual void deleteDirectoryData(void *directoryData) const final; virtual void deleteDirectoryData(void *directoryData) const final;
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,14 +22,18 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#include "mesonprojectparser.h" #include "mesonprojectparser.h"
#include "projecttree/mesonprojectnodes.h" #include "projecttree/mesonprojectnodes.h"
#include "projecttree/projecttree.h" #include "projecttree/projecttree.h"
#include <exewrappers/mesontools.h> #include "exewrappers/mesontools.h"
#include <mesoninfoparser/mesoninfoparser.h> #include "mesoninfoparser/mesoninfoparser.h"
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <utils/fileinprojectfinder.h> #include <utils/fileinprojectfinder.h>
#include <utils/optional.h> #include <utils/optional.h>
#include <utils/runextensions.h> #include <utils/runextensions.h>

View File

@@ -22,25 +22,30 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "exewrappers/mesonwrapper.h"
#include "kithelper/kitdata.h"
#include "mesoninfoparser/mesoninfoparser.h"
#include "mesonprocess.h"
#include "outputparsers/mesonoutputparser.h" #include "outputparsers/mesonoutputparser.h"
#include "projecttree/mesonprojectnodes.h" #include "projecttree/mesonprojectnodes.h"
#include "mesonprocess.h"
#include <exewrappers/mesonwrapper.h>
#include <kithelper/kitdata.h>
#include <mesoninfoparser/mesoninfoparser.h>
#include <projectexplorer/buildsystem.h> #include <projectexplorer/buildsystem.h>
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <projectexplorer/rawprojectpart.h> #include <projectexplorer/rawprojectpart.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <QFuture> #include <QFuture>
#include <QFutureWatcher> #include <QFutureWatcher>
#include <QObject>
#include <QQueue> #include <QQueue>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonProjectParser : public QObject class MesonProjectParser : public QObject
{ {
Q_OBJECT Q_OBJECT
@@ -127,5 +132,6 @@ private:
// also this should ease command dependencies // also this should ease command dependencies
QQueue<std::tuple<Command, bool>> m_pendingCommands; QQueue<std::tuple<Command, bool>> m_pendingCommands;
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,18 +22,23 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#include "mesonrunconfiguration.h" #include "mesonrunconfiguration.h"
#include <mesonpluginconstants.h>
#include "mesonpluginconstants.h"
#include <projectexplorer/buildsystem.h> #include <projectexplorer/buildsystem.h>
#include <projectexplorer/desktoprunconfiguration.h> #include <projectexplorer/desktoprunconfiguration.h>
#include <projectexplorer/environmentaspect.h> #include <projectexplorer/environmentaspect.h>
#include <projectexplorer/localenvironmentaspect.h> #include <projectexplorer/localenvironmentaspect.h>
#include <projectexplorer/runconfigurationaspects.h> #include <projectexplorer/runconfigurationaspects.h>
#include <utils/environment.h> #include <utils/environment.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <QLatin1String>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
MesonRunConfiguration::MesonRunConfiguration(ProjectExplorer::Target *target, Utils::Id id) MesonRunConfiguration::MesonRunConfiguration(ProjectExplorer::Target *target, Utils::Id id)
: ProjectExplorer::RunConfiguration{target, id} : ProjectExplorer::RunConfiguration{target, id}
{ {

View File

@@ -22,13 +22,16 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <projectexplorer/desktoprunconfiguration.h> #include <projectexplorer/desktoprunconfiguration.h>
#include <projectexplorer/runconfiguration.h> #include <projectexplorer/runconfiguration.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonRunConfiguration final : public ProjectExplorer::RunConfiguration class MesonRunConfiguration final : public ProjectExplorer::RunConfiguration
{ {
public: public:

View File

@@ -25,12 +25,12 @@
#include "ninjabuildstep.h" #include "ninjabuildstep.h"
#include "outputparsers/mesonoutputparser.h"
#include "mesonbuildconfiguration.h" #include "mesonbuildconfiguration.h"
#include "mesonbuildsystem.h" #include "mesonbuildsystem.h"
#include "mesonpluginconstants.h" #include "mesonpluginconstants.h"
#include <settings/general/settings.h> #include "outputparsers/mesonoutputparser.h"
#include <settings/tools/kitaspect/ninjatoolkitaspect.h> #include "settings/general/settings.h"
#include "settings/tools/kitaspect/ninjatoolkitaspect.h"
#include <coreplugin/find/itemviewfind.h> #include <coreplugin/find/itemviewfind.h>
@@ -50,6 +50,7 @@ using namespace Utils;
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
const char TARGETS_KEY[] = "MesonProjectManager.BuildStep.BuildTargets"; const char TARGETS_KEY[] = "MesonProjectManager.BuildStep.BuildTargets";
const char TOOL_ARGUMENTS_KEY[] = "MesonProjectManager.BuildStep.AdditionalArguments"; const char TOOL_ARGUMENTS_KEY[] = "MesonProjectManager.BuildStep.AdditionalArguments";

View File

@@ -22,16 +22,19 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "outputparsers/ninjaparser.h" #include "outputparsers/ninjaparser.h"
#include <projectexplorer/abstractprocessstep.h> #include <projectexplorer/abstractprocessstep.h>
#include <projectexplorer/buildstep.h> #include <projectexplorer/buildstep.h>
#include <utils/qtcprocess.h> #include <utils/qtcprocess.h>
#include <QObject>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class NinjaBuildStep final : public ProjectExplorer::AbstractProcessStep class NinjaBuildStep final : public ProjectExplorer::AbstractProcessStep
{ {
Q_OBJECT Q_OBJECT

View File

@@ -22,9 +22,12 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#include "mesonoutputparser.h" #include "mesonoutputparser.h"
#include <projectexplorer/task.h> #include <projectexplorer/task.h>
#include <projectexplorer/taskhub.h> #include <projectexplorer/taskhub.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -22,15 +22,20 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "projectexplorer/ioutputparser.h"
#include "utils/outputformatter.h" #include <projectexplorer/ioutputparser.h>
#include <array>
#include <QObject> #include <utils/outputformatter.h>
#include <QRegularExpression> #include <QRegularExpression>
#include <array>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonOutputParser final : public ProjectExplorer::OutputTaskParser class MesonOutputParser final : public ProjectExplorer::OutputTaskParser
{ {
Q_OBJECT Q_OBJECT

View File

@@ -24,9 +24,12 @@
****************************************************************************/ ****************************************************************************/
#include "ninjaparser.h" #include "ninjaparser.h"
#include <utils/fileutils.h> #include <utils/fileutils.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
NinjaParser::NinjaParser() {} NinjaParser::NinjaParser() {}
Utils::optional<int> NinjaParser::extractProgress(const QString &line) Utils::optional<int> NinjaParser::extractProgress(const QString &line)

View File

@@ -22,14 +22,19 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <projectexplorer/ioutputparser.h> #include <projectexplorer/ioutputparser.h>
#include <projectexplorer/task.h> #include <projectexplorer/task.h>
#include <utils/optional.h> #include <utils/optional.h>
#include <QObject>
#include <QRegularExpression> #include <QRegularExpression>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class NinjaParser final : public ProjectExplorer::OutputTaskParser class NinjaParser final : public ProjectExplorer::OutputTaskParser
{ {
Q_OBJECT Q_OBJECT
@@ -45,5 +50,6 @@ public:
bool hasFatalErrors() const override; bool hasFatalErrors() const override;
Q_SIGNAL void reportProgress(int progress); Q_SIGNAL void reportProgress(int progress);
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,11 +24,14 @@
****************************************************************************/ ****************************************************************************/
#include "mesonprojectnodes.h" #include "mesonprojectnodes.h"
#include <project/mesonbuildconfiguration.h>
#include <project/mesonbuildsystem.h> #include "project/mesonbuildconfiguration.h"
#include <mesonpluginconstants.h> #include "project/mesonbuildsystem.h"
#include "mesonpluginconstants.h"
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -22,13 +22,18 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <coreplugin/fileiconprovider.h> #include <coreplugin/fileiconprovider.h>
#include <projectexplorer/projectnodes.h> #include <projectexplorer/projectnodes.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonProjectNode : public ProjectExplorer::ProjectNode class MesonProjectNode : public ProjectExplorer::ProjectNode
{ {
public: public:
@@ -57,5 +62,6 @@ public:
return filePath().pathAppended("meson.build"); return filePath().pathAppended("meson.build");
} }
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,10 +22,14 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#include "projecttree.h" #include "projecttree.h"
#include <set> #include <set>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
ProjectTree::ProjectTree() {} ProjectTree::ProjectTree() {}
void buildTargetTree(std::unique_ptr<MesonProjectNode> &root, const Target &target) void buildTargetTree(std::unique_ptr<MesonProjectNode> &root, const Target &target)
@@ -93,5 +97,6 @@ std::unique_ptr<MesonProjectNode> ProjectTree::buildTree(const Utils::FilePath &
} }
return root; return root;
} }
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,12 +22,17 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "mesoninfoparser/mesoninfoparser.h" #include "mesoninfoparser/mesoninfoparser.h"
#include "mesonprojectnodes.h" #include "mesonprojectnodes.h"
#include <utils/fileutils.h> #include <utils/fileutils.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class ProjectTree class ProjectTree
{ {
public: public:

View File

@@ -24,10 +24,10 @@
****************************************************************************/ ****************************************************************************/
#include "generalsettingspage.h" #include "generalsettingspage.h"
#include "generalsettingswidget.h"
#include "settings.h"
#include <mesonpluginconstants.h> #include "generalsettingswidget.h"
#include "mesonpluginconstants.h"
#include "settings.h"
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -31,7 +31,9 @@
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonTools; class MesonTools;
class GeneralSettingsPage final : public Core::IOptionsPage class GeneralSettingsPage final : public Core::IOptionsPage
{ {
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::GeneralSettingsPage) Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::GeneralSettingsPage)

View File

@@ -24,11 +24,13 @@
****************************************************************************/ ****************************************************************************/
#include "generalsettingswidget.h" #include "generalsettingswidget.h"
#include "settings.h" #include "settings.h"
#include "ui_generalsettingswidget.h" #include "ui_generalsettingswidget.h"
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
GeneralSettingsWidget::GeneralSettingsWidget() GeneralSettingsWidget::GeneralSettingsWidget()
: Core::IOptionsPageWidget() : Core::IOptionsPageWidget()
, ui(new Ui::GeneralSettingsWidget) , ui(new Ui::GeneralSettingsWidget)
@@ -48,5 +50,6 @@ void GeneralSettingsWidget::apply()
Settings::setAutorunMeson(ui->autorunChkBox->isChecked()); Settings::setAutorunMeson(ui->autorunChkBox->isChecked());
Settings::setVerboseNinja(ui->verboseNinjaChkBox->isChecked()); Settings::setVerboseNinja(ui->verboseNinjaChkBox->isChecked());
} }
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,6 +24,7 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <coreplugin/dialogs/ioptionspage.h> #include <coreplugin/dialogs/ioptionspage.h>
#include <QCoreApplication> #include <QCoreApplication>
@@ -47,5 +48,6 @@ public:
private: private:
Ui::GeneralSettingsWidget *ui; Ui::GeneralSettingsWidget *ui;
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,12 +24,15 @@
****************************************************************************/ ****************************************************************************/
#include "settings.h" #include "settings.h"
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
Settings::Settings(QObject *parent) Settings::Settings(QObject *parent)
: QObject(parent) : QObject(parent)
, m_autorunMeson(true) , m_autorunMeson(true)
, m_verboseNinja(true) , m_verboseNinja(true)
{} {}
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -22,12 +22,16 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "mesonpluginconstants.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <mesonpluginconstants.h>
#include <QObject>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
template<class F> template<class F>
void with_group(QSettings *settings, const QString &name, const F &f) void with_group(QSettings *settings, const QString &name, const F &f)
{ {
@@ -85,5 +89,6 @@ public:
}); });
} }
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,7 +24,9 @@
****************************************************************************/ ****************************************************************************/
#include "mesontoolkitaspect.h" #include "mesontoolkitaspect.h"
#include "toolkitaspectwidget.h" #include "toolkitaspectwidget.h"
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
namespace MesonProjectManager { namespace MesonProjectManager {

View File

@@ -24,13 +24,15 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <exewrappers/mesontools.h>
#include "exewrappers/mesontools.h"
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <projectexplorer/kitmanager.h> #include <projectexplorer/kitmanager.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonToolKitAspect final : public ProjectExplorer::KitAspect class MesonToolKitAspect final : public ProjectExplorer::KitAspect
{ {
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::MesonToolKitAspect) Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::MesonToolKitAspect)

View File

@@ -24,8 +24,10 @@
****************************************************************************/ ****************************************************************************/
#include "ninjatoolkitaspect.h" #include "ninjatoolkitaspect.h"
#include "toolkitaspectwidget.h" #include "toolkitaspectwidget.h"
#include "utils/qtcassert.h"
#include <utils/qtcassert.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -24,13 +24,15 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <exewrappers/mesontools.h>
#include "exewrappers/mesontools.h"
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <projectexplorer/kitmanager.h> #include <projectexplorer/kitmanager.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class NinjaToolKitAspect final : public ProjectExplorer::KitAspect class NinjaToolKitAspect final : public ProjectExplorer::KitAspect
{ {
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::NinjaToolKitAspect) Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::NinjaToolKitAspect)

View File

@@ -24,14 +24,17 @@
****************************************************************************/ ****************************************************************************/
#include "toolkitaspectwidget.h" #include "toolkitaspectwidget.h"
#include "coreplugin/icore.h"
#include "mesonpluginconstants.h" #include "mesonpluginconstants.h"
#include "mesontoolkitaspect.h" #include "mesontoolkitaspect.h"
#include "ninjatoolkitaspect.h" #include "ninjatoolkitaspect.h"
#include "utils/qtcassert.h"
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
ToolKitAspectWidget::ToolKitAspectWidget(ProjectExplorer::Kit *kit, ToolKitAspectWidget::ToolKitAspectWidget(ProjectExplorer::Kit *kit,
const ProjectExplorer::KitAspect *ki, const ProjectExplorer::KitAspect *ki,
ToolType type) ToolType type)
@@ -140,5 +143,6 @@ void ToolKitAspectWidget::setToDefault()
setCurrentToolIndex(0); setCurrentToolIndex(0);
} }
} }
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -27,6 +27,7 @@
#include "exewrappers/mesonwrapper.h" #include "exewrappers/mesonwrapper.h"
#include "mesontoolkitaspect.h" #include "mesontoolkitaspect.h"
#include "ninjatoolkitaspect.h" #include "ninjatoolkitaspect.h"
#include <projectexplorer/kitmanager.h> #include <projectexplorer/kitmanager.h>
#include <QComboBox> #include <QComboBox>
@@ -35,6 +36,7 @@
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class ToolKitAspectWidget final : public ProjectExplorer::KitAspectWidget class ToolKitAspectWidget final : public ProjectExplorer::KitAspectWidget
{ {
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolKitAspect) Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolKitAspect)
@@ -76,5 +78,6 @@ private:
QPushButton *m_manageButton; QPushButton *m_manageButton;
ToolType m_type; ToolType m_type;
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,11 +24,13 @@
****************************************************************************/ ****************************************************************************/
#include "toolitemsettings.h" #include "toolitemsettings.h"
#include "tooltreeitem.h" #include "tooltreeitem.h"
#include "ui_toolitemsettings.h" #include "ui_toolitemsettings.h"
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
ToolItemSettings::ToolItemSettings(QWidget *parent) ToolItemSettings::ToolItemSettings(QWidget *parent)
: QWidget(parent) : QWidget(parent)
, ui(new Ui::ToolItemSettings) , ui(new Ui::ToolItemSettings)

View File

@@ -24,15 +24,18 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "utils/id.h"
#include "utils/fileutils.h" #include <utils/id.h>
#include "utils/optional.h" #include <utils/fileutils.h>
#include <utils/optional.h>
#include <QWidget> #include <QWidget>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
namespace Ui { class ToolItemSettings; } namespace Ui { class ToolItemSettings; }
class ToolTreeItem; class ToolTreeItem;
class ToolItemSettings : public QWidget class ToolItemSettings : public QWidget
@@ -50,5 +53,6 @@ private:
Ui::ToolItemSettings *ui; Ui::ToolItemSettings *ui;
Utils::optional<Utils::Id> m_currentId{Utils::nullopt}; Utils::optional<Utils::Id> m_currentId{Utils::nullopt};
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,10 +24,12 @@
****************************************************************************/ ****************************************************************************/
#include "toolsmodel.h" #include "toolsmodel.h"
#include "tooltreeitem.h" #include "tooltreeitem.h"
#include "utils/qtcassert.h" #include "exewrappers/mesontools.h"
#include "utils/stringutils.h"
#include <exewrappers/mesontools.h> #include <utils/qtcassert.h>
#include <utils/stringutils.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
@@ -113,5 +115,6 @@ Utils::TreeItem *ToolsModel::manualGroup() const
{ {
return rootItem()->childAt(1); return rootItem()->childAt(1);
} }
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -25,16 +25,19 @@
#pragma once #pragma once
#include "exewrappers/mesontools.h"
#include "toolssettingspage.h" #include "toolssettingspage.h"
#include <exewrappers/mesontools.h>
#include <utils/treemodel.h> #include <utils/treemodel.h>
#include <QCoreApplication> #include <QCoreApplication>
#include <QQueue> #include <QQueue>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class ToolTreeItem; class ToolTreeItem;
class ToolsModel final : public Utils::TreeModel<Utils::TreeItem, Utils::TreeItem, ToolTreeItem> class ToolsModel final : public Utils::TreeModel<Utils::TreeItem, Utils::TreeItem, ToolTreeItem>
{ {
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolsSettingsPage) Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolsSettingsPage)
@@ -54,5 +57,6 @@ private:
Utils::TreeItem *manualGroup() const; Utils::TreeItem *manualGroup() const;
QQueue<Utils::Id> m_itemsToRemove; QQueue<Utils::Id> m_itemsToRemove;
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,17 +24,22 @@
****************************************************************************/ ****************************************************************************/
#include "toolssettingsaccessor.h" #include "toolssettingsaccessor.h"
#include "mesonpluginconstants.h"
#include <app/app_version.h> #include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <iterator>
#include <mesonpluginconstants.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <vector>
#include <QCoreApplication> #include <QCoreApplication>
#include <QVariantMap> #include <QVariantMap>
#include <iterator>
#include <vector>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
namespace { namespace {
inline QString entryName(int index) inline QString entryName(int index)
{ {
@@ -93,5 +98,6 @@ std::vector<MesonTools::Tool_t> ToolsSettingsAccessor::loadMesonTools(QWidget *p
} }
return result; return result;
} }
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,8 +24,10 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "utils/settingsaccessor.h"
#include <exewrappers/mesontools.h> #include "exewrappers/mesontools.h"
#include <utils/settingsaccessor.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -24,8 +24,9 @@
****************************************************************************/ ****************************************************************************/
#include "toolssettingspage.h" #include "toolssettingspage.h"
#include "mesonpluginconstants.h"
#include "toolssettingswidget.h" #include "toolssettingswidget.h"
#include <mesonpluginconstants.h>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {

View File

@@ -31,7 +31,9 @@
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class MesonTools; class MesonTools;
class ToolsSettingsPage final : public Core::IOptionsPage class ToolsSettingsPage final : public Core::IOptionsPage
{ {
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolsSettingsPage) Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolsSettingsPage)

View File

@@ -24,12 +24,14 @@
****************************************************************************/ ****************************************************************************/
#include "toolssettingswidget.h" #include "toolssettingswidget.h"
#include "toolsmodel.h" #include "toolsmodel.h"
#include "tooltreeitem.h" #include "tooltreeitem.h"
#include "ui_toolssettingswidget.h" #include "ui_toolssettingswidget.h"
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
ToolsSettingsWidget::ToolsSettingsWidget() ToolsSettingsWidget::ToolsSettingsWidget()
: Core::IOptionsPageWidget() : Core::IOptionsPageWidget()
, ui(new Ui::ToolsSettingsWidget) , ui(new Ui::ToolsSettingsWidget)
@@ -89,5 +91,6 @@ void ToolsSettingsWidget::apply()
{ {
m_model.apply(); m_model.apply();
} }
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,15 +24,15 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "exewrappers/mesonwrapper.h"
#include "toolitemsettings.h" #include "toolitemsettings.h"
#include "toolsmodel.h" #include "toolsmodel.h"
#include <exewrappers/mesonwrapper.h>
#include <coreplugin/dialogs/ioptionspage.h> #include <coreplugin/dialogs/ioptionspage.h>
#include <QCoreApplication> #include <QCoreApplication>
#include <QTabWidget> #include <QTabWidget>
#include <QWidget>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
@@ -58,5 +58,6 @@ private:
ToolItemSettings *m_itemSettings; ToolItemSettings *m_itemSettings;
ToolTreeItem *m_currentItem = nullptr; ToolTreeItem *m_currentItem = nullptr;
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,12 +24,15 @@
****************************************************************************/ ****************************************************************************/
#include "tooltreeitem.h" #include "tooltreeitem.h"
#include <utils/utilsicons.h> #include <utils/utilsicons.h>
#include <QFileInfo> #include <QFileInfo>
#include <QUuid> #include <QUuid>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
ToolTreeItem::ToolTreeItem(const QString &name) ToolTreeItem::ToolTreeItem(const QString &name)
: m_name{name} : m_name{name}
, m_autoDetected{false} , m_autoDetected{false}
@@ -131,5 +134,6 @@ void ToolTreeItem::update_tooltip()
{ {
update_tooltip(MesonWrapper::read_version(m_executable)); update_tooltip(MesonWrapper::read_version(m_executable));
} }
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -24,17 +24,21 @@
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include "exewrappers/mesontools.h"
#include "toolssettingspage.h" #include "toolssettingspage.h"
#include <exewrappers/mesontools.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <utils/id.h> #include <utils/id.h>
#include <utils/optional.h> #include <utils/optional.h>
#include <utils/treemodel.h> #include <utils/treemodel.h>
#include <QCoreApplication> #include <QCoreApplication>
#include <QString> #include <QString>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
class ToolTreeItem final : public Utils::TreeItem class ToolTreeItem final : public Utils::TreeItem
{ {
Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolsSettingsPage) Q_DECLARE_TR_FUNCTIONS(MesonProjectManager::Internal::ToolsSettingsPage)
@@ -66,5 +70,6 @@ private:
bool m_unsavedChanges = false; bool m_unsavedChanges = false;
}; };
} // namespace Internal } // namespace Internal
} // namespace MesonProjectManager } // namespace MesonProjectManager

View File

@@ -25,7 +25,7 @@
#include "exewrappers/mesonwrapper.h" #include "exewrappers/mesonwrapper.h"
#include "mesoninfoparser/mesoninfoparser.h" #include "mesoninfoparser/mesoninfoparser.h"
#include <iostream>
#include <QDir> #include <QDir>
#include <QObject> #include <QObject>
#include <QString> #include <QString>
@@ -33,6 +33,8 @@
#include <QTemporaryFile> #include <QTemporaryFile>
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <iostream>
using namespace MesonProjectManager::Internal; using namespace MesonProjectManager::Internal;
struct projectData struct projectData

View File

@@ -23,18 +23,20 @@
** **
****************************************************************************/ ****************************************************************************/
#include <project/outputparsers/mesonoutputparser.h> #include "project/outputparsers/mesonoutputparser.h"
#include <iostream>
#include <projectexplorer/taskhub.h> #include <projectexplorer/taskhub.h>
#include <utils/fileinprojectfinder.h> #include <utils/fileinprojectfinder.h>
#include <utils/theme/theme.h> #include <utils/theme/theme.h>
#include <utils/theme/theme_p.h> #include <utils/theme/theme_p.h>
#include <QDir> #include <QDir>
#include <QObject>
#include <QString>
#include <QTemporaryDir> #include <QTemporaryDir>
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <iostream>
using namespace MesonProjectManager::Internal; using namespace MesonProjectManager::Internal;
struct TestData struct TestData

View File

@@ -24,13 +24,15 @@
****************************************************************************/ ****************************************************************************/
#include "exewrappers/mesonwrapper.h" #include "exewrappers/mesonwrapper.h"
#include <iostream>
#include <QDir> #include <QDir>
#include <QObject> #include <QObject>
#include <QString> #include <QString>
#include <QTemporaryDir> #include <QTemporaryDir>
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <iostream>
using namespace MesonProjectManager::Internal; using namespace MesonProjectManager::Internal;
namespace { namespace {

View File

@@ -23,14 +23,16 @@
** **
****************************************************************************/ ****************************************************************************/
#include <project/outputparsers/ninjaparser.h> #include "project/outputparsers/ninjaparser.h"
#include <iostream>
#include <QDir> #include <QDir>
#include <QObject> #include <QObject>
#include <QString> #include <QString>
#include <QTemporaryDir> #include <QTemporaryDir>
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <iostream>
using namespace MesonProjectManager::Internal; using namespace MesonProjectManager::Internal;
struct TestData struct TestData

View File

@@ -22,12 +22,14 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** be met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
****************************************************************************/ ****************************************************************************/
#pragma once #pragma once
#include <QRegularExpression> #include <QRegularExpression>
#include <QString>
namespace MesonProjectManager { namespace MesonProjectManager {
namespace Internal { namespace Internal {
struct Version struct Version
{ {
int major = -1; int major = -1;