WinCE: Fix closing the serial port


Terminate the notifier thread instead of relying
that the 'running' member variable is evaluated.

Most of the time, the notifier thread is blocked
inside the ::WaitCommEvent() call, so even if the
main thread requests a close by setting 'running'
to false, the condition of the while loop is not
evaluated until some data come in on the serial
line, which might not happen in an acceptable time
frame.

WinCE supports proper termination of threads, so
there shouldn't be a problem with the new approach.

The code was tested on a WinCE7 system, closing and
reopening QSerialPort works as expected now.

Change-Id: Ic311a1cc5d2a1f9a1aec6750faddd396e448dd46
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
commit1c37490efc080593c2a1318e0c02f2f3c0b27dbf
parentad8b9773a2f996e988d7b0c4dd439a3e21ca8c09
authorTobias Koenig <tobias.koenig@kdab.com>
committerTobias Koenig <tobias.koenig@kdab.com>
commit timeFri, 3 Jul 2015 16:57:24 +0000