diff options
Diffstat (limited to 'src')
59 files changed, 506 insertions, 551 deletions
diff --git a/src/corelib/arch/symbian/qatomic_symbian.cpp b/src/corelib/arch/symbian/qatomic_symbian.cpp index 9bec0f5..a228696 100644 --- a/src/corelib/arch/symbian/qatomic_symbian.cpp +++ b/src/corelib/arch/symbian/qatomic_symbian.cpp @@ -62,9 +62,9 @@ struct SPrintExitInfo TInt processHandleCount=0; TInt threadHandleCount=0; RThread().HandleCount(processHandleCount,threadHandleCount); - RDebug::Print(_L("%S exiting with %d allocated cells, %d handles"), - &fullName, - cells - initCells, + RDebug::Print(_L("%S exiting with %d allocated cells, %d handles"), + &fullName, + cells - initCells, (processHandleCount + threadHandleCount) - (initProcessHandleCount + initThreadHandleCount)); } TInt initCells; @@ -107,4 +107,3 @@ __declspec(dllexport) __asm int QBasicAtomicInt::fetchAndStoreOrdered(int newVal QT_END_NAMESPACE #endif // Q_CC_RVCT - diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 818e555..21cbd12 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1914,7 +1914,7 @@ QSysInfo::SymVersion QSysInfo::symbianVersion() \relates <QtGlobal> Users Q_CHECK_PTR on \a pointer, then returns \a pointer. - + This can be used as an inline version of Q_CHECK_PTR. */ @@ -2115,8 +2115,8 @@ QString qt_error_string(int errorCode) warnings, critical and fatal error messages. The Qt library (debug mode) contains hundreds of warning messages that are printed when internal errors (usually invalid function arguments) - occur. Qt built in release mode also contains such warnings unless - QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during + occur. Qt built in release mode also contains such warnings unless + QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during compilation. If you implement your own message handler, you get total control of these messages. @@ -2516,7 +2516,7 @@ Q_GLOBAL_STATIC(SeedStorage, randTLS) // Thread Local Storage for seed value */ void qsrand(uint seed) { -#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD) && !defined(Q_OS_SYMBIAN) +#if defined(Q_OS_UNIX) && !defined(QT_NO_THREAD) && !defined(Q_OS_SYMBIAN) SeedStorageType *pseed = randTLS()->localData(); if (!pseed) randTLS()->setLocalData(pseed = new SeedStorageType); @@ -3179,7 +3179,7 @@ bool QInternal::callFunction(InternalFunction func, void **args) Compares the floating point value \a p1 and \a p2 and returns \c true if they are considered equal, otherwise \c false. - Note that comparing values where either \a p1 or \a p2 is 0.0 will not work. + Note that comparing values where either \a p1 or \a p2 is 0.0 will not work. The solution to this is to compare against values greater than or equal to 1.0. \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 46 @@ -3416,7 +3416,7 @@ int qt_exception2SymbianError(const std::exception& aThrow) err = KErrUnderflow; qWarning("translation from std exception \"%s\" to %d", aThrow.what(), err); } - + return err; } #endif diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 257e3db..3493f13 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -915,9 +915,9 @@ QT_END_INCLUDE_NAMESPACE */ #ifndef QT_LINUXBASE /* the LSB defines TRUE and FALSE for us */ -/* Symbian OS defines TRUE = 1 and FALSE = 0, +/* Symbian OS defines TRUE = 1 and FALSE = 0, redefine to built-in booleans to make autotests work properly */ -#ifdef Q_OS_SYMBIAN +#ifdef Q_OS_SYMBIAN #undef TRUE #undef FALSE #endif diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 9787566..836fa44 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1824,7 +1824,7 @@ QChar QDir::separator() { #if defined (Q_FS_FAT) || defined(Q_WS_WIN) || defined(Q_OS_SYMBIAN) return QLatin1Char('\\'); -#elif defined(Q_OS_UNIX) +#elif defined(Q_OS_UNIX) return QLatin1Char('/'); #elif defined (Q_OS_MAC) return QLatin1Char(':'); diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp index f7120e1..cd8d36d 100644 --- a/src/corelib/io/qtemporaryfile.cpp +++ b/src/corelib/io/qtemporaryfile.cpp @@ -517,7 +517,7 @@ QTemporaryFile::QTemporaryFile() #ifdef Q_OS_SYMBIAN //Just for verify that folder really exist on hardware fileEngine()->mkdir( QDir::tempPath(), true ); -#endif +#endif } /*! diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 3293d47..e876843 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -652,7 +652,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla QT_TRY { Q_D(QAbstractEventDispatcher); - + // It is safe if this counter overflows. The main importance is that each // iteration count is different from the last. m_iterationCount++; @@ -959,7 +959,7 @@ bool QEventDispatcherSymbian::unregisterTimers ( QObject * object ) { if (m_timerList.isEmpty()) return false; - + bool unregistered = false; for (QHash<int, SymbianTimerInfoPtr>::iterator i = m_timerList.begin(); i != m_timerList.end(); ) { if ((*i)->receiver == object) { @@ -1002,4 +1002,3 @@ void CQtActiveScheduler::Error(TInt aError) const } QT_END_NAMESPACE - diff --git a/src/corelib/kernel/qsystemsemaphore_symbian.cpp b/src/corelib/kernel/qsystemsemaphore_symbian.cpp index 8179046..1516841 100644 --- a/src/corelib/kernel/qsystemsemaphore_symbian.cpp +++ b/src/corelib/kernel/qsystemsemaphore_symbian.cpp @@ -47,7 +47,7 @@ #include <qcore_symbian_p.h> #include <e32cmn.h> QT_BEGIN_NAMESPACE - + #ifndef QT_NO_SYSTEMSEMAPHORE QSystemSemaphorePrivate::QSystemSemaphorePrivate() : @@ -65,7 +65,7 @@ void QSystemSemaphorePrivate::setErrorString(const QString &function, int err) errorString = QCoreApplication::tr("%1: already exists", "QSystemSemaphore").arg(function); error = QSystemSemaphore::AlreadyExists; break; - case KErrNotFound: + case KErrNotFound: errorString = QCoreApplication::tr("%1: doesn't exists", "QSystemSemaphore").arg(function); error = QSystemSemaphore::NotFound; break; diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 2b57d2f..dd3468d 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -156,7 +156,7 @@ static void construct(QVariant::Private *x, const void *copy) x->data.b = copy ? *static_cast<const bool *>(copy) : false; break; case QVariant::Double: -#if defined(Q_CC_RVCT) +#if defined(Q_CC_RVCT) // Using trinary operator with 64bit constants crashes when ran on Symbian device if (copy){ x->data.d = *static_cast<const double*>(copy); @@ -165,13 +165,13 @@ static void construct(QVariant::Private *x, const void *copy) } #else x->data.d = copy ? *static_cast<const double*>(copy) : 0.0; -#endif +#endif break; case QMetaType::Float: x->data.f = copy ? *static_cast<const float*>(copy) : 0.0f; break; case QVariant::LongLong: -#if defined(Q_CC_RVCT) +#if defined(Q_CC_RVCT) // Using trinary operator with 64bit constants crashes when ran on Symbian device if (copy){ x->data.ll = *static_cast<const qlonglong *>(copy); @@ -180,10 +180,10 @@ static void construct(QVariant::Private *x, const void *copy) } #else x->data.ll = copy ? *static_cast<const qlonglong *>(copy) : Q_INT64_C(0); -#endif +#endif break; case QVariant::ULongLong: -#if defined(Q_CC_RVCT) +#if defined(Q_CC_RVCT) // Using trinary operator with 64bit constants crashes when ran on Symbian device if (copy){ x->data.ull = *static_cast<const qulonglong *>(copy); @@ -192,7 +192,7 @@ static void construct(QVariant::Private *x, const void *copy) } #else x->data.ull = copy ? *static_cast<const qulonglong *>(copy) : Q_UINT64_C(0); -#endif +#endif break; case QVariant::Invalid: case QVariant::UserType: @@ -618,7 +618,7 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result, ok = &dummy; switch (uint(t)) { - case QVariant::Url: + case QVariant::Url: switch (d->type) { case QVariant::String: *static_cast<QUrl *>(result) = QUrl(*v_cast<QString>(d)); @@ -1214,8 +1214,8 @@ const QVariant::Handler *QVariant::handler = &qt_kernel_variant_handler; and versatile, but may prove less memory and speed efficient than storing specific types in standard data structures. - QVariant also supports the notion of null values, where you can - have a defined type with no value set. However, note that QVariant + QVariant also supports the notion of null values, where you can + have a defined type with no value set. However, note that QVariant types can only be cast when they have had a value set. \snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 1 diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index 5364190..d7692b0 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -311,7 +311,7 @@ void QPluginLoader::setFileName(const QString &fileName) QFileInfoList driveList(QDir::drives()); foreach(const QFileInfo& drive, driveList) { QString testFilePath(drive.absolutePath() + stubPath); - testFilePath = QDir::cleanPath(testFilePath); + testFilePath = QDir::cleanPath(testFilePath); if (QFile::exists(testFilePath)) { fn = testFilePath; break; @@ -319,7 +319,7 @@ void QPluginLoader::setFileName(const QString &fileName) } } } - + #else QString fn = QFileInfo(fileName).canonicalFilePath(); #endif diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index fac50ee..a4a57ce 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -183,7 +183,7 @@ QThreadPrivate::QThreadPrivate(QThreadData *d) id = 0; waiters = 0; #endif -#if defined (Q_WS_WIN) || defined (Q_OS_SYMBIAN) +#if defined (Q_WS_WIN) || defined (Q_OS_SYMBIAN) terminationEnabled = true; terminatePending = false; #endif diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index 51de0be..752796b 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -152,7 +152,7 @@ public: static void finish(void *, bool lockAnyway=true); #endif // Q_OS_WIN32 -#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined (Q_OS_SYMBIAN) +#if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) || defined (Q_OS_SYMBIAN) bool terminationEnabled, terminatePending; # endif QThreadData *data; diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 881b889..cabf823 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -178,7 +178,7 @@ void QThreadPrivate::createEventDispatcher(QThreadData *data) else #endif #ifdef Q_OS_SYMBIAN - data->eventDispatcher = new QEventDispatcherSymbian; + data->eventDispatcher = new QEventDispatcherSymbian; #else data->eventDispatcher = new QEventDispatcherUNIX; #endif @@ -193,7 +193,7 @@ void *QThreadPrivate::start(void *arg) pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); pthread_cleanup_push(QThreadPrivate::finish, arg); #endif - + QThread *thr = reinterpret_cast<QThread *>(arg); QThreadData *data = QThreadData::get2(thr); @@ -226,7 +226,7 @@ void *QThreadPrivate::start(void *arg) #ifndef Q_OS_SYMBIAN pthread_cleanup_pop(1); #else - QThreadPrivate::finish(arg); + QThreadPrivate::finish(arg); #endif return 0; @@ -266,7 +266,7 @@ void QThreadPrivate::finish(void *arg) d->thread_id = 0; #ifdef Q_OS_SYMBIAN if (closeNativeHandle) - d->data->symbian_thread_handle.Close(); + d->data->symbian_thread_handle.Close(); #endif d->thread_done.wakeAll(); #ifdef Q_OS_SYMBIAN @@ -325,7 +325,7 @@ int QThread::idealThreadCount() #elif defined(Q_OS_INTEGRITY) // ### TODO - how to get the amound of CPUs on INTEGRITY? #elif defined(Q_OS_SYMBIAN) - // ### TODO - Get the number of cores from HAL? when multicore architectures (SMP) are supported + // ### TODO - Get the number of cores from HAL? when multicore architectures (SMP) are supported cores = 1; #else // the rest: Linux, Solaris, AIX, Tru64 @@ -545,10 +545,10 @@ void QThread::terminate() d->terminatePending = true; return; } - + d->terminated = true; QThreadPrivate::finish(this, false, false); - d->data->symbian_thread_handle.Terminate(KErrNone); + d->data->symbian_thread_handle.Terminate(KErrNone); d->data->symbian_thread_handle.Close(); #endif @@ -592,7 +592,7 @@ void QThread::setTerminationEnabled(bool enabled) d->terminated = true; QThreadPrivate::finish(thr, false); locker.unlock(); // don't leave the mutex locked! - pthread_exit(NULL); + pthread_exit(NULL); } #endif } diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index fc6a1e3a..a57fec7 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -150,10 +150,10 @@ struct Q_CORE_EXPORT QHashData }; inline void QHashData::mightGrow() // ### Qt 5: eliminate -{ +{ if (size >= numBuckets) rehash(numBits + 1); -} +} inline bool QHashData::willGrow() { @@ -992,12 +992,12 @@ Q_INLINE_TEMPLATE int QMultiHash<Key, T>::remove(const Key &key, const T &value) typename QHash<Key, T>::iterator end(QHash<Key, T>::end()); while (i != end && i.key() == key) { if (i.value() == value) { -#if defined(Q_CC_RVCT) - // RVCT has problems with scoping, apparently. +#if defined(Q_CC_RVCT) + // RVCT has problems with scoping, apparently. i = QHash<Key, T>::erase(i); #else i = erase(i); -#endif +#endif ++n; } else { ++i; diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h index be80e75..70a2896 100644 --- a/src/corelib/tools/qmap.h +++ b/src/corelib/tools/qmap.h @@ -1019,12 +1019,12 @@ Q_INLINE_TEMPLATE int QMultiMap<Key, T>::remove(const Key &key, const T &value) typename QMap<Key, T>::iterator end(QMap<Key, T>::end()); while (i != end && !qMapLessThanKey<Key>(key, i.key())) { if (i.value() == value) { -#if defined(Q_CC_RVCT) - // RVCT has problems with scoping, apparently. +#if defined(Q_CC_RVCT) + // RVCT has problems with scoping, apparently. i = QMap<Key, T>::erase(i); #else i = erase(i); -#endif +#endif ++n; } else { ++i; diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index c9478cb..a6c2883 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -1915,7 +1915,6 @@ int QPixmap::defaultDepth() #elif defined(Q_OS_SYMBIAN) return S60->screenDepth; #endif - } typedef void (*_qt_pixmap_cleanup_hook_64)(qint64); diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index a8d09b0..8b46dc6 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -114,7 +114,7 @@ symbian { kernel/qclipboard_s60.cpp\ kernel/qdnd_s60.cpp \ kernel/qsound_s60.cpp - + HEADERS += \ kernel/qt_s60_p.h \ kernel/qeventdispatcher_s60_p.h @@ -198,7 +198,7 @@ embedded { qcocoaview_mac_p.h \ qcocoaapplication_mac_p.h \ qcocoaapplicationdelegate_mac_p.h \ - qmultitouch_mac_p.h + qmultitouch_mac_p.h OBJECTIVE_SOURCES += \ kernel/qcursor_mac.mm \ @@ -216,7 +216,7 @@ embedded { kernel/qt_cocoa_helpers_mac.mm \ kernel/qdesktopwidget_mac.mm \ kernel/qeventdispatcher_mac.mm \ - kernel/qcocoawindowcustomthemeframe_mac.mm \ + kernel/qcocoawindowcustomthemeframe_mac.mm \ kernel/qmultitouch_mac.mm \ HEADERS += \ @@ -225,10 +225,10 @@ embedded { kernel/qcocoaapplicationdelegate_mac_p.h \ kernel/qeventdispatcher_mac_p.h - MENU_NIB.files = mac/qt_menu.nib - MENU_NIB.path = Resources + MENU_NIB.files = mac/qt_menu.nib + MENU_NIB.path = Resources MENU_NIB.version = Versions - QMAKE_BUNDLE_DATA += MENU_NIB + QMAKE_BUNDLE_DATA += MENU_NIB RESOURCES += mac/macresources.qrc LIBS += -framework AppKit diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp index fe40ea8..07c40c7 100644 --- a/src/gui/kernel/qaction.cpp +++ b/src/gui/kernel/qaction.cpp @@ -1368,7 +1368,7 @@ QAction::MenuRole QAction::menuRole() const This indicates what softkey action this action is. Usually used on mobile platforms to map QActions to hardware keys. - + The softkey role can be changed any time. */ void QAction::setSoftKeyRole(SoftKeyRole softKeyRole) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 7836238..c831dad 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -124,7 +124,7 @@ private: QS60Beep::~QS60Beep() { - delete iToneUtil; + delete iToneUtil; } QS60Beep* QS60Beep::NewL(TInt aFrequency, TTimeIntervalMicroSeconds aDuration) @@ -153,7 +153,7 @@ void QS60Beep::Play() iState=EBeepPrepared; } } - + iToneUtil->Play(); iState=EBeepPlaying; } @@ -295,7 +295,7 @@ void QLongTapTimer::PointerEventL(const TPointerEvent& event) Cancel(); m_event = event; if (event.iType == TPointerEvent::EButton1Down) - { + { m_pressedCoordinates = QPoint(event.iPosition.iX,event.iPosition.iY); // must be same as KLongTapDelay in aknlongtapdetector.h After(800000); @@ -366,7 +366,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) } if (type == QMouseEvent::None) return; - + // store events for later sending/saving QWidget *alienWidget; typedef QPair<QWidget*,QMouseEvent> Event; @@ -375,7 +375,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) QPoint widgetPos = QPoint(pEvent.iPosition.iX, pEvent.iPosition.iY); TPoint controlScreenPos = PositionRelativeToScreen(); QPoint globalPos = QPoint(controlScreenPos.iX, controlScreenPos.iY) + widgetPos; - + if (type == QEvent::MouseButtonPress || type == QEvent::MouseButtonDblClick) { // get the button press target @@ -406,7 +406,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) events.append(Event(S60->lastPointerEventTarget,mEventLeave)); } QMouseEvent mEventEnter(QEvent::Enter, alienWidget->mapFromGlobal(globalPos), globalPos, - button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers)); + button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers)); events.append(Event(alienWidget,mEventEnter)); } @@ -672,14 +672,14 @@ void QSymbianControl::HandleResourceChange(int resourceType) { switch (resourceType) { case KInternalStatusPaneChange: - qwidget->d_func()->setWindowIcon_sys(true); - break; + qwidget->d_func()->setWindowIcon_sys(true); + break; case KUidValueCoeFontChangeEvent: // font change event break; #ifdef Q_WS_S60 case KEikDynamicLayoutVariantSwitch: - { + { if (qwidget->isFullScreen()) { SetExtentToWholeScreen(); } else if (qwidget->isMaximized()) { @@ -944,10 +944,10 @@ void QApplication::beep() QS60Beep* beep=NULL; TRAPD(err, beep=QS60Beep::NewL(frequency, duration)); if(!err) { - beep->Play(); + beep->Play(); } delete beep; - beep=NULL; + beep=NULL; } int QApplication::s60ProcessEvent(TWsEvent *event) @@ -1081,8 +1081,8 @@ void QApplication::symbianResourceChange(int type) case KEikDynamicLayoutVariantSwitch: { if (S60) - S60->updateScreenSize(); - + S60->updateScreenSize(); + #ifndef QT_NO_STYLE_S60 QS60Style *s60Style = 0; @@ -1096,7 +1096,7 @@ void QApplication::symbianResourceChange(int type) if (s60Style) s60Style->handleDynamicLayoutVariantSwitch(); -#endif +#endif } break; @@ -1104,7 +1104,7 @@ void QApplication::symbianResourceChange(int type) case KAknsMessageSkinChange: if (QS60Style *s60Style = qobject_cast<QS60Style*>(QApplication::style())) s60Style->handleSkinChange(); - break; + break; #endif #endif // Q_WS_S60 default: @@ -1175,5 +1175,3 @@ void QSessionManager::cancel() } #endif //QT_NO_SESSIONMANAGER QT_END_NAMESPACE - - diff --git a/src/gui/kernel/qclipboard_s60.cpp b/src/gui/kernel/qclipboard_s60.cpp index 27b4fdb..5536438 100644 --- a/src/gui/kernel/qclipboard_s60.cpp +++ b/src/gui/kernel/qclipboard_s60.cpp @@ -76,10 +76,10 @@ public: QMimeData* source() { return src; } bool connected() - { return connection; } + { return connection; } void clear(); RFs fsSession(); - + private: QMimeData* src; @@ -134,7 +134,7 @@ static QClipboardData *clipboardData() delete internalCbData; internalCbData = 0; } - else + else { qAddPostRoutine(cleanupClipboardData); } @@ -161,7 +161,7 @@ void writeToStreamLX(const QMimeData* aData, RWriteStream& aStream) aStream << TCardinality(ba.size()); aStream.WriteL(reinterpret_cast<const uchar*>(ba.constData()),ba.size()); CleanupStack::PopAndDestroy(stringData); - } + } } void readFromStreamLX(QMimeData* aData,RReadStream& aStream) @@ -169,7 +169,7 @@ void readFromStreamLX(QMimeData* aData,RReadStream& aStream) // This function both leaves and throws exceptions. There must be no destructor // dependencies between cleanup styles, and no cleanup stack dependencies on stacked objects. TCardinality mimeTypeCount; - aStream >> mimeTypeCount; + aStream >> mimeTypeCount; for (int i = 0; i< mimeTypeCount;i++) { // mime type @@ -220,7 +220,7 @@ const QMimeData* QClipboard::mimeData(Mode mode) const if (err != KErrNone){ qDebug()<< "clipboard is empty/err: " << err; } - + } return 0; } @@ -249,7 +249,7 @@ void QClipboard::setMimeData(QMimeData* src, Mode mode) qDebug()<< "clipboard write err :" << err; } } - emitChanged(QClipboard::Clipboard); + emitChanged(QClipboard::Clipboard); } bool QClipboard::supportsMode(Mode mode) const diff --git a/src/gui/kernel/qdnd_s60.cpp b/src/gui/kernel/qdnd_s60.cpp index 07b196e..c7656b0 100644 --- a/src/gui/kernel/qdnd_s60.cpp +++ b/src/gui/kernel/qdnd_s60.cpp @@ -94,8 +94,8 @@ class QShapedPixmapWidget public: QShapedPixmapWidget(RWsSession aWsSession,RWindowTreeNode* aNode) { - sprite = RWsSprite(aWsSession); - cursorSprite.iBitmap = 0; + sprite = RWsSprite(aWsSession); + cursorSprite.iBitmap = 0; cursorSprite.iMaskBitmap = 0; cursorSprite.iInvertMask = EFalse; cursorSprite.iOffset = TPoint(0,0); @@ -127,7 +127,7 @@ public: //### heaplock centralized. QImage temp = pm.toImage(); QSize size = pm.size(); - temp.bits(); + temp.bits(); CFbsBitmap *curbm = q_check_ptr(new CFbsBitmap()); // CBase derived object needs check on new curbm->Create(TSize(size.width(),size.height()),EColor16MA); curbm->LockHeap(ETrue); @@ -188,7 +188,7 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e) switch(e->type()) { case QEvent::MouseButtonPress: { - } + } case QEvent::MouseMove: { if (!object) { //#### this should not happen @@ -211,7 +211,7 @@ bool QDragManager::eventFilter(QObject *o, QEvent *e) if (!cw) return true; TPoint windowPos = cw->effectiveWinId()->PositionRelativeToScreen(); - qt_symbian_dnd_deco->sprite.SetPosition(TPoint(me->globalX()- windowPos.iX,me->globalY()- windowPos.iY)); + qt_symbian_dnd_deco->sprite.SetPosition(TPoint(me->globalX()- windowPos.iX,me->globalY()- windowPos.iY)); while (cw && !cw->acceptDrops() && !cw->isWindow()) cw = cw->parentWidget(); @@ -318,7 +318,7 @@ Qt::DropAction QDragManager::drag(QDrag *o) object->d_func()->target = 0; TPoint windowPos = source()->effectiveWinId()->PositionRelativeToScreen(); qt_symbian_dnd_deco->sprite.SetPosition(TPoint(QCursor::pos().x()- windowPos.iX ,QCursor::pos().y() - windowPos.iY)); - + QPoint hotspot = drag_object->hotSpot(); qt_symbian_dnd_deco->cursorSprite.iOffset = TPoint(- hotspot.x(),- hotspot.y()); qt_symbian_dnd_deco->sprite.UpdateMember(0,qt_symbian_dnd_deco->cursorSprite); diff --git a/src/gui/kernel/qsound_s60.cpp b/src/gui/kernel/qsound_s60.cpp index c9eedf5..75458ec 100644 --- a/src/gui/kernel/qsound_s60.cpp +++ b/src/gui/kernel/qsound_s60.cpp @@ -65,22 +65,22 @@ public: void play(); void stop(); - + inline QSound* sound() const { return m_sound; } - + public: // from MMdaAudioPlayerCallback void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration); - void MapcPlayComplete(TInt aError); + void MapcPlayComplete(TInt aError); private: QSound *m_sound; - QAuServerS60 *m_server; + QAuServerS60 *m_server; bool m_prepared; - bool m_playCalled; - CMdaAudioPlayerUtility* m_playUtility; + bool m_playCalled; + CMdaAudioPlayerUtility* m_playUtility; }; - + class QAuServerS60 : public QAuServer { public: @@ -103,11 +103,11 @@ public: } bool okay() { return true; } - + protected: - void playCompleted(QAuBucketS60* bucket, int error) + void playCompleted(QAuBucketS60* bucket, int error) { - QSound *sound = bucket->sound(); + QSound *sound = bucket->sound(); if(!error) { // We need to handle repeats by ourselves, since with Symbian API we don't // know how many loops have been played when user asks it @@ -119,14 +119,14 @@ protected: // in order that QSound::isFinished will return true; while(decLoop(sound)) {} } - } + } protected: QAuBucketS60* bucket( QSound *s ) { return (QAuBucketS60*)QAuServer::bucket( s ); } - + friend class QAuBucketS60; }; @@ -160,32 +160,32 @@ void QAuBucketS60::play() { if(m_prepared) { // OpenFileL call is completed we can start playing immediately - m_playUtility->Play(); + m_playUtility->Play(); } else { m_playCalled = true; } - + } void QAuBucketS60::stop() { m_playCalled = false; - m_playUtility->Stop(); + m_playUtility->Stop(); } void QAuBucketS60::MapcPlayComplete(TInt aError) { m_server->playCompleted(this, aError); } - -void QAuBucketS60::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/) + +void QAuBucketS60::MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& /*aDuration*/) { if(aError) { m_server->playCompleted(this, aError); } else { - m_prepared = true; + m_prepared = true; if(m_playCalled){ - play(); + play(); } } } @@ -196,7 +196,7 @@ QAuBucketS60::~QAuBucketS60() m_playUtility->Stop(); m_playUtility->Close(); } - + delete m_playUtility; } diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 802a2f7..f6dd2e1 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -73,10 +73,10 @@ #include <akncontext.h> // CAknContextPane #include <eikspane.h> // CEikStatusPane #endif - + QT_BEGIN_NAMESPACE -// Application internal HandleResourceChangeL events, +// Application internal HandleResourceChangeL events, // system evens seems to start with 0x10 const TInt KInternalStatusPaneChange = 0x50000000; @@ -115,7 +115,7 @@ QS60Data* qGlobalS60Data(); class QAbstractLongTapObserver { public: - virtual void HandleLongTapEventL( const TPoint& aPenEventLocation, + virtual void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ) = 0; }; class QLongTapTimer; diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index bfcb02b..bca0e9d 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -896,22 +896,22 @@ void QWidget::setAutoFillBackground(bool enabled) \endlist \sa QEvent, QPainter, QGridLayout, QBoxLayout - + \section1 SoftKeys \since 4.6 \preliminary - Softkeys API is a platform independent way of mapping actions to (hardware)keys + Softkeys API is a platform independent way of mapping actions to (hardware)keys and toolbars provided by the underlying platform. - - There are three major use cases supported. First one is a mobile device + + There are three major use cases supported. First one is a mobile device with keypad navigation and no touch ui. Second use case is a mobile - device with touch ui. Third use case is desktop. For now the softkey API is + device with touch ui. Third use case is desktop. For now the softkey API is only implemented for Series60. - - QActions are set to widget(s) via softkey API. Actions in focused widget are + + QActions are set to widget(s) via softkey API. Actions in focused widget are mapped to native toolbar or hardware keys. Even though the API allows to set - any amount of widgets there might be physical restrictions to amount of + any amount of widgets there might be physical restrictions to amount of softkeys that can be used by the device. \o Series60: For series60 menu button is automatically mapped to left @@ -919,7 +919,7 @@ void QWidget::setAutoFillBackground(bool enabled) \sa softKeys() \sa setSoftKey() - + */ QWidgetMapper *QWidgetPrivate::mapper = 0; // widget with wid @@ -5768,7 +5768,7 @@ void QWidget::setFocus(Qt::FocusReason reason) if (!isEnabled()) return; - + QWidget *f = this; while (f->d_func()->extra && f->d_func()->extra->focus_proxy) f = f->d_func()->extra->focus_proxy; @@ -11698,7 +11698,7 @@ void QWidget::clearMask() /*! \preliminary \since 4.6 - + Returns the (possibly empty) list of this widget's softkeys. Returned list cannot be changed. Softkeys should be added and removed via method called setSoftKeys @@ -11719,7 +11719,7 @@ const QList<QAction*>& QWidget::softKeys() const /*! \preliminary \since 4.6 - + Sets the softkey \a softkey to this widget's list of softkeys, Setting 0 as softkey will clear all the existing softkeys set to the widget diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index ad7cd2d..4336d45 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -317,14 +317,14 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de QT_TRAP_THROWING(control->ConstructL(true,desktop)); if (!desktop) { - TInt stackingFlags; - if ((q->windowType() & Qt::Popup) == Qt::Popup) { - stackingFlags = ECoeStackFlagRefusesAllKeys | ECoeStackFlagRefusesFocus; - } else { - stackingFlags = ECoeStackFlagStandard; - } - control->ControlEnv()->AppUi()->AddToStackL(control, ECoeStackPriorityDefault, stackingFlags); - + TInt stackingFlags; + if ((q->windowType() & Qt::Popup) == Qt::Popup) { + stackingFlags = ECoeStackFlagRefusesAllKeys | ECoeStackFlagRefusesFocus; + } else { + stackingFlags = ECoeStackFlagStandard; + } + control->ControlEnv()->AppUi()->AddToStackL(control, ECoeStackPriorityDefault, stackingFlags); + QTLWExtra *topExtra = topData(); topExtra->rwindow = control->DrawableWindow(); // Request mouse move events. @@ -349,7 +349,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de QSymbianControl *control = new QSymbianControl(q); setWinId(control); QT_TRAP_THROWING(control->ConstructL(!parentWidget)); - + TInt stackingFlags; if ((q->windowType() & Qt::Popup) == Qt::Popup) { stackingFlags = ECoeStackFlagRefusesAllKeys | ECoeStackFlagRefusesFocus; @@ -357,7 +357,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de stackingFlags = ECoeStackFlagStandard; } control->ControlEnv()->AppUi()->AddToStackL(control, ECoeStackPriorityDefault, stackingFlags); - + WId parentw = parentWidget->effectiveWinId(); QT_TRAP_THROWING(control->SetContainerWindowL(*parentw)); @@ -394,12 +394,12 @@ void QWidgetPrivate::show_sys() WId id = q->internalWinId(); if (!extra->topextra->activated) { - QT_TRAP_THROWING(id->ActivateL()); + QT_TRAP_THROWING(id->ActivateL()); extra->topextra->activated = 1; } id->MakeVisible(true); id->SetFocus(true); - + // Force setting of the icon after window is made visible, // this is needed even WA_SetWindowIcon is not set, as in that case we need // to reset to the application level window icon @@ -554,7 +554,7 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) if (wasCreated && old_winid) { old_winid->MakeVisible(false); if(old_winid->IsFocused()) // Avoid unnecessary calls to FocusChanged() - old_winid->SetFocus(false); + old_winid->SetFocus(false); old_winid->SetParent(0); } @@ -620,7 +620,7 @@ void QWidgetPrivate::s60UpdateIsOpaque() CFbsBitmap* qt_pixmapToNativeBitmap(QPixmap pixmap, bool invert) { - CFbsBitmap* fbsBitmap = q_check_ptr(new CFbsBitmap); // CBase derived object needs check on new + CFbsBitmap* fbsBitmap = q_check_ptr(new CFbsBitmap); // CBase derived object needs check on new TSize size(pixmap.size().width(), pixmap.size().height()); TDisplayMode mode(EColor16MU); @@ -631,7 +631,7 @@ CFbsBitmap* qt_pixmapToNativeBitmap(QPixmap pixmap, bool invert) // Will fix later on when native pixmap is implemented switch(pixmap.depth()) { case 1: - mode = EGray2; + mode = EGray2; break; case 4: mode = EColor16; @@ -661,7 +661,7 @@ CFbsBitmap* qt_pixmapToNativeBitmap(QPixmap pixmap, bool invert) QImage image = pixmap.toImage(); if(invert) - image.invertPixels(); + image.invertPixels(); int height = pixmap.size().height(); for(int i=0;i<height;i++ ) @@ -717,14 +717,14 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset) // Context pane does not exist, try setting small icon to title pane TRect titlePaneRect; TBool found = AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::ETitlePane, titlePaneRect ); - CAknTitlePane* titlePane = S60->titlePane(); + CAknTitlePane* titlePane = S60->titlePane(); if (found && titlePane) { // We have title pane with valid metrics - // The API to get title_pane graphics size is not public -> assume square space based + // The API to get title_pane graphics size is not public -> assume square space based // on titlebar font height. CAknBitmap would be optimum, wihtout setting the size, since // then title pane would automatically scale the bitmap. Unfortunately it is not public API const CFont * font = AknLayoutUtils::FontFromId(EAknLogicalFontTitleFont); TSize iconSize(font->HeightInPixels(), font->HeightInPixels()); - + QIcon icon = q->windowIcon(); if (!icon.isNull()) { // Valid icon -> set it as an title pane small picture @@ -749,7 +749,7 @@ void QWidgetPrivate::setWindowIcon_sys(bool forceReset) } } } - + #else Q_UNUSED(forceReset) #endif @@ -763,10 +763,10 @@ void QWidgetPrivate::setWindowTitle_sys(const QString &caption) Q_ASSERT(q->testAttribute(Qt::WA_WState_Created)); CAknTitlePane* titlePane = S60->titlePane(); if(titlePane) { - if(caption.isEmpty()) - titlePane->SetTextToDefaultL(); - else - QT_TRAP_THROWING(titlePane->SetTextL(qt_QString2TPtrC(caption))); + if(caption.isEmpty()) + titlePane->SetTextToDefaultL(); + else + QT_TRAP_THROWING(titlePane->SetTextL(qt_QString2TPtrC(caption))); } } #else @@ -1048,7 +1048,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate) if (isVisible()) { WId id = effectiveWinId(); if(id->IsFocused()) // Avoid unnecessary calls to FocusChanged() - id->SetFocus(false); + id->SetFocus(false); id->MakeVisible(false); } } else { @@ -1056,7 +1056,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate) WId id = effectiveWinId(); id->MakeVisible(true); if(!id->IsFocused()) // Avoid unnecessary calls to FocusChanged() - id->SetFocus(true); + id->SetFocus(true); } const QRect normalGeometry = geometry(); const QRect r = top->normalGeometry; @@ -1118,7 +1118,7 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) // the next visible window will get keyboard focus WId wid = CEikonEnv::Static()->AppUi()->TopFocusedControl(); if (wid) { - QWidget *widget = QWidget::find(wid); + QWidget *widget = QWidget::find(wid); QApplication::setActiveWindow(widget); if (widget) { // Reset global window title for focusing window diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index d153215..1f52422 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -233,7 +233,7 @@ contains(QMAKE_MAC_XARCH, no) { win32-g++|!win32:!*-icc* { mmx { - mmx_compiler.commands = $$QMAKE_CXX -c -Winline + mmx_compiler.commands = $$QMAKE_CXX -c -Winline mac { mmx_compiler.commands += -Xarch_i386 -mmmx @@ -375,7 +375,7 @@ symbian { "SOURCE qblendfunctions_armv6_rvct.s" \ "SOURCE qdrawhelper_armv6_rvct.s" \ "$${LITERAL_HASH}endif" - + MMP_RULES += armccIfdefBlock QMAKE_CXXFLAGS.ARMCC *= -O3 } diff --git a/src/gui/painting/qblendfunctions_armv6_rvct.s b/src/gui/painting/qblendfunctions_armv6_rvct.s index 312bd07..64d5aa5 100644 --- a/src/gui/painting/qblendfunctions_armv6_rvct.s +++ b/src/gui/painting/qblendfunctions_armv6_rvct.s @@ -54,13 +54,13 @@ ARM PRESERVE8 - INCLUDE qdrawhelper_armv6_rvct.inc + INCLUDE qdrawhelper_armv6_rvct.inc ;----------------------------------------------------------------------------- ; qt_blend_rgb32_on_rgb32_arm -; -; @brief +; +; @brief ; ; @param dest Destination pixels (r0) ; @param dbpl Destination bytes per line (r1) @@ -69,25 +69,25 @@ ; @param w Width (s0 -> r4) ; @param h Height (s1 -> r5) ; @param const_alpha Constant alpha (s2 -> r6) -; +; ;--------------------------------------------------------------------------- qt_blend_rgb32_on_rgb32_armv6 Function stmfd sp!, {r4-r12, r14} - + ; read arguments off the stack add r8, sp, #10 * 4 ldmia r8, {r9-r11} - + ; Reorganize registers - + mov r4, r10 mov r5, r1 mov r6, r3 - + mov r1, r2 mov r2, r9 mov r3, r11 - + ; Now we have registers ; @param dest Destination pixels (r0) ; @param src Source pixels (r1) @@ -96,53 +96,53 @@ qt_blend_rgb32_on_rgb32_armv6 Function ; @param h Height (r4) ; @param dbpl Destination bytes per line (r5) ; @param sbpl Source bytes per line (r6) - + cmp r3, #256 ; test if we have fully opaque constant alpha value bne rgb32_blend_const_alpha ; branch if not - + rgb32_blend_loop subs r4, r4, #1 bmi rgb32_blend_exit ; while(h--) - -rgb321 PixCpySafe r0, r1, r2 + +rgb321 PixCpySafe r0, r1, r2 add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl + add r1, r1, r6 ; src = src + sbpl + + b rgb32_blend_loop + - b rgb32_blend_loop - - rgb32_blend_const_alpha ;ldr r14, =ComponentHalf ; load 0x800080 to r14 mov r14, #0x800000 add r14, r14, #0x80 - + sub r3, r3, #1 ; const_alpha -= 1; rgb32_blend_loop_const_alpha subs r4, r4, #1 bmi rgb32_blend_exit ; while(h--) - + rgb322 BlendRowSafe PixelSourceOverConstAlpha add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl + add r1, r1, r6 ; src = src + sbpl b rgb32_blend_loop_const_alpha - -rgb32_blend_exit - + +rgb32_blend_exit + ldmfd sp!, {r4-r12, pc} ; pop and return - - - + + + ;----------------------------------------------------------------------------- ; qt_blend_argb32_on_argb32_arm -; -; @brief +; +; @brief ; ; @param dest Destination pixels (r0) ; @param dbpl Destination bytes per line (r1) @@ -151,25 +151,25 @@ rgb32_blend_exit ; @param w Width (s0 -> r4) ; @param h Height (s1 -> r5) ; @param const_alpha Constant alpha (s2 -> r6) -; +; ;--------------------------------------------------------------------------- qt_blend_argb32_on_argb32_armv6 Function stmfd sp!, {r4-r12, r14} - + ; read arguments off the stack add r8, sp, #10 * 4 ldmia r8, {r9-r11} - + ; Reorganize registers - + mov r4, r10 mov r5, r1 mov r6, r3 - + mov r1, r2 mov r2, r9 mov r3, r11 - + ; Now we have registers ; @param dest Destination pixels (r0) ; @param src Source pixels (r1) @@ -178,14 +178,14 @@ qt_blend_argb32_on_argb32_armv6 Function ; @param h Height (r4) ; @param dbpl Destination bytes per line (r5) ; @param sbpl Source bytes per line (r6) - + ;ldr r14, =ComponentHalf ; load 0x800080 to r14 mov r14, #0x800000 add r14, r14, #0x80 - + cmp r3, #256 ; test if we have fully opaque constant alpha value bne argb32_blend_const_alpha ; branch if not - + argb32_blend_loop subs r4, r4, #1 @@ -194,10 +194,10 @@ argb32_blend_loop argb321 BlendRowSafe PixelSourceOver add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl + add r1, r1, r6 ; src = src + sbpl b argb32_blend_loop - + argb32_blend_const_alpha sub r3, r3, #1 ; const_alpha -= 1; @@ -206,18 +206,17 @@ argb32_blend_loop_const_alpha subs r4, r4, #1 bmi argb32_blend_exit ; while(h--) - + argb322 BlendRowSafe PixelSourceOverConstAlpha add r0, r0, r5 ; dest = dest + dbpl - add r1, r1, r6 ; src = src + sbpl + add r1, r1, r6 ; src = src + sbpl b argb32_blend_loop_const_alpha - -argb32_blend_exit - + +argb32_blend_exit + ldmfd sp!, {r4-r12, pc} ; pop and return - - + + END ; File end - diff --git a/src/gui/painting/qcolormap_s60.cpp b/src/gui/painting/qcolormap_s60.cpp index 1b58598..29d340f 100644 --- a/src/gui/painting/qcolormap_s60.cpp +++ b/src/gui/painting/qcolormap_s60.cpp @@ -105,4 +105,3 @@ QColormap &QColormap::operator=(const QColormap &colormap) { qAtomicAssign(d, colormap.d); return *this; } QT_END_NAMESPACE - diff --git a/src/gui/painting/qdrawhelper_armv6_rvct.inc b/src/gui/painting/qdrawhelper_armv6_rvct.inc index b3e0605..1cb316a 100644 --- a/src/gui/painting/qdrawhelper_armv6_rvct.inc +++ b/src/gui/painting/qdrawhelper_armv6_rvct.inc @@ -52,10 +52,10 @@ ;----------------------------------------------------------------------------- ; Globals. -; Earch marcro expects that caller has loaded 0x800080 to r14. +; Earch marcro expects that caller has loaded 0x800080 to r14. ;----------------------------------------------------------------------------- -ComponentHalf EQU 0x800080 +ComponentHalf EQU 0x800080 ;----------------------------------------------------------------------------- ; ARM assembly implementations of accelerated graphics operations. @@ -65,7 +65,7 @@ ComponentHalf EQU 0x800080 ; - r0 = Target buffer pointer ; - r1 = Source buffer pointer ; - r2 = Length of the buffer to blend -; - r3 = Constant alpha for source buffer +; - r3 = Constant alpha for source buffer ; ;----------------------------------------------------------------------------- @@ -78,8 +78,8 @@ $func Function CODE32 $func MEND - - + + ;----------------------------------------------------------------------------- ; Armv6 boosted implementation of BYTE_MUL(...) function found in qdrawhelper_p.h. ; @@ -98,29 +98,29 @@ $func ; uint r8 = (x & 0xff00ff) * a + 0x800080 uxtb16 r8, $x ; r8 = r8 & 0x00FF00FF mla r8, r8, $a, r14 - + ; x = ((r >> 8) & 0xff00ff) * a + 0x800080 uxtb16 $x, $x, ror #8 mla $x, $x, $a, r14 - + ; r8 = (r8 + ((r8 >> 8) & 0xff00ff) ) >> 8 ; r8 &= 0xff00ff uxtab16 r8, r8, r8, ror #8 uxtb16 r8, r8, ror #8 - + ; x = x + ((x >>8) & 0xff00ff) uxtab16 $x, $x, $x, ror #8 - + ; x &= 0xff00ff00 ; x |= r8 uxtb16 $x, $x, ror #8 orr $dst, r8, $x, lsl #8 - + MEND - + ;----------------------------------------------------------------------------- -; Armv6 boosted implementation of INTERPOLATE_PIXEL_255(...) function found in +; Armv6 boosted implementation of INTERPOLATE_PIXEL_255(...) function found in ; qdrawhelper_p.h. ; ; @param dst Destination register where to store the result @@ -129,7 +129,7 @@ $func ; @param y Second value to multiply ; @param b Multiplicator byte for second value ; @param r14 Component half 0x800080 -; +; ; ; @note Trashes x, r8, r14 ;----------------------------------------------------------------------------- @@ -143,40 +143,40 @@ $func ; uint r8 = (((x & 0xff00ff) * a) + 0x800080) uxtb16 r8, $x ; r8 = r8 & 0x00FF00FF mla r8, r8, $a, r14 - + ; x = ((((x >> 8) & 0xff00ff) * a) + 0x800080) uxtb16 $x, $x, ror #8 mla $x, $x, $a, r14 - + ; Now we are trashing r14 to free it for other purposes - + ; uint r14 = (y & 0xff00ff) * b uxtb16 r14, $y ; r14 = y & 0x00FF00FF mul r14, r14, $b - + ; r8 = r8 + r14 add r8, r8, r14 - + ; r8 = (r8 + ((r8 >> 8) & 0xff00ff) ) >> 8 ; r8 &= 0xff00ff uxtab16 r8, r8, r8, ror #8 uxtb16 r8, r8, ror #8 - + ; r14 = ((y >> 8) & 0xff00ff) * b uxtb16 r14, $y, ror #8 ; r14 = ((y >> 8) & 0xFF00FF) mul r14, r14, $b - + ; x = x + r14 add $x, $x, r14 - + ; x = x + ((x >>8) & 0xff00ff) uxtab16 $x, $x, $x, ror #8 - + ; x &= 0xff00ff00 ; x |= r8 uxtb16 $x, $x, ror #8 orr $dst, r8, $x, lsl #8 - + MEND ;----------------------------------------------------------------------------- @@ -184,19 +184,19 @@ $func ;----------------------------------------------------------------------------- MACRO $label Blend4Pixels $BlendPixel - - ; Blend first 4 pixels - + + ; Blend first 4 pixels + ldmia r1!, {r4-r7} ldm r0, {r9-r12} - + b4p1_$label $BlendPixel r9, r4, r3 b4p2_$label $BlendPixel r10, r5, r3 b4p3_$label $BlendPixel r11, r6, r3 b4p4_$label $BlendPixel r12, r7, r3 - + stmia r0!, {r9-r12} - + MEND ;----------------------------------------------------------------------------- @@ -204,43 +204,43 @@ b4p4_$label $BlendPixel r12, r7, r3 ;----------------------------------------------------------------------------- MACRO $label Blend8Pixels $BlendPixel - + b8p1_$label Blend4Pixels $BlendPixel -b8p2_$label Blend4Pixels $BlendPixel - +b8p2_$label Blend4Pixels $BlendPixel + MEND - + ;----------------------------------------------------------------------------- ; ;----------------------------------------------------------------------------- MACRO $label Blend16Pixels $BlendPixel - + b16p1_$label Blend8Pixels $BlendPixel -b16p2_$label Blend8Pixels $BlendPixel - +b16p2_$label Blend8Pixels $BlendPixel + MEND - + ;----------------------------------------------------------------------------- ; ;----------------------------------------------------------------------------- MACRO $label Blend32Pixels $BlendPixel - + b32p1_$label Blend16Pixels $BlendPixel -b32p2_$label Blend16Pixels $BlendPixel - +b32p2_$label Blend16Pixels $BlendPixel + MEND ;----------------------------------------------------------------------------- -; A macro for source over compositing one row of pixels and saving the results +; A macro for source over compositing one row of pixels and saving the results ; to destination buffer. ; ; @param dest Destination buffer (r0) ; @param src Source buffer (r1) ; @param length Length (r2) ; @param const_alpha Constant alpha (r3) -; @param r14 Component Half (0x800080) (r14) +; @param r14 Component Half (0x800080) (r14) ; ; @note Advances r0, r1 ; @note Trashes r2, r4-r12 @@ -260,73 +260,73 @@ brp1_$label Blend32Pixels $BlendPixel b bloop_$label b_remaining_$label - + ; Remaining 31 pixels - + addmi r2, r2, #32 ; Blend 16 pixels tst r2, #16 beq b_remaining8_$label - + brp2_$label Blend16Pixels $BlendPixel - -b_remaining8_$label - + +b_remaining8_$label + ; Blend 8 pixels tst r2, #8 beq b_remaining4_$label - -brp3_$label Blend8Pixels $BlendPixel - -b_remaining4_$label - + +brp3_$label Blend8Pixels $BlendPixel + +b_remaining4_$label + ; Blend 4 pixels tst r2, #4 beq b_remaining3_$label - -brp4_$label Blend4Pixels $BlendPixel + +brp4_$label Blend4Pixels $BlendPixel b_remaining3_$label ; Remaining 3 pixels - + tst r2, #2 beq b_last_$label - + ldmia r1!, {r4-r5} ldm r0, {r9-r10} - + brp5_$label $BlendPixel r9, r4, r3 brp6_$label $BlendPixel r10, r5, r3 - + stmia r0!, {r9-r10} b_last_$label - + tst r2, #1 beq bexit_$label - + ldr r4, [r1] ldr r9, [r0] bpl_$label $BlendPixel r9, r4, r3 - + str r9, [r0] bexit_$label MEND - + ;----------------------------------------------------------------------------- -; A macro for source over compositing one row of pixels and saving the results +; A macro for source over compositing one row of pixels and saving the results ; to destination buffer. Restores all registers. ; ; @param dest Destination buffer (r0) ; @param src Source buffer (r1) ; @param length Length (r2) ; @param const_alpha Constant alpha (r3) -; @param r14 Component Half (0x800080) (r14) +; @param r14 Component Half (0x800080) (r14) ; ; @note Advances r0, r1 ; @note Trashes r2, r4-r12 @@ -336,16 +336,16 @@ $label BlendRowSafe $BlendPixel stmfd sp!, {r0-r6} ; Preserves registers only up to r6 -brs_$label BlendRow $BlendPixel +brs_$label BlendRow $BlendPixel ldmfd sp!, {r0-r6} - MEND - + MEND + ;----------------------------------------------------------------------------- -; Pix Copy. -; NOTE! Cache line size of ARM1136JF-S and ARM1136J-S is 32 bytes (8 pixels). +; Pix Copy. +; NOTE! Cache line size of ARM1136JF-S and ARM1136J-S is 32 bytes (8 pixels). ; ; @param dst Destination pixels (r0) ; @param src Source pixels (r1) @@ -369,7 +369,7 @@ pcpy_loop_$label pcpy_remaining_$label ; Copy up to 7 remaining pixels - + ; Copy 4 pixels tst $len, #4 ldmneia $src!, {r3-r6} @@ -384,9 +384,9 @@ pcpy_remaining_$label strne r3, [$dst] MEND - + ;----------------------------------------------------------------------------- -; General Pix Copy. Maximum 8 pixels at time. Restores all registers. +; General Pix Copy. Maximum 8 pixels at time. Restores all registers. ; ; @param dst Destination pixels (r0) ; @param src Source pixels (r1) @@ -402,10 +402,10 @@ $label PixCpySafe $dst, $src, $len pcs_$label PixCpy $dst, $src, $len ldmfd sp!, {r0-r6} ; pop - + MEND - - + + ;----------------------------------------------------------------------------- ; A macro for source over compositing one pixel and saving the result to ; dst register. @@ -422,7 +422,7 @@ $label PixelSourceOver $dst, $src, $const_alpha ; Negate src and extract alpha mvn $const_alpha, $src ; bitwise not - uxtb $const_alpha, $const_alpha, ror #24 ; r3 = ((r3 & 0xFF000000) >> 24); + uxtb $const_alpha, $const_alpha, ror #24 ; r3 = ((r3 & 0xFF000000) >> 24); ;cmp $const_alpha, #255 ; test for full transparency ( negated ) ;beq exit_$label @@ -430,12 +430,12 @@ $label PixelSourceOver $dst, $src, $const_alpha moveq $dst, $src beq exit_$label - ByteMul $dst, $dst, $const_alpha + ByteMul $dst, $dst, $const_alpha add $dst, $src, $dst - + exit_$label MEND - + ;----------------------------------------------------------------------------- ; A macro for source over compositing one pixel and saving the result to ; dst register. @@ -457,7 +457,7 @@ $label PixelSourceOverConstAlpha $dst, $src, $const_alpha ; Negate src and extract alpha mvn $const_alpha, $src ; bitwise not - uxtb $const_alpha, $const_alpha, ror #24 ; r3 = ((r3 & 0xFF000000) >> 24); + uxtb $const_alpha, $const_alpha, ror #24 ; r3 = ((r3 & 0xFF000000) >> 24); ByteMul $dst, $dst, $const_alpha @@ -466,8 +466,8 @@ $label PixelSourceOverConstAlpha $dst, $src, $const_alpha ; recover alpha ldmfd sp!, {$const_alpha} - MEND - + MEND + ;----------------------------------------------------------------------------- ; A macro for source over compositing one pixel and saving the result to ; a register. @@ -491,6 +491,6 @@ $label PixelSourceConstAlpha $dst, $src, $const_alpha ; recover r2 and r14 ldmfd sp!, {r2, r14} - MEND - + MEND + END ; File end diff --git a/src/gui/painting/qdrawhelper_armv6_rvct.s b/src/gui/painting/qdrawhelper_armv6_rvct.s index 3ffe48b..dd29f80 100644 --- a/src/gui/painting/qdrawhelper_armv6_rvct.s +++ b/src/gui/painting/qdrawhelper_armv6_rvct.s @@ -52,22 +52,22 @@ ARM PRESERVE8 - + INCLUDE qdrawhelper_armv6_rvct.inc - + ;----------------------------------------------------------------------------- ; qt_memfill32_armv6 -; +; ; @brief Not yet in use! ; ; @param dest Destination buffer (r0) ; @param value Value (r1) ; @param count Count (r2) -; +; ;--------------------------------------------------------------------------- qt_memfill32_armv6 Function stmfd sp!, {r4-r12, r14} - + mov r3, r1 mov r4, r1 mov r5, r1 @@ -75,7 +75,7 @@ qt_memfill32_armv6 Function mov r7, r1 mov r8, r1 mov r9, r1 - + mfill_loop ; Fill 32 pixels per loop iteration subs r2, r2, #32 @@ -88,16 +88,16 @@ mfill_loop mfill_remaining ; Fill up to 31 remaining pixels - + ; Fill 16 pixels tst r2, #16 stmneia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} stmneia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} - + ; Fill 8 pixels tst r2, #8 stmneia r0!, {r1, r3, r4, r5, r6, r7, r8, r9} - + ; Fill 4 pixels tst r2, #4 stmneia r0!, {r1, r3, r4, r5} @@ -109,31 +109,31 @@ mfill_remaining ; Fill last one tst r2, #1 strne r1, [r0] - + ldmfd sp!, {r4-r12, pc} ; pop and return - + ;----------------------------------------------------------------------------- ; comp_func_Source_arm -; -; @brief +; +; @brief ; ; @param dest Destination buffer (r0) ; @param src Source buffer (r1) ; @param length Length (r2) ; @param const_alpha Constant alpha (r3) -; +; ;--------------------------------------------------------------------------- comp_func_Source_armv6 Function stmfd sp!, {r4-r12, r14} - + cmp r3, #255 ; if(r3 == 255) bne src2 ; branch if not - + src1 PixCpy r0, r1, r2 ldmfd sp!, {r4-r12, pc} ; pop and return -src2 +src2 ;ldr r14, =ComponentHalf ; load 0x800080 to r14 mov r14, #0x800000 add r14, r14, #0x80 @@ -144,35 +144,34 @@ src22 BlendRow PixelSourceConstAlpha ;----------------------------------------------------------------------------- ; comp_func_SourceOver_arm -; -; @brief +; +; @brief ; ; @param dest Destination buffer (r0) ; @param src Source buffer (r1) ; @param length Length (r2) ; @param const_alpha Constant alpha (r3) -; +; ;--------------------------------------------------------------------------- comp_func_SourceOver_armv6 Function stmfd sp!, {r4-r12, r14} - + ;ldr r14, =ComponentHalf ; load 0x800080 to r14 mov r14, #0x800000 add r14, r14, #0x80 - + cmp r3, #255 ; if(r3 == 255) bne srcovr2 ; branch if not - + srcovr1 BlendRow PixelSourceOver - + ldmfd sp!, {r4-r12, pc} ; pop and return srcovr2 - + srcovr22 BlendRow PixelSourceOverConstAlpha ldmfd sp!, {r4-r12, pc} ; pop and return - - END ; File end - + + END ; File end diff --git a/src/gui/painting/qwindowsurface_s60_p.h b/src/gui/painting/qwindowsurface_s60_p.h index 40a866d..6a31ced 100644 --- a/src/gui/painting/qwindowsurface_s60_p.h +++ b/src/gui/painting/qwindowsurface_s60_p.h @@ -81,7 +81,7 @@ public: static void unlockBitmapHeap(); CFbsBitmap *symbianBitmap() const; - + private: void updatePaintDeviceOnBitmap(); diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 888a6ed..0277d2f 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -280,7 +280,7 @@ void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter, break; case SE_Editor: drawFrame(SF_Editor, painter, rect, flags | SF_PointNorth); - break; + break; default: break; } @@ -796,12 +796,12 @@ void QS60StylePrivate::setThemePaletteHash(QPalette *palette) const s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0)); QApplication::setPalette(widgetPalette, "QTextEdit"); widgetPalette = *palette; - + widgetPalette.setColor(QPalette::All, QPalette::HighlightedText, s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0)); QApplication::setPalette(widgetPalette, "QComboBox"); widgetPalette = *palette; - + widgetPalette.setColor(QPalette::WindowText, mainAreaTextColor); widgetPalette.setColor(QPalette::Button, QApplication::palette().color(QPalette::Button)); widgetPalette.setColor(QPalette::Dark, mainAreaTextColor.darker()); diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index 2eb40de..4bf8143 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -270,7 +270,7 @@ public: SP_QsnFrButtonSideBInactive, SP_QsnFrButtonSideLInactive, SP_QsnFrButtonSideRInactive, - SP_QsnFrButtonCenterInactive, + SP_QsnFrButtonCenterInactive, SP_QsnFrNotepadCornerTl, SP_QsnFrNotepadCornerTr, SP_QsnFrNotepadCornerBl, diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 81ee8b1..f304d14 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -80,7 +80,7 @@ enum TSupportRelease { ES60_5_1 = 0x0008, ES60_5_2 = 0x0010, // Add all new releases here - ES60_AllReleases = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 + ES60_AllReleases = ES60_3_1 | ES60_3_2 | ES60_5_0 | ES60_5_1 | ES60_5_2 }; typedef struct { @@ -317,7 +317,7 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QsnFrButtonSideBInactive */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b6}, /* SP_QsnFrButtonSideLInactive */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b7}, /* SP_QsnFrButtonSideRInactive */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b8}, - /* SP_QsnFrButtonCenterInactive */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b9}, + /* SP_QsnFrButtonCenterInactive */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b9}, /* SP_QsnFrNotepadCornerTl */ {KAknsIIDQsnFrNotepadContCornerTl, ENoDraw, ES60_AllReleases, -1,-1}, /* SP_QsnFrNotepadCornerTr */ {KAknsIIDQsnFrNotepadContCornerTr, ENoDraw, ES60_AllReleases, -1,-1}, diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 6838d17..8176009 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -69,7 +69,7 @@ QFileInfoList alternativeFilePaths(const QString &path, const QStringList &nameF const QString zDriveString("Z:/"); driveStrings.removeAll(zDriveString); driveStrings.prepend(zDriveString); - + QStringList uniqueFileNameList; for (int i = driveStrings.count() - 1; i >= 0; --i) { const QDir dirOnDrive(driveStrings.at(i) + path); @@ -393,7 +393,7 @@ void QFontDatabase::load(const QFontPrivate *d, int script) { QFontEngine *fe = 0; QFontDef req = d->request; - + if (!d->engineData) { const QFontCache::Key key(cleanedFontDef(req), script); getEngineData(d, key); diff --git a/src/gui/util/qdesktopservices.cpp b/src/gui/util/qdesktopservices.cpp index eb2d92e..18a0a73 100644 --- a/src/gui/util/qdesktopservices.cpp +++ b/src/gui/util/qdesktopservices.cpp @@ -287,10 +287,10 @@ void QDesktopServices::unsetUrlHandler(const QString &scheme) \note The storage location returned can be a directory that does not exist; i.e., it may need to be created by the system or the user. - + \note On Symbian OS, DataLocation and ApplicationsLocation always point to appropriate folder on same drive with executable. FontsLocation always points to folder on ROM drive. - Rest of the standard locations point to folder on same drive with executable, except + Rest of the standard locations point to folder on same drive with executable, except that if executable is in ROM the folder from C drive is returned. \note On Mac OS X, DataLocation does not include QCoreApplication::organizationName. diff --git a/src/gui/util/qdesktopservices_s60.cpp b/src/gui/util/qdesktopservices_s60.cpp index 567b4ee..565dd6e 100644 --- a/src/gui/util/qdesktopservices_s60.cpp +++ b/src/gui/util/qdesktopservices_s60.cpp @@ -113,9 +113,9 @@ static void handleMailtoSchemeLX(const QUrl &url) QStringList bccs = bcc.split(",", QString::SkipEmptyParts); - RSendAs sendAs; - User::LeaveIfError(sendAs.Connect()); - QAutoClose<RSendAs> sendAsCleanup(sendAs); + RSendAs sendAs; + User::LeaveIfError(sendAs.Connect()); + QAutoClose<RSendAs> sendAsCleanup(sendAs); CSendAsAccounts* accounts = CSendAsAccounts::NewL(); @@ -124,43 +124,43 @@ static void handleMailtoSchemeLX(const QUrl &url) TInt count = accounts->Count(); CleanupStack::PopAndDestroy(accounts); - if(!count) { + if(!count) { // TODO: we should try to create account if count == 0 // CSendUi would provide account creation service for us, but it requires ridicilous // capabilities: LocalServices NetworkServices ReadDeviceData ReadUserData WriteDeviceData WriteUserData - User::Leave(KErrNotSupported); - } else { - RSendAsMessage sendAsMessage; + User::Leave(KErrNotSupported); + } else { + RSendAsMessage sendAsMessage; sendAsMessage.CreateL(sendAs, KUidMsgTypeSMTP); QAutoClose<RSendAsMessage> sendAsMessageCleanup(sendAsMessage); - - + + // Subject sendAsMessage.SetSubjectL(qt_QString2TPtrC(subject)); - + // Body sendAsMessage.SetBodyTextL(qt_QString2TPtrC(body)); - + // To foreach(QString item, recipients) sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientTo ); - + foreach(QString item, tos) sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientTo ); - + // Cc foreach(QString item, ccs) sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientCc ); - + // Bcc foreach(QString item, bccs) sendAsMessage.AddRecipientL(qt_QString2TPtrC(item), RSendAsMessage::ESendAsRecipientBcc ); - + // send the message sendAsMessage.LaunchEditorAndCloseL(); // sendAsMessage is already closed sendAsMessageCleanup.Forget(); - } + } } static bool handleMailtoScheme(const QUrl &url) @@ -172,9 +172,9 @@ static bool handleMailtoScheme(const QUrl &url) static void handleOtherSchemesL(const TDesC& aUrl) { // Other schemes are at the moment passed to WEB browser - HBufC* buf16 = HBufC::NewLC( aUrl.Length() + KBrowserPrefix.iTypeLength ); - buf16->Des().Copy( KBrowserPrefix ); // Prefix used to launch correct browser view - buf16->Des().Append( aUrl ); + HBufC* buf16 = HBufC::NewLC( aUrl.Length() + KBrowserPrefix.iTypeLength ); + buf16->Des().Copy( KBrowserPrefix ); // Prefix used to launch correct browser view + buf16->Des().Append( aUrl ); TApaTaskList taskList( CEikonEnv::Static()->WsSession() ); TApaTask task = taskList.FindApp( KUidBrowser ); @@ -189,12 +189,12 @@ static void handleOtherSchemesL(const TDesC& aUrl) else { // Start a new browser instance - RApaLsSession appArcSession; - User::LeaveIfError( appArcSession.Connect() ); - CleanupClosePushL<RApaLsSession>( appArcSession ); - TThreadId id; + RApaLsSession appArcSession; + User::LeaveIfError( appArcSession.Connect() ); + CleanupClosePushL<RApaLsSession>( appArcSession ); + TThreadId id; appArcSession.StartDocument( *buf16, KUidBrowser , id ); - CleanupStack::PopAndDestroy(); // appArcSession + CleanupStack::PopAndDestroy(); // appArcSession } CleanupStack::PopAndDestroy( buf16 ); @@ -255,8 +255,8 @@ static void openDocumentL(const TDesC& aUrl) { #ifndef USE_DOCUMENTHANDLER // Start app associated to file MIME type by using RApaLsSession - // Apparc base method cannot be used to open app in embedded mode, - // but seems to be most stable way at the moment + // Apparc base method cannot be used to open app in embedded mode, + // but seems to be most stable way at the moment RApaLsSession appArcSession; User::LeaveIfError( appArcSession.Connect() ); CleanupClosePushL<RApaLsSession>( appArcSession ); @@ -264,25 +264,25 @@ static void openDocumentL(const TDesC& aUrl) // ESwitchFiles means do not start another instance // Leaves if file does not exist, leave is trapped in openDocument and false returned to user. User::LeaveIfError( appArcSession.StartDocument( aUrl, id, - RApaLsSession::ESwitchFiles ) ); // ELaunchNewApp + RApaLsSession::ESwitchFiles ) ); // ELaunchNewApp CleanupStack::PopAndDestroy(); // appArcSession #else // This is an alternative way to launch app associated to MIME type - // CDocumentHandler would support opening apps in embedded mode, - // but our Qt application window group seems to always get switched on top of embedded one - // -> Cannot use menus etc of embedded app -> used - - CDocumentHandler* docHandler = CDocumentHandler::NewLC(); - TDataType temp; - //Standalone file opening fails for some file-types at least in S60 3.1 emulator - //For example .txt file fails with KErrAlreadyInUse and music files with KERN-EXEC 0 - //Workaround is to use OpenFileEmbeddedL - //docHandler->OpenFileL(aUrl, temp); - - // Opening file with CDocumentHandler will leave if file does not exist - // Leave is trapped in openDocument and false returned to user. - docHandler->OpenFileEmbeddedL(aUrl, temp); - CleanupStack::PopAndDestroy(docHandler); + // CDocumentHandler would support opening apps in embedded mode, + // but our Qt application window group seems to always get switched on top of embedded one + // -> Cannot use menus etc of embedded app -> used + + CDocumentHandler* docHandler = CDocumentHandler::NewLC(); + TDataType temp; + //Standalone file opening fails for some file-types at least in S60 3.1 emulator + //For example .txt file fails with KErrAlreadyInUse and music files with KERN-EXEC 0 + //Workaround is to use OpenFileEmbeddedL + //docHandler->OpenFileL(aUrl, temp); + + // Opening file with CDocumentHandler will leave if file does not exist + // Leave is trapped in openDocument and false returned to user. + docHandler->OpenFileEmbeddedL(aUrl, temp); + CleanupStack::PopAndDestroy(docHandler); #endif } @@ -295,8 +295,8 @@ static void openDocumentL(const TDesC& aUrl) // wide range of schemes and is extensible by plugins static bool handleUrl(const QUrl &url) { - if (!url.isValid()) - return false; + if (!url.isValid()) + return false; QString urlString(url.toString()); TPtrC urlPtr(qt_QString2TPtrC(urlString)); @@ -313,12 +313,12 @@ static void handleUrlL(const TDesC& aUrl) } static bool launchWebBrowser(const QUrl &url) { - return handleUrl(url); + return handleUrl(url); } static bool openDocument(const QUrl &file) { - return handleUrl(url); + return handleUrl(url); } #endif @@ -391,7 +391,7 @@ QString QDesktopServices::storageLocation(StandardLocation type) //return QDir::homePath(); break; break; case DataLocation: - CEikonEnv::Static()->FsSession().PrivatePath( path ); + CEikonEnv::Static()->FsSession().PrivatePath( path ); // TODO: Should we actually return phone mem if data is on ROM? path.Insert( 0, exeDrive().Name() ); break; diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index 5207cc6..1b21b71 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -87,7 +87,7 @@ bool menuExists() { QWidget *w = qApp->activeWindow(); QMenuBarPrivate *mb = menubars()->value(w); - if ((!mb) && !menubars()->count()) + if ((!mb) && !menubars()->count()) return false; return true; } @@ -196,7 +196,7 @@ static void qt_symbian_insert_action(QSymbianMenuAction* action, QList<SymbianMe if (!action->action->isEnabled()){ menuItem->menuItemData.iFlags += EEikMenuItemDimmed; } - + if (action->action->isCheckable()) { if (action->action->isChecked()) menuItem->menuItemData.iFlags += EEikMenuItemCheckBox | EEikMenuItemSymbolOn; @@ -244,7 +244,7 @@ Q_GUI_EXPORT void qt_symbian_show_toplevel( CEikMenuPane* menuPane) return; rebuildMenu(); for (int i = 0; i < symbianMenus.count(); ++i) - QT_TRAP_THROWING(menuPane->AddMenuItemL(symbianMenus.at(i)->menuItemData)); + QT_TRAP_THROWING(menuPane->AddMenuItemL(symbianMenus.at(i)->menuItemData)); } Q_GUI_EXPORT void qt_symbian_show_submenu( CEikMenuPane* menuPane, int id) @@ -252,7 +252,7 @@ Q_GUI_EXPORT void qt_symbian_show_submenu( CEikMenuPane* menuPane, int id) SymbianMenuItem* menu = qt_symbian_find_menu(id, symbianMenus); if (menu) { for (int i = 0; i < menu->children.count(); ++i) - QT_TRAP_THROWING(menuPane->AddMenuItemL(menu->children.at(i)->menuItemData)); + QT_TRAP_THROWING(menuPane->AddMenuItemL(menu->children.at(i)->menuItemData)); } } @@ -262,7 +262,7 @@ void QMenuBarPrivate::symbianCommands(int command) QContextMenuEvent* event = new QContextMenuEvent(QContextMenuEvent::Keyboard, QPoint(0,0)); QCoreApplication::postEvent(widgetWithContextMenu, event); } - + int size = nativeMenuBars.size(); for (int i = 0; i < nativeMenuBars.size(); ++i) { SymbianMenuItem* menu = qt_symbian_find_menu_item(command, symbianMenus); diff --git a/src/network/kernel/qnetworkinterface_symbian.cpp b/src/network/kernel/qnetworkinterface_symbian.cpp index bec2dc3..f2ded36 100644 --- a/src/network/kernel/qnetworkinterface_symbian.cpp +++ b/src/network/kernel/qnetworkinterface_symbian.cpp @@ -41,12 +41,8 @@ //#define QNETWORKINTERFACE_DEBUG -//#include "qset.h" #include "qnetworkinterface.h" #include "qnetworkinterface_p.h" -//#include <private/qnativesocketengine_p.h> -//#include "qalgorithms.h" - #ifndef QT_NO_NETWORKINTERFACE @@ -54,57 +50,49 @@ #include <in_iface.h> #include <es_sock.h> -//#include <sys/types.h> -//#include <sys/socket.h> -//#include <errno.h> -//#include <net/if.h> -//#include <qplatformdefs.h> - QT_BEGIN_NAMESPACE -static QNetworkInterface::InterfaceFlags convertFlags( const TSoInetInterfaceInfo& aInfo ) +static QNetworkInterface::InterfaceFlags convertFlags(const TSoInetInterfaceInfo& aInfo) { QNetworkInterface::InterfaceFlags flags = 0; flags |= (aInfo.iState == EIfUp) ? QNetworkInterface::IsUp : QNetworkInterface::InterfaceFlag(0); // We do not have separate flag for running in Symbian OS flags |= (aInfo.iState == EIfUp) ? QNetworkInterface::IsRunning : QNetworkInterface::InterfaceFlag(0); - flags |= (aInfo.iFeatures&KIfCanBroadcast) ? QNetworkInterface::CanBroadcast : QNetworkInterface::InterfaceFlag(0); - flags |= (aInfo.iFeatures&KIfIsLoopback) ? QNetworkInterface::IsLoopBack : QNetworkInterface::InterfaceFlag(0); - flags |= (aInfo.iFeatures&KIfIsPointToPoint) ? QNetworkInterface::IsPointToPoint : QNetworkInterface::InterfaceFlag(0); - flags |= (aInfo.iFeatures&KIfCanMulticast) ? QNetworkInterface::CanMulticast : QNetworkInterface::InterfaceFlag(0); + flags |= (aInfo.iFeatures & KIfCanBroadcast) ? QNetworkInterface::CanBroadcast : QNetworkInterface::InterfaceFlag(0); + flags |= (aInfo.iFeatures & KIfIsLoopback) ? QNetworkInterface::IsLoopBack : QNetworkInterface::InterfaceFlag(0); + flags |= (aInfo.iFeatures & KIfIsPointToPoint) ? QNetworkInterface::IsPointToPoint : QNetworkInterface::InterfaceFlag(0); + flags |= (aInfo.iFeatures & KIfCanMulticast) ? QNetworkInterface::CanMulticast : QNetworkInterface::InterfaceFlag(0); return flags; } -QString qstringFromDesc( const TDesC& aData ) +QString qstringFromDesc(const TDesC& aData) { return QString::fromUtf16(aData.Ptr(), aData.Length()); } static QList<QNetworkInterfacePrivate *> interfaceListing() { - TInt err( KErrNone ); + TInt err(KErrNone); QList<QNetworkInterfacePrivate *> interfaces; // Connect to Native socket server RSocketServ socketServ; err = socketServ.Connect(); - if( err ) + if (err) return interfaces; // Open dummy socket for interface queries RSocket socket; - err = socket.Open( socketServ, _L("udp")); - if( err ) - { + err = socket.Open(socketServ, _L("udp")); + if (err) { socketServ.Close(); return interfaces; } // Ask socket to start enumerating interfaces - err = socket.SetOpt( KSoInetEnumInterfaces, KSolInetIfCtrl ); - if( err ) - { + err = socket.SetOpt(KSoInetEnumInterfaces, KSolInetIfCtrl); + if (err) { socket.Close(); socketServ.Close(); return interfaces; @@ -113,11 +101,9 @@ static QList<QNetworkInterfacePrivate *> interfaceListing() int ifindex = 0; TPckgBuf<TSoInetInterfaceInfo> infoPckg; TSoInetInterfaceInfo &info = infoPckg(); - while( socket.GetOpt(KSoInetNextInterface, KSolInetIfCtrl, infoPckg) == KErrNone ) - { + while (socket.GetOpt(KSoInetNextInterface, KSolInetIfCtrl, infoPckg) == KErrNone) { // Do not include IPv6 addresses because netmask and broadcast address cannot be determined correctly - if( info.iName != KNullDesC && info.iAddress.IsV4Mapped() ) - { + if (info.iName != KNullDesC && info.iAddress.IsV4Mapped()) { TName address; QNetworkAddressEntry entry; QNetworkInterfacePrivate *iface = 0; @@ -125,51 +111,48 @@ static QList<QNetworkInterfacePrivate *> interfaceListing() iface = new QNetworkInterfacePrivate; iface->index = ifindex++; interfaces << iface; - iface->name = qstringFromDesc( info.iName ); - iface->flags = convertFlags( info ); + iface->name = qstringFromDesc(info.iName); + iface->flags = convertFlags(info); - if( /*info.iFeatures&KIfHasHardwareAddr &&*/ info.iHwAddr.Family() != KAFUnspec ) - { - for ( TInt i = sizeof(SSockAddr); i < sizeof(SSockAddr) + info.iHwAddr.GetUserLen(); i++ ) - { + if (/*info.iFeatures&KIfHasHardwareAddr &&*/ info.iHwAddr.Family() != KAFUnspec) { + for (TInt i = sizeof(SSockAddr); i < sizeof(SSockAddr) + info.iHwAddr.GetUserLen(); i++) { address.AppendNumFixedWidth(info.iHwAddr[i], EHex, 2); - if( ( i + 1) < sizeof(SSockAddr) + info.iHwAddr.GetUserLen() ) - address.Append( _L(":") ); + if ((i + 1) < sizeof(SSockAddr) + info.iHwAddr.GetUserLen()) + address.Append(_L(":")); } address.UpperCase(); - iface->hardwareAddress = qstringFromDesc( address ); + iface->hardwareAddress = qstringFromDesc(address); } // Get the address of the interface info.iAddress.Output(address); - entry.setIp( QHostAddress( qstringFromDesc( address ) ) ); + entry.setIp(QHostAddress(qstringFromDesc(address))); // Get the interface netmask - // TODO: For some reason netmask is always 0.0.0.0 - //info.iNetMask.Output(address); - //entry.setNetmask( QHostAddress( qstringFromDesc( address ) ) ); + // For some reason netmask is always 0.0.0.0 + // info.iNetMask.Output(address); + // entry.setNetmask( QHostAddress( qstringFromDesc( address ) ) ); // Workaround: Let Symbian determine netmask based on IP address class - // TODO: works only for IPv4 + // TODO: Works only for IPv4 - Task: 259128 Implement IPv6 support TInetAddr netmask; - netmask.NetMask( info.iAddress ); + netmask.NetMask(info.iAddress); netmask.Output(address); - entry.setNetmask( QHostAddress( qstringFromDesc( address ) ) ); + entry.setNetmask(QHostAddress(qstringFromDesc(address))); // Get the interface broadcast address - if (iface->flags & QNetworkInterface::CanBroadcast) - { + if (iface->flags & QNetworkInterface::CanBroadcast) { // For some reason broadcast address is always 0.0.0.0 // info.iBrdAddr.Output(address); // entry.setBroadcast( QHostAddress( qstringFromDesc( address ) ) ); // Workaround: Let Symbian determine broadcast address based on IP address - // TODO: works only for IPv4 + // TODO: Works only for IPv4 - Task: 259128 Implement IPv6 support TInetAddr broadcast; - broadcast.NetBroadcast( info.iAddress ); + broadcast.NetBroadcast(info.iAddress); broadcast.Output(address); - entry.setBroadcast( QHostAddress( qstringFromDesc( address ) ) ); - } + entry.setBroadcast(QHostAddress(qstringFromDesc(address))); + } // Add new entry to interface address entries iface->addressEntries << entry; @@ -180,11 +163,11 @@ static QList<QNetworkInterfacePrivate *> interfaceListing() IsLoopBack = %d, IsPointToPoint = %d, CanMulticast = %d, \n\ ip = %s, netmask = %s, broadcast = %s,\n\ hwaddress = %s", - iface->name.toLatin1().constData(), - iface->flags & QNetworkInterface::IsUp, iface->flags & QNetworkInterface::IsRunning, iface->flags & QNetworkInterface::CanBroadcast, - iface->flags & QNetworkInterface::IsLoopBack, iface->flags & QNetworkInterface::IsPointToPoint, iface->flags & QNetworkInterface::CanMulticast, - entry.ip().toString().toLatin1().constData(), entry.netmask().toString().toLatin1().constData(), entry.broadcast().toString().toLatin1().constData(), - iface->hardwareAddress.toLatin1().constData()); + iface->name.toLatin1().constData(), + iface->flags & QNetworkInterface::IsUp, iface->flags & QNetworkInterface::IsRunning, iface->flags & QNetworkInterface::CanBroadcast, + iface->flags & QNetworkInterface::IsLoopBack, iface->flags & QNetworkInterface::IsPointToPoint, iface->flags & QNetworkInterface::CanMulticast, + entry.ip().toString().toLatin1().constData(), entry.netmask().toString().toLatin1().constData(), entry.broadcast().toString().toLatin1().constData(), + iface->hardwareAddress.toLatin1().constData()); #endif } } @@ -195,8 +178,7 @@ static QList<QNetworkInterfacePrivate *> interfaceListing() // use dummy socket to start enumerating routes err = socket.SetOpt(KSoInetEnumRoutes, KSolInetRtCtrl); - if( err ) - { + if (err) { socket.Close(); socketServ.Close(); // return what we have @@ -206,29 +188,28 @@ static QList<QNetworkInterfacePrivate *> interfaceListing() TSoInetRouteInfo routeInfo; TPckg<TSoInetRouteInfo> routeInfoPkg(routeInfo); - while(socket.GetOpt(KSoInetNextRoute, KSolInetRtCtrl, routeInfoPkg) == KErrNone) - { + while (socket.GetOpt(KSoInetNextRoute, KSolInetRtCtrl, routeInfoPkg) == KErrNone) { TName address; // get interface address routeInfo.iIfAddr.Output(address); QHostAddress ifAddr(qstringFromDesc(address)); - if(ifAddr.isNull()) + if (ifAddr.isNull()) continue; routeInfo.iDstAddr.Output(address); QHostAddress destination(qstringFromDesc(address)); - if(destination.isNull() || destination != ifAddr) + if (destination.isNull() || destination != ifAddr) continue; // search interfaces - for(int ifindex = 0; ifindex < interfaces.size(); ++ifindex) { + for (int ifindex = 0; ifindex < interfaces.size(); ++ifindex) { QNetworkInterfacePrivate *iface = interfaces.at(ifindex); - for(int eindex = 0; eindex < iface->addressEntries.size(); ++eindex) { + for (int eindex = 0; eindex < iface->addressEntries.size(); ++eindex) { QNetworkAddressEntry entry = iface->addressEntries.at(eindex); - if(entry.ip() != ifAddr) { + if (entry.ip() != ifAddr) { continue; - } else if(entry.ip().protocol() != QAbstractSocket::IPv4Protocol) { + } else if (entry.ip().protocol() != QAbstractSocket::IPv4Protocol) { // skip if not IPv4 address (e.g. IPv6) // as results not reliable on Symbian continue; @@ -240,9 +221,6 @@ static QList<QNetworkInterfacePrivate *> interfaceListing() // ::postProcess to have effect entry.setBroadcast(QHostAddress()); iface->addressEntries.replace(eindex, entry); -// printf("for %s netmask = %s and destination = %s ; type = %d; state = %d; metric = %d \n", -// ifAddr.toString().toLatin1().constData(), netmask.toString().toLatin1().constData(), destination.toString().toLatin1().constData(), -// routeInfo.iType, routeInfo.iState, routeInfo.iMetric); } } } diff --git a/src/plugins/qpluginbase.pri b/src/plugins/qpluginbase.pri index b14f839..10563c1 100644 --- a/src/plugins/qpluginbase.pri +++ b/src/plugins/qpluginbase.pri @@ -16,6 +16,6 @@ wince*:LIBS += $$QMAKE_LIBS_GUI symbian: { TARGET.EPOCALLOWDLLDATA=1 - TARGET.CAPABILITY = All -Tcb + TARGET.CAPABILITY = All -Tcb load(armcc_warnings) } diff --git a/src/plugins/s60/5_0/5_0.pro b/src/plugins/s60/5_0/5_0.pro index 878a466..d7c3cb2 100644 --- a/src/plugins/s60/5_0/5_0.pro +++ b/src/plugins/s60/5_0/5_0.pro @@ -8,7 +8,7 @@ contains(S60_VERSION, 3.1) { } else { SOURCES += ../src/qlocale_3_2.cpp \ ../src/qdesktopservices_3_2.cpp - LIBS += -ldirectorylocalizer + LIBS += -ldirectorylocalizer INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE } diff --git a/src/plugins/s60/bwins/qts60pluginu.def b/src/plugins/s60/bwins/qts60pluginu.def index 549f71f..a082262 100644 --- a/src/plugins/s60/bwins/qts60pluginu.def +++ b/src/plugins/s60/bwins/qts60pluginu.def @@ -4,4 +4,3 @@ EXPORTS ?defaultGetLongDateFormatSpec@@YA?AVTPtrC16@@AAVTExtendedLocale@@@Z @ 3 NONAME ; class TPtrC16 defaultGetLongDateFormatSpec(class TExtendedLocale &) ?defaultGetShortDateFormatSpec@@YA?AVTPtrC16@@AAVTExtendedLocale@@@Z @ 4 NONAME ; class TPtrC16 defaultGetShortDateFormatSpec(class TExtendedLocale &) ?localizedDirectoryName@@YA?AVQString@@AAV1@@Z @ 5 NONAME ; class QString localizedDirectoryName(class QString &) - diff --git a/src/plugins/s60/eabi/qts60pluginu.def b/src/plugins/s60/eabi/qts60pluginu.def index a433a5d..d768436 100644 --- a/src/plugins/s60/eabi/qts60pluginu.def +++ b/src/plugins/s60/eabi/qts60pluginu.def @@ -4,4 +4,3 @@ EXPORTS _Z28defaultGetLongDateFormatSpecR15TExtendedLocale @ 3 NONAME _Z29defaultGetShortDateFormatSpecR15TExtendedLocale @ 4 NONAME _Z22localizedDirectoryNameR7QString @ 5 NONAME - diff --git a/src/plugins/s60/s60pluginbase.pri b/src/plugins/s60/s60pluginbase.pri index 62100f9..0e11c7e 100644 --- a/src/plugins/s60/s60pluginbase.pri +++ b/src/plugins/s60/s60pluginbase.pri @@ -1,4 +1,4 @@ -# Note: These version based 'plugins' are not an actual Qt plugins, +# Note: These version based 'plugins' are not an actual Qt plugins, # they are just regular runtime loaded libraries include(../../qpluginbase.pri) diff --git a/src/plugins/s60/src/qdesktopservices_3_1.cpp b/src/plugins/s60/src/qdesktopservices_3_1.cpp index 0551a74..0f8e6a6 100644 --- a/src/plugins/s60/src/qdesktopservices_3_1.cpp +++ b/src/plugins/s60/src/qdesktopservices_3_1.cpp @@ -47,4 +47,3 @@ EXPORT_C QString localizedDirectoryName(QString&) qWarning("QDesktopServices::displayName() not implemented for this platform version"); return QString(); } - diff --git a/src/plugins/s60/src/qdesktopservices_3_2.cpp b/src/plugins/s60/src/qdesktopservices_3_2.cpp index f08799b..3708436 100644 --- a/src/plugins/s60/src/qdesktopservices_3_2.cpp +++ b/src/plugins/s60/src/qdesktopservices_3_2.cpp @@ -77,4 +77,3 @@ EXPORT_C QString localizedDirectoryName(QString& /* rawPath */) return QString(); } #endif - diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro index 0574341..4734144 100644 --- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro +++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro @@ -3,4 +3,3 @@ TEMPLATE = subdirs # We just want to extract the zip file containing sqlite binaries for Symbian BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip" - diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby index 8a0e03c..dc9ec43 100644 --- a/src/s60installs/qt.iby +++ b/src/s60installs/qt.iby @@ -5,7 +5,7 @@ // Dependancies for more than one module #include <base.iby> -#include <openenv.iby> // QtCore, QtGui, QtNetwork, QtOpenGL, QSvgIconEngine, +#include <openenv.iby> // QtCore, QtGui, QtNetwork, QtOpenGL, QSvgIconEngine, #include <cone.iby> // QtGui, QtOpenGL #include <stdcpp.iby> // for std C++ support diff --git a/src/s60installs/qt_libs.pro b/src/s60installs/qt_libs.pro index 369a74e..cb03a05 100644 --- a/src/s60installs/qt_libs.pro +++ b/src/s60installs/qt_libs.pro @@ -9,10 +9,10 @@ symbian: { TARGET.UID3 = 0x2001E61C VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} - qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main.rsc + qtresources.sources = $${EPOCROOT}$$HW_ZDIR$$APP_RESOURCE_DIR/s60main.rsc qtresources.path = $$APP_RESOURCE_DIR - qtlibraries.sources = \ + qtlibraries.sources = \ QtCore.dll \ QtXml.dll \ QtGui.dll \ @@ -23,21 +23,21 @@ symbian: { qts60plugin_3_1.dll \ qts60plugin_3_2.dll \ qts60plugin_5_0.dll - + # TODO: This should be conditional in PKG file, see commented code below # However we don't yet have such mechanism in place contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { - contains(CONFIG, system-sqlite): qtlibraries.sources += sqlite3.dll - } - + contains(CONFIG, system-sqlite): qtlibraries.sources += sqlite3.dll + } + #; EXISTS statement does not resolve !. Lets check the most common drives #IF NOT EXISTS("c:\sys\bin\sqlite3.dll") AND NOT EXISTS("e:\sys\bin\sqlite3.dll") AND NOT EXISTS("z:\sys\bin\sqlite3.dll") #"\Epoc32\release\armv5\UREL\sqlite3.dll"-"!:\sys\bin\sqlite3.dll" - #ENDIF + #ENDIF qtlibraries.path = /sys/bin - + vendorinfo = \ "; Localised Vendor name" \ "%{\"Nokia, Qt Software\"}" \ @@ -45,8 +45,8 @@ symbian: { "; Unique Vendor name" \ ":\"Nokia, Qt Software\"" \ " " - - + + qtlibraries.pkg_prerules = vendorinfo qtlibraries.pkg_prerules += "; Dependencies of Qt libraries" qtlibraries.pkg_prerules += "(0x20013851), 1, 5, 1, {\"PIPS Installer\"}" @@ -56,7 +56,7 @@ symbian: { contains(CONFIG, stl) { qtlibraries.pkg_prerules += "(0x2000F866), 1, 0, 0, {\"Standard C++ Library Common\"}" } - + !contains(QT_CONFIG, no-jpeg): imageformats_plugins.sources += qjpeg.dll !contains(QT_CONFIG, no-gif): imageformats_plugins.sources += qgif.dll !contains(QT_CONFIG, no-mng): imageformats_plugins.sources += qmng.dll @@ -66,10 +66,10 @@ symbian: { codecs_plugins.sources = qcncodecs.dll qjpcodecs.dll qtwcodecs.dll qkrcodecs.dll codecs_plugins.path = $$QT_PLUGINS_BASE_DIR/codecs - + DEPLOYMENT += qtresources qtlibraries imageformats_plugins codecs_plugins graphicssystems_plugins - contains(QT_CONFIG, svg): { + contains(QT_CONFIG, svg): { qtlibraries.sources += QtSvg.dll imageformats_plugins.sources += qsvg.dll iconengines_plugins.sources = qsvgicon.dll @@ -79,7 +79,7 @@ symbian: { contains(QT_CONFIG, phonon): { qtlibraries.sources += Phonon.dll - } + } graphicssystems_plugins.path = $$QT_PLUGINS_BASE_DIR/graphicssystems contains(QT_CONFIG, openvg) { diff --git a/src/s60main/qts60main.cpp b/src/s60main/qts60main.cpp index d7daf4a..67c20b7 100644 --- a/src/s60main/qts60main.cpp +++ b/src/s60main/qts60main.cpp @@ -48,16 +48,15 @@ * factory function to create the QtS60Main application class */ LOCAL_C CApaApplication* NewApplication() - { - return new CQtS60MainApplication; - } +{ + return new CQtS60MainApplication; +} /** * A normal Symbian OS executable provides an E32Main() function which is * called by the operating system to start the program. */ GLDEF_C TInt E32Main() - { - return EikStart::RunApplication( NewApplication ); - } - +{ + return EikStart::RunApplication(NewApplication); +} diff --git a/src/s60main/qts60main_mcrt0.cpp b/src/s60main/qts60main_mcrt0.cpp index 8631989..f591c89 100644 --- a/src/s60main/qts60main_mcrt0.cpp +++ b/src/s60main/qts60main_mcrt0.cpp @@ -51,13 +51,13 @@ #ifdef __ARMCC__ __asm int CallMain(int argc, char *argv[], char *envp[]) { - import main - code32 - b main + import main + code32 + b main } #define CALLMAIN(argc, argv, envp) CallMain(argc, argv, envp) #else -extern "C" int main (int argc, char *argv[], char *envp[]); +extern "C" int main(int argc, char *argv[], char *envp[]); #define CALLMAIN(argc, argv, envp) main(argc, argv, envp) #endif @@ -67,21 +67,21 @@ extern "C" GLDEF_C int __GccGlueInit() return 0; } -extern "C" IMPORT_C void exit (int ret); +extern "C" IMPORT_C void exit(int ret); GLDEF_C TInt QtMainWrapper() { - int argc=0; - char **argv=0; - char **envp=0; + int argc = 0; + char **argv = 0; + char **envp = 0; // get args & environment - __crt0(argc,argv,envp); + __crt0(argc, argv, envp); CleanupArrayDelete<char*>::PushL(argv); CleanupArrayDelete<char*>::PushL(envp); //Call user(application)'s main - int ret = 0; - QT_TRYCATCH_LEAVING( ret = CALLMAIN(argc, argv, envp); ); - CleanupStack::PopAndDestroy(2,argv); + int ret = 0; + QT_TRYCATCH_LEAVING(ret = CALLMAIN(argc, argv, envp);); + CleanupStack::PopAndDestroy(2, argv); return ret; } @@ -89,10 +89,10 @@ GLDEF_C TInt QtMainWrapper() #ifdef __GCC32__ /* stub function inserted into main() by GCC */ -extern "C" void __gccmain (void) {} +extern "C" void __gccmain(void) {} /* Default GCC entrypoint */ -extern "C" TInt _mainCRTStartup (void) +extern "C" TInt _mainCRTStartup(void) { extern TInt _E32Startup(); return _E32Startup(); diff --git a/src/s60main/qts60mainapplication.cpp b/src/s60main/qts60mainapplication.cpp index 2fada3d..9ad7f68 100644 --- a/src/s60main/qts60mainapplication.cpp +++ b/src/s60main/qts60mainapplication.cpp @@ -49,7 +49,7 @@ // ============================ MEMBER FUNCTIONS =============================== -_LIT( KQtWrapperResourceFile,"\\resource\\apps\\s60main.rsc" ); +_LIT(KQtWrapperResourceFile, "\\resource\\apps\\s60main.rsc"); // ----------------------------------------------------------------------------- // CQtS60MainApplication::CreateDocumentL() @@ -57,10 +57,10 @@ _LIT( KQtWrapperResourceFile,"\\resource\\apps\\s60main.rsc" ); // ----------------------------------------------------------------------------- // CApaDocument* CQtS60MainApplication::CreateDocumentL() - { +{ // Create an QtS60Main document, and return a pointer to it - return (static_cast<CApaDocument*>( CQtS60MainDocument::NewL( *this ) ) ); - } + return (static_cast<CApaDocument*>(CQtS60MainDocument::NewL(*this))); +} // ----------------------------------------------------------------------------- // CQtS60MainApplication::AppDllUid() @@ -68,10 +68,10 @@ CApaDocument* CQtS60MainApplication::CreateDocumentL() // ----------------------------------------------------------------------------- // TUid CQtS60MainApplication::AppDllUid() const - { +{ // Return the UID for the QtS60Main application return ProcessUid(); - } +} // ----------------------------------------------------------------------------- // CQtS60MainApplication::ResourceFileName() @@ -79,14 +79,13 @@ TUid CQtS60MainApplication::AppDllUid() const // ----------------------------------------------------------------------------- // TFileName CQtS60MainApplication::ResourceFileName() const - { +{ TFindFile finder(iCoeEnv->FsSession()); TInt err = finder.FindByDir(KQtWrapperResourceFile, KNullDesC); if (err == KErrNone) return finder.File(); return KNullDesC(); - } +} // End of File - diff --git a/src/s60main/qts60mainapplication.h b/src/s60main/qts60mainapplication.h index 70b6909..e178936 100644 --- a/src/s60main/qts60mainapplication.h +++ b/src/s60main/qts60mainapplication.h @@ -91,4 +91,3 @@ class CQtS60MainApplication : public CAknApplication #endif // __QtS60MainAPPLICATION_H__ // End of File - diff --git a/src/s60main/qts60mainappui.cpp b/src/s60main/qts60mainappui.cpp index ef54417..ede96cb 100644 --- a/src/s60main/qts60mainappui.cpp +++ b/src/s60main/qts60mainappui.cpp @@ -67,7 +67,7 @@ void CQtS60MainAppUi::ConstructL() // objects can still exist in static data at that point. Instead we will print relevant information // so that comparative checks may be made for memory leaks, using ~SPrintExitInfo in corelib. iEikonEnv->DisableExitChecks(ETrue); - + // Initialise app UI with standard value. // ENoAppResourceFile and ENonStandardResourceFile makes UI to work without // resource files in most SDKs. S60 3rd FP1 public seems to require resource file @@ -76,11 +76,11 @@ void CQtS60MainAppUi::ConstructL() CEikButtonGroupContainer* nativeContainer = Cba(); nativeContainer->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY_WITH_IDS); - + // Create async callback to call Qt main, // this is required to give S60 app FW to finish starting correctly - TCallBack callBack( OpenCMainStaticCallBack, this ); - iAsyncCallBack = new(ELeave) CAsyncCallBack( callBack, CActive::EPriorityIdle ); + TCallBack callBack(OpenCMainStaticCallBack, this); + iAsyncCallBack = new(ELeave) CAsyncCallBack(callBack, CActive::EPriorityIdle); iAsyncCallBack->Call(); } @@ -109,7 +109,7 @@ CQtS60MainAppUi::~CQtS60MainAppUi() // Takes care of command handling. // ----------------------------------------------------------------------------- // -void CQtS60MainAppUi::HandleCommandL( TInt aCommand ) +void CQtS60MainAppUi::HandleCommandL(TInt aCommand) { if (qApp) qApp->symbianHandleCommand(aCommand); @@ -123,7 +123,7 @@ void CQtS60MainAppUi::HandleCommandL( TInt aCommand ) void CQtS60MainAppUi::HandleResourceChangeL(TInt aType) { CAknAppUi::HandleResourceChangeL(aType); - + if (qApp) qApp->symbianResourceChange(aType); } @@ -157,9 +157,9 @@ void CQtS60MainAppUi::HandleStatusPaneSizeChange() // Called asynchronously from ConstructL() - passes call to nan static method // ----------------------------------------------------------------------------- // -TInt CQtS60MainAppUi::OpenCMainStaticCallBack( TAny* aObject ) +TInt CQtS60MainAppUi::OpenCMainStaticCallBack(TAny* aObject) { - CQtS60MainAppUi* myObj = static_cast<CQtS60MainAppUi*>( aObject ); + CQtS60MainAppUi* myObj = static_cast<CQtS60MainAppUi*>(aObject); myObj->OpenCMainCallBack(); return 0; } @@ -186,30 +186,28 @@ void CQtS60MainAppUi::DynInitMenuBarL(TInt, CEikMenuBar *) void CQtS60MainAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane) { - if (aResourceId == R_QT_WRAPPERAPP_MENU){ + if (aResourceId == R_QT_WRAPPERAPP_MENU) { if (aMenuPane->NumberOfItemsInPane() <= 1) qt_symbian_show_toplevel(aMenuPane); - - } - else if( aResourceId != R_AVKON_MENUPANE_FEP_DEFAULT && aResourceId != R_AVKON_MENUPANE_EDITTEXT_DEFAULT && aResourceId != R_AVKON_MENUPANE_LANGUAGE_DEFAULT ){ + + } else if (aResourceId != R_AVKON_MENUPANE_FEP_DEFAULT && aResourceId != R_AVKON_MENUPANE_EDITTEXT_DEFAULT && aResourceId != R_AVKON_MENUPANE_LANGUAGE_DEFAULT) { qt_symbian_show_submenu(aMenuPane, aResourceId); } } -void CQtS60MainAppUi::RestoreMenuL(CCoeControl* aMenuWindow,TInt aMenuId,TMenuType aMenuType) +void CQtS60MainAppUi::RestoreMenuL(CCoeControl* aMenuWindow, TInt aMenuId, TMenuType aMenuType) { - if ((aMenuId==R_QT_WRAPPERAPP_MENUBAR) || (aMenuId == R_AVKON_MENUPANE_FEP_DEFAULT)) { + if ((aMenuId == R_QT_WRAPPERAPP_MENUBAR) || (aMenuId == R_AVKON_MENUPANE_FEP_DEFAULT)) { TResourceReader reader; - iCoeEnv->CreateResourceReaderLC(reader,aMenuId); + iCoeEnv->CreateResourceReaderLC(reader, aMenuId); aMenuWindow->ConstructFromResourceL(reader); CleanupStack::PopAndDestroy(); } - if (aMenuType==EMenuPane) - DynInitMenuPaneL(aMenuId,(CEikMenuPane*)aMenuWindow); + if (aMenuType == EMenuPane) + DynInitMenuPaneL(aMenuId, (CEikMenuPane*)aMenuWindow); else - DynInitMenuBarL(aMenuId,(CEikMenuBar*)aMenuWindow); - } + DynInitMenuBarL(aMenuId, (CEikMenuBar*)aMenuWindow); +} // End of File - diff --git a/src/s60main/qts60mainappui.h b/src/s60main/qts60mainappui.h index 6bdeb2e..cec0d98 100644 --- a/src/s60main/qts60mainappui.h +++ b/src/s60main/qts60mainappui.h @@ -96,7 +96,7 @@ class CQtS60MainAppUi : public CAknAppUi * @param aType event type. */ void HandleResourceChangeL(TInt aType); - + /** * HandleStatusPaneSizeChange. * Called by the framework when the application status pane @@ -133,4 +133,3 @@ class CQtS60MainAppUi : public CAknAppUi #endif // __QtS60MainAPPUI_H__ // End of File - diff --git a/src/s60main/qts60maindocument.cpp b/src/s60main/qts60maindocument.cpp index eb7ea42..77d5cc8 100644 --- a/src/s60main/qts60maindocument.cpp +++ b/src/s60main/qts60maindocument.cpp @@ -51,25 +51,25 @@ // Two-phased constructor. // ----------------------------------------------------------------------------- // -CQtS60MainDocument* CQtS60MainDocument::NewL( CEikApplication& aApp ) - { - CQtS60MainDocument* self = NewLC( aApp ); - CleanupStack::Pop( self ); +CQtS60MainDocument* CQtS60MainDocument::NewL(CEikApplication& aApp) +{ + CQtS60MainDocument* self = NewLC(aApp); + CleanupStack::Pop(self); return self; - } +} // ----------------------------------------------------------------------------- // CQtS60MainDocument::NewLC() // Two-phased constructor. // ----------------------------------------------------------------------------- // -CQtS60MainDocument* CQtS60MainDocument::NewLC( CEikApplication& aApp ) - { - CQtS60MainDocument* self = new ( ELeave ) CQtS60MainDocument( aApp ); - CleanupStack::PushL( self ); +CQtS60MainDocument* CQtS60MainDocument::NewLC(CEikApplication& aApp) +{ + CQtS60MainDocument* self = new(ELeave) CQtS60MainDocument(aApp); + CleanupStack::PushL(self); self->ConstructL(); return self; - } +} // ----------------------------------------------------------------------------- // CQtS60MainDocument::ConstructL() @@ -77,20 +77,20 @@ CQtS60MainDocument* CQtS60MainDocument::NewLC( CEikApplication& aApp ) // ----------------------------------------------------------------------------- // void CQtS60MainDocument::ConstructL() - { +{ // No implementation required - } +} // ----------------------------------------------------------------------------- // CQtS60MainDocument::CQtS60MainDocument() // C++ default constructor can NOT contain any code, that might leave. // ----------------------------------------------------------------------------- // -CQtS60MainDocument::CQtS60MainDocument( CEikApplication& aApp ) - : CAknDocument( aApp ) - { +CQtS60MainDocument::CQtS60MainDocument(CEikApplication& aApp) + : CAknDocument(aApp) +{ // No implementation required - } +} // --------------------------------------------------------------------------- // CQtS60MainDocument::~CQtS60MainDocument() @@ -98,9 +98,9 @@ CQtS60MainDocument::CQtS60MainDocument( CEikApplication& aApp ) // --------------------------------------------------------------------------- // CQtS60MainDocument::~CQtS60MainDocument() - { +{ // No implementation required - } +} // --------------------------------------------------------------------------- // CQtS60MainDocument::CreateAppUiL() @@ -108,11 +108,10 @@ CQtS60MainDocument::~CQtS60MainDocument() // --------------------------------------------------------------------------- // CEikAppUi* CQtS60MainDocument::CreateAppUiL() - { +{ // Create the application user interface, and return a pointer to it; // the framework takes ownership of this object - return ( static_cast <CEikAppUi*> ( new ( ELeave )CQtS60MainAppUi ) ); - } + return (static_cast <CEikAppUi*>(new(ELeave)CQtS60MainAppUi)); +} // End of File - diff --git a/src/s60main/qts60maindocument.h b/src/s60main/qts60maindocument.h index a95e620..77c5aa7 100644 --- a/src/s60main/qts60maindocument.h +++ b/src/s60main/qts60maindocument.h @@ -120,4 +120,3 @@ class CQtS60MainDocument : public CAknDocument #endif // __QTS60MAINDOCUMENT_H__ // End of File - diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro index f74943f..57c9949 100644 --- a/src/s60main/s60main.pro +++ b/src/s60main/s60main.pro @@ -9,7 +9,7 @@ CONFIG -= qt shared symbian { # Note: UID only needed for ensuring that no filename generation conflicts occur - TARGET.UID3 = 0x2001E61F + TARGET.UID3 = 0x2001E61F CONFIG += png zlib CONFIG -= jpeg INCLUDEPATH += tmp $$QMAKE_INCDIR_QT/QtCore $$MW_LAYER_SYSTEMINCLUDE @@ -21,8 +21,8 @@ symbian { HEADERS = qts60mainapplication.h \ qts60mainappui.h \ qts60maindocument.h - - # This block serves the minimalistic resource file for S60 3.1 platforms. + + # This block serves the minimalistic resource file for S60 3.1 platforms. # Note there is no way to ifdef S60 version in mmp file, that is why the resource # file is always compiled for WINSCW minimalAppResource31 = \ @@ -30,23 +30,23 @@ symbian { "HEADER" \ "TARGETPATH resource\apps" \ "END" - MMP_RULES += minimalAppResource31 + MMP_RULES += minimalAppResource31 # s60main needs to be built in ARM mode for GCCE to work. MMP_RULES+="ALWAYS_BUILD_AS_ARM" # staticlib should not have any lib depencies in s60 # This seems not to work, some hard coded libs are still added as dependency - LIBS = + LIBS = } else { error("$$_FILE_ is intended only for Symbian!") } symbian-abld: { # abld build commands generated resources after the static library is built, and - # we have dependency to resource from static lib -> resources need to be generated + # we have dependency to resource from static lib -> resources need to be generated # explicitly before library - rsgFix2.commands = "-$(DEL_FILE) $(EPOCROOT)Epoc32\Data\z\resource\apps\s60main.rsc >NUL 2>&1" + rsgFix2.commands = "-$(DEL_FILE) $(EPOCROOT)Epoc32\Data\z\resource\apps\s60main.rsc >NUL 2>&1" rsgFix.commands = "-$(ABLD) resource $(PLATFORM) $(CFG) 2>NUL" QMAKE_EXTRA_TARGETS += rsgFix rsgFix2 PRE_TARGETDEPS += rsgFix rsgFix2 diff --git a/src/s60main/s60main.rss b/src/s60main/s60main.rss index 6e8004c..11c68a3 100644 --- a/src/s60main/s60main.rss +++ b/src/s60main/s60main.rss @@ -83,4 +83,3 @@ RESOURCE MENU_PANE r_qt_wrapperapp_menu { } // End of File - diff --git a/src/sql/sql.pro b/src/sql/sql.pro index 60be748..b8f819d 100644 --- a/src/sql/sql.pro +++ b/src/sql/sql.pro @@ -19,9 +19,8 @@ include(models/models.pri) symbian: { TARGET.UID3=0x2001E61D - + # Workaroud for problems with paging this dll MMP_RULES -= PAGED MMP_RULES *= UNPAGED } - |