diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/arch/symbian/qatomic_symbian.cpp | 7 | ||||
-rw-r--r-- | src/corelib/global/qglobal.cpp | 12 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 4 | ||||
-rw-r--r-- | src/corelib/io/qdir.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qtemporaryfile.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 5 | ||||
-rw-r--r-- | src/corelib/kernel/qsystemsemaphore_symbian.cpp | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 18 | ||||
-rw-r--r-- | src/corelib/plugin/qpluginloader.cpp | 4 | ||||
-rw-r--r-- | src/corelib/thread/qthread.cpp | 2 | ||||
-rw-r--r-- | src/corelib/thread/qthread_p.h | 2 | ||||
-rw-r--r-- | src/corelib/thread/qthread_unix.cpp | 16 | ||||
-rw-r--r-- | src/corelib/tools/qhash.h | 10 | ||||
-rw-r--r-- | src/corelib/tools/qmap.h | 6 |
14 files changed, 46 insertions, 48 deletions
diff --git a/src/corelib/arch/symbian/qatomic_symbian.cpp b/src/corelib/arch/symbian/qatomic_symbian.cpp index 9bec0f5..a228696 100644 --- a/src/corelib/arch/symbian/qatomic_symbian.cpp +++ b/src/corelib/arch/symbian/qatomic_symbian.cpp @@ -62,9 +62,9 @@ struct SPrintExitInfo TInt processHandleCount=0; TInt threadHandleCount=0; RThread().HandleCount(processHandleCount,threadHandleCount); - RDebug::Print(_L("%S exiting with %d allocated cells, %d handles"), - &fullName, - cells - initCells, + RDebug::Print(_L("%S exiting with %d allocated cells, %d handles"), + &fullName, + cells - initCells, (processHandleCount + threadHandleCount) - (initProcessHandleCount + initThreadHandleCount)); } TInt initCells; @@ -107,4 +107,3 @@ __declspec(dllexport) __asm int QBasicAtomicInt::fetchAndStoreOrdered(int newVal QT_END_NAMESPACE #endif // Q_CC_RVCT - diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 818e555..21cbd12 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1914,7 +1914,7 @@ QSysInfo::SymVersion QSysInfo::symbianVersion() \relates <QtGlobal> Users Q_CHECK_PTR on \a pointer, then returns \a pointer. - + This can be used as an inline version of Q_CHECK_PTR. */ @@ -2115,8 +2115,8 @@ QString qt_error_string(int errorCode) warnings, critical and fatal error messages. The Qt library (debug mode) contains hundreds of warning messages that are printed when internal errors (usually invalid function arguments) - occur. Qt built in release mode also contains such warnings unless - QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during + occur. Qt built in release mode also contains such warnings unless + QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during compilation. If you implement your own message handler, you get total control of these messages. @@ -2516,7 +2516,7 @@ Q_GLOBAL_STATIC(SeedStorage, randTLS) // Thread Local Storage for seed value */ void qsrand(uint seed) { -#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD) && !defined(Q_OS_SYMBIAN) +#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD) && !defined(Q_OS_SYMBIAN) SeedStorageType *pseed = randTLS()->localData(); if (!pseed) randTLS()->setLocalData(pseed = new SeedStorageType); @@ -3179,7 +3179,7 @@ bool QInternal::callFunction(InternalFunction func, void **args) Compares the floating point value \a p1 and \a p2 and returns \c true if they are considered equal, otherwise \c false. - Note that comparing values where either \a p1 or \a p2 is 0.0 will not work. + Note that comparing values where either \a p1 or \a p2 is 0.0 will not work. The solution to this is to compare against values greater than or equal to 1.0. \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 46 @@ -3416,7 +3416,7 @@ int qt_exception2SymbianError(const std::exception& aThrow) err = KErrUnderflow; qWarning("translation from std exception \"%s\" to %d", aThrow.what(), err); } - + return err; } #endif diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 257e3db..3493f13 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -915,9 +915,9 @@ QT_END_INCLUDE_NAMESPACE */ #ifndef QT_LINUXBASE /* the LSB defines TRUE and FALSE for us */ -/* Symbian OS defines TRUE = 1 and FALSE = 0, +/* Symbian OS defines TRUE = 1 and FALSE = 0, redefine to built-in booleans to make autotests work properly */ -#ifdef Q_OS_SYMBIAN +#ifdef Q_OS_SYMBIAN #undef TRUE #undef FALSE #endif diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 9787566..836fa44 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1824,7 +1824,7 @@ QChar QDir::separator() { #if defined (Q_FS_FAT) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) return QLatin1Char('\\'); -#elif defined(Q_OS_UNIX) +#elif defined(Q_OS_UNIX) return QLatin1Char('/'); #elif defined (Q_OS_MAC) return QLatin1Char(':'); diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index f7120e1..cd8d36d 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -517,7 +517,7 @@ QTemporaryFile::QTemporaryFile() #ifdef Q_OS_SYMBIAN //Just for verify that folder really exist on hardware fileEngine()->mkdir( QDir::tempPath(), true ); -#endif +#endif } /*! diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 3293d47..e876843 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -652,7 +652,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla QT_TRY { Q_D(QAbstractEventDispatcher); - + // It is safe if this counter overflows. The main importance is that each // iteration count is different from the last. m_iterationCount++; @@ -959,7 +959,7 @@ bool QEventDispatcherSymbian::unregisterTimers ( QObject * object ) { if (m_timerList.isEmpty()) return false; - + bool unregistered = false; for (QHash<int, SymbianTimerInfoPtr>::iterator i = m_timerList.begin(); i != m_timerList.end(); ) { if ((*i)->receiver == object) { @@ -1002,4 +1002,3 @@ void CQtActiveScheduler::Error(TInt aError) const } QT_END_NAMESPACE - diff --git a/src/corelib/kernel/qsystemsemaphore_symbian.cpp b/src/corelib/kernel/qsystemsemaphore_symbian.cpp index 8179046..1516841 100644 --- a/src/corelib/kernel/qsystemsemaphore_symbian.cpp +++ b/src/corelib/kernel/qsystemsemaphore_symbian.cpp @@ -47,7 +47,7 @@ #include <qcore_symbian_p.h> #include <e32cmn.h> QT_BEGIN_NAMESPACE - + #ifndef QT_NO_SYSTEMSEMAPHORE QSystemSemaphorePrivate::QSystemSemaphorePrivate() : @@ -65,7 +65,7 @@ void QSystemSemaphorePrivate::setErrorString(const QString &function, int err) errorString = QCoreApplication::tr("%1: already exists", "QSystemSemaphore").arg(function); error = QSystemSemaphore::AlreadyExists; break; - case KErrNotFound: + case KErrNotFound: errorString = QCoreApplication::tr("%1: doesn't exists", "QSystemSemaphore").arg(function); error = QSystemSemaphore::NotFound; break; diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 2b57d2f..dd3468d 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -156,7 +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) +#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); @@ -165,13 +165,13 @@ static void construct(QVariant::Private *x, const void *copy) } #else x->data.d = copy ? *static_cast<const double*>(copy) : 0.0; -#endif +#endif break; case QMetaType::Float: x->data.f = copy ? *static_cast<const float*>(copy) : 0.0f; break; case QVariant::LongLong: -#if defined(Q_CC_RVCT) +#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); @@ -180,10 +180,10 @@ static void construct(QVariant::Private *x, const void *copy) } #else x->data.ll = copy ? *static_cast<const qlonglong *>(copy) : Q_INT64_C(0); -#endif +#endif break; case QVariant::ULongLong: -#if defined(Q_CC_RVCT) +#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); @@ -192,7 +192,7 @@ static void construct(QVariant::Private *x, const void *copy) } #else x->data.ull = copy ? *static_cast<const qulonglong *>(copy) : Q_UINT64_C(0); -#endif +#endif break; case QVariant::Invalid: case QVariant::UserType: @@ -618,7 +618,7 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result, ok = &dummy; switch (uint(t)) { - case QVariant::Url: + case QVariant::Url: switch (d->type) { case QVariant::String: *static_cast<QUrl *>(result) = QUrl(*v_cast<QString>(d)); @@ -1214,8 +1214,8 @@ const QVariant::Handler *QVariant::handler = &qt_kernel_variant_handler; and versatile, but may prove less memory and speed efficient than storing specific types in standard data structures. - QVariant also supports the notion of null values, where you can - have a defined type with no value set. However, note that QVariant + QVariant also supports the notion of null values, where you can + have a defined type with no value set. However, note that QVariant types can only be cast when they have had a value set. \snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 1 diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index 5364190..d7692b0 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -311,7 +311,7 @@ void QPluginLoader::setFileName(const QString &fileName) QFileInfoList driveList(QDir::drives()); foreach(const QFileInfo& drive, driveList) { QString testFilePath(drive.absolutePath() + stubPath); - testFilePath = QDir::cleanPath(testFilePath); + testFilePath = QDir::cleanPath(testFilePath); if (QFile::exists(testFilePath)) { fn = testFilePath; break; @@ -319,7 +319,7 @@ void QPluginLoader::setFileName(const QString &fileName) } } } - + #else QString fn = QFileInfo(fileName).canonicalFilePath(); #endif diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index fac50ee..a4a57ce 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -183,7 +183,7 @@ QThreadPrivate::QThreadPrivate(QThreadData *d) id = 0; waiters = 0; #endif -#if defined (Q_WS_WIN) || defined (Q_OS_SYMBIAN) +#if defined (Q_WS_WIN) || defined (Q_OS_SYMBIAN) terminationEnabled = true; terminatePending = false; #endif diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index 51de0be..752796b 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -152,7 +152,7 @@ public: static void finish(void *, bool lockAnyway=true); #endif // Q_OS_WIN32 -#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined (Q_OS_SYMBIAN) +#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined (Q_OS_SYMBIAN) bool terminationEnabled, terminatePending; # endif QThreadData *data; diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 881b889..cabf823 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -178,7 +178,7 @@ void QThreadPrivate::createEventDispatcher(QThreadData *data) else #endif #ifdef Q_OS_SYMBIAN - data->eventDispatcher = new QEventDispatcherSymbian; + data->eventDispatcher = new QEventDispatcherSymbian; #else data->eventDispatcher = new QEventDispatcherUNIX; #endif @@ -193,7 +193,7 @@ void *QThreadPrivate::start(void *arg) pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); pthread_cleanup_push(QThreadPrivate::finish, arg); #endif - + QThread *thr = reinterpret_cast<QThread *>(arg); QThreadData *data = QThreadData::get2(thr); @@ -226,7 +226,7 @@ void *QThreadPrivate::start(void *arg) #ifndef Q_OS_SYMBIAN pthread_cleanup_pop(1); #else - QThreadPrivate::finish(arg); + QThreadPrivate::finish(arg); #endif return 0; @@ -266,7 +266,7 @@ void QThreadPrivate::finish(void *arg) d->thread_id = 0; #ifdef Q_OS_SYMBIAN if (closeNativeHandle) - d->data->symbian_thread_handle.Close(); + d->data->symbian_thread_handle.Close(); #endif d->thread_done.wakeAll(); #ifdef Q_OS_SYMBIAN @@ -325,7 +325,7 @@ int QThread::idealThreadCount() #elif defined(Q_OS_INTEGRITY) // ### TODO - how to get the amound of CPUs on INTEGRITY? #elif defined(Q_OS_SYMBIAN) - // ### TODO - Get the number of cores from HAL? when multicore architectures (SMP) are supported + // ### TODO - Get the number of cores from HAL? when multicore architectures (SMP) are supported cores = 1; #else // the rest: Linux, Solaris, AIX, Tru64 @@ -545,10 +545,10 @@ void QThread::terminate() d->terminatePending = true; return; } - + d->terminated = true; QThreadPrivate::finish(this, false, false); - d->data->symbian_thread_handle.Terminate(KErrNone); + d->data->symbian_thread_handle.Terminate(KErrNone); d->data->symbian_thread_handle.Close(); #endif @@ -592,7 +592,7 @@ void QThread::setTerminationEnabled(bool enabled) d->terminated = true; QThreadPrivate::finish(thr, false); locker.unlock(); // don't leave the mutex locked! - pthread_exit(NULL); + pthread_exit(NULL); } #endif } diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index fc6a1e3a..a57fec7 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -150,10 +150,10 @@ struct Q_CORE_EXPORT QHashData }; inline void QHashData::mightGrow() // ### Qt 5: eliminate -{ +{ if (size >= numBuckets) rehash(numBits + 1); -} +} inline bool QHashData::willGrow() { @@ -992,12 +992,12 @@ Q_INLINE_TEMPLATE int QMultiHash<Key, T>::remove(const Key &key, const T &value) typename QHash<Key, T>::iterator end(QHash<Key, T>::end()); while (i != end && i.key() == key) { if (i.value() == value) { -#if defined(Q_CC_RVCT) - // RVCT has problems with scoping, apparently. +#if defined(Q_CC_RVCT) + // RVCT has problems with scoping, apparently. i = QHash<Key, T>::erase(i); #else i = erase(i); -#endif +#endif ++n; } else { ++i; diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h index be80e75..70a2896 100644 --- a/src/corelib/tools/qmap.h +++ b/src/corelib/tools/qmap.h @@ -1019,12 +1019,12 @@ Q_INLINE_TEMPLATE int QMultiMap<Key, T>::remove(const Key &key, const T &value) typename QMap<Key, T>::iterator end(QMap<Key, T>::end()); while (i != end && !qMapLessThanKey<Key>(key, i.key())) { if (i.value() == value) { -#if defined(Q_CC_RVCT) - // RVCT has problems with scoping, apparently. +#if defined(Q_CC_RVCT) + // RVCT has problems with scoping, apparently. i = QMap<Key, T>::erase(i); #else i = erase(i); -#endif +#endif ++n; } else { ++i; |