March 27, 2012

mkornal mkornal
Lab Rat
1 posts

Windows ce 6.0 r2 - QThread::wait problem.


I work with Windows CE 6.0 r2 and Qt 4.7.4.
In a slot function is line:

  1. QThread::currentThread()->wait(5000);

and it doesn’t work, just writes warning: “QThread::wait: Thread tried to wait on itself”.
I am not sure if it is important, but the slot is connected to QTcpSocket::readyRead() signal.

Has anyone had similar problem?

One more thing with “milliseconds” i background.
I have message handler function used with qInstallMsgHandler(QtMsgHandler handler) with code:

  1. QTime::currentTime().toString("hh:mm:ss:zzz")

and the milliseconds are always “000”.

1 reply

March 27, 2012

mkornal mkornal
Lab Rat
1 posts

OK. I’ve just recognized that this is the way it works due to QThread::wait() source:

  1. if (d->id == GetCurrentThreadId()) {
  3.         qWarning("QThread::wait: Thread tried to wait on itself");
  5.         return false;
  7.     }

Can anybody give me a hint with the second issue?

  ‹‹ External App Nokia Drive      how to get street speed limit in Qt Mobility? ››

You must log in to post a reply. Not a member yet? Register here!