We are in the process of upgrading from Qt 4.8.7 to Qt 5.5.1. In our software, I have a class derived from QTranslator. The class overrides the translate function. We do this to keep the last untranslated string in memory. This works fine in Qt4.8.7. The overridden translate function is called during program execution. Going to Qt5, a parameter is added, but otherwise the function looks the same. We we adjusted the override for this parameter. Yet when running the software the overridden translate function is never called. I'm at a loss why this is happening. Any ideas?

Basically, something like this:
Qt Code:
  1. class CTranslationManager : public QTranslator
  2. {
  3. public:
  4. // Constructors and Destructors
  5. CTranslationManager();
  6. virtual ~CTranslationManager();
  7.  
  8. //virtual QString translate(const char* context, const char* sourceText, const char* disambiguation = 0) const override; // Qt4 code
  9. virtual QString translate(const char* context, const char* sourceText, const char* disambiguation = 0, int n = -1) const override
  10. {
  11. m_CurrentUntranslated = sourceText;
  12. return QTranslator::translate(context, sourceText, disambiguation, n);
  13. }
  14.  
  15. private:
  16. mutable QString m_CurrentUntranslated;
  17. };
To copy to clipboard, switch view to plain text mode