From 7db513d4bbc55cc398e1434b5121e2f1408f9baa Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Fri, 2 Jul 2010 13:15:54 +1000 Subject: Abort if connection to DBus cannot be established. Fixes network access issue when running Qt applications in scratchbox environment. Task-number: QT-3528 --- src/plugins/bearer/icd/qicdengine.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp index 9d1bfab..0638a36 100644 --- a/src/plugins/bearer/icd/qicdengine.cpp +++ b/src/plugins/bearer/icd/qicdengine.cpp @@ -251,6 +251,11 @@ void QIcdEngine::initialize() ICD_DBUS_API_INTERFACE, QDBusConnection::systemBus(), this); + + // abort if cannot connect to DBus. + if (!m_dbusInterface->isValid()) + return; + connect(&m_scanTimer, SIGNAL(timeout()), this, SLOT(finishAsyncConfigurationUpdate())); m_scanTimer.setSingleShot(true); -- cgit v0.12 From 29e6a5c1b1a17b8080c2dcae92dcea11b591907d Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Fri, 2 Jul 2010 13:18:42 +1000 Subject: Fix compiler warning. --- src/plugins/bearer/icd/qicdengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp index 0638a36..3033140 100644 --- a/src/plugins/bearer/icd/qicdengine.cpp +++ b/src/plugins/bearer/icd/qicdengine.cpp @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE IcdNetworkConfigurationPrivate::IcdNetworkConfigurationPrivate() -: network_attrs(0), service_attrs(0) +: service_attrs(0), network_attrs(0) { } -- cgit v0.12 From 906b3bfd27ba87b5b09899345e7484ecab7ab022 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 2 Jul 2010 10:51:51 +0200 Subject: Designer: Fix compiler warnings. Warnings introduced by 312c028d44a80f5d6029eb166a0de731f8452525 and gcc 4.5. Reviewed-by: Christian Kandeler --- src/declarative/graphicsitems/qdeclarativeitem.cpp | 1 + tools/designer/src/components/buddyeditor/buddyeditor.cpp | 1 + tools/designer/src/components/formeditor/qmdiarea_container.cpp | 1 + tools/designer/src/lib/shared/qdesigner_menu.cpp | 8 +++++--- tools/designer/src/lib/shared/qdesigner_toolbar.cpp | 1 + 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 9a17d78..4abffc6 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -347,6 +347,7 @@ void QDeclarativeContents::complete() void QDeclarativeContents::itemGeometryChanged(QDeclarativeItem *changed, const QRectF &newGeometry, const QRectF &oldGeometry) { + Q_UNUSED(changed) //### we can only pass changed if the left edge has moved left, or the right edge has moved right if (newGeometry.width() != oldGeometry.width() || newGeometry.x() != oldGeometry.x()) calcWidth(/*changed*/); diff --git a/tools/designer/src/components/buddyeditor/buddyeditor.cpp b/tools/designer/src/components/buddyeditor/buddyeditor.cpp index 9da257e..e367f9a 100644 --- a/tools/designer/src/components/buddyeditor/buddyeditor.cpp +++ b/tools/designer/src/components/buddyeditor/buddyeditor.cpp @@ -405,6 +405,7 @@ QWidget *BuddyEditor::findBuddy(QLabel *l, const QWidgetList &existingBuddies) c const int y = geom.center().y(); QWidget *neighbour = 0; switch (l->layoutDirection()) { + case Qt::LayoutDirectionAuto: case Qt::LeftToRight: { // Walk right to find next managed neighbour const int xEnd = parent->size().width(); for (int x = geom.right() + 1; x < xEnd; x += DeltaX) diff --git a/tools/designer/src/components/formeditor/qmdiarea_container.cpp b/tools/designer/src/components/formeditor/qmdiarea_container.cpp index 5971094..5e266f4 100644 --- a/tools/designer/src/components/formeditor/qmdiarea_container.cpp +++ b/tools/designer/src/components/formeditor/qmdiarea_container.cpp @@ -105,6 +105,7 @@ void QMdiAreaContainer::positionNewMdiChild(const QWidget *area, QWidget *mdiChi const QPoint pos = mdiChild->pos(); const QSize areaSize = area->size(); switch (QApplication::layoutDirection()) { + case Qt::LayoutDirectionAuto: case Qt::LeftToRight: { const QSize fullSize = QSize(areaSize.width() - pos.x(), areaSize.height() - pos.y()); if (fullSize.width() > MinSize && fullSize.height() > MinSize) diff --git a/tools/designer/src/lib/shared/qdesigner_menu.cpp b/tools/designer/src/lib/shared/qdesigner_menu.cpp index ba512e4..31a226a 100644 --- a/tools/designer/src/lib/shared/qdesigner_menu.cpp +++ b/tools/designer/src/lib/shared/qdesigner_menu.cpp @@ -77,6 +77,7 @@ using namespace qdesigner_internal; static inline void extendClickableArea(QRect *subMenuRect, Qt::LayoutDirection dir) { switch (dir) { + case Qt::LayoutDirectionAuto: // Should never happen case Qt::LeftToRight: subMenuRect->setLeft(subMenuRect->left() - 20); break; @@ -931,8 +932,8 @@ void QDesignerMenu::moveUp(bool ctrl) if (ctrl) (void) swap(m_currentIndex, m_currentIndex - 1); - - m_currentIndex = qMax(0, --m_currentIndex); + --m_currentIndex; + m_currentIndex = qMax(0, m_currentIndex); // Always re-select, swapping destroys order update(); selectCurrentAction(); @@ -947,7 +948,8 @@ void QDesignerMenu::moveDown(bool ctrl) if (ctrl) (void) swap(m_currentIndex + 1, m_currentIndex); - m_currentIndex = qMin(actions().count() - 1, ++m_currentIndex); + ++m_currentIndex; + m_currentIndex = qMin(actions().count() - 1, m_currentIndex); update(); if (!ctrl) selectCurrentAction(); diff --git a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp index 02a2f6d..e3bc64c 100644 --- a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp +++ b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp @@ -467,6 +467,7 @@ QRect ToolBarEventFilter::freeArea(const QToolBar *tb) switch (tb->orientation()) { case Qt::Horizontal: switch (tb->layoutDirection()) { + case Qt::LayoutDirectionAuto: // Should never happen case Qt::LeftToRight: rc.setX(exclusionRectangle.right() + 1); break; -- cgit v0.12 From 6b63f3e6b3b38822115a06b5229f4b006c9eb290 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 2 Jul 2010 11:25:46 +0200 Subject: qdoc: Fixed spacing before "default" and "read-only". Task-number: QTBUG-11346 --- doc/src/template/style/style.css | 2 ++ tools/qdoc3/htmlgenerator.cpp | 13 ++++++------- tools/qdoc3/test/style/style.css | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index f1a63a9..b174622 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -829,12 +829,14 @@ } .qmlreadonly { + padding-left: 5px; float: right; color: #254117; } .qmldefault { + padding-left: 5px; float: right; color: red; } diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 9f745c5..e1916b4 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -4464,14 +4464,13 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, while (p != qpgn->childNodes().end()) { if ((*p)->type() == Node::QmlProperty) { qpn = static_cast(*p); - - if (++numTableRows % 2 == 1) - out() << ""; - else - out() << ""; + if (++numTableRows % 2 == 1) + out() << ""; + else + out() << ""; - out() << "

"; - //out() << ""; // old + out() << "

"; + out() << ""; if (!qpn->isWritable()) out() << "read-only"; diff --git a/tools/qdoc3/test/style/style.css b/tools/qdoc3/test/style/style.css index 9c290f5..dff0772 100644 --- a/tools/qdoc3/test/style/style.css +++ b/tools/qdoc3/test/style/style.css @@ -776,12 +776,14 @@ } .qmlreadonly { + padding-left: 3px; float: right; color: #254117; } .qmldefault { + padding-left: 3px; float: right; color: red; } -- cgit v0.12