This reverts commit 389507a047e0ec0721535052df6ddf957fbb95b3.
Reason for revert: The original patch unintentionally changes
the deprecation warning behavior for user projects. Merging
the current change will resurface the original static qt build
bug until a new fix is developed.
Change-Id: I29b41b43fdd76b19bc46439470e04443dc2b8ddb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
(cherry picked from commit e3c6754760b23a9d6e7879c037f72bf768674572)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>