diff options
author | axis <qt-info@nokia.com> | 2009-08-21 11:09:17 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-08-21 11:09:17 (GMT) |
commit | 681af3119f2e4681d08e3818601ed4458b8d62a9 (patch) | |
tree | ea9104157dcc1534a7a280a14f5aa370478f42d6 /src | |
parent | d936f7fe97bc6e55934d83b2c894dea556a4ea6f (diff) | |
parent | 0ef0311dad387642bd6aa43e2cef9d25e2b5c5b3 (diff) | |
download | Qt-681af3119f2e4681d08e3818601ed4458b8d62a9.zip Qt-681af3119f2e4681d08e3818601ed4458b8d62a9.tar.gz Qt-681af3119f2e4681d08e3818601ed4458b8d62a9.tar.bz2 |
Merge branch 'reviewPatches'
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qcore_unix_p.h | 3 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 7 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 21 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian_p.h | 7 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 27 |
5 files changed, 15 insertions, 50 deletions
diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h index c83c24b..698b05b 100644 --- a/src/corelib/kernel/qcore_unix_p.h +++ b/src/corelib/kernel/qcore_unix_p.h @@ -274,7 +274,8 @@ static inline int qt_safe_close(int fd) #undef QT_CLOSE #define QT_CLOSE qt_safe_close -// Open C does not (yet?) implement these on Symbian OS and VxWorks doesn't have processes +// - Open C does not (yet?) implement these on Symbian OS +// - VxWorks doesn't have processes #if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_VXWORKS) static inline int qt_safe_execve(const char *filename, char *const argv[], char *const envp[]) diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 74b5140..ead363c 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -499,7 +499,7 @@ QCoreApplication::QCoreApplication(int &argc, char **argv) { init(); QCoreApplicationPrivate::eventDispatcher->startingUp(); -#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) && defined(Q_OS_SYMBIAN) +#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) // Refresh factoryloader, as text codecs are requested during lib path // resolving process and won't be therefore properly loaded. // Unknown if this is symbian specific issue. @@ -1789,9 +1789,8 @@ bool QCoreApplicationPrivate::isTranslatorInstalled(QTranslator *translator) function also assumes that the current directory has not been changed by the application. - In Symbian this function will return the application private directory - in C-drive, not the path to executable itself, as those are always in - /sys/bin. + In Symbian this function will return the application private directory, + not the path to executable itself, as those are always in \c {/sys/bin}. \sa applicationFilePath() */ diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index d7b9d92..881e546 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -184,7 +184,7 @@ QWakeUpActiveObject::~QWakeUpActiveObject() void QWakeUpActiveObject::DoCancel() { - if (iStatus.Int() & KRequestPending) { + if (iStatus.Int() == KRequestPending) { TRequestStatus *status = &iStatus; QEventDispatcherSymbian::RequestComplete(status, KErrNone); } @@ -214,7 +214,7 @@ void QTimerActiveObject::DoCancel() m_rTimer.Cancel(); m_rTimer.Close(); } else { - if (iStatus.Int() & KRequestPending) { + if (iStatus.Int() == KRequestPending) { TRequestStatus *status = &iStatus; QEventDispatcherSymbian::RequestComplete(status, KErrNone); } @@ -225,6 +225,7 @@ void QTimerActiveObject::RunL() { int error; QT_TRYCATCH_ERROR(error, Run()); + // All Symbian error codes are negative. if (error < 0) { CActiveScheduler::Current()->Error(error); // stop and report here, as this timer will be deleted on scope exit } @@ -275,7 +276,7 @@ void QTimerActiveObject::Start() } SymbianTimerInfo::SymbianTimerInfo() -: timerAO(0) + : timerAO(0) { } @@ -300,7 +301,7 @@ QCompleteDeferredAOs::~QCompleteDeferredAOs() void QCompleteDeferredAOs::complete() { - if (iStatus.Int() & KRequestPending) { + if (iStatus.Int() == KRequestPending) { TRequestStatus *status = &iStatus; QEventDispatcherSymbian::RequestComplete(status, KErrNone); } @@ -308,7 +309,7 @@ void QCompleteDeferredAOs::complete() void QCompleteDeferredAOs::DoCancel() { - if (iStatus.Int() & KRequestPending) { + if (iStatus.Int() == KRequestPending) { TRequestStatus *status = &iStatus; QEventDispatcherSymbian::RequestComplete(status, KErrNone); } @@ -369,10 +370,8 @@ void QSelectThread::run() int ret; int savedSelectErrno; - //do { - ret = qt_socket_select(maxfd, &readfds, &writefds, &exceptionfds, 0); - savedSelectErrno = errno; - //} while (ret == 0); + ret = qt_socket_select(maxfd, &readfds, &writefds, &exceptionfds, 0); + savedSelectErrno = errno; char buffer; @@ -405,7 +404,6 @@ void QSelectThread::run() FD_ZERO(&readfds); FD_ZERO(&writefds); FD_ZERO(&exceptionfds); - { for (QHash<QSocketNotifier *, TRequestStatus *>::const_iterator i = m_AOStatuses.begin(); i != m_AOStatuses.end(); ++i) { @@ -434,7 +432,6 @@ void QSelectThread::run() } } // end for - } // traversed all, so update updateActivatedNotifiers(QSocketNotifier::Read, &readfds); @@ -581,7 +578,7 @@ QSocketActiveObject::~QSocketActiveObject() void QSocketActiveObject::DoCancel() { - if (iStatus.Int() & KRequestPending) { + if (iStatus.Int() == KRequestPending) { TRequestStatus *status = &iStatus; QEventDispatcherSymbian::RequestComplete(status, KErrNone); } diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h index 69912d0..021de13 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian_p.h +++ b/src/corelib/kernel/qeventdispatcher_symbian_p.h @@ -281,13 +281,9 @@ private: }; #ifdef QT_DEBUG -// EActive is defined to 1 and ERequestPending to 2, but they are both private. -// A little dangerous to rely on, but it is only for debugging. -# define REQUEST_STATUS_ACTIVE_AND_PENDING 3 # define VERIFY_PENDING_REQUEST_STATUS \ - Q_ASSERT(status->Int() & REQUEST_STATUS_ACTIVE_AND_PENDING == REQUEST_STATUS_ACTIVE_AND_PENDING); + Q_ASSERT(status->Int() == KRequestPending); #else -# define REQUEST_STATUS_ACTIVE_AND_PENDING # define VERIFY_PENDING_REQUEST_STATUS #endif @@ -304,7 +300,6 @@ inline void QEventDispatcherSymbian::RequestComplete(RThread &threadHandle, TReq threadHandle.RequestComplete(status, reason); } -#undef REQUEST_STATUS_ACTIVE_AND_PENDING #undef VERIFY_PENDING_REQUEST_STATUS QT_END_NAMESPACE diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index ebd2e30..65df600 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -156,16 +156,7 @@ static void construct(QVariant::Private *x, const void *copy) x->data.b = copy ? *static_cast<const bool *>(copy) : false; break; case QVariant::Double: -#if defined(Q_CC_RVCT) - // Using trinary operator with 64bit constants crashes when ran on Symbian device - if (copy){ - x->data.d = *static_cast<const double*>(copy); - } else { - x->data.d = 0.0; - } -#else x->data.d = copy ? *static_cast<const double*>(copy) : 0.0; -#endif break; case QMetaType::Float: x->data.f = copy ? *static_cast<const float*>(copy) : 0.0f; @@ -174,28 +165,10 @@ static void construct(QVariant::Private *x, const void *copy) x->data.o = copy ? *static_cast<QObject *const*>(copy) : 0; break; case QVariant::LongLong: -#if defined(Q_CC_RVCT) - // Using trinary operator with 64bit constants crashes when ran on Symbian device - if (copy){ - x->data.ll = *static_cast<const qlonglong *>(copy); - } else { - x->data.ll = Q_INT64_C(0); - } -#else x->data.ll = copy ? *static_cast<const qlonglong *>(copy) : Q_INT64_C(0); -#endif break; case QVariant::ULongLong: -#if defined(Q_CC_RVCT) - // Using trinary operator with 64bit constants crashes when ran on Symbian device - if (copy){ - x->data.ull = *static_cast<const qulonglong *>(copy); - } else { - x->data.ull = Q_UINT64_C(0); - } -#else x->data.ull = copy ? *static_cast<const qulonglong *>(copy) : Q_UINT64_C(0); -#endif break; case QVariant::Invalid: case QVariant::UserType: |