aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
diff options
context:
space:
mode:
authorKnud Dollereder <[email protected]>2024-08-16 12:10:46 +0200
committerKnud Dollereder <[email protected]>2024-08-21 11:41:36 +0000
commit3d2c1970543f57080cd935c3cb752d21fd750606 (patch)
treed5581bebf1123ee0463304569166a9646bec2eb4 /src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
parenteaaa241fd498d092164de55c634f23bb09837917 (diff)
Add PythonGenerator to simplify DS to Python workflow
There is now a new Menu entry: "Export Project"->"Enable Python Generator". When checked it will create a simple Python file that can be used as starting point for python development. Alternatively one can also use the qmlproject variable "enablePythonGeneration" to enable the python generator. also, took the opportunity to refactor the code. - Improved names from the original implementation. (cmakegen -> QmlProjectExporter) - Bundled the cmake generator and the python generator in one class Exporter. - Moved common functionality of both generators into one base class (FileGenerator). Change-Id: Ie5948a115148ee1ddce78d827d5ce4498ea5d558 Reviewed-by: Thomas Hartmann <[email protected]>
Diffstat (limited to 'src/plugins/qmlprojectmanager/qmlprojectplugin.cpp')
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectplugin.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp b/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
index 1bc61c3b825..a30aec37830 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectplugin.cpp
@@ -9,7 +9,8 @@
#include "qmlprojectmanagertr.h"
#include "qmlprojectrunconfiguration.h"
#include "projectfilecontenttools.h"
-#include "cmakegen/cmakegenerator.h"
+#include "qmlprojectexporter/cmakegenerator.h"
+#include "qmlprojectexporter/pythongenerator.h"
#include <coreplugin/actionmanager/actioncontainer.h>
#include <coreplugin/actionmanager/actionmanager.h>
@@ -402,7 +403,8 @@ void QmlProjectPlugin::initialize()
!= fileNode->filePath());
});
- GenerateCmake::CMakeGenerator::createMenuAction(this);
+ QmlProjectExporter::CMakeGenerator::createMenuAction(this);
+ QmlProjectExporter::PythonGenerator::createMenuAction(this);
}
}