diff --git a/src/translator.cpp b/src/translator.cpp index 8d1e2d593..29b0c259a 100644 --- a/src/translator.cpp +++ b/src/translator.cpp @@ -7,9 +7,10 @@ #include #include #include +#include QTranslator* Translator::translator{nullptr}; -QVector>> Translator::callbacks; +QVector Translator::callbacks; QMutex Translator::lock; void Translator::translate() @@ -64,12 +65,6 @@ void Translator::registerHandler(std::function f, void *owner) void Translator::unregister(void *owner) { QMutexLocker locker{&lock}; - for (int i=0; i>> callbacks; + using Callback = QPair>; + static QVector callbacks; static QMutex lock; + static QTranslator* translator; }; #endif // TRANSLATOR_H