diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-07-01 12:40:40 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-07-01 12:40:40 (GMT) |
commit | 5e4b53a50db19fe5d51f0a5fe035a29ff331a725 (patch) | |
tree | 4f8f0baa23be7c0e6c4549f6824b6cdfe14aa503 /examples | |
parent | 42e63a7e65d4dbfb2a79133eb63a561f50760344 (diff) | |
parent | 27c4a4d9c91e6c16d1d43d2d99c0176a58650e15 (diff) | |
download | Qt-5e4b53a50db19fe5d51f0a5fe035a29ff331a725.zip Qt-5e4b53a50db19fe5d51f0a5fe035a29ff331a725.tar.gz Qt-5e4b53a50db19fe5d51f0a5fe035a29ff331a725.tar.bz2 |
Merge branch 'master' of git@scm.dev.troll.no:qt/qt-s60-public
Diffstat (limited to 'examples')
-rw-r--r-- | examples/graphicsview/padnavigator/panel.h | 2 | ||||
-rw-r--r-- | examples/graphicsview/padnavigator/roundrectitem.h | 2 | ||||
-rw-r--r-- | examples/network/ftp/ftp.pro | 2 | ||||
-rw-r--r-- | examples/network/ftp/sym_iap_util.h | 69 | ||||
-rw-r--r-- | examples/painting/svggenerator/displaywidget.cpp | 2 | ||||
-rw-r--r-- | examples/phonon/musicplayer/mainwindow.cpp | 2 |
6 files changed, 34 insertions, 45 deletions
diff --git a/examples/graphicsview/padnavigator/panel.h b/examples/graphicsview/padnavigator/panel.h index 3d17b42..aebf7b0 100644 --- a/examples/graphicsview/padnavigator/panel.h +++ b/examples/graphicsview/padnavigator/panel.h @@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE class QTimeLine; class Ui_BackSide; -QT_END_NAMESPACE; +QT_END_NAMESPACE class RoundRectItem; diff --git a/examples/graphicsview/padnavigator/roundrectitem.h b/examples/graphicsview/padnavigator/roundrectitem.h index 5ff437c..21b3ba4 100644 --- a/examples/graphicsview/padnavigator/roundrectitem.h +++ b/examples/graphicsview/padnavigator/roundrectitem.h @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE class QGraphicsProxyWidget; -QT_END_NAMESPACE; +QT_END_NAMESPACE class RoundRectItem : public QObject, public QGraphicsRectItem { diff --git a/examples/network/ftp/ftp.pro b/examples/network/ftp/ftp.pro index c70b812..6b0f2ca 100644 --- a/examples/network/ftp/ftp.pro +++ b/examples/network/ftp/ftp.pro @@ -17,5 +17,5 @@ symbian { INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE TARGET.CAPABILITY="NetworkServices" TARGET.UID3 = 0xA000A648 - LIBS+=-lesock -lconnmon # For IAP selection + LIBS+=-lesock # For IAP selection }
\ No newline at end of file diff --git a/examples/network/ftp/sym_iap_util.h b/examples/network/ftp/sym_iap_util.h index 14df5af..928b46e 100644 --- a/examples/network/ftp/sym_iap_util.h +++ b/examples/network/ftp/sym_iap_util.h @@ -42,9 +42,9 @@ #define QSYM_IAP_UTIL_H #include <es_sock.h> +#include <es_enum.h> #include <sys/socket.h> #include <net/if.h> -#include <rconnmon.h> QString qt_TDesC2QStringL(const TDesC& aDescriptor) { @@ -59,7 +59,6 @@ static void qt_SetDefaultIapL() { TUint count; TRequestStatus status; - TUint ids[15]; RSocketServ serv; CleanupClosePushL(serv); @@ -67,57 +66,47 @@ static void qt_SetDefaultIapL() RConnection conn; CleanupClosePushL(conn); - RConnectionMonitor monitor; - CleanupClosePushL(monitor); + User::LeaveIfError(serv.Connect()); + User::LeaveIfError(conn.Open(serv)); - monitor.ConnectL(); - monitor.GetConnectionCount(count, status); - User::WaitForRequest(status); - if(status.Int() != KErrNone) { - User::Leave(status.Int()); - } + TConnectionInfoBuf connInfo; - TUint numSubConnections; + _LIT(KIapNameSetting, "IAP\\Name"); + TBuf8<256> iap8Name; - if(count > 0) { - for (TInt i = 1; i <= count; i++) { - User::LeaveIfError(monitor.GetConnectionInfo(i, ids[i-1], numSubConnections)); - } - /* - * get IAP value for first active connection - */ - TBuf< 50 > iapName; - monitor.GetStringAttribute(ids[0], 0, KIAPName, iapName, status); - User::WaitForRequest(status); - if (status.Int() != KErrNone) { - User::Leave(status.Int()); + if (conn.EnumerateConnections(count) == KErrNone) { + if(count > 0) { + for (TUint i = 1; i <= count; i++) { + // Note: GetConnectionInfo expects 1-based index. + if (conn.GetConnectionInfo(i, connInfo) == KErrNone) { + if (conn.Attach(connInfo, RConnection::EAttachTypeNormal) == KErrNone) { + conn.GetDesSetting(TPtrC(KIapNameSetting), iap8Name); + break; + } + } + } } else { - QString strIapName = qt_TDesC2QStringL(iapName); - struct ifreq ifReq; - strcpy(ifReq.ifr_name, strIapName.toLatin1().data()); - User::LeaveIfError(setdefaultif(&ifReq)); + /* + * no active connections yet + * use IAP dialog to select one + */ + User::LeaveIfError(conn.Start()); + User::LeaveIfError(conn.GetDesSetting(TPtrC(KIapNameSetting), iap8Name)); } - } else { - /* - * no active connections yet - * use IAP dialog to select one - */ - User::LeaveIfError(serv.Connect()); - User::LeaveIfError(conn.Open(serv)); - User::LeaveIfError(conn.Start()); - - _LIT(KIapNameSetting, "IAP\\Name"); - TBuf8<50> iap8Name; - User::LeaveIfError(conn.GetDesSetting(TPtrC(KIapNameSetting), iap8Name)); + iap8Name.ZeroTerminate(); conn.Stop(); struct ifreq ifReq; strcpy(ifReq.ifr_name, (char*)iap8Name.Ptr()); + User::LeaveIfError(setdefaultif(&ifReq)); + + conn.Close(); + serv.Close(); } - CleanupStack::PopAndDestroy(&monitor); + CleanupStack::PopAndDestroy(&conn); CleanupStack::PopAndDestroy(&serv); } diff --git a/examples/painting/svggenerator/displaywidget.cpp b/examples/painting/svggenerator/displaywidget.cpp index 75ec02d..bad6d3a 100644 --- a/examples/painting/svggenerator/displaywidget.cpp +++ b/examples/painting/svggenerator/displaywidget.cpp @@ -63,7 +63,7 @@ DisplayWidget::DisplayWidget(QWidget *parent) } //! [paint event] -void DisplayWidget::paintEvent(QPaintEvent *event) +void DisplayWidget::paintEvent(QPaintEvent * /* event */) { QPainter painter; painter.begin(this); diff --git a/examples/phonon/musicplayer/mainwindow.cpp b/examples/phonon/musicplayer/mainwindow.cpp index a9bb379..9acb900 100644 --- a/examples/phonon/musicplayer/mainwindow.cpp +++ b/examples/phonon/musicplayer/mainwindow.cpp @@ -181,7 +181,7 @@ void MainWindow::metaStateChanged(Phonon::State newState, Phonon::State /* oldSt QMessageBox::warning(this, tr("Error opening files"), metaInformationResolver->errorString()); while (!sources.isEmpty() && - !(sources.takeLast() == metaInformationResolver->currentSource())); + !(sources.takeLast() == metaInformationResolver->currentSource())) {} return; } |