diff --git a/lib/jkqtmathtext/jkqtmathtext.h b/lib/jkqtmathtext/jkqtmathtext.h index e0b3f39bee..daf012f20c 100644 --- a/lib/jkqtmathtext/jkqtmathtext.h +++ b/lib/jkqtmathtext/jkqtmathtext.h @@ -268,7 +268,7 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathText : public QObject { template inline bool parse(const QString &markup, ParseOptions options=DefaultParseOptions) { static_assert(std::is_base_of::value, "in parse() the type TParser has to be derived from JKQTMathTextParser to work!"); - std::unique_ptr p=std::make_unique(this); + std::unique_ptr p=std::unique_ptr(new TParser(this)); if (parsedNode) delete parsedNode; parsedNode=nullptr; clearErrorList();