Cleanup code a bit and start porting away from KUrl.
Fix compiler warning
Port kWarning to qWarning