Op 19-3-2013 14:57, K. Frank schreef: > Hello Tony! > > I have something of a side question, below. > > On Tue, Mar 19, 2013 at 2:09 AM, Tony Rietwyk <t...@rightsoft.com.au> wrote: >> Hi Ken, >> ... >> // Hack to get around Qt strictness... >> >> class TSleepThread: public QThread >> { >> public: >> static void sleep(unsigned long secs) { QThread::sleep(secs); }; >> static void msleep(unsigned long msecs) { QThread::msleep(msecs); }; >> static void usleep(unsigned long usecs) { QThread::usleep(usecs); }; >> }; >> ... > I've done this "hack" before to unprotect QThread::sleep. But for the > life of me I cannot figure out why QThread:: sleep is protected (or, at > least, why there isn't some other unprotected static sleep somewhere). > > A cross-platform sleep (in a cross-platform framework, at that). What's > not to like? > > But seriously, does anyone know what the motivation for making sleep > protected might have been? I'm not sure, probably to discourage its usage. Anyway, in Qt 5, there now are static public member functions sleep and usleep in QThread.
André -- You like Qt? I am looking for collegues to join me at i-Optics! _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest