forked from qt-creator/qt-creator
McuSupport: Store macros as part of McuSdkRepository
To support extending the macros and calling the McuTargetFactory::expandVariables function statically, the macros are added as part of the SdkRepository. This commit also adds helper functions to extend macros other than the ones created from the packages. Change-Id: Ie7d2a9ad626782eec18738bdd3472ffd202e7a36 Reviewed-by: Rainer Keller <Rainer.Keller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "settingshandler.h"
|
||||
|
||||
#include <utils/environmentfwd.h>
|
||||
#include <utils/macroexpander.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QVersionNumber>
|
||||
@@ -30,11 +31,19 @@ namespace Internal {
|
||||
|
||||
class McuAbstractPackage;
|
||||
|
||||
using MacroExpanderPtr = std::shared_ptr<Utils::MacroExpander>;
|
||||
using Macros = QHash<QString, Utils::MacroExpander::StringFunction>;
|
||||
|
||||
class McuSdkRepository final
|
||||
{
|
||||
public:
|
||||
Targets mcuTargets;
|
||||
Packages packages;
|
||||
|
||||
void expandVariables();
|
||||
MacroExpanderPtr getMacroExpander();
|
||||
|
||||
static Macros *globalMacros();
|
||||
};
|
||||
|
||||
class McuSupportOptions final : public QObject
|
||||
|
||||
Reference in New Issue
Block a user