It's happening because everywhere the C pre-processor sees ReplaceText it is substituting ReplaceTextW (exactly as requested) making your code:
// read
whatever myClass::ReplaceText(QString, QString)
// read
whatever myClass::ReplaceTextW(QString, QString)
To copy to clipboard, switch view to plain text mode
which the compiler points out is not correct. I cannot see how changing Qt version would change this, but changing/including Windows API headers in your source, changing compilers or changing Windows SDK certainly can (that's where the define comes from).
Assuming you do not actually use the Windows API ReplaceText function you could follow your Windows API includes with:
#include <windows.h>
#undef ReplaceText
#include <windows.h>
#undef ReplaceText
To copy to clipboard, switch view to plain text mode
or rename your function.
Bookmarks