General code cleanup
- Fixed some clazy warnings (don't call first/last() on a temp. container)
- Remove QCoreApplication::flush() calls, they do nothing (empty implementations in both the glib and unix code paths upstream)
- More range for
- Port to QGuiApplication::primaryScreen()
- More PMF signal/slot syntax
- Don't flush an iostream with every iteration through a for loop, just once after the loop should be enough