Fix slot names, Q_OS macros, and also remove some includes