use private linkage where possible

Task-number: QTBUG-34463
Change-Id: Iffbeed2f1a27fd38b5960afa9715815ac11b722a
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>