Windows: Fix handling of cursor flash time.

Check for special return value INFINITE (unsigned -1) of
GetCaretBlinkTime() (indicating cursor should not flash)
and return 0 in that case.

Change-Id: Iead41a20a68b79d04b03f77a3caf063d4e1d577e
Task-number: QTBUG-47208
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Friedemann Kleint 2015-07-20 16:30:35 +02:00
parent 4f15449bc2
commit f3e1dfb786

View File

@ -491,7 +491,7 @@ QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) co
switch (hint) {
case QPlatformIntegration::CursorFlashTime:
if (const unsigned timeMS = GetCaretBlinkTime())
return QVariant(int(timeMS) * 2);
return QVariant(timeMS != INFINITE ? int(timeMS) * 2 : 0);
break;
#ifdef SPI_GETKEYBOARDSPEED
case KeyboardAutoRepeatRate: