summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-11-22 13:48:20 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-11-22 13:48:20 (GMT)
commit41456794ccd80bbd683ed19354f6e6d97c45681b (patch)
tree149a738be5658b665cb50de45013b95dec74ad6f /src/corelib
parente0bd60f6c8a489c5703b648fe2e2470763f67e37 (diff)
parent7abb03d75155cef86df58f117031b092b637876f (diff)
downloadQt-41456794ccd80bbd683ed19354f6e6d97c45681b.zip
Qt-41456794ccd80bbd683ed19354f6e6d97c45681b.tar.gz
Qt-41456794ccd80bbd683ed19354f6e6d97c45681b.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Round origin of text in OpenVG engine QThread::exec(): Fix possibility to enter several time the event loop QMessageBox: change the documentation to reflect that it is application modal Compile on OpenBSD Doc: Q_PROPERTY, implements the setter/getter in the example Dynamically register the event number. Fix wrong error assumption when converting "0.0" to double
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/thread/qthread.cpp4
-rw-r--r--src/corelib/thread/qthread_unix.cpp13
-rw-r--r--src/corelib/tools/qlocale.cpp1
3 files changed, 14 insertions, 4 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index 69b70cb..6fb182b 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -482,8 +482,10 @@ int QThread::exec()
Q_D(QThread);
QMutexLocker locker(&d->mutex);
d->data->quitNow = false;
- if (d->exited)
+ if (d->exited) {
+ d->exited = false;
return d->returnCode;
+ }
locker.unlock();
QEventLoop eventLoop;
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index a44a0e8..e3b587d 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -97,6 +97,11 @@
# define SCHED_IDLE 5
#endif
+#if defined(Q_OS_DARWIN) || !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)
+#define QT_HAS_THREAD_PRIORITY_SCHEDULING
+#endif
+
+
QT_BEGIN_NAMESPACE
#ifndef QT_NO_THREAD
@@ -503,6 +508,7 @@ void QThread::usleep(unsigned long usecs)
thread_sleep(&ti);
}
+#ifdef QT_HAS_THREAD_PRIORITY_SCHEDULING
// Does some magic and calculate the Unix scheduler priorities
// sched_policy is IN/OUT: it must be set to a valid policy before calling this function
// sched_priority is OUT only
@@ -533,6 +539,7 @@ static bool calculateUnixPriority(int priority, int *sched_policy, int *sched_pr
*sched_priority = prio;
return true;
}
+#endif
void QThread::start(Priority priority)
{
@@ -553,7 +560,7 @@ void QThread::start(Priority priority)
d->priority = priority;
-#if defined(Q_OS_DARWIN) || !defined(Q_OS_OPENBSD) && !defined(Q_OS_SYMBIAN) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)
+#if defined(QT_HAS_THREAD_PRIORITY_SCHEDULING) && !defined(Q_OS_SYMBIAN)
// ### Need to implement thread sheduling and priorities for symbian os. Implementation removed for now
switch (priority) {
case InheritPriority:
@@ -594,7 +601,7 @@ void QThread::start(Priority priority)
break;
}
}
-#endif // _POSIX_THREAD_PRIORITY_SCHEDULING
+#endif // QT_HAS_THREAD_PRIORITY_SCHEDULING
#ifdef Q_OS_SYMBIAN
if (d->stackSize == 0)
@@ -757,7 +764,7 @@ void QThread::setPriority(Priority priority)
// copied from start() with a few modifications:
-#if defined(Q_OS_DARWIN) || !defined(Q_OS_OPENBSD) && defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING-0 >= 0)
+#ifdef QT_HAS_THREAD_PRIORITY_SCHEDULING
int sched_policy;
sched_param param;
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index d152682..83d6dcd 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -7308,6 +7308,7 @@ Q_CORE_EXPORT char *qdtoa( double d, int mode, int ndigits, int *decpt, int *sig
Q_CORE_EXPORT double qstrtod(const char *s00, const char **se, bool *ok)
{
+ errno = 0;
double ret = strtod((char*)s00, (char**)se);
if (ok) {
if((ret == 0.0l && errno == ERANGE)