diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-15 06:09:15 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-15 06:09:15 (GMT) |
commit | 0a6d0d1d9aba54890908ec0ec02e066c060360c3 (patch) | |
tree | 1e484868f13b5453bbb7d171220317e7d6126d2a /examples | |
parent | 6100e83f3cbf40199da3078c1954a4dc1f77cb8f (diff) | |
parent | b0f4dab4c825650c3a7a72b87508bf6f3e5ffd50 (diff) | |
download | Qt-0a6d0d1d9aba54890908ec0ec02e066c060360c3.zip Qt-0a6d0d1d9aba54890908ec0ec02e066c060360c3.tar.gz Qt-0a6d0d1d9aba54890908ec0ec02e066c060360c3.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Revert "More improvements to pixmap cache key generation"
More improvements to pixmap cache key generation
More 4.7 stuff.
Fix for autotest failure in qwidget::saveRestoreGeometry()
Optimized pixmapcache key generation for icons and styles
doc: Another upgrade of the top page and overviews.
Mac: restoreGeometry()
[Regression] Build failure on Mac Carbon
doc: Added some \briefs to how-to docs.
Some 4.7 changes.
Updated changelog.
Cherry pick fix for MOBILITY-932 from Qt Mobility.
Cherry pick fix for MOBILITY-962 from Qt Mobility.
Cherry pick fix for MOBILITY-828 from Qt Mobility.
Bearer management changes from Qt Mobility.
Cherry pick fix for MOBILITY-828 from Qt Mobility.
Added snippet labels to QML Dial example.
Fixed documentation typo.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/declarative/dial/content/Dial.qml | 6 | ||||
-rw-r--r-- | examples/declarative/dial/dial-example.qml | 10 | ||||
-rw-r--r-- | examples/network/bearermonitor/bearermonitor.cpp | 3 | ||||
-rw-r--r-- | examples/network/bearermonitor/sessionwidget.cpp | 12 | ||||
-rw-r--r-- | examples/network/bearermonitor/sessionwidget.h | 5 | ||||
-rw-r--r-- | examples/network/bearermonitor/sessionwidget.ui | 2 |
6 files changed, 32 insertions, 6 deletions
diff --git a/examples/declarative/dial/content/Dial.qml b/examples/declarative/dial/content/Dial.qml index f9ab3e3..6f24801 100644 --- a/examples/declarative/dial/content/Dial.qml +++ b/examples/declarative/dial/content/Dial.qml @@ -8,6 +8,7 @@ Item { Image { source: "background.png" } +//! [needle_shadow] Image { x: 93 y: 35 @@ -17,6 +18,8 @@ Item { angle: needleRotation.angle } } +//! [needle_shadow] +//! [needle] Image { id: needle x: 95; y: 33 @@ -33,5 +36,8 @@ Item { } } } +//! [needle] +//! [overlay] Image { x: 21; y: 18; source: "overlay.png" } +//! [overlay] } diff --git a/examples/declarative/dial/dial-example.qml b/examples/declarative/dial/dial-example.qml index 2e102b0..900954f 100644 --- a/examples/declarative/dial/dial-example.qml +++ b/examples/declarative/dial/dial-example.qml @@ -1,6 +1,7 @@ import Qt 4.7 import "content" +//! [0] Rectangle { color: "#545454" width: 300; height: 300 @@ -14,7 +15,10 @@ Rectangle { Rectangle { id: container - anchors { bottom: parent.bottom; left: parent.left; right: parent.right; leftMargin: 20; rightMargin: 20; bottomMargin: 10 } + anchors { bottom: parent.bottom; left: parent.left + right: parent.right; leftMargin: 20; rightMargin: 20 + bottomMargin: 10 + } height: 16 radius: 8 @@ -37,8 +41,10 @@ Rectangle { MouseArea { anchors.fill: parent - drag.target: parent; drag.axis: Drag.XAxis; drag.minimumX: 2; drag.maximumX: container.width - 32 + drag.target: parent; drag.axis: Drag.XAxis + drag.minimumX: 2; drag.maximumX: container.width - 32 } } } } +//! [0]
\ No newline at end of file diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp index 4a6c6ff..0d98eff 100644 --- a/examples/network/bearermonitor/bearermonitor.cpp +++ b/examples/network/bearermonitor/bearermonitor.cpp @@ -255,6 +255,7 @@ void BearerMonitor::onlineStateChanged(bool isOnline) void BearerMonitor::registerNetwork() { QTreeWidgetItem *item = treeWidget->currentItem(); + if (!item) return; QNetworkConfiguration configuration = manager.configurationFromIdentifier(item->data(0, Qt::UserRole).toString()); @@ -276,6 +277,7 @@ void BearerMonitor::registerNetwork() void BearerMonitor::unregisterNetwork() { QTreeWidgetItem *item = treeWidget->currentItem(); + if (!item) return; QNetworkConfiguration configuration = manager.configurationFromIdentifier(item->data(0, Qt::UserRole).toString()); @@ -384,6 +386,7 @@ void BearerMonitor::createSessionFor(QTreeWidgetItem *item) void BearerMonitor::createNewSession() { QTreeWidgetItem *item = treeWidget->currentItem(); + if (!item) return; createSessionFor(item); } diff --git a/examples/network/bearermonitor/sessionwidget.cpp b/examples/network/bearermonitor/sessionwidget.cpp index 443f4b2..3a8e5ea 100644 --- a/examples/network/bearermonitor/sessionwidget.cpp +++ b/examples/network/bearermonitor/sessionwidget.cpp @@ -59,7 +59,7 @@ SessionWidget::SessionWidget(const QNetworkConfiguration &config, QWidget *paren connect(session, SIGNAL(stateChanged(QNetworkSession::State)), this, SLOT(updateSession())); connect(session, SIGNAL(error(QNetworkSession::SessionError)), - this, SLOT(updateSession())); + this, SLOT(updateSessionError(QNetworkSession::SessionError))); updateSession(); @@ -105,7 +105,6 @@ void SessionWidget::deleteSession() void SessionWidget::updateSession() { updateSessionState(session->state()); - updateSessionError(session->error()); if (session->state() == QNetworkSession::Connected) statsTimer = startTimer(1000); @@ -128,12 +127,14 @@ void SessionWidget::updateSession() void SessionWidget::openSession() { + clearError(); session->open(); updateSession(); } void SessionWidget::openSyncSession() { + clearError(); session->open(); session->waitForOpened(); updateSession(); @@ -141,12 +142,14 @@ void SessionWidget::openSyncSession() void SessionWidget::closeSession() { + clearError(); session->close(); updateSession(); } void SessionWidget::stopSession() { + clearError(); session->stop(); updateSession(); } @@ -195,3 +198,8 @@ void SessionWidget::updateSessionError(QNetworkSession::SessionError error) errorString->setText(session->errorString()); } +void SessionWidget::clearError() +{ + lastError->clear(); + errorString->clear(); +} diff --git a/examples/network/bearermonitor/sessionwidget.h b/examples/network/bearermonitor/sessionwidget.h index 5e9d62c..b299b47 100644 --- a/examples/network/bearermonitor/sessionwidget.h +++ b/examples/network/bearermonitor/sessionwidget.h @@ -63,7 +63,7 @@ public: private: void updateSessionState(QNetworkSession::State state); - void updateSessionError(QNetworkSession::SessionError error); + void clearError(); private Q_SLOTS: void openSession(); @@ -71,9 +71,12 @@ private Q_SLOTS: void closeSession(); void stopSession(); void updateSession(); + void updateSessionError(QNetworkSession::SessionError error); #if defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6) void deleteSession(); #endif + + private: QNetworkSession *session; int statsTimer; diff --git a/examples/network/bearermonitor/sessionwidget.ui b/examples/network/bearermonitor/sessionwidget.ui index 45135f5..56a2d0e 100644 --- a/examples/network/bearermonitor/sessionwidget.ui +++ b/examples/network/bearermonitor/sessionwidget.ui @@ -195,7 +195,7 @@ <item> <widget class="QLabel" name="errorStringLabel"> <property name="text"> - <string>Error String</string> + <string>Error String:</string> </property> </widget> </item> |