From 67dcf89760af14e65e2c62ebba513c987086b355 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 2 Nov 2010 18:53:17 +0100 Subject: simplify recursive symlinking the jira issue itself has been already fixed, but in a somewhat arcane way. this one is better maintainable. Reviewed-by: joerg Task-number: QTBUG-14955 --- configure | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 0152c8e..1b2abf4 100755 --- a/configure +++ b/configure @@ -2429,14 +2429,8 @@ if [ "$OPT_SHADOW" = "yes" ]; then ShadowMkspecs() { rm -rf "$outpath/mkspecs/$1" - if [ "$UNAME_SYSTEM" = "Linux" ]; then - # This works with GNU coreutils, and is needed for ScratchBox - cp -rs "$relpath/mkspecs/$1" "$outpath/mkspecs/$1" - else - # A simple "cp -rs" doesn't work on Mac. :( - find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p - find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | xargs -n 1 -I % ln -s "$relpath/%" "$outpath/%" - fi + find "$relpath/mkspecs/$1" -type d | sed "s,^$relpath,$outpath," | xargs mkdir -p + find "$relpath/mkspecs/$1" -type f | sed "s,^$relpath/,," | while read f; do ln -s "$relpath/$f" "$outpath/$f"; done } # Special case for mkspecs/features directory. -- cgit v0.12 From 3970bd54380a9438ce4765b0bb9a72d2b8bf2662 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 2 Nov 2010 19:59:21 +0100 Subject: more elegant treatment of qconfig.h special case instead of injecting it only if it is not there yet, exclude it if it is already there and then unconditionally inject it. this makes things more deterministic. Reviewed-by: joerg --- bin/syncqt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/syncqt b/bin/syncqt index c73d119..0f64517 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -695,10 +695,7 @@ my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dis my @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" ); my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" ); my %colliding_headers = (); -my %inject_headers; -# Force generation of forwarding header for qconfig.h if (and only if) we can't -# find the header by normal means. -%inject_headers = ( "$basedir/src/corelib/global" => ( "*qconfig.h" ) ) unless (-e "$basedir/src/corelib/global/qconfig.h"); +my %inject_headers = ( "$basedir/src/corelib/global" => ( "qconfig.h" ) ); # all from build dir foreach my $lib (@modules_to_sync) { #iteration info @@ -800,7 +797,12 @@ foreach my $lib (@modules_to_sync) { #calc files and "copy" them foreach my $subdir (@subdirs) { my @headers = findFiles($subdir, "^[-a-z0-9_]*\\.h\$" , 0); - push @headers, $inject_headers{$subdir} if (defined $inject_headers{$subdir}); + if (defined $inject_headers{$subdir}) { + foreach my $if ($inject_headers{$subdir}) { + @headers = grep(!/^\Q$if\E$/, @headers); #in case we configure'd previously + push @headers, "*".$if; + } + } foreach my $header (@headers) { my $shadow = ($header =~ s/^\*//); $header = 0 if($header =~ /^ui_.*.h/); -- cgit v0.12 From e890821c3c1042f425643facbbbb0e036f5304b6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Nov 2010 10:06:23 +0100 Subject: exclude headers in builddir from -copy option Reviewed-by: joerg --- bin/syncqt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/syncqt b/bin/syncqt index 0f64517..6c5729a 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -880,7 +880,7 @@ foreach my $lib (@modules_to_sync) { @headers = ( "$out_basedir/include/$lib/private/$header" ); } foreach(@headers) { #sync them - $header_copies++ if(syncHeader($_, $iheader, $copy_headers, $ts)); + $header_copies++ if(syncHeader($_, $iheader, $copy_headers && !$shadow, $ts)); } if($public_header) { -- cgit v0.12 From fc60eb64d38289b448f73889139c94895b74db1a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Nov 2010 11:47:17 +0100 Subject: msvc: enable unreferenced code elimination in release with debuginfo builds that linker optimization is on by default in release builds, so override /DEBUG implicitly turning it off. as it happens, this implicitly disables incremental linking, so that option can go away now. Reviewed-by: joerg Task-number: QTBUG-14007 --- mkspecs/win32-msvc2003/qmake.conf | 2 +- mkspecs/win32-msvc2005/qmake.conf | 2 +- mkspecs/win32-msvc2008/qmake.conf | 2 +- mkspecs/win32-msvc2010/qmake.conf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mkspecs/win32-msvc2003/qmake.conf b/mkspecs/win32-msvc2003/qmake.conf index 63d1ffd..a573a4d 100644 --- a/mkspecs/win32-msvc2003/qmake.conf +++ b/mkspecs/win32-msvc2003/qmake.conf @@ -53,7 +53,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO -QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf index 265d028..aa58e30 100644 --- a/mkspecs/win32-msvc2005/qmake.conf +++ b/mkspecs/win32-msvc2005/qmake.conf @@ -55,7 +55,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO -QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf index 1432645..ee7b99a 100644 --- a/mkspecs/win32-msvc2008/qmake.conf +++ b/mkspecs/win32-msvc2008/qmake.conf @@ -57,7 +57,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO -QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf index 84086e2..44e460e 100644 --- a/mkspecs/win32-msvc2010/qmake.conf +++ b/mkspecs/win32-msvc2010/qmake.conf @@ -57,7 +57,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO -QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" -- cgit v0.12 From fbe7375ad3dde9ce10202141ea7ffe78643088a6 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 3 Nov 2010 16:46:24 +0100 Subject: QNAM: Reset authenticator state properly between requests Reset authenticator and fix operator=(...) of QAuthenticator. Task-number: QTBUG-6792 Reviewed-by: ogoffart --- src/network/access/qhttpnetworkconnection.cpp | 7 +++++++ src/network/kernel/qauthenticator.cpp | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 89f9b03..4d27531 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -373,6 +373,13 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket // - If withCredentials has been set to false (e.g. by QtWebKit for a cross-origin XMLHttpRequest) then // we need to bail out if authentication is required. if (priv->phase == QAuthenticatorPrivate::Done || !reply->request().withCredentials()) { + // Reset authenticator so the next request on that channel does not get messed up + auth = 0; + if (isProxy) + channels[i].proxyAuthenticator = QAuthenticator(); + else + channels[i].authenticator = QAuthenticator(); + // authentication is cancelled, send the current contents to the user. emit channels[i].reply->headerChanged(); emit channels[i].reply->readyRead(); diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 220f7da..73f6b94 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -164,9 +164,13 @@ QAuthenticator &QAuthenticator::operator=(const QAuthenticator &other) { if (d == other.d) return *this; - detach(); - d->user = other.d->user; - d->password = other.d->password; + + if (d && !d->ref.deref()) + delete d; + + d = other.d; + if (d) + d->ref.ref(); return *this; } -- cgit v0.12 From 5a20a7b87220dd33792b5c25ea809a0e5f93a93b Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 3 Nov 2010 17:17:47 +0100 Subject: tst_qnetworkreply: Add testcase for unknown authentication method Task-number: QTBUG-4121 Reviewed-by: ogoffart --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 5196ed2..8850e6e 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -295,6 +295,8 @@ private Q_SLOTS: void getFromUnreachableIp(); + void qtbug4121unknownAuthentication(); + // NOTE: This test must be last! void parentingRepliesToTheApp(); }; @@ -4598,6 +4600,7 @@ void tst_QNetworkReply::qtbug12908compressedHttpReply() QCOMPARE(reply->error(), QNetworkReply::NoError); } +// TODO add similar test for FTP void tst_QNetworkReply::getFromUnreachableIp() { QNetworkAccessManager manager; @@ -4612,6 +4615,35 @@ void tst_QNetworkReply::getFromUnreachableIp() QVERIFY(reply->error() != QNetworkReply::NoError); } +void tst_QNetworkReply::qtbug4121unknownAuthentication() +{ + MiniHttpServer server(QByteArray("HTTP/1.1 401 bla\r\nWWW-Authenticate: crap\r\nContent-Length: 0\r\n\r\n")); + server.doClose = false; + + QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort()))); + QNetworkAccessManager manager; + QNetworkReplyPtr reply = manager.get(request); + + qRegisterMetaType("QNetworkReply*"); + qRegisterMetaType("QAuthenticator*"); + QSignalSpy authSpy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*))); + QSignalSpy finishedSpy(&manager, SIGNAL(finished(QNetworkReply*))); + qRegisterMetaType("QNetworkReply::NetworkError"); + QSignalSpy errorSpy(reply, SIGNAL(error(QNetworkReply::NetworkError))); + + connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); + QTestEventLoop::instance().enterLoop(10); + QVERIFY(!QTestEventLoop::instance().timeout()); + + QCOMPARE(authSpy.count(), 0); + QCOMPARE(finishedSpy.count(), 1); + QCOMPARE(errorSpy.count(), 1); + + QCOMPARE(reply->error(), QNetworkReply::AuthenticationRequiredError); +} + + + // NOTE: This test must be last testcase in tst_qnetworkreply! void tst_QNetworkReply::parentingRepliesToTheApp() { -- cgit v0.12 From 4c400ec8e397b4da9898f96c50a702eaa362293d Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 25 Oct 2010 22:28:31 +0200 Subject: PinchGesture: lastRotationAngle should start at 0. Reviewed-by: Zeno Albisser --- src/gui/kernel/qstandardgestures.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp index 1821c3d..7336c84 100644 --- a/src/gui/kernel/qstandardgestures.cpp +++ b/src/gui/kernel/qstandardgestures.cpp @@ -224,7 +224,7 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state, startAngle -= 360; const qreal rotationAngle = startAngle - angle; if (d->isNewSequence) - d->lastRotationAngle = rotationAngle; + d->lastRotationAngle = 0.0; else d->lastRotationAngle = d->rotationAngle; d->rotationAngle = rotationAngle; -- cgit v0.12 From b37fa034257673a43783a54bb66328c82a0c7ef1 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 25 Oct 2010 23:28:37 +0200 Subject: The lastCenterPoint should be equal to centerPoint for new gestures. Reviewed-by: Zeno Albisser --- src/gui/kernel/qstandardgestures.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp index 7336c84..48b7ac1 100644 --- a/src/gui/kernel/qstandardgestures.cpp +++ b/src/gui/kernel/qstandardgestures.cpp @@ -194,13 +194,15 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state, d->hotSpot = p1.screenPos(); d->isHotSpotSet = true; + QPointF centerPoint = (p1.screenPos() + p2.screenPos()) / 2.0; if (d->isNewSequence) { d->startPosition[0] = p1.screenPos(); d->startPosition[1] = p2.screenPos(); + d->lastCenterPoint = centerPoint; + } else { + d->lastCenterPoint = d->centerPoint; } - - d->lastCenterPoint = d->centerPoint; - d->centerPoint = (p1.screenPos() + p2.screenPos()) / 2.0; + d->centerPoint = centerPoint; d->changeFlags |= QPinchGesture::CenterPointChanged; -- cgit v0.12 From adc6d4776e6570fa6e6d5d2e4e40fe7eab0ebb99 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Thu, 4 Nov 2010 13:45:46 +1000 Subject: Fix bearermonitor when building for Maemo in scratchbox. Use the correct ui file when building in scratchbox. Remove use of message boxes. --- examples/network/bearermonitor/bearermonitor.cpp | 22 +- examples/network/bearermonitor/bearermonitor.h | 4 +- examples/network/bearermonitor/bearermonitor.pro | 3 +- .../network/bearermonitor/bearermonitor_maemo.ui | 601 +++++++++++---------- examples/network/bearermonitor/main.cpp | 9 +- examples/network/bearermonitor/sessionwidget.cpp | 4 +- examples/network/bearermonitor/sessionwidget.h | 5 +- 7 files changed, 353 insertions(+), 295 deletions(-) diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp index 2c976ff..75ffb01 100644 --- a/examples/network/bearermonitor/bearermonitor.cpp +++ b/examples/network/bearermonitor/bearermonitor.cpp @@ -41,8 +41,8 @@ #include "bearermonitor.h" #include "sessionwidget.h" -#include -#include +#include + #ifdef Q_OS_WIN #include #undef interface @@ -56,20 +56,18 @@ BearerMonitor::BearerMonitor(QWidget *parent) : QWidget(parent) { setupUi(this); -#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) +#ifdef MAEMO_UI newSessionButton->hide(); deleteSessionButton->hide(); #else delete tabWidget->currentWidget(); sessionGroup->hide(); #endif -#if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) +#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE) || defined(MAEMO_UI) setWindowState(Qt::WindowMaximized); #endif updateConfigurations(); -#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6) onlineStateChanged(!manager.allConfigurations(QNetworkConfiguration::Active).isEmpty()); -#endif QNetworkConfiguration defaultConfiguration = manager.defaultConfiguration(); for (int i = 0; i < treeWidget->topLevelItemCount(); ++i) { QTreeWidgetItem *item = treeWidget->topLevelItem(i); @@ -104,7 +102,7 @@ BearerMonitor::BearerMonitor(QWidget *parent) connect(newSessionButton, SIGNAL(clicked()), this, SLOT(createNewSession())); -#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6) +#ifndef MAEMO_UI connect(deleteSessionButton, SIGNAL(clicked()), this, SLOT(deleteSession())); #endif @@ -257,15 +255,9 @@ void BearerMonitor::updateConfigurations() void BearerMonitor::onlineStateChanged(bool isOnline) { if (isOnline) -#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) - QMessageBox::information(this, "Connection state changed", "Online", QMessageBox::Close); - else - QMessageBox::information(this, "Connection state changed", "Offline", QMessageBox::Close); -#else onlineState->setText(tr("Online")); else onlineState->setText(tr("Offline")); -#endif } #ifdef Q_OS_WIN @@ -393,7 +385,7 @@ void BearerMonitor::createSessionFor(QTreeWidgetItem *item) tabWidget->addTab(session, conf.name()); -#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6) +#ifndef MAEMO_UI sessionGroup->show(); #endif @@ -408,7 +400,7 @@ void BearerMonitor::createNewSession() createSessionFor(item); } -#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6) +#ifndef MAEMO_UI void BearerMonitor::deleteSession() { SessionWidget *session = qobject_cast(tabWidget->currentWidget()); diff --git a/examples/network/bearermonitor/bearermonitor.h b/examples/network/bearermonitor/bearermonitor.h index 45e7275..df1c78b 100644 --- a/examples/network/bearermonitor/bearermonitor.h +++ b/examples/network/bearermonitor/bearermonitor.h @@ -45,7 +45,7 @@ #include #if defined (Q_OS_SYMBIAN) || defined(Q_OS_WINCE) #include "ui_bearermonitor_240_320.h" -#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) +#elif defined(MAEMO_UI) #include "ui_bearermonitor_maemo.h" #else #include "ui_bearermonitor_640_480.h" @@ -81,7 +81,7 @@ private slots: void createSessionFor(QTreeWidgetItem *item); void createNewSession(); -#if !defined(Q_WS_MAEMO_5) && !defined(Q_WS_MAEMO_6) +#ifndef MAEMO_UI void deleteSession(); #endif void performScan(); diff --git a/examples/network/bearermonitor/bearermonitor.pro b/examples/network/bearermonitor/bearermonitor.pro index 4b2c35b..bd9bd68 100644 --- a/examples/network/bearermonitor/bearermonitor.pro +++ b/examples/network/bearermonitor/bearermonitor.pro @@ -8,7 +8,8 @@ SOURCES = main.cpp \ bearermonitor.cpp \ sessionwidget.cpp -maemo5|maemo6 { +maemo5|maemo6|linux-g++-maemo { + DEFINES += MAEMO_UI FORMS = bearermonitor_maemo.ui \ sessionwidget_maemo.ui } else { diff --git a/examples/network/bearermonitor/bearermonitor_maemo.ui b/examples/network/bearermonitor/bearermonitor_maemo.ui index a7940c6..9c72bfd 100644 --- a/examples/network/bearermonitor/bearermonitor_maemo.ui +++ b/examples/network/bearermonitor/bearermonitor_maemo.ui @@ -7,300 +7,359 @@ 0 0 612 - 495 + 555 BearerMonitor - + - - - - 0 - 0 - + + + System State - - 0 + + true - - false + + + 0 + + + + + Online State: + + + + + + + + 0 + 0 + + + + + + + + + + + + + + Configurations && Sessions - - - Configurations - - - - - - - 0 - 0 - - - - false + + true + + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + 0 + + + false + + + + Configurations - - - 1 - - - - - - - - - - - - Name: - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - State: - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - Type: - - - - - - - - 0 - 0 - - - - Invalid - - - - - - - - - - - Purpose: - - - - - - - - 0 - 0 - - - - Unknown - - - - - - - - - - - Identifier: - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - Roaming: - - - - - - - - 0 - 0 - - - - - - - - - - - - - - - Children: - - - - - - - - 0 - 0 - - + + + + + + 0 + 0 + + + + false + + + false + + - + 1 - - - - - - - - Network Location Awareness - - + + + + + + + + + + + Name: + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + State: + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + Type: + + + + + + + + 0 + 0 + + + + Invalid + + + + + + + + + + + Purpose: + + + + + + + + 0 + 0 + + + + Unknown + + + + + + + + + + + Identifier: + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + Roaming: + + + + + + + + 0 + 0 + + + + + + + + + + + + + + + Children: + + + + + + + + 0 + 0 + + + + + + + + + + + + + Network Location Awareness + + + + + + Register + + + + + + + Unregister + + + + + + - + - Register + New Session - + - Unregister + Delete Session + + + + Scan + + + + + + + 0 + + + 23280 + + + false + + + false + + + %p% + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + - - - - - - New Session - - - - - - - Delete Session - - - - - - - Scan - - - - - - - 0 - - - 23280 - - - false - - - false - - - %p% - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - + + + + + + diff --git a/examples/network/bearermonitor/main.cpp b/examples/network/bearermonitor/main.cpp index 1a22c13..11399e4 100644 --- a/examples/network/bearermonitor/main.cpp +++ b/examples/network/bearermonitor/main.cpp @@ -38,7 +38,8 @@ ** ****************************************************************************/ -#include +#include +#include #include "bearermonitor.h" @@ -46,8 +47,12 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); + QMainWindow mainWindow; + BearerMonitor monitor; - monitor.show(); + + mainWindow.setCentralWidget(&monitor); + mainWindow.show(); return app.exec(); } diff --git a/examples/network/bearermonitor/sessionwidget.cpp b/examples/network/bearermonitor/sessionwidget.cpp index 5ec9d53..51de0f2 100644 --- a/examples/network/bearermonitor/sessionwidget.cpp +++ b/examples/network/bearermonitor/sessionwidget.cpp @@ -74,7 +74,7 @@ SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *paren this, SLOT(closeSession())); connect(stopSessionButton, SIGNAL(clicked()), this, SLOT(stopSession())); -#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) +#ifdef MAEMO_UI connect(deleteSessionButton, SIGNAL(clicked()), this, SLOT(deleteSession())); #endif @@ -94,7 +94,7 @@ void SessionWidget::timerEvent(QTimerEvent *e) } } -#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) +#ifdef MAEMO_UI void SessionWidget::deleteSession() { delete this; diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h index c92db44..846a1af 100644 --- a/examples/network/bearermonitor/sessionwidget.h +++ b/examples/network/bearermonitor/sessionwidget.h @@ -42,7 +42,8 @@ #define SESSIONWIDGET_H #include -#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) + +#ifdef MAEMO_UI #include "ui_sessionwidget_maemo.h" #else #include "ui_sessionwidget.h" @@ -71,7 +72,7 @@ private Q_SLOTS: void stopSession(); void updateSession(); void updateSessionError(QNetworkSession::SessionError error); -#if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) +#ifdef MAEMO_UI void deleteSession(); #endif -- cgit v0.12