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 From 990a19f9e19b84a896f55ea580e6db4edbca2573 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 4 Nov 2010 14:17:03 +0100 Subject: Doc: adding html clasnames to the next and previous links Reviewed-by: David Boddie --- tools/qdoc3/htmlgenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index fb04175..82cafa0 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1930,7 +1930,7 @@ void HtmlGenerator::generateHeader(const QString& title, } if (node && !node->links().empty()) - out() << "

\n" << navigationLinks << "

\n"; + out() << "

\n" << navigationLinks << "

\n"; } void HtmlGenerator::generateTitle(const QString& title, @@ -1955,7 +1955,7 @@ void HtmlGenerator::generateTitle(const QString& title, void HtmlGenerator::generateFooter(const Node *node) { if (node && !node->links().empty()) - out() << "

\n" << navigationLinks << "

\n"; + out() << "

\n" << navigationLinks << "

\n"; out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version()) << QString(address).replace("\\" + COMMAND_VERSION, myTree->version()); -- cgit v0.12 From 81fd236d0fa4d66ac288c450c7993acec110b8f6 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Thu, 4 Nov 2010 14:49:44 +0100 Subject: Doc: reintroducing QML elements table temporarily --- doc/src/declarative/elements.qdoc | 106 +++++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 2 deletions(-) diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index a0eb95d..54f07a2 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -37,8 +37,110 @@ To see the QML elements listed by functional area, see the \l{Groups Of Related QML Elements} page. - \generatelist qmlclasses - + \table + \header \o {2,1} \bold {Basic Visual Items} + \row \o \l {Item} \o Basic item element inherited by all visual items in QML + \row \o \l {Rectangle} \o Basic visual rectangle element + \row \o \l {Gradient} \o Defines a gradient between two or more colors + \row \o \l {GradientStop} \o Defines a color used in a \l {Gradient} + \row \o \l {Image} \o Allows the use of bitmaps to a scene + \row \o \l {BorderImage} (Item-specific) \o Defines an image as a border + \row \o \l {AnimatedImage} \o For playing animations stored as a series of frames + \row \o \l {Text} \o Allows the use of formatted text in a scene + \row \o \l {TextInput} \o Displays an editable line of text + \row \o \l {IntValidator} \o Validator for integer values + \row \o \l {DoubleValidator} \o Validator for non-integer values + \row \o \l {RegExpValidator} \o Validator for string regular expressions + \row \o \l {TextEdit} \o Displays multiple lines of editable formatted text + + \header \o {2,1} \bold {Basic Interaction Items} + \row \o \l {MouseArea} \o Handles mouse interactions + \row \o \l {FocusScope} \o For keyboard focus handling + \row \o \l {Flickable} \o Provides a surface that can be "flicked" + \row \o \l {Flipable} \o Provides a surface that produces flipping effects + \row \o \l {GestureArea} (experimental) \o Enables simple gesture handling + + \header \o {2,1} \bold {States} + \row \o \l {State} \o Defines sets of configurations of objects and properties + \row \o \l {PropertyChanges} \o Describes property changes within a state + \row \o \l {StateGroup} \o Contains a set of states and state transitions + \row \o \l {StateChangeScript} \o Allows script binding in a state + \row \o \l {ParentChange} (Item-specific) \o Re-parent an Item in a state change + \row \o \l {AnchorChanges} \o Change the anchors of an item in a state + + \header \o {2,1} \bold {Animation and Transitions} + \row \o \l {Behavior} \o Specifies a default animation for property changes + \row \o \l {SequentialAnimation} \o Runs animations sequentially + \row \o \l {ParallelAnimation} \o Runs animations in parallel + \row \o \l {PropertyAnimation} \o Animates property changes + \row \o \l {NumberAnimation} \o Animates properties of type qreal + \row \o \l {Vector3dAnimation} \o Animates properties of type QVector3d + \row \o \l {ColorAnimation} \o Animates color changes + \row \o \l {RotationAnimation} \o Animates rotations + \row \o \l {ParentAnimation} \o Animates parent changes + \row \o \l {AnchorAnimation} \o Animates anchor changes + \row \o \l {PauseAnimation} \o Pauses an animation + \row \o \l {SmoothedAnimation} \o Allows a property to smoothly track a value + \row \o \l {SpringAnimation} \o Allows a property to track a value in a spring-like motion + \row \o \l {PropertyAction} \o Sets immediate property changes during animation + \row \o \l {ScriptAction} \o Runs scripts during an animation + \row \o \l {Transition} \o Animates transitions during state changes + + \header \o {2,1} \bold {Working with Data} + \row \o \l {Binding} \o Binds any value to any property + \row \o \l {ListModel} \o Defines a list of data + \row \o \l {ListElement} \o Defines a data item in a \l {ListModel} + \row \o \l {VisualItemModel} \o Contains items that already defines its own visual delegate + \row \o \l {VisualDataModel} \o Encapsulates a model and a delegate + \row \o \l {Package} \o Collection that enables sharing of items within different views + \row \o \l {XmlListModel} \o Specifies a model using XPath expressions + \row \o \l {XmlRole} \o Specifies a role for an \l {XmlListModel} + + \header \o {2,1} \bold {Views} + \row \o \l {ListView} \o Provides a list visualization of a model + \row \o \l {GridView} \o Provides a grid visualization of a model + \row \o \l {PathView} \o Visualizes a model's contents along a path + \row \o \l {Path} \o Defines a path used by \l {PathView} + \row \o \l {PathLine} \o Defines a line in \l {Path} + \row \o \l {PathQuad} \o Defines a quadratic Bezier curve in a \l {Path} + \row \o \l {PathCubic} \o Defines a cubic Bezier curve in a \l {Path} + \row \o \l {PathAttribute} \o Allows the setting of attributes along a \l {Path} + \row \o \l {PathPercent} \o Modifies the item distribution along a \l {Path} + \row \o \l {WebView} \o Allows the addition of web content to a canvas + + \header \o {2,1} \bold {Positioners} + \row \o \l {Column} \o Arranges its children vertically + \row \o \l {Row} \o Arranges its children horizontally + \row \o \l {Grid} \o Positions its children in a grid + \row \o \l {Flow} \o Positions its children with wrapping support + + \header \o {2,1} \bold {Utility} + \row \o \l {Connections} \o Explicitly connects signals and signal handlers + \row \o \l {Component} \o Encapsulate QML items as a component + \row \o \l {Timer} \o Provides timed triggers + \row \o \l {QML:QtObject} {QtObject} \o Basic element containing only the objectName property + \row \o \l {QML:Qt} {Qt} \o The QML global Qt object provides useful enums and functions from Qt. + \row \o \l {WorkerScript} \o Enables the use of threads in QML + \row \o \l {Loader} \o Controls the loading of items or components + \row \o \l {Repeater} \o Uses a model to create multiples of components + \row \o \l {SystemPalette} \o Provides access to the Qt palettes + \row \o \l {FontLoader} \o Loads fonts by name or URL + \row \o \l {LayoutItem} \o Allows declarative UI elements inside Qt's Graphics View layouts + + \header \o {2,1} \bold {Transforms} + \row \o \l {Scale} \o Assigns item scaling behaviors + \row \o \l {Rotation} \o Assigns item rotation behaviors + \row \o \l {Translate} \o Assigns item translation behaviors + + \header \o {2,1} \bold {Effects} + \row \o \l {Particles} (experimental) \o Generates and animates particles + \row \o \l {ParticleMotionLinear} \o Adds linear motion behavior to \l {Particles} + \row \o \l {ParticleMotionGravity} \o Adds gravitational motion to \l {Particles} + \row \o \l {ParticleMotionWander} \o Adds varied motions to \l {Particles} + \endtable + + + */ -- cgit v0.12