summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.h
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-08-31 09:47:58 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-09-07 15:53:19 (GMT)
commit84658539bca3d0d45873872007b01a45712ba621 (patch)
tree78b13e8946080224790f32b2736e01f231f84530 /Source/cmQtAutoGenerators.h
parentd8d064abbc10239cf61655da31d3e6a4a46298e7 (diff)
downloadCMake-84658539bca3d0d45873872007b01a45712ba621.zip
CMake-84658539bca3d0d45873872007b01a45712ba621.tar.gz
CMake-84658539bca3d0d45873872007b01a45712ba621.tar.bz2
Autogen: Use single KeyRegExp filter struct
Diffstat (limited to 'Source/cmQtAutoGenerators.h')
-rw-r--r--Source/cmQtAutoGenerators.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index 2084a81..ff31884 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -25,13 +25,26 @@ public:
private:
// -- Types
- /// @brief Used to extract additional dependencies from content text
- struct MocDependFilter
+ /// @brief Search key plus regular expression pair
+ struct KeyRegExp
{
- std::string key;
- cmsys::RegularExpression regExp;
+ KeyRegExp() = default;
+
+ KeyRegExp(const char* key, const char* regExp)
+ : Key(key)
+ , RegExp(regExp)
+ {
+ }
+
+ KeyRegExp(const std::string& key, const std::string& regExp)
+ : Key(key)
+ , RegExp(regExp)
+ {
+ }
+
+ std::string Key;
+ cmsys::RegularExpression RegExp;
};
- typedef std::pair<std::string, cmsys::RegularExpression> MocMacroFilter;
// -- Configuration
bool MocDependFilterPush(const std::string& key, const std::string& regExp);
@@ -200,8 +213,8 @@ private:
std::vector<std::string> MocDefinitions;
std::vector<std::string> MocOptions;
std::vector<std::string> MocPredefsCmd;
- std::vector<MocDependFilter> MocDependFilters;
- std::vector<MocMacroFilter> MocMacroFilters;
+ std::vector<KeyRegExp> MocDependFilters;
+ std::vector<KeyRegExp> MocMacroFilters;
cmsys::RegularExpression MocRegExpInclude;
// -- Uic
bool UicSettingsChanged;