summaryrefslogtreecommitdiffstats
path: root/src/libs/kdtools/kdgenericfactory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/kdtools/kdgenericfactory.h')
-rw-r--r--src/libs/kdtools/kdgenericfactory.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/libs/kdtools/kdgenericfactory.h b/src/libs/kdtools/kdgenericfactory.h
index 696c91c1c..3eee85f29 100644
--- a/src/libs/kdtools/kdgenericfactory.h
+++ b/src/libs/kdtools/kdgenericfactory.h
@@ -58,7 +58,12 @@ public:
template <typename T>
void registerProduct(const T_Identifier &name)
{
- map.insert(name, &KDGenericFactory::create<T>);
+#ifdef Q_CC_MSVC
+ FactoryFunction function = &KDGenericFactory::create<T>;
+#else // compile fix for old gcc
+ FactoryFunction function = &create<T>;
+#endif
+ map.insert(name, function);
}
T_Product *create(const T_Identifier &name) const
@@ -72,7 +77,12 @@ public:
template <typename T>
void registerProductWithArg(const T_Identifier &name)
{
- map2.insert(name, &KDGenericFactory::create<T>);
+#ifdef Q_CC_MSVC
+ FactoryFunction function = &KDGenericFactory::create<T>;
+#else // compile fix for old gcc
+ FactoryFunction function = &create<T>;
+#endif
+ map2.insert(name, function);
}
T_Product *createWithArg(const T_Identifier &name, const T_Argument &arg) const