diff options
Diffstat (limited to 'src')
50 files changed, 1044 insertions, 599 deletions
diff --git a/src/corelib/arch/armv6/qatomic_generic_armv6.cpp b/src/corelib/arch/armv6/qatomic_generic_armv6.cpp index f638891..39d966a 100644 --- a/src/corelib/arch/armv6/qatomic_generic_armv6.cpp +++ b/src/corelib/arch/armv6/qatomic_generic_armv6.cpp @@ -46,6 +46,7 @@ #include <QtCore/qglobal.h> #ifdef QT_HAVE_ARMV6 +#ifndef SYMBIAN_E32_ATOMIC_API QT_BEGIN_NAMESPACE @@ -55,6 +56,24 @@ QT_USE_NAMESPACE #pragma push #pragma arm Q_CORE_EXPORT asm +bool QBasicAtomicInt_testAndSetRelaxed(volatile int *_q_value, int expectedValue, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +bool QBasicAtomicInt_testAndSetAcquire(volatile int *_q_value, int expectedValue, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +bool QBasicAtomicInt_testAndSetRelease(volatile int *_q_value, int expectedValue, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm bool QBasicAtomicInt_testAndSetOrdered(volatile int *_q_value, int expectedValue, int newValue) { CODE32 @@ -73,6 +92,24 @@ retry_testAndSetOrdered } Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndStoreRelaxed(volatile int *_q_value, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndStoreAcquire(volatile int *_q_value, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndStoreRelease(volatile int *_q_value, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *_q_value, int newValue) { CODE32 @@ -88,6 +125,24 @@ retry_fetchAndStoreOrdered } Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndAddRelaxed(volatile int *_q_value, int valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndAddAcquire(volatile int *_q_value, int valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndAddRelease(volatile int *_q_value, int valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd) { CODE32 @@ -105,6 +160,30 @@ retry_fetchAndAddOrdered } Q_CORE_EXPORT asm +bool QBasicAtomicPointer_testAndSetRelaxed(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +bool QBasicAtomicPointer_testAndSetRelease(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +bool QBasicAtomicPointer_testAndSetAcquire(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value, void *expectedValue, void *newValue) @@ -125,6 +204,24 @@ retryPointer_testAndSetOrdered } Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndStoreRelaxed(void * volatile *_q_value, void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndStoreAcquire(void * volatile *_q_value, void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndStoreRelease(void * volatile *_q_value, void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *_q_value, void *newValue) { CODE32 @@ -140,6 +237,24 @@ retryPointer_fetchAndStoreOrdered } Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndAddRelaxed(void * volatile *_q_value, qptrdiff valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndAddRelease(void * volatile *_q_value, qptrdiff valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndAddAcquire(void * volatile *_q_value, qptrdiff valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff valueToAdd) { CODE32 @@ -159,6 +274,21 @@ retryPointer_fetchAndAddOrdered #pragma pop #elif defined (Q_CC_GCCE) Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicInt_testAndSetRelaxed(volatile int *_q_value, int expectedValue, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicInt_testAndSetAcquire(volatile int *_q_value, int expectedValue, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicInt_testAndSetRelease(volatile int *_q_value, int expectedValue, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) bool QBasicAtomicInt_testAndSetOrdered(volatile int *_q_value, int expectedValue, int newValue) { //R0 = _q_value @@ -176,6 +306,21 @@ bool QBasicAtomicInt_testAndSetOrdered(volatile int *_q_value, int expectedValue } Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndStoreRelaxed(volatile int *_q_value, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndStoreAcquire(volatile int *_q_value, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndStoreRelease(volatile int *_q_value, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *_q_value, int newValue) { //R0 = _q_value @@ -190,6 +335,21 @@ int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *_q_value, int newValue) } Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndAddRelaxed(volatile int *_q_value, int valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndAddAcquire(volatile int *_q_value, int valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndAddRelease(volatile int *_q_value, int valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd) { //R0 = _q_value @@ -206,6 +366,27 @@ int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd) } Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicPointer_testAndSetRelaxed(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicPointer_testAndSetRelease(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicPointer_testAndSetAcquire(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value, void *expectedValue, void *newValue) @@ -225,6 +406,21 @@ bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value, } Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndStoreRelaxed(void * volatile *_q_value, void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndStoreAcquire(void * volatile *_q_value, void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndStoreRelease(void * volatile *_q_value, void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *_q_value, void *newValue) { //R0 = _q_value @@ -239,6 +435,21 @@ void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *_q_value, void * } Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndAddRelaxed(void * volatile *_q_value, qptrdiff valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndAddRelease(void * volatile *_q_value, qptrdiff valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndAddAcquire(void * volatile *_q_value, qptrdiff valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff valueToAdd) { //R0 = _q_value @@ -258,3 +469,4 @@ void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff #endif QT_END_NAMESPACE #endif +#endif diff --git a/src/corelib/arch/qatomic_symbian.h b/src/corelib/arch/qatomic_symbian.h index fa4e4a9..893bb300 100644 --- a/src/corelib/arch/qatomic_symbian.h +++ b/src/corelib/arch/qatomic_symbian.h @@ -104,10 +104,28 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree() Q_CORE_EXPORT bool QBasicAtomicInt_testAndSetOrdered(volatile int *, int, int); Q_CORE_EXPORT int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *, int); Q_CORE_EXPORT int QBasicAtomicInt_fetchAndAddOrdered(volatile int *, int); +Q_CORE_EXPORT bool QBasicAtomicInt_testAndSetRelaxed(volatile int *, int, int); +Q_CORE_EXPORT int QBasicAtomicInt_fetchAndStoreRelaxed(volatile int *, int); +Q_CORE_EXPORT int QBasicAtomicInt_fetchAndAddRelaxed(volatile int *, int); +Q_CORE_EXPORT bool QBasicAtomicInt_testAndSetAcquire(volatile int *, int, int); +Q_CORE_EXPORT int QBasicAtomicInt_fetchAndStoreAcquire(volatile int *, int); +Q_CORE_EXPORT int QBasicAtomicInt_fetchAndAddAcquire(volatile int *, int); +Q_CORE_EXPORT bool QBasicAtomicInt_testAndSetRelease(volatile int *, int, int); +Q_CORE_EXPORT int QBasicAtomicInt_fetchAndStoreRelease(volatile int *, int); +Q_CORE_EXPORT int QBasicAtomicInt_fetchAndAddRelease(volatile int *, int); Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *, void *, void *); Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *, void *); Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *, qptrdiff); +Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetRelaxed(void * volatile *, void *, void *); +Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndStoreRelaxed(void * volatile *, void *); +Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndAddRelaxed(void * volatile *, qptrdiff); +Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetAcquire(void * volatile *, void *, void *); +Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndStoreAcquire(void * volatile *, void *); +Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndAddAcquire(void * volatile *, qptrdiff); +Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetRelease(void * volatile *, void *, void *); +Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndStoreRelease(void * volatile *, void *); +Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndAddRelease(void * volatile *, qptrdiff); // Reference counting @@ -133,17 +151,17 @@ inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) { - return testAndSetOrdered(expectedValue, newValue); + return QBasicAtomicInt_testAndSetRelaxed(&_q_value, expectedValue, newValue); } inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) { - return testAndSetOrdered(expectedValue, newValue); + return QBasicAtomicInt_testAndSetAcquire(&_q_value, expectedValue, newValue); } inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) { - return testAndSetOrdered(expectedValue, newValue); + return QBasicAtomicInt_testAndSetRelease(&_q_value, expectedValue, newValue); } // Fetch and store for integers @@ -155,17 +173,17 @@ inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) { - return fetchAndStoreOrdered(newValue); + return QBasicAtomicInt_fetchAndStoreRelaxed(&_q_value, newValue); } inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) { - return fetchAndStoreOrdered(newValue); + return QBasicAtomicInt_fetchAndStoreAcquire(&_q_value, newValue); } inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) { - return fetchAndStoreOrdered(newValue); + return QBasicAtomicInt_fetchAndStoreRelease(&_q_value, newValue); } // Fetch and add for integers @@ -177,17 +195,17 @@ inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) { - return fetchAndAddOrdered(valueToAdd); + return QBasicAtomicInt_fetchAndAddRelaxed(&_q_value, valueToAdd); } inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) { - return fetchAndAddOrdered(valueToAdd); + return QBasicAtomicInt_fetchAndAddAcquire(&_q_value, valueToAdd); } inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) { - return fetchAndAddOrdered(valueToAdd); + return QBasicAtomicInt_fetchAndAddRelease(&_q_value, valueToAdd); } // Test and set for pointers @@ -195,27 +213,29 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue) { - union { T * volatile * typed; void * volatile * voidp; } pointer; - pointer.typed = &_q_value; - return QBasicAtomicPointer_testAndSetOrdered(pointer.voidp, expectedValue, newValue); + return QBasicAtomicPointer_testAndSetOrdered(reinterpret_cast<void * volatile *>(&_q_value), + expectedValue, newValue); } template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue) { - return testAndSetOrdered(expectedValue, newValue); + return QBasicAtomicPointer_testAndSetRelaxed(reinterpret_cast<void * volatile *>(&_q_value), + expectedValue, newValue); } template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue) { - return testAndSetOrdered(expectedValue, newValue); + return QBasicAtomicPointer_testAndSetAcquire(reinterpret_cast<void * volatile *>(&_q_value), + expectedValue, newValue); } template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue) { - return testAndSetOrdered(expectedValue, newValue); + return QBasicAtomicPointer_testAndSetRelease(reinterpret_cast<void * volatile *>(&_q_value), + expectedValue, newValue); } // Fetch and store for pointers @@ -223,29 +243,33 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) { - union { T * volatile * typed; void * volatile * voidp; } pointer; - union { T *typed; void *voidp; } returnValue; - pointer.typed = &_q_value; - returnValue.voidp = QBasicAtomicPointer_fetchAndStoreOrdered(pointer.voidp, newValue); - return returnValue.typed; + return static_cast<T*>(QBasicAtomicPointer_fetchAndStoreOrdered( + reinterpret_cast<void * volatile *>(&_q_value) + , newValue)); } template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) { - return fetchAndStoreOrdered(newValue); + return static_cast<T*>(QBasicAtomicPointer_fetchAndStoreRelaxed( + reinterpret_cast<void * volatile *>(&_q_value) + , newValue)); } template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue) { - return fetchAndStoreOrdered(newValue); + return static_cast<T*>(QBasicAtomicPointer_fetchAndStoreAcquire( + reinterpret_cast<void * volatile *>(&_q_value) + , newValue)); } template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue) { - return fetchAndStoreOrdered(newValue); + return static_cast<T*>(QBasicAtomicPointer_fetchAndStoreRelease( + reinterpret_cast<void * volatile *>(&_q_value) + , newValue)); } // Fetch and add for pointers @@ -253,29 +277,33 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue) template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd) { - union { T * volatile *typed; void * volatile *voidp; } pointer; - union { T *typed; void *voidp; } returnValue; - pointer.typed = &_q_value; - returnValue.voidp = QBasicAtomicPointer_fetchAndAddOrdered(pointer.voidp, valueToAdd * sizeof(T)); - return returnValue.typed; + return static_cast<T*>(QBasicAtomicPointer_fetchAndAddOrdered( + reinterpret_cast<void * volatile *>(&_q_value), + valueToAdd * sizeof(T))); } template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd) { - return fetchAndAddOrdered(valueToAdd); + return static_cast<T*>(QBasicAtomicPointer_fetchAndAddRelaxed( + reinterpret_cast<void * volatile *>(&_q_value), + valueToAdd * sizeof(T))); } template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd) { - return fetchAndAddOrdered(valueToAdd); + return static_cast<T*>(QBasicAtomicPointer_fetchAndAddAcquire( + reinterpret_cast<void * volatile *>(&_q_value), + valueToAdd * sizeof(T))); } template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd) { - return fetchAndAddOrdered(valueToAdd); + return static_cast<T*>(QBasicAtomicPointer_fetchAndAddRelease( + reinterpret_cast<void * volatile *>(&_q_value), + valueToAdd * sizeof(T))); } QT_END_NAMESPACE diff --git a/src/corelib/arch/symbian/qatomic_symbian.cpp b/src/corelib/arch/symbian/qatomic_symbian.cpp index a2228a1..568fb7a 100644 --- a/src/corelib/arch/symbian/qatomic_symbian.cpp +++ b/src/corelib/arch/symbian/qatomic_symbian.cpp @@ -42,6 +42,10 @@ #include <QtCore/qglobal.h> #include <QtCore/qatomic.h> +#ifdef SYMBIAN_E32_ATOMIC_API +#include <e32atomics.h> +#endif + #include <e32debug.h> QT_BEGIN_NAMESPACE @@ -79,7 +83,7 @@ struct QSymbianPrintExitInfo Q_CORE_EXPORT bool QBasicAtomicInt::isReferenceCountingNative() { -#ifdef QT_HAVE_ARMV6 +#if !defined(SYMBIAN_E32_ATOMIC_API) && defined(QT_HAVE_ARMV6) return true; #else return false; @@ -88,7 +92,7 @@ Q_CORE_EXPORT bool QBasicAtomicInt::isReferenceCountingNative() Q_CORE_EXPORT bool QBasicAtomicInt::isTestAndSetNative() { -#ifdef QT_HAVE_ARMV6 +#if !defined(SYMBIAN_E32_ATOMIC_API) && defined(QT_HAVE_ARMV6) return true; #else return false; @@ -97,7 +101,7 @@ Q_CORE_EXPORT bool QBasicAtomicInt::isTestAndSetNative() Q_CORE_EXPORT bool QBasicAtomicInt::isFetchAndStoreNative() { -#ifdef QT_HAVE_ARMV6 +#if !defined(SYMBIAN_E32_ATOMIC_API) && defined(QT_HAVE_ARMV6) return true; #else return false; @@ -106,7 +110,7 @@ Q_CORE_EXPORT bool QBasicAtomicInt::isFetchAndStoreNative() Q_CORE_EXPORT bool QBasicAtomicInt::isFetchAndAddNative() { -#ifdef QT_HAVE_ARMV6 +#if !defined(SYMBIAN_E32_ATOMIC_API) && defined(QT_HAVE_ARMV6) return true; #else return false; @@ -115,7 +119,7 @@ Q_CORE_EXPORT bool QBasicAtomicInt::isFetchAndAddNative() Q_CORE_EXPORT bool QBasicAtomicPointer_isTestAndSetNative() { -#ifdef QT_HAVE_ARMV6 +#if !defined(SYMBIAN_E32_ATOMIC_API) && defined(QT_HAVE_ARMV6) return true; #else return false; @@ -124,7 +128,7 @@ Q_CORE_EXPORT bool QBasicAtomicPointer_isTestAndSetNative() Q_CORE_EXPORT bool QBasicAtomicPointer_isFetchAndStoreNative() { -#ifdef QT_HAVE_ARMV6 +#if !defined(SYMBIAN_E32_ATOMIC_API) && defined(QT_HAVE_ARMV6) return true; #else return false; @@ -133,13 +137,187 @@ Q_CORE_EXPORT bool QBasicAtomicPointer_isFetchAndStoreNative() Q_CORE_EXPORT bool QBasicAtomicPointer_isFetchAndAddNative() { -#ifdef QT_HAVE_ARMV6 +#if !defined(SYMBIAN_E32_ATOMIC_API) && defined(QT_HAVE_ARMV6) return true; #else return false; #endif } +#ifdef SYMBIAN_E32_ATOMIC_API +//Symbian's API is SMP-safe when using SMP kernel, and cheap when using uniprocessor kernel + +//generate compiler error if casting assumptions are wrong (symbian64?) +__ASSERT_COMPILE(sizeof(int) == sizeof(TUint32)); +__ASSERT_COMPILE(sizeof(void *) == sizeof(TUint32)); + +Q_CORE_EXPORT +bool QBasicAtomicInt_testAndSetOrdered(volatile int *_q_value, int expectedValue, int newValue) +{ + return static_cast<bool>(__e32_atomic_cas_ord32(_q_value, + reinterpret_cast<TUint32*>(&expectedValue), newValue)); +} + +Q_CORE_EXPORT +bool QBasicAtomicInt_testAndSetRelaxed(volatile int *_q_value, int expectedValue, int newValue) +{ + return static_cast<bool>(__e32_atomic_cas_rlx32(_q_value, + reinterpret_cast<TUint32*>(&expectedValue), newValue)); +} + +Q_CORE_EXPORT +bool QBasicAtomicInt_testAndSetAcquire(volatile int *_q_value, int expectedValue, int newValue) +{ + return static_cast<bool>(__e32_atomic_cas_acq32(_q_value, + reinterpret_cast<TUint32*>(&expectedValue), newValue)); +} + +Q_CORE_EXPORT +bool QBasicAtomicInt_testAndSetRelease(volatile int *_q_value, int expectedValue, int newValue) +{ + return static_cast<bool>(__e32_atomic_cas_rel32(_q_value, + reinterpret_cast<TUint32*>(&expectedValue), newValue)); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *_q_value, int newValue) +{ + return static_cast<int>(__e32_atomic_swp_ord32(_q_value, newValue)); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndStoreRelaxed(volatile int *_q_value, int newValue) +{ + return static_cast<int>(__e32_atomic_swp_rlx32(_q_value, newValue)); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndStoreAcquire(volatile int *_q_value, int newValue) +{ + return static_cast<int>(__e32_atomic_swp_acq32(_q_value, newValue)); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndStoreRelease(volatile int *_q_value, int newValue) +{ + return static_cast<int>(__e32_atomic_swp_rel32(_q_value, newValue)); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd) +{ + return static_cast<int>(__e32_atomic_add_ord32(_q_value, valueToAdd)); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndAddRelaxed(volatile int *_q_value, int valueToAdd) +{ + return static_cast<int>(__e32_atomic_add_rlx32(_q_value, valueToAdd)); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndAddAcquire(volatile int *_q_value, int valueToAdd) +{ + return static_cast<int>(__e32_atomic_add_acq32(_q_value, valueToAdd)); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndAddRelease(volatile int *_q_value, int valueToAdd) +{ + return static_cast<int>(__e32_atomic_add_rel32(_q_value, valueToAdd)); +} + +Q_CORE_EXPORT +bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + return static_cast<bool>(__e32_atomic_cas_ord_ptr(_q_value, + &expectedValue, + newValue)); +} + +Q_CORE_EXPORT +bool QBasicAtomicPointer_testAndSetRelaxed(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + return static_cast<bool>(__e32_atomic_cas_rlx_ptr(_q_value, + &expectedValue, + newValue)); +} + +Q_CORE_EXPORT +bool QBasicAtomicPointer_testAndSetAcquire(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + return static_cast<bool>(__e32_atomic_cas_acq_ptr(_q_value, + &expectedValue, + newValue)); +} + +Q_CORE_EXPORT +bool QBasicAtomicPointer_testAndSetRelease(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + return static_cast<bool>(__e32_atomic_cas_rel_ptr(_q_value, + &expectedValue, + newValue)); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *_q_value, void *newValue) +{ + return __e32_atomic_swp_ord_ptr(_q_value, newValue); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndStoreRelaxed(void * volatile *_q_value, void *newValue) +{ + return __e32_atomic_swp_rlx_ptr(_q_value, newValue); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndStoreAcquire(void * volatile *_q_value, void *newValue) +{ + return __e32_atomic_swp_acq_ptr(_q_value, newValue); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndStoreRelease(void * volatile *_q_value, void *newValue) +{ + return __e32_atomic_swp_rel_ptr(_q_value, newValue); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff valueToAdd) +{ + return __e32_atomic_add_ord_ptr(_q_value, valueToAdd); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndAddRelaxed(void * volatile *_q_value, qptrdiff valueToAdd) +{ + return __e32_atomic_add_rlx_ptr(_q_value, valueToAdd); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndAddAcquire(void * volatile *_q_value, qptrdiff valueToAdd) +{ + return __e32_atomic_add_acq_ptr(_q_value, valueToAdd); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndAddRelease(void * volatile *_q_value, qptrdiff valueToAdd) +{ + return __e32_atomic_add_rel_ptr(_q_value, valueToAdd); +} + +#else +//Symbian kernels 9.4 and earlier don't expose a suitable API + //For ARMv6, the generic atomics are machine coded #ifndef QT_HAVE_ARMV6 @@ -229,6 +407,121 @@ void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff return returnValue; } +Q_CORE_EXPORT +bool QBasicAtomicInt_testAndSetRelaxed(volatile int *_q_value, int expectedValue, int newValue) +{ + return QBasicAtomicInt_testAndSetOrdered(_q_value, expectedValue, newValue); +} + +Q_CORE_EXPORT +bool QBasicAtomicInt_testAndSetAcquire(volatile int *_q_value, int expectedValue, int newValue) +{ + return QBasicAtomicInt_testAndSetOrdered(_q_value, expectedValue, newValue); +} + +Q_CORE_EXPORT +bool QBasicAtomicInt_testAndSetRelease(volatile int *_q_value, int expectedValue, int newValue) +{ + return QBasicAtomicInt_testAndSetOrdered(_q_value, expectedValue, newValue); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndStoreRelaxed(volatile int *_q_value, int newValue) +{ + return QBasicAtomicInt_fetchAndStoreOrdered(_q_value, newValue); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndStoreAcquire(volatile int *_q_value, int newValue) +{ + return QBasicAtomicInt_fetchAndStoreOrdered(_q_value, newValue); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndStoreRelease(volatile int *_q_value, int newValue) +{ + return QBasicAtomicInt_fetchAndStoreOrdered(_q_value, newValue); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndAddRelaxed(volatile int *_q_value, int valueToAdd) +{ + return QBasicAtomicInt_fetchAndAddOrdered(_q_value, valueToAdd); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndAddAcquire(volatile int *_q_value, int valueToAdd) +{ + return QBasicAtomicInt_fetchAndAddOrdered(_q_value, valueToAdd); +} + +Q_CORE_EXPORT +int QBasicAtomicInt_fetchAndAddRelease(volatile int *_q_value, int valueToAdd) +{ + return QBasicAtomicInt_fetchAndAddOrdered(_q_value, valueToAdd); +} + +Q_CORE_EXPORT +bool QBasicAtomicPointer_testAndSetRelaxed(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + return QBasicAtomicPointer_testAndSetOrdered(_q_value, expectedValue, newValue); +} + +Q_CORE_EXPORT +bool QBasicAtomicPointer_testAndSetAcquire(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + return QBasicAtomicPointer_testAndSetOrdered(_q_value, expectedValue, newValue); +} + +Q_CORE_EXPORT +bool QBasicAtomicPointer_testAndSetRelease(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + return QBasicAtomicPointer_testAndSetOrdered(_q_value, expectedValue, newValue); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndStoreRelaxed(void * volatile *_q_value, void *newValue) +{ + return QBasicAtomicPointer_fetchAndStoreOrdered(_q_value, newValue); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndStoreAcquire(void * volatile *_q_value, void *newValue) +{ + return QBasicAtomicPointer_fetchAndStoreOrdered(_q_value, newValue); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndStoreRelease(void * volatile *_q_value, void *newValue) +{ + return QBasicAtomicPointer_fetchAndStoreOrdered(_q_value, newValue); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndAddRelaxed(void * volatile *_q_value, qptrdiff valueToAdd) +{ + return QBasicAtomicPointer_fetchAndAddOrdered(_q_value, valueToAdd); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndAddAcquire(void * volatile *_q_value, qptrdiff valueToAdd) +{ + return QBasicAtomicPointer_fetchAndAddOrdered(_q_value, valueToAdd); +} + +Q_CORE_EXPORT +void *QBasicAtomicPointer_fetchAndAddRelease(void * volatile *_q_value, qptrdiff valueToAdd) +{ + return QBasicAtomicPointer_fetchAndAddOrdered(_q_value, valueToAdd); +} + #endif // QT_HAVE_ARMV6 +#endif // SYMBIAN_E32_ATOMIC_API QT_END_NAMESPACE diff --git a/src/gui/dialogs/qcolordialog.cpp b/src/gui/dialogs/qcolordialog.cpp index e6abf7f..e9b5720 100644 --- a/src/gui/dialogs/qcolordialog.cpp +++ b/src/gui/dialogs/qcolordialog.cpp @@ -644,6 +644,7 @@ protected: void paintEvent(QPaintEvent*); void mouseMoveEvent(QMouseEvent *); void mousePressEvent(QMouseEvent *); + void resizeEvent(QResizeEvent *); private: int hue; @@ -654,7 +655,7 @@ private: int satPt(const QPoint &pt); void setCol(const QPoint &pt); - QPixmap *pix; + QPixmap pix; }; static int pWidth = 220; @@ -790,13 +791,27 @@ void QColorLuminancePicker::setCol(int h, int s , int v) } QPoint QColorPicker::colPt() -{ return QPoint((360-hue)*(pWidth-1)/360, (255-sat)*(pHeight-1)/255); } +{ + QRect r = contentsRect(); + return QPoint((360 - hue) * (r.width() - 1) / 360, (255 - sat) * (r.height() - 1) / 255); +} + int QColorPicker::huePt(const QPoint &pt) -{ return 360 - pt.x()*360/(pWidth-1); } +{ + QRect r = contentsRect(); + return 360 - pt.x() * 360 / (r.width() - 1); +} + int QColorPicker::satPt(const QPoint &pt) -{ return 255 - pt.y()*255/(pHeight-1) ; } +{ + QRect r = contentsRect(); + return 255 - pt.y() * 255 / (r.height() - 1); +} + void QColorPicker::setCol(const QPoint &pt) -{ setCol(huePt(pt), satPt(pt)); } +{ + setCol(huePt(pt), satPt(pt)); +} QColorPicker::QColorPicker(QWidget* parent) : QFrame(parent) @@ -804,29 +819,12 @@ QColorPicker::QColorPicker(QWidget* parent) hue = 0; sat = 0; setCol(150, 255); - QImage img(pWidth, pHeight, QImage::Format_RGB32); - int x, y; - uint *pixel = (uint *) img.scanLine(0); - for (y = 0; y < pHeight; y++) { - const uint *end = pixel + pWidth; - x = 0; - while (pixel < end) { - QPoint p(x, y); - QColor c; - c.setHsv(huePt(p), satPt(p), 200); - *pixel = c.rgb(); - ++pixel; - ++x; - } - } - pix = new QPixmap(QPixmap::fromImage(img)); setAttribute(Qt::WA_NoSystemBackground); setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed) ); } QColorPicker::~QColorPicker() { - delete pix; } QSize QColorPicker::sizeHint() const @@ -869,7 +867,7 @@ void QColorPicker::paintEvent(QPaintEvent* ) drawFrame(&p); QRect r = contentsRect(); - p.drawPixmap(r.topLeft(), *pix); + p.drawPixmap(r.topLeft(), pix); QPoint pt = colPt() + r.topLeft(); p.setPen(Qt::black); @@ -878,6 +876,31 @@ void QColorPicker::paintEvent(QPaintEvent* ) } +void QColorPicker::resizeEvent(QResizeEvent *ev) +{ + QFrame::resizeEvent(ev); + + int w = width() - frameWidth() * 2; + int h = height() - frameWidth() * 2; + QImage img(w, h, QImage::Format_RGB32); + int x, y; + uint *pixel = (uint *) img.scanLine(0); + for (y = 0; y < h; y++) { + const uint *end = pixel + w; + x = 0; + while (pixel < end) { + QPoint p(x, y); + QColor c; + c.setHsv(huePt(p), satPt(p), 200); + *pixel = c.rgb(); + ++pixel; + ++x; + } + } + pix = QPixmap::fromImage(img); +} + + class QColSpinBox : public QSpinBox { public: diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 4f3a719..a13c8c8 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -337,7 +337,7 @@ QPixmap QPixmap::fromSymbianCFbsBitmap(CFbsBitmap *bitmap) if (!bitmap) return QPixmap(); - QScopedPointer<QS60PixmapData> data(new QS60PixmapData(QPixmapData::PixmapType)); + QScopedPointer<QPixmapData> data(QPixmapData::create(0,0, QPixmapData::PixmapType)); data->fromNativeType(reinterpret_cast<void*>(bitmap), QPixmapData::FbsBitmap); QPixmap pixmap(data.take()); return pixmap; @@ -735,7 +735,7 @@ QPixmap QPixmap::fromSymbianRSgImage(RSgImage *sgImage) if (!sgImage) return QPixmap(); - QScopedPointer<QS60PixmapData> data(new QS60PixmapData(QPixmapData::PixmapType)); + QScopedPointer<QPixmapData> data(QPixmapData::create(0,0, QPixmapData::PixmapType)); data->fromNativeType(reinterpret_cast<void*>(sgImage), QPixmapData::SgImage); QPixmap pixmap(data.take()); return pixmap; diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 79b2bff..4a15cf2 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -63,7 +63,7 @@ #include "private/qsoftkeymanager_p.h" #include "apgwgnam.h" // For CApaWindowGroupName -#include <MdaAudioTonePlayer.h> // For CMdaAudioToneUtility +#include <mdaaudiotoneplayer.h> // For CMdaAudioToneUtility #if defined(Q_WS_S60) # if !defined(QT_NO_IM) diff --git a/src/gui/kernel/qdesktopwidget_s60.cpp b/src/gui/kernel/qdesktopwidget_s60.cpp index 84e3c5d..e4d0bf3 100644 --- a/src/gui/kernel/qdesktopwidget_s60.cpp +++ b/src/gui/kernel/qdesktopwidget_s60.cpp @@ -88,6 +88,7 @@ QDesktopWidgetPrivate::~QDesktopWidgetPrivate() void QDesktopWidgetPrivate::init(QDesktopWidget *that) { + Q_UNUSED(that); // int screenCount=0; // ### TODO: Implement proper multi-display support diff --git a/src/gui/kernel/qdnd_s60.cpp b/src/gui/kernel/qdnd_s60.cpp index 24f0090..1aa30af 100644 --- a/src/gui/kernel/qdnd_s60.cpp +++ b/src/gui/kernel/qdnd_s60.cpp @@ -52,7 +52,7 @@ #include "qdnd_p.h" #include "qt_s60_p.h" -#include <COECNTRL.H> +#include <coecntrl.h> // pointer cursor #include <w32std.h> #include <gdi.h> diff --git a/src/gui/kernel/qsound_s60.cpp b/src/gui/kernel/qsound_s60.cpp index 1832b85..df2830b 100644 --- a/src/gui/kernel/qsound_s60.cpp +++ b/src/gui/kernel/qsound_s60.cpp @@ -51,7 +51,7 @@ #include <private/qcore_symbian_p.h> #include <e32std.h> -#include <MdaAudioSamplePlayer.h> +#include <mdaaudiosampleplayer.h> QT_BEGIN_NAMESPACE diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 735ca7a..cedede1 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -68,12 +68,12 @@ #include <eikappui.h> #ifdef Q_WS_S60 -#include <aknutils.h> // AknLayoutUtils +#include <AknUtils.h> // AknLayoutUtils #include <avkon.hrh> // EEikStatusPaneUidTitle #include <akntitle.h> // CAknTitlePane #include <akncontext.h> // CAknContextPane #include <eikspane.h> // CEikStatusPane -#include <aknpopupfader.h> // MAknFadedComponent and TAknPopupFader +#include <AknPopupFader.h> // MAknFadedComponent and TAknPopupFader #endif QT_BEGIN_NAMESPACE diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 81c4198..79702af 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1037,6 +1037,17 @@ QPoint QWidget::mapFromGlobal(const QPoint &pos) const return widgetPos; } +static Qt::WindowStates effectiveState(Qt::WindowStates state) +{ + if (state & Qt::WindowMinimized) + return Qt::WindowMinimized; + else if (state & Qt::WindowFullScreen) + return Qt::WindowFullScreen; + else if (state & Qt::WindowMaximized) + return Qt::WindowMaximized; + return Qt::WindowNoState; +} + void QWidget::setWindowState(Qt::WindowStates newstate) { Q_D(QWidget); @@ -1108,8 +1119,14 @@ void QWidget::setWindowState(Qt::WindowStates newstate) //restore normal geometry top->normalGeometry = normalGeometry; - setAttribute(Qt::WA_Resized, wasResized); - setAttribute(Qt::WA_Moved, wasMoved); + // FixMe QTBUG-8977 + // In some platforms, WA_Resized and WA_Moved are also not set when application window state is + // anything else than normal. In Symbian we can restore them only for normal window state since + // restoring for other modes, will make fluidlauncher to be launched in wrong size (200x100) + if (effectiveState(newstate) == Qt::WindowNoState) { + setAttribute(Qt::WA_Resized, wasResized); + setAttribute(Qt::WA_Moved, wasMoved); + } } data->window_state = newstate; diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 070491d..2724d7f 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -7174,9 +7174,9 @@ static inline void rgbBlendPixel(quint32 *dst, int coverage, int sr, int sg, int ) { int a = qGray(coverage); - sr = qt_div_255(sr * a); - sg = qt_div_255(sg * a); - sb = qt_div_255(sb * a); + sr = qt_div_255(qt_pow_rgb_invgamma[sr] * a); + sg = qt_div_255(qt_pow_rgb_invgamma[sg] * a); + sb = qt_div_255(qt_pow_rgb_invgamma[sb] * a); int ia = 255 - a; dr = qt_div_255(dr * ia); diff --git a/src/gui/s60framework/qs60maindocument.h b/src/gui/s60framework/qs60maindocument.h index 438b80c..553675f 100644 --- a/src/gui/s60framework/qs60maindocument.h +++ b/src/gui/s60framework/qs60maindocument.h @@ -46,7 +46,7 @@ #ifdef Q_WS_S60 -#include <akndoc.h> +#include <AknDoc.h> class CEikApplication; diff --git a/src/gui/s60framework/s60framework.pri b/src/gui/s60framework/s60framework.pri index 5884b68..6080e6d 100644 --- a/src/gui/s60framework/s60framework.pri +++ b/src/gui/s60framework/s60framework.pri @@ -5,7 +5,7 @@ minimalAppResource31 = \ "SOURCEPATH s60framework" \ "START RESOURCE s60main.rss" \ "HEADER" \ - "TARGETPATH resource\apps" \ + "TARGETPATH /resource/apps" \ "END" MMP_RULES += minimalAppResource31 diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index d57b187..5202701 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -50,17 +50,17 @@ #include "qapplication.h" #include <w32std.h> -#include <aknsconstants.h> +#include <AknsConstants.h> #include <aknconsts.h> -#include <aknsitemid.h> -#include <aknsutils.h> -#include <aknsdrawutils.h> -#include <aknsskininstance.h> -#include <aknsbasicbackgroundcontrolcontext.h> +#include <AknsItemID.h> +#include <AknsUtils.h> +#include <AknsDrawUtils.h> +#include <AknsSkinInstance.h> +#include <AknsBasicBackgroundControlContext.h> #include <avkon.mbg> #include <AknFontAccess.h> #include <AknLayoutFont.h> -#include <aknutils.h> +#include <AknUtils.h> #include <aknnavi.h> #include <gulicon.h> #include <AknBitmapAnimation.h> diff --git a/src/gui/styles/styles.pri b/src/gui/styles/styles.pri index 676f59e..5084442 100644 --- a/src/gui/styles/styles.pri +++ b/src/gui/styles/styles.pri @@ -164,17 +164,17 @@ contains( styles, windowsmobile ) { } contains( styles, s60 ):contains(QT_CONFIG, s60) { - HEADERS += \ - styles/qs60style.h \ - styles/qs60style_p.h - SOURCES += styles/qs60style.cpp - symbian { - SOURCES += styles/qs60style_s60.cpp - LIBS += -laknicon -laknskins -laknskinsrv -lfontutils -legul -lbmpanim - } else { - SOURCES += styles/qs60style_simulated.cpp - RESOURCES += styles/qstyle_s60_simulated.qrc - } + HEADERS += \ + styles/qs60style.h \ + styles/qs60style_p.h + SOURCES += styles/qs60style.cpp + symbian { + SOURCES += styles/qs60style_s60.cpp + LIBS += -lAknIcon -lAKNSKINS -lAKNSKINSRV -lFontUtils -legul -lbmpanim + } else { + SOURCES += styles/qs60style_simulated.cpp + RESOURCES += styles/qstyle_s60_simulated.qrc + } } else { - DEFINES += QT_NO_STYLE_S60 + DEFINES += QT_NO_STYLE_S60 } diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 7e5397d..87a73df 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -50,7 +50,7 @@ #include "qendian.h" #include <private/qcore_symbian_p.h> #if defined(QT_NO_FREETYPE) -#include <OPENFONT.H> +#include <openfont.h> #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS #include <graphics/openfontrasterizer.h> // COpenFontRasterizer has moved to a new header file #endif // SYMBIAN_ENABLE_SPLIT_HEADERS diff --git a/src/gui/text/qfontengine_s60_p.h b/src/gui/text/qfontengine_s60_p.h index 78f8a9a..5834cc4 100644 --- a/src/gui/text/qfontengine_s60_p.h +++ b/src/gui/text/qfontengine_s60_p.h @@ -56,7 +56,7 @@ #include "qconfig.h" #include "qfontengine_p.h" #include "qsize.h" -#include <OPENFONT.H> +#include <openfont.h> class CFont; diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp index adc4fc1..39240e6 100644 --- a/src/gui/util/qdesktopservices_s60.cpp +++ b/src/gui/util/qdesktopservices_s60.cpp @@ -62,8 +62,8 @@ const TUid KUidMsgTypeSMTP = {0x10001028}; // 268439592 #ifdef Q_WS_S60 # include <pathinfo.h> // PathInfo # ifdef USE_DOCUMENTHANDLER -# include <documenthandler.h> // CDocumentHandler -# include <aknserverapp.h> +# include <DocumentHandler.h> // CDocumentHandler +# include <AknServerApp.h> # endif #else # warning CDocumentHandler requires support for S60 diff --git a/src/gui/util/util.pri b/src/gui/util/util.pri index cdbb7cc..3074367 100644 --- a/src/gui/util/util.pri +++ b/src/gui/util/util.pri @@ -41,5 +41,5 @@ embedded { symbian { LIBS += -lsendas2 -letext -lapmime - contains(QT_CONFIG, s60): LIBS += -lplatformenv -lcommonui + contains(QT_CONFIG, s60): LIBS += -lplatformenv -lCommonUI } diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp index 7e59bb0..16a7c31 100644 --- a/src/gui/widgets/qmainwindow.cpp +++ b/src/gui/widgets/qmainwindow.cpp @@ -65,9 +65,6 @@ QT_BEGIN_NAMESPACE extern OSWindowRef qt_mac_window_for(const QWidget *); // qwidget_mac.cpp QT_END_NAMESPACE #endif -#ifdef QT_SOFTKEYS_ENABLED -#include <private/qsoftkeymanager_p.h> -#endif QT_BEGIN_NAMESPACE @@ -80,9 +77,6 @@ public: #ifdef Q_WS_MAC , useHIToolBar(false) #endif -#ifdef QT_SOFTKEYS_ENABLED - , menuBarAction(0) -#endif #if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR) , hasOldCursor(false) , cursorAdjusted(false) #endif @@ -94,9 +88,6 @@ public: #ifdef Q_WS_MAC bool useHIToolBar; #endif -#ifdef QT_SOFTKEYS_ENABLED - QAction *menuBarAction; -#endif void init(); QList<int> hoverSeparator; QPoint hoverPos; @@ -117,10 +108,6 @@ void QMainWindowPrivate::init() const int metric = q->style()->pixelMetric(QStyle::PM_ToolBarIconSize, 0, q); iconSize = QSize(metric, metric); q->setAttribute(Qt::WA_Hover); -#ifdef QT_SOFTKEYS_ENABLED - menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::MenuSoftKey, q); - menuBarAction->setVisible(false); -#endif } /* @@ -492,13 +479,6 @@ void QMainWindow::setMenuBar(QMenuBar *menuBar) oldMenuBar->deleteLater(); } d->layout->setMenuBar(menuBar); - -#ifdef QT_SOFTKEYS_ENABLED - if (menuBar) - addAction(d->menuBarAction); - else - removeAction(d->menuBarAction); -#endif } /*! @@ -1427,11 +1407,6 @@ bool QMainWindow::event(QEvent *event) } break; #endif -#ifdef QT_SOFTKEYS_ENABLED - case QEvent::LanguageChange: - d->menuBarAction->setText(QSoftKeyManager::standardSoftKeyText(QSoftKeyManager::MenuSoftKey)); - break; -#endif default: break; } diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index e46688c..7224768 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -324,6 +324,14 @@ void QMenuBarPrivate::symbianDestroyMenuBar() symbian_menubar = 0; } +void QMenuBarPrivate::reparentMenuBar(QWidget *oldParent, QWidget *newParent) +{ + if (menubars()->contains(oldParent)) { + QMenuBarPrivate *object = menubars()->take(oldParent); + menubars()->insert(newParent, object); + } +} + QMenuBarPrivate::QSymbianMenuBarPrivate::QSymbianMenuBarPrivate(QMenuBarPrivate *menubar) { d = menubar; diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index 9caadb7..13aa02b 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -71,6 +71,10 @@ extern bool qt_wince_is_mobile(); //defined in qguifunctions_wce.cpp #endif +#ifdef QT_SOFTKEYS_ENABLED +#include <private/qsoftkeymanager_p.h> +#endif + QT_BEGIN_NAMESPACE class QMenuBarExtension : public QToolButton @@ -740,17 +744,14 @@ void QMenuBarPrivate::init() QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar, true); } #endif -#ifdef Q_WS_S60 - symbianCreateMenuBar(q->parentWidget()); - if(symbian_menubar) - q->hide(); -#endif - q->setBackgroundRole(QPalette::Button); oldWindow = oldParent = 0; #ifdef QT3_SUPPORT doAutoResize = false; #endif +#ifdef QT_SOFTKEYS_ENABLED + menuBarAction = 0; +#endif handleReparent(); q->setMouseTracking(q->style()->styleHint(QStyle::SH_MenuBar_MouseTracking, 0, q)); @@ -1384,10 +1385,38 @@ void QMenuBarPrivate::handleReparent() wce_menubar->rebuild(); #endif #ifdef Q_WS_S60 - if (symbian_menubar) + + // Construct symbian_menubar when this code path is entered first time + // and when newParent != NULL + if (!symbian_menubar) + symbianCreateMenuBar(newParent); + + // Reparent and rebuild menubar when parent is changed + if (symbian_menubar) { + if (oldParent != newParent) + reparentMenuBar(oldParent, newParent); + q->hide(); symbian_menubar->rebuild(); -#endif + } +#ifdef QT_SOFTKEYS_ENABLED + // Constuct menuBarAction when this code path is entered first time + if (!menuBarAction) { + if (newParent) { + menuBarAction = QSoftKeyManager::createAction(QSoftKeyManager::MenuSoftKey, newParent); + menuBarAction->setVisible(false); + newParent->addAction(menuBarAction); + } + } else { + // If reparenting i.e. we already have menuBarAction, remove it from old parent + // and add for a new parent + if (oldParent) + oldParent->removeAction(menuBarAction); + if (newParent) + newParent->addAction(menuBarAction); + } +#endif // QT_SOFTKEYS_ENABLED +#endif // Q_WS_S60 } #ifdef QT3_SUPPORT @@ -1440,7 +1469,13 @@ void QMenuBar::changeEvent(QEvent *e) || e->type() == QEvent::ApplicationFontChange) { d->itemsDirty = true; d->updateGeometries(); +#ifdef QT_SOFTKEYS_ENABLED + } else if (e->type() == QEvent::LanguageChange) { + if (d->menuBarAction) + d->menuBarAction->setText(QSoftKeyManager::standardSoftKeyText(QSoftKeyManager::MenuSoftKey)); +#endif } + QWidget::changeEvent(e); } diff --git a/src/gui/widgets/qmenubar_p.h b/src/gui/widgets/qmenubar_p.h index f2e5357..e4db6ce 100644 --- a/src/gui/widgets/qmenubar_p.h +++ b/src/gui/widgets/qmenubar_p.h @@ -243,6 +243,7 @@ public: #ifdef Q_WS_S60 void symbianCreateMenuBar(QWidget *); void symbianDestroyMenuBar(); + void reparentMenuBar(QWidget *oldParent, QWidget *newParent); struct QSymbianMenuBarPrivate { QList<QSymbianMenuAction*> actionItems; QMenuBarPrivate *d; @@ -267,7 +268,9 @@ public: } *symbian_menubar; static int symbianCommands(int command); - +#ifdef QT_SOFTKEYS_ENABLED + QAction *menuBarAction; +#endif #endif }; #endif diff --git a/src/multimedia/audio/audio.pri b/src/multimedia/audio/audio.pri index 625b871c..ae28a26 100644 --- a/src/multimedia/audio/audio.pri +++ b/src/multimedia/audio/audio.pri @@ -41,6 +41,21 @@ mac { !wince*:LIBS += -lwinmm wince*:LIBS += -lcoredll +} else:symbian { + INCLUDEPATH += /epoc32/include/mmf/common + INCLUDEPATH += /epoc32/include/mmf/server + + HEADERS += $$PWD/qaudio_symbian_p.h \ + $$PWD/qaudiodeviceinfo_symbian_p.h \ + $$PWD/qaudioinput_symbian_p.h \ + $$PWD/qaudiooutput_symbian_p.h + + SOURCES += $$PWD/qaudio_symbian_p.cpp \ + $$PWD/qaudiodeviceinfo_symbian_p.cpp \ + $$PWD/qaudioinput_symbian_p.cpp \ + $$PWD/qaudiooutput_symbian_p.cpp + + LIBS += -lmmfdevsound } else:unix { unix:contains(QT_CONFIG, alsa) { linux-*|freebsd-*|openbsd-*:{ diff --git a/src/plugins/audio/symbian/symbianaudioutils.cpp b/src/multimedia/audio/qaudio_symbian_p.cpp index f04c198..58e3745 100644 --- a/src/plugins/audio/symbian/symbianaudioutils.cpp +++ b/src/multimedia/audio/qaudio_symbian_p.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "symbianaudioutils.h" +#include "qaudio_symbian_p.h" #include <mmffourcc.h> QT_BEGIN_NAMESPACE diff --git a/src/plugins/audio/symbian/symbianaudioutils.h b/src/multimedia/audio/qaudio_symbian_p.h index 53274e0..d5238b4 100644 --- a/src/plugins/audio/symbian/symbianaudioutils.h +++ b/src/multimedia/audio/qaudio_symbian_p.h @@ -39,19 +39,50 @@ ** ****************************************************************************/ -#ifndef SYMBIANAUDIOUTILS_H -#define SYMBIANAUDIOUTILS_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#ifndef QAUDIO_SYMBIAN_P_H +#define QAUDIO_SYMBIAN_P_H #include <QtCore/qnamespace.h> #include <QtMultimedia/qaudioformat.h> #include <QtMultimedia/qaudio.h> #include <sounddevice.h> -#include "symbianaudio.h" QT_BEGIN_NAMESPACE namespace SymbianAudio { +/** + * Default values used by audio input and output classes, when underlying + * DevSound instance has not yet been created. + */ + +const int DefaultBufferSize = 4096; // bytes +const int DefaultNotifyInterval = 1000; // ms + +/** + * Enumeration used to track state of internal DevSound instances. + * Values are translated to the corresponding QAudio::State values by + * SymbianAudio::Utils::stateNativeToQt. + */ +enum State { + ClosedState + , InitializingState + , ActiveState + , IdleState + , SuspendedState +}; + /* * Helper class for querying DevSound codec / format support */ diff --git a/src/multimedia/audio/qaudiodevicefactory.cpp b/src/multimedia/audio/qaudiodevicefactory.cpp index 459b7f5..4f45110 100644 --- a/src/multimedia/audio/qaudiodevicefactory.cpp +++ b/src/multimedia/audio/qaudiodevicefactory.cpp @@ -58,6 +58,10 @@ #include "qaudiodeviceinfo_alsa_p.h" #include "qaudiooutput_alsa_p.h" #include "qaudioinput_alsa_p.h" +#elif defined(Q_OS_SYMBIAN) +#include "qaudiodeviceinfo_symbian_p.h" +#include "qaudiooutput_symbian_p.h" +#include "qaudioinput_symbian_p.h" #endif #endif @@ -128,7 +132,7 @@ QList<QAudioDeviceInfo> QAudioDeviceFactory::availableDevices(QAudio::Mode mode) { QList<QAudioDeviceInfo> devices; #ifndef QT_NO_AUDIO_BACKEND -#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA)) +#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN)) foreach (const QByteArray &handle, QAudioDeviceInfoInternal::availableDevices(mode)) devices << QAudioDeviceInfo(QLatin1String("builtin"), handle, mode); #endif @@ -158,7 +162,7 @@ QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice() return QAudioDeviceInfo(QLatin1String("default"), list.at(0), QAudio::AudioInput); } #ifndef QT_NO_AUDIO_BACKEND -#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA)) +#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN)) return QAudioDeviceInfo(QLatin1String("builtin"), QAudioDeviceInfoInternal::defaultInputDevice(), QAudio::AudioInput); #endif #endif @@ -175,7 +179,7 @@ QAudioDeviceInfo QAudioDeviceFactory::defaultOutputDevice() return QAudioDeviceInfo(QLatin1String("default"), list.at(0), QAudio::AudioOutput); } #ifndef QT_NO_AUDIO_BACKEND -#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA)) +#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN)) return QAudioDeviceInfo(QLatin1String("builtin"), QAudioDeviceInfoInternal::defaultOutputDevice(), QAudio::AudioOutput); #endif #endif @@ -187,7 +191,7 @@ QAbstractAudioDeviceInfo* QAudioDeviceFactory::audioDeviceInfo(const QString &re QAbstractAudioDeviceInfo *rc = 0; #ifndef QT_NO_AUDIO_BACKEND -#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA)) +#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN)) if (realm == QLatin1String("builtin")) return new QAudioDeviceInfoInternal(handle, mode); #endif @@ -216,7 +220,7 @@ QAbstractAudioInput* QAudioDeviceFactory::createInputDevice(QAudioDeviceInfo con if (deviceInfo.isNull()) return new QNullInputDevice(); #ifndef QT_NO_AUDIO_BACKEND -#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA)) +#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN)) if (deviceInfo.realm() == QLatin1String("builtin")) return new QAudioInputPrivate(deviceInfo.handle(), format); #endif @@ -235,7 +239,7 @@ QAbstractAudioOutput* QAudioDeviceFactory::createOutputDevice(QAudioDeviceInfo c if (deviceInfo.isNull()) return new QNullOutputDevice(); #ifndef QT_NO_AUDIO_BACKEND -#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA)) +#if (defined(Q_OS_WIN) || defined(Q_OS_MAC) || defined(HAS_ALSA) || defined(Q_OS_SYMBIAN)) if (deviceInfo.realm() == QLatin1String("builtin")) return new QAudioOutputPrivate(deviceInfo.handle(), format); #endif diff --git a/src/plugins/audio/symbian/symbianaudiodeviceinfo.cpp b/src/multimedia/audio/qaudiodeviceinfo_symbian_p.cpp index 9701dad..36284d3 100644 --- a/src/plugins/audio/symbian/symbianaudiodeviceinfo.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_symbian_p.cpp @@ -39,26 +39,26 @@ ** ****************************************************************************/ -#include "symbianaudiodeviceinfo.h" -#include "symbianaudioutils.h" +#include "qaudiodeviceinfo_symbian_p.h" +#include "qaudio_symbian_p.h" QT_BEGIN_NAMESPACE -SymbianAudioDeviceInfo::SymbianAudioDeviceInfo(QByteArray device, +QAudioDeviceInfoInternal::QAudioDeviceInfoInternal(QByteArray device, QAudio::Mode mode) - : m_deviceName(device) + : m_deviceName(QLatin1String(device)) , m_mode(mode) , m_updated(false) { QT_TRAP_THROWING(m_devsound.reset(CMMFDevSound::NewL())); } -SymbianAudioDeviceInfo::~SymbianAudioDeviceInfo() +QAudioDeviceInfoInternal::~QAudioDeviceInfoInternal() { } -QAudioFormat SymbianAudioDeviceInfo::preferredFormat() const +QAudioFormat QAudioDeviceInfoInternal::preferredFormat() const { QAudioFormat format; switch (m_mode) { @@ -100,7 +100,7 @@ QAudioFormat SymbianAudioDeviceInfo::preferredFormat() const return format; } -bool SymbianAudioDeviceInfo::isFormatSupported( +bool QAudioDeviceInfoInternal::isFormatSupported( const QAudioFormat &format) const { getSupportedFormats(); @@ -115,7 +115,7 @@ bool SymbianAudioDeviceInfo::isFormatSupported( return supported; } -QAudioFormat SymbianAudioDeviceInfo::nearestFormat(const QAudioFormat &format) const +QAudioFormat QAudioDeviceInfoInternal::nearestFormat(const QAudioFormat &format) const { if (isFormatSupported(format)) return format; @@ -123,56 +123,65 @@ QAudioFormat SymbianAudioDeviceInfo::nearestFormat(const QAudioFormat &format) c return preferredFormat(); } -QString SymbianAudioDeviceInfo::deviceName() const +QString QAudioDeviceInfoInternal::deviceName() const { return m_deviceName; } -QStringList SymbianAudioDeviceInfo::codecList() +QStringList QAudioDeviceInfoInternal::codecList() { getSupportedFormats(); return m_codecs; } -QList<int> SymbianAudioDeviceInfo::frequencyList() +QList<int> QAudioDeviceInfoInternal::frequencyList() { getSupportedFormats(); return m_frequencies; } -QList<int> SymbianAudioDeviceInfo::channelsList() +QList<int> QAudioDeviceInfoInternal::channelsList() { getSupportedFormats(); return m_channels; } -QList<int> SymbianAudioDeviceInfo::sampleSizeList() +QList<int> QAudioDeviceInfoInternal::sampleSizeList() { getSupportedFormats(); return m_sampleSizes; } -QList<QAudioFormat::Endian> SymbianAudioDeviceInfo::byteOrderList() +QList<QAudioFormat::Endian> QAudioDeviceInfoInternal::byteOrderList() { getSupportedFormats(); return m_byteOrders; } -QList<QAudioFormat::SampleType> SymbianAudioDeviceInfo::sampleTypeList() +QList<QAudioFormat::SampleType> QAudioDeviceInfoInternal::sampleTypeList() { getSupportedFormats(); return m_sampleTypes; } -QList<QByteArray> SymbianAudioDeviceInfo::deviceList(QAudio::Mode mode) +QByteArray QAudioDeviceInfoInternal::defaultInputDevice() { - Q_UNUSED(mode) - QList<QByteArray> devices; - devices.append("default"); - return devices; + return QByteArray("default"); } -void SymbianAudioDeviceInfo::getSupportedFormats() const +QByteArray QAudioDeviceInfoInternal::defaultOutputDevice() +{ + return QByteArray("default"); +} + +QList<QByteArray> QAudioDeviceInfoInternal::availableDevices(QAudio::Mode) +{ + QList<QByteArray> result; + result += QByteArray("default"); + return result; +} + +void QAudioDeviceInfoInternal::getSupportedFormats() const { if (!m_updated) { QScopedPointer<SymbianAudio::DevSoundCapabilities> caps( diff --git a/src/plugins/audio/symbian/symbianaudiodeviceinfo.h b/src/multimedia/audio/qaudiodeviceinfo_symbian_p.h index 250804d..89e539f 100644 --- a/src/plugins/audio/symbian/symbianaudiodeviceinfo.h +++ b/src/multimedia/audio/qaudiodeviceinfo_symbian_p.h @@ -39,22 +39,33 @@ ** ****************************************************************************/ -#ifndef SYMBIANAUDIODEVICEINFO_H -#define SYMBIANAUDIODEVICEINFO_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#ifndef QAUDIODEVICEINFO_SYMBIAN_P_H +#define QAUDIODEVICEINFO_SYMBIAN_P_H #include <QtMultimedia/qaudioengine.h> #include <sounddevice.h> QT_BEGIN_NAMESPACE -class SymbianAudioDeviceInfo +class QAudioDeviceInfoInternal : public QAbstractAudioDeviceInfo { Q_OBJECT public: - SymbianAudioDeviceInfo(QByteArray device, QAudio::Mode mode); - ~SymbianAudioDeviceInfo(); + QAudioDeviceInfoInternal(QByteArray device, QAudio::Mode mode); + ~QAudioDeviceInfoInternal(); // QAbstractAudioDeviceInfo QAudioFormat preferredFormat() const; @@ -67,7 +78,9 @@ public: QList<int> sampleSizeList(); QList<QAudioFormat::Endian> byteOrderList(); QList<QAudioFormat::SampleType> sampleTypeList(); - QList<QByteArray> deviceList(QAudio::Mode); + static QByteArray defaultInputDevice(); + static QByteArray defaultOutputDevice(); + static QList<QByteArray> availableDevices(QAudio::Mode); private: void getSupportedFormats() const; diff --git a/src/plugins/audio/symbian/symbianaudioinput.cpp b/src/multimedia/audio/qaudioinput_symbian_p.cpp index 8200925..52daa88 100644 --- a/src/plugins/audio/symbian/symbianaudioinput.cpp +++ b/src/multimedia/audio/qaudioinput_symbian_p.cpp @@ -39,8 +39,7 @@ ** ****************************************************************************/ -#include "symbianaudioinput.h" -#include "symbianaudioutils.h" +#include "qaudioinput_symbian_p.h" QT_BEGIN_NAMESPACE @@ -56,7 +55,7 @@ const int PushInterval = 50; // ms //----------------------------------------------------------------------------- SymbianAudioInputPrivate::SymbianAudioInputPrivate( - SymbianAudioInput *audioDevice) + QAudioInputPrivate *audioDevice) : m_audioDevice(audioDevice) { @@ -104,7 +103,7 @@ void SymbianAudioInputPrivate::dataReady() // Public functions //----------------------------------------------------------------------------- -SymbianAudioInput::SymbianAudioInput(const QByteArray &device, +QAudioInputPrivate::QAudioInputPrivate(const QByteArray &device, const QAudioFormat &format) : m_device(device) , m_format(format) @@ -132,12 +131,12 @@ SymbianAudioInput::SymbianAudioInput(const QByteArray &device, connect(m_pullTimer.data(), SIGNAL(timeout()), this, SLOT(pullData())); } -SymbianAudioInput::~SymbianAudioInput() +QAudioInputPrivate::~QAudioInputPrivate() { close(); } -QIODevice* SymbianAudioInput::start(QIODevice *device) +QIODevice* QAudioInputPrivate::start(QIODevice *device) { stop(); @@ -157,19 +156,19 @@ QIODevice* SymbianAudioInput::start(QIODevice *device) return m_sink; } -void SymbianAudioInput::stop() +void QAudioInputPrivate::stop() { close(); } -void SymbianAudioInput::reset() +void QAudioInputPrivate::reset() { m_totalSamplesRecorded += getSamplesRecorded(); m_devSound->Stop(); startRecording(); } -void SymbianAudioInput::suspend() +void QAudioInputPrivate::suspend() { if (SymbianAudio::ActiveState == m_internalState || SymbianAudio::IdleState == m_internalState) { @@ -188,24 +187,24 @@ void SymbianAudioInput::suspend() } } -void SymbianAudioInput::resume() +void QAudioInputPrivate::resume() { if (SymbianAudio::SuspendedState == m_internalState) startDataTransfer(); } -int SymbianAudioInput::bytesReady() const +int QAudioInputPrivate::bytesReady() const { Q_ASSERT(m_devSoundBufferPos <= m_totalBytesReady); return m_totalBytesReady - m_devSoundBufferPos; } -int SymbianAudioInput::periodSize() const +int QAudioInputPrivate::periodSize() const { return bufferSize(); } -void SymbianAudioInput::setBufferSize(int value) +void QAudioInputPrivate::setBufferSize(int value) { // Note that DevSound does not allow its client to specify the buffer size. // This functionality is available via custom interfaces, but since these @@ -218,12 +217,12 @@ void SymbianAudioInput::setBufferSize(int value) m_clientBufferSize = value; } -int SymbianAudioInput::bufferSize() const +int QAudioInputPrivate::bufferSize() const { return m_devSoundBufferSize ? m_devSoundBufferSize : m_clientBufferSize; } -void SymbianAudioInput::setNotifyInterval(int ms) +void QAudioInputPrivate::setNotifyInterval(int ms) { if (ms > 0) { const int oldNotifyInterval = m_notifyInterval; @@ -233,12 +232,12 @@ void SymbianAudioInput::setNotifyInterval(int ms) } } -int SymbianAudioInput::notifyInterval() const +int QAudioInputPrivate::notifyInterval() const { return m_notifyInterval; } -qint64 SymbianAudioInput::processedUSecs() const +qint64 QAudioInputPrivate::processedUSecs() const { int samplesPlayed = 0; if (m_devSound && SymbianAudio::SuspendedState != m_internalState) @@ -254,24 +253,24 @@ qint64 SymbianAudioInput::processedUSecs() const return result; } -qint64 SymbianAudioInput::elapsedUSecs() const +qint64 QAudioInputPrivate::elapsedUSecs() const { const qint64 result = (QAudio::StoppedState == state()) ? 0 : m_elapsed.elapsed() * 1000; return result; } -QAudio::Error SymbianAudioInput::error() const +QAudio::Error QAudioInputPrivate::error() const { return m_error; } -QAudio::State SymbianAudioInput::state() const +QAudio::State QAudioInputPrivate::state() const { return m_externalState; } -QAudioFormat SymbianAudioInput::format() const +QAudioFormat QAudioInputPrivate::format() const { return m_format; } @@ -280,7 +279,7 @@ QAudioFormat SymbianAudioInput::format() const // MDevSoundObserver implementation //----------------------------------------------------------------------------- -void SymbianAudioInput::InitializeComplete(TInt aError) +void QAudioInputPrivate::InitializeComplete(TInt aError) { Q_ASSERT_X(SymbianAudio::InitializingState == m_internalState, Q_FUNC_INFO, "Invalid state"); @@ -289,7 +288,7 @@ void SymbianAudioInput::InitializeComplete(TInt aError) startRecording(); } -void SymbianAudioInput::ToneFinished(TInt aError) +void QAudioInputPrivate::ToneFinished(TInt aError) { Q_UNUSED(aError) // This class doesn't use DevSound's tone playback functions, so should @@ -297,7 +296,7 @@ void SymbianAudioInput::ToneFinished(TInt aError) Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback"); } -void SymbianAudioInput::BufferToBeFilled(CMMFBuffer *aBuffer) +void QAudioInputPrivate::BufferToBeFilled(CMMFBuffer *aBuffer) { Q_UNUSED(aBuffer) // This class doesn't use DevSound in play mode, so should never receive @@ -305,7 +304,7 @@ void SymbianAudioInput::BufferToBeFilled(CMMFBuffer *aBuffer) Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback"); } -void SymbianAudioInput::PlayError(TInt aError) +void QAudioInputPrivate::PlayError(TInt aError) { Q_UNUSED(aError) // This class doesn't use DevSound in play mode, so should never receive @@ -313,7 +312,7 @@ void SymbianAudioInput::PlayError(TInt aError) Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback"); } -void SymbianAudioInput::BufferToBeEmptied(CMMFBuffer *aBuffer) +void QAudioInputPrivate::BufferToBeEmptied(CMMFBuffer *aBuffer) { // Following receipt of this callback, DevSound should not provide another // buffer until we have returned the current one. @@ -338,13 +337,13 @@ void SymbianAudioInput::BufferToBeEmptied(CMMFBuffer *aBuffer) } } -void SymbianAudioInput::RecordError(TInt aError) +void QAudioInputPrivate::RecordError(TInt aError) { Q_UNUSED(aError) setError(QAudio::IOError); } -void SymbianAudioInput::ConvertError(TInt aError) +void QAudioInputPrivate::ConvertError(TInt aError) { Q_UNUSED(aError) // This class doesn't use DevSound's format conversion functions, so @@ -352,7 +351,7 @@ void SymbianAudioInput::ConvertError(TInt aError) Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback"); } -void SymbianAudioInput::DeviceMessage(TUid aMessageType, const TDesC8 &aMsg) +void QAudioInputPrivate::DeviceMessage(TUid aMessageType, const TDesC8 &aMsg) { Q_UNUSED(aMessageType) Q_UNUSED(aMsg) @@ -363,7 +362,7 @@ void SymbianAudioInput::DeviceMessage(TUid aMessageType, const TDesC8 &aMsg) // Private functions //----------------------------------------------------------------------------- -void SymbianAudioInput::open() +void QAudioInputPrivate::open() { Q_ASSERT_X(SymbianAudio::ClosedState == m_internalState, Q_FUNC_INFO, "DevSound already opened"); @@ -388,7 +387,7 @@ void SymbianAudioInput::open() } } -void SymbianAudioInput::startRecording() +void QAudioInputPrivate::startRecording() { const int samplesRecorded = m_devSound->SamplesRecorded(); Q_ASSERT(samplesRecorded == 0); @@ -402,7 +401,7 @@ void SymbianAudioInput::startRecording() } } -void SymbianAudioInput::startDevSoundL() +void QAudioInputPrivate::startDevSoundL() { TMMFCapabilities nativeFormat = m_devSound->Config(); m_nativeFormat.iBufferSize = nativeFormat.iBufferSize; @@ -410,7 +409,7 @@ void SymbianAudioInput::startDevSoundL() m_devSound->RecordInitL(); } -void SymbianAudioInput::startDataTransfer() +void QAudioInputPrivate::startDataTransfer() { m_notifyTimer->start(m_notifyInterval); @@ -429,7 +428,7 @@ void SymbianAudioInput::startDataTransfer() } } -CMMFDataBuffer* SymbianAudioInput::currentBuffer() const +CMMFDataBuffer* QAudioInputPrivate::currentBuffer() const { CMMFDataBuffer *result = m_devSoundBuffer; if (!result && !m_devSoundBufferQ.empty()) @@ -437,14 +436,14 @@ CMMFDataBuffer* SymbianAudioInput::currentBuffer() const return result; } -void SymbianAudioInput::pushData() +void QAudioInputPrivate::pushData() { Q_ASSERT_X(bytesReady(), Q_FUNC_INFO, "No data available"); Q_ASSERT_X(!m_pullMode, Q_FUNC_INFO, "pushData called when in pull mode"); qobject_cast<SymbianAudioInputPrivate *>(m_sink)->dataReady(); } -qint64 SymbianAudioInput::read(char *data, qint64 len) +qint64 QAudioInputPrivate::read(char *data, qint64 len) { // SymbianAudioInputPrivate is ready to read data @@ -478,7 +477,7 @@ qint64 SymbianAudioInput::read(char *data, qint64 len) return bytesRead; } -void SymbianAudioInput::pullData() +void QAudioInputPrivate::pullData() { Q_ASSERT_X(m_pullMode, Q_FUNC_INFO, "pullData called when in push mode"); @@ -504,7 +503,7 @@ void SymbianAudioInput::pullData() } } -void SymbianAudioInput::bufferEmptied() +void QAudioInputPrivate::bufferEmptied() { m_devSoundBufferPos = 0; @@ -525,7 +524,7 @@ void SymbianAudioInput::bufferEmptied() Q_ASSERT(m_totalBytesReady >= 0); } -void SymbianAudioInput::close() +void QAudioInputPrivate::close() { m_notifyTimer->stop(); m_pullTimer->stop(); @@ -551,7 +550,7 @@ void SymbianAudioInput::close() setState(SymbianAudio::ClosedState); } -qint64 SymbianAudioInput::getSamplesRecorded() const +qint64 QAudioInputPrivate::getSamplesRecorded() const { qint64 result = 0; if (m_devSound) @@ -559,7 +558,7 @@ qint64 SymbianAudioInput::getSamplesRecorded() const return result; } -void SymbianAudioInput::setError(QAudio::Error error) +void QAudioInputPrivate::setError(QAudio::Error error) { m_error = error; @@ -576,7 +575,7 @@ void SymbianAudioInput::setError(QAudio::Error error) QMetaObject::invokeMethod(this, "close", Qt::QueuedConnection); } -void SymbianAudioInput::setState(SymbianAudio::State newInternalState) +void QAudioInputPrivate::setState(SymbianAudio::State newInternalState) { const QAudio::State oldExternalState = m_externalState; m_internalState = newInternalState; @@ -587,7 +586,7 @@ void SymbianAudioInput::setState(SymbianAudio::State newInternalState) emit stateChanged(m_externalState); } -QAudio::State SymbianAudioInput::initializingState() const +QAudio::State QAudioInputPrivate::initializingState() const { return QAudio::IdleState; } diff --git a/src/plugins/audio/symbian/symbianaudioinput.h b/src/multimedia/audio/qaudioinput_symbian_p.h index 34b7d38..ca3ccf7 100644 --- a/src/plugins/audio/symbian/symbianaudioinput.h +++ b/src/multimedia/audio/qaudioinput_symbian_p.h @@ -39,25 +39,36 @@ ** ****************************************************************************/ -#ifndef SYMBIANAUDIOINPUT_H -#define SYMBIANAUDIOINPUT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#ifndef QAUDIOINPUT_SYMBIAN_P_H +#define QAUDIOINPUT_SYMBIAN_P_H #include <QtMultimedia/qaudioengine.h> #include <QTime> #include <QTimer> #include <sounddevice.h> -#include "symbianaudio.h" +#include "qaudio_symbian_p.h" QT_BEGIN_NAMESPACE -class SymbianAudioInput; +class QAudioInputPrivate; class SymbianAudioInputPrivate : public QIODevice { - friend class SymbianAudioInput; + friend class QAudioInputPrivate; Q_OBJECT public: - SymbianAudioInputPrivate(SymbianAudioInput *audio); + SymbianAudioInputPrivate(QAudioInputPrivate *audio); ~SymbianAudioInputPrivate(); qint64 readData(char *data, qint64 len); @@ -66,19 +77,19 @@ public: void dataReady(); private: - SymbianAudioInput *const m_audioDevice; + QAudioInputPrivate *const m_audioDevice; }; -class SymbianAudioInput +class QAudioInputPrivate : public QAbstractAudioInput , public MDevSoundObserver { friend class SymbianAudioInputPrivate; Q_OBJECT public: - SymbianAudioInput(const QByteArray &device, + QAudioInputPrivate(const QByteArray &device, const QAudioFormat &audioFormat); - ~SymbianAudioInput(); + ~QAudioInputPrivate(); // QAbstractAudioInput QIODevice* start(QIODevice *device = 0); diff --git a/src/plugins/audio/symbian/symbianaudiooutput.cpp b/src/multimedia/audio/qaudiooutput_symbian_p.cpp index 385e169..945a08d 100644 --- a/src/plugins/audio/symbian/symbianaudiooutput.cpp +++ b/src/multimedia/audio/qaudiooutput_symbian_p.cpp @@ -39,8 +39,7 @@ ** ****************************************************************************/ -#include "symbianaudiooutput.h" -#include "symbianaudioutils.h" +#include "qaudiooutput_symbian_p.h" QT_BEGIN_NAMESPACE @@ -56,7 +55,7 @@ const int UnderflowTimerInterval = 50; // ms //----------------------------------------------------------------------------- SymbianAudioOutputPrivate::SymbianAudioOutputPrivate( - SymbianAudioOutput *audioDevice) + QAudioOutputPrivate *audioDevice) : m_audioDevice(audioDevice) { @@ -99,7 +98,7 @@ qint64 SymbianAudioOutputPrivate::writeData(const char *data, qint64 len) // Public functions //----------------------------------------------------------------------------- -SymbianAudioOutput::SymbianAudioOutput(const QByteArray &device, +QAudioOutputPrivate::QAudioOutputPrivate(const QByteArray &device, const QAudioFormat &format) : m_device(device) , m_format(format) @@ -132,12 +131,12 @@ SymbianAudioOutput::SymbianAudioOutput(const QByteArray &device, SLOT(underflowTimerExpired())); } -SymbianAudioOutput::~SymbianAudioOutput() +QAudioOutputPrivate::~QAudioOutputPrivate() { close(); } -QIODevice* SymbianAudioOutput::start(QIODevice *device) +QIODevice* QAudioOutputPrivate::start(QIODevice *device) { stop(); @@ -164,12 +163,12 @@ QIODevice* SymbianAudioOutput::start(QIODevice *device) return m_source; } -void SymbianAudioOutput::stop() +void QAudioOutputPrivate::stop() { close(); } -void SymbianAudioOutput::reset() +void QAudioOutputPrivate::reset() { m_totalSamplesPlayed += getSamplesPlayed(); m_devSound->Stop(); @@ -177,7 +176,7 @@ void SymbianAudioOutput::reset() startPlayback(); } -void SymbianAudioOutput::suspend() +void QAudioOutputPrivate::suspend() { if (SymbianAudio::ActiveState == m_internalState || SymbianAudio::IdleState == m_internalState) { @@ -208,13 +207,13 @@ void SymbianAudioOutput::suspend() } } -void SymbianAudioOutput::resume() +void QAudioOutputPrivate::resume() { if (SymbianAudio::SuspendedState == m_internalState) startPlayback(); } -int SymbianAudioOutput::bytesFree() const +int QAudioOutputPrivate::bytesFree() const { int result = 0; if (m_devSoundBuffer) { @@ -224,12 +223,12 @@ int SymbianAudioOutput::bytesFree() const return result; } -int SymbianAudioOutput::periodSize() const +int QAudioOutputPrivate::periodSize() const { return bufferSize(); } -void SymbianAudioOutput::setBufferSize(int value) +void QAudioOutputPrivate::setBufferSize(int value) { // Note that DevSound does not allow its client to specify the buffer size. // This functionality is available via custom interfaces, but since these @@ -242,12 +241,12 @@ void SymbianAudioOutput::setBufferSize(int value) m_clientBufferSize = value; } -int SymbianAudioOutput::bufferSize() const +int QAudioOutputPrivate::bufferSize() const { return m_devSoundBufferSize ? m_devSoundBufferSize : m_clientBufferSize; } -void SymbianAudioOutput::setNotifyInterval(int ms) +void QAudioOutputPrivate::setNotifyInterval(int ms) { if (ms > 0) { const int oldNotifyInterval = m_notifyInterval; @@ -257,12 +256,12 @@ void SymbianAudioOutput::setNotifyInterval(int ms) } } -int SymbianAudioOutput::notifyInterval() const +int QAudioOutputPrivate::notifyInterval() const { return m_notifyInterval; } -qint64 SymbianAudioOutput::processedUSecs() const +qint64 QAudioOutputPrivate::processedUSecs() const { int samplesPlayed = 0; if (m_devSound && SymbianAudio::SuspendedState != m_internalState) @@ -278,24 +277,24 @@ qint64 SymbianAudioOutput::processedUSecs() const return result; } -qint64 SymbianAudioOutput::elapsedUSecs() const +qint64 QAudioOutputPrivate::elapsedUSecs() const { const qint64 result = (QAudio::StoppedState == state()) ? 0 : m_elapsed.elapsed() * 1000; return result; } -QAudio::Error SymbianAudioOutput::error() const +QAudio::Error QAudioOutputPrivate::error() const { return m_error; } -QAudio::State SymbianAudioOutput::state() const +QAudio::State QAudioOutputPrivate::state() const { return m_externalState; } -QAudioFormat SymbianAudioOutput::format() const +QAudioFormat QAudioOutputPrivate::format() const { return m_format; } @@ -304,7 +303,7 @@ QAudioFormat SymbianAudioOutput::format() const // MDevSoundObserver implementation //----------------------------------------------------------------------------- -void SymbianAudioOutput::InitializeComplete(TInt aError) +void QAudioOutputPrivate::InitializeComplete(TInt aError) { Q_ASSERT_X(SymbianAudio::InitializingState == m_internalState, Q_FUNC_INFO, "Invalid state"); @@ -313,7 +312,7 @@ void SymbianAudioOutput::InitializeComplete(TInt aError) startPlayback(); } -void SymbianAudioOutput::ToneFinished(TInt aError) +void QAudioOutputPrivate::ToneFinished(TInt aError) { Q_UNUSED(aError) // This class doesn't use DevSound's tone playback functions, so should @@ -321,7 +320,7 @@ void SymbianAudioOutput::ToneFinished(TInt aError) Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback"); } -void SymbianAudioOutput::BufferToBeFilled(CMMFBuffer *aBuffer) +void QAudioOutputPrivate::BufferToBeFilled(CMMFBuffer *aBuffer) { // Following receipt of this callback, DevSound should not provide another // buffer until we have returned the current one. @@ -339,7 +338,7 @@ void SymbianAudioOutput::BufferToBeFilled(CMMFBuffer *aBuffer) pullData(); } -void SymbianAudioOutput::PlayError(TInt aError) +void QAudioOutputPrivate::PlayError(TInt aError) { switch (aError) { case KErrUnderflow: @@ -355,7 +354,7 @@ void SymbianAudioOutput::PlayError(TInt aError) } } -void SymbianAudioOutput::BufferToBeEmptied(CMMFBuffer *aBuffer) +void QAudioOutputPrivate::BufferToBeEmptied(CMMFBuffer *aBuffer) { Q_UNUSED(aBuffer) // This class doesn't use DevSound in record mode, so should never receive @@ -363,7 +362,7 @@ void SymbianAudioOutput::BufferToBeEmptied(CMMFBuffer *aBuffer) Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback"); } -void SymbianAudioOutput::RecordError(TInt aError) +void QAudioOutputPrivate::RecordError(TInt aError) { Q_UNUSED(aError) // This class doesn't use DevSound in record mode, so should never receive @@ -371,7 +370,7 @@ void SymbianAudioOutput::RecordError(TInt aError) Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback"); } -void SymbianAudioOutput::ConvertError(TInt aError) +void QAudioOutputPrivate::ConvertError(TInt aError) { Q_UNUSED(aError) // This class doesn't use DevSound's format conversion functions, so @@ -379,7 +378,7 @@ void SymbianAudioOutput::ConvertError(TInt aError) Q_ASSERT_X(false, Q_FUNC_INFO, "Unexpected callback"); } -void SymbianAudioOutput::DeviceMessage(TUid aMessageType, const TDesC8 &aMsg) +void QAudioOutputPrivate::DeviceMessage(TUid aMessageType, const TDesC8 &aMsg) { Q_UNUSED(aMessageType) Q_UNUSED(aMsg) @@ -390,7 +389,7 @@ void SymbianAudioOutput::DeviceMessage(TUid aMessageType, const TDesC8 &aMsg) // Private functions //----------------------------------------------------------------------------- -void SymbianAudioOutput::dataReady() +void QAudioOutputPrivate::dataReady() { // Client-provided QIODevice has data ready to read. @@ -401,7 +400,7 @@ void SymbianAudioOutput::dataReady() pullData(); } -void SymbianAudioOutput::underflowTimerExpired() +void QAudioOutputPrivate::underflowTimerExpired() { const TInt samplesPlayed = getSamplesPlayed(); if (m_samplesPlayed && (samplesPlayed == m_samplesPlayed)) { @@ -412,7 +411,7 @@ void SymbianAudioOutput::underflowTimerExpired() } } -void SymbianAudioOutput::open() +void QAudioOutputPrivate::open() { Q_ASSERT_X(SymbianAudio::ClosedState == m_internalState, Q_FUNC_INFO, "DevSound already opened"); @@ -438,7 +437,7 @@ void SymbianAudioOutput::open() } } -void SymbianAudioOutput::startPlayback() +void QAudioOutputPrivate::startPlayback() { TRAPD(err, startDevSoundL()); if (KErrNone == err) { @@ -462,7 +461,7 @@ void SymbianAudioOutput::startPlayback() } } -void SymbianAudioOutput::startDevSoundL() +void QAudioOutputPrivate::startDevSoundL() { TMMFCapabilities nativeFormat = m_devSound->Config(); m_nativeFormat.iBufferSize = nativeFormat.iBufferSize; @@ -470,7 +469,7 @@ void SymbianAudioOutput::startDevSoundL() m_devSound->PlayInitL(); } -void SymbianAudioOutput::writePaddingData() +void QAudioOutputPrivate::writePaddingData() { // See comments in suspend() @@ -494,7 +493,7 @@ void SymbianAudioOutput::writePaddingData() } } -qint64 SymbianAudioOutput::pushData(const char *data, qint64 len) +qint64 QAudioOutputPrivate::pushData(const char *data, qint64 len) { // Data has been written to SymbianAudioOutputPrivate @@ -538,7 +537,7 @@ qint64 SymbianAudioOutput::pushData(const char *data, qint64 len) return bytesWritten; } -void SymbianAudioOutput::pullData() +void QAudioOutputPrivate::pullData() { Q_ASSERT_X(m_pullMode, Q_FUNC_INFO, "pullData called when in push mode"); @@ -575,7 +574,7 @@ void SymbianAudioOutput::pullData() } } -void SymbianAudioOutput::bufferFilled() +void QAudioOutputPrivate::bufferFilled() { Q_ASSERT_X(m_devSoundBuffer, Q_FUNC_INFO, "No buffer to return"); @@ -593,7 +592,7 @@ void SymbianAudioOutput::bufferFilled() m_devSound->PlayData(); } -void SymbianAudioOutput::lastBufferFilled() +void QAudioOutputPrivate::lastBufferFilled() { Q_ASSERT_X(m_devSoundBuffer, Q_FUNC_INFO, "No buffer to fill"); Q_ASSERT_X(!m_lastBuffer, Q_FUNC_INFO, "Last buffer already sent"); @@ -602,7 +601,7 @@ void SymbianAudioOutput::lastBufferFilled() bufferFilled(); } -void SymbianAudioOutput::close() +void QAudioOutputPrivate::close() { m_notifyTimer->stop(); m_underflowTimer->stop(); @@ -631,7 +630,7 @@ void SymbianAudioOutput::close() setState(SymbianAudio::ClosedState); } -qint64 SymbianAudioOutput::getSamplesPlayed() const +qint64 QAudioOutputPrivate::getSamplesPlayed() const { qint64 result = 0; if (m_devSound) { @@ -651,7 +650,7 @@ qint64 SymbianAudioOutput::getSamplesPlayed() const return result; } -void SymbianAudioOutput::setError(QAudio::Error error) +void QAudioOutputPrivate::setError(QAudio::Error error) { m_error = error; @@ -671,7 +670,7 @@ void SymbianAudioOutput::setError(QAudio::Error error) QMetaObject::invokeMethod(this, "close", Qt::QueuedConnection); } -void SymbianAudioOutput::setState(SymbianAudio::State newInternalState) +void QAudioOutputPrivate::setState(SymbianAudio::State newInternalState) { const QAudio::State oldExternalState = m_externalState; m_internalState = newInternalState; @@ -682,14 +681,14 @@ void SymbianAudioOutput::setState(SymbianAudio::State newInternalState) emit stateChanged(m_externalState); } -bool SymbianAudioOutput::isDataReady() const +bool QAudioOutputPrivate::isDataReady() const { return (m_source && m_source->bytesAvailable()) || m_bytesPadding || m_pushDataReady; } -QAudio::State SymbianAudioOutput::initializingState() const +QAudio::State QAudioOutputPrivate::initializingState() const { return isDataReady() ? QAudio::ActiveState : QAudio::IdleState; } diff --git a/src/plugins/audio/symbian/symbianaudiooutput.h b/src/multimedia/audio/qaudiooutput_symbian_p.h index 8994e46..00ccb24 100644 --- a/src/plugins/audio/symbian/symbianaudiooutput.h +++ b/src/multimedia/audio/qaudiooutput_symbian_p.h @@ -39,44 +39,55 @@ ** ****************************************************************************/ -#ifndef SYMBIANAUDIOOUTPUT_H -#define SYMBIANAUDIOOUTPUT_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#ifndef QAUDIOOUTPUT_SYMBIAN_P_H +#define QAUDIOOUTPUT_SYMBIAN_P_H #include <QtMultimedia/qaudioengine.h> #include <QTime> #include <QTimer> #include <sounddevice.h> -#include "symbianaudio.h" +#include "qaudio_symbian_p.h" QT_BEGIN_NAMESPACE -class SymbianAudioOutput; +class QAudioOutputPrivate; class SymbianAudioOutputPrivate : public QIODevice { - friend class SymbianAudioOutput; + friend class QAudioOutputPrivate; Q_OBJECT public: - SymbianAudioOutputPrivate(SymbianAudioOutput *audio); + SymbianAudioOutputPrivate(QAudioOutputPrivate *audio); ~SymbianAudioOutputPrivate(); qint64 readData(char *data, qint64 len); qint64 writeData(const char *data, qint64 len); private: - SymbianAudioOutput *const m_audioDevice; + QAudioOutputPrivate *const m_audioDevice; }; -class SymbianAudioOutput +class QAudioOutputPrivate : public QAbstractAudioOutput , public MDevSoundObserver { friend class SymbianAudioOutputPrivate; Q_OBJECT public: - SymbianAudioOutput(const QByteArray &device, + QAudioOutputPrivate(const QByteArray &device, const QAudioFormat &audioFormat); - ~SymbianAudioOutput(); + ~QAudioOutputPrivate(); // QAbstractAudioOutput QIODevice* start(QIODevice *device = 0); diff --git a/src/network/ssl/qsslkey.cpp b/src/network/ssl/qsslkey.cpp index 41b2384..da39662 100644 --- a/src/network/ssl/qsslkey.cpp +++ b/src/network/ssl/qsslkey.cpp @@ -119,9 +119,7 @@ void QSslKeyPrivate::decodePem(const QByteArray &pem, const QByteArray &passPhra if (!bio) return; - void *phrase = passPhrase.isEmpty() - ? (void *)0 - : (void *)passPhrase.constData(); + void *phrase = (void *)passPhrase.constData(); if (algorithm == QSsl::Rsa) { RSA *result = (type == QSsl::PublicKey) diff --git a/src/plugins/audio/audio.pro b/src/plugins/audio/audio.pro index 5f75a8d..b7a775b 100644 --- a/src/plugins/audio/audio.pro +++ b/src/plugins/audio/audio.pro @@ -1,9 +1,3 @@ TEMPLATE = subdirs SUBDIRS = -contains(QT_CONFIG, audio-backend) { - symbian { - SUBDIRS += symbian - } -} - diff --git a/src/plugins/audio/symbian/main.cpp b/src/plugins/audio/symbian/main.cpp deleted file mode 100644 index 536a8ec..0000000 --- a/src/plugins/audio/symbian/main.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QtMultimedia/qaudioengineplugin.h> -#include <QtMultimedia/qaudioengine.h> - -#include <qstringlist.h> -#include <qiodevice.h> -#include <qbytearray.h> -#include <qdebug.h> - -#include "symbianaudiodeviceinfo.h" -#include "symbianaudioinput.h" -#include "symbianaudiooutput.h" - -QT_BEGIN_NAMESPACE - -class SymbianAudioPlugin : public QAudioEnginePlugin -{ -public: - SymbianAudioPlugin(QObject *parent = 0); - ~SymbianAudioPlugin(); - - QStringList keys() const; - - QList<QByteArray> availableDevices(QAudio::Mode) const; - QAbstractAudioInput* createInput(const QByteArray& device, - const QAudioFormat& format = QAudioFormat()); - QAbstractAudioOutput* createOutput(const QByteArray& device, - const QAudioFormat& format = QAudioFormat()); - QAbstractAudioDeviceInfo* createDeviceInfo(const QByteArray& device, - QAudio::Mode mode); -}; - -SymbianAudioPlugin::SymbianAudioPlugin(QObject *parent) - : QAudioEnginePlugin(parent) -{ - -} - -SymbianAudioPlugin::~SymbianAudioPlugin() -{ - -} - -QStringList SymbianAudioPlugin::keys() const -{ - QStringList keys(QLatin1String("default")); - keys << QLatin1String("default"); - return keys; -} - -QList<QByteArray> SymbianAudioPlugin::availableDevices(QAudio::Mode mode) const -{ - Q_UNUSED(mode) - QList<QByteArray> devices; - devices.append("default"); - return devices; -} - -QAbstractAudioInput* SymbianAudioPlugin::createInput( - const QByteArray &device, const QAudioFormat &format) -{ - return new SymbianAudioInput(device, format); -} - -QAbstractAudioOutput* SymbianAudioPlugin::createOutput( - const QByteArray &device, const QAudioFormat &format) -{ - return new SymbianAudioOutput(device, format); -} - -QAbstractAudioDeviceInfo* SymbianAudioPlugin::createDeviceInfo( - const QByteArray& device, QAudio::Mode mode) -{ - return new SymbianAudioDeviceInfo(device, mode); -} - -Q_EXPORT_STATIC_PLUGIN(SymbianAudioPlugin) -Q_EXPORT_PLUGIN2(qaudio, SymbianAudioPlugin) - -QT_END_NAMESPACE - diff --git a/src/plugins/audio/symbian/symbian.pro b/src/plugins/audio/symbian/symbian.pro deleted file mode 100644 index 7355daa..0000000 --- a/src/plugins/audio/symbian/symbian.pro +++ /dev/null @@ -1,31 +0,0 @@ -QT += multimedia -TARGET = qaudio - -# Paths to DevSound headers -INCLUDEPATH += /epoc32/include/mmf/common -INCLUDEPATH += /epoc32/include/mmf/server - -HEADERS += \ - symbianaudio.h \ - symbianaudiodeviceinfo.h \ - symbianaudioinput.h \ - symbianaudiooutput.h \ - symbianaudioutils.h - -SOURCES += \ - main.cpp \ - symbianaudiodeviceinfo.cpp \ - symbianaudioinput.cpp \ - symbianaudiooutput.cpp \ - symbianaudioutils.cpp - -LIBS += -lmmfdevsound - -QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/audio -target.path = $$[QT_INSTALL_PLUGINS]/audio -INSTALLS += target - -include(../../qpluginbase.pri) - -TARGET.UID3 = 0x2001E630 - diff --git a/src/plugins/audio/symbian/symbianaudio.h b/src/plugins/audio/symbian/symbianaudio.h deleted file mode 100644 index 3fc0419..0000000 --- a/src/plugins/audio/symbian/symbianaudio.h +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtMultimedia module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef SYMBIANAUDIO_H -#define SYMBIANAUDIO_H - -#include <QtCore/qnamespace.h> - -QT_BEGIN_NAMESPACE - -namespace SymbianAudio { - -/** - * Default values used by audio input and output classes, when underlying - * DevSound instance has not yet been created. - */ - -const int DefaultBufferSize = 4096; // bytes -const int DefaultNotifyInterval = 1000; // ms - -/** - * Enumeration used to track state of internal DevSound instances. - * Values are translated to the corresponding QAudio::State values by - * SymbianAudio::Utils::stateNativeToQt. - */ -enum State { - ClosedState - , InitializingState - , ActiveState - , IdleState - , SuspendedState -}; - -} // namespace SymbianAudio - -QT_END_NAMESPACE - -#endif diff --git a/src/plugins/s60/3_2/3_2.pro b/src/plugins/s60/3_2/3_2.pro index 4b28eb9..468197d 100644 --- a/src/plugins/s60/3_2/3_2.pro +++ b/src/plugins/s60/3_2/3_2.pro @@ -10,7 +10,7 @@ contains(S60_VERSION, 3.1) { SOURCES += ../src/qlocale_3_2.cpp \ ../src/qdesktopservices_3_2.cpp \ ../src/qcoreapplication_3_2.cpp - LIBS += -ldirectorylocalizer -lefsrv + LIBS += -lDirectoryLocalizer -lefsrv INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE } diff --git a/src/plugins/s60/5_0/5_0.pro b/src/plugins/s60/5_0/5_0.pro index 4cdce12..86e3dc9 100644 --- a/src/plugins/s60/5_0/5_0.pro +++ b/src/plugins/s60/5_0/5_0.pro @@ -10,7 +10,7 @@ contains(S60_VERSION, 3.1) { SOURCES += ../src/qlocale_3_2.cpp \ ../src/qdesktopservices_3_2.cpp \ ../src/qcoreapplication_3_2.cpp - LIBS += -ldirectorylocalizer -lefsrv + LIBS += -lDirectoryLocalizer -lefsrv INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE } diff --git a/src/plugins/s60/src/qdesktopservices_3_2.cpp b/src/plugins/s60/src/qdesktopservices_3_2.cpp index a2f30f2..b4ca9a3 100644 --- a/src/plugins/s60/src/qdesktopservices_3_2.cpp +++ b/src/plugins/s60/src/qdesktopservices_3_2.cpp @@ -45,7 +45,7 @@ #ifdef Q_WS_S60 #include <e32base.h> // CBase -> Required by cdirectorylocalizer.h -#include <cdirectorylocalizer.h> // CDirectoryLocalizer +#include <CDirectoryLocalizer.h> // CDirectoryLocalizer EXPORT_C QString localizedDirectoryName(QString& rawPath) { diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def index e7e890c..df10406 100644 --- a/src/s60installs/bwins/QtCoreu.def +++ b/src/s60installs/bwins/QtCoreu.def @@ -4399,4 +4399,22 @@ EXPORTS ?sender@SignalEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4398 NONAME ; class QObject * QStateMachine::SignalEvent::sender(void) const ?signalIndex@SignalEvent@QStateMachine@@QBEHXZ @ 4399 NONAME ; int QStateMachine::SignalEvent::signalIndex(void) const ?disconnectOne@QMetaObject@@SA_NPBVQObject@@H0H@Z @ 4400 NONAME ; bool QMetaObject::disconnectOne(class QObject const *, int, class QObject const *, int) + ?QBasicAtomicInt_fetchAndAddRelease@@YAHPCHH@Z @ 4401 NONAME ; int QBasicAtomicInt_fetchAndAddRelease(int volatile *, int) + ?QBasicAtomicPointer_testAndSetRelaxed@@YA_NPCRAXPAX1@Z @ 4402 NONAME ; bool QBasicAtomicPointer_testAndSetRelaxed(void * volatile *, void *, void *) + ?QBasicAtomicInt_fetchAndAddRelaxed@@YAHPCHH@Z @ 4403 NONAME ; int QBasicAtomicInt_fetchAndAddRelaxed(int volatile *, int) + ?QBasicAtomicPointer_testAndSetRelease@@YA_NPCRAXPAX1@Z @ 4404 NONAME ; bool QBasicAtomicPointer_testAndSetRelease(void * volatile *, void *, void *) + ?QBasicAtomicInt_fetchAndStoreRelease@@YAHPCHH@Z @ 4405 NONAME ; int QBasicAtomicInt_fetchAndStoreRelease(int volatile *, int) + ?QBasicAtomicPointer_fetchAndAddAcquire@@YAPAXPCRAXH@Z @ 4406 NONAME ; void * QBasicAtomicPointer_fetchAndAddAcquire(void * volatile *, int) + ?QBasicAtomicPointer_fetchAndAddRelease@@YAPAXPCRAXH@Z @ 4407 NONAME ; void * QBasicAtomicPointer_fetchAndAddRelease(void * volatile *, int) + ?QBasicAtomicPointer_testAndSetAcquire@@YA_NPCRAXPAX1@Z @ 4408 NONAME ; bool QBasicAtomicPointer_testAndSetAcquire(void * volatile *, void *, void *) + ?QBasicAtomicPointer_fetchAndStoreAcquire@@YAPAXPCRAXPAX@Z @ 4409 NONAME ; void * QBasicAtomicPointer_fetchAndStoreAcquire(void * volatile *, void *) + ?QBasicAtomicPointer_fetchAndAddRelaxed@@YAPAXPCRAXH@Z @ 4410 NONAME ; void * QBasicAtomicPointer_fetchAndAddRelaxed(void * volatile *, int) + ?QBasicAtomicInt_testAndSetAcquire@@YA_NPCHHH@Z @ 4411 NONAME ; bool QBasicAtomicInt_testAndSetAcquire(int volatile *, int, int) + ?QBasicAtomicPointer_fetchAndStoreRelaxed@@YAPAXPCRAXPAX@Z @ 4412 NONAME ; void * QBasicAtomicPointer_fetchAndStoreRelaxed(void * volatile *, void *) + ?QBasicAtomicInt_fetchAndStoreRelaxed@@YAHPCHH@Z @ 4413 NONAME ; int QBasicAtomicInt_fetchAndStoreRelaxed(int volatile *, int) + ?QBasicAtomicInt_testAndSetRelaxed@@YA_NPCHHH@Z @ 4414 NONAME ; bool QBasicAtomicInt_testAndSetRelaxed(int volatile *, int, int) + ?QBasicAtomicPointer_fetchAndStoreRelease@@YAPAXPCRAXPAX@Z @ 4415 NONAME ; void * QBasicAtomicPointer_fetchAndStoreRelease(void * volatile *, void *) + ?QBasicAtomicInt_testAndSetRelease@@YA_NPCHHH@Z @ 4416 NONAME ; bool QBasicAtomicInt_testAndSetRelease(int volatile *, int, int) + ?QBasicAtomicInt_fetchAndStoreAcquire@@YAHPCHH@Z @ 4417 NONAME ; int QBasicAtomicInt_fetchAndStoreAcquire(int volatile *, int) + ?QBasicAtomicInt_fetchAndAddAcquire@@YAHPCHH@Z @ 4418 NONAME ; int QBasicAtomicInt_fetchAndAddAcquire(int volatile *, int) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 4f30cb5..8e758d0 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -8995,7 +8995,7 @@ EXPORTS ?setFocus@QTextControl@@QAEX_NW4FocusReason@Qt@@@Z @ 8994 NONAME ; void QTextControl::setFocus(bool, enum Qt::FocusReason) ?setFocus@QWidget@@QAEXW4FocusReason@Qt@@@Z @ 8995 NONAME ; void QWidget::setFocus(enum Qt::FocusReason) ?setFocus@QWidget@@QAEXXZ @ 8996 NONAME ; void QWidget::setFocus(void) - ?setFocusHelper@QGraphicsItemPrivate@@QAEXW4FocusReason@Qt@@_N@Z @ 8997 NONAME ; void QGraphicsItemPrivate::setFocusHelper(enum Qt::FocusReason, bool) + ?setFocusHelper@QGraphicsItemPrivate@@QAEXW4FocusReason@Qt@@_N@Z @ 8997 NONAME ABSENT ; void QGraphicsItemPrivate::setFocusHelper(enum Qt::FocusReason, bool) ?setFocusItem@QGraphicsScene@@QAEXPAVQGraphicsItem@@W4FocusReason@Qt@@@Z @ 8998 NONAME ; void QGraphicsScene::setFocusItem(class QGraphicsItem *, enum Qt::FocusReason) ?setFocusPolicy@QGraphicsWidget@@QAEXW4FocusPolicy@Qt@@@Z @ 8999 NONAME ; void QGraphicsWidget::setFocusPolicy(enum Qt::FocusPolicy) ?setFocusPolicy@QWidget@@QAEXW4FocusPolicy@Qt@@@Z @ 9000 NONAME ; void QWidget::setFocusPolicy(enum Qt::FocusPolicy) diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index a427ff9..c648d87 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -3634,4 +3634,22 @@ EXPORTS _ZTVN13QStateMachine11SignalEventE @ 3633 NONAME _ZTVN13QStateMachine12WrappedEventE @ 3634 NONAME _ZN11QMetaObject13disconnectOneEPK7QObjectiS2_i @ 3635 NONAME + _Z33QBasicAtomicInt_testAndSetAcquirePViii @ 3636 NONAME + _Z33QBasicAtomicInt_testAndSetRelaxedPViii @ 3637 NONAME + _Z33QBasicAtomicInt_testAndSetReleasePViii @ 3638 NONAME + _Z34QBasicAtomicInt_fetchAndAddAcquirePVii @ 3639 NONAME + _Z34QBasicAtomicInt_fetchAndAddRelaxedPVii @ 3640 NONAME + _Z34QBasicAtomicInt_fetchAndAddReleasePVii @ 3641 NONAME + _Z36QBasicAtomicInt_fetchAndStoreAcquirePVii @ 3642 NONAME + _Z36QBasicAtomicInt_fetchAndStoreRelaxedPVii @ 3643 NONAME + _Z36QBasicAtomicInt_fetchAndStoreReleasePVii @ 3644 NONAME + _Z37QBasicAtomicPointer_testAndSetAcquirePVPvS_S_ @ 3645 NONAME + _Z37QBasicAtomicPointer_testAndSetRelaxedPVPvS_S_ @ 3646 NONAME + _Z37QBasicAtomicPointer_testAndSetReleasePVPvS_S_ @ 3647 NONAME + _Z38QBasicAtomicPointer_fetchAndAddAcquirePVPvi @ 3648 NONAME + _Z38QBasicAtomicPointer_fetchAndAddRelaxedPVPvi @ 3649 NONAME + _Z38QBasicAtomicPointer_fetchAndAddReleasePVPvi @ 3650 NONAME + _Z40QBasicAtomicPointer_fetchAndStoreAcquirePVPvS_ @ 3651 NONAME + _Z40QBasicAtomicPointer_fetchAndStoreRelaxedPVPvS_ @ 3652 NONAME + _Z40QBasicAtomicPointer_fetchAndStoreReleasePVPvS_ @ 3653 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 5cf700b..373f66d 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -4663,7 +4663,7 @@ EXPORTS _ZN20QGraphicsItemPrivate12resolveDepthEv @ 4662 NONAME _ZN20QGraphicsItemPrivate12setPosHelperERK7QPointF @ 4663 NONAME _ZN20QGraphicsItemPrivate13clearSubFocusEP13QGraphicsItem @ 4664 NONAME - _ZN20QGraphicsItemPrivate14setFocusHelperEN2Qt11FocusReasonEb @ 4665 NONAME + _ZN20QGraphicsItemPrivate14setFocusHelperEN2Qt11FocusReasonEb @ 4665 NONAME ABSENT _ZN20QGraphicsItemPrivate15resetFocusProxyEv @ 4666 NONAME _ZN20QGraphicsItemPrivate16setEnabledHelperEbbb @ 4667 NONAME _ZN20QGraphicsItemPrivate16setVisibleHelperEbbb @ 4668 NONAME diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby index 724451b..ec019e2 100644 --- a/src/s60installs/qt.iby +++ b/src/s60installs/qt.iby @@ -3,92 +3,57 @@ #include <bldvariant.hrh> -// Dependancies for more than one module -#include <base.iby> -#include <openenv.iby> // QtCore, QtGui, QtNetwork, QtOpenGL, QSvgIconEngine, -#include <cone.iby> // QtGui, QtOpenGL -#include <stdcpp.iby> // for std C++ support - -// QtGui dependancies -#include <bafl.iby> -#include <store.iby> -#include <fntstore.iby> -#include <ecom.iby> -#include <fontutils.iby> -#include <fepbase.iby> -#include <fbserv.iby> -#include <bitgdi.iby> -#include <gdi.iby> -#include <wserv.iby> -#include <apparc.iby> -#include <uikon.iby> -#include <etext.iby> -#include <emime.iby> -#include <eikstd.iby> -#include <mmf.iby> -#include <avkon.iby> -#include <commonui.iby> -#include <platformenv.iby> -#include <senduiservices.iby> -#include <aknicon.iby> -#include <aknskins.iby> - -// QtNetwork dependancies -#include <esock_core.iby> -#include <insock.iby> - -// QtOpenGL dependancies -///@todo Problem here as we need libegl.dll and libglesv2.dll but they may come from a variety of places -/// depending on the platform we're on - #warning("qt.iby: hack - BINARY_SELECTION_ORDER really needs to be at the baseport/device level as it depends on the device type"); BINARY_SELECTION_ORDER ARMV6,ARMV5 // hack - this really needs to be at the baseport/device level as it depends on the device type -file=ABI_DIR\BUILD_DIR\QtCore.dll SHARED_LIB_DIR\QtCore.dll PAGED -file=ABI_DIR\BUILD_DIR\QtGui.dll SHARED_LIB_DIR\QtGui.dll PAGED -file=ABI_DIR\BUILD_DIR\QtOpenGL.dll SHARED_LIB_DIR\QtOpenGL.dll PAGED -file=ABI_DIR\BUILD_DIR\QtOpenVG.dll SHARED_LIB_DIR\QtOpenVG.dll PAGED -file=ABI_DIR\BUILD_DIR\QtSvg.dll SHARED_LIB_DIR\QtSvg.dll PAGED -file=ABI_DIR\BUILD_DIR\QtSql.dll SHARED_LIB_DIR\QtSql.dll PAGED -file=ABI_DIR\BUILD_DIR\QtXml.dll SHARED_LIB_DIR\QtXml.dll PAGED -file=ABI_DIR\BUILD_DIR\QtNetwork.dll SHARED_LIB_DIR\QtNetwork.dll PAGED -file=ABI_DIR\BUILD_DIR\QtScript.dll SHARED_LIB_DIR\QtScript.dll PAGED -file=ABI_DIR\BUILD_DIR\QtTest.dll SHARED_LIB_DIR\QtTest.dll PAGED -file=ABI_DIR\BUILD_DIR\QtWebKit.dll SHARED_LIB_DIR\QtWebKit.dll PAGED -file=ABI_DIR\BUILD_DIR\phonon.dll SHARED_LIB_DIR\phonon.dll PAGED -file=ABI_DIR\BUILD_DIR\QtMultimedia.dll SHARED_LIB_DIR\QtMultimedia.dll PAGED -file=ABI_DIR\BUILD_DIR\QtXmlPatterns.dll SHARED_LIB_DIR\QtXmlPatterns.dll PAGED -file=ABI_DIR\BUILD_DIR\QtDeclarative.dll SHARED_LIB_DIR\QtDeclarative.dll PAGED +file=ABI_DIR\BUILD_DIR\QtCore.dll SHARED_LIB_DIR\QtCore.dll +file=ABI_DIR\BUILD_DIR\QtGui.dll SHARED_LIB_DIR\QtGui.dll +file=ABI_DIR\BUILD_DIR\QtOpenVG.dll SHARED_LIB_DIR\QtOpenVG.dll +file=ABI_DIR\BUILD_DIR\QtSvg.dll SHARED_LIB_DIR\QtSvg.dll +file=ABI_DIR\BUILD_DIR\QtSql.dll SHARED_LIB_DIR\QtSql.dll +file=ABI_DIR\BUILD_DIR\QtXml.dll SHARED_LIB_DIR\QtXml.dll +file=ABI_DIR\BUILD_DIR\QtNetwork.dll SHARED_LIB_DIR\QtNetwork.dll +file=ABI_DIR\BUILD_DIR\QtScript.dll SHARED_LIB_DIR\QtScript.dll +file=ABI_DIR\BUILD_DIR\QtTest.dll SHARED_LIB_DIR\QtTest.dll +file=ABI_DIR\BUILD_DIR\QtWebKit.dll SHARED_LIB_DIR\QtWebKit.dll +file=ABI_DIR\BUILD_DIR\phonon.dll SHARED_LIB_DIR\phonon.dll +file=ABI_DIR\BUILD_DIR\QtMultimedia.dll SHARED_LIB_DIR\QtMultimedia.dll +file=ABI_DIR\BUILD_DIR\QtXmlPatterns.dll SHARED_LIB_DIR\QtXmlPatterns.dll +file=ABI_DIR\BUILD_DIR\QtDeclarative.dll SHARED_LIB_DIR\QtDeclarative.dll // imageformats -file=ABI_DIR\BUILD_DIR\qgif.dll SHARED_LIB_DIR\qgif.dll PAGED -file=ABI_DIR\BUILD_DIR\qico.dll SHARED_LIB_DIR\qico.dll PAGED -file=ABI_DIR\BUILD_DIR\qjpeg.dll SHARED_LIB_DIR\qjpeg.dll PAGED -file=ABI_DIR\BUILD_DIR\qmng.dll SHARED_LIB_DIR\qmng.dll PAGED -file=ABI_DIR\BUILD_DIR\qsvg.dll SHARED_LIB_DIR\qsvg.dll PAGED -file=ABI_DIR\BUILD_DIR\qtiff.dll SHARED_LIB_DIR\qtiff.dll PAGED +file=ABI_DIR\BUILD_DIR\qgif.dll SHARED_LIB_DIR\qgif.dll +file=ABI_DIR\BUILD_DIR\qico.dll SHARED_LIB_DIR\qico.dll +file=ABI_DIR\BUILD_DIR\qjpeg.dll SHARED_LIB_DIR\qjpeg.dll +file=ABI_DIR\BUILD_DIR\qmng.dll SHARED_LIB_DIR\qmng.dll +file=ABI_DIR\BUILD_DIR\qsvg.dll SHARED_LIB_DIR\qsvg.dll +file=ABI_DIR\BUILD_DIR\qtiff.dll SHARED_LIB_DIR\qtiff.dll // codecs -file=ABI_DIR\BUILD_DIR\qcncodecs.dll SHARED_LIB_DIR\qcncodecs.dll PAGED -file=ABI_DIR\BUILD_DIR\qjpcodecs.dll SHARED_LIB_DIR\qjpcodecs.dll PAGED -file=ABI_DIR\BUILD_DIR\qkrcodecs.dll SHARED_LIB_DIR\qkrcodecs.dll PAGED -file=ABI_DIR\BUILD_DIR\qtwcodecs.dll SHARED_LIB_DIR\qtwcodecs.dll PAGED +file=ABI_DIR\BUILD_DIR\qcncodecs.dll SHARED_LIB_DIR\qcncodecs.dll +file=ABI_DIR\BUILD_DIR\qjpcodecs.dll SHARED_LIB_DIR\qjpcodecs.dll +file=ABI_DIR\BUILD_DIR\qkrcodecs.dll SHARED_LIB_DIR\qkrcodecs.dll +file=ABI_DIR\BUILD_DIR\qtwcodecs.dll SHARED_LIB_DIR\qtwcodecs.dll // iconengines -file=ABI_DIR\BUILD_DIR\qsvgicon.dll SHARED_LIB_DIR\qsvgicon.dll PAGED +file=ABI_DIR\BUILD_DIR\qsvgicon.dll SHARED_LIB_DIR\qsvgicon.dll // Phonon MMF backend -file=ABI_DIR\BUILD_DIR\phonon_mmf.dll SHARED_LIB_DIR\phonon_mmf.dll PAGED +// This is commented out by default, as normally Helix backend will be used. +// If the Helix backend is present, it will override MMF backend, so make sure to remove it from +// image creation in addition to uncommenting the following lines if you want to use MMF backend. +//file=ABI_DIR\BUILD_DIR\phonon_mmf.dll SHARED_LIB_DIR\phonon_mmf.dll +//data=\epoc32\data\z\resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin // QtMultimedia audio backend -file=ABI_DIR\BUILD_DIR\qaudio.dll SHARED_LIB_DIR\qaudio.dll PAGED +file=ABI_DIR\BUILD_DIR\qaudio.dll SHARED_LIB_DIR\qaudio.dll // graphicssystems -file=ABI_DIR\BUILD_DIR\qvggraphicssystem.dll SHARED_LIB_DIR\qvggraphicssystem.dll PAGED +file=ABI_DIR\BUILD_DIR\qvggraphicssystem.dll SHARED_LIB_DIR\qvggraphicssystem.dll // S60 version compatibility plugins for 5.0 (3.1 and 3.2 devices are never likely to have this in ROM, // so don't bother including those plugins -file=ABI_DIR\BUILD_DIR\qts60plugin_5_0.dll SHARED_LIB_DIR\qts60plugin_5_0.dll PAGED +file=ABI_DIR\BUILD_DIR\qts60plugin_5_0.dll SHARED_LIB_DIR\qts60plugin_5_0.dll S60_APP_RESOURCE(s60main) @@ -109,8 +74,6 @@ data=\epoc32\data\z\resource\qt\plugins\codecs\qtwcodecs.qtplugin resou // iconengines stubs data=\epoc32\data\z\resource\qt\plugins\iconengines\qsvgicon.qtplugin resource\qt\plugins\iconengines\qsvgicon.qtplugin -// Phonon MMF backend -data=\epoc32\data\z\resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin // QtMultimedia audio backend data=\epoc32\data\qt\qtlibspluginstubs\qaudio.qtplugin resource\qt\plugins\audio\qaudio.qtplugin @@ -123,3 +86,4 @@ data=ZSYSTEM\install\qt_stub.sis System\Install\qt_stub.sis data=ZSYSTEM\install\qtwebkit_stub.sis System\Install\qtwebkit_stub.sis #endif // __QT_IBY__ + diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 86deb40..1b1e965 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -78,12 +78,6 @@ symbian: { DEPLOYMENT += phonon_backend_plugins } - contains(QT_CONFIG, audio-backend) { - qaudio_backend_plugins.sources += qaudio.dll - qaudio_backend_plugins.path = c:$$QT_PLUGINS_BASE_DIR/audio - DEPLOYMENT += qaudio_backend_plugins - } - # Support backup & restore for Qt libraries qtbackup.sources = backup_registration.xml qtbackup.path = c:/private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,) diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp index 01c4124..4a211fc 100644 --- a/src/sql/drivers/oci/qsql_oci.cpp +++ b/src/sql/drivers/oci/qsql_oci.cpp @@ -517,7 +517,7 @@ QVariant::Type qDecodeOCIType(const QString& ocitype, QSql::NumericalPrecisionPo } else if (ocitype == QLatin1String("LONG") || ocitype == QLatin1String("NCLOB") || ocitype == QLatin1String("CLOB")) - type = QVariant::String; + type = QVariant::ByteArray; else if (ocitype == QLatin1String("RAW") || ocitype == QLatin1String("LONG RAW") || ocitype == QLatin1String("ROWID") || ocitype == QLatin1String("BLOB") || ocitype == QLatin1String("CFILE") || ocitype == QLatin1String("BFILE")) @@ -543,7 +543,6 @@ QVariant::Type qDecodeOCIType(int ocitype, QSql::NumericalPrecisionPolicy precis case SQLT_AVC: case SQLT_RDD: case SQLT_LNG: - case SQLT_CLOB: #ifdef SQLT_INTERVAL_YM case SQLT_INTERVAL_YM: #endif @@ -581,6 +580,7 @@ QVariant::Type qDecodeOCIType(int ocitype, QSql::NumericalPrecisionPolicy precis case SQLT_LVC: case SQLT_LVB: case SQLT_BLOB: + case SQLT_CLOB: case SQLT_FILE: case SQLT_NTY: case SQLT_REF: diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 5eff8a8..6591481 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -964,7 +964,7 @@ static void qParseArgs(int argc, char *argv[]) " -xunitxml : Outputs results as XML XUnit document\n" " -xml : Outputs results as XML document\n" " -lightxml : Outputs results as stream of XML tags\n" - " -flush : Flushes the resutls\n" + " -flush : Flushes the results\n" " -o filename: Writes all output into a file\n" " -silent : Only outputs warnings and failures\n" " -v1 : Print enter messages for each testfunction\n" |