Resolve some duplicate macro definition errors


To resolved an issue caused by duplicate macro definition, I moved
all the codec helper macros into a header file, and removed the
duplicate ones.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I9afdd48fc3a7c29c3ec8996df90cf488b9701c67
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
commit46669f3517493d0a758903861ca8343c90d2ffe9
parentf6280ee76c09793b69db97369dc3ef3882069273
authorAmir Masoud Abdol <amir.abdol@qt.io>
committerAmir Masoud Abdol <amir.abdol@qt.io>
commit timeTue, 14 Mar 2023 10:54:06 +0100