|
@@ -31,11 +31,13 @@
|
|
|
|
|
|
static const std::string MultifileBuildOption("MULTI");
|
|
static const std::string MultifileBuildOption("MULTI");
|
|
static const std::string QmlPluginOption("QML");
|
|
static const std::string QmlPluginOption("QML");
|
|
|
|
+static const std::string CommentsGenerationOption("COMMENTS");
|
|
|
|
|
|
using namespace ::QtProtobuf::generator;
|
|
using namespace ::QtProtobuf::generator;
|
|
|
|
|
|
GeneratorOptions::GeneratorOptions() : mIsMulti(false)
|
|
GeneratorOptions::GeneratorOptions() : mIsMulti(false)
|
|
- ,mHasQml(false)
|
|
|
|
|
|
+ , mHasQml(false)
|
|
|
|
+ , mGenerateComments(false)
|
|
{
|
|
{
|
|
}
|
|
}
|
|
|
|
|
|
@@ -45,12 +47,15 @@ void GeneratorOptions::parseFromEnv(const std::string &options)
|
|
utils::split(options, optionsList, ':');
|
|
utils::split(options, optionsList, ':');
|
|
for (auto option : optionsList) {
|
|
for (auto option : optionsList) {
|
|
QT_PROTOBUF_DEBUG("option: " << option);
|
|
QT_PROTOBUF_DEBUG("option: " << option);
|
|
- if(option.compare(MultifileBuildOption) == 0) {
|
|
|
|
|
|
+ if (option.compare(MultifileBuildOption) == 0) {
|
|
QT_PROTOBUF_DEBUG("set mIsMulti: true");
|
|
QT_PROTOBUF_DEBUG("set mIsMulti: true");
|
|
mIsMulti = true;
|
|
mIsMulti = true;
|
|
} else if (option.compare(QmlPluginOption) == 0) {
|
|
} else if (option.compare(QmlPluginOption) == 0) {
|
|
QT_PROTOBUF_DEBUG("set mHasQml: true");
|
|
QT_PROTOBUF_DEBUG("set mHasQml: true");
|
|
mHasQml = true;
|
|
mHasQml = true;
|
|
|
|
+ } else if (option.compare(CommentsGenerationOption)) {
|
|
|
|
+ QT_PROTOBUF_DEBUG("set mGenerateComments: true");
|
|
|
|
+ mGenerateComments = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|