From ef7260c41b3ffac6459af04c144c521b110527a0 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Tue, 16 Jun 2009 11:42:05 +0200 Subject: doc: document QScopedPointer with forward declared classes Also some small doc cleanups --- .../code/src_corelib_tools_qscopedpointer.cpp | 20 +++++++++++++++++++- src/corelib/tools/qscopedpointer.cpp | 17 ++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp b/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp index 05377dd..7de42b7 100644 --- a/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp +++ b/doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp @@ -3,7 +3,6 @@ void myFunction(bool useSubClass) { MyClass *p = useSubClass ? new MyClass() : new MySubClass; QIODevice *device = handsOverOwnership(); - QIODevi if (m_value > 3) { delete p; @@ -62,3 +61,22 @@ if (scopedPointer) { ... } //! [3] + +//! [4] +class MyPrivateClass; // forward declare MyPrivateClass + +class MyClass +{ +private: + QScopedPointer privatePtr; // QScopedPointer to forward declared class + +public: + MyClass(); // OK + inline ~MyClass() {} // VIOLATION - Destructor must not be inline + +private: + Q_DISABLE_COPY(MyClass) // OK - copy constructor and assignment operators + // are now disabled, so the compiler won't implicitely + // generate them. +}; +//! [4] diff --git a/src/corelib/tools/qscopedpointer.cpp b/src/corelib/tools/qscopedpointer.cpp index 6a1ffb6..912edb6 100644 --- a/src/corelib/tools/qscopedpointer.cpp +++ b/src/corelib/tools/qscopedpointer.cpp @@ -80,6 +80,21 @@ \note QScopedPointer does not work with arrays. + \section1 Forward Declared Pointers + + Classes that are forward declared can be used within QScopedPointer, as + long as the destructor of the forward declared class is available whenever + a QScopedPointer needs to clean up. + + Concretely, this means that all classes containing a QScopedPointer that + points to a forward declared class must have non-inline constructors, + destructors and assignment operators: + + \snippet doc/src/snippets/code/src_corelib_tools_qscopedpointer.cpp 4 + + Otherwise, the compiler output a warning about not being able to destruct + \c MyPrivateClass. + \sa QSharedPointer */ @@ -142,7 +157,7 @@ /*! - \fn bool QScopedPointer::operator!=(const QScopedPointer *other) const + \fn bool QScopedPointer::operator!=(const QScopedPointer &other) const Inequality operator. Returns true if the scoped pointer \a other is not pointing to the same object as this pointer, otherwise returns false. -- cgit v0.12 From ba0ad632b7058b2dc8b780d0e713a5f577a1bb3b Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 16 Jun 2009 12:24:01 +0200 Subject: Fix for Task #256159 --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 7d79422..9e70cff 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -74,8 +74,6 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_fepState->SetFlags(EAknEditorFlagDefault); m_fepState->SetDefaultInputMode( EAknEditorTextInputMode ); m_fepState->SetPermittedInputModes( EAknEditorAllInputModes ); - m_fepState->SetLocalLanguage(ELangEnglish); - m_fepState->SetDefaultLanguage(ELangEnglish); m_fepState->SetDefaultCase( EAknEditorLowerCase ); m_fepState->SetPermittedCases( EAknEditorLowerCase|EAknEditorUpperCase ); m_fepState->SetSpecialCharacterTableResourceId( 0 ); -- cgit v0.12 From 422f908b5452c39c935f92fe05652211ef2466d3 Mon Sep 17 00:00:00 2001 From: mread Date: Tue, 16 Jun 2009 12:19:36 +0100 Subject: getting ftp to build in RnD environments --- examples/network/ftp/ftp.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/network/ftp/ftp.pro b/examples/network/ftp/ftp.pro index 0fb9934..634c43c 100644 --- a/examples/network/ftp/ftp.pro +++ b/examples/network/ftp/ftp.pro @@ -13,6 +13,7 @@ INSTALLS += target sources include($$QT_SOURCE_TREE/examples/examplebase.pri) symbian { + INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE TARGET.CAPABILITY="NetworkServices" TARGET.UID3 = 0xA000A648 LIBS+=-lesock -lconnmon # For IAP selection -- cgit v0.12 From 8de706d342b31b863e9e7b8eb222a0cb2ab57054 Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Tue, 16 Jun 2009 14:44:59 +0300 Subject: Fix Qt network autotest compilation for ARMV5. The build was broken by commit: 7604f8087f88171ef933d8ae08f501467e647338 --- tests/auto/network-settings.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index 0924c57..01a732c 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -50,7 +50,8 @@ #include #include #endif -#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86) +#if defined(Q_OS_SYMBIAN) +#if defined(Q_CC_NOKIAX86) // In emulator we use WINSOCK connectivity by default. Unfortunately winsock // does not work very well with UDP sockets. This defines skips some test // cases which have known problems. @@ -59,6 +60,7 @@ // network tests. WINPCAP connectivity uses Symbian OS IP stack, // correspondingly as HW does. When using WINPCAP disable this define //#define SYMBIAN_WINSOCK_CONNECTIVITY +#endif // Q_CC_NOKIAX86 class QtNetworkSettingsRecord { public: @@ -80,7 +82,7 @@ private: QString strRecordValue; }; -#endif +#endif // Q_OS_SYMBIAN class QtNetworkSettings { -- cgit v0.12 From 5c858bdb9cfb1998b202c76c48913a3fd96c8dee Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 16 Jun 2009 14:59:52 +0300 Subject: Installation instructions update --- doc/src/installation.qdoc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/src/installation.qdoc b/doc/src/installation.qdoc index 13af50c..05188c7 100644 --- a/doc/src/installation.qdoc +++ b/doc/src/installation.qdoc @@ -554,9 +554,9 @@ in the \l{Qt for S60 Requirements} document. \note Qt for S60 has some requirements that are given in more detail in the \l{Qt for S60 Requirements} document. -\note This document describes how to install Qt for S60 from the source package. -Go \l{Installing Qt on S60 using binary package}{here} for instructions on how to install -Qt using binary package. +\note \bold {This document describes how to install and configure Qt for S60 from scratch. +If you are using pre-built binaries, follow the instructions +\l{Installing Qt on S60 using binary package}{here}.} \list 1 @@ -904,7 +904,11 @@ Qt using binary package. Qt for S60 requires the following software installed on your development PC: \list - \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide_cpp/}{Carbide.c++ v2.0.0 or higher} + \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/carbide_cpp/}{Carbide.c++ v2.0.0 or higher} + \list + \o \bold{Note:} It is necessary to update Carbide compiler if you are using Carbide 2.0.2 or older. + You can find a compiler patch \l{http://pepper.troll.no/s60prereleases/patches/}{here}. + \endlist \o \l{http://www.forum.nokia.com/main/resources/tools_and_sdks/S60SDK/}{S60 Platform SDK 3rd Edition FP1 or higher} \o \l{http://www.forum.nokia.com/main/resources/technologies/openc_cpp/}{Open C/C++ v1.6.0 or higher}. Install this to all S60 SDKs you plan to use Qt with. -- cgit v0.12