[Dialog] Use KWindowSystem::isPlatformX11()
Rather than doing a string comparison and doing it every time
Differential Revision: https://phabricator.kde.org/D9105