aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/runcontrol.h
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-08-06 10:57:59 +0200
committerhjk <hjk@qt.io>2019-08-13 13:07:06 +0000
commitfcffb5f2fca1476cf662babbc601ee314bff6b47 (patch)
treed8134a40150b7b7868b87c26a9d3c7210900e21c /src/plugins/projectexplorer/runcontrol.h
parent86e9c42c9076dee16780842f2467ffc885cb9dd3 (diff)
Utils/all: Create an OutputFormatterFactory
Essentially following the scheme used for the various project configurations. This makes it possible to construct OutputFormatters by Id only, potentially reducing hard plugin dependencies and opening the road to have several output formatters per RunConfiguration/Outputpane/... Change-Id: I4b5fb6fb6be8b0d9a0859f178bb0effc3398b09e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/runcontrol.h')
-rw-r--r--src/plugins/projectexplorer/runcontrol.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/runcontrol.h b/src/plugins/projectexplorer/runcontrol.h
index 67f06fcea1..09abfac353 100644
--- a/src/plugins/projectexplorer/runcontrol.h
+++ b/src/plugins/projectexplorer/runcontrol.h
@@ -309,4 +309,21 @@ private:
bool m_useTerminal = false;
};
+class PROJECTEXPLORER_EXPORT OutputFormatterFactory
+{
+protected:
+ OutputFormatterFactory();
+
+public:
+ virtual ~OutputFormatterFactory();
+
+ static Utils::OutputFormatter *createFormatter(Target *target);
+
+protected:
+ void setFormatterCreator(const std::function<Utils::OutputFormatter *(Target *)> &creator);
+
+private:
+ std::function<Utils::OutputFormatter *(Target *)> m_creator;
+};
+
} // namespace ProjectExplorer