[gitignore, cmake, cleanup]

* Update gitignore
* Use ${Qt5Gui_PRIVATE_INCLUDE_DIRS} to determine the include dir of qpa headers
* Use new style signal-slot
* Clean up slots
* Remove unused function in QPlatformInputContextPlugin
* Fix warnings about wrong initialize order and unused variables.

Tested.