From 67666e78b2667ef6220372d2042f0477adfb09f3 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 1 Jun 2010 21:19:27 +0200 Subject: Slight addition to the docs. --- doc/src/declarative/qtbinding.qdoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc index 7d696d7..784c59a 100644 --- a/doc/src/declarative/qtbinding.qdoc +++ b/doc/src/declarative/qtbinding.qdoc @@ -269,5 +269,10 @@ For example: \c [project/main.qml] \snippet doc/src/snippets/declarative/qtbinding/resources/main.qml 0 +Note that the resource system cannot be accessed from QML directly. If the main QML file is +loaded as a resource, all files specifed as relative paths in QML will also be loaded from +the resource system. Using the resource system is completely transparent to the QML layer. +This also means that if the main QML file is not loaded as a resource then files in the resource +system cannot be accessed from QML. */ -- cgit v0.12 From ff35fc61cc8d6b103da4f079fce170d82406cea0 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Wed, 2 Jun 2010 09:21:35 +0200 Subject: Doc: Removed a link to Qt3 support in QSlider Task-number: QTBUG-6394 --- src/gui/widgets/qslider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qslider.cpp b/src/gui/widgets/qslider.cpp index a5e62cf..5755202 100644 --- a/src/gui/widgets/qslider.cpp +++ b/src/gui/widgets/qslider.cpp @@ -621,7 +621,7 @@ QSlider::TickPosition QSlider::tickPosition() const \brief the interval between tickmarks This is a value interval, not a pixel interval. If it is 0, the - slider will choose between lineStep() and pageStep(). + slider will choose between singleStep() and pageStep(). The default value is 0. -- cgit v0.12 From 4ebe96275944643a06ac4119ef707e1436df5781 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Wed, 2 Jun 2010 11:33:24 +0200 Subject: Reset gesture when in MayBeGesture state. When a gesture recognizer switches from MayBeGesture to Cancelled gesture we need to reset the state of the recognizer, but do not send any events to the user. Reviewed-by: Thomas Zander --- src/gui/kernel/qgesturemanager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index 43facef..7363d70 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -284,6 +284,9 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap activeToMaybeGestures = m_activeGestures & newMaybeGestures; + // check if a maybe gesture switched to canceled - reset it but don't send an event + QSet maybeToCanceledGestures = m_maybeGestures & notGestures; + // check if a running gesture switched back to not gesture state, // i.e. were canceled QSet canceledGestures = m_activeGestures & notGestures; @@ -343,7 +346,8 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap undeliveredGestures; @@ -364,7 +368,7 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap endedGestures = - finishedGestures + canceledGestures + undeliveredGestures; + finishedGestures + canceledGestures + undeliveredGestures + maybeToCanceledGestures; foreach (QGesture *gesture, endedGestures) { recycle(gesture); m_gestureTargets.remove(gesture); -- cgit v0.12 From 79742b14982004ac1b77558e6ab6b649898336c7 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 3 Jun 2010 15:27:23 +1000 Subject: Add header and footer to GridView Also document them for both ListView and GridView Task-number: QTBUG-11191 --- .../graphicsitems/qdeclarativegridview.cpp | 190 ++++++++++++++++++++- .../graphicsitems/qdeclarativegridview_p.h | 11 ++ .../graphicsitems/qdeclarativelistview.cpp | 26 +++ .../tst_qdeclarativegridview.cpp | 13 ++ 4 files changed, 239 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index ffffc2f..82c69a0 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -108,6 +108,7 @@ public: , highlightComponent(0), highlight(0), trackedItem(0) , moveReason(Other), buffer(0), highlightXAnimator(0), highlightYAnimator(0) , highlightMoveDuration(150) + , footerComponent(0), footer(0), headerComponent(0), header(0) , bufferMode(BufferBefore | BufferAfter), snapMode(QDeclarativeGridView::NoSnap) , ownModel(false), wrap(false), autoHighlight(true) , fixCurrentVisibility(false), lazyRelease(false), layoutScheduled(false) @@ -128,6 +129,8 @@ public: void createHighlight(); void updateHighlight(); void updateCurrent(int modelIndex); + void updateHeader(); + void updateFooter(); void fixupPosition(); FxGridItem *visibleItem(int modelIndex) const { @@ -230,6 +233,18 @@ public: return visibleItems.count() ? visibleItems.first() : 0; } + int lastVisibleIndex() const { + int lastIndex = -1; + for (int i = visibleItems.count()-1; i >= 0; --i) { + FxGridItem *gridItem = visibleItems.at(i); + if (gridItem->index != -1) { + lastIndex = gridItem->index; + break; + } + } + return lastIndex; + } + // Map a model index to visibleItems list index. // These may differ if removed items are still present in the visible list, // e.g. doing a removal animation @@ -283,6 +298,9 @@ public: scheduleLayout(); } } + } else if ((header && header->item == item) || (footer && footer->item == item)) { + updateHeader(); + updateFooter(); } } @@ -330,6 +348,10 @@ public: QSmoothedAnimation *highlightXAnimator; QSmoothedAnimation *highlightYAnimator; int highlightMoveDuration; + QDeclarativeComponent *footerComponent; + FxGridItem *footer; + QDeclarativeComponent *headerComponent; + FxGridItem *header; enum BufferMode { NoBuffer = 0x00, BufferBefore = 0x01, BufferAfter = 0x02 }; int bufferMode; QDeclarativeGridView::SnapMode snapMode; @@ -412,7 +434,6 @@ void QDeclarativeGridViewPrivate::refill(qreal from, qreal to, bool doBuffer) Q_Q(QDeclarativeGridView); if (!isValid() || !q->isComponentComplete()) return; - itemCount = model->count(); qreal bufferFrom = from - buffer; qreal bufferTo = to + buffer; @@ -522,6 +543,10 @@ void QDeclarativeGridViewPrivate::refill(qreal from, qreal to, bool doBuffer) deferredRelease = true; } if (changed) { + if (header) + updateHeader(); + if (footer) + updateFooter(); if (flow == QDeclarativeGridView::LeftToRight) q->setContentHeight(endPosition() - startPosition()); else @@ -579,6 +604,10 @@ void QDeclarativeGridViewPrivate::layout() item->setPosition(colPos, rowPos); } } + if (header) + updateHeader(); + if (footer) + updateFooter(); q->refill(); updateHighlight(); moveReason = Other; @@ -742,6 +771,94 @@ void QDeclarativeGridViewPrivate::updateCurrent(int modelIndex) releaseItem(oldCurrentItem); } +void QDeclarativeGridViewPrivate::updateFooter() +{ + Q_Q(QDeclarativeGridView); + if (!footer && footerComponent) { + QDeclarativeItem *item = 0; + QDeclarativeContext *context = new QDeclarativeContext(qmlContext(q)); + QObject *nobj = footerComponent->create(context); + if (nobj) { + QDeclarative_setParent_noEvent(context, nobj); + item = qobject_cast(nobj); + if (!item) + delete nobj; + } else { + delete context; + } + if (item) { + QDeclarative_setParent_noEvent(item, q->viewport()); + item->setParentItem(q->viewport()); + item->setZValue(1); + QDeclarativeItemPrivate *itemPrivate = static_cast(QGraphicsItemPrivate::get(item)); + itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry); + footer = new FxGridItem(item, q); + } + } + if (footer) { + if (visibleItems.count()) { + qreal endPos = endPosition(); + if (lastVisibleIndex() == model->count()-1) { + footer->setPosition(0, endPos); + } else { + qreal visiblePos = position() + q->height(); + if (endPos <= visiblePos || footer->endRowPos() < endPos) + footer->setPosition(0, endPos); + } + } else { + qreal endPos = 0; + if (header) { + endPos += flow == QDeclarativeGridView::LeftToRight + ? header->item->height() + : header->item->width(); + } + footer->setPosition(0, endPos); + } + } +} + +void QDeclarativeGridViewPrivate::updateHeader() +{ + Q_Q(QDeclarativeGridView); + if (!header && headerComponent) { + QDeclarativeItem *item = 0; + QDeclarativeContext *context = new QDeclarativeContext(qmlContext(q)); + QObject *nobj = headerComponent->create(context); + if (nobj) { + QDeclarative_setParent_noEvent(context, nobj); + item = qobject_cast(nobj); + if (!item) + delete nobj; + } else { + delete context; + } + if (item) { + QDeclarative_setParent_noEvent(item, q->viewport()); + item->setParentItem(q->viewport()); + item->setZValue(1); + QDeclarativeItemPrivate *itemPrivate = static_cast(QGraphicsItemPrivate::get(item)); + itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry); + header = new FxGridItem(item, q); + } + } + if (header) { + if (visibleItems.count()) { + qreal startPos = startPosition(); + qreal headerSize = flow == QDeclarativeGridView::LeftToRight + ? header->item->height() + : header->item->width(); + if (visibleIndex == 0) { + header->setPosition(0, startPos - headerSize); + } else { + if (position() <= startPos || header->rowPos() > startPos - headerSize) + header->setPosition(0, startPos - headerSize); + } + } else { + header->setPosition(0, 0); + } + } +} + void QDeclarativeGridViewPrivate::fixupPosition() { moveReason = Other; @@ -958,6 +1075,8 @@ QDeclarativeGridView::~QDeclarativeGridView() d->clear(); if (d->ownModel) delete d->model; + delete d->header; + delete d->footer; } /*! @@ -1524,6 +1643,67 @@ void QDeclarativeGridView::setSnapMode(SnapMode mode) } } +/*! + \qmlproperty Component GridView::footer + This property holds the component to use as the footer. + + An instance of the footer component is created for each view. The + footer is positioned at the end of the view, after any items. + + \sa header +*/ +QDeclarativeComponent *QDeclarativeGridView::footer() const +{ + Q_D(const QDeclarativeGridView); + return d->footerComponent; +} + +void QDeclarativeGridView::setFooter(QDeclarativeComponent *footer) +{ + Q_D(QDeclarativeGridView); + if (d->footerComponent != footer) { + if (d->footer) { + delete d->footer; + d->footer = 0; + } + d->footerComponent = footer; + d->updateFooter(); + d->updateGrid(); + emit footerChanged(); + } +} + +/*! + \qmlproperty Component GridView::header + This property holds the component to use as the header. + + An instance of the header component is created for each view. The + header is positioned at the beginning of the view, before any items. + + \sa footer +*/ +QDeclarativeComponent *QDeclarativeGridView::header() const +{ + Q_D(const QDeclarativeGridView); + return d->headerComponent; +} + +void QDeclarativeGridView::setHeader(QDeclarativeComponent *header) +{ + Q_D(QDeclarativeGridView); + if (d->headerComponent != header) { + if (d->header) { + delete d->header; + d->header = 0; + } + d->headerComponent = header; + d->updateHeader(); + d->updateFooter(); + d->updateGrid(); + emit headerChanged(); + } +} + bool QDeclarativeGridView::event(QEvent *event) { Q_D(QDeclarativeGridView); @@ -1590,6 +1770,8 @@ qreal QDeclarativeGridView::minYExtent() const if (d->flow == QDeclarativeGridView::TopToBottom) return QDeclarativeFlickable::minYExtent(); qreal extent = -d->startPosition(); + if (d->header && d->visibleItems.count()) + extent += d->header->item->height(); if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { extent += d->highlightRangeStart; extent = qMax(extent, -(d->rowPosAt(0) + d->rowSize() - d->highlightRangeEnd)); @@ -1610,6 +1792,8 @@ qreal QDeclarativeGridView::maxYExtent() const } else { extent = -(d->endPosition() - height()); } + if (d->footer) + extent -= d->footer->item->height(); const qreal minY = minYExtent(); if (extent > minY) extent = minY; @@ -1622,6 +1806,8 @@ qreal QDeclarativeGridView::minXExtent() const if (d->flow == QDeclarativeGridView::LeftToRight) return QDeclarativeFlickable::minXExtent(); qreal extent = -d->startPosition(); + if (d->header && d->visibleItems.count()) + extent += d->header->item->width(); if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { extent += d->highlightRangeStart; extent = qMax(extent, -(d->rowPosAt(0) + d->rowSize() - d->highlightRangeEnd)); @@ -1642,6 +1828,8 @@ qreal QDeclarativeGridView::maxXExtent() const } else { extent = -(d->endPosition() - height()); } + if (d->footer) + extent -= d->footer->item->width(); const qreal minX = minXExtent(); if (extent > minX) extent = minX; diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h index 2bf154c..021aad9 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview_p.h +++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h @@ -80,6 +80,9 @@ class Q_DECLARATIVE_EXPORT QDeclarativeGridView : public QDeclarativeFlickable Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged) + Q_PROPERTY(QDeclarativeComponent *header READ header WRITE setHeader NOTIFY headerChanged) + Q_PROPERTY(QDeclarativeComponent *footer READ footer WRITE setFooter NOTIFY footerChanged) + Q_ENUMS(HighlightRangeMode) Q_ENUMS(SnapMode) Q_ENUMS(Flow) @@ -142,6 +145,12 @@ public: SnapMode snapMode() const; void setSnapMode(SnapMode mode); + QDeclarativeComponent *footer() const; + void setFooter(QDeclarativeComponent *); + + QDeclarativeComponent *header() const; + void setHeader(QDeclarativeComponent *); + enum PositionMode { Beginning, Center, End, Visible, Contain }; Q_INVOKABLE void positionViewAtIndex(int index, int mode); @@ -172,6 +181,8 @@ Q_SIGNALS: void keyNavigationWrapsChanged(); void cacheBufferChanged(); void snapModeChanged(); + void headerChanged(); + void footerChanged(); protected: virtual bool event(QEvent *event); diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index dbd1976..f2cc971 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -427,6 +427,10 @@ public: scheduleLayout(); } } + if ((header && header->item == item) || (footer && footer->item == item)) { + updateHeader(); + updateFooter(); + } if (currentItem && currentItem->item == item) updateHighlight(); if (trackedItem && trackedItem->item == item) @@ -1045,6 +1049,8 @@ void QDeclarativeListViewPrivate::updateFooter() QDeclarative_setParent_noEvent(item, q->viewport()); item->setParentItem(q->viewport()); item->setZValue(1); + QDeclarativeItemPrivate *itemPrivate = static_cast(QGraphicsItemPrivate::get(item)); + itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry); footer = new FxListItem(item, q); } } @@ -1083,6 +1089,8 @@ void QDeclarativeListViewPrivate::updateHeader() QDeclarative_setParent_noEvent(item, q->viewport()); item->setParentItem(q->viewport()); item->setZValue(1); + QDeclarativeItemPrivate *itemPrivate = static_cast(QGraphicsItemPrivate::get(item)); + itemPrivate->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry); header = new FxListItem(item, q); if (visibleItems.isEmpty()) visiblePos = header->size(); @@ -2074,6 +2082,15 @@ void QDeclarativeListView::setSnapMode(SnapMode mode) } } +/*! + \qmlproperty Component ListView::footer + This property holds the component to use as the footer. + + An instance of the footer component is created for each view. The + footer is positioned at the end of the view, after any items. + + \sa header +*/ QDeclarativeComponent *QDeclarativeListView::footer() const { Q_D(const QDeclarativeListView); @@ -2097,6 +2114,15 @@ void QDeclarativeListView::setFooter(QDeclarativeComponent *footer) } } +/*! + \qmlproperty Component ListView::header + This property holds the component to use as the header. + + An instance of the header component is created for each view. The + header is positioned at the beginning of the view, before any items. + + \sa footer +*/ QDeclarativeComponent *QDeclarativeListView::header() const { Q_D(const QDeclarativeListView); diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index 2db3ee6..fb09d39 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -833,21 +833,34 @@ void tst_QDeclarativeGridView::componentChanges() QSignalSpy highlightSpy(gridView, SIGNAL(highlightChanged())); QSignalSpy delegateSpy(gridView, SIGNAL(delegateChanged())); + QSignalSpy headerSpy(gridView, SIGNAL(headerChanged())); + QSignalSpy footerSpy(gridView, SIGNAL(footerChanged())); gridView->setHighlight(&component); gridView->setDelegate(&delegateComponent); + gridView->setHeader(&component); + gridView->setFooter(&component); QTRY_COMPARE(gridView->highlight(), &component); QTRY_COMPARE(gridView->delegate(), &delegateComponent); + QTRY_COMPARE(gridView->header(), &component); + QTRY_COMPARE(gridView->footer(), &component); QTRY_COMPARE(highlightSpy.count(),1); QTRY_COMPARE(delegateSpy.count(),1); + QTRY_COMPARE(headerSpy.count(),1); + QTRY_COMPARE(footerSpy.count(),1); gridView->setHighlight(&component); gridView->setDelegate(&delegateComponent); + gridView->setHeader(&component); + gridView->setFooter(&component); QTRY_COMPARE(highlightSpy.count(),1); QTRY_COMPARE(delegateSpy.count(),1); + QTRY_COMPARE(headerSpy.count(),1); + QTRY_COMPARE(footerSpy.count(),1); + delete canvas; } -- cgit v0.12 From 9337c140cab7db1285f893b66d0e56423a74c253 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 3 Jun 2010 16:31:29 +1000 Subject: Always integer align anchor center points This dramatically reduces the number of items that are half pixel aligned and thus render poorly. --- .../graphicsitems/qdeclarativeanchors.cpp | 48 ++++++++++++++++------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeanchors.cpp b/src/declarative/graphicsitems/qdeclarativeanchors.cpp index aa53aba..6796977 100644 --- a/src/declarative/graphicsitems/qdeclarativeanchors.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanchors.cpp @@ -53,6 +53,30 @@ QT_BEGIN_NAMESPACE //TODO: should we cache relationships, so we don't have to check each time (parent-child or sibling)? //TODO: support non-parent, non-sibling (need to find lowest common ancestor) +static qreal hcenter(QGraphicsItem *i) +{ + QGraphicsItemPrivate *item = QGraphicsItemPrivate::get(i); + + qreal width = item->width(); + int iw = width; + if (iw % 2) + return (width + 1) / 2; + else + return width / 2; +} + +static qreal vcenter(QGraphicsItem *i) +{ + QGraphicsItemPrivate *item = QGraphicsItemPrivate::get(i); + + qreal height = item->height(); + int ih = height; + if (ih % 2) + return (height + 1) / 2; + else + return height / 2; +} + //### const item? //local position static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine anchorLine) @@ -73,10 +97,10 @@ static qreal position(QGraphicsObject *item, QDeclarativeAnchorLine::AnchorLine ret = item->y() + d->height(); break; case QDeclarativeAnchorLine::HCenter: - ret = item->x() + d->width()/2; + ret = item->x() + hcenter(item); break; case QDeclarativeAnchorLine::VCenter: - ret = item->y() + d->height()/2; + ret = item->y() + vcenter(item); break; case QDeclarativeAnchorLine::Baseline: if (d->isDeclarativeItem) @@ -108,10 +132,10 @@ static qreal adjustedPosition(QGraphicsObject *item, QDeclarativeAnchorLine::Anc ret = d->height(); break; case QDeclarativeAnchorLine::HCenter: - ret = d->width()/2; + ret = hcenter(item); break; case QDeclarativeAnchorLine::VCenter: - ret = d->height()/2; + ret = vcenter(item); break; case QDeclarativeAnchorLine::Baseline: if (d->isDeclarativeItem) @@ -192,14 +216,14 @@ void QDeclarativeAnchorsPrivate::centerInChanged() QGraphicsItemPrivate *itemPrivate = QGraphicsItemPrivate::get(item); if (centerIn == item->parentItem()) { QGraphicsItemPrivate *parentPrivate = QGraphicsItemPrivate::get(item->parentItem()); - QPointF p((parentPrivate->width() - itemPrivate->width()) / 2. + hCenterOffset, - (parentPrivate->height() - itemPrivate->height()) / 2. + vCenterOffset); + QPointF p(hcenter(item->parentItem()) - hcenter(item) + hCenterOffset, + vcenter(item->parentItem()) - vcenter(item) + vCenterOffset); setItemPos(p); } else if (centerIn->parentItem() == item->parentItem()) { QGraphicsItemPrivate *centerPrivate = QGraphicsItemPrivate::get(centerIn); - QPointF p(centerIn->x() + (centerPrivate->width() - itemPrivate->width()) / 2. + hCenterOffset, - centerIn->y() + (centerPrivate->height() - itemPrivate->height()) / 2. + vCenterOffset); + QPointF p(centerIn->x() + hcenter(centerIn) - hcenter(item) + hCenterOffset, + centerIn->y() + vcenter(centerIn) - vcenter(item) + vCenterOffset); setItemPos(p); } @@ -535,9 +559,9 @@ void QDeclarativeAnchorsPrivate::updateVerticalAnchors() //Handle vCenter if (vCenter.item == item->parentItem()) { setItemY(adjustedPosition(vCenter.item, vCenter.anchorLine) - - itemPrivate->height()/2 + vCenterOffset); + - vcenter(item) + vCenterOffset); } else if (vCenter.item->parentItem() == item->parentItem()) { - setItemY(position(vCenter.item, vCenter.anchorLine) - itemPrivate->height()/2 + vCenterOffset); + setItemY(position(vCenter.item, vCenter.anchorLine) - vcenter(item) + vCenterOffset); } } else if (usedAnchors & QDeclarativeAnchors::BaselineAnchor) { //Handle baseline @@ -604,9 +628,9 @@ void QDeclarativeAnchorsPrivate::updateHorizontalAnchors() } else if (usedAnchors & QDeclarativeAnchors::HCenterAnchor) { //Handle hCenter if (hCenter.item == item->parentItem()) { - setItemX(adjustedPosition(hCenter.item, hCenter.anchorLine) - itemPrivate->width()/2 + hCenterOffset); + setItemX(adjustedPosition(hCenter.item, hCenter.anchorLine) - hcenter(item) + hCenterOffset); } else if (hCenter.item->parentItem() == item->parentItem()) { - setItemX(position(hCenter.item, hCenter.anchorLine) - itemPrivate->width()/2 + hCenterOffset); + setItemX(position(hCenter.item, hCenter.anchorLine) - hcenter(item) + hCenterOffset); } } -- cgit v0.12 From 939375996496a55a1bb424d6a328f47d2224ed51 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Thu, 3 Jun 2010 16:27:47 +1000 Subject: Improve input panel handling in declarative demos and examples Task-number: QTBUG-11157 Reviewed-by: Warwick Allison --- demos/declarative/flickr/mobile/TitleBar.qml | 2 +- .../photoviewer/PhotoViewerCore/EditableButton.qml | 2 +- demos/declarative/samegame/SamegameCore/Dialog.qml | 5 +++-- demos/declarative/samegame/samegame.qml | 20 ++++++++++++++++---- .../declarative/twitter/TwitterCore/HomeTitleBar.qml | 2 +- demos/declarative/twitter/TwitterCore/TitleBar.qml | 2 +- demos/declarative/twitter/twitter.qml | 5 +++++ examples/declarative/text/edit/edit.qml | 3 +++ examples/declarative/toys/corkboards/Day.qml | 7 ++++++- .../declarative/toys/dynamicscene/dynamicscene.qml | 7 ++++++- .../tutorials/samegame/samegame4/content/Dialog.qml | 12 ++++++++++-- .../ui-components/searchbox/SearchBox.qml | 4 ++-- .../declarative/ui-components/searchbox/main.qml | 5 +++++ .../graphicsitems/qdeclarativetextedit.cpp | 2 +- .../graphicsitems/qdeclarativetextinput.cpp | 2 +- .../tst_qdeclarativetextedit.cpp | 6 ------ .../tst_qdeclarativetextinput.cpp | 6 ------ 17 files changed, 62 insertions(+), 30 deletions(-) diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml index da144d4..c7e1a53 100644 --- a/demos/declarative/flickr/mobile/TitleBar.qml +++ b/demos/declarative/flickr/mobile/TitleBar.qml @@ -118,7 +118,7 @@ Item { name: "Tags" PropertyChanges { target: container; x: -tagButton.x + 5 } PropertyChanges { target: tagButton; text: "OK" } - PropertyChanges { target: lineEdit; focus: true } + PropertyChanges { target: editor; focus: true } } transitions: Transition { diff --git a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml index e15adbc..6109535 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml @@ -77,6 +77,6 @@ Item { MouseArea { anchors { fill: parent; leftMargin: -20; topMargin: -20; rightMargin: -20; bottomMargin: -20 } - onClicked: textInput.forceFocus() + onClicked: { textInput.forceFocus(); textInput.openSoftwareInputPanel(); } } } diff --git a/demos/declarative/samegame/SamegameCore/Dialog.qml b/demos/declarative/samegame/SamegameCore/Dialog.qml index 8dd12f6..c71a4b3 100644 --- a/demos/declarative/samegame/SamegameCore/Dialog.qml +++ b/demos/declarative/samegame/SamegameCore/Dialog.qml @@ -47,13 +47,14 @@ Rectangle { property Item text: dialogText signal closed - + signal opened function forceClose() { page.closed(); page.opacity = 0; } function show(txt) { + page.opened(); dialogText.text = txt; page.opacity = 1; } @@ -62,7 +63,7 @@ Rectangle { color: "white" border.width: 1 opacity: 0 - + visible: opacity > 0 Behavior on opacity { NumberAnimation { duration: 1000 } } diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index 54c18d6..9a721da 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -90,17 +90,31 @@ Rectangle { enabled: initialWidth != 0 } + onOpened: nameInputText.focus = true; + onClosed: { + nameInputText.focus = false; + if (nameInputText.text != "") + Logic.saveHighScore(nameInputText.text); + } Text { id: dialogText anchors { left: nameInputDialog.left; leftMargin: 20; verticalCenter: parent.verticalCenter } text: "You won! Please enter your name: " } + MouseArea { + anchors.fill: parent + onClicked: { + if (nameInputText.text == "") + nameInputText.openSoftwareInputPanel(); + else + nameInputDialog.forceClose(); + } + } TextInput { id: nameInputText anchors { verticalCenter: parent.verticalCenter; left: dialogText.right } - focus: true - + focus: false onTextChanged: { var newWidth = nameInputText.width + dialogText.width + 40; if ( (newWidth > nameInputDialog.width && newWidth < screen.width) @@ -108,8 +122,6 @@ Rectangle { nameInputDialog.width = newWidth; } onAccepted: { - if (nameInputDialog.opacity == 1 && nameInputText.text != "") - Logic.saveHighScore(nameInputText.text); nameInputDialog.forceClose(); } } diff --git a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml index 3828a40..52164ed 100644 --- a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml @@ -148,7 +148,7 @@ Item { PropertyChanges { target: tagButton; text: "OK" } PropertyChanges { target: tagButton; width: 28 } PropertyChanges { target: tagButton; height: 24 } - PropertyChanges { target: txtEdit; focus: true } + PropertyChanges { target: editor; focus: true } } ] transitions: [ diff --git a/demos/declarative/twitter/TwitterCore/TitleBar.qml b/demos/declarative/twitter/TwitterCore/TitleBar.qml index 0cf79a3..6cd0a50 100644 --- a/demos/declarative/twitter/TwitterCore/TitleBar.qml +++ b/demos/declarative/twitter/TwitterCore/TitleBar.qml @@ -107,7 +107,7 @@ Item { name: "Tags" PropertyChanges { target: container; x: -tagButton.x + 5 } PropertyChanges { target: tagButton; text: "OK" } - PropertyChanges { target: lineEdit; focus: true } + PropertyChanges { target: editor; focus: true } } transitions: Transition { diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml index aa216cc..08cecb0 100644 --- a/demos/declarative/twitter/twitter.qml +++ b/demos/declarative/twitter/twitter.qml @@ -70,6 +70,11 @@ Item { Image { source: "TwitterCore/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 } + MouseArea { + anchors.fill: parent + onClicked: screen.focus = false; + } + Twitter.RssModel { id: rssModel } Twitter.Loading { anchors.centerIn: parent; visible: rssModel.status==XmlListModel.Loading && state!='unauthed'} Text { diff --git a/examples/declarative/text/edit/edit.qml b/examples/declarative/text/edit/edit.qml index 0be42e9..4668ab2 100644 --- a/examples/declarative/text/edit/edit.qml +++ b/examples/declarative/text/edit/edit.qml @@ -121,6 +121,9 @@ Rectangle { onClicked: { if (editor.state == "") { edit.cursorPosition = edit.positionAt(mouse.x+x,mouse.y+y); + if (!edit.focus) + edit.focus = true; + edit.openSoftwareInputPanel(); } } function hitHandle(h,x,y) { return x>=h.x+flick.contentX && x=h.y+flick.contentY && y 0 Text { id: dialogText @@ -82,7 +85,6 @@ Rectangle { id: textInput anchors { verticalCenter: parent.verticalCenter; left: dialogText.right } width: 80 - focus: true text: "" onAccepted: container.hide() // close dialog when Enter is pressed @@ -91,7 +93,13 @@ Rectangle { MouseArea { anchors.fill: parent - onClicked: hide(); + + onClicked: { + if (textInput.text == "" && textInput.opacity > 0) + textInput.openSoftwareInputPanel(); + else + hide(); + } } //![3] diff --git a/examples/declarative/ui-components/searchbox/SearchBox.qml b/examples/declarative/ui-components/searchbox/SearchBox.qml index c022626..eaa6b6b 100644 --- a/examples/declarative/ui-components/searchbox/SearchBox.qml +++ b/examples/declarative/ui-components/searchbox/SearchBox.qml @@ -66,7 +66,7 @@ FocusScope { font.italic: true } - MouseArea { anchors.fill: parent; onClicked: focusScope.focus = true } + MouseArea { anchors.fill: parent; onClicked: { focusScope.focus = true; textInput.openSoftwareInputPanel(); } } TextInput { id: textInput @@ -82,7 +82,7 @@ FocusScope { MouseArea { anchors.fill: parent - onClicked: { textInput.text = ''; focusScope.focus = true } + onClicked: { textInput.text = ''; focusScope.focus = true; textInput.openSoftwareInputPanel(); } } } diff --git a/examples/declarative/ui-components/searchbox/main.qml b/examples/declarative/ui-components/searchbox/main.qml index 0508d5a..bf3bed8 100644 --- a/examples/declarative/ui-components/searchbox/main.qml +++ b/examples/declarative/ui-components/searchbox/main.qml @@ -41,9 +41,14 @@ import Qt 4.7 Rectangle { + id: page width: 500; height: 250 color: "#edecec" + MouseArea { + anchors.fill: parent + onClicked: page.focus = false; + } Column { anchors { horizontalCenter: parent.horizontalCenter; verticalCenter: parent.verticalCenter } spacing: 10 diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 48826ff..535a39d 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1488,7 +1488,7 @@ void QDeclarativeTextEdit::focusInEvent(QFocusEvent *event) { Q_D(const QDeclarativeTextEdit); if (d->showInputPanelOnFocus) { - if (d->focusOnPress && !isReadOnly() && event->reason() != Qt::ActiveWindowFocusReason) { + if (d->focusOnPress && !isReadOnly()) { openSoftwareInputPanel(); } } diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 1202101..3911a97 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1333,7 +1333,7 @@ void QDeclarativeTextInput::focusInEvent(QFocusEvent *event) { Q_D(const QDeclarativeTextInput); if (d->showInputPanelOnFocus) { - if (d->focusOnPress && !isReadOnly() && event->reason() != Qt::ActiveWindowFocusReason) { + if (d->focusOnPress && !isReadOnly()) { openSoftwareInputPanel(); } } diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index fbab30e..474eb3f 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -956,12 +956,6 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus() edit.setFocusOnPress(true); QCOMPARE(focusOnPressSpy.count(),2); - // active window focus reason should not cause input panel to open - QGraphicsObject * editObject = qobject_cast(&edit); - editObject->setFocus(Qt::ActiveWindowFocusReason); - QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, false); - // and input panel should not open if focus has already been set edit.setFocus(true); QCOMPARE(ic.openInputPanelReceived, false); diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 3cb4da0..c1c6634 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -902,12 +902,6 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus() input.setFocusOnPress(true); QCOMPARE(focusOnPressSpy.count(),2); - // active window focus reason should not cause input panel to open - QGraphicsObject * inputObject = qobject_cast(&input); - inputObject->setFocus(Qt::ActiveWindowFocusReason); - QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, false); - // and input panel should not open if focus has already been set input.setFocus(true); QCOMPARE(ic.openInputPanelReceived, false); -- cgit v0.12 From 66c24c2efad5c8784b92a7b9872d2732ebd8a446 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 3 Jun 2010 18:06:20 +1000 Subject: Add more Q_AUTOTEST_EXPORTs --- src/declarative/util/qdeclarativeanimation.cpp | 73 ++++++++++-------------- src/declarative/util/qdeclarativeanimation_p.h | 2 +- src/declarative/util/qdeclarativeanimation_p_p.h | 20 ++++++- 3 files changed, 49 insertions(+), 46 deletions(-) diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 0eae136..1447532 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -2132,52 +2132,39 @@ QAbstractAnimation *QDeclarativePropertyAnimation::qtAnimation() return d->va; } -struct PropertyUpdater : public QDeclarativeBulkValueUpdater +void QDeclarativeAnimationPropertyUpdater::setValue(qreal v) { - QDeclarativeStateActions actions; - int interpolatorType; //for Number/ColorAnimation - int prevInterpolatorType; //for generic - QVariantAnimation::Interpolator interpolator; - bool reverse; - bool fromSourced; - bool fromDefined; - bool *wasDeleted; - PropertyUpdater() : prevInterpolatorType(0), wasDeleted(0) {} - ~PropertyUpdater() { if (wasDeleted) *wasDeleted = true; } - void setValue(qreal v) - { - bool deleted = false; - wasDeleted = &deleted; - if (reverse) //QVariantAnimation sends us 1->0 when reversed, but we are expecting 0->1 - v = 1 - v; - for (int ii = 0; ii < actions.count(); ++ii) { - QDeclarativeAction &action = actions[ii]; - - if (v == 1.) - QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); - else { - if (!fromSourced && !fromDefined) { - action.fromValue = action.property.read(); - if (interpolatorType) - QDeclarativePropertyAnimationPrivate::convertVariant(action.fromValue, interpolatorType); - } - if (!interpolatorType) { - int propType = action.property.propertyType(); - if (!prevInterpolatorType || prevInterpolatorType != propType) { - prevInterpolatorType = propType; - interpolator = QVariantAnimationPrivate::getInterpolator(prevInterpolatorType); - } + bool deleted = false; + wasDeleted = &deleted; + if (reverse) //QVariantAnimation sends us 1->0 when reversed, but we are expecting 0->1 + v = 1 - v; + for (int ii = 0; ii < actions.count(); ++ii) { + QDeclarativeAction &action = actions[ii]; + + if (v == 1.) + QDeclarativePropertyPrivate::write(action.property, action.toValue, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + else { + if (!fromSourced && !fromDefined) { + action.fromValue = action.property.read(); + if (interpolatorType) + QDeclarativePropertyAnimationPrivate::convertVariant(action.fromValue, interpolatorType); + } + if (!interpolatorType) { + int propType = action.property.propertyType(); + if (!prevInterpolatorType || prevInterpolatorType != propType) { + prevInterpolatorType = propType; + interpolator = QVariantAnimationPrivate::getInterpolator(prevInterpolatorType); } - if (interpolator) - QDeclarativePropertyPrivate::write(action.property, interpolator(action.fromValue.constData(), action.toValue.constData(), v), QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); } - if (deleted) - return; + if (interpolator) + QDeclarativePropertyPrivate::write(action.property, interpolator(action.fromValue.constData(), action.toValue.constData(), v), QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); } - wasDeleted = 0; - fromSourced = true; + if (deleted) + return; } -}; + wasDeleted = 0; + fromSourced = true; +} void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions, QDeclarativeProperties &modified, @@ -2207,7 +2194,7 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions props << d->defaultProperties.split(QLatin1Char(',')); } - PropertyUpdater *data = new PropertyUpdater; + QDeclarativeAnimationPropertyUpdater *data = new QDeclarativeAnimationPropertyUpdater; data->interpolatorType = d->interpolatorType; data->interpolator = d->interpolator; data->reverse = direction == Backward ? true : false; @@ -2786,7 +2773,7 @@ void QDeclarativeAnchorAnimation::transition(QDeclarativeStateActions &actions, { Q_UNUSED(modified); Q_D(QDeclarativeAnchorAnimation); - PropertyUpdater *data = new PropertyUpdater; + QDeclarativeAnimationPropertyUpdater *data = new QDeclarativeAnimationPropertyUpdater; data->interpolatorType = QMetaType::QReal; data->interpolator = d->interpolator; diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h index e7cd8a8..3f8fbdd 100644 --- a/src/declarative/util/qdeclarativeanimation_p.h +++ b/src/declarative/util/qdeclarativeanimation_p.h @@ -384,7 +384,7 @@ Q_SIGNALS: }; class QDeclarativeAnimationGroupPrivate; -class QDeclarativeAnimationGroup : public QDeclarativeAbstractAnimation +class Q_AUTOTEST_EXPORT QDeclarativeAnimationGroup : public QDeclarativeAbstractAnimation { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeAnimationGroup) diff --git a/src/declarative/util/qdeclarativeanimation_p_p.h b/src/declarative/util/qdeclarativeanimation_p_p.h index 3b0f52e..b6d6bbb 100644 --- a/src/declarative/util/qdeclarativeanimation_p_p.h +++ b/src/declarative/util/qdeclarativeanimation_p_p.h @@ -96,7 +96,7 @@ private: }; //performs an action of type QAbstractAnimationAction -class QActionAnimation : public QAbstractAnimation +class Q_AUTOTEST_EXPORT QActionAnimation : public QAbstractAnimation { Q_OBJECT public: @@ -143,7 +143,7 @@ public: }; //animates QDeclarativeBulkValueUpdater (assumes start and end values will be reals or compatible) -class QDeclarativeBulkValueAnimator : public QVariantAnimation +class Q_AUTOTEST_EXPORT QDeclarativeBulkValueAnimator : public QVariantAnimation { Q_OBJECT public: @@ -378,6 +378,22 @@ public: QList targets; }; +class Q_AUTOTEST_EXPORT QDeclarativeAnimationPropertyUpdater : public QDeclarativeBulkValueUpdater +{ +public: + QDeclarativeStateActions actions; + int interpolatorType; //for Number/ColorAnimation + int prevInterpolatorType; //for generic + QVariantAnimation::Interpolator interpolator; + bool reverse; + bool fromSourced; + bool fromDefined; + bool *wasDeleted; + QDeclarativeAnimationPropertyUpdater() : prevInterpolatorType(0), wasDeleted(0) {} + ~QDeclarativeAnimationPropertyUpdater() { if (wasDeleted) *wasDeleted = true; } + void setValue(qreal v); +}; + QT_END_NAMESPACE #endif // QDECLARATIVEANIMATION_P_H -- cgit v0.12 From 01506a3b212d449d65df1131b49af0e174e45275 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Thu, 3 Jun 2010 19:47:54 +0200 Subject: Enhance docs --- doc/src/declarative/extending.qdoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 574b0b2..af5b437 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -425,6 +425,9 @@ value will not be accessible from script. \l {Extending QML - Signal Support Example} shows the complete code used to implement the onPartyStarted signal property. +If you want to use signals from items not created in QML, you can access their +signals with the \l {Connections} element. + \section1 Property Value Sources \snippet examples/declarative/cppextensions/referenceexamples/valuesource/example.qml 0 -- cgit v0.12 From ecff296323a81059810a91709f502921bc9277c2 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 4 Jun 2010 11:22:28 +1000 Subject: Revert to Portrait/Landscape terminology for Orientation enum, with additional PortraitInverted and LandscapeInverted values. TopUp etc. only indicates rotation which makes it difficult to resize the window according to whether the device is in Portrait or Landscape orientation. --- .../qdeclarativeviewer/data/orientation.qml | 20 +++++++++--------- tools/qml/deviceorientation.cpp | 2 +- tools/qml/deviceorientation.h | 8 ++++---- tools/qml/deviceorientation_maemo.cpp | 12 +++++------ tools/qml/qmlruntime.cpp | 24 +++++++++++----------- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml index be911a3..57db82d 100644 --- a/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml +++ b/tests/auto/declarative/qdeclarativeviewer/data/orientation.qml @@ -1,18 +1,18 @@ import Qt 4.7 Rectangle { color: "black" - width: (runtime.orientation == Orientation.RightUp || runtime.orientation == Orientation.LeftUp) ? 300 : 200 - height: (runtime.orientation == Orientation.RightUp || runtime.orientation == Orientation.LeftUp) ? 200 : 300 + width: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 300 : 200 + height: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 200 : 300 Text { text: { - if (runtime.orientation == Orientation.TopUp) - return "TopUp" - if (runtime.orientation == Orientation.TopDown) - return "TopDown" - if (runtime.orientation == Orientation.LeftUp) - return "LeftUp" - if (runtime.orientation == Orientation.RightUp) - return "RightUp" + if (runtime.orientation == Orientation.Portrait) + return "Portrait" + if (runtime.orientation == Orientation.PortraitInverted) + return "PortraitInverted" + if (runtime.orientation == Orientation.Landscape) + return "Landscape" + if (runtime.orientation == Orientation.LandscapeInverted) + return "LandscapeInverted" } color: "white" } diff --git a/tools/qml/deviceorientation.cpp b/tools/qml/deviceorientation.cpp index a13b912..e7c70d5 100644 --- a/tools/qml/deviceorientation.cpp +++ b/tools/qml/deviceorientation.cpp @@ -47,7 +47,7 @@ class DefaultDeviceOrientation : public DeviceOrientation { Q_OBJECT public: - DefaultDeviceOrientation() : DeviceOrientation(), m_orientation(DeviceOrientation::TopUp) {} + DefaultDeviceOrientation() : DeviceOrientation(), m_orientation(DeviceOrientation::Portrait) {} Orientation orientation() const { return m_orientation; diff --git a/tools/qml/deviceorientation.h b/tools/qml/deviceorientation.h index fe73868..817bfc8 100644 --- a/tools/qml/deviceorientation.h +++ b/tools/qml/deviceorientation.h @@ -54,10 +54,10 @@ class DeviceOrientation : public QObject public: enum Orientation { UnknownOrientation, - TopUp, - TopDown, - LeftUp, - RightUp + Portrait, + Landscape, + PortraitInverted, + LandscapeInverted }; virtual Orientation orientation() const = 0; diff --git a/tools/qml/deviceorientation_maemo.cpp b/tools/qml/deviceorientation_maemo.cpp index 501ff79..7948e2a 100644 --- a/tools/qml/deviceorientation_maemo.cpp +++ b/tools/qml/deviceorientation_maemo.cpp @@ -48,11 +48,11 @@ class MaemoOrientation : public DeviceOrientation Q_OBJECT public: MaemoOrientation() - : DeviceOrientation(),m_current(TopUp), m_lastSeen(TopUp), m_lastSeenCount(0) + : DeviceOrientation(),m_current(Portrait), m_lastSeen(Portrait), m_lastSeenCount(0) { m_current = get(); if (m_current == UnknownOrientation) - m_current = TopUp; + m_current = Portrait; startTimer(100); } @@ -101,13 +101,13 @@ private: if (abs(az) > 850) { o = UnknownOrientation; } else if (ax < -750) { - o = LeftUp; + o = Portrait; } else if (ax > 750) { - o = RightUp; + o = PortraitInverted; } else if (ay < -750) { - o = TopUp; + o = Landscape; } else if (ay > 750) { - o = TopDown; + o = LandscapeInverted; } return o; diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index f681303..5b0139f 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -581,10 +581,10 @@ void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) orientation->setExclusive(true); connect(orientation, SIGNAL(triggered(QAction*)), this, SLOT(changeOrientation(QAction*))); - orientation->addAction(tr("orientation: TopUp")); - orientation->addAction(tr("orientation: LeftUp")); - orientation->addAction(tr("orientation: TopDown")); - orientation->addAction(tr("orientation: RightUp")); + orientation->addAction(tr("orientation: Portrait")); + orientation->addAction(tr("orientation: Landscape")); + orientation->addAction(tr("orientation: Portrait (Inverted)")); + orientation->addAction(tr("orientation: Landscape (Inverted)")); QList actions = orientation->actions(); for (int i=0; iaddAction(actions[i]); @@ -1177,14 +1177,14 @@ void QDeclarativeViewer::changeOrientation(QAction *action) action->setChecked(true); QString o = action->text().split(QLatin1Char(':')).value(1).trimmed(); - if (o == QLatin1String("TopUp")) - DeviceOrientation::instance()->setOrientation(DeviceOrientation::TopUp); - else if (o == QLatin1String("TopDown")) - DeviceOrientation::instance()->setOrientation(DeviceOrientation::TopDown); - else if (o == QLatin1String("LeftUp")) - DeviceOrientation::instance()->setOrientation(DeviceOrientation::LeftUp); - else if (o == QLatin1String("RightUp")) - DeviceOrientation::instance()->setOrientation(DeviceOrientation::RightUp); + if (o == QLatin1String("Portrait")) + DeviceOrientation::instance()->setOrientation(DeviceOrientation::Portrait); + else if (o == QLatin1String("Landscape")) + DeviceOrientation::instance()->setOrientation(DeviceOrientation::Landscape); + else if (o == QLatin1String("Portrait (Inverted)")) + DeviceOrientation::instance()->setOrientation(DeviceOrientation::PortraitInverted); + else if (o == QLatin1String("Landscape (Inverted)")) + DeviceOrientation::instance()->setOrientation(DeviceOrientation::LandscapeInverted); } void QDeclarativeViewer::orientationChanged() -- cgit v0.12 From 136eed8528608d8427baa4787d52611857ed0dbd Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 4 Jun 2010 14:38:25 +1000 Subject: Update docs for the runtime.orientation values --- doc/src/declarative/qmlruntime.qdoc | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc index cef5e63..66b4b2b 100644 --- a/doc/src/declarative/qmlruntime.qdoc +++ b/doc/src/declarative/qmlruntime.qdoc @@ -152,7 +152,7 @@ \section2 Runtime Object - All applications using the launcher will have access to the 'runtime' + All applications using the launcher will have access to the \c runtime property on the root context. This property contains several pieces of information about the runtime environment of the application. @@ -160,11 +160,19 @@ A special piece of dummy data which is integrated into the launcher is a simple orientation property. The orientation can be set via the - settings menu in the application, or by pressing Ctrl+T to toggle it. + settings menu in the application, or by pressing Ctrl+T to rotate it. - To use this from within your QML file, access runtime.orientation, - which can be either Orientation.Landscape or Orientation.Portrait and which can be bound to in your - application. An example is below: + To use this from within your QML file, access \c runtime.orientation, + which can be one of the following values: + + \list + \o \c Orientation.Portrait + \o \c Orientation.Landscape + \o \c Orientation.PortraitInverted (Portrait orientation, upside-down) + \o \c Orientation.LandscapeInverted (Landscape orientation, upside-down) + \endlist + + These values can be bound to in your application. For example: \code Item { @@ -172,13 +180,13 @@ } \endcode - This allows your application to respond to the orientation of the screen changing. The launcher + This allows your application to respond to changes in the screen's orientation. The launcher will automatically update this on some platforms (currently the N900 only) to match the physical screen's orientation. On other plaforms orientation changes will only happen when explictly asked for. \section3 Window Active - The runtime.isActiveWindow property tells whether the main window of the launcher is currently active + The \c runtime.isActiveWindow property tells whether the main window of the launcher is currently active or not. This is especially useful for embedded devices when you want to pause parts of your application, including animations, when your application loses focus or goes to the background. -- cgit v0.12 From 523b6a0da134700cead707530149067286228858 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 4 Jun 2010 12:55:08 +1000 Subject: Remove version ifdefs from Particles; only 4.7 is supported. --- src/imports/particles/qdeclarativeparticles.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp index ecc6604..56b89b5 100644 --- a/src/imports/particles/qdeclarativeparticles.cpp +++ b/src/imports/particles/qdeclarativeparticles.cpp @@ -1284,11 +1284,7 @@ void QDeclarativeParticlesPainter::paint(QPainter *p, const QStyleOptionGraphics const int myX = x() + parentItem()->x(); const int myY = y() + parentItem()->y(); -#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) QVarLengthArray pixmapData; -#else - QVarLengthArray pixmapData; -#endif pixmapData.resize(d->particles.count()); const QRectF sourceRect = d->image.rect(); @@ -1296,32 +1292,20 @@ void QDeclarativeParticlesPainter::paint(QPainter *p, const QStyleOptionGraphics qreal halfPHeight = sourceRect.height()/2.; for (int i = 0; i < d->particles.count(); ++i) { const QDeclarativeParticle &particle = d->particles.at(i); -#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) pixmapData[i].x = particle.x - myX + halfPWidth; pixmapData[i].y = particle.y - myY + halfPHeight; -#else - pixmapData[i].point = QPointF(particle.x - myX + halfPWidth, particle.y - myY + halfPHeight); -#endif pixmapData[i].opacity = particle.opacity; //these never change pixmapData[i].rotation = 0; pixmapData[i].scaleX = 1; pixmapData[i].scaleY = 1; -#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) pixmapData[i].sourceLeft = sourceRect.left(); pixmapData[i].sourceTop = sourceRect.top(); pixmapData[i].width = sourceRect.width(); pixmapData[i].height = sourceRect.height(); -#else - pixmapData[i].source = sourceRect; -#endif } -#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) p->drawPixmapFragments(pixmapData.data(), d->particles.count(), d->image); -#else - qDrawPixmaps(p, pixmapData.data(), d->particles.count(), d->image); -#endif } void QDeclarativeParticles::componentComplete() -- cgit v0.12 From 312152dafde1dbe5824f0af0a649918c5ebcab5e Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 4 Jun 2010 13:18:14 +1000 Subject: Ensure ParticleMotionGravity always pulls in the right direction. --- src/imports/particles/qdeclarativeparticles.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp index 56b89b5..630c068 100644 --- a/src/imports/particles/qdeclarativeparticles.cpp +++ b/src/imports/particles/qdeclarativeparticles.cpp @@ -241,11 +241,13 @@ void QDeclarativeParticleMotionGravity::setAcceleration(qreal accel) void QDeclarativeParticleMotionGravity::advance(QDeclarativeParticle &p, int interval) { - qreal xdiff = p.x - _xAttr; - qreal ydiff = p.y - _yAttr; + qreal xdiff = _xAttr - p.x; + qreal ydiff = _yAttr - p.y; + qreal absXdiff = qAbs(xdiff); + qreal absYdiff = qAbs(ydiff); - qreal xcomp = xdiff / (xdiff + ydiff); - qreal ycomp = ydiff / (xdiff + ydiff); + qreal xcomp = xdiff / (absXdiff + absYdiff); + qreal ycomp = ydiff / (absXdiff + absYdiff); p.x_velocity += xcomp * _accel * interval; p.y_velocity += ycomp * _accel * interval; -- cgit v0.12 From fc017309a7a63a537f496d9c51b3a6390c5f5534 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 4 Jun 2010 16:12:43 +1000 Subject: Move QListModelInterface into util. Get rid of src/declarative/3rdparty. --- src/declarative/3rdparty/3rdparty.pri | 7 -- src/declarative/3rdparty/qlistmodelinterface.cpp | 109 ----------------------- src/declarative/3rdparty/qlistmodelinterface_p.h | 85 ------------------ src/declarative/declarative.pro | 1 - src/declarative/util/qlistmodelinterface.cpp | 109 +++++++++++++++++++++++ src/declarative/util/qlistmodelinterface_p.h | 85 ++++++++++++++++++ src/declarative/util/util.pri | 6 +- 7 files changed, 198 insertions(+), 204 deletions(-) delete mode 100644 src/declarative/3rdparty/3rdparty.pri delete mode 100644 src/declarative/3rdparty/qlistmodelinterface.cpp delete mode 100644 src/declarative/3rdparty/qlistmodelinterface_p.h create mode 100644 src/declarative/util/qlistmodelinterface.cpp create mode 100644 src/declarative/util/qlistmodelinterface_p.h diff --git a/src/declarative/3rdparty/3rdparty.pri b/src/declarative/3rdparty/3rdparty.pri deleted file mode 100644 index fbdcc11..0000000 --- a/src/declarative/3rdparty/3rdparty.pri +++ /dev/null @@ -1,7 +0,0 @@ -INCLUDEPATH += $$PWD - -HEADERS += \ - $$PWD/qlistmodelinterface_p.h\ - -SOURCES += \ - $$PWD/qlistmodelinterface.cpp \ diff --git a/src/declarative/3rdparty/qlistmodelinterface.cpp b/src/declarative/3rdparty/qlistmodelinterface.cpp deleted file mode 100644 index 98d6a5b..0000000 --- a/src/declarative/3rdparty/qlistmodelinterface.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclaractive module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "private/qlistmodelinterface_p.h" - -QT_BEGIN_NAMESPACE - -/*! - \internal - \class QListModelInterface - \brief The QListModelInterface class can be subclassed to provide C++ models to QDeclarativeGraphics Views - - This class is comprised primarily of pure virtual functions which - you must implement in a subclass. You can then use the subclass - as a model for a QDeclarativeGraphics view, such as a QDeclarativeListView. -*/ - -/*! \fn QListModelInterface::QListModelInterface(QObject *parent) - Constructs a QListModelInterface with the specified \a parent. -*/ - - /*! \fn QListModelInterface::QListModelInterface(QObjectPrivate &dd, QObject *parent) - - \internal - */ - -/*! \fn QListModelInterface::~QListModelInterface() - The destructor is virtual. - */ - -/*! \fn int QListModelInterface::count() const - Returns the number of data entries in the model. -*/ - -/*! \fn QHash QListModelInterface::data(int index, const QList& roles) const - Returns the data at the given \a index for the specifed \a roles. -*/ - -/*! \fn bool QListModelInterface::setData(int index, const QHash& values) - Sets the data at the given \a index. \a values is a mapping of - QVariant values to roles. Returns false. -*/ - -/*! \fn QList QListModelInterface::roles() const - Returns the list of roles for which the list model interface - provides data. -*/ - -/*! \fn QString QListModelInterface::toString(int role) const - Returns a string description of the specified \a role. -*/ - -/*! \fn void QListModelInterface::itemsInserted(int index, int count) - Emit this signal when \a count items are inserted at \a index. - */ - -/*! \fn void QListModelInterface::itemsRemoved(int index, int count) - Emit this signal when \a count items are removed at \a index. - */ - -/*! \fn void QListModelInterface::itemsMoved(int from, int to, int count) - Emit this signal when \a count items are moved from index \a from - to index \a to. - */ - -/*! \fn void QListModelInterface::itemsChanged(int index, int count, const QList &roles) - Emit this signal when \a count items at \a index have had their - \a roles changed. - */ - -QT_END_NAMESPACE diff --git a/src/declarative/3rdparty/qlistmodelinterface_p.h b/src/declarative/3rdparty/qlistmodelinterface_p.h deleted file mode 100644 index 07592ad..0000000 --- a/src/declarative/3rdparty/qlistmodelinterface_p.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QLISTMODELINTERFACE_H -#define QLISTMODELINTERFACE_H - -#include -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Declarative) - -class Q_DECLARATIVE_EXPORT QListModelInterface : public QObject -{ - Q_OBJECT - public: - QListModelInterface(QObject *parent = 0) : QObject(parent) {} - virtual ~QListModelInterface() {} - - virtual int count() const = 0; - virtual QHash data(int index, const QList& roles = QList()) const = 0; - virtual QVariant data(int index, int role) const = 0; - virtual bool setData(int index, const QHash& values) - { Q_UNUSED(index); Q_UNUSED(values); return false; } - - virtual QList roles() const = 0; - virtual QString toString(int role) const = 0; - - Q_SIGNALS: - void itemsInserted(int index, int count); - void itemsRemoved(int index, int count); - void itemsMoved(int from, int to, int count); - void itemsChanged(int index, int count, const QList &roles); - - protected: - QListModelInterface(QObjectPrivate &dd, QObject *parent) - : QObject(dd, parent) {} -}; - - -QT_END_NAMESPACE - -QT_END_HEADER -#endif //QTREEMODELINTERFACE_H diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro index 8037a16..510e7a5 100644 --- a/src/declarative/declarative.pro +++ b/src/declarative/declarative.pro @@ -20,7 +20,6 @@ include(../qbase.pri) #DESTDIR=. #modules -include(3rdparty/3rdparty.pri) include(util/util.pri) include(graphicsitems/graphicsitems.pri) include(qml/qml.pri) diff --git a/src/declarative/util/qlistmodelinterface.cpp b/src/declarative/util/qlistmodelinterface.cpp new file mode 100644 index 0000000..98d6a5b --- /dev/null +++ b/src/declarative/util/qlistmodelinterface.cpp @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclaractive module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "private/qlistmodelinterface_p.h" + +QT_BEGIN_NAMESPACE + +/*! + \internal + \class QListModelInterface + \brief The QListModelInterface class can be subclassed to provide C++ models to QDeclarativeGraphics Views + + This class is comprised primarily of pure virtual functions which + you must implement in a subclass. You can then use the subclass + as a model for a QDeclarativeGraphics view, such as a QDeclarativeListView. +*/ + +/*! \fn QListModelInterface::QListModelInterface(QObject *parent) + Constructs a QListModelInterface with the specified \a parent. +*/ + + /*! \fn QListModelInterface::QListModelInterface(QObjectPrivate &dd, QObject *parent) + + \internal + */ + +/*! \fn QListModelInterface::~QListModelInterface() + The destructor is virtual. + */ + +/*! \fn int QListModelInterface::count() const + Returns the number of data entries in the model. +*/ + +/*! \fn QHash QListModelInterface::data(int index, const QList& roles) const + Returns the data at the given \a index for the specifed \a roles. +*/ + +/*! \fn bool QListModelInterface::setData(int index, const QHash& values) + Sets the data at the given \a index. \a values is a mapping of + QVariant values to roles. Returns false. +*/ + +/*! \fn QList QListModelInterface::roles() const + Returns the list of roles for which the list model interface + provides data. +*/ + +/*! \fn QString QListModelInterface::toString(int role) const + Returns a string description of the specified \a role. +*/ + +/*! \fn void QListModelInterface::itemsInserted(int index, int count) + Emit this signal when \a count items are inserted at \a index. + */ + +/*! \fn void QListModelInterface::itemsRemoved(int index, int count) + Emit this signal when \a count items are removed at \a index. + */ + +/*! \fn void QListModelInterface::itemsMoved(int from, int to, int count) + Emit this signal when \a count items are moved from index \a from + to index \a to. + */ + +/*! \fn void QListModelInterface::itemsChanged(int index, int count, const QList &roles) + Emit this signal when \a count items at \a index have had their + \a roles changed. + */ + +QT_END_NAMESPACE diff --git a/src/declarative/util/qlistmodelinterface_p.h b/src/declarative/util/qlistmodelinterface_p.h new file mode 100644 index 0000000..07592ad --- /dev/null +++ b/src/declarative/util/qlistmodelinterface_p.h @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QLISTMODELINTERFACE_H +#define QLISTMODELINTERFACE_H + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class Q_DECLARATIVE_EXPORT QListModelInterface : public QObject +{ + Q_OBJECT + public: + QListModelInterface(QObject *parent = 0) : QObject(parent) {} + virtual ~QListModelInterface() {} + + virtual int count() const = 0; + virtual QHash data(int index, const QList& roles = QList()) const = 0; + virtual QVariant data(int index, int role) const = 0; + virtual bool setData(int index, const QHash& values) + { Q_UNUSED(index); Q_UNUSED(values); return false; } + + virtual QList roles() const = 0; + virtual QString toString(int role) const = 0; + + Q_SIGNALS: + void itemsInserted(int index, int count); + void itemsRemoved(int index, int count); + void itemsMoved(int from, int to, int count); + void itemsChanged(int index, int count, const QList &roles); + + protected: + QListModelInterface(QObjectPrivate &dd, QObject *parent) + : QObject(dd, parent) {} +}; + + +QT_END_NAMESPACE + +QT_END_HEADER +#endif //QTREEMODELINTERFACE_H diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri index f20bba1..04cfc68 100644 --- a/src/declarative/util/util.pri +++ b/src/declarative/util/util.pri @@ -27,7 +27,8 @@ SOURCES += \ $$PWD/qdeclarativebehavior.cpp \ $$PWD/qdeclarativefontloader.cpp \ $$PWD/qdeclarativestyledtext.cpp \ - $$PWD/qdeclarativelistmodelworkeragent.cpp + $$PWD/qdeclarativelistmodelworkeragent.cpp \ + $$PWD/qlistmodelinterface.cpp HEADERS += \ $$PWD/qdeclarativeutilmodule_p.h\ @@ -61,7 +62,8 @@ HEADERS += \ $$PWD/qdeclarativebehavior_p.h \ $$PWD/qdeclarativefontloader_p.h \ $$PWD/qdeclarativestyledtext_p.h \ - $$PWD/qdeclarativelistmodelworkeragent_p.h + $$PWD/qdeclarativelistmodelworkeragent_p.h \ + $$PWD/qlistmodelinterface_p.h contains(QT_CONFIG, xmlpatterns) { QT+=xmlpatterns -- cgit v0.12 From dbd16b3b6d2e6b030dd52e90eb3a38dc1a73c180 Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Thu, 3 Jun 2010 16:54:31 +0200 Subject: fix for using .lnk files when running app from UNC Since "" is an invalid target for a .lnk file, we can return false for doStat() in case of resolving the .lnk to "". Notice that .lnk files only allow absolute paths for the target. "" is returned by readLink in case the .lnk file does not exist. Reviewed-by: Joao Task-Number: QTBUG-10863 --- src/corelib/io/qfsfileengine_win.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index ec49f1a..21930e1 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1162,7 +1162,15 @@ bool QFSFileEnginePrivate::doStat() const if (filePath.isEmpty()) return could_stat; - QString fname = filePath.endsWith(QLatin1String(".lnk")) ? readLink(filePath) : filePath; + QString fname; + if(filePath.endsWith(QLatin1String(".lnk"))) { + fname = readLink(filePath); + if(fname.isEmpty()) + return could_stat; + } + else + fname = filePath; + fname = fixIfRelativeUncPath(fname); UINT oldmode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); -- cgit v0.12 From af8b034e2886ecb11db51d4fecc29177595b86ab Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Fri, 4 Jun 2010 13:50:36 +0200 Subject: Doc: QTreeWidgetItems remove themselves from views when deleted. Task-number: QTBUG-10640 --- src/gui/itemviews/qtreewidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp index 0e06f34..8f55734 100644 --- a/src/gui/itemviews/qtreewidget.cpp +++ b/src/gui/itemviews/qtreewidget.cpp @@ -1472,6 +1472,10 @@ QTreeWidgetItem::QTreeWidgetItem(QTreeWidgetItem *parent, QTreeWidgetItem *after /*! Destroys this tree widget item. + + The item will be removed from \l{QTreeWidget}s to which it has + been added. This makes it safe to delete an item at any time. + */ QTreeWidgetItem::~QTreeWidgetItem() -- cgit v0.12 From cd8a6d6836f04f66d3e7083c97f7873240afa433 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Fri, 4 Jun 2010 12:53:36 +0200 Subject: Avoid timer starvation during high posted event activity Similar to commit bc01bb10da23d0d2308cf02a16947be836bc9a21, we need to avoid starvation of the idle time source by forcing a single, normal priority pass after processing posted events. Reviewed-by: ogoffart Task-number: QT-3467 --- src/corelib/kernel/qeventdispatcher_glib.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp index fd36be4..9c1c827 100644 --- a/src/corelib/kernel/qeventdispatcher_glib.cpp +++ b/src/corelib/kernel/qeventdispatcher_glib.cpp @@ -246,6 +246,7 @@ struct GPostEventSource GSource source; QAtomicInt serialNumber; int lastSerialNumber; + QEventDispatcherGlibPrivate *d; }; static gboolean postEventSourcePrepare(GSource *s, gint *timeout) @@ -274,6 +275,7 @@ static gboolean postEventSourceDispatch(GSource *s, GSourceFunc, gpointer) GPostEventSource *source = reinterpret_cast(s); source->lastSerialNumber = source->serialNumber; QCoreApplication::sendPostedEvents(); + source->d->runTimersOnceWithNormalPriority(); return true; // i dunno, george... } @@ -313,6 +315,7 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context) postEventSource = reinterpret_cast(g_source_new(&postEventSourceFuncs, sizeof(GPostEventSource))); postEventSource->serialNumber = 1; + postEventSource->d = this; g_source_set_can_recurse(&postEventSource->source, true); g_source_attach(&postEventSource->source, mainContext); -- cgit v0.12 From 7ffb1c2e821cc4d508dcedcdb7363756f9f693ff Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Fri, 4 Jun 2010 15:06:45 +0200 Subject: Doc: Said to not access events after they are posted(postEvent). Task-number: QTBUG-10210 --- src/corelib/kernel/qcoreapplication.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 4e6e6b9..0a5e06e 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1073,7 +1073,7 @@ void QCoreApplication::exit(int returnCode) The event must be allocated on the heap since the post event queue will take ownership of the event and delete it once it has been - posted. It is \e {not safe} to modify or delete the event after + posted. It is \e {not safe} to access the event after it has been posted. When control returns to the main event loop, all events that are @@ -1104,7 +1104,7 @@ void QCoreApplication::postEvent(QObject *receiver, QEvent *event) The event must be allocated on the heap since the post event queue will take ownership of the event and delete it once it has been - posted. It is \e {not safe} to modify or delete the event after + posted. It is \e {not safe} to access the event after it has been posted. When control returns to the main event loop, all events that are -- cgit v0.12 From 2b4d2fd1ada524f4780dd7633ca34bc72d823ff1 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Fri, 4 Jun 2010 18:37:00 +0200 Subject: Fix in Addressbook tutorial Don't add if name or address is empty. Reviewed-by: Alessandro Portale --- examples/tutorials/addressbook/part3/addressbook.cpp | 1 + examples/tutorials/addressbook/part4/addressbook.cpp | 1 + examples/tutorials/addressbook/part5/addressbook.cpp | 1 + examples/tutorials/addressbook/part6/addressbook.cpp | 1 + examples/tutorials/addressbook/part7/addressbook.cpp | 1 + 5 files changed, 5 insertions(+) diff --git a/examples/tutorials/addressbook/part3/addressbook.cpp b/examples/tutorials/addressbook/part3/addressbook.cpp index adb87ef..28a570a 100644 --- a/examples/tutorials/addressbook/part3/addressbook.cpp +++ b/examples/tutorials/addressbook/part3/addressbook.cpp @@ -125,6 +125,7 @@ void AddressBook::submitContact() if (name == "" || address == "") { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); + return; } if (!contacts.contains(name)) { diff --git a/examples/tutorials/addressbook/part4/addressbook.cpp b/examples/tutorials/addressbook/part4/addressbook.cpp index 1b7a6c4..55d551f 100644 --- a/examples/tutorials/addressbook/part4/addressbook.cpp +++ b/examples/tutorials/addressbook/part4/addressbook.cpp @@ -134,6 +134,7 @@ void AddressBook::submitContact() if (name == "" || address == "") { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); + return; } //! [submitContact() function part1] if (currentMode == AddingMode) { diff --git a/examples/tutorials/addressbook/part5/addressbook.cpp b/examples/tutorials/addressbook/part5/addressbook.cpp index 80c18c3..1b3f451 100644 --- a/examples/tutorials/addressbook/part5/addressbook.cpp +++ b/examples/tutorials/addressbook/part5/addressbook.cpp @@ -141,6 +141,7 @@ void AddressBook::submitContact() if (name == "" || address == "") { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); + return; } if (currentMode == AddingMode) { diff --git a/examples/tutorials/addressbook/part6/addressbook.cpp b/examples/tutorials/addressbook/part6/addressbook.cpp index fc41190..724971c 100644 --- a/examples/tutorials/addressbook/part6/addressbook.cpp +++ b/examples/tutorials/addressbook/part6/addressbook.cpp @@ -147,6 +147,7 @@ void AddressBook::submitContact() if (name == "" || address == "") { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); + return; } if (currentMode == AddingMode) { diff --git a/examples/tutorials/addressbook/part7/addressbook.cpp b/examples/tutorials/addressbook/part7/addressbook.cpp index 3ab8702..bf00298 100644 --- a/examples/tutorials/addressbook/part7/addressbook.cpp +++ b/examples/tutorials/addressbook/part7/addressbook.cpp @@ -149,6 +149,7 @@ void AddressBook::submitContact() if (name == "" || address == "") { QMessageBox::information(this, tr("Empty Field"), tr("Please enter a name and address.")); + return; } if (currentMode == AddingMode) { -- cgit v0.12 From 09c6a81109d3978c1583c556202c01c1e774f11f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 4 Jun 2010 20:47:46 +0200 Subject: Make qbswap() use glibc's fast bswap_*() functions if available. Reviewed-by: Thiago Macieira --- src/corelib/global/qendian.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h index 107854c..353e8b9 100644 --- a/src/corelib/global/qendian.h +++ b/src/corelib/global/qendian.h @@ -42,6 +42,16 @@ #ifndef QENDIAN_H #define QENDIAN_H +#ifdef Q_OS_LINUX +QT_BEGIN_INCLUDE_NAMESPACE +# include +QT_END_INCLUDE_NAMESPACE +#endif + +#ifdef __GLIBC__ +#include +#endif + #include QT_BEGIN_HEADER @@ -264,6 +274,21 @@ template <> inline qint16 qFromBigEndian(const uchar *src) * and it is therefore a bit more convenient and in most cases more efficient. */ template T qbswap(T source); + +#ifdef __GLIBC__ +template <> inline quint64 qbswap(quint64 source) +{ + return bswap_64(source); +} +template <> inline quint32 qbswap(quint32 source) +{ + return bswap_32(source); +} +template <> inline quint16 qbswap(quint16 source) +{ + return bswap_16(source); +} +#else template <> inline quint64 qbswap(quint64 source) { return 0 @@ -292,6 +317,7 @@ template <> inline quint16 qbswap(quint16 source) | ((source & 0x00ff) << 8) | ((source & 0xff00) >> 8) ); } +#endif // __GLIBC__ // signed specializations template <> inline qint64 qbswap(qint64 source) -- cgit v0.12 From 51fa7df978d71a366c95c732d6a8c2576690d63a Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 5 Jun 2010 00:06:15 +0200 Subject: Add convenience constructor to QTextOption::Tab Merge-request: 1734 Reviewed-by: Simon Hausmann --- src/gui/text/qtextoption.cpp | 10 ++++++++-- src/gui/text/qtextoption.h | 2 ++ tests/auto/qtextformat/tst_qtextformat.cpp | 5 +---- tests/auto/qtextlayout/tst_qtextlayout.cpp | 9 ++------- tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp | 9 ++------- 5 files changed, 15 insertions(+), 20 deletions(-) diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp index c1e254c..a2b8022 100644 --- a/src/gui/text/qtextoption.cpp +++ b/src/gui/text/qtextoption.cpp @@ -145,7 +145,7 @@ QTextOption &QTextOption::operator=(const QTextOption &o) \sa tabArray(), setTabStop(), setTabs() */ -void QTextOption::setTabArray(QList tabStops) +void QTextOption::setTabArray(QList tabStops) // Qt5: const ref { if (!d) d = new QTextOptionPrivate; @@ -165,7 +165,7 @@ void QTextOption::setTabArray(QList tabStops) \sa tabStops() */ -void QTextOption::setTabs(QList tabStops) +void QTextOption::setTabs(QList tabStops) // Qt5: const ref { if (!d) d = new QTextOptionPrivate; @@ -391,6 +391,12 @@ QList QTextOption::tabs() const */ /*! + \fn Tab::Tab(qreal pos, TabType tabType, QChar delim = QChar()) + Creates a tab with the given position, tab type, and (for DelimiterTab) delimiter + \since 4.6 +*/ + +/*! \fn bool Tab::operator==(const Tab &other) const Returns true if tab \a other is equal to this tab; diff --git a/src/gui/text/qtextoption.h b/src/gui/text/qtextoption.h index 1381ed1..5af7834 100644 --- a/src/gui/text/qtextoption.h +++ b/src/gui/text/qtextoption.h @@ -68,6 +68,8 @@ public: struct Q_GUI_EXPORT Tab { inline Tab() : position(80), type(QTextOption::LeftTab) { } + inline Tab(qreal pos, TabType tabType, QChar delim = QChar()) + : position(pos), type(tabType), delimiter(delim) {} inline bool operator==(const Tab &other) const { return type == other.type diff --git a/tests/auto/qtextformat/tst_qtextformat.cpp b/tests/auto/qtextformat/tst_qtextformat.cpp index ee1f4b5..9b71481 100644 --- a/tests/auto/qtextformat/tst_qtextformat.cpp +++ b/tests/auto/qtextformat/tst_qtextformat.cpp @@ -308,10 +308,7 @@ void tst_QTextFormat::getSetTabs() format.setTabPositions(tabs); Comparator c2(tabs, format.tabPositions()); - QTextOption::Tab tab2; - tab2.position = 3456; - tab2.type = QTextOption::RightTab; - tab2.delimiter = QChar('x'); + QTextOption::Tab tab2(3456, QTextOption::RightTab, QChar('x')); tabs.append(tab2); format.setTabPositions(tabs); Comparator c3(tabs, format.tabPositions()); diff --git a/tests/auto/qtextlayout/tst_qtextlayout.cpp b/tests/auto/qtextlayout/tst_qtextlayout.cpp index 1a5f493..a631f3d 100644 --- a/tests/auto/qtextlayout/tst_qtextlayout.cpp +++ b/tests/auto/qtextlayout/tst_qtextlayout.cpp @@ -980,9 +980,7 @@ void tst_QTextLayout::testCenteredTab() // test if centering the tab works. We expect the center of 'Bar.' to be at the tab point. QTextOption option = layout.textOption(); QList tabs; - QTextOption::Tab tab; - tab.type = QTextOption::CenterTab; - tab.position = 150; + QTextOption::Tab tab(150, QTextOption::CenterTab); tabs.append(tab); option.setTabs(tabs); layout.setTextOption(option); @@ -1002,10 +1000,7 @@ void tst_QTextLayout::testDelimiterTab() // try the different delimiter characters to see if the alignment works there. QTextOption option = layout.textOption(); QList tabs; - QTextOption::Tab tab; - tab.type = QTextOption::DelimiterTab; - tab.delimiter = QChar('.'); - tab.position = 100; + QTextOption::Tab tab(100, QTextOption::DelimiterTab, QChar('.')); tabs.append(tab); option.setTabs(tabs); layout.setTextOption(option); diff --git a/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp b/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp index 64c42bb..a463d86 100644 --- a/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp +++ b/tests/auto/qtextodfwriter/tst_qtextodfwriter.cpp @@ -198,14 +198,9 @@ void tst_QTextOdfWriter::testWriteStyle2() { QTextBlockFormat bf; // = cursor.blockFormat(); QList tabs; - QTextOption::Tab tab1; - tab1.position = 40; - tab1.type = QTextOption::RightTab; + QTextOption::Tab tab1(40, QTextOption::RightTab); tabs << tab1; - QTextOption::Tab tab2; - tab2.position = 80; - tab2.type = QTextOption::DelimiterTab; - tab2.delimiter = 'o'; + QTextOption::Tab tab2(80, QTextOption::DelimiterTab, 'o'); tabs << tab2; bf.setTabPositions(tabs); -- cgit v0.12 From fad226e8a6354d89fad3dbee5ab6dd07e80534bc Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Mon, 7 Jun 2010 09:30:41 +1000 Subject: make corewlan more namespace friendly --- src/plugins/bearer/corewlan/qcorewlanengine.mm | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm index a9cb65b..6ba9504 100644 --- a/src/plugins/bearer/corewlan/qcorewlanengine.mm +++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm @@ -70,9 +70,10 @@ #include #include -@interface QNSListener : NSObject + +@interface QT_MANGLE_NAMESPACE(QNSListener) : NSObject { - NSNotificationCenter *center; + NSNotificationCenter *notificationCenter; CWInterface *currentInterface; QCoreWlanEngine *engine; NSLock *locker; @@ -86,16 +87,16 @@ @end -@implementation QNSListener +@implementation QT_MANGLE_NAMESPACE(QNSListener) @synthesize engine; - (id) init { [locker lock]; QMacCocoaAutoReleasePool pool; - center = [NSNotificationCenter defaultCenter]; + notificationCenter = [NSNotificationCenter defaultCenter]; currentInterface = [CWInterface interfaceWithName:nil]; - [center addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil]; + [notificationCenter addObserver:self selector:@selector(notificationHandler:) name:kCWPowerDidChangeNotification object:nil]; [locker unlock]; return self; } @@ -116,7 +117,7 @@ -(void)remove { [locker lock]; - [center removeObserver:self]; + [notificationCenter removeObserver:self]; [locker unlock]; } @@ -126,7 +127,7 @@ } @end -QNSListener *listener = 0; +QT_MANGLE_NAMESPACE(QNSListener) *listener = 0; QT_BEGIN_NAMESPACE @@ -296,6 +297,9 @@ void QScanThread::getUserConfigurations() for(uint row=0; row < [wifiInterfaces count]; row++ ) { CWInterface *wifiInterface = [CWInterface interfaceWithName: [wifiInterfaces objectAtIndex:row]]; + if ( ![wifiInterface power] ) + continue; + NSString *nsInterfaceName = [wifiInterface name]; // add user configured system networks SCDynamicStoreRef dynRef = SCDynamicStoreCreate(kCFAllocatorSystemDefault, (CFStringRef)@"Qt corewlan", nil, nil); @@ -430,7 +434,7 @@ void QCoreWlanEngine::initialize() QMacCocoaAutoReleasePool pool; if([[CWInterface supportedInterfaces] count] > 0 && !listener) { - listener = [[QNSListener alloc] init]; + listener = [[QT_MANGLE_NAMESPACE(QNSListener) alloc] init]; listener.engine = this; hasWifi = true; } else { @@ -785,6 +789,11 @@ void QCoreWlanEngine::networksChanged() changed = true; } + if (ptr->bearer != cpPriv->bearer) { + ptr->bearer = cpPriv->bearer; + changed = true; + } + if (ptr->state != cpPriv->state) { ptr->state = cpPriv->state; changed = true; -- cgit v0.12 From c785e5db81f51e7ed5feb20cc24f967c42f37af8 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 7 Jun 2010 10:36:16 +1000 Subject: Add some performance tips to QML docs. --- doc/src/declarative/declarativeui.qdoc | 1 + doc/src/declarative/qdeclarativeperformance.qdoc | 120 +++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 doc/src/declarative/qdeclarativeperformance.qdoc diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index 1199b26..7a49d0a 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -118,6 +118,7 @@ application or to build completely new applications. QML is fully \l \o \l {QML Security} \o \l {QtDeclarative Module} \o \l {Debugging QML} +\o \l {QML Performance} \o \l {QML Coding Conventions} \endlist */ diff --git a/doc/src/declarative/qdeclarativeperformance.qdoc b/doc/src/declarative/qdeclarativeperformance.qdoc new file mode 100644 index 0000000..b535e4b --- /dev/null +++ b/doc/src/declarative/qdeclarativeperformance.qdoc @@ -0,0 +1,120 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! +\page qdeclarativeperformance.html +\title QML Performance + +\section1 Opaque Items + +Items hidden behind an opaque item incur a cost. If an item will be enitrely +obscured by an opaque item, set its opacity to 0. One common example of +this is when a "details" page is shown over the main application view. + +\section1 Clipping + +\e clip is set to false by default. Enable clipping only when necessary. + +\section1 Anchors vs. Binding + +It is more efficient to use anchors rather than bindings to position items +relative to each other. Consider this use of bindings to position rect2 +relative to rect1: + +\code +Rectangle { + id: rect1 + x: 20 + width: 200; height: 200 +} +Rectange { + id: rect2 + x: rect1.x + y: rect1.y + rect1.height + width: rect1.width - 20 + height: 200 +} +\endcode + +This is achieved more efficiently using anchors: + +\code +Rectangle { + id: rect1 + x: 20 + width: 200; height: 200 +} +Rectange { + id: rect2 + height: 200 + anchors.left: rect1.left + anchors.top: rect1.bottom + anchors.right: rect1.right + anchors.rightMargin: 20 +} +\endcode + +\section1 Images + +Images consume a great deal of memory and may also be costly to load. In order +to deal with large images efficiently it is recommended that the Image::sourceSize +property be set to a size no greater than that necessary to render it. Beware that +changing the sourceSize will cause the image to be reloaded. + +Images on the local filesystem are usually loaded synchronously. This is usually +the desired behavior for user interface elements, however for large images that +do not necessarily need to be visible immediately, set the Image::asynchronous +property to true. This will load the image in a low priority thread. + +\section1 View Delegates + +Delegates must be created quickly as the view is flicked. There are two important +aspects to maintaining a smooth view: + +\list +\o Small delegates - keep the amount of QML to a minimum. Have just enough +QML in the delegate to display the necessary information. Any additional functionality +that is only needed when the delegate is clicked, for example, should be created by +a Loader as needed. +\o Fast data access - ensure the data model is as fast as possible. +\endlist + +*/ -- cgit v0.12 From eba8e2c10c5bc1b373fdf7640962029cb2e7908f Mon Sep 17 00:00:00 2001 From: Takumi ASAKI Date: Mon, 7 Jun 2010 11:13:11 +0900 Subject: * Add Japanese tutorial documents * Add Japanese hellotr example --- .gitignore | 1 + doc/doc.pri | 11 +- doc/src/ja_JP/development/designer-manual.qdoc | 175 ++++ doc/src/ja_JP/development/qmake-manual.qdoc | 212 ++++ doc/src/ja_JP/development/qtestlib.qdoc | 432 ++++++++ doc/src/ja_JP/examples/arrowpad.qdoc | 248 +++++ doc/src/ja_JP/examples/hellotr.qdoc | 200 ++++ doc/src/ja_JP/examples/trollprint.qdoc | 286 ++++++ doc/src/ja_JP/getting-started/tutorials.qdoc | 101 ++ doc/src/ja_JP/images/linguist-hellotr_en.png | Bin 0 -> 4424 bytes doc/src/ja_JP/images/linguist-hellotr_ja.png | Bin 0 -> 5624 bytes .../snippets/code/doc_src_examples_hellotr.qdoc | 72 ++ doc/src/ja_JP/tutorials/addressbook.qdoc | 1070 ++++++++++++++++++++ doc/src/ja_JP/tutorials/widgets-tutorial.qdoc | 257 +++++ examples/ja_JP/linguist/hellotr/hellotr.pro | 13 + examples/ja_JP/linguist/hellotr/main.cpp | 71 ++ tools/qdoc3/test/qt-api-only_ja_JP.qdocconf | 30 + tools/qdoc3/test/qt-build-docs.qdocconf | 1 + tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf | 110 ++ tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf | 1 + tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf | 178 ++++ tools/qdoc3/test/qt.qdocconf | 1 + tools/qdoc3/test/qt_ja_JP.qdocconf | 125 +++ tools/qdoc3/test/qt_zh_CN.qdocconf | 1 + 24 files changed, 3595 insertions(+), 1 deletion(-) create mode 100644 doc/src/ja_JP/development/designer-manual.qdoc create mode 100644 doc/src/ja_JP/development/qmake-manual.qdoc create mode 100644 doc/src/ja_JP/development/qtestlib.qdoc create mode 100644 doc/src/ja_JP/examples/arrowpad.qdoc create mode 100644 doc/src/ja_JP/examples/hellotr.qdoc create mode 100644 doc/src/ja_JP/examples/trollprint.qdoc create mode 100644 doc/src/ja_JP/getting-started/tutorials.qdoc create mode 100644 doc/src/ja_JP/images/linguist-hellotr_en.png create mode 100644 doc/src/ja_JP/images/linguist-hellotr_ja.png create mode 100644 doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc create mode 100644 doc/src/ja_JP/tutorials/addressbook.qdoc create mode 100644 doc/src/ja_JP/tutorials/widgets-tutorial.qdoc create mode 100644 examples/ja_JP/linguist/hellotr/hellotr.pro create mode 100644 examples/ja_JP/linguist/hellotr/main.cpp create mode 100644 tools/qdoc3/test/qt-api-only_ja_JP.qdocconf create mode 100644 tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf create mode 100644 tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf create mode 100644 tools/qdoc3/test/qt_ja_JP.qdocconf diff --git a/.gitignore b/.gitignore index 4e3b130..f398365 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ examples/*/*/* !examples/*/*/README examples/*/*/*[.]app !examples/declarative/* +!examples/ja_JP/*/* demos/*/* !demos/spectrum/* demos/spectrum/bin diff --git a/doc/doc.pri b/doc/doc.pri index 3180a61..0a5cc9a 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -36,9 +36,15 @@ QT_ZH_CN_DOCUMENTATION = ($$QDOC qt-api-only_zh_CN.qdocconf) && \ $$GENERATOR doc-build/html-qt_zh_CN/qt.qhp -o doc/qch/qt_zh_CN.qch \ ) +QT_JA_JP_DOCUMENTATION = ($$QDOC qt-api-only_ja_JP.qdocconf) && \ + (cd $$QT_BUILD_TREE && \ + $$GENERATOR doc-build/html-qt_ja_JP/qt.qhp -o doc/qch/qt_ja_JP.qch \ + ) + win32-g++:isEmpty(QMAKE_SH) { QT_DOCUMENTATION = $$replace(QT_DOCUMENTATION, "/", "\\\\") QT_ZH_CN_DOCUMENTATION = $$replace(QT_ZH_CN_DOCUMENTATION, "/", "\\\\") + QT_JA_JP_DOCUMENTATION = $$replace(QT_JA_JP_DOCUMENTATION, "/", "\\\\") } # Build rules: @@ -52,6 +58,9 @@ docs.depends = sub-qdoc3 adp_docs qch_docs docs_zh_CN.depends = docs docs_zh_CN.commands = $$QT_ZH_CN_DOCUMENTATION +docs_ja_JP.depends = docs +docs_ja_JP.commands = $$QT_JA_JP_DOCUMENTATION + # Install rules htmldocs.files = $$QT_BUILD_TREE/doc/html htmldocs.path = $$[QT_INSTALL_DOCS] @@ -67,5 +76,5 @@ docimages.path = $$[QT_INSTALL_DOCS]/src sub-qdoc3.depends = sub-corelib sub-xml sub-qdoc3.commands += (cd tools/qdoc3 && $(MAKE)) -QMAKE_EXTRA_TARGETS += sub-qdoc3 adp_docs qch_docs docs docs_zh_CN +QMAKE_EXTRA_TARGETS += sub-qdoc3 adp_docs qch_docs docs docs_zh_CN docs_ja_JP INSTALLS += htmldocs qchdocs docimages diff --git a/doc/src/ja_JP/development/designer-manual.qdoc b/doc/src/ja_JP/development/designer-manual.qdoc new file mode 100644 index 0000000..585af16 --- /dev/null +++ b/doc/src/ja_JP/development/designer-manual.qdoc @@ -0,0 +1,175 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page designer-quick-start.html + + \title Qt Designer クイックガイド + + \QD を使うための基本的な手順は、以下の\bold{四つ}です。 + + \list 1 + \o フォームとオブジェクトを選択する + \o フォームにオブジェクトを配置する + \o スロットにシグナルを接続する + \o フォームをプレビューする + \endlist + + \image rgbController-screenshot.png + + Red、Green、Blue(RGB)の値を操作するために必要なコントロールを含む + 小さなウィジェット(上記スクリーンショット参照)を設計する場合を想定します。 + このウィジェットは、画像処理プログラム内のどこからでも表示できるウィジェットです。 + + \table + \row + \i \inlineimage designer-choosing-form.png + \i \bold{フォームを選択する} + + \gui{新しいフォーム} ダイアログから \gui Widget を選択して開始します。 + \endtable + + + \table + \row + \i \inlineimage rgbController-arrangement.png + \i \bold{フォームにウィジェットを配置する} + + 3つのラベル(Label)、スピンボックス(Spin Box)、垂直方向のスライダ(Vertical Slider)をフォーム上へドラッグします。 + ラベルの既定の文字列を変更するには、文字列をダブルクリックします。 + 希望するレイアウトに合わせて配置します。 + \endtable + + 画像のようにこれらのウィジェットを配置するには、 + レイアウトにウィジェットを配置する必要があります。 + これを3つグループに対して行います。 + まず "RED" ラベルを選択します。 + 次に、\key Ctrl (Mac OS X では \key Command)キーを押したまま、対応するスピンボックスとスライダを選択します。 + \gui{フォーム} メニューで、\gui{格子状に並べる}を選択します。 + + \table + \row + \i \inlineimage rgbController-form-gridLayout.png + \i \inlineimage rgbController-selectForLayout.png + \endtable + + 他の2つのラベルに対しても、対応するスピンボックスとスライダごとにこの手順を繰り返します。 + + 次の手順は、これら3つのレイアウトを組み合わせて、1つの\bold{メインレイアウト}を作成することです。 + メインレイアウトとは、トップレベルウィジェット(この場合は QWidget)のレイアウトです。 + トップレベルウィジェットにレイアウトを配置することは重要です。 + そうでなければ、ウィンドウをサイズ変更したときにウィンドウ上のウィジェットのサイズが変更されません。 + レイアウトを設定するには、フォーム上の3つのレイアウト以外の任意の場所で\gui{右クリック}し、\gui{水平に並べる}を選択します。 + または、\gui{格子状に並べる}を選択することもできます。 + そのどちらでも同じ配置(以下を参照)で表示されます。 + + \image rgbController-final-layout.png + + \note メインレイアウトはフォームに表示できません。 + メインレイアウトがインストールされているかどうかを確認するには、 + フォームをサイズ変更してみます。 + インストールされている場合は、各ウィジェットのサイズが適宜変更されます。 + または、\QD の \gui{Object Inspector} で確認することもできます。 + トップレベルウィジェットにレイアウトが配置されていない場合、 + その横に崩れたレイアウトのアイコン \inlineimage rgbController-no-toplevel-layout.png + が表示されます。 + + スライダをクリックして特定の値までドラッグするときに、 + スピンボックスにスライダの位置を反映させます。 + この操作を行うには、スライダの \l{QAbstractSlider::}{valueChanged()} + シグナルをスピンボックスの \l{QSpinBox::}{setValue()} + スロットに接続する必要があります。 + また、逆方向、すなわちスピンボックスの \l{QSpinBox::}{valueChanged()} + シグナルをスライダの \l{QAbstractSlider::value()}{setValue()} スロットに接続する必要があります。 + + この操作を行うには、\key{F4} キーを押すか、\gui{編集|シグナル/スロットの編集} を選択し、 + \gui{シグナル/スロットの編集}モードに切り替える必要があります。 + + \table + \row + \i \inlineimage rgbController-signalsAndSlots.png + \i \bold{シグナルをスロットに接続する} + + スライダをクリックし、カーソルをスピンボックスまでドラッグします。 + 以下のような \gui{シグナルスロットを設定} ダイアログがポップアップ表示されます。 + 適切なシグナルとスロットを選択し、\gui OK をクリックします。 + \endtable + + \image rgbController-configure-connection1.png + + 手順を(逆の順序で)繰り返し、 + スピンボックスをクリックしてカーソルをスライダまでドラッグし、 + スピンボックスの \l{QSpinBox::}{valueChanged()} シグナルを、 + スライダの \l{QAbstractSlider::value()}{setValue()} スロットに接続します。 + + 以下のスクリーンショットは、適切なシグナルとスロットを選択するためのガイドとして利用できます。 + + \image rgbController-configure-connection2.png + + RGBコントローラーの "RED" コンポーネントのオブジェクトが正常に接続されたので、 + "GREEN" および "BLUE" コンポーネントにも同じ手順を繰り返します。 + + RGB値の範囲は 0 ~ 255 であるため、 + スピンボックスとスライダを特定の範囲に制限する必要があります。 + + \table + \row + \i \inlineimage rgbController-property-editing.png + \i \bold{ウィジェットのプロパティを設定する} + + 最初のスピンボックスをクリックします。 + \gui{プロパティエディタ}に \l{QSpinBox} のプロパティが表示されます。 + \l{QSpinBox::}{maximum} のプロパティに、"255" と入力します。 + 次に、最初の垂直方向のスライダをクリックすると、 + \l{QAbstractSlider} のプロパティが表示されます。 + \l{QAbstractSlider::}{maximum} のプロパティにも、"255" と入力します。 + 残りのスピンボックスとスライダに対しても、この処理を繰り返します。 + \endtable + + ここで、フォームをプレビューし、アプリケーションの外観を確認します。 + この操作を行うには、\key{Ctrl + R} を押すか、 + \gui{フォーム}メニューから\gui{プレビュー}を選択します。 + スライダをドラッグすると、 + スピンボックスにその値が反映されます(逆の場合も同じ)。 + またサイズを変更し、子ウィジェットの管理に使用するレイアウトが + どのようにウィンドウのさまざまなサイズに対応しているか確認します。 +*/ + diff --git a/doc/src/ja_JP/development/qmake-manual.qdoc b/doc/src/ja_JP/development/qmake-manual.qdoc new file mode 100644 index 0000000..8c9297f --- /dev/null +++ b/doc/src/ja_JP/development/qmake-manual.qdoc @@ -0,0 +1,212 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qmake-tutorial.html + \title qmake チュートリアル + + このチュートリアルでは \c qmake の使い方を説明します。 + このチュートリアルを読み終わったら \c qmake + のユーザガイドを読むことをお勧めします。 + + \section1 簡単な例 + + アプリケーションの基本的な実装は既に完了していて、 + 次のファイルが作成されていると仮定します。 + + \list + \o hello.cpp + \o hello.h + \o main.cpp + \endlist + + これらのファイルは Qt ディストリビューションの + \c{examples/qmake/tutorial} ディレクトリにあります。 + アプリケーションの設定について知っておくべきことは、 + それが Qt で書かれているということだけです。 + まず、テキストエディタで \c{examples/qmake/tutorial} に + \c hello.pro というファイルを作成します。 + 最初にすることは、開発プロジェクトに含まれるソースファイルとヘッダファイルを + \c qmake に教える行を追加することです。 + + ソースファイルをプロジェクトファイルに追加します。 + これには \l{qmake Variable Reference#SOURCES}{SOURCES} 変数を使います。 + 新しい行を作り、\c{SOURCES +=}、続いて hello.cpp を入力します。 + つまり、以下のようになります: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 108 + + これを以下のようになるまでプロジェクトの各ソースファイルに対して行います: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 109 + + make に似たシンタックスを使いたい場合は、 + 以下のように改行をエスケープしてすべてのファイルを 1 行に書きます: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 110 + + ソースファイルの一覧をプロジェクトファイルに追加しました。 + 次にヘッダファイルを追加します。 + ヘッダファイルはソースファイルと全く同じ方法で追加することができます。 + ただし変数は \l{qmake Variable Reference#HEADERS}{HEADERS} + を使います。 + + これを終えると、プロジェクトファイルは以下のようになるでしょう: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 111 + + ターゲットの名前は自動的に設定され、 + プロジェクトファイルと同じ名前になります。 + ただしプラットフォームに合わせたサフィックスがつけられます。 + 例えば、プロジェクトファイルが \c hello.pro である場合、 + ターゲットは Windows では \c hello.exe 、Unix では \c hello になります。 + プロジェクトファイルで別の名前を指定することもできます: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 112 + + 最後に \l{qmake Variable Reference#CONFIG}{CONFIG} 変数を設定します。 + このアプリケーションは Qt アプリケーションなので \c CONFIG に + \c qt を追加する必要があります。 + \c qmake は リンクの必要があるライブラリを追加し、 + \c moc と \c uic の実行コマンドが Makefile に含まれるようにします。 + + 最終的なプロジェクトファイルは以下のようになります: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 113 + + \c qmake を使って、このアプリケーションのための Makefile を生成します。 + プロジェクトのディレクトリでコマンドラインに次のように入力します: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 114 + + そして、使用するコンパイラによって \c make または \c nmake を入力します。 + + Visual Studio ユーザの場合、\c qmake は、以下のように + \c .dsp ファイルまたは \c .vcproj ファイルも作成できます: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 115 + + \section1 アプリケーションをデバッグできるようにする + + アプリケーションのリリースバージョンはデバッグシンボルなどのデバッグ情報を含みません。 + 開発中は、関連情報を含むアプリケーションのデバッグバージョンを作成するのが便利です。 + これは、プロジェクトファイルの \c CONFIG 変数に \c debug + を追加することで簡単に実現できます。 + + たとえば: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 116 + + 直前の例と同様に、Makefile を生成するには \c qmake を使います。 + アプリケーションをデバッグ環境で実行する際に役に立つ情報を得られるようになります。 + + \section1 プラットフォーム固有のソースファイルを追加する + + 数時間コーディングをしていると、 + アプリケーションにプラットフォーム固有な部分が出てきて + プラットフォーム固有のコードを別のファイルに分けたい場合があるかもしれません。 + ここでは 2 つのファイル \c hellowin.cpp と \c hellounix.cpp があるとして、 + これをプロジェクトファイルに追加します。 + これらのファイルをそのまま \c SOURCES 変数に追加することはできません。 + なぜなら、両方のファイルが Makefile に追加されてしまうからです。 + \c qmake が実行されたプラットフォームにしたがって処理されるスコープを使う必要があります。 + + Windows 用のファイルを追加するシンプルなスコープは以下のようになります: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 117 + + \c qmake が Windows 上で実行されると、ソースファイルのリストに + \c hellowin.cpp が追加されます。 + \c qmake が他のプラットフォームで実行された場合、この部分は無視されます。 + 次に Unix 用ファイルのスコープを作成します。 + + これを終えると、プロジェクトファイルは以下のようになります: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 118 + + これまでと同様に、Makefile を生成するには \c qmake を使います。 + + \section1 ファイルが存在しない場合に qmake を中止する + + 特定のファイルが存在しない場合に Makefile を作成したくない場合、 + exists() 関数を使ってファイルが存在するかどうかを確認することができます。 + また error() 関数を使って \c qmake の処理を中止させることができます。 + これらの関数はスコープとして動作します。 + 使い方はスコープの条件をこれらの関数で置き換えるだけです。 + \c main.cpp ファイルの確認は以下のようになります : + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 119 + + 記号 \c{!} はテストを否定します。 + つまり \c{exists( main.cpp )} はファイルが存在する場合に真になり、 + \c{!exists( main.cpp )} はファイルが存在しない場合に真になります。 + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 120 + + 前と同様に、\c qmake を実行して Makefile を生成します。 + 仮に \c main.cpp の名前を変更すると、上記のメッセージが表示され、 + \c qmake は処理を中止します。 + + \section1 複数の条件をチェックする + + Windows を使っていて、 + コマンドラインからこのアプリケーションを実行したときに + qDebug() の出力を見ることができるようにしたい場合、 + アプリケーションをコンソールの設定を追加してビルドする必要があります。 + Windows で Makefile をこの設定にするには、 + \c CONFIG に \c console を追加します。 + Windows で実行されていて、\e{かつ} \c CONFIG にすでに \c debug + がある場合にのみ \c CONFIG を追加したい場合があるかもしれません。 + このような場合、2 つのスコープをネストさせて使います。 + まず 1 つのスコープを作成し、その中にもう 1 つスコープを作成します。 + そして 2 つのスコープの中に設定を書きます。例えば: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 121 + + ネストされたスコープはコロンを使ってつなぐことができます。 + 最終的なプロジェクトファイルは以下のようになります: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 122 + + 以上です。\c qmake のチュートリアルが終了しました。 + それでは、あなたの開発プロジェクトのプロジェクトファイルを作成してみましょう。 +*/ + diff --git a/doc/src/ja_JP/development/qtestlib.qdoc b/doc/src/ja_JP/development/qtestlib.qdoc new file mode 100644 index 0000000..65c4c3f --- /dev/null +++ b/doc/src/ja_JP/development/qtestlib.qdoc @@ -0,0 +1,432 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page qtestlib-tutorial.html + \brief QTestLib を使ったテストの導入ガイド + \contentspage QTestLib マニュアル + \nextpage {第1章: ユニットテストの作成}{第1章} + + \title QTestLib チュートリアル + + このチュートリアルでは QTestLib フレームワークの機能の初歩的な使い方を説明します。 + このチュートリアルは全5章で構成されています: + + \list 1 + \o \l {第1章: ユニットテストの作成}{ユニットテストの作成} + \o \l {第2章: データドリブンテスト}{データドリブンテスト} + \o \l {第3章: GUI イベントのシミュレート}{GUI イベントのシミュレート} + \o \l {第4章: GUI イベントの再現}{GUI イベントの再現} + \o \l {第5章: ベンチマークの作成}{ベンチマークの作成} + \endlist + +*/ + + +/*! + \example qtestlib/tutorial1 + + \contentspage {QTestLib チュートリアル}{目次} + \nextpage {第2章: データドリブンテスト}{第2章} + + \title 第1章: ユニットテストの作成 + + 第1章では、クラスのテストを行うシンプルなユニットテストを作成して実行する方法を説明します。 + + \section1 テストを作成する + + QString クラスの挙動をテストすると仮定しましょう。 + まず、テスト関数を含むクラスが必要です。 + このクラスは、 QObject を継承する必要があります: + + \snippet examples/qtestlib/tutorial1/testqstring.cpp 0 + + QTest ヘッダーを include してください。 + それから、テストフレームワークがテスト関数を検索して実行できるよう、 + テスト関数を private slot として宣言する必要があります。 + + 次に、テスト関数を実装します。実装は以下のようになります: + + \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 8 + + \l QVERIFY() マクロは、引数として渡される式を評価します。 + 式が真と評価されるとテスト関数の実行が継続されます。 + そうでなければ、エラーメッセージがテストログに追加されテスト関数の実行が停止します。 + + テストログに詳細情報を追加したい場合は、 + \l QCOMPARE() マクロを代わりに使用してください: + + \snippet examples/qtestlib/tutorial1/testqstring.cpp 1 + + 文字列が等しくない場合、両方の文字列の内容がテストログに追加され、 + 比較に失敗した理由を直ちに確認できます。 + + 最後に、テストケースを実行可能にするために以下の2行が必要となります: + + \snippet examples/qtestlib/tutorial1/testqstring.cpp 2 + + \l QTEST_MAIN() マクロは、すべてのテスト関数を実行するシンプルな + \c main() 関数に展開されます。 + テストクラスの宣言と実装が \c .cpp ファイルに存在する場合、 + Qt のメタオブジェクト機能を動作させるために、 + 生成された moc ファイルを include する必要があります。 + + \section1 テストを実行する + + 作成したテストを実行してみましょう。 + テストが \c testqstring.cpp + として空のディレクトリに保存されていると仮定して、 + qmake を使用してプロジェクトを作成し、makefile を生成します。 + + \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 9 + + \bold {注:} Windows をお使いの場合、 \c make を \c nmake または、 + 任意のビルドツールに置き換えてください。 + + 作成した実行ファイルを実行すると、次の出力が表示されます: + + \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 10 + + おめでとうございます! + QTestLib フレームワークを使用して、 + 最初のユニットテストの作成と実行に成功しました。 +*/ + +/*! + \example qtestlib/tutorial2 + + \previouspage {第1章: ユニットテストの作成}{第1章} + \contentspage {QTestLib チュートリアル}{目次} + \nextpage {第3章: GUI イベントのシミュレート}{第3章} + + \title 第2章: データドリブンテスト + + 本章ではテストを複数回、それぞれ異なるテストデータを使用して行う方法について、 + 例を示しながら説明します。 + + これまでは、テストデータをテスト関数にハードコードしていました。 + この場合、テストデータを追加した関数は以下のようになります: + + \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 11 + + 関数が繰り返しを行うコードによって分散するのを防ぐために、 + QTestLib はテストデータのテスト関数への追加をサポートします。 + そのために、別の private slot をテストクラスに追加する必要があります: + + \snippet examples/qtestlib/tutorial2/testqstring.cpp 0 + + \section1 データ関数を記述する + + テスト関数に関連するデータ関数では、テスト関数と同じ関数名を使用して、 + 末尾に \c{_data} を追加します。 + データ関数は以下のようになります: + + \snippet examples/qtestlib/tutorial2/testqstring.cpp 1 + + まず、 \l QTest::addColumn() 関数を使用して、 + テストテーブルの2つの要素(テスト文字列(\c{"string"})および、 + QString::toUpper() 関数をその文字列に適用するときに予期された結果(\c{"result"})) + を定義します。 + + 次に、 \l QTest::newRow() 関数を使用して、 + データをテーブルに追加します。 + それぞれのデータセットは、テストテーブルでは別々の行(Row)になります。 + + \l QTest::newRow() は、データセット名をその引数として受け付けます。 + テストに失敗した場合、テストログでこのデータセット名が使用され、 + 失敗したデータの一覧が表示されます。 + 続いて、最初に任意の文字列(\c{"string"})を、次に + QString::toUpper() 関数をその文字列(\c{"string"})に適用するときに予期された結果(\c{"result"})の順に、 + テーブル行にデータセットをストリーミングします。 + + テストデータとは、二次元テーブルを指します。 + ここでは、\c string および \c result と呼ばれる2つの列と3つの行が含まれます。 + さらに、インデックスと同様に、各行に名前を関連付けます: + + \table + \header + \o index + \o name + \o string + \o result + \row + \o 0 + \o all lower + \o "hello" + \o HELLO + \row + \o 1 + \o mixed + \o "Hello" + \o HELLO + \row + \o 2 + \o all upper + \o "HELLO" + \o HELLO + \endtable + + \section1 テスト関数を書き換える + + ここで、テスト関数の書き換えを行います: + + \snippet examples/qtestlib/tutorial2/testqstring.cpp 2 + + TestQString::toUpper() 関数は 3 回実行されます。 + すなわち、関連する TestQString::toUpper_data() + 関数で作成したテストテーブルの各エントリ毎に一度実行されます。 + + TestQString::toUpper() 関数では + まず、 \l QFETCH() マクロを使用して、データセットの2つの要素を取得します。 + \l QFETCH() は、要素のデータタイプと要素名の、 + 2 つの引数を取ります。 + 次に \l QCOMPARE() マクロを使用して、テストを実行します。 + + このアプローチにより、テストの修正を行うことなく + テストに新規データを非常に簡単に追加できます。 + + このテストの場合も、テストケースを実行可能にするには、 + 同様に以下の2行が必要です: + + \snippet examples/qtestlib/tutorial2/testqstring.cpp 3 + + これまでと同様に、 \l QTEST_MAIN() マクロは + すべてのテスト関数を実行するシンプルな + \c main() 関数に展開されます。 + テストクラスの宣言と実装が \c .cpp ファイルに存在する場合、 + Qt のメタオブジェクト機能を動作させるために、 + 生成された moc ファイルを include する必要があります。 + +*/ + +/*! + \example qtestlib/tutorial3 + + \previouspage {第2章: データドリブンテスト}{第2章} + \contentspage {QTestLib チュートリアル}{目次} + \nextpage {第4章: GUI イベントの再現}{第4章} + + \title 第3章: GUI イベントのシミュレート + + QTestLib にはグラフィカルユーザインターフェースをテストするための機能があります。 + QTestLib は、ネイティブなウィンドウシステムのイベントをシミュレートする代わりに、 + Qt の内部で使われるイベントを送信します。 + このため、テストが実行されるコンピュータには + 副次的な悪影響が発生しません。 + + 本章では、シンプルな GUI テストを作成する方法を確認します。 + + \section1 GUI テストを作成する + + 今回は、 QLineEdit クラスの挙動をテストすると仮定しましょう。 + これまでと同様に、テスト関数を含むクラスが必要です: + + \snippet examples/qtestlib/tutorial3/testgui.cpp 0 + + 唯一の違いは、 QTest だけでなく、 QtGui クラスの宣言を + include する必要があることです。 + + \snippet examples/qtestlib/tutorial3/testgui.cpp 1 + + テスト関数を実装する際は、最初に QLineEdit を作成します。 + 次に、 \l QTest::keyClicks() 関数を使用して、 + "hello world" をラインエディットに入力する操作をシミュレートします。 + + \note キーボードショートカットを正しくテストするには、 + ウィジェットの表示も必要になります。 + + QTest::keyClicks() は、 + ウィジェットのキーシーケンスの入力をシミュレートします。 + 必要に応じてキーボード修飾子の指定や、 + 各キー入力後の遅延(ミリ秒単位)を指定することができます。 + 同様に、 QTest::keyClick() 、 QTest::keyPress() 、 QTest::keyRelease() 、 + QTest::mouseClick() 、 QTest::mouseDClick() 、 QTest::mouseMove() 、 + QTest::mousePress() 及び QTest::mouseRelease() 関数を使用して、 + 関連付けられた GUI イベントをシミュレートできます。 + + 最後に、 \l QCOMPARE() マクロを使用して、 + ラインエディットの文字列が正しいかどうか確認します。 + + これまでと同様に、 + テストケースを実行可能にするには、 + 以下の2行が必要です: + + \snippet examples/qtestlib/tutorial3/testgui.cpp 2 + + QTEST_MAIN() マクロは + すべてのテスト関数を実行するシンプルな + \c main() 関数に展開されます。 + テストクラスの宣言と実装が \c .cpp ファイルに存在する場合、 + Qt のメタオブジェクト機能を動作させるために、 + 生成された moc ファイルを include する必要があります。 +*/ + +/*! + \example qtestlib/tutorial4 + + \previouspage {第3章: GUI イベントのシミュレート}{第3章} + \contentspage {QTestLib チュートリアル}{目次} + \nextpage {第5章: ベンチマークの作成}{第5章} + + \title 第4章: GUI イベントの再現 + + 本章では、GUI イベントをシミュレートしたり、 + あるウィジェットで一連の GUI イベントを再生したり保存したりする方法について説明します。 + + 一連のイベントを保存して再生するアプローチは、 + \l{第2章: データドリブンテスト}{第2章} + で説明したアプローチとよく似ています。 + 必要な変更は、テストクラスにデータ関数を追加することです: + + \snippet examples/qtestlib/tutorial4/testgui.cpp 0 + + \section1 データ関数を記述する + + これまでと同様にテスト関数に関連するデータ関数では、 + テスト関数と同じ名前を使用して末尾に \c{_data} を追加します。 + + \snippet examples/qtestlib/tutorial4/testgui.cpp 1 + + まず、 QTest::addColumn() 関数を使用して、 + テーブルの2つの要素(GUI イベントのリスト(\c{"events"})および、 + QWidget のイベントのリストを適用するときに予期された結果(\c{"expected"}))を定義します。 + 最初の要素の型は \l QTestEventList であることに注意してください。 + + QTestEventList では、後で使用するテストデータの保存を行うために + GUI イベントを読み込んだり、 QWidget ウィジェットで再生したりできます。 + + 現在のデータ関数で、 \l QTestEventList を2つ作成します。 + 最初のリストには 'a' キーを一度だけ入力します。 + QTestEventList::addKeyClick() 関数を使用して、 + リストにイベントを追加します。 + 次に、QTest::newRow() 関数を使用してデータセットに名前を付けて、 + テーブルにイベントリストおよび予期された結果をストリーミングします。 + + 2つ目のリストには、2つのキー入力('a' に続いてバックスペース(Qt::Key_Backspace))を設定します。 + QTestEventList::addKeyClick() を使用してリストにイベントを追加し、 + QTest::newRow() を使用して名前を関連付けたテーブルにイベントリストおよび予期された結果を挿入します。 + + \section1 テスト関数を書き換える + + ここで、テストの書き換えを行います: + + \snippet examples/qtestlib/tutorial4/testgui.cpp 2 + + TestGui::testGui() 関数は2回実行されます。 + 関連する TestGui::testGui_data() + 関数で作成したテストデータの各エントリ毎にそれぞれ実行されます。 + + まず、\l QFETCH() マクロを使用して、データセットの2つの要素を取得します。 + \l QFETCH() は、要素のデータ型と要素名の2つの引数を取ります。 + 次に QLineEdit を作成し、 QTestEventList::simulate() 関数を使用して + ウィジェットにイベントのリストを適用します。 + + 最後に、 QCOMPARE() マクロを使用してラインエディットの文字列が正しいかどうか確認します。 + + これまでと同様に、 + テストケースを実行可能にするには、 + 以下の2行が必要です: + + \snippet examples/qtestlib/tutorial4/testgui.cpp 3 + + \l QTEST_MAIN() マクロは + すべてのテスト関数を実行するシンプルな + \c main() 関数に展開されます。 + テストクラスの宣言と実装が \c .cpp ファイルに存在する場合、 + Qt のメタオブジェクト機能を動作させるために、 + 生成された moc ファイルを include する必要があります。 +*/ + +/*! + \example qtestlib/tutorial5 + + \previouspage {第4章: GUI イベントの再現}{第4章} + \contentspage {QTestLib チュートリアル}{目次} + + \title 第5章: ベンチマークの作成 + + 最終章となる本章では QTestLib を使ってベンチマークを作成する方法について説明します。 + + \section1 ベンチマークの作成 + ベンチマークを作成するには QBENCHMARK マクロを用いてテスト関数を拡張します。 + ベンチマークテスト関数には通常、テストの準備コードと測定するコードを含む + QBENCHMARK マクロが一つ含まれます。 + QString::localeAwareCompare() のベンチマークを行う関数は以下のようになります。 + + \snippet examples/qtestlib/tutorial5/benchmarking.cpp 0 + + 測定の準備は関数の最初に行われています。 + この時点では測定は始まっていません。 + QBENCHMARK マクロで囲まれたブロックの中身のみが計測されます。 + このブロックの内部は正確な測定を行うために、何度か繰り返し実行される場合があります。 + + \l {testlib-benchmarking-measurement}{ベンチマークの方法}(バックエンド)は何種類か用意されており、 + コマンドライン引数から選択することが出来ます。 + + \section1 データ関数 + + データ関数は複数のデータでベンチマークを行うテストを作成するのに有用です。 + たとえば、ロケール準拠と標準的な比較を行う場合は以下のようになります。 + + \snippet examples/qtestlib/tutorial5/benchmarking.cpp 1 + + テスト関数ではデータに従ってベンチマークする手法を決定します。 + + \snippet examples/qtestlib/tutorial5/benchmarking.cpp 2 + + "if (useLocaleCompare)" 文はそのオーバヘッドを測定対象外とするために + QBENCHMARK マクロのブロックの外部にあります。 + ベンチマークの実行時にはそれぞれどちらか一つの QBENCHMARK マクロが実行されます。 + + \section1 外部ツール + + テストデータの可視化を行うためのツールが Qt Labs Web サイトの + \l{qtestlib-tools} プロジェクトに含まれています。 + そこには実行したテストの結果からパフォーマンスを比較したり、 + パフォーマンスのWeb用グラフを作成するツールが含まれています。 + + それらのツールの詳細と簡単なグラフの例は + \l{qtestlib-tools Announcement} を参照してください。 + +*/ + + + diff --git a/doc/src/ja_JP/examples/arrowpad.qdoc b/doc/src/ja_JP/examples/arrowpad.qdoc new file mode 100644 index 0000000..2518264 --- /dev/null +++ b/doc/src/ja_JP/examples/arrowpad.qdoc @@ -0,0 +1,248 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example linguist/arrowpad + \title サンプル: アローパッド + + この例では、\e {Qt Linguist} の主なコンセプトである"文脈"について、 + 少し詳しく取り上げて説明します。 + また、2つ以上の言語を使用する方法についても説明します。 + + \image linguist-arrowpad_en.png + + アプリケーションで使用可能な言語の数に制限はありませんが、 + ここではフランス語とオランダ語の2言語の翻訳を使用します。 + \c arrowpad.pro の関連する行は以下のとおりです。 + + \snippet examples/linguist/arrowpad/arrowpad.pro 0 + \codeline + \snippet examples/linguist/arrowpad/arrowpad.pro 1 + + \c lupdate を実行すると、2つの類似したメッセージファイル + \c arrowpad_fr.ts と \c arrowpad_nl.ts が作成されます。 + これらのファイルにはすべてのソーステキストとその文脈が含まれます。 + それらのテキストは \c tr() の呼び出しを通じて翻訳対象として + ソースコード内でマークされているものです。 + + Qt アプリケーションの翻訳の詳細については、 + \l{Qt Linguist manual}{Qt Linguist マニュアル} をご覧ください。 + + \section1 各行の簡単な解説 + + \c arrowpad.h では、 QWidget の派生クラスである \c ArrowPad + クラスを定義します。 + 上記のスクリーンショットで + 中央の 4 つのボタンを持つウィジェットが \c ArrowPad です。 + + \snippet examples/linguist/arrowpad/arrowpad.h 0 + \snippet examples/linguist/arrowpad/arrowpad.h 1 + \snippet examples/linguist/arrowpad/arrowpad.h 2 + + \c lupdate を実行するとソーステキストの抽出だけでなく、 + 文脈へのグループ化を行うことができます。 + ソーステキストが表示されるクラスの名前が文脈となります。 + 従って、この例では、"ArrowPad" が + \c ArrowPad クラスの文字列の文脈です。 + \c Q_OBJECT のマクロは、以下の内容で + \c ArrowPad に \c tr(x) を定義します: + + \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 0 + + 各ソーステキストが表示されるクラスを把握しておくと、 + \e {Qt Linguist} で論理的に関連のある文字列をグループ化することが出来ます。 + 例えば、ダイアログ内のすべての文字列には + ダイアログのクラス名の文脈が含まれるため、同時に表示されます。 + 文字列が表示される文脈によって翻訳の内容が影響を受ける場合があるため、 + 翻訳者にとって有用な情報となります。 + 一部の翻訳では、キーボードショートカットを変更する必要があります。 + また、同じグループにまとめられた特定の文脈(クラス) + にすべてのソーステキストを含めることにより、 + 翻訳者はコンフリクトを起こすことなく、 + より簡単にショートカットを変更できます。 + + \c arrowpad.cpp で、\c ArrowPad クラスを実装します。 + + \snippet examples/linguist/arrowpad/arrowpad.cpp 0 + \snippet examples/linguist/arrowpad/arrowpad.cpp 1 + \snippet examples/linguist/arrowpad/arrowpad.cpp 2 + \snippet examples/linguist/arrowpad/arrowpad.cpp 3 + + ラベルはユーザ表示可能な文字列であるため、 + ボタンのラベルごとに \c ArrowPad::tr() を呼び出します。 + + \image linguist-arrowpad_en.png + + \snippet examples/linguist/arrowpad/mainwindow.h 0 + \snippet examples/linguist/arrowpad/mainwindow.h 1 + + 上記のスクリーンショットでは、ウィンドウ全体が \c MainWindow です。 + これは、\c mainwindow.h ヘッダーファイルで定義します。 + ここでも、\c MainWindow が \e {Qt Linguist} の文脈になるよう、 + \c Q_OBJECT を使用します。 + + \snippet examples/linguist/arrowpad/mainwindow.cpp 0 + + \c MainWindow と \c mainwindow.cpp を実装する際に、 + \c ArrowPad クラスのインスタンスを作成します。 + + \snippet examples/linguist/arrowpad/mainwindow.cpp 1 + + また、\c MainWindow::tr() を、 + アクションおよびショートカット用に、計 2 回呼び出します。 + + \c tr() を使用して、言語によって異なるキーをサポートします。 + 英語の場合、"Ctrl+Q" は Quit (終了) に適していますが、 + オランダ語の翻訳者は "Ctrl+A" (Afsluiten の場合) を、 + ドイツ語の翻訳者は "Strg+E" (Beenden の場合) を使うといいでしょう。 + \key Ctrl キーショートカットを \c tr() で使用する場合は + 引数を 2 つ使用して、 + ショートカットが実行する機能を2番目の引数に記述してください。 + + \c main.cpp で定義した標準的な \c main() 関数は、以下のようになります。 + + \snippet examples/linguist/arrowpad/main.cpp 2 + \snippet examples/linguist/arrowpad/main.cpp 3 + + 現在のロケールに基づいて、使用する翻訳を選択します。 + 例えば、QLocale::system() は、 + \c LANG 環境変数の設定によって影響を受ける場合があります。 + \c .qm メッセージファイル(および TS ファイル)の命名規則に + ロケールを使用すると、 + 簡単にロケールに基づいて翻訳ファイルを選択することが + できるようになります。 + + 選択したロケールに QM メッセージファイルが存在しない場合、 + 元のソーステキストが使用され、エラーは生成されません。 + + \section1 フランス語からオランダ語に翻訳する + + ここでは、サンプルアプリケーションをフランス語に翻訳することから始めます。 + \e {Qt Linguist} を起動し、\c arrowpad_fr.ts の作業を行います。 + 2つの文脈 ("ArrowPad" および "MainWindow") + にグループ化された7つのソーステキスト ("\&Up", "\&Left" 等) + が含まれているはずです。 + + 次に、以下の翻訳を入力します: + + \list + \o \c ArrowPad + \list + \o \&Up - \&Haut + \o \&Left - \&Gauche + \o \&Right - \&Droite + \o \&Down - \&Bas + \endlist + \o \c MainWindow + \list + \o E\&xit - \&Quitter + \o Ctrl+Q - Ctrl+Q + \o \&File - \&Fichier + \endlist + \endlist + + 翻訳の入力が終わったら、 \key{Ctrl+Return} (もしくは\gui {完了にして次へ} + ボタン)を押すと、 + 翻訳が完了とマークされ次のソーステキストに移動するため便利です。 + + ファイルを保存して、オランダ語の翻訳でも同じ手順を実行し、 + \c arrowpad_nl.ts の作業を行います: + + \list + \o \c ArrowPad + \list + \o \&Up - \&Omhoog + \o \&Left - \&Links + \o \&Right - \&Rechts + \o \&Down - Omlaa\&g + \endlist + \o \c MainWindow + \list + \o E\&xit - \&Afsluiten + \o Ctrl+Q - Ctrl+A + \o File - \&Bestand + \endlist + \endlist + + \c tt1_fr.ts と \c tt1_nl.ts の翻訳ソースファイルは + QM ファイルに変換する必要があります。 + 以前と同様の方法で \e {Qt Linguist} を使用して変換できますが、 + コマンドラインツール \c lrelease を使うと + \e {Qt Linguist} から個々の \gui {ファイル|リリース} を読み込まなくても、 + アプリケーションの\e{すべての} QM ァイルを作成できます。 + + 以下を入力します: + + \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 1 + + これにより、\c arrowpad_fr.qm と \c arrowpad_nl.qm が作成されます。 + \c LANG 環境変数を \c fr に設定します。 + Unix では、以下の2つのコマンドのいずれかが機能します。 + + \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 2 + + Windows では、\c autoexec.bat を修正するか、以下を実行します。 + + \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 3 + + プログラムを実行すると、フランス語版が表示されます: + + \image linguist-arrowpad_fr.png + + \c LANG=nl を設定し、オランダ語でも同じ手順を実行します。 + これで、オランダ語版が表示されます: + + \image linguist-arrowpad_nl.png + + \section1 エクササイズ + + \e {Qt Linguist} で未完了の翻訳を行います。 + 例えば、各テキストのチェックマークをクリックして翻訳を未完了の状態にして保存します。 + その後、 \c lupdate 、\c lrelease 、サンプルの順に実行します。 + この変更がどのような影響を及ぼしましたか。 + + \c LANG=fr_CA (フランス語(カナダ))に設定し、 + サンプルプログラムを再実行します。 + \c LANG=fr の場合と同じ結果になる理由を説明してください。 + + オランダ語翻訳のショートカットのいずれかを変更し、 + \e \&Bestand と \e \&Boven の競合を解消します。 +*/ diff --git a/doc/src/ja_JP/examples/hellotr.qdoc b/doc/src/ja_JP/examples/hellotr.qdoc new file mode 100644 index 0000000..cc01b81 --- /dev/null +++ b/doc/src/ja_JP/examples/hellotr.qdoc @@ -0,0 +1,200 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example linguist/hellotr + \title サンプル: こんにちは tr() + + これは、小さな Hello World プログラムを日本語に翻訳する例です。 + 以下のスクリーンショットは英語版です。 + + \image linguist-hellotr_en.png + + Qt アプリケーションの翻訳に関する詳細は、\l{Qt Linguist manual} + をご覧ください。 + + \section1 各行の簡単な解説 + + \snippet examples/ja_JP/linguist/hellotr/main.cpp 0 + + この行では、 QTranslator クラスの宣言を読み込みます。 + QTranslator クラスのオブジェクトは、 + ユーザに表示する文字列を翻訳します。 + + \snippet examples/ja_JP/linguist/hellotr/main.cpp 5 + + 親をもたない QTranslator オブジェクトを作成します。 + + \snippet examples/ja_JP/linguist/hellotr/main.cpp 6 + + プログラムで使用するソーステキストの日本語の翻訳を含む、 + \c hellotr_ja.qm ( \c .qm というファイル拡張子は省略します) + と呼ばれるファイルを読み込みます。 + ファイルが見つからなくてもエラーは発生しません。 + + \snippet examples/ja_JP/linguist/hellotr/main.cpp 7 + + \c hellotr_ja.qm の翻訳を、プログラムで使用する翻訳プールに追加します。 + + \snippet examples/ja_JP/linguist/hellotr/main.cpp 8 + + "Hello world!" を表示するプッシュボタンを作成します。 + 検索した \c hellotr_ja.qm に "Hello world!" の翻訳が含まれている場合、 + その翻訳が表示されます。 + 含まれていない場合、翻訳前のテキストがそのまま表示されます。 + + QObject を継承するすべてのクラスには、\c tr() 関数が含まれます。 + QObject クラスのメンバ関数内では、\c QPushButton::tr("Hello world!") + や \c QObject::tr("Hello world!") の代わりに、シンプルに + \c tr("Hello world!") を使います。 + + \section1 英語版のアプリケーションを実行する + + 翻訳ファイル \c hellotr_ja.qm の作成が終わっていないため、 + 以下のアプリケーションを起動したときに元の文字列が表示されます。 + + \image linguist-hellotr_en.png + + \section1 日本語のメッセージファイルを作成する + + 最初のステップは、プロジェクトのすべてのソースファイルを列挙する + \c hellotr.pro を作成することです。 + プロジェクトファイルは、qmake プロジェクトファイルまたは、通常の + makefile である可能性があります。 + 以下の記述を含むプロジェクトファイルを作成してください。 + + \snippet examples/ja_JP/linguist/hellotr/hellotr.pro 0 + \snippet examples/ja_JP/linguist/hellotr/hellotr.pro 1 + + \c TRANSLATIONS は、管理するメッセージファイルを指します。 + この例では、日本語の翻訳のみ管理します。 + + ファイル拡張子は、\c .qm ではなく、\c .ts であることにご注意ください。 + \c .ts は翻訳のソースファイルのフォーマットであり、 + アプリケーションの開発時に使用します。 + プログラマーまたはリリースマネージャーは \c lupdate プログラムを実行し、 + ソースコードから抽出したソーステキストを使用して + TS ファイルの生成と更新を行います。 + 翻訳者は、 \e {Qt Linguist} を使用して TS ファイルの読み取りと更新を行い、 + 翻訳の追加と編集を行います。 + + TS の形式は、ユーザが直接閲覧可能な XML 形式であるため、 + 直接Eメールで送信したり、簡単にバージョン管理の対象にすることが出来ます。 + このファイルを手動で編集する場合、XML の既定のエンコードは UTF-8 で、 + Latin1(ISO 8859-1)ではないことに気をつけてください。 + '\oslash'(ノルウェー語の o にスラッシュが付いたもの)などの + Latin1 文字を入力する1つの方法は、XML エンティティ "ø" + を使用することです。 + これはすべての Unicode 4.0 文字に対して有効です。 + + 翻訳が完了したら、\c lrelease プログラムを使用して、 + TS ファイルを QM ファイル(Qt Message ファイル)形式に変換します。 + QM 形式は、極めて高速な検索性能を実現するようにデザインされた + コンパクトなライブラリ形式です。 + \c lupdate と \c lrelease はどちらも、 + プロジェクト全体のソースファイルとヘッダーファイル + (プロジェクトファイルの HEADERS および SOURCES 行で指定されている) + を読み取り、\c tr() 関数呼び出しの際に表示される文字列を抽出します。 + + \c lupdate は、メッセージファイル(この場合は \c hellotr_ja.ts) + の作成と更新を行い、これらをソースコードと同期させるために使用します。 + \c lupdate にはデータの削除機能がないため、 + \c lupdate はいつでも安全に実行できます。 + 例えば、ソースが変更されるたびに TS ファイルが更新されるよう、 + makefile に記述できます。 + + それでは、以下のように \c lupdate を実行してみましょう: + + \snippet doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc 0 + + (\c -verbose オプションは、操作を説明するメッセージを表示するよう + \c lupdate に指示します。) + 現在のディレクトリに、以下の内容で + \c hellotr_ja.ts ファイルが作成されていると思います: + + \snippet doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc 1 + + ツール (\c lupdate、 \e {Qt Linguist}、\c lrelease) + を使用して読み取りと更新を行うため、 + ファイル形式を理解する必要はありません。 + + \section1 Qt Linguist を使用して日本語に翻訳する + + XML やテキストエディタを使用して、TS ファイルを翻訳することも出来ますが、 + ここでは \e {Qt Linguist} を使用して翻訳を行います。 + + \e {Qt Linguist} を起動するには、以下を入力します。 + + \snippet doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc 2 + + 左上のペインに "QPushButton" が表示されるはずです。 + これをダブルクリックし、次に "Hello world!" をクリックして、 + \gui Translation ペイン (ウィンドウ右中央)に + "こんにちは、世界!" と入力します。 + 感嘆符(!)を忘れないように付けてください! + + \gui{完了} チェックボックスをオンにして、 + メニューバーから \gui{ファイル|保存} を選択します。 + TS ファイルから、以下の記述がなくなります。 + + \snippet doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc 3 + + その代わりに以下が含まれます。 + + \snippet doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc 4 + + \section1 日本語版のアプリケーションを実行する + + 日本語版のアプリケーションを実行する前に、 + TS ファイルから QM ファイルを生成する必要があります。 + QM ファイルは、\e {Qt Linguist}(単一の TS ファイルの場合)のメニューから、 + もしくは、コマンドラインプログラム \c lrelease を使用して生成できます。 + \c lrelease を使用する場合、 + プロジェクトファイルに列挙されている TS ファイルごとに + 1 つの QM ファイルを作成することが出来ます。 + \e {Qt Linguist} のメニューバーから \gui{ファイル|リリース} を選択し、 + ポップアップ表示される \gui{ファイルの保存} ダイアログで\gui{保存}を選択し、 + \c hellotr_ja.ts から \c hellotr_ja.qm を生成します。 + 今すぐ \c hellotr プログラムを再実行してみましょう。 + これで、ボタンに "こんにちは、世界!" と表示されます。 + + \image linguist-hellotr_ja.png +*/ diff --git a/doc/src/ja_JP/examples/trollprint.qdoc b/doc/src/ja_JP/examples/trollprint.qdoc new file mode 100644 index 0000000..1686774 --- /dev/null +++ b/doc/src/ja_JP/examples/trollprint.qdoc @@ -0,0 +1,286 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example linguist/trollprint + \title サンプル: トロールプリント + + トロールプリント(Troll Print)は、 + ユーザがプリンタの設定をするためのサンプルアプリケーションです。 + これには、英語とポルトガル語の2つのバージョンが用意されています。 + + \image linguist-trollprint_10_en.png + + この例では、いくつかのポルトガル語の翻訳を含む翻訳ファイル + \c trollprint_pt.ts を用意しました。 + + 同じアプリケーションの2つのバージョン、 + Troll Print 1.0 と 1.1 をリリースすることを想定します。 + 1つのバージョンで作成した翻訳を次のリリースで再利用する方法を習得します。 + (このチュートリアルでは、いくつかのソースファイルの編集が必要です。 + 新しい一時ディレクトリにすべてのファイルをコピーして、 + ここで作業を行うのがベストでしょう。) + + Qtアプリケーションの翻訳の詳細については、 + \l{Qt Linguist manual}{Qt Linguist マニュアル} をご覧ください。 + + \section1 各行の簡単な解説 + + \c PrintPanel クラスを \c printpanel.h で宣言します。 + + \snippet examples/linguist/trollprint/printpanel.h 0 + + \c PrintPanel は QWidget の派生クラスです。 + \c tr() が正しく動作するには、\c Q_OBJECT マクロが必要です。 + + 実装ファイルは \c printpanel.cpp です。 + + \snippet examples/linguist/trollprint/printpanel.cpp 0 + + Troll Print 1.0 で一部のコードがコメントアウトされています。 + Troll Print 1.1 にバージョンアップする際に、 + コメントから戻してください。 + + \snippet examples/linguist/trollprint/printpanel.cpp 1 + \snippet examples/linguist/trollprint/printpanel.cpp 2 + + PrintPanel では、\c tr("Enabled") と \c tr("Disabled") + を2回ずつ使用することに注意してください。 + "Enabled" と "Disabled" はどちらも同じ文脈で表示されるため、 + \e {Qt Linguist} では、それぞれ1回目の使用に対してのみ表示され、 + 2回目以降の使用に対しては翻訳が流用されるため表示されません。 + これは便利な時間短縮ツールですが、ポルトガル語などの一部の言語では、 + 2回目の使用に対して異なる翻訳が必要になります。 + これから、\e {Qt Linguist}で、 + すべての \c tr() に対して異なる翻訳を表示できるように設定する方法を学習します。 + + \c MainWindow, \c mainwindow.h はシンプルなヘッダーファイルです。 + \c mainwindow.cpp の実装には、翻訳対象としてマークする必要のある + ユーザに表示するソーステキストがあります。 + + \snippet examples/linguist/trollprint/mainwindow.cpp 0 + + ウィンドウのタイトルは翻訳する必要があります。 + + \snippet examples/linguist/trollprint/mainwindow.cpp 1 + \snippet examples/linguist/trollprint/mainwindow.cpp 3 + + また、アクションとメニューも翻訳する必要があります。 + キーボードショートカット "Ctrl+Q" に対して使用している \c tr() + の第 2 引数は、このショートカットがどのような機能を有しているかを + 翻訳者に示す唯一の情報であることに注意してください。 + + \snippet examples/linguist/trollprint/main.cpp 0 + + \c main.cpp の \c main() 関数は、 + \l{linguist/arrowpad}{アローパッド} の例の場合と同じになります。 + 具体的には、現在のロケールに基づいて、翻訳ファイルを選択します。 + + \section1 英語とポルトガル語で Troll Print 1.0 を実行する + + 既存の \c trollprint_pt.ts ファイルの翻訳を使用します。 + + \c LANG 環境変数を \c pt に設定して、\c trollprint を実行します。 + QM ファイルがないため、スクリーンショットは英語版のままです。 + ここで、\c lrelease (例: \c {lrelease trollprint.pro})を実行し、 + サンプルを再実行します。 + これで、ポルトガル語版(Troll Imprimir 1.0)になりました: + + \image linguist-trollprint_10_pt_bad.png + + 翻訳は正しく表示されていますが、誤りがあります。 + 文法的に正しいポルトガル語では、 + "Enabled" が2回目に使用されるときの正しい翻訳は、 + "Ativado" ではなく "Ativadas" であり、 + "Disabled" が2回目に翻訳されるときも、 + 語尾を同様に変化させる必要があります。 + + \e {Qt Linguist} で \c trollprint_pt.ts を開くと、 + ソースコードには "Enabled" と "Disabled" が2回ずつ使われていますが、 + 翻訳ソースファイルでは1回ずつしか使われていません。 + これは、\e {Qt Linguist} では、 + ソーステキストが重複する場合は翻訳を流用することにより、 + 翻訳者の作業を最小限に抑えようとするためです。 + このように類似した翻訳に誤りがある場合、 + プログラマは繰り返し使用する際に翻訳の曖昧さを排除する必要があります。 + これは、2個の引数を取る\c tr() を使用することにより、 + 容易に実行できます。 + + 実際には、翻訳者の"文脈"は変更する必要のある文字列が表示されるクラスに対するクラス名であるため、 + どのファイルを変更すべきか簡単に特定できます。 + この場合、ファイルは \c printpanel.cpp であり、 + 変更すべき行は4行あります。 + ラジオボタンの最初のペアの \c tr() 呼び出しに、2つ目の引数 "two-sided"(両面) をに追加します: + + \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 0 + + そして、ラジオボタンの2番目のペアの \c tr() 呼び出しに、 + 2つ目の引数 "colors"(色) を追加します。 + + \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 1 + + ここで、\c lupdate を実行し、\e {Qt Linguist} で + \c trollprint_pt.ts を開きます。2 つの変更個所がわかるはずです。 + + まず、翻訳ソースファイルには、\e{3組}の "Enabled" と + "Disabled" のペアが含まれています。 + 最初のペアは、既に利用されていないテキストであることを意味する灰色になっています。 + これは、 \c tr() 内の文字列が第二引数を追加した新たな + \c tr() の文字列で置き換えられたからです。 + 2番目のペアには、"two-sided"(両面) というコメントが含まれており、 + 3番目のペアには、"colors"(色) というコメントが含まれています。 + これらのコメントは、\e {Qt Linguist} に + \gui {開発者のコメント} として表示されます。 + + 次に、翻訳者の作業を最小限に抑えるために、 + 新たに使用される "Enabled" と "Disabled" の文字列に対して、 + 訳語 "Ativado" と "Desativado" が自動的に使用されます。 + これらの訳語は、これらの原語が2回目に使用される場合の正しい翻訳ではありません。 + ここからが、チュートリアルの出発点です。 + + 2番目の "Ativado" を "Ativadas" に、 + 2番目の "Desativado" を "Desativadas" に変更し、保存して終了します。 + \c lrelease を実行して最新のバイナリ \c trollprint_pt.qm ファイルを作成し、 + Troll Print (または Troll Imprimir) を実行します。 + + \image linguist-trollprint_10_pt_good.png + + \e {Qt Linguist} では "comments" と呼ばれる + \c tr() 呼び出しの2つ目の引数は、 + 同じ文脈(クラス)で発生する類似したソーステキストを識別します。 + コメントは、たとえば Ctrl キーによるキーボードショートカットが + ショートカットによって実行される機能を伝達する唯一の手段である場合等に、 + 翻訳者に情報を提供するのに便利です。 + + 翻訳者に情報を提供する他の手段は、 + 翻訳の必要があるソーステキストを含むアプリケーションの + 特定の部分への移動方法に関する情報を提供することです。 + これにより、翻訳者は、翻訳が表示される文脈を確認し、 + 翻訳を検索してテストを行うことができます。 + これは、ソースコードで \c TRANSLATOR + コメントを使用して行います: + + \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 2 + + 一部のソースファイル、特にダイアログクラスのコメントに + ダイアログに到達するまでに必要な操作を記述します。 + また、\c mainwindow.cpp や \c printpanel.cpp など、 + 適切なサンプルファイルにこれらを追加することもできます。 + \c lupdate を実行して \e {Qt Linguist} を起動し、 + \c trollprint_pt.ts を読み込みます。 + ソーステキストの一覧を参照する際に、 + \gui{ソーステキスト}と\gui{開発者のコメント} + の領域に表示されるコメントを確認できます。 + + 特に大きなプログラムでは、翻訳者が自分の翻訳を探し、 + それが適切かどうかを確認することが困難な場合があります。 + コメントは役立つナビゲーション情報を提供するため、 + 翻訳に要する時間を節約できます: + + \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 3 + + \section1 Troll Print 1.1 + + これから、Troll Print のバージョン 1.1 のリリースの準備を行います。 + テキストエディターを起動して、次の手順に従って変更を行ってください: + + \list + \o \c printpanel.cpp の文字列 "\TROLL PRINT\" を引数に + QLabel を作成する2つの行のコメントを解除します。 + \o ソースの変更: \c printpanel.cpp で、"2-sided" を + "Two-sided" に置き換えます。 + \o \c mainwindow.cpp で、すべての "1.0" を "1.1" に置き換えます。 + \o \c mainwindow.cpp で、著作権表示の年号を 1999-2000 に更新します。 + \endlist + + (実際のアプリケーションでは、バージョン番号と著作権表示の年号は + const または #define をつかって定義するでしょう。) + + 終了したら、\c lupdate を実行し、\e {Qt Linguist} で + \c trollprint_pt.ts を開きます。以下の項目は、特別なコンテンツです: + + \list + \o \c MainWindow + \list + \o Troll Print 1.0 - 古いテキストとして灰色でマーク + \o About Troll Print 1.0 - 古いテキストとして灰色でマーク + \o Troll Print 1.0. Copyright 1999 Software, Inc. - + 古いテキストとして灰色でマーク + \o Troll Print 1.1 - 自動的に "Troll Imprimir 1.1" に翻訳(未完了) + \o About Troll Print 1.1 - 自動的に "Troll Imprimir 1.1" に翻訳(未完了) + \o Troll Print 1.1. Copyright 1999-2000 Software, + Inc. - 自動的に "Troll Imprimir 1.1. + Copyright 1999-2000 Software, Inc." に翻訳(未完了) + \endlist + \o \c PrintPanel + \list + \o 2-sided - 古いテキストとして灰色でマーク + \o \TROLL PRINT\ - 未翻訳のテキストとして"?"マーク + \o Two-sided - 未翻訳のテキストとして"?"マーク + \endlist + \endlist + + \c lupdate は、修正を容易に行い、数字の処理を効率的に行うために、 + 様々な処理を行っています。 + + \c MainWindow の翻訳の見直しを行います。 + "\TROLL PRINT\" を "\TROLL IMPRIMIR\" と翻訳します。 + "Two-sided" を翻訳する際には、\gui{フレーズと推測} の欄から + "2-lados" をダブルクリックして訳に選択した後に、 + "2" を "Dois" に変更します。 + + 保存して終了し、\c lrelease を実行します。 + ポルトガル語版の表示は以下のようになります: + + \image linguist-trollprint_11_pt.png + + \gui{Ajuda|Sobre} (\gui{Help|About}) を選択し、 + バージョン情報ボックスを確認します。 + + \gui{Ajuda|Sobre Qt} (\gui{Help|About Qt}) を選択した場合、 + 英語版のダイアログが表示されます。 + Qt の翻訳はまだ終わっていません。 + 詳細については、\l{Internationalization with Qt} を参照してください。 + + ここで、\c LANG=en を設定し、元の英語版を実行してみてください: + + \image linguist-trollprint_11_en.png +*/ diff --git a/doc/src/ja_JP/getting-started/tutorials.qdoc b/doc/src/ja_JP/getting-started/tutorials.qdoc new file mode 100644 index 0000000..701ba88 --- /dev/null +++ b/doc/src/ja_JP/getting-started/tutorials.qdoc @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page tutorials.html + \title チュートリアル + + \contentspage How to Learn Qt + \nextpage Qt Examples + + \brief Qt の学習を助けるチュートリアルやガイドの概要 + + \nextpage Qt Examples + + Qt で提供されているこれらのチュートリアルやガイドは + 新たに Qt の開発を始めるユーザの良い助けとなります。 + これらのドキュメントでは ウィジェットの基本的な使い方から始まり + ステップバイステップでアプリケーションの使い方を学ぶことが出来ます。 + + \table + \row + \o{2,1} \l{ウィジェットのチュートリアル}{\bold ウィジェット} + \o{2,1} \l{チュートリアル: アドレス帳}{\bold {アドレス帳}} + \row + \o \image widget-examples.png Widgets + \o + ウィジェットとレイアウトを使って GUI アプリケーションを作成する + 初心者向けのガイドです。 + + \o \image addressbook-tutorial.png AddressBook + \o + 完全な機能を持つアドレス帳アプリケーションを作成する 7 章で構成されたガイドです。 + + \row + \o{2,1} \l{Qt Designer クイックガイド}{\bold{Qt Designer}} + \o{2,1} \l{Qt Linguist Manual: Programmers#Tutorials}{\bold {Qt Linguist}} + \row + \o \image designer-examples.png QtDesigner + \o + \QD を使ってフォームを生成する基本的な手順を説明するクイックガイドです。 + + \o \image linguist-examples.png QtLinguist + \o + \l{サンプル: こんにちは tr()}{こんにちは tr()}、 + \l{サンプル: アローパッド}{アローパッド}、 + \l{サンプル: トロールプリント}{トロールプリント} + の三例を通じて翻訳の方法を説明します。 + + \row + \o{2,1} \l{QTestLib チュートリアル}{\bold QTestLib} + \o{2,1} \l{qmake チュートリアル}{\bold qmake} + \row + \o{2,1} + Qt のユニットテストフレームワークである QTestLib の機能の初歩的な使い方を説明するチュートリアルです。 + このチュートリアルは4章で構成されています。 + + \o{2,1} + \c qmake の使い方を説明するチュートリアルです。 + このチュートリアルを卒業した後は \l{qmake Manual}{qmake user guide}(英語) + を読むことをお勧めします。 + + \endtable +*/ diff --git a/doc/src/ja_JP/images/linguist-hellotr_en.png b/doc/src/ja_JP/images/linguist-hellotr_en.png new file mode 100644 index 0000000..05aa945 Binary files /dev/null and b/doc/src/ja_JP/images/linguist-hellotr_en.png differ diff --git a/doc/src/ja_JP/images/linguist-hellotr_ja.png b/doc/src/ja_JP/images/linguist-hellotr_ja.png new file mode 100644 index 0000000..d9beb01 Binary files /dev/null and b/doc/src/ja_JP/images/linguist-hellotr_ja.png differ diff --git a/doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc b/doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc new file mode 100644 index 0000000..e05cd12 --- /dev/null +++ b/doc/src/ja_JP/snippets/code/doc_src_examples_hellotr.qdoc @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [0] +lupdate -verbose hellotr.pro +//! [0] + + +//! [1] + + + QPushButton + + Hello world! + + + + +//! [1] + + +//! [2] +linguist hellotr_ja.ts +//! [2] + + +//! [3] + +//! [3] + + +//! [4] +こんにちは、世界! +//! [4] diff --git a/doc/src/ja_JP/tutorials/addressbook.qdoc b/doc/src/ja_JP/tutorials/addressbook.qdoc new file mode 100644 index 0000000..9fb1059 --- /dev/null +++ b/doc/src/ja_JP/tutorials/addressbook.qdoc @@ -0,0 +1,1070 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page tutorials-addressbook.html + + \title チュートリアル: アドレス帳 + \brief シンプルだが、完全な機能を持つアプリケーションの作成を通じた + GUI プログラミングへの導入。 + + このチュートリアルでは、Qt クロスプラットフォームフレームワークを使用した + GUI プログラミングの概要について説明しています。 + + \image addressbook-tutorial-screenshot.png + + \omit + It doesn't cover everything; the emphasis is on teaching the programming + philosophy of GUI programming, and Qt's features are introduced as needed. + Some commonly used features are never used in this tutorial. + \endomit + + このチュートリアルでは以下に示す Qt の基本的な機能を学ぶことが出来ます: + + \list + \o ウィジェットとレイアウトマネージャ + \o コンテナクラス + \o シグナル/スロット + \o 入力デバイスと出力デバイス + \endlist + + Qt を初めて利用する方は、最初に \l{How to Learn Qt} をご覧ください。 + + チュートリアルの目次: + + \list 1 + \o \l{tutorials/addressbook/part1}{ユーザインターフェースの設計} + \o \l{tutorials/addressbook/part2}{アドレスの追加} + \o \l{tutorials/addressbook/part3}{項目間のナビゲーション} + \o \l{tutorials/addressbook/part4}{アドレスの編集と削除} + \o \l{tutorials/addressbook/part5}{検索機能の追加} + \o \l{tutorials/addressbook/part6}{読み込みと保存} + \o \l{tutorials/addressbook/part7}{その他の機能} + \endlist + + このチュートリアルのソースコードは、Qt の + \c examples/tutorials/addressbook ディレクトリに置かれています。 + + この小さなアプリケーションは本格的な最新の GUI + アプリケーションのようには見えませんが、 + 複雑なアプリケーションで使用される多くの基本的な技術が採用されています。 + このチュートリアルが終わったら、 + メニューやツールバー、ステータスバーなどを表示する + 小さな GUI アプリケーションである + \l{mainwindows/application}{Application} + のサンプルをチェックすることをお勧めします。 + +*/ + +/*! + \page tutorials-addressbook-part1.html + + \example tutorials/addressbook/part1 + \title 第1章 - ユーザインターフェースのデザイン + + 本チュートリアルの第1章では + アドレス帳アプリケーションで使用する基本的なインターフェース + (GUI) の設計について説明します。 + + GUI プログラム作成の最初のステップは、 + ユーザインターフェースを設計することです。 + 本章の目標は、基本的なアドレス帳アプリケーションを実装するのに必要な + ラベルと入力フィールドを設定することです。 + 下図は、ここで作成しようとしているアドレス帳のスクリーンショットです。 + + \image addressbook-tutorial-part1-screenshot.png + + ユーザがアドレス帳に名前や住所を入力できるようにするには、 + 2つの QLabel のオブジェクトである \c nameLabel 及び \c addressLabel と、 + 入力フィールドとして QLineEdit オブジェクトの \c nameLine と + QTextEdit オブジェクトの \c addressText が必要です。 + 使用するウィジェットとその配置は下図に示してあります。 + + \image addressbook-tutorial-part1-labeled-screenshot.png + + 以下の3つのファイルを使用してこのアドレス帳を実装します: + + \list + \o \c{addressbook.h} - \c AddressBook クラスを宣言するファイル、 + \o \c{addressbook.cpp} - \c AddressBook クラスを実装するファイル、 + \o \c{main.cpp} - \c AddressBook クラスのインスタンスを持つ + \c main() 関数を含むファイル。 + \endlist + + \section1 Qt プログラミング - 派生クラスの作成 + + Qt プログラムを作成する際は、 + 通常 Qt オブジェクトの派生クラスを作成して機能を追加します。 + これは、カスタムウィジットや標準的なウィジェットの集合体を作成する場合の + 重要なコンセプトの1つです。 + ウィジェットの挙動の拡張や変更のために派生クラスを作成することには + 以下のような利点があります: + + \list + \o 仮想関数または純粋仮想関数の実装を行って要求される機能を実装できます。 + 必要によっては基底クラスの実装にフォールバックして利用できます。 + + \o これにより、アプリケーションのその他の部分が + ユーザインターフェースの個々のウィジェットを指定する必要がないよう、 + ユーザインターフェースの一部をクラス内にカプセル化できます。 + + \o 派生クラスは、同一のアプリケーションまたはライブラリに + 複数のカスタムウィジットを作成するために使用できます。 + また、派生クラスのコードは、他のプロジェクトで再利用可能です。 + + \endlist + + Qt ではアドレス帳ウィジェットを提供していないため、 + 標準的な Qt ウィジェットクラスを継承して機能を追加します。 + 本チュートリアルで作成する \c AddressBook クラスは、 + 基本的なアドレス帳ウィジェットが必要な場合に再利用できます。 + + \section1 AddressBook クラスの宣言 + + \l{tutorials/addressbook/part1/addressbook.h}{\c addressbook.h} + ファイルは、 \c AddressBook クラスを宣言するために使用します。 + + ここでは \c AddressBook を QWidget の派生クラスとし、 + コンストラクタを宣言することから始めます。 + また、 Q_OBJECT マクロを使用して、クラスで多言語化機能及び、 + Qt のシグナル/スロット機能が使われていることを示します。 + ただし、現段階ではこれらの機能の全てを使わない場合もあります。 + + \snippet tutorials/addressbook/part1/addressbook.h class definition + + クラスは、 前述した QLineEdit と QTextEdit のプライベートなインスタンス + \c nameLine と \c addressText の宣言を保有します。 + 後述の章で、 \c nameLine 及び \c addressText に保存したデータが、 + 多くのアドレス帳の機能で必要になることがわかるでしょう。 + + 我々が使用する QLabel オブジェクトは、 + 一旦作成すると後で参照する必要がないため、宣言する必要はありません。 + Qt でオブジェクトの所有権を追跡する方法については、次節で説明します。 + + Q_OBJECT マクロ自体は、Qt のより高度な機能を実装します。 + ここでは、 Q_OBJECT マクロを、 \l{QObject::}{tr()} 及び + \l{QObject::}{connect()} 関数を使用可能にする + ショートカットとみなしたほうが良いでしょう。 + + これで、 \c addressbook.h ファイルが完成しました。 + 次は対応する \c addressbook.cpp ファイルの実装を行います。 + + \section1 AddressBook クラスの実装 + + \c AddressBook のコンストラクタは、 \a{parent} パラメータとして + QWidget を受け取ります。 + 慣例により、このパラメータを基底クラスのコンストラクタに渡します。 + 親が複数の子を所有できるというこの所有概念は、 + Qt でウィジェットのグループ化を行う場合に有用です。 + 例えば、親を削除すると、親に属する子も全て削除されます。 + + \snippet tutorials/addressbook/part1/addressbook.cpp constructor and input fields + + このコンストラクタ内で、 \c nameLine と \c addressText のインスタンスを生成し、 + 2つのローカル QLabel オブジェクトの \c nameLabel と \c addressLabel + を宣言し、そのインスタンスを生成します。 + \l{QObject::tr()}{tr()} 関数は、 + 翻訳した文字列が存在する場合にそれを返します。 + そうでない場合は、引数の文字列自体を返します。 + この関数は文字列が他の言語に翻訳されるようにマークする役目を持ちます。 + 翻訳可能な文字列を使用するたびに、マークしてください。 + + Qt を使用してプログラミングを行う場合、 + レイアウトが機能する仕組みを理解していると便利です。 + Qt は主に、以下の3つのレイアウトクラスを提供します。 + ウィジェットの配置を処理するための QHBoxLayout 、 QVBoxLayout 及び + QGridLayout です。 + + \image addressbook-tutorial-part1-labeled-layout.png + + ここでは、 QGridLayout を使って、 + ラベルと入力フィールドを配置します。 + QGridLayout は、有効なスペースを格子状に分割し、 + 行/列番号により指定するセルに、ウィジェットを配置します。 + 上図は、レイアウトセルとウィジェットの位置を示しており、 + 以下のコードを使用して、この配置を指定します: + + \snippet tutorials/addressbook/part1/addressbook.cpp layout + + \c addressLabel は、追加引数として Qt::AlignTop を用いて配置されていることに注意してください。 + これは、セル(1,0) で縦方向の中央に配置されないようにするためです。 + Qt のレイアウトにおける基本概念については、 + \l{Layout Management} のドキュメントをご覧ください。 + + ウィジェットにレイアウトオブジェクトをインストールするには、 + ウィジェットの \l{QWidget::setLayout()}{setLayout()} + 関数を呼び出す必要があります。 + + \snippet tutorials/addressbook/part1/addressbook.cpp setting the layout + + 最後に、ウィジェットのタイトルを "Simple Address Book" とします。 + + \section1 アプリケーションを実行する + + 別のファイル \c main.cpp に、 \c main() 関数に実装します。 + この関数内で、QApplication である \c app のインスタンスを生成します。 + QApplication は、既定のフォントやカーソルなど + アプリケーションに共通な複数のリソース及び、 + イベントループの実行に関与しています。 + 従って、Qt を使用する全ての GUI アプリケーションでは、 + 必ず QApplication が存在します。 + + \snippet tutorials/addressbook/part1/main.cpp main function + + スタックに新しい \c AddressBook ウィジェットを生成し、 + \l{QWidget::show()}{show()} 関数を呼び出して表示します。 + ただし、ウィジェットはアプリケーションのイベントループが + 開始されるまで表示されません。 + アプリケーションの \l{QApplication::}{exec()} 関数を呼び出して、 + イベントループを開始します。 + この関数により返された結果は、 \c main() 関数の戻り値として使用されます。 + この時点で、スタックで \c AddressBook + をインスタンス化した理由が明らかになります。 + イベントループが終了すると \c main() 関数のスコープの外に移動します。 + それに伴って \c AddressBook 及び、 + これに属する全ての子ウィジェットが削除されるため、 + メモリリークを防ぐことができます。 +*/ + +/*! + \page tutorials-addressbook-part2.html + + \example tutorials/addressbook/part2 + \title 第2章 - アドレスの追加 + + 基本的なアドレス帳アプリケーションを作成するための次の手順は、 + ユーザからの操作を可能にすることです。 + + \image addressbook-tutorial-part2-add-contact.png + + 新しい連絡先を追加するために、 + ユーザがクリックするプッシュボタンを作成します。 + また、これらの連絡先を整理して保存するために、 + 何らかのデータ構造が必要になります。 + + \section1 AddressBook クラスの宣言 + + ラベルと入力フィールドの設定が完了しているため、 + 連絡先を追加する際に必要なプッシュボタンを追加します。 + \c addressbook.h ファイルに、 + 3つの QPushButton オブジェクトを宣言し、 + 対応する3つの public slot を作成します。 + + \snippet tutorials/addressbook/part2/addressbook.h slots + + スロットとは特定のシグナルに応答して呼び出される関数をいいます。 + このコンセプトについては、 \c AddressBook + クラスを実装する際にさらに詳細に取り上げます。 + なお、Qt のシグナル/スロットのコンセプトの概要については、 + \l{Signals and Slots} のドキュメントを参照してください。 + + 3つの QPushButton オブジェクト \c addButton 、 \c submitButton 、 + \c cancelButton は、前章の \c nameLine と \c addressText とともに、 + プライベート変数宣言に含まれています。 + + \snippet tutorials/addressbook/part2/addressbook.h pushbutton declaration + + アドレス帳の連絡先を横断して表示するには、 + 連絡先保持用のコンテナが必要です。 + QMap のオブジェクトである \c contacts をこの目的に使用します。 + \c contacts にはキーとして連絡先の名前 \e key + とそれに対応する値として連絡先の住所 \e value を格納します。 + + \snippet tutorials/addressbook/part2/addressbook.h remaining private variables + + QString の2つのプライベートオブジェクトとして \c oldName と \c oldAddress + も宣言します。 + これらのオブジェクトは、ユーザが \gui Add + をクリックする前に最後に表示した連絡先の名前と住所が含まれている必要があります。 + ユーザが \gui Cancel + をクリックすると、最後に表示した連絡先の詳細に戻って表示することが出来ます。 + + \section1 AddressBook クラスの実装 + + \c AddressBook のコンストラクタ内で、連絡先の詳細を編集することなく + 表示のみを行えるよう、 \c nameLine と \c addressText + を読み取り専用に設定します。 + + \dots + \snippet tutorials/addressbook/part2/addressbook.cpp setting readonly 1 + \dots + \snippet tutorials/addressbook/part2/addressbook.cpp setting readonly 2 + + 次に、プッシュボタン \c addButton 、 \c submitButton 、 \c cancelButton + のインスタンスを生成します。 + + \snippet tutorials/addressbook/part2/addressbook.cpp pushbutton declaration + + \c addButton を、 \l{QPushButton::show()} 関数を呼び出して表示します。 + \c submitButton と \c cancelButton は、 + \l{QPushButton::hide()}{hide()} を呼び出して非表示にします。 + これら2つのプッシュボタンはユーザが \gui Add + をクリックした場合にのみ表示され、後に説明する + \c addContact() によって処理されます。 + + \snippet tutorials/addressbook/part2/addressbook.cpp connecting signals and slots + + 各プッシュボタンの \l{QPushButton::clicked()}{clicked()} を、 + それぞれのスロットに接続します。 + 下図はこれを説明したものです。 + + \image addressbook-tutorial-part2-signals-and-slots.png + + 次に、 QVBoxLayout を使用して、 + アドレス帳ウィジェットの右側にプッシュボタンを + 上下一列に配置します。 + + \snippet tutorials/addressbook/part2/addressbook.cpp vertical layout + + \l{QBoxLayout::addStretch()}{addStretch()} 関数は、 + プッシュボタンを等間隔に並べるのではなく、 + ウィジェット上部に近づけて配置するために使用します。 + 下図は、\l{QBoxLayout::addStretch()}{addStretch()} を使用した場合と、 + 使用しない場合の違いを示しています。 + + \image addressbook-tutorial-part2-stretch-effects.png + + 次に、\l{QGridLayout::addLayout()}{addLayout()} を使用して、 + \c buttonLayout1 を \c mainLayout に追加します。 + \c buttonLayout1 は \c mainLayout の子となり、 + レイアウトが入れ子になりました。 + + \snippet tutorials/addressbook/part2/addressbook.cpp grid layout + + レイアウトの配置は以下のようになります: + + \image addressbook-tutorial-part2-labeled-layout.png + + \c addContact() では、最後に表示した連絡先の詳細を、 + \c oldName と \c oldAddress に保存します。 + 次に、これらの入力フィールドをクリアし、読み取り専用モードを解除します。 + \c nameLine にフォーカスをセットして、 \c submitButton と \c cancelButton を表示します。 + + \snippet tutorials/addressbook/part2/addressbook.cpp addContact + + \c submitContact() 関数は、以下の次の3つの要素から成ります: + + \list 1 + + \o \c nameLine 及び \c addressText から連絡先の詳細を抽出し、 + QString オブジェクトに保存します。 + また、ユーザが入力フィールドに何も入力せずに + \gui Submit をクリックしないよう確認します。 + どちらかのフィールドが空であれば、ユーザに名前と住所の入力を求める + QMessageBox が表示されます。 + + \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part1 + + \o 続けて、連絡先が既に存在するかどうか確認します。 + 存在しない場合は \c contacts に連絡先を追加して QMessageBox を表示し、 + 連絡先が追加されたことをユーザに知らせます。 + + \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part2 + + 連絡先が既に存在する場合、 QMessageBox を表示し、 + 連絡先が重複して追加されないように + 連絡先が存在することをユーザに知らせます。 + \c contacts オブジェクトは、名前と住所のキー値のペアで構成されているため、 + \e key が一意であることを確認します。 + + \o 上記の両方の事例に対処したら、 + 以下のコードを使ってプッシュボタンを通常の状態に戻します: + + \snippet tutorials/addressbook/part2/addressbook.cpp submitContact part3 + + \endlist + + 以下のスクリーンショットは、ユーザに情報メッセージを表示するために使用する + QMessageBox オブジェクトです。 + + \image addressbook-tutorial-part2-add-successful.png + + \c cancel() 関数は、最後に表示した連絡先の詳細を復元して + \c addButton を有効にし、 \c submitButton と \c cancelButton + を非表示にします。 + + \snippet tutorials/addressbook/part2/addressbook.cpp cancel + + 連絡先を追加する際の概念は、ユーザがいつでも自由に + \gui{送信} または \gui{キャンセル} をクリックできるようにすることです。 + 以下のフローチャートは、この概念を詳細に説明しています: + + \image addressbook-tutorial-part2-add-flowchart.png +*/ + +/*! + \page tutorials-addressbook-part3.html + + \example tutorials/addressbook/part3 + \title 第3章 - 項目間のナビゲーション + + アドレス帳アプリケーションは、半分完成しました。 + 次に表示する連絡先を変更するために、いくつかの関数を追加します。 + しかし、最初に、これらの連絡先を保存するために使用するデータ構造の種類を決める必要があります。 + + 第2章では、連絡先の名前 \e key 及び、連絡先の住所 \e value + の鍵と値のペアで QMap を使用しました。 + これは、この事例で使用するのに適した構造です。 + ただし、各項目間を移動して表示するには、多少の機能拡張が必要です。 + + QMap を、最初の要素と最後の要素を含むすべての要素が接続された + 循環リストに似たデータ構造に、機能拡張します。 + 下図はこのデータ構造を説明したものです。 + + \image addressbook-tutorial-part3-linkedlist.png + + \section1 AddressBook クラスの宣言 + + アドレス帳アプリケーションにナビゲーション機能を追加するには、 + \c AddressBook クラスに2つのスロットを追加する必要があります。 + next() 及び \c previous() を + \c addressbook.h ファイルに追加します。 + + \snippet tutorials/addressbook/part3/addressbook.h navigation functions + + また、新たに2つの QPushButton オブジェクトが必要になります。 + プライベート変数として + \c nextButton と \c previousButton を宣言します。 + + \snippet tutorials/addressbook/part3/addressbook.h navigation pushbuttons + + \section1 AddressBook クラスの実装 + + \c addressbook.cpp の \c AddressBook コンストラクタでは、 + \c nextButton と \c previousButton のインスタンスを生成し + 初期設定で無効にします。 + これは、アドレス帳に複数の連絡先が存在しない場合、 + ナビゲーションを有効にしないためです。 + + \snippet tutorials/addressbook/part3/addressbook.cpp navigation pushbuttons + + これらのプッシュボタンを、それぞれスロットに接続します: + + \snippet tutorials/addressbook/part3/addressbook.cpp connecting navigation signals + + 以下の画像は、ここで作成しようとしている + グラフィカルユーザインターフェースです。 + 最終アプリケーションが完成間近であることがわかるでしょう。 + + \image addressbook-tutorial-part3-screenshot.png + + \c next() と \c previous() では基本的な規約に従って、 + \c nextButton を右側に、 \c previousButton を左側に配置します。 + 直感的でわかりやすいレイアウトに仕上げるために、 + QHBoxLayout を使用してウィジェットを横に並べて配置します: + + \snippet tutorials/addressbook/part3/addressbook.cpp navigation layout + + 次に、 \c mainLayout に、QHBoxLayout のオブジェクトである + \c buttonLayout2 を追加します。 + + \snippet tutorials/addressbook/part3/addressbook.cpp adding navigation layout + + 下図は、 \c mainLayout のウィジェットの配置を示します。 + \image addressbook-tutorial-part3-labeled-layout.png + + \c addContact() 関数内部では、 + ユーザが連絡先を追加しているときに移動しないよう、 + これらのボタンを無効にする必要があります。 + + \snippet tutorials/addressbook/part3/addressbook.cpp disabling navigation + + また、 \c submitContact() 関数では、 \c contacts のサイズに応じて、 + ナビゲーションボタン \c nextButton 及び \c previousButton を有効にします。 + 前述のように、アドレス帳に複数の連絡先が存在しない場合は、 + ナビゲーションを有効にできません。 + 以下のコードは、その処理方法を示しています。 + + \snippet tutorials/addressbook/part3/addressbook.cpp enabling navigation + + \c cancel() 関数にも、これらの処理を含めます。 + + ここで、QMap のオブジェクト \c contacts を使って、 + 循環リストをエミュレートしましょう。 + \c next() 関数で、 \c contacts のイテレータを作成し、次に: + + \list + \o イテレータが \c contacts の末尾にない場合は、次の項目に移動します。 + + \o イテレータが \c contacts の末尾にある場合は、 + \c contacts の先頭に移動します。 + これによって、QMap が循環リストのように機能するという印象を与えます。 + \endlist + + \snippet tutorials/addressbook/part3/addressbook.cpp next() function + + \c contacts 内の正しいオブジェクトに移動したら、 + \c nameLine と \c addressText に内容を表示します。 + + 同様に、 \c previous() 関数で、 \c contacts のイテレータを作成し、次に: + \list + \o イテレータが \c contacts の末尾にある場合は、 + 表示をクリアして戻ります。 + + \o イテレータが \c contacts の先頭にある場合は、末尾に移動します。 + + \o イテレータを直前の項目に移動します。 + \endlist + + \snippet tutorials/addressbook/part3/addressbook.cpp previous() function + + もう一度、 \c contacts に現在のオブジェクトの内容を表示します。 +*/ + +/*! + \page tutorials-addressbook-part4.html + + \example tutorials/addressbook/part4 + \title 第4章 - アドレスの編集と削除 + + 本章では、アドレス帳アプリケーションに保存されている + 連絡先の内容を変更する方法について説明します。 + + \image addressbook-tutorial-screenshot.png + + ここでは、連絡先を整理して保存するだけでなく、 + ナビゲーションが可能なアドレス帳を作成します。 + 必要に応じて連絡先の詳細を変更できるよう、 + 編集・削除機能を追加すると便利です。 + ただし、列挙型書式の若干の改善が必要になります。 + 前章では、次の2つのモードを扱いました: + \c AddingMode 及び \c NavigationMode - + ただし、これらは列挙型として定義しませんでした。 + 代わりに、対応するボタンを手動で有効または無効にし、 + 複数行のコードを繰り返します。 + + 本章では、以下のような2つの異なる値を持つ \c Mode 列挙型を定義します: + + \list + \o \c{NavigationMode} + \o \c{AddingMode} + \o \c{EditingMode} + \endlist + + \section1 AddressBook クラスの宣言 + + \c addressbook.h ファイルをアップデートし、 \c Mode 列挙型を追加します: + + \snippet tutorials/addressbook/part4/addressbook.h Mode enum + + また、public slot として2つの新しいスロット + \c editContact() 及び \c removeContact() を追加します。 + + \snippet tutorials/addressbook/part4/addressbook.h edit and remove slots + + モードを切り替えるために、すべての QPushButton オブジェクトの + 有効化/無効化を制御する \c updateInterface() 関数を導入します。 + また、前述の編集と削除を行うスロット用に、2つの新しいボタン + \c editButton 及び \c removeButton を追加します。 + + \snippet tutorials/addressbook/part4/addressbook.h updateInterface() declaration + \dots + \snippet tutorials/addressbook/part4/addressbook.h buttons declaration + \dots + \snippet tutorials/addressbook/part4/addressbook.h mode declaration + + 最後に、現在のモードを保持する列挙型の \c currentMode を宣言します。 + + \section1 AddressBook クラスの実装 + + ここで、アドレス帳アプリケーションのモード変更機能を実装する必要があります。 + アドレス帳をはじめて起動するときは、 + メモリに連絡先が保存されていないため、 + コンストラクタでは、 \c editButton 及び \c removeButton + のインスタンスの生成と無効化を行います。 + + \snippet tutorials/addressbook/part4/addressbook.cpp edit and remove buttons + + また、ボタンをそれぞれのスロット \c editContact() 及び \c removeContact() + に接続し、 \c buttonLayout1 に追加します。 + + \snippet tutorials/addressbook/part4/addressbook.cpp connecting edit and remove + \dots + \snippet tutorials/addressbook/part4/addressbook.cpp adding edit and remove to the layout + + \c editContact() は、モードを \c EditingMode に切り替える前に、 + 連絡先の古い詳細情報を、 \c oldName と \c oldAddress に保存します。 + このモードでは、 \c submitButton と \c cancelButton + の両方が有効になるため、ユーザは連絡先の詳細を変更し、 + どちらか一方のボタンをクリックできます。 + + \snippet tutorials/addressbook/part4/addressbook.cpp editContact() function + + \c submitContact() 関数は、 \c{if-else} ステートメントにより、 + 2つの処理に分割しています。 + \c currentMode が \c AddingMode であるかどうかを確認します。 + その場合、連絡先追加の処理を行います。 + + \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function beginning + \dots + \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part1 + + \c AddingMode でない場合、 \c currentMode が \c EditingMode + であるかどうか確認します。 + その場合、 \c oldName を \c name と比較します。 + 名前を変更した場合、 \c contacts から古い連絡先を削除し、 + 新たに更新した連絡先を挿入します。 + + \snippet tutorials/addressbook/part4/addressbook.cpp submitContact() function part2 + + 住所のみを変更した場合 (たとえば、 \c oldAddress は \c address と異なる)、 + 連絡先の住所を更新します。 + 最後に、 \c currentMode を \c NavigationMode に設定します。 + これは、無効にしたプッシュボタンをすべて再び有効にするための重要なステップです。 + + アドレス帳から連絡先の削除を行う + \c removeContact() 関数を実装します。 + この関数では、まず連絡先が \c contacts に存在するかどうか確認します。 + + \snippet tutorials/addressbook/part4/addressbook.cpp removeContact() function + + 存在する場合、ユーザに削除を確認するために、QMessageBox を表示します。 + ユーザが確認したら、 \c previous() を呼び出して、 + ユーザインターフェースで他の連絡先を表示できることを確認し、 + QMap の \l{QMap::remove()}{remove()} 関数を使用して連絡先を削除します。 + 念のため、QMessageBox を表示してユーザに知らせます。 + この関数で使用するメッセージボックスを以下に示します: + + \image addressbook-tutorial-part4-remove.png + + \section2 ユーザインターフェースを更新する + + 既に、 \c updateInterface() 関数が + 現在のモードに応じてプッシュボタンの有効化と無効化を行うための + 手段であることを説明しました。 + この関数は、渡される \c mode 引数に応じて現在のモードを更新します。 + なお、引数の値を確認する前に \c currentMode に代入しています。 + + このとき、それぞれのプッシュボタンは、 + 現在のモードに応じて有効または無効になります。 + \c AddingMode 及び \c EditingMode でのコードを以下に示します: + + \snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 1 + + \c NavigationMode の場合、 QPushButton::setEnabled() + 関数のパラメータに条件を含めます。 + これは、アドレス帳に少なくとも1つ以上の連絡先が存在する場合に、 + \c editButton と \c removeButton が有効であることを確認するためのものです。 + \c nextButton と \c previousButton は、 + アドレス帳に少なくとも2つ以上の連絡先が存在する場合にのみ有効になります。 + + \snippet tutorials/addressbook/part4/addressbook.cpp update interface() part 2 + + モードの設定及び、同一関数内でのユーザインターフェースの更新を行うタスクを実行することにより、 + アプリケーションの内部状態により + ユーザインターフェースが「非同期」になる可能性を防ぎます。 +*/ + +/*! + \page tutorials-addressbook-part5.html + + \example tutorials/addressbook/part5 + \title 第5章 - 検索機能の追加 + + 本章では、アドレス帳アプリケーションの連絡先と住所を + 検索する方法について説明します。 + + \image addressbook-tutorial-part5-screenshot.png + + アドレス帳アプリケーションへ連絡先の追加を繰り返すと、 + \e Next 及び \e Previous ボタンによる連絡先のナビゲートが面倒になります。 + この場合、\e{検索(Find)}機能を使うと、 + 連絡先の検索をより効率的に行うことができます。 + 上記スクリーンショットは、\e Find ボタン及び、 + パネル上のボタンの位置を示します。 + + ユーザーが \e Find ボタンをクリックすると、 + 連絡先の名前の入力を求めるダイアログを表示します。 + Qt が提供する QDialog クラスを継承して \c FindDialog クラスを導入します。 + + \section1 FindDialog クラスの宣言 + + \image addressbook-tutorial-part5-finddialog.png + + QDialog を継承するには、最初に、QDialog のヘッダーを + \c finddialog.h ファイルで include する必要があります。 + また、これらのウィジェットをダイアログクラスで使用するため、 + 前方宣言を使用して QLineEdit と QPushButton を宣言します。 + + \c AddressBook クラスと同様に、 \c FindDialog クラスには Q_OBJECT + マクロが含まれ、ダイアログが別のウィンドウとして開かれる場合でも、 + コンストラクタは親 QWidget を取るように定義されます。 + + \snippet tutorials/addressbook/part5/finddialog.h FindDialog header + + \c FindDialog のインスタンスを保持するクラスにより使用される + パブリック関数 \c getFindText() を定義します。 + この関数を経由してユーザが入力した検索文字列を取得します。 + また、ユーザが \gui Find ボタンをクリックしたときに検索文字列を処理するために、 + public slot として \c findClicked() を定義します。 + + 最後に、\gui Find ボタンに対応するプライベート変数として \c findButton 、 + ユーザが検索文字列を入力するラインエディット \c lineEdit 及び、 + 後の作業で使用する検索文字列を保存するために使用する内部文字列として + \c findText の定義を行います。 + + \section1 FindDialog クラスの実装 + + \c FindDialog のコンストラクタ内で、プライベート変数の + \c lineEdit 、 \c findButton 及び \c findText を設定します。 + QHBoxLayout を用いてウィジェットを配置します。 + + \snippet tutorials/addressbook/part5/finddialog.cpp constructor + + シグナルをそれぞれのスロットに接続し、 + レイアウトとウィンドウのタイトルを設定します。 + \c findButton の \l{QPushButton::clicked()} シグナルは、 + \c findClicked() と \l{QDialog::accept()}{accept()} + に接続されていることがわかります。 + QDialog により提供される \l{QDialog::accept()}{accept()} スロットは + ダイアログを非表示にして、結果コードを \l{QDialog::}{Accepted} + に設定します。 + この関数を使用して、 \c AddressBook の \c findContact() 関数に、 + \c FindDialog オブジェクトが閉じていることを知らせます。 + この論理については、 \c findContact() 関数について取り上げる際に、 + さらに詳細に説明します。 + + \image addressbook-tutorial-part5-signals-and-slots.png + + \c findClicked() で、ユーザが連絡先の名前を入力せずに + \gui Find ボタンをクリックしたかどうか確認するために + \c lineEdit を検証します。 + 次に、 \c lineEdit から抽出した検索文字列を \c findText に設定します。 + その後、 \c lineEdit のコンテンツをクリアし、ダイアログを非表示にします。 + + \snippet tutorials/addressbook/part5/finddialog.cpp findClicked() function + + \c findText 変数用のパブリックな取得関数 + \c getFindText() を実装します。 + コンストラクタ及び \c findClicked() 関数でのみ + \c findText を直接設定するため、 + \c getFindText() に対応する設定関数は作成しません。 + \c getFindText() はパブリックであるため、インスタンスを生成し + \c FindDialog を使用するクラスは、 + ユーザが入力して確定した検索文字列にいつでもアクセスできます。 + + \snippet tutorials/addressbook/part5/finddialog.cpp getFindText() function + + \section1 AddressBook クラスの宣言 + + \c AddressBook クラス内部から \c FindDialog を使用できるよう、 + \c addressbook.h ファイルに \c finddialog.h を含めます。 + + \snippet tutorials/addressbook/part5/addressbook.h include finddialog's header + + これまでのところ、アドレス帳の全機能に、 + QPushButton とそのボタンに対応するスロットが含まれています。 + 同様に、\gui{検索(Find)}機能には、 + \c findButton 及び \c findContact() が含まれています。 + + \c findButton はプライベート変数として宣言され、 + \c findContact() 関数は public slot として宣言されます。 + + \snippet tutorials/addressbook/part5/addressbook.h findContact() declaration + \dots + \snippet tutorials/addressbook/part5/addressbook.h findButton declaration + + 最後に、 \c FindDialog のインスタンスを参照するためのプライベート変数 + \c dialog を宣言します。 + + \snippet tutorials/addressbook/part5/addressbook.h FindDialog declaration + + インスタンス化されたダイアログは複数回使用します。 + プライベート変数を使用すると、 + クラスの複数の場所から参照できるようになります。 + + \section1 AddressBook クラスの実装 + + \c AddressBook クラスのコンストラクタ内で、 + プライベートオブジェクトの \c findButton と \c findDialog + のインスタンスを生成します: + + \snippet tutorials/addressbook/part5/addressbook.cpp instantiating findButton + \dots + \snippet tutorials/addressbook/part5/addressbook.cpp instantiating FindDialog + + 次に、 \c findButton の \l{QPushButton::clicked()}{clicked()} シグナルを、 + \c findContact() に接続します。 + + \snippet tutorials/addressbook/part5/addressbook.cpp signals and slots for find + + 後は、 \c findContact() 関数のコードだけです: + + \snippet tutorials/addressbook/part5/addressbook.cpp findContact() function + + \c FindDialog インスタンスの \c dialog を表示することから始めます。 + これは、ユーザが検索用に連絡先の名前を入力するためのものです。 + ユーザがダイアログの \c findButton をクリックすると + ダイアログが非表示になり、結果コードが QDialog::Accepted に設定されます。 + これにより、 \c if ステートメントが常に真になります。 + + 続けて、検索文字列の抽出を行います。 + この場合、検索文字列は \c contactName で、 + \c FindDialog の \c getFindText() 関数を使用して取得します。 + アドレス帳に連絡先が存在する場合、直ちに表示します。 + 存在しない場合、検索が失敗したことを示す以下の QMessageBox が表示されます。 + + \image addressbook-tutorial-part5-notfound.png +*/ + +/*! + \page tutorials-addressbook-part6.html + + \example tutorials/addressbook/part6 + \title 第6章 - 読み込みと保存 + + 本章では、アドレス帳アプリケーションの読み込みと保存処理で使用する、 + Qt のファイル処理機能について説明します。 + + \image addressbook-tutorial-part6-screenshot.png + + 連絡先の参照及び検索機能は便利な機能ですが、 + 連絡先の保存と読み込みが可能になるまではアドレス帳は完成しません。 + + Qt は \l{Input/Output and Networking}{入出力} + 用のクラスを様々提供していますが、 + 今回は簡単に組み合わせて使用できる QFile と QDataStream の2つのクラスを選択しました。 + + QFile のオブジェクトは、 + 読み込みと書き込みが可能なディスク上のファイルを表します。 + QFile は、さまざまなデバイスを表すより一般的な QIODevice クラスの派生クラスです。 + + QDataStream オブジェクトは、バイナリデータを QIODevice に保存して、 + 後でもう一度取得できるようシリアライズするために使用します。 + パラメータとしてそれぞれのデバイスを使用すると、 + ストリームを開くのと同じくらい簡単に、 QIODevice + からの読み込みと書き込みを行うことができます。 + + \section1 AddressBook クラスの宣言 + + 2つの QPushButton オブジェクトの \c loadButton と \c saveButton + に加えて、2つの public slot の \c saveToFile() と \c loadFromFile() + を宣言します。 + + \snippet tutorials/addressbook/part6/addressbook.h save and load functions declaration + \dots + \snippet tutorials/addressbook/part6/addressbook.h save and load buttons declaration + + \section1 AddressBook クラスの実装 + + コンストラクタで、 \c loadButton と \c saveButton のインスタンスを生成します。 + 理想的には、プッシュボタンのラベルを、 + "Load contacts from a file"(「ファイルから連絡先を読み込む」)及び、 + "Save contacts to a file"(「連絡先をファイルに保存する」) + に設定するほうがよりユーザーフレンドリーです。 + ただし、他のプッシュボタンのサイズを考慮して、 + \gui{Load...}及び\gui{Save...}に設定します。 + Qt は、 \l{QWidget::setToolTip()}{setToolTip()} を使用して + ツールチップを簡単に設定する方法を提供していますので、 + 以下のコードでプッシュボタンにツールチップを設定します: + + \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 1 + \dots + \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 2 + + ここには記載していませんが、 + これまで実装した他の機能のように右側のレイアウトパネル + \c button1Layout にプッシュボタンを追加し、 + プッシュボタンの \l{QPushButton::clicked()}{clicked()} + シグナルをそれぞれのスロットに接続します。 + + 保存機能の場合、最初に QFileDialog::getSaveFileName() を使用して、 + \c fileName を取得します。 + これは、QFileDialog により提供される簡易関数で、 + モーダルなファイルダイアログをポップアップ表示させ、 + ユーザはファイル名を入力したり、既存の \c{.abk} ファイルを選択することが出来ます。 + \c{.abk} ファイルは、 + 連絡先を保存したときに作成されるアドレス帳の拡張子です。 + + \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part1 + + 以下のスクリーンショットのようなネイティブのファイルダイアログが表示されます: + + \image addressbook-tutorial-part6-save.png + + \c fileName が空ではない場合、 \c fileName を用いて + QFile のオブジェクト \c file を作成します。 + QFile は QIODevice の派生クラスであるため、 + QDataStream から使用できます。 + + 次に、ファイルを \l{QIODevice::}{WriteOnly} モードでオープンします。 + オープンに失敗した場合、 QMessageBox を表示してユーザに知らせます。 + + \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part2 + + オープンに成功した場合、 QDataStream のインスタンス \c out を生成して、 + 開いているファイルに書き込みます。 + QDataStream では、同じバージョンのストリームを使用して、 + 読み込みと書き込みを行う必要があります。 + \c file にシリアライズする前に、 + \l{QDataStream::Qt_4_5}{Qt 4.5で導入されたバージョン} + を今回使用するバージョンとして設定します。 + + \snippet tutorials/addressbook/part6/addressbook.cpp saveToFile() function part3 + + 読み込み機能の場合も QFileDialog::getOpenFileName() を使用して + \c fileName を取得します。 + この関数は QFileDialog::getSaveFileName() に対応するものであり、 + モーダルなファイルダイアログをポップアップ表示させ、 + ユーザはファイル名を入力したり、既存の \c{.abk} + ファイルを選択してアドレス帳に読み込ことができます。 + + \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part1 + + たとえば、 Windows では、この関数は、以下のスクリーンショットのような + ネイティブのファイルダイアログをポップアップ表示させます。 + + \image addressbook-tutorial-part6-load.png + + \c fileName が空ではない場合、 QFile のオブジェクト + \c file を使用して、 \l{QIODevice::}{ReadOnly} モードでオープンします。 + \c saveToFile() の実装の場合と同様に、オープンに失敗した場合は + QMessageBox を表示して、ユーザに知らせます。 + + \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part2 + + オープンに成功した場合、 + QDataStream のインスタンス \c in を生成して前記のようにバージョン設定を行い、 + シリアライズしたデータを \c contacts のデータ構造に読み込みます。 + \c contacts オブジェクトはデータが読み込まれる前に空にするので、 + ファイルの読み込みプロセスは簡素化されます。 + より高度な方法では、一時オブジェクトの QMap に読み込んで、 + 重複していない連絡先を \c contacts にコピーします。 + + \snippet tutorials/addressbook/part6/addressbook.cpp loadFromFile() function part3 + + ファイルから読み込んだ連絡先を表示するには、 + 最初に取得したデータを検証し、 + 読み込んだファイルにアドレス帳の連絡先が実際に含まれているか確認します。 + 含まれている場合、最初の連絡先を表示します。 + 含まれていない場合、QMessageBox を表示して、 + 問題があることをユーザに知らせます。 + 最後にインターフェースを更新し、適宜 + プッシュボタンの有効化と無効化を行います。 +*/ + +/*! + \page tutorials-addressbook-part7.html + + \example tutorials/addressbook/part7 + \title 第7章 - 追加機能 + + 本章では、アドレス帳アプリケーションを + 普段の生活で便利に使用するための追加機能について説明します。 + + \image addressbook-tutorial-part7-screenshot.png + + アドレス帳アプリケーションは、それ自体で便利ですが、 + 他のアプリケーションとデータの交換ができればなお便利です。 + vCard 形式は、この目的で使用可能な一般的なファイル形式です。 + 本章では、連絡先を vCard ファイル(\c{.vcf}) + にエクスポートできるよう、アドレス帳クライアントを拡張します。 + + \section1 AddressBook クラスの宣言 + + QPushButton のオブジェクト \c exportButton 及び、 + 対応する public slot の \c exportAsVCard() を + \c addressbook.h ファイルの \c AddressBook クラスに追加します。 + + \snippet tutorials/addressbook/part7/addressbook.h exportAsVCard() declaration + \dots + \snippet tutorials/addressbook/part7/addressbook.h exportButton declaration + + \section1 AddressBook クラスの実装 + + \c AddressBook のコンストラクタで、 \c exportButton の + \l{QPushButton::clicked()}{clicked()} シグナルを + \c exportAsVCard() に接続します。 + このボタンも、右側のボタンのパネルの処理を行うレイアウトである + \c buttonLayout1 に追加します。 + + \c exportAsVCard() 関数では、 + 連絡先の名前を \c name に抽出することから始めます。 + \c firstName 、 \c lastName 及び \c nameList を宣言します。 + 次に \c name を検索し、最初の空白のインデックスを取得します。 + 空白が存在する場合、連絡先の名前を \c firstName と + \c lastName に分割します。 + 次に、空白をアンダースコア ("_") に置き換えます。 + 空白が存在しない場合は、連絡先にファーストネーム(名) + しか保存されていない可能性があります。 + + \snippet tutorials/addressbook/part7/addressbook.cpp export function part1 + + \c saveToFile() 関数と同様に、ユーザがファイルの場所を選択できるよう + ファイルダイアログを開きます。 + 選択したファイル名を使用して、 + 書き込みを行うための QFile のインスタンスを生成します。 + + ファイルを \l{QIODevice::}{WriteOnly} モードでオープンします。 + オープンに失敗した場合、 QMessageBox を表示して、 + 問題があることをユーザに知らせて戻ります。 + オープンに成功した場合、 QTextStream のオブジェクト \c out へ + パラメータファイルを渡します。 + QDataStream のように、QTextStream クラスは、 + プレーンテキストファイルの読み込みと書き込みを行う機能を提供します。 + 結果として、生成された \c{.vcf} は + テキストエディターで開いて編集することができます。 + + \snippet tutorials/addressbook/part7/addressbook.cpp export function part2 + + まず \c{BEGIN:VCARD} タグ、次に \c{VERSION:2.1} タグの順に + vCard ファイルに書き込みます。 + 連絡先の名前は、 \c{N:} タグを使用して書き込みます。 + vCard の "File as" プロパティを設定する \c{FN:} タグを書き込む際は、 + 連絡先にラストネーム(姓)が含まれているかどうかを確認する必要があります。 + 含まれている場合、 \c nameList の情報を使用して入力します。 + 含まれていない場合、 \c firstName のみを書き込みます。 + + \snippet tutorials/addressbook/part7/addressbook.cpp export function part3 + + 続けて連絡先の住所の書き込みを行います。 + 住所のセミコロンには、"\\" をエスケープ文字として追加する必要があります。 + 改行はセミコロンに置き換えられ、コンマはスペースに置き換えられます。 + 次に、 \c{ADR;HOME:;} タグ、 \c address 、 + \c{END:VCARD} タグの順に書き込みます。 + + \snippet tutorials/addressbook/part7/addressbook.cpp export function part4 + + 最後に、vCard のエクスポートに成功したことをユーザに知らせるために、 + QMessageBox が表示されます。 + + \e{vCard は、\l{http://www.imc.org}{Internet Mail Consortium} の登録商標です。} +*/ diff --git a/doc/src/ja_JP/tutorials/widgets-tutorial.qdoc b/doc/src/ja_JP/tutorials/widgets-tutorial.qdoc new file mode 100644 index 0000000..6a6b1a2 --- /dev/null +++ b/doc/src/ja_JP/tutorials/widgets-tutorial.qdoc @@ -0,0 +1,257 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \page widgets-tutorial.html + \title ウィジェットのチュートリアル + \brief 本チュートリアルではウィジェットとレイアウトの基本的な使い方を説明し、それらが GUI アプリケーションの開発でどのように使われるかを説明します。 + + \section1 はじめに + + ウィジェットは Qt によるグラフィカルユーザインターフェース(GUI)アプリケーションの基本構成要素です。 + ボタン、ラベル、テキストエディターなどの各 GUI コンポーネントはウィジェットであり、 + 既存のウィンドウのユーザーインタフェース内に配置したり、独立したウィンドウとして表示することができます。 + それぞれのコンポーネントは QWidget の派生クラスとして実装されます。 + QWidget 自体は QObject の派生クラスです。 + + QWidget は抽象クラスではなく、 + 他のウィジェット用のコンテナとして使用されたり、 + カスタムウィジェットを作る場合の基底クラスとして使用されます。 + 他のウィジェットを配置するウィンドウとしてもよく使われます。 + + \l{QObject} と同様に QWidget は所有権を示すために親オブジェクトを指定して生成できるため、 + 親オブジェクトが使用されなくなった場合には破棄されます。 + ウィジェットではこの親子関係が他の意味も持ちます。 + 子ウィジェットは親ウィジェットが使用する領域内に表示されます。 + これは、ウィンドウを削除するとそのウィンドウに含まれる全てのウィジェットが自動的に破棄されることを意味します。 + + \section1 main 関数の記述 + + Qt の GUI サンプルの多くは標準的なアプリケーションの初期化コードを含む + \c{main.cpp} ファイルと、アプリケーションのロジックやカスタム + GUI コンポーネントを含むいくつかのソース/ヘッダファイルから構成されています。 + + \c{main.cpp} 内の典型的な \c main() 関数は以下のようになります: + + \snippet doc/src/snippets/widgets-tutorial/template.cpp main.cpp body + + 最初に、コマンドラインから渡される引数を渡して QApplication のオブジェクトを生成します。 + ウィジェットを生成して表示した後、 QApplication::exec() を呼び出して Qt のイベントループを開始します。 + この関数から戻ってくるまでアプリケーションの制御は Qt 側にて行われます。最後に、\c{main()} は QApplication::exec() から取得された値を返します。 + + \section1 簡単なウィジェットのサンプル + + 以下の簡単なウィジェットのサンプルでは \c main() 関数の中にコードを記述しています。 + + \list + \o \l {tutorials/widgets/toplevel}{ウィンドウの作成} + + \o \l {tutorials/widgets/childwidget}{子ウィジェット} + + \o \l {tutorials/widgets/windowlayout}{レイアウトの利用} + + \o \l {tutorials/widgets/nestedlayouts}{複雑なレイアウト} + \endlist + + \section1 複雑なウィジェットのサンプル + + \l{Widgets examples}{より高度なサンプル} の場合、ウィジェットやレイアウトのためのコードは他のファイルに記述されています。 + 例えば、メインウインドウ用の GUI は、 QMainWindow 派生クラスのコンストラクタで作成されるでしょう。 + + \section1 サンプルのビルド + + Qt のバイナリパッケージを取得してインストールするか、Qt を自分でコンパイルした場合には既にこのチュートリアルで説明されているサンプルはビルドされ、実行する準備ができています。 + これらを変更し再コンパイルをしたい場合は、次の手順に従う必要があります: + + \list 1 + \o コマンドラインで、再コンパイルしたいサンプルを含むディレクトリに移動します。 + \o \c qmake と入力し、\key{Return} キーを押します。 + うまくいかない場合は、現在のパス内にこの実行ファイルが存在することを確認するか、 + フルパスを指定して実行してください。 + \o Linux/Unix および Mac OS X の場合、\c make と入力し、\key{Return} キーを押します。 + Windows 上の Visual Studio の場合、\c nmake と入力し、\key{Return} キーを押します。 + \endlist + + 現在のディレクトリに実行ファイルが生成されます。 + Windows では、このファイルは \c debug または \c release + ディレクトリに配置されているかもしれません。 + このファイルを実行すると、作業中のサンプルコードの動作を確認できます。 +*/ + +/*! + \example tutorials/widgets/toplevel + \title ウィジェットのチュートリアル - ウィンドウの作成 + + 親を持たないウィジェットを作成した場合、そのウィジェットは表示時にウィンドウ(\e{トップレベルウィジェット})として扱われます。 + このウィジェットが必要なくなった場合にそれを破棄してくれる親ウィジェットがないため、トップレベルウィジェットの管理は開発者が行ってください。 + + 以下のサンプルでは QWidget を使用してウィンドウを作成し、サイズを指定して表示します: + + \raw HTML + + +
+ \endraw + \snippet tutorials/widgets/toplevel/main.cpp main program + \raw HTML + + \endraw + \inlineimage widgets-tutorial-toplevel.png + \raw HTML +
+ \endraw + + 実際の GUI を作成するには、ウィンドウ内にウィジェットを配置する必要があります。 + これは、ウィジェットのコンストラクタに QWidget のインスタンスを渡すことで実現します。 + 詳細は本チュートリアルの次の章で示します。 +*/ + +/*! + \example tutorials/widgets/childwidget + \title ウィジェットのチュートリアル - 子ウィジェット + + 前のサンプルで作成したウィンドウに子ウィジェットを追加するために、 + 親として \c window を子ウィジェットのコンストラクタに渡します。 + ここでは、ウィンドウにボタンを追加し特定の場所に配置します: + + \raw HTML + + +
+ \endraw + \snippet tutorials/widgets/childwidget/main.cpp main program + \raw HTML + + \endraw + \inlineimage widgets-tutorial-childwidget.png + \raw HTML +
+ \endraw + + このボタンはウィンドウの子になり、 + ウィンドウが破棄された場合にはボタンも破棄されるでしょう。 + ウィンドウを非表示化したり閉じた際には、自動的に破棄はされません。 + サンプルが終了する場合には破棄されるでしょう。 +*/ + +/*! + \example tutorials/widgets/windowlayout + \title ウィジェットのチュートリアル - レイアウトの利用 + + 一般的に子ウィジェットは、位置とサイズを明確に指定するのではなく、 + レイアウトオブジェクトを使用してウィンドウ内に配置します。 + ここでは、ラベルとラインエディットを生成し、横に並べて配置します。 + + \raw HTML + + +
+ \endraw + \snippet tutorials/widgets/windowlayout/main.cpp main program + \raw HTML + + \endraw + \inlineimage widgets-tutorial-windowlayout.png + \raw HTML +
+ \endraw + + 生成する \c layout オブジェクトは、 \l{QHBoxLayout::}{addWidget()} 関数を使って設定されたウィジェットの位置とサイズを管理します。 + また、\l{QWidget::}{setLayout()} を使用してレイアウトをウィンドウに設定します。 + レイアウトはそれ自体は目には見えない存在です。 + レイアウトの管理対象となっているウィジェット(や他のレイアウト)に対しての効果としてのみ、その存在を確認できます。 + + 上記サンプルにおいて、各ウィジェットの所有権はあまり明確ではありません。 + 親オブジェクトのない3つのウィジェットと1つのレイアウトを作成するため、 + 空のウィンドウと、ラベルとラインエディットをそれぞれ含む別々のウィンドウが表示されるように見えるかもしれません。 + しかし、レイアウトにラベルとラインエディットを管理するように指定すると、 + ウィンドウにそのレイアウトを設定した際に「親の再指定」が行われるため、 + ウィジェットおよびレイアウト自体がそのウィンドウの子になります。 +*/ + +/*! + \example tutorials/widgets/nestedlayouts + \title ウィジェットのチュートリアル - 複雑なレイアウト + + ウィジェットの中に他のウィジェットを含めることができるように、 + レイアウトは異なるレベルでのウィジェットのグループ化にも使用されます。 + ここではウィンドウ上部にラベルとラインエディットを隣り合わせに配置し、 + その下に検索結果が表示されるテーブルビューを表示します。 + + これは、レイアウトを2つ作成して行います。\c{queryLayout} は、QLabel と QLineEdit を左右に並べて表示する QHBoxLayout です。 + \c{mainLayout} は、\c{queryLayout} と QTableView を上下に並べて表示する QVBoxLayout です。 + + \raw HTML + + +
+ \endraw + \snippet tutorials/widgets/nestedlayouts/main.cpp first part + \snippet tutorials/widgets/nestedlayouts/main.cpp last part + \raw HTML + + \endraw + \inlineimage widgets-tutorial-nestedlayouts.png + \raw HTML +
+ \endraw + + \c{mainLayout} の \l{QBoxLayout::}{addLayout()} 関数にて追加された + \c{queryLayout} と \c{resultView} は追加された順番で上から並べられます。 + + ここでは QTableView ウィジェット \c resultView に表示されるデータを含むモデルの設定のコードは省略していますが、 + 後ほど示します。 + + QHBoxLayout や QVBoxLayout と共に Qt から提供される QGridLayout および QFormLayout を使用することにより、 + より複雑なユーザインターフェースの構築が可能になります。 + これらのレイアウトの効果は、\l{Qt Designer} を実行して確認できます。 + + \section1 モデルを設定する + + 上記のコードでは、レイアウトの有効利用に重点を置いていたため、 + テーブルのデータについては示していませんでした。 + 以下のコードで、モデルには行に対応する項目が含まれ、それぞれの行には2つの列のデータが設定されていることがわかるでしょう。 + + \snippet tutorials/widgets/nestedlayouts/main.cpp set up the model + + モデルとビューの有効利用については、\l{Item Views Examples} および + \l{Model/View Programming} の概要に含まれています。 +*/ diff --git a/examples/ja_JP/linguist/hellotr/hellotr.pro b/examples/ja_JP/linguist/hellotr/hellotr.pro new file mode 100644 index 0000000..3846bfb --- /dev/null +++ b/examples/ja_JP/linguist/hellotr/hellotr.pro @@ -0,0 +1,13 @@ +#! [0] +SOURCES = main.cpp +#! [0] #! [1] +TRANSLATIONS = hellotr_ja.ts +#! [1] + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/linguist/hellotr +sources.files = $$SOURCES *.pro +sources.path = $$[QT_INSTALL_EXAMPLES]/linguist/hellotr +INSTALLS += target sources + +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/ja_JP/linguist/hellotr/main.cpp b/examples/ja_JP/linguist/hellotr/main.cpp new file mode 100644 index 0000000..ad122e9 --- /dev/null +++ b/examples/ja_JP/linguist/hellotr/main.cpp @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +//! [0] +#include +//! [0] + +//! [1] //! [2] +int main(int argc, char *argv[]) +//! [1] //! [3] //! [4] +{ + QApplication app(argc, argv); +//! [3] + +//! [5] + QTranslator translator; +//! [5] //! [6] + translator.load("hellotr_ja"); +//! [6] //! [7] + app.installTranslator(&translator); +//! [4] //! [7] + +//! [8] + QPushButton hello(QPushButton::tr("Hello world!")); +//! [8] + hello.resize(100, 30); + + hello.show(); + return app.exec(); +} +//! [2] diff --git a/tools/qdoc3/test/qt-api-only_ja_JP.qdocconf b/tools/qdoc3/test/qt-api-only_ja_JP.qdocconf new file mode 100644 index 0000000..aa3ab01 --- /dev/null +++ b/tools/qdoc3/test/qt-api-only_ja_JP.qdocconf @@ -0,0 +1,30 @@ +include(qt-build-docs_ja_JP.qdocconf) + +# Ensures that the generated index contains a URL that can be used by the +# tools documentation (assistant.qdocconf, designer.qdocconf, linguist.qdocconf, +# qmake.qdocconf). + +url = ./ + +# Ensures that the documentation for the tools is not included in the generated +# .qhp file. + +qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/simpletextviewer.qdoc \ + $QT_SOURCE_TREE/doc/src/development/designer-manual.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/calculatorbuilder.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/calculatorform.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/customwidgetplugin.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/taskmenuextension.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/containerextension.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/worldtimeclockbuilder.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/worldtimeclockplugin.qdoc \ + $QT_SOURCE_TREE/doc/src/internationalization/linguist-manual.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/hellotr.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/arrowpad.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \ + $QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc + +outputdir = $QT_BUILD_TREE/doc-build/html-qt_ja_JP +tagfile = $QT_BUILD_TREE/doc-build/html-qt_ja_JP/qt.tags +base = file:$QT_BUILD_TREE/doc-build/html-qt_ja_JP diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index 00704ea..216ac6a 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -115,6 +115,7 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \ $QT_SOURCE_TREE/src/3rdparty/phonon/mmf \ $QT_SOURCE_TREE/src/3rdparty/phonon/waveout \ $QT_SOURCE_TREE/doc/src/snippets \ + $QT_SOURCE_TREE/doc/src/ja_JP \ $QT_SOURCE_TREE/doc/src/zh_CN sources.fileextensions = "*.cpp *.qdoc *.mm" diff --git a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf new file mode 100644 index 0000000..e517b33 --- /dev/null +++ b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf @@ -0,0 +1,110 @@ +include(compat.qdocconf) +include(macros.qdocconf) +include(qt-cpp-ignore.qdocconf) +include(qt-html-templates_ja_JP.qdocconf) +include(qt-defines.qdocconf) + +project = Qt +description = Qt リファレンスドキュメント +url = http://qt.nokia.com/doc/ja_JP/4.7 + +sourceencoding = UTF-8 +outputencoding = UTF-8 +naturallanguage = ja + +indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index + +qhp.projects = Qt + +qhp.Qt.file = qt.qhp +qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.virtualFolder = qdoc +qhp.Qt.title = Qt +qhp.Qt.indexTitle = Qt +qhp.Qt.selectors = fake:example + +qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc ja_JP +qhp.Qt.customFilters.Qt.name = Qt 4.7.0 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 + +# Files not referenced in any qdoc file (last four are needed by qtdemo) +# See also extraimages.HTML +qhp.Qt.extraFiles = index.html \ + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/arrow-down.png \ + images/spinner.gif \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/OfflineStyle.css \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style.css + +language = Cpp + +sourcedirs = $QT_SOURCE_TREE/doc/src/ja_JP + +excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \ + $QT_SOURCE_TREE/src/3rdparty/des \ + $QT_SOURCE_TREE/src/3rdparty/freetype \ + $QT_SOURCE_TREE/src/3rdparty/harfbuzz \ + $QT_SOURCE_TREE/src/3rdparty/kdebase \ + $QT_SOURCE_TREE/src/3rdparty/libjpeg \ + $QT_SOURCE_TREE/src/3rdparty/libmng \ + $QT_SOURCE_TREE/src/3rdparty/libpng \ + $QT_SOURCE_TREE/src/3rdparty/libtiff \ + $QT_SOURCE_TREE/src/3rdparty/md4 \ + $QT_SOURCE_TREE/src/3rdparty/md5 \ + $QT_SOURCE_TREE/src/3rdparty/patches \ + $QT_SOURCE_TREE/src/3rdparty/sha1 \ + $QT_SOURCE_TREE/src/3rdparty/sqlite \ + $QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore \ + $QT_SOURCE_TREE/src/3rdparty/webkit/WebCore \ + $QT_SOURCE_TREE/src/3rdparty/wintab \ + $QT_SOURCE_TREE/src/3rdparty/zlib \ + $QT_SOURCE_TREE/doc/src/snippets \ + $QT_SOURCE_TREE/doc/src/zh_CN \ + $QT_SOURCE_TREE/src/3rdparty/phonon/gstreamer \ + $QT_SOURCE_TREE/src/3rdparty/phonon/ds9 \ + $QT_SOURCE_TREE/src/3rdparty/phonon/qt7 \ + $QT_SOURCE_TREE/src/3rdparty/phonon/mmf \ + $QT_SOURCE_TREE/src/3rdparty/phonon/waveout + +sources.fileextensions = "*.cpp *.qdoc *.mm" +examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp" +examples.imageextensions = "*.png" + +exampledirs = $QT_SOURCE_TREE/doc/src \ + $QT_SOURCE_TREE/examples/ja_JP \ + $QT_SOURCE_TREE/examples \ + $QT_SOURCE_TREE/examples/tutorials \ + $QT_SOURCE_TREE \ + $QT_SOURCE_TREE/qmake/examples \ + $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs +imagedirs = $QT_SOURCE_TREE/doc/src/ja_JP/images \ + $QT_SOURCE_TREE/doc/src/images \ + $QT_SOURCE_TREE/examples \ + $QT_SOURCE_TREE/doc/src/template/images +outputdir = $QT_BUILD_TREE/doc/html_ja_JP +tagfile = $QT_BUILD_TREE/doc/html_ja_JP/qt.tags +base = file:$QT_BUILD_TREE/doc/html_ja_JP + +HTML.generatemacrefs = "true" diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index 712e23f..c324926 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -80,6 +80,7 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \ $QT_SOURCE_TREE/src/3rdparty/wintab \ $QT_SOURCE_TREE/src/3rdparty/zlib \ $QT_SOURCE_TREE/doc/src/snippets \ + $QT_SOURCE_TREE/doc/src/ja_JP \ $QT_SOURCE_TREE/src/3rdparty/phonon/gstreamer \ $QT_SOURCE_TREE/src/3rdparty/phonon/ds9 \ $QT_SOURCE_TREE/src/3rdparty/phonon/qt7 \ diff --git a/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf b/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf new file mode 100644 index 0000000..027548e --- /dev/null +++ b/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf @@ -0,0 +1,178 @@ +HTML.stylesheets = style/style.css \ + style/OfflineStyle.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style_ie6.css + +HTML.postheader = "
\n" \ + "
\n" \ + "
\n" \ + " Home
\n" \ + " Qt Reference Documentation\n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + " Search index:
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "

\n" \ + " API Lookup

\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "

\n" \ + " Qt Topics

\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "

\n" \ + " Examples

\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
    \n" \ + "
  • Home
  • \n" \ + " \n" + +HTML.postpostheader = "
\n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" + +HTML.footer = " \n" \ + "
\n" \ + " [+] Documentation Feedback
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + " \n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "

\n" \ + " © 2008-2010 Nokia Corporation and/or its\n" \ + " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ + " in Finland and/or other countries worldwide.

\n" \ + "

\n" \ + " All other trademarks are property of their respective owners. Privacy Policy

\n" \ + "
\n" \ + "
\n" \ + "
X
\n" \ + "
\n" \ + "

\n" \ + "

\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "
\n" \ + "\n" diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index edf6d92..d132771 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -130,6 +130,7 @@ excludedirs = $QTDIR/src/3rdparty/clucene \ $QTDIR/src/3rdparty/phonon/mmf \ $QTDIR/src/3rdparty/phonon/waveout \ $QTDIR/doc/src/snippets \ + $QTDIR/doc/src/ja_JP \ $QTDIR/doc/src/zh_CN sources.fileextensions = "*.cpp *.qdoc *.mm" diff --git a/tools/qdoc3/test/qt_ja_JP.qdocconf b/tools/qdoc3/test/qt_ja_JP.qdocconf new file mode 100644 index 0000000..d4141c7 --- /dev/null +++ b/tools/qdoc3/test/qt_ja_JP.qdocconf @@ -0,0 +1,125 @@ +include(compat.qdocconf) +include(macros.qdocconf) +include(qt-cpp-ignore.qdocconf) +include(qt-html-templates_ja_JP.qdocconf) +include(qt-defines.qdocconf) + +project = Qt +versionsym = +version = %VERSION% +description = Qt リファレンスドキュメント +url = http://qt.nokia.com/doc/ja_JP/4.7 + +sourceencoding = UTF-8 +outputencoding = UTF-8 +naturallanguage = ja + +indexes = $QTDIR/doc/html/qt.index + +qhp.projects = Qt + +qhp.Qt.file = qt.qhp +qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.virtualFolder = qdoc +qhp.Qt.title = Qt +qhp.Qt.indexTitle = Qt +qhp.Qt.selectors = fake:example + +qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc ja_JP +qhp.Qt.customFilters.Qt.name = Qt 4.7.0 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 + +# Files not referenced in any qdoc file (last four are needed by qtdemo) +# See also extraimages.HTML +qhp.Qt.extraFiles = index.html \ + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/arrow_down.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/spinner.gif \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + scripts/shBrushCpp.js \ + scripts/shCore.js \ + scripts/shLegacy.js \ + scripts/narrow.js \ + scripts/superfish.js \ + style/shCore.css \ + style/shThemeDefault.css \ + style/narrow.css \ + style/superfish.css \ + style/superfish_skin.css \ + style/OfflineStyle.css \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style.css + +language = Cpp + +sourcedirs = $QTDIR/doc/src/ja_JP + +excludedirs = $QTDIR/src/3rdparty/clucene \ + $QTDIR/src/3rdparty/des \ + $QTDIR/src/3rdparty/freetype \ + $QTDIR/src/3rdparty/harfbuzz \ + $QTDIR/src/3rdparty/kdebase \ + $QTDIR/src/3rdparty/libjpeg \ + $QTDIR/src/3rdparty/libmng \ + $QTDIR/src/3rdparty/libpng \ + $QTDIR/src/3rdparty/libtiff \ + $QTDIR/src/3rdparty/md4 \ + $QTDIR/src/3rdparty/md5 \ + $QTDIR/src/3rdparty/patches \ + $QTDIR/src/3rdparty/sha1 \ + $QTDIR/src/3rdparty/sqlite \ + $QTDIR/src/3rdparty/webkit/JavaScriptCore \ + $QTDIR/src/3rdparty/webkit/WebCore \ + $QTDIR/src/3rdparty/wintab \ + $QTDIR/src/3rdparty/zlib \ + $QTDIR/doc/src/snippets \ + $QTDIR/doc/src/zh_CN \ + $QTDIR/src/3rdparty/phonon/gstreamer \ + $QTDIR/src/3rdparty/phonon/ds9 \ + $QTDIR/src/3rdparty/phonon/qt7 \ + $QTDIR/src/3rdparty/phonon/mmf \ + $QTDIR/src/3rdparty/phonon/waveout + +sources.fileextensions = "*.cpp *.qdoc *.mm" +examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp" +examples.imageextensions = "*.png" + +exampledirs = $QTDIR/doc/src \ + $QTDIR/examples/ja_JP \ + $QTDIR/examples \ + $QTDIR/examples/tutorials \ + $QTDIR \ + $QTDIR/qmake/examples \ + $QTDIR/src/3rdparty/webkit/WebKit/qt/docs +imagedirs = $QTDIR/doc/src/ja_JP/images \ + $QTDIR/doc/src/images \ + $QTDIR/examples \ + $QTDIR/doc/src/template/images +outputdir = $QTDIR/doc/html_ja_JP +tagfile = $QTDIR/doc/html_ja_JP/qt.tags +base = file:$QTDIR/doc/html_ja_JP + +HTML.generatemacrefs = "true" diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf index db02478..e894607 100644 --- a/tools/qdoc3/test/qt_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt_zh_CN.qdocconf @@ -78,6 +78,7 @@ excludedirs = $QTDIR/src/3rdparty/clucene \ $QTDIR/src/3rdparty/wintab \ $QTDIR/src/3rdparty/zlib \ $QTDIR/doc/src/snippets \ + $QTDIR/doc/src/ja_JP \ $QTDIR/src/3rdparty/phonon/gstreamer \ $QTDIR/src/3rdparty/phonon/ds9 \ $QTDIR/src/3rdparty/phonon/qt7 \ -- cgit v0.12 From 2613a33d957ae2b274364672ee5280b6317b71b0 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 7 Jun 2010 12:32:02 +1000 Subject: Improve docs about Qml component case sensitivity. Task-number: QTBUG-11253 --- doc/src/declarative/extending.qdoc | 10 +++++++--- doc/src/declarative/qdeclarativedocument.qdoc | 18 ++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 574b0b2..173fb6d 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -896,9 +896,13 @@ in other projects without the use of C++. Components can also help to reduce duplication inside one project by limiting the need for large numbers of copy-and-pasted blocks. -Any snippet of QML code can become a component, just by placing it in the file -".qml" where is the new element name, and begins with an uppercase -letter. These QML files automatically become available as new QML element types +Any snippet of QML code can become a component, just by placing it in the file ".qml" +where is the new element name, and begins with an uppercase letter. Note that +the case of all characters in the are significant on some filesystems, notably +UNIX filesystems. It is recommended that the case of the filename matches the case of +the component name in QML exactly, regardless of the platform the QML will be deployed to. + +These QML files automatically become available as new QML element types to other QML components and applications in the same directory. For example, here we show how a component named "Box" is defined and used diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc index bc099ce..8336512 100644 --- a/doc/src/declarative/qdeclarativedocument.qdoc +++ b/doc/src/declarative/qdeclarativedocument.qdoc @@ -96,9 +96,6 @@ Once created, instances are not dependent on the component that created them, so operate on independent data. Here is an example of a simple "Button" component that is instantiated four times, each with a different value for its \c text property. -\table -\row -\o \raw HTML
\endraw @@ -125,10 +122,19 @@ BorderImage { \raw HTML
\endraw -\endtable -In addition to the top-level component that all QML documents define, documents may also -include additional \e inline components. Inline components are declared using the +Any snippet of QML code can become a component, just by placing it in the file ".qml" +where is the new element name, and begins with an uppercase letter. Note that +the case of all characters in the are significant on some filesystems, notably +UNIX filesystems. It is recommended that the case of the filename matches the case of +the component name in QML exactly, regardless of the platform the QML will be deployed to. + +These QML files automatically become available as new QML element types +to other QML components and applications in the same directory. + +In addition to the top-level component that all QML documents define, and any reusable +components placed in separate files, documents may also +include \e inline components. Inline components are declared using the \l Component element, as can be seen in the first example above. Inline components share all the characteristics of regular top-level components and use the same \c import list as their containing QML document. Components are one of the most basic building blocks in QML, and are -- cgit v0.12 From 22126ec530d07c7ba80f90812c9d6128b2d4a56f Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 7 Jun 2010 13:03:05 +1000 Subject: Fix regression in input panel autotests --- .../declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 7 ++++++- .../qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 474eb3f..9e5285f 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -956,7 +956,12 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus() edit.setFocusOnPress(true); QCOMPARE(focusOnPressSpy.count(),2); - // and input panel should not open if focus has already been set + edit.setFocus(true); + QCOMPARE(ic.openInputPanelReceived, true); + QCOMPARE(ic.closeInputPanelReceived, false); + ic.openInputPanelReceived = false; + + // input panel should not open if focus has already been set edit.setFocus(true); QCOMPARE(ic.openInputPanelReceived, false); QCOMPARE(ic.closeInputPanelReceived, false); diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index c1c6634..370ecfb 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -902,7 +902,12 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus() input.setFocusOnPress(true); QCOMPARE(focusOnPressSpy.count(),2); - // and input panel should not open if focus has already been set + input.setFocus(true); + QCOMPARE(ic.openInputPanelReceived, true); + QCOMPARE(ic.closeInputPanelReceived, false); + ic.openInputPanelReceived = false; + + // input panel should not open if focus has already been set input.setFocus(true); QCOMPARE(ic.openInputPanelReceived, false); QCOMPARE(ic.closeInputPanelReceived, false); -- cgit v0.12 From ed5f6c87e783960f880d56f58149985366d34615 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 7 Jun 2010 11:54:19 +1000 Subject: Add image example. --- doc/src/declarative/examples.qdoc | 1 + doc/src/examples/qml-examples.qdoc | 9 +++ doc/src/images/qml-image-example.png | Bin 0 -> 58184 bytes .../declarative/imageelements/image/ImageCell.qml | 60 +++++++++++++++++++ .../declarative/imageelements/image/face-smile.png | Bin 0 -> 15408 bytes examples/declarative/imageelements/image/image.qml | 66 +++++++++++++++++++++ .../imageelements/image/image.qmlproject | 16 +++++ 7 files changed, 152 insertions(+) create mode 100644 doc/src/images/qml-image-example.png create mode 100644 examples/declarative/imageelements/image/ImageCell.qml create mode 100644 examples/declarative/imageelements/image/face-smile.png create mode 100644 examples/declarative/imageelements/image/image.qml create mode 100644 examples/declarative/imageelements/image/image.qmlproject diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc index 8f39685..cc67664 100644 --- a/doc/src/declarative/examples.qdoc +++ b/doc/src/declarative/examples.qdoc @@ -79,6 +79,7 @@ For example, from your build directory, run: \section2 Image Elements \list \o \l{declarative/imageelements/borderimage}{BorderImage} +\o \l{declarative/imageelements/image}{Image} \endlist \section2 Positioners diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc index 035628e..9dbf853 100644 --- a/doc/src/examples/qml-examples.qdoc +++ b/doc/src/examples/qml-examples.qdoc @@ -75,6 +75,15 @@ */ /*! + \title Image Elements: Image + \example declarative/imageelements/image + + This example shows how to use the Image element and its \l{Image::fillMode}{fillModes}. + + \image qml-image-example.png +*/ + +/*! \page declarative-cppextensions-reference.html \title C++ Extensions: Reference examples diff --git a/doc/src/images/qml-image-example.png b/doc/src/images/qml-image-example.png new file mode 100644 index 0000000..c1951c0 Binary files /dev/null and b/doc/src/images/qml-image-example.png differ diff --git a/examples/declarative/imageelements/image/ImageCell.qml b/examples/declarative/imageelements/image/ImageCell.qml new file mode 100644 index 0000000..bd232b9 --- /dev/null +++ b/examples/declarative/imageelements/image/ImageCell.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ +import Qt 4.7 + +Item { + property alias mode: image.fillMode + property alias caption: captionItem.text + + width: parent.cellWidth; height: parent.cellHeight + + Image { + id: image + width: parent.width; height: parent.height - captionItem.height + source: "face-smile.png" + clip: true // only makes a difference if mode is PreserveAspectCrop + smooth: true + } + + Text { + id: captionItem + anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom + } +} diff --git a/examples/declarative/imageelements/image/face-smile.png b/examples/declarative/imageelements/image/face-smile.png new file mode 100644 index 0000000..3d66d72 Binary files /dev/null and b/examples/declarative/imageelements/image/face-smile.png differ diff --git a/examples/declarative/imageelements/image/image.qml b/examples/declarative/imageelements/image/image.qml new file mode 100644 index 0000000..bc5ae37 --- /dev/null +++ b/examples/declarative/imageelements/image/image.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + width: 490 + height: 285 + + Grid { + property int cellWidth: (width - (spacing * (columns - 1))) / columns + property int cellHeight: (height - (spacing * (rows - 1))) / rows + + anchors.fill: parent + anchors.margins: 30 + + columns: 3 + rows: 2 + spacing: 30 + + ImageCell { mode: Image.Stretch; caption: "Stretch" } + ImageCell { mode: Image.PreserveAspectFit; caption: "PreserveAspectFit" } + ImageCell { mode: Image.PreserveAspectCrop; caption: "PreserveAspectCrop" } + + ImageCell { mode: Image.Tile; caption: "Tile" } + ImageCell { mode: Image.TileHorizontally; caption: "TileHorizontally" } + ImageCell { mode: Image.TileVertically; caption: "TileVertically" } + } +} diff --git a/examples/declarative/imageelements/image/image.qmlproject b/examples/declarative/imageelements/image/image.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/imageelements/image/image.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} -- cgit v0.12 From 0619c12bfee40826034dbc31f9d398182a3aa49f Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 7 Jun 2010 14:44:06 +1000 Subject: Ensure state operations assigned to the default state are triggered when returning to that state. Task-number: QTBUG-11228 --- src/declarative/util/qdeclarativestate.cpp | 7 +++++++ src/declarative/util/qdeclarativestate_p.h | 1 + src/declarative/util/qdeclarativestate_p_p.h | 3 ++- src/declarative/util/qdeclarativestategroup.cpp | 4 ++-- .../qdeclarativestates/data/returnToBase.qml | 21 +++++++++++++++++++++ .../qdeclarativestates/tst_qdeclarativestates.cpp | 21 +++++++++++++++++++++ 6 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativestates/data/returnToBase.qml diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index dc2b2cc..eca90a4 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -187,6 +187,13 @@ void QDeclarativeState::setName(const QString &n) { Q_D(QDeclarativeState); d->name = n; + d->named = true; +} + +bool QDeclarativeState::isNamed() const +{ + Q_D(const QDeclarativeState); + return d->named; } bool QDeclarativeState::isWhenKnown() const diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h index 37b24cb..2e2ce7b 100644 --- a/src/declarative/util/qdeclarativestate_p.h +++ b/src/declarative/util/qdeclarativestate_p.h @@ -146,6 +146,7 @@ public: QString name() const; void setName(const QString &); + bool isNamed() const; /*'when' is a QDeclarativeBinding to limit state changes oscillation due to the unpredictable order of evaluation of bound expressions*/ diff --git a/src/declarative/util/qdeclarativestate_p_p.h b/src/declarative/util/qdeclarativestate_p_p.h index 4a2af0f..2ef9bb0 100644 --- a/src/declarative/util/qdeclarativestate_p_p.h +++ b/src/declarative/util/qdeclarativestate_p_p.h @@ -101,12 +101,13 @@ class QDeclarativeStatePrivate : public QObjectPrivate public: QDeclarativeStatePrivate() - : when(0), inState(false), group(0) {} + : when(0), named(false), inState(false), group(0) {} typedef QList SimpleActionList; QString name; QDeclarativeBinding *when; + bool named; struct OperationGuard : public QDeclarativeGuard { diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp index 9b042d7..1e530a1 100644 --- a/src/declarative/util/qdeclarativestategroup.cpp +++ b/src/declarative/util/qdeclarativestategroup.cpp @@ -263,7 +263,7 @@ void QDeclarativeStateGroup::componentComplete() for (int ii = 0; ii < d->states.count(); ++ii) { QDeclarativeState *state = d->states.at(ii); - if (state->name().isEmpty()) + if (!state->isNamed()) state->setName(QLatin1String("anonymousState") % QString::number(++d->unnamedCount)); } @@ -295,7 +295,7 @@ bool QDeclarativeStateGroupPrivate::updateAutoState() for (int ii = 0; ii < states.count(); ++ii) { QDeclarativeState *state = states.at(ii); if (state->isWhenKnown()) { - if (!state->name().isEmpty()) { + if (state->isNamed()) { if (state->when() && state->when()->evaluate().toBool()) { if (stateChangeDebug()) qWarning() << "Setting auto state due to:" diff --git a/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml b/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml new file mode 100644 index 0000000..e342331 --- /dev/null +++ b/tests/auto/declarative/qdeclarativestates/data/returnToBase.qml @@ -0,0 +1,21 @@ +import Qt 4.7 + +Rectangle { + id: theRect + property bool triggerState: false + property string stateString: "" + states: [ State { + when: triggerState + PropertyChanges { + target: theRect + stateString: "inState" + } + }, + State { + name: "" + PropertyChanges { + target: theRect + stateString: "originalState" + } + }] +} diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index ea074a4..055a34c 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -112,6 +112,7 @@ private slots: void whenOrdering(); void urlResolution(); void unnamedWhen(); + void returnToBase(); }; void tst_qdeclarativestates::initTestCase() @@ -1085,6 +1086,26 @@ void tst_qdeclarativestates::unnamedWhen() QCOMPARE(rect->property("stateString").toString(), QLatin1String("")); } +void tst_qdeclarativestates::returnToBase() +{ + QDeclarativeEngine engine; + + QDeclarativeComponent c(&engine, SRCDIR "/data/returnToBase.qml"); + QDeclarativeRectangle *rect = qobject_cast(c.create()); + QVERIFY(rect != 0); + QDeclarativeItemPrivate *rectPrivate = QDeclarativeItemPrivate::get(rect); + + QCOMPARE(rectPrivate->state(), QLatin1String("")); + QCOMPARE(rect->property("stateString").toString(), QLatin1String("")); + rect->setProperty("triggerState", true); + QCOMPARE(rectPrivate->state(), QLatin1String("anonymousState1")); + QCOMPARE(rect->property("stateString").toString(), QLatin1String("inState")); + rect->setProperty("triggerState", false); + QCOMPARE(rectPrivate->state(), QLatin1String("")); + QCOMPARE(rect->property("stateString").toString(), QLatin1String("originalState")); +} + + QTEST_MAIN(tst_qdeclarativestates) #include "tst_qdeclarativestates.moc" -- cgit v0.12 From f410fb06c584fa0e893ab6066ea8b03a5323fe07 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 7 Jun 2010 14:52:20 +1000 Subject: Remove unnecessary CloseSoftwareInputPanel events after TextEdit or TextInput has lost focus Task-number: Reviewed-by: Warwick Allison --- .../graphicsitems/qdeclarativetextedit.cpp | 27 +++----- .../graphicsitems/qdeclarativetextedit_p.h | 1 - .../graphicsitems/qdeclarativetextinput.cpp | 27 +++----- .../graphicsitems/qdeclarativetextinput_p.h | 1 - .../tst_qdeclarativetextedit.cpp | 73 ++++++++++++++-------- .../tst_qdeclarativetextinput.cpp | 72 +++++++++++++-------- 6 files changed, 109 insertions(+), 92 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index d0e0ad3..c086851 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1391,9 +1391,9 @@ void QDeclarativeTextEditPrivate::updateDefaultTextOption() your application. By default the opening of input panels follows the platform style. On Symbian^1 and - Symbian^3 -based devices the panels are opened by clicking TextEdit and need to be - manually closed by the user. On other platforms the panels are automatically opened - when TextEdit element gains focus and closed when the focus is lost. + Symbian^3 -based devices the panels are opened by clicking TextEdit. On other platforms + the panels are automatically opened when TextEdit element gains focus. Input panels are + always closed if no editor owns focus. . You can disable the automatic behavior by setting the property \c focusOnPress to false and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement @@ -1415,9 +1415,9 @@ void QDeclarativeTextEditPrivate::updateDefaultTextOption() textEdit.openSoftwareInputPanel(); } else { textEdit.focus = false; - textEdit.closeSoftwareInputPanel(); } } + onPressAndHold: textEdit.closeSoftwareInputPanel(); } } \endcode @@ -1442,9 +1442,9 @@ void QDeclarativeTextEdit::openSoftwareInputPanel() your application. By default the opening of input panels follows the platform style. On Symbian^1 and - Symbian^3 -based devices the panels are opened by clicking TextEdit and need to be - manually closed by the user. On other platforms the panels are automatically opened - when TextEdit element gains focus and closed when the focus is lost. + Symbian^3 -based devices the panels are opened by clicking TextEdit. On other platforms + the panels are automatically opened when TextEdit element gains focus. Input panels are + always closed if no editor owns focus. . You can disable the automatic behavior by setting the property \c focusOnPress to false and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement @@ -1466,9 +1466,9 @@ void QDeclarativeTextEdit::openSoftwareInputPanel() textEdit.openSoftwareInputPanel(); } else { textEdit.focus = false; - textEdit.closeSoftwareInputPanel(); } } + onPressAndHold: textEdit.closeSoftwareInputPanel(); } } \endcode @@ -1496,15 +1496,4 @@ void QDeclarativeTextEdit::focusInEvent(QFocusEvent *event) QDeclarativePaintedItem::focusInEvent(event); } -void QDeclarativeTextEdit::focusOutEvent(QFocusEvent *event) -{ - Q_D(const QDeclarativeTextEdit); - if (d->showInputPanelOnFocus) { - if (d->focusOnPress && !isReadOnly()) { - closeSoftwareInputPanel(); - } - } - QDeclarativePaintedItem::focusOutEvent(event); -} - QT_END_NAMESPACE diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 0ecb2f3..d08f607 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -247,7 +247,6 @@ protected: void keyPressEvent(QKeyEvent *); void keyReleaseEvent(QKeyEvent *); void focusInEvent(QFocusEvent *event); - void focusOutEvent(QFocusEvent *event); // mouse filter? void mousePressEvent(QGraphicsSceneMouseEvent *event); diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 3911a97..b877c50 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1234,9 +1234,9 @@ void QDeclarativeTextInput::moveCursorSelection(int position) your application. By default the opening of input panels follows the platform style. On Symbian^1 and - Symbian^3 -based devices the panels are opened by clicking TextInput and need to be - manually closed by the user. On other platforms the panels are automatically opened - when TextInput element gains focus and closed when the focus is lost. + Symbian^3 -based devices the panels are opened by clicking TextInput. On other platforms + the panels are automatically opened when TextInput element gains focus. Input panels are + always closed if no editor owns focus. . You can disable the automatic behavior by setting the property \c focusOnPress to false and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement @@ -1258,9 +1258,9 @@ void QDeclarativeTextInput::moveCursorSelection(int position) textInput.openSoftwareInputPanel(); } else { textInput.focus = false; - textInput.closeSoftwareInputPanel(); } } + onPressAndHold: textInput.closeSoftwareInputPanel(); } } \endqml @@ -1285,9 +1285,9 @@ void QDeclarativeTextInput::openSoftwareInputPanel() your application. By default the opening of input panels follows the platform style. On Symbian^1 and - Symbian^3 -based devices the panels are opened by clicking TextInput and need to be - manually closed by the user. On other platforms the panels are automatically opened - when TextInput element gains focus and closed when the focus is lost. + Symbian^3 -based devices the panels are opened by clicking TextInput. On other platforms + the panels are automatically opened when TextInput element gains focus. Input panels are + always closed if no editor owns focus. . You can disable the automatic behavior by setting the property \c focusOnPress to false and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement @@ -1309,9 +1309,9 @@ void QDeclarativeTextInput::openSoftwareInputPanel() textInput.openSoftwareInputPanel(); } else { textInput.focus = false; - textInput.closeSoftwareInputPanel(); } } + onPressAndHold: textInput.closeSoftwareInputPanel(); } } \endqml @@ -1340,17 +1340,6 @@ void QDeclarativeTextInput::focusInEvent(QFocusEvent *event) QDeclarativePaintedItem::focusInEvent(event); } -void QDeclarativeTextInput::focusOutEvent(QFocusEvent *event) -{ - Q_D(const QDeclarativeTextInput); - if (d->showInputPanelOnFocus) { - if (d->focusOnPress && !isReadOnly()) { - closeSoftwareInputPanel(); - } - } - QDeclarativePaintedItem::focusOutEvent(event); -} - void QDeclarativeTextInputPrivate::init() { Q_Q(QDeclarativeTextInput); diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index e34634a..c539bd3 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -224,7 +224,6 @@ protected: void keyPressEvent(QKeyEvent* ev); bool event(QEvent *e); void focusInEvent(QFocusEvent *event); - void focusOutEvent(QFocusEvent *event); public Q_SLOTS: void selectAll(); diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 9e5285f..053c9ef 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -862,6 +862,7 @@ void tst_qdeclarativetextedit::openInputPanelOnClick() edit.setFocus(false); edit.setFocus(true); edit.setFocus(false); + QApplication::processEvents(); QCOMPARE(ic.openInputPanelReceived, false); QCOMPARE(ic.closeInputPanelReceived, false); } @@ -887,6 +888,7 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus() QDeclarativeTextEditPrivate *editPrivate = static_cast(pri); editPrivate->showInputPanelOnFocus = true; + // test default values QVERIFY(edit.focusOnPress()); QCOMPARE(ic.openInputPanelReceived, false); QCOMPARE(ic.closeInputPanelReceived, false); @@ -896,75 +898,94 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus() QApplication::processEvents(); QVERIFY(edit.hasFocus()); QCOMPARE(ic.openInputPanelReceived, true); - QCOMPARE(ic.closeInputPanelReceived, false); ic.openInputPanelReceived = false; // no events on release QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos())); QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, false); ic.openInputPanelReceived = false; - // Even with focus already gained, user needs - // to be able to open panel by pressing on the editor + // if already focused, input panel can be opened on press + QVERIFY(edit.hasFocus()); QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos())); QApplication::processEvents(); QCOMPARE(ic.openInputPanelReceived, true); - QCOMPARE(ic.closeInputPanelReceived, false); ic.openInputPanelReceived = false; - // input panel closed on focus lost - edit.setFocus(false); + // input method should stay enabled if focus + // is lost to an item that also accepts inputs + QDeclarativeTextEdit anotherEdit; + scene.addItem(&anotherEdit); + anotherEdit.setFocus(true); + QApplication::processEvents(); + QCOMPARE(ic.openInputPanelReceived, true); + ic.openInputPanelReceived = false; + QCOMPARE(view.inputContext(), &ic); + QVERIFY(view.testAttribute(Qt::WA_InputMethodEnabled)); + + // input method should be disabled if focus + // is lost to an item that doesn't accept inputs + QDeclarativeItem item; + scene.addItem(&item); + item.setFocus(true); QApplication::processEvents(); QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, true); - ic.closeInputPanelReceived = false; + QVERIFY(view.inputContext() == 0); + QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled)); - // no automatic input panel events if focusOnPress is false + // no automatic input panel events should + // be sent if focusOnPress is false + edit.setFocusOnPress(false); + QCOMPARE(focusOnPressSpy.count(),1); edit.setFocusOnPress(false); QCOMPARE(focusOnPressSpy.count(),1); - QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos())); - QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos())); edit.setFocus(false); edit.setFocus(true); + QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos())); + QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(edit.scenePos())); + QApplication::processEvents(); QCOMPARE(ic.openInputPanelReceived, false); QCOMPARE(ic.closeInputPanelReceived, false); - edit.setFocusOnPress(false); - QCOMPARE(focusOnPressSpy.count(),1); - - // one show input panel event when openSoftwareInputPanel is called + // one show input panel event should + // be set when openSoftwareInputPanel is called edit.openSoftwareInputPanel(); QCOMPARE(ic.openInputPanelReceived, true); QCOMPARE(ic.closeInputPanelReceived, false); ic.openInputPanelReceived = false; - // one close input panel event when closeSoftwareInputPanel is called + // one close input panel event should + // be sent when closeSoftwareInputPanel is called edit.closeSoftwareInputPanel(); QCOMPARE(ic.openInputPanelReceived, false); QCOMPARE(ic.closeInputPanelReceived, true); - ic.openInputPanelReceived = false; + ic.closeInputPanelReceived = false; // set focusOnPress back to true edit.setFocusOnPress(true); QCOMPARE(focusOnPressSpy.count(),2); + edit.setFocusOnPress(true); + QCOMPARE(focusOnPressSpy.count(),2); edit.setFocus(false); + QApplication::processEvents(); QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, true); + QCOMPARE(ic.closeInputPanelReceived, false); ic.closeInputPanelReceived = false; - edit.setFocusOnPress(true); - QCOMPARE(focusOnPressSpy.count(),2); - + // input panel should not re-open + // if focus has already been set edit.setFocus(true); QCOMPARE(ic.openInputPanelReceived, true); - QCOMPARE(ic.closeInputPanelReceived, false); ic.openInputPanelReceived = false; - - // input panel should not open if focus has already been set edit.setFocus(true); QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, false); + + // input method should be disabled + // if TextEdit loses focus + edit.setFocus(false); + QApplication::processEvents(); + QVERIFY(view.inputContext() == 0); + QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled)); } void tst_qdeclarativetextedit::geometrySignals() diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 370ecfb..c9de0aa 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -833,6 +833,7 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus() QDeclarativeTextInputPrivate *inputPrivate = static_cast(pri); inputPrivate->showInputPanelOnFocus = true; + // test default values QVERIFY(input.focusOnPress()); QCOMPARE(ic.openInputPanelReceived, false); QCOMPARE(ic.closeInputPanelReceived, false); @@ -842,75 +843,94 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus() QApplication::processEvents(); QVERIFY(input.hasFocus()); QCOMPARE(ic.openInputPanelReceived, true); - QCOMPARE(ic.closeInputPanelReceived, false); ic.openInputPanelReceived = false; // no events on release QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos())); QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, false); ic.openInputPanelReceived = false; - // Even with focus already gained, user needs - // to be able to open panel by pressing on the editor + // if already focused, input panel can be opened on press + QVERIFY(input.hasFocus()); QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos())); QApplication::processEvents(); QCOMPARE(ic.openInputPanelReceived, true); - QCOMPARE(ic.closeInputPanelReceived, false); ic.openInputPanelReceived = false; - // input panel closed on focus lost - input.setFocus(false); + // input method should stay enabled if focus + // is lost to an item that also accepts inputs + QDeclarativeTextInput anotherInput; + scene.addItem(&anotherInput); + anotherInput.setFocus(true); + QApplication::processEvents(); + QCOMPARE(ic.openInputPanelReceived, true); + ic.openInputPanelReceived = false; + QCOMPARE(view.inputContext(), &ic); + QVERIFY(view.testAttribute(Qt::WA_InputMethodEnabled)); + + // input method should be disabled if focus + // is lost to an item that doesn't accept inputs + QDeclarativeItem item; + scene.addItem(&item); + item.setFocus(true); QApplication::processEvents(); QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, true); - ic.closeInputPanelReceived = false; + QVERIFY(view.inputContext() == 0); + QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled)); - // no automatic input panel events if focusOnPress is false + // no automatic input panel events should + // be sent if focusOnPress is false + input.setFocusOnPress(false); + QCOMPARE(focusOnPressSpy.count(),1); input.setFocusOnPress(false); QCOMPARE(focusOnPressSpy.count(),1); - QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos())); - QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos())); input.setFocus(false); input.setFocus(true); + QTest::mousePress(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos())); + QTest::mouseRelease(view.viewport(), Qt::LeftButton, 0, view.mapFromScene(input.scenePos())); + QApplication::processEvents(); QCOMPARE(ic.openInputPanelReceived, false); QCOMPARE(ic.closeInputPanelReceived, false); - input.setFocusOnPress(false); - QCOMPARE(focusOnPressSpy.count(),1); - - // one show input panel event when openSoftwareInputPanel is called + // one show input panel event should + // be set when openSoftwareInputPanel is called input.openSoftwareInputPanel(); QCOMPARE(ic.openInputPanelReceived, true); QCOMPARE(ic.closeInputPanelReceived, false); ic.openInputPanelReceived = false; - // one close input panel event when closeSoftwareInputPanel is called + // one close input panel event should + // be sent when closeSoftwareInputPanel is called input.closeSoftwareInputPanel(); QCOMPARE(ic.openInputPanelReceived, false); QCOMPARE(ic.closeInputPanelReceived, true); - ic.openInputPanelReceived = false; + ic.closeInputPanelReceived = false; // set focusOnPress back to true input.setFocusOnPress(true); QCOMPARE(focusOnPressSpy.count(),2); + input.setFocusOnPress(true); + QCOMPARE(focusOnPressSpy.count(),2); input.setFocus(false); + QApplication::processEvents(); QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, true); + QCOMPARE(ic.closeInputPanelReceived, false); ic.closeInputPanelReceived = false; - input.setFocusOnPress(true); - QCOMPARE(focusOnPressSpy.count(),2); - + // input panel should not re-open + // if focus has already been set input.setFocus(true); QCOMPARE(ic.openInputPanelReceived, true); - QCOMPARE(ic.closeInputPanelReceived, false); ic.openInputPanelReceived = false; - - // input panel should not open if focus has already been set input.setFocus(true); QCOMPARE(ic.openInputPanelReceived, false); - QCOMPARE(ic.closeInputPanelReceived, false); + + // input method should be disabled + // if TextEdit loses focus + input.setFocus(false); + QApplication::processEvents(); + QVERIFY(view.inputContext() == 0); + QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled)); } class MyTextInput : public QDeclarativeTextInput -- cgit v0.12 From a4f4fff60d20e509cb57bd0dab30533e1e299aee Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 7 Jun 2010 15:59:11 +1000 Subject: Keep reported point/pixel size in sync. This allows you to, for example, bind to a Text's font.pixelSize, even if one was never explicitly set. Task-number: QTBUG-11111 --- src/declarative/qml/qdeclarativevaluetype.cpp | 12 ++++++++++++ src/declarative/qml/qdeclarativevaluetype_p.h | 2 ++ .../qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp | 4 +++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp index dbc25bb..c17ec95 100644 --- a/src/declarative/qml/qdeclarativevaluetype.cpp +++ b/src/declarative/qml/qdeclarativevaluetype.cpp @@ -47,6 +47,8 @@ QT_BEGIN_NAMESPACE +Q_DECL_IMPORT extern int qt_defaultDpi(); + template int qmlRegisterValueTypeEnums(const char *qmlName) { @@ -909,6 +911,11 @@ void QDeclarativeFontValueType::setStrikeout(bool b) qreal QDeclarativeFontValueType::pointSize() const { + if (font.pointSizeF() == -1) { + if (dpi.isNull) + dpi = qt_defaultDpi(); + return font.pixelSize() * qreal(72.) / qreal(dpi); + } return font.pointSizeF(); } @@ -929,6 +936,11 @@ void QDeclarativeFontValueType::setPointSize(qreal size) int QDeclarativeFontValueType::pixelSize() const { + if (font.pixelSize() == -1) { + if (dpi.isNull) + dpi = qt_defaultDpi(); + return (font.pointSizeF() * dpi) / qreal(72.); + } return font.pixelSize(); } diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h index 3eaecc1..4b1bbd6 100644 --- a/src/declarative/qml/qdeclarativevaluetype_p.h +++ b/src/declarative/qml/qdeclarativevaluetype_p.h @@ -55,6 +55,7 @@ #include "qdeclarativeproperty.h" #include "private/qdeclarativeproperty_p.h" +#include "private/qdeclarativenullablevalue_p_p.h" #include #include @@ -547,6 +548,7 @@ private: QFont font; bool pixelSizeSet; bool pointSizeSet; + mutable QDeclarativeNullableValue dpi; }; QT_END_NAMESPACE diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp index 53fd68c..5e46fab 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp +++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp @@ -46,6 +46,8 @@ #include #include "testtypes.h" +extern int qt_defaultDpi(); + class tst_qdeclarativevaluetypes : public QObject { Q_OBJECT @@ -464,7 +466,7 @@ void tst_qdeclarativevaluetypes::font() QCOMPARE(object->property("f_overline").toBool(), object->font().overline()); QCOMPARE(object->property("f_strikeout").toBool(), object->font().strikeOut()); QCOMPARE(object->property("f_pointSize").toDouble(), object->font().pointSizeF()); - QCOMPARE(object->property("f_pixelSize").toInt(), object->font().pixelSize()); + QCOMPARE(object->property("f_pixelSize").toInt(), int((object->font().pointSizeF() * qt_defaultDpi()) / qreal(72.))); QCOMPARE(object->property("f_capitalization").toInt(), (int)object->font().capitalization()); QCOMPARE(object->property("f_letterSpacing").toDouble(), object->font().letterSpacing()); QCOMPARE(object->property("f_wordSpacing").toDouble(), object->font().wordSpacing()); -- cgit v0.12 From f6eeb554631faa542cb14388a46f05a0822b8033 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 7 Jun 2010 16:27:09 +1000 Subject: Accept enter key in the webbrower demo url input. --- demos/declarative/webbrowser/content/UrlInput.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/demos/declarative/webbrowser/content/UrlInput.qml b/demos/declarative/webbrowser/content/UrlInput.qml index 9ea1904..b57fae6 100644 --- a/demos/declarative/webbrowser/content/UrlInput.qml +++ b/demos/declarative/webbrowser/content/UrlInput.qml @@ -73,6 +73,10 @@ Item { urlText.text = webView.url webView.focus = true } + Keys.onEnterPressed: { + container.urlEntered(urlText.text) + webView.focus = true + } Keys.onReturnPressed: { container.urlEntered(urlText.text) webView.focus = true -- cgit v0.12 From 5eec7f6611075df526f30796378315c9cd469cd8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 29 May 2010 20:51:57 +0200 Subject: Update the linux-icc mkspec --- mkspecs/linux-icc/qmake.conf | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf index 3353180..5e46498 100644 --- a/mkspecs/linux-icc/qmake.conf +++ b/mkspecs/linux-icc/qmake.conf @@ -21,12 +21,12 @@ QMAKE_LEX = flex QMAKE_LEXFLAGS = QMAKE_YACC = yacc QMAKE_YACCFLAGS = -d -QMAKE_CFLAGS = -wd654,1572 +QMAKE_CFLAGS = QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = +QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125 QMAKE_CFLAGS_WARN_OFF = -w -QMAKE_CFLAGS_RELEASE = -O2 -QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_RELEASE = -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing +QMAKE_CFLAGS_DEBUG = -O0 -g QMAKE_CFLAGS_SHLIB = -fPIC QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CFLAGS_YACC = @@ -60,9 +60,10 @@ QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_DEBUG = QMAKE_LFLAGS_SHLIB = -shared QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB -QMAKE_LFLAGS_SONAME = -Qoption,ld,-soname, +QMAKE_LFLAGS_SONAME = -Wl,-soname, QMAKE_LFLAGS_THREAD = -QMAKE_LFLAGS_RPATH = -Qoption,ld,-rpath, +QMAKE_LFLAGS_NOUNDEF = -Wl,-z,defs +QMAKE_LFLAGS_RPATH = -Wl,-rpath, QMAKE_LIBS = QMAKE_LIBS_DYNLOAD = -ldl @@ -99,8 +100,8 @@ QMAKE_CXXFLAGS_USE_PRECOMPILE = -pch-use ${QMAKE_PCH_OUTPUT} -include ${QMAKE_PC QMAKE_CXXFLAGS_PRECOMPILE = -c -pch-create ${QMAKE_PCH_OUTPUT} -include ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_TEMP_OBJECT} ${QMAKE_PCH_TEMP_SOURCE} # -Bsymbolic-functions (ld) support -QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Qoption,ld,-Bsymbolic-functions -QMAKE_LFLAGS_DYNAMIC_LIST = -Qoption,ld,--dynamic-list, +QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions +QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, # Symbol visibility control QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden -- cgit v0.12 From 8a4d4c1f0d3761cbf46cf0fee076647ec4a6ac5a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 30 May 2010 10:46:42 +0200 Subject: Update the mkspec for linux-icc: don't use jump tables in shlibs ICC generates jump table code that isn't PIC (i.e., it does absolute indirect jumps), so this increases the number of relocations in shared libraries by a huge amount. In QtCore it increased by 250% (from 3500 to 12000). --- mkspecs/linux-icc/qmake.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf index 5e46498..3b26f7d 100644 --- a/mkspecs/linux-icc/qmake.conf +++ b/mkspecs/linux-icc/qmake.conf @@ -27,7 +27,7 @@ QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125 QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CFLAGS_RELEASE = -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing QMAKE_CFLAGS_DEBUG = -O0 -g -QMAKE_CFLAGS_SHLIB = -fPIC +QMAKE_CFLAGS_SHLIB = -fPIC -fno-jump-tables QMAKE_CFLAGS_STATIC_LIB = $$QMAKE_CFLAGS_SHLIB QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_THREAD = -D_REENTRANT @@ -58,7 +58,7 @@ QMAKE_LINK_SHLIB = icpc QMAKE_LFLAGS = QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_DEBUG = -QMAKE_LFLAGS_SHLIB = -shared +QMAKE_LFLAGS_SHLIB = -shared -shared-intel QMAKE_LFLAGS_PLUGIN = $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_SONAME = -Wl,-soname, QMAKE_LFLAGS_THREAD = @@ -77,7 +77,7 @@ QMAKE_LIBS_THREAD = -lpthread QMAKE_MOC = $$[QT_INSTALL_BINS]/moc QMAKE_UIC = $$[QT_INSTALL_BINS]/uic -QMAKE_AR = ar cqs +QMAKE_AR = xiar cqs QMAKE_OBJCOPY = objcopy QMAKE_RANLIB = -- cgit v0.12 From 91fa2c1beb79124db4a70a37e2224c1de9b9ded4 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Mon, 7 Jun 2010 12:33:27 +0200 Subject: Disabled item view items use incorrect background color This was a problem when using alternate row colors. We use a separate palette for base/alternate when using disabled colors. However, we should only use this if the entire view is disabled. To keep compatibility with style sheets we have to preserve the disabled state per item, but we now use the widget pointer to decide which palette role to use. Task-number: QTBUG-11263 Reviewed-by: ogoffart --- src/gui/styles/qcommonstyle.cpp | 4 ++-- src/gui/styles/qgtkstyle.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 4978565..039a6da 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -762,7 +762,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q #ifndef QT_NO_ITEMVIEWS case PE_PanelItemViewRow: if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast(opt)) { - QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled + QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled)) ? QPalette::Normal : QPalette::Disabled; if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active)) cg = QPalette::Inactive; @@ -775,7 +775,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q break; case PE_PanelItemViewItem: if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast(opt)) { - QPalette::ColorGroup cg = vopt->state & QStyle::State_Enabled + QPalette::ColorGroup cg = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled)) ? QPalette::Normal : QPalette::Disabled; if (cg == QPalette::Normal && !(vopt->state & QStyle::State_Active)) cg = QPalette::Inactive; diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index b59a033..c989bd3 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -855,9 +855,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, key = QLS("a"); GTK_WIDGET_SET_FLAGS(gtkTreeView, GTK_HAS_FOCUS); } + bool isEnabled = (widget ? widget->isEnabled() : (vopt->state & QStyle::State_Enabled)); gtkPainter.paintFlatBox(gtkTreeView, detail, option->rect, option->state & State_Selected ? GTK_STATE_SELECTED : - option->state & State_Enabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, + isEnabled ? GTK_STATE_NORMAL : GTK_STATE_INSENSITIVE, GTK_SHADOW_OUT, gtkTreeView->style, key); if (isActive ) GTK_WIDGET_UNSET_FLAGS(gtkTreeView, GTK_HAS_FOCUS); -- cgit v0.12 From e82d6264571604357b28ccb8d1b079c7eaf6ba71 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 7 Jun 2010 13:42:13 +0200 Subject: remove somewhat misleading warning about x11 pixmap leak the only situation where it would be actually true are broken drivers (or a broken x server as a whole). qt is not the right place to worry about that problem. Reviewed-by: jbache --- src/gui/image/qpixmap_x11.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gui/image/qpixmap_x11.cpp b/src/gui/image/qpixmap_x11.cpp index 6bebefc..e8dc5ae 100644 --- a/src/gui/image/qpixmap_x11.cpp +++ b/src/gui/image/qpixmap_x11.cpp @@ -1250,10 +1250,8 @@ void QX11PixmapData::release() pengine = 0; if (!X11) { -#ifndef QT_NO_DEBUG - qWarning("~QX11PixmapData(): QPixmap objects must be destroyed before the QApplication" - " object, otherwise the native pixmap object will be leaked."); -#endif + // At this point, the X server will already have freed our resources, + // so there is nothing to do. return; } -- cgit v0.12 From 3cf159b75f8a5e66edd8f6b4defbee2f4435b6ef Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 7 Jun 2010 13:42:34 +0200 Subject: add docu about pixmaps being invalidated on qapp destruction Reviewed-by: jbache --- src/gui/image/qpixmap.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 20e4b50..fd2c139 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -1766,6 +1766,9 @@ QPixmap QPixmap::transformed(const QMatrix &matrix, Qt::TransformationMode mode) function returns the actual matrix used for transforming the pixmap. + \note When using the native X11 graphics system, the pixmap + becomes invalid when the QApplication instance is destroyed. + \sa QBitmap, QImage, QImageReader, QImageWriter */ -- cgit v0.12 From 5f9fdaa5c82fa4529ad4352da6855a19be83c079 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Mon, 7 Jun 2010 15:18:50 +0200 Subject: XQuery test suite (and others): remove p4 dependency --- tests/auto/xmlpatternsxqts/tst_suitetest.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/auto/xmlpatternsxqts/tst_suitetest.cpp b/tests/auto/xmlpatternsxqts/tst_suitetest.cpp index ec63858..6e10e3f 100644 --- a/tests/auto/xmlpatternsxqts/tst_suitetest.cpp +++ b/tests/auto/xmlpatternsxqts/tst_suitetest.cpp @@ -141,8 +141,6 @@ void tst_SuiteTest::checkTestSuiteResult() const /* Passed to ResultThreader so it knows what kind of file it is handling. */ ResultThreader::Type type = ResultThreader::Baseline; - QProcess::execute(QLatin1String("p4 edit ") + m_existingBaseline); - for(QFileInfoList::const_iterator it(list.constBegin()); it != end; ++it) { QFileInfo i(*it); @@ -167,8 +165,6 @@ void tst_SuiteTest::checkTestSuiteResult() const const int exitCode = eventLoop.exec(); - QProcess::execute(QLatin1String("p4 revert -a ") + m_existingBaseline); - QCOMPARE(exitCode, 0); } -- cgit v0.12 From 154bf4c4f58b3b4d012cd2ff57cd4709a2226464 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 7 Jun 2010 16:45:51 +0200 Subject: Fix incorrect \since tag Changed the since added in 51fa7df978d71a366c95c732d6a8c2576690d63a from 4.6 to 4.7 Pointed out by Thorbjoern :) Reviewed-by: Trust me --- src/gui/text/qtextoption.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp index a2b8022..527b603 100644 --- a/src/gui/text/qtextoption.cpp +++ b/src/gui/text/qtextoption.cpp @@ -393,7 +393,7 @@ QList QTextOption::tabs() const /*! \fn Tab::Tab(qreal pos, TabType tabType, QChar delim = QChar()) Creates a tab with the given position, tab type, and (for DelimiterTab) delimiter - \since 4.6 + \since 4.7 */ /*! -- cgit v0.12 From 83c6f16a17ff5ddee23e752e0eebc014bbc10f01 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 7 Jun 2010 15:47:48 +0200 Subject: qt_ja_JP.ts => qt_ja.ts the other _ja files have no country qualification either, and it makes no sense anyway. --- translations/qt_ja.ts | 8070 +++++++++++++++++++++++++++++++++++++++++ translations/qt_ja_JP.ts | 8070 ----------------------------------------- translations/translations.pri | 2 +- 3 files changed, 8071 insertions(+), 8071 deletions(-) create mode 100644 translations/qt_ja.ts delete mode 100644 translations/qt_ja_JP.ts diff --git a/translations/qt_ja.ts b/translations/qt_ja.ts new file mode 100644 index 0000000..e6f92b7 --- /dev/null +++ b/translations/qt_ja.ts @@ -0,0 +1,8070 @@ + + + + + MAC_APPLICATION_MENU + + + Services + サービス + + + + Hide %1 + %1を隠す + + + + Hide Others + ほかを隠す + + + + Show All + すべてを表示 + + + + Preferences... + 環境設定... + + + + Quit %1 + %1 を終了 + + + + About %1 + %1 について + + + + CloseButton + + + Close Tab + ToolTip + タブを閉じる + + + + PPDOptionsModel + + Name + 名前 + + + Value + + + + + Phonon:: + + + Notifications + 通知 + + + + Music + 音楽 + + + + Video + 動画 + + + + Communication + コミュニケーション + + + + Games + ゲーム + + + + Accessibility + アクセシビリティ + + + + Phonon::AudioOutput + + + <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> + <html>オーディオ再生デバイス<b>%1</b>が動作しません。<br/><b>%2</b>を使用します。</html> + + + + <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> + <html>より高いパフォーマンスを得られるオーディオデバイス <b>%1</b> が使用可能となったので、使用します。</html> + + + + Revert back to device '%1' + デバイス '%1' に戻す + + + + Phonon::Gstreamer::Backend + + + Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. + Some video features have been disabled. + 警告: gstreamer0.10-plugins-good がインストールされていません。幾つかの動画機能は使用できません。 + + + + Warning: You do not seem to have the base GStreamer plugins installed. + All audio and video support has been disabled + 警告: GStreamer plugin がインストールされていません。すべての音声、動画機能は使用できません + + + + Phonon::Gstreamer::MediaObject + + + Cannot start playback. + +Check your Gstreamer installation and make sure you +have libgstreamer-plugins-base installed. + 再生できません。 + +Gstreamer と libgstreamer-plugins-base が正しくインストールされているか確認してください。 + + + + A required codec is missing. You need to install the following codec(s) to play this content: %0 + 必要なコーデックがみつかりません。このコンテンツを再生するためには、以下のコーデックをインストールする必要があります: %0 + + + + + + + + + + + Could not open media source. + メディアソースを開くことができません。 + + + + Invalid source type. + 無効なソースの形式です。 + + + + Could not locate media source. + メディアソースがみつかりません。 + + + + Could not open audio device. The device is already in use. + オーディオデバイスを開くことができません。デバイスは既に他のプロセスにより使用されています。 + + + + Could not decode media source. + メディアソースを開くことができません。見つからないか、未知の形式です。 + + + + Phonon::VolumeSlider + + + + + + Volume: %1% + 音量: %1% + + + + + + Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% + スライダを用いて音量を指定してください。左端が0%、右端が%1%になります + + + + Muted + ミュート + + + + Q3Accel + + + %1, %2 not defined + %1, %2 は定義されていません + + + + Ambiguous %1 not handled + 曖昧な %1 は扱えません + + + + Q3DataTable + + + True + + + + + False + + + + + Insert + 挿入 + + + + Update + アップデート + + + + Delete + 削除 + + + + Q3FileDialog + + + All Files (*.*) + すべてのファイル(*.*) + + + + Open + オープン + + + + Select a Directory + ディレクトリを選択 + + + + Copy or Move a File + ファイルをコピーまたは移動 + + + + Read: %1 + 読み込み: %1 + + + + + Write: %1 + 書き込み: %1 + + + + + Cancel + キャンセル + + + + + + + All Files (*) + すべてのファイル(*) + + + + Name + 名前 + + + + Size + サイズ + + + + Type + タイプ + + + + Date + 日付 + + + + Attributes + 属性 + + + + + &OK + OK(&O) + + + + Look &in: + 検索する場所(&I): + + + + + + File &name: + ファイル名(&N): + + + + File &type: + ファイルタイプ(&T): + + + + Back + 戻る + + + + One directory up + 1つ上のディレクトリへ移動 + + + + Create New Folder + 新しいフォルダの作成 + + + + List View + 一覧表示 + + + + Detail View + 詳細表示 + + + + Preview File Info + ファイル情報のプレビュー + + + + Preview File Contents + ファイルの内容のプレビュー + + + + Read-write + 読み込み/書き込み + + + + Read-only + 読み込み専用 + + + + Write-only + 書き込み専用 + + + + Inaccessible + アクセス不可 + + + + Symlink to File + ファイルへのシンボリックリンク + + + + Symlink to Directory + ディレクトリへのシンボリックリンク + + + + Symlink to Special + スペシャルファイルへのシンボリックリンク + + + + File + ファイル + + + + Dir + ディレクトリ + + + + Special + スペシャル + + + + + + Open + オープン + + + + + Save As + 名前を付けて保存 + + + + + + &Open + オープン(&O) + + + + + &Save + 保存(&S) + + + + &Rename + 名前の変更(&R) + + + + &Delete + 削除(&D) + + + + R&eload + リロード(&E) + + + + Sort by &Name + 名前順にソート(&N) + + + + Sort by &Size + サイズ順にソート(&S) + + + + Sort by &Date + 日付順にソート(&D) + + + + &Unsorted + ソート解除(&U) + + + + Sort + ソート + + + + Show &hidden files + 隠しファイルの表示(&H) + + + + the file + ファイル + + + + the directory + ディレクトリ + + + + the symlink + シンボリックリンク + + + + Delete %1 + %1 の削除 + + + + <qt>Are you sure you wish to delete %1 "%2"?</qt> + <qt>%1 "%2" を削除しますか?</qt> + + + + &Yes + はい(&Y) + + + + &No + いいえ(&N) + + + + New Folder 1 + 新しいフォルダ1 + + + + New Folder + 新しいフォルダ + + + + New Folder %1 + 新しいフォルダ %1 + + + + Find Directory + ディレクトリの検索 + + + + + Directories + ディレクトリ + + + + Directory: + ディレクトリ: + + + + + Error + エラー + + + + %1 +File not found. +Check path and filename. + %1 +ファイルが見つかりませんでした。 +パスおよびファイル名を確認してください。 + + + + Q3LocalFs + + + + Could not read directory +%1 + ディレクトリを読み込めませんでした +%1 + + + + Could not create directory +%1 + ディレクトリを作成できませんでした +%1 + + + + Could not remove file or directory +%1 + ファイルまたはディレクトリを削除できませんでした +%1 + + + + Could not rename +%1 +to +%2 + 名前を変更できませんでした +%1 +を +%2 +へ + + + + Could not open +%1 + 開けませんでした +%1 + + + + Could not write +%1 + 書き込めませんでした +%1 + + + + Q3MainWindow + + + Line up + 整列 + + + + Customize... + カスタマイズ... + + + + Q3NetworkProtocol + + + Operation stopped by the user + 操作がユーザによって停止されました + + + + Q3ProgressDialog + + + + Cancel + キャンセル + + + + Q3TabDialog + + + + OK + OK + + + + Apply + 適用 + + + + Help + ヘルプ + + + + Defaults + デフォルト + + + + Cancel + キャンセル + + + + Q3TextEdit + + + &Undo + 元に戻す(&U) + + + + &Redo + やり直す(&R) + + + + Cu&t + 切り取り(&T) + + + + &Copy + コピー(&C) + + + + &Paste + 貼り付け(&P) + + + + Clear + 消去 + + + + + Select All + すべてを選択 + + + + Q3TitleBar + + + System + システム + + + + Restore up + 元に戻す + + + + Minimize + 最小化 + + + + Restore down + 元に戻す + + + + Maximize + 最大化 + + + + Close + 閉じる + + + + Contains commands to manipulate the window + ウィンドウを操作するコマンドを含みます + + + + Puts a minimized back to normal + 最小化されたウィンドウを元のサイズに戻します + + + + Moves the window out of the way + ウィンドウを隠します + + + + Puts a maximized window back to normal + 最大化されたウィンドウを元のサイズに戻します + + + + Makes the window full screen + ウィンドウをフルスクリーンにします + + + + Closes the window + ウィンドウを閉じます + + + + Displays the name of the window and contains controls to manipulate it + ウィンドウの名前と、ウィンドウを操作するコントロールを表示します + + + + Q3ToolBar + + + More... + その他... + + + + Q3UrlOperator + + + + + The protocol `%1' is not supported + プロトコル '%1' はサポートされていません + + + + The protocol `%1' does not support listing directories + プロトコル '%1' はディレクトリのリスティングをサポートしていません + + + + The protocol `%1' does not support creating new directories + プロトコル '%1' は新しいディレクトリの作成をサポートしていません + + + + The protocol `%1' does not support removing files or directories + プロトコル '%1' はファイルまたはディレクトリの削除をサポートしていません + + + + The protocol `%1' does not support renaming files or directories + プロトコル '%1' はファイルまたはディレクトリの名前の変更をサポートしていません + + + + The protocol `%1' does not support getting files + プロトコル '%1' はファイルの取得をサポートしていません + + + + The protocol `%1' does not support putting files + プロトコル '%1' はファイルの送信をサポートしていません + + + + + The protocol `%1' does not support copying or moving files or directories + プロトコル '%1' はファイルまたはディレクトリのコピーまたは移動をサポートしていません + + + + + (unknown) + (不明) + + + + Q3Wizard + + + &Cancel + キャンセル(&C) + + + + < &Back + < 戻る(&B) + + + + &Next > + 次へ(&N) > + + + + &Finish + 完了(&F) + + + + &Help + ヘルプ(&H) + + + + QAbstractSocket + + + + + + Host not found + ホストが見つかりませんでした + + + + + + Connection refused + 接続が拒否されました + + + + Connection timed out + 接続がタイムアウトしました + + + + + + Operation on socket is not supported + 抽象ソケットクラスでのソケットのエラー + このソケットへのこの操作はサポートされていません + + + + Socket operation timed out + ソケット操作がタイムアウトしました + + + + Socket is not connected + ソケットが接続されていません + + + + Network unreachable + ネットワークへ到達できません + + + + QAbstractSpinBox + + + &Step up + 上(&S) + + + + Step &down + 下(&D) + + + + &Select All + すべてを選択(&S) + + + + QApplication + + + Activate + アクティブに + + + + Activates the program's main window + メインウィンドウをアクティブにする + + + + Executable '%1' requires Qt %2, found Qt %3. + 実行可能ファイル '%1' には Qt %2 が必要です。Qt %3 が見つかりました。 + + + + Incompatible Qt Library Error + 互換性のないQtライブラリエラー + + + + QT_LAYOUT_DIRECTION + Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. + LTR + + + + QAxSelect + + + Select ActiveX Control + ActiveX Control を選択 + + + + OK + OK + + + + &Cancel + キャンセル(&C) + + + + COM &Object: + COM オブジェクト(&O): + + + + QCheckBox + + + Uncheck + 選択解除 + + + + Check + 選択 + + + + Toggle + 反転 + + + + QColorDialog + + + Hu&e: + 色相(&E): + + + + &Sat: + 彩度(&S): + + + + &Val: + 明度(&V): + + + + &Red: + 赤(&R): + + + + &Green: + 緑(&G): + + + + Bl&ue: + 青(&U): + + + + A&lpha channel: + アルファチャネル(&L): + + + + Select Color + + + + + &Basic colors + 基本的なカラー(&B) + + + + &Custom colors + カスタムカラー(&C) + + + &Define Custom Colors >> + カスタムカラーの定義(&D) >> + + + OK + OK + + + Cancel + キャンセル + + + + &Add to Custom Colors + カスタムカラーに追加(&A) + + + Select color + カラーの選択 + + + + QComboBox + + + + Open + オープン + + + + False + + + + + True + + + + + Close + 閉じる + + + + QCoreApplication + + + %1: key is empty + QSystemSemaphore + %1: キーが空です + + + + %1: unable to make key + QSystemSemaphore + %1: キーを作成できません + + + + %1: ftok failed + QSystemSemaphore + %1: fork に失敗しました + + + + QDB2Driver + + + Unable to connect + 接続できません + + + + Unable to commit transaction + トランザクションをコミットできません + + + + Unable to rollback transaction + トランザクションをロールバックできません + + + + Unable to set autocommit + オートコミットを設定できません + + + + QDB2Result + + + + Unable to execute statement + ステートメントを実行できません + + + + Unable to prepare statement + プリペアステートメントを使えません + + + + Unable to bind variable + 変数をバインドできません + + + + Unable to fetch record %1 + レコード %1 をフェッチできません + + + + Unable to fetch next + 次のレコードをフェッチできません + + + + Unable to fetch first + 最初のレコードをフェッチできません + + + + QDateTimeEdit + + + AM + AM + + + + am + am + + + + PM + PM + + + + pm + pm + + + + QDial + + + QDial + ダイヤル + + + + SpeedoMeter + スピードメータ + + + + SliderHandle + スライダハンドル + + + + QDialog + + + What's This? + ヒント? + + + + Done + 終了 + + + + QDialogButtonBox + + + + + OK + OK + + + + Cancel + キャンセル + + + + Apply + 適用 + + + + Ignore + 無視 + + + + Retry + 再試行 + + + + Abort + 中止 + + + + Help + ヘルプ + + + + Save + 保存 + + + + &Save + 保存(&S) + + + + Open + オープン + + + + &Cancel + キャンセル(&C) + + + + Close + 閉じる + + + + &Close + 閉じる(&C) + + + + Reset + リセット + + + + Don't Save + 保存しない + + + + Close without Saving + 保存せずに閉じる + + + + Discard + 変更を破棄 + + + + &Yes + はい(&Y) + + + + Yes to &All + 全てにはい(&A) + + + + &No + いいえ(&N) + + + + N&o to All + 全てにいいえ(&O) + + + + Save All + すべて保存 + + + + Restore Defaults + デフォルトに戻す + + + + &OK + OK(&O) + + + + QDirModel + + + Name + 名前 + + + + Size + サイズ + + + + Date Modified + 更新日 + + + + Kind + Match OS X Finder + 種類 + + + + Type + All other platforms + タイプ + + + + QDockWidget + + + Close + 閉じる + + + + Dock + ドック + + + + Float + フロート + + + + QDoubleSpinBox + + + More + 増やす + + + + Less + 減らす + + + + QErrorMessage + + + Debug Message: + デバッグメッセージ: + + + + Warning: + 警告: + + + + Fatal Error: + 致命的なエラー: + + + + &Show this message again + 次回もこのメッセージを表示する(&S) + + + + &OK + OK(&O) + + + + QFile + + + + Destination file exists + 新しい名前のファイルは既に存在します + + + + Cannot remove source file + 元のファイルを削除できません + + + + Cannot open %1 for input + コピー元ファイル %1 を読めません + + + + Cannot open for output + コピー先のファイルをオープンできません + + + + Failure to write block + 書き込みに失敗しました + + + + Cannot create %1 for output + コピー先として %1 を作成できません + + + + QFileDialog + + + + All Files (*) + すべてのファイル(*) + + + + Directories + ディレクトリ + + + + + Directory: + ディレクトリ: + + + + + File &name: + ファイル名(&N): + + + + + + + &Open + オープン(&O) + + + + + &Save + 保存(&S) + + + + Open + オープン + + + Save + 保存 + + + +File not found. +Please verify the correct file name was given + +ファイルが見つかりません。 +正しいファイル名が入力されたかどうか確認してください + + + + %1 already exists. +Do you want to replace it? + %1 はすでに存在します。 +置き換えますか? + + + + %1 +File not found. +Please verify the correct file name was given. + %1 +ファイルが見つかりません。 +正しいファイル名が入力されたかどうか確認してください。 + + + + My Computer + マイ コンピュータ + + + + + %1 +Directory not found. +Please verify the correct directory name was given. + %1 +ディレクトリが見つかりません。 +正しいディレクトリ名が入力されたかどうか確認してください。 + + + Sort + ソート + + + + &Rename + 名前の変更(&R) + + + + &Delete + 削除(&D) + + + &Reload + リロード(&R) + + + Sort by &Name + 名前順にソート(&N) + + + Sort by &Size + サイズ順にソート(&S) + + + Sort by &Date + 日付順にソート(&D) + + + &Unsorted + ソート解除(&U) + + + + Show &hidden files + 隠しファイルの表示(&H) + + + + + Back + 戻る + + + + + Parent Directory + 親ディレクトリ + + + + + Create New Folder + 新しいフォルダの作成 + + + + + List View + 一覧表示 + + + + + Detail View + 詳細表示 + + + + + Look in: + 検索する場所: + + + + + Files of type: + ファイルの種類: + + + + Drive + ドライブ + + + + + File + ファイル + + + + File Folder + Match Windows Explorer + ファイルフォルダ + + + + Folder + All other platforms + フォルダ + + + + Alias + Mac OS X Finder + エイリアス + + + + Shortcut + All other platforms + ショートカット + + + + Unknown + 不明 + + + + All Files (*.*) + すべてのファイル(*.*) + + + + Save As + 名前を付けて保存 + + + Open + オープン + + + Select a Directory + ディレクトリを選択 + + + + '%1' is write protected. +Do you want to delete it anyway? + '%1' は書き込みが禁止されています。 +本当に削除しますか? + + + + Are sure you want to delete '%1'? + '%1' を本当に削除しますか? + + + + Could not delete directory. + ディレクトリを削除できませんでした。 + + + + Find Directory + ディレクトリの検索 + + + + Show + 表示 + + + + &New Folder + 新しいフォルダ(&N) + + + + + &Choose + 選択(&C) + + + + New Folder + 新しいフォルダ + + + + Recent Places + 履歴 + + + + + Forward + 進む + + + + Remove + 削除 + + + + QFileSystemModel + + + Name + 名前 + + + + Size + サイズ + + + + Date Modified + 更新日 + + + + Kind + Match OS X Finder + 種類 + + + + Type + All other platforms + タイプ + + + + + %1 TB + %1 TB + + + + + %1 GB + %1 GB + + + + + %1 MB + %1 MB + + + + + %1 KB + %1 KB + + + + + %1 bytes + %1 バイト + + + + Invalid filename + 無効なファイル名 + + + + <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. + <b>ファイル名 "%1" は使用できません。</b><p>名前を短くしたり、アクセント記号などを削除して再度試してください。 + + + + My Computer + マイ コンピュータ + + + + Computer + コンピュータ + + + + QFontDatabase + + + + Normal + ここはどう訳すべきか... + 明朝 + + + + + + Bold + ゴシック + + + + + Demi Bold + Demi Bold + + + + + + Black + 太字 + + + + Demi + Demi + + + + + Light + 細字 + + + + + Italic + イタリック + + + + + Oblique + 斜体 + + + + Any + すべて + + + + Latin + ラテン + + + + Greek + ギリシャ + + + + Cyrillic + キリル + + + + Armenian + アルメニア + + + + Hebrew + ヘブライ + + + + Arabic + アラビア + + + + Syriac + シリア + + + + Thaana + ターナ + + + + Devanagari + デーヴァナーガリー + + + + Bengali + ベンガル + + + + Gurmukhi + グルムキー + + + + Gujarati + グジャラート + + + + Oriya + オリヤー + + + + Tamil + タミル + + + + Telugu + テルグ + + + + Kannada + カンナダ + + + + Malayalam + マラヤーラム + + + + Sinhala + シンハラ + + + + Thai + タイ + + + + Lao + ラーオ + + + + Tibetan + チベット + + + + Myanmar + ビルマ + + + + Georgian + グルジア + + + + Khmer + クメール + + + + Simplified Chinese + 簡体中国 + + + + Traditional Chinese + 繁体中国 + + + + Japanese + 日本 + + + + Korean + ハングル + + + + Vietnamese + ベトナム + + + + Symbol + 記号 + + + + Ogham + オガム + + + + Runic + ルーン + + + + QFontDialog + + + &Font + フォント(&F) + + + + Font st&yle + フォントスタイル(&Y) + + + + &Size + サイズ(&S) + + + + Effects + 文字飾り + + + + Stri&keout + 取り消し線(&K) + + + + &Underline + 下線(&U) + + + + Sample + サンプル + + + + Wr&iting System + 言語(&I) + + + + + Select Font + フォントの選択 + + + + QFtp + + + + Not connected + 未接続です + + + + + Host %1 not found + ホスト %1 が見つかりませんでした + + + + + Connection refused to host %1 + ホスト %1 への接続が拒否されました + + + + Connection timed out to host %1 + ホスト %1 への接続がタイムアウトしました + + + + + + Connected to host %1 + ホスト %1 に接続しました + + + + + Connection refused for data connection + データ接続のための接続が拒否されました + + + + + + + Unknown error + 不明なエラー + + + + + Connecting to host failed: +%1 + ホストへの接続に失敗しました: +%1 + + + + + Login failed: +%1 + ログインに失敗しました: +%1 + + + + + Listing directory failed: +%1 + ディレクトリのリストに失敗しました: +%1 + + + + + Changing directory failed: +%1 + ディレクトリの変更に失敗しました: +%1 + + + + + Downloading file failed: +%1 + ファイルのダウンロードに失敗しました: +%1 + + + + + Uploading file failed: +%1 + ファイルのアップロードに失敗しました: +%1 + + + + + Removing file failed: +%1 + ファイルの削除に失敗しました: +%1 + + + + + Creating directory failed: +%1 + ディレクトリの作成に失敗しました: +%1 + + + + + Removing directory failed: +%1 + ディレクトリの削除に失敗しました: +%1 + + + + + + Connection closed + 接続が閉じられました + + + + Host %1 found + ホスト %1 が見つかりました + + + + Connection to %1 closed + %1 への接続が閉じられました + + + + Host found + ホストが見つかりました + + + + Connected to host + ホストに接続しました + + + + QHostInfo + + + Unknown error + 不明なエラー + + + + QHostInfoAgent + + + + + + + + + + Host not found + ホストが見つかりません + + + + + + + Unknown address type + 不明なアドレス型です + + + + + + Unknown error + 不明なエラー + + + + QHttp + + + HTTPS connection requested but SSL support not compiled in + HTTPSによる接続が要求されましたが、SSLのサポートがコンパイル時に組み込まれていないため、接続できません + + + + + + + Unknown error + 不明なエラー + + + + + Request aborted + 要求が中止されました + + + + + No server set to connect to + 接続が設定されているサーバがありません + + + + + Wrong content length + コンテンツの長さが正しくありません + + + + + Server closed connection unexpectedly + サーバの接続が予期せず閉じられました + + + + Unknown authentication method + 非対応の認証方法が要求されました + + + + Error writing response to device + デバイスへの書き込み時にエラーが発生しました + + + + + Connection refused + 接続が拒否されました + + + + + + Host %1 not found + ホスト %1 が見つかりませんでした + + + + + + + HTTP request failed + HTTP要求に失敗しました + + + + + Invalid HTTP response header + 無効なHTTP応答ヘッダです + + + + + + + Invalid HTTP chunked body + 無効なHTTPチャンクドボディです + + + + Host %1 found + ホスト %1 が見つかりました + + + + Connected to host %1 + ホスト %1 に接続しました + + + + Connection to %1 closed + %1 への接続が閉じられました + + + + Host found + ホストが見つかりました + + + + Connected to host + ホストに接続しました + + + + + Connection closed + 接続が閉じられました + + + + Proxy authentication required + プロキシーの認証が必要です + + + + Authentication required + 認証が必要です + + + + Connection refused (or timed out) + 接続が拒否されたか、タイムアウトしました + + + + Proxy requires authentication + プロキシーの認証が必要です + + + + Host requires authentication + ホストの認証が必要です + + + + Data corrupted + データが破損しています + + + + Unknown protocol specified + 未対応のプロトコルです + + + + SSL handshake failed + SSLのハンドシェークに失敗しました + + + + QHttpSocketEngine + + + Did not receive HTTP response from proxy + プロキシーからHTTPレスポンスを受信できませんでした + + + + Error parsing authentication request from proxy + プロキシーからの認証要求のパースに失敗しました + + + + Authentication required + 認証が必要です + + + + Proxy denied connection + プロキシーが接続を拒否しました + + + + Error communicating with HTTP proxy + HTTP プロキシーとの通信にて、エラーが発生しました + + + + Proxy server not found + プロキシーサーバが見つかりません + + + + Proxy connection refused + プロキシーが接続を拒否しました + + + + Proxy server connection timed out + プロキシーとの接続がタイムアウトしました + + + + Proxy connection closed prematurely + プロキシーの接続が通信の終了前に切断されました + + + + QIBaseDriver + + + Error opening database + データベースのオープンでエラーが発生しました + + + + Could not start transaction + トランザクションを開始できませんでした + + + + Unable to commit transaction + トランザクションをコミットできません + + + + Unable to rollback transaction + トランザクションをロールバックできません + + + + QIBaseResult + + + Unable to create BLOB + バイナリラージオブジェクトを作成できません + + + + Unable to write BLOB + バイナリラージオブジェクトを書き込めません + + + + Unable to open BLOB + バイナリラージオブジェクトをオープンできません + + + + Unable to read BLOB + バイナリラージオブジェクトを読み込めません + + + + + Could not find array + 配列が見つかりませんでした + + + + Could not get array data + 配列データを取得できませんでした + + + + Could not get query info + クエリー情報を取得できませんでした + + + + Could not start transaction + トランザクションを開始できませんでした + + + + Unable to commit transaction + トランザクションをコミットできません + + + + Could not allocate statement + ステートメントの領域を確保できませんでした + + + + Could not prepare statement + プリペアステートメントを使えませんでした + + + + + Could not describe input statement + INPUT ステートメントの情報を取得できませんでした + + + + Could not describe statement + ステートメントの情報を取得できませんでした + + + + Unable to close statement + ステートメントをクローズできません + + + + Unable to execute query + クエリーを実行できません + + + + Could not fetch next item + 次のレコードをフェッチできませんでした + + + + Could not get statement info + ステートメントの情報を取得できませんでした + + + + QIODevice + + + Permission denied + 許可されていません + + + + Too many open files + 開かれたファイルが多すぎます + + + + No such file or directory + そのようなファイルやディレクトリはありません + + + + No space left on device + デバイスの残り容量がありません + + + + Unknown error + 不明なエラー + + + + QInputContext + + + XIM + XIM + + + + XIM input method + XIM 入力メソッド + + + + Windows input method + Windows 入力メソッド + + + + Mac OS X input method + Mac OS X 入力メソッド + + + + QInputDialog + + + Enter a value: + 数値を入力: + + + + QLibrary + + + Could not mmap '%1': %2 + '%1' をメモリにマッピングできませんでした: %2 + + + + Plugin verification data mismatch in '%1' + '%1' でプラグイン検証データが一致しません + + + + Could not unmap '%1': %2 + '%1' のマッピングを解除できませんでした: %2 + + + + The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] + プラグイン '%1' は、互換性のない Qt ライブラリを使用しています。(%2.%3.%4) [%5] + + + + The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" + プラグイン '%1' は、互換性のない Qt ライブラリを使用しています。ビルドキー "%2" が必要ですが、"%3" しかありません + + + + Unknown error + 不明なエラー + + + QLibrary::load_sys: Cannot load %1 (%2) + QLibrary::load_sys: %1 をロードできません (%2) + + + QLibrary::unload_sys: Cannot unload %1 (%2) + QLibrary::unload_sys: %1 をアンロードできません (%2) + + + QLibrary::resolve_sys: Symbol "%1" undefined in %2 (%3) + QLibrary::resolve_sys: シンボル "%1" は %2 で定義されていません (%3) + + + + + The shared library was not found. + 共有ライブラリがみつかりません。 + + + + The file '%1' is not a valid Qt plugin. + ファイル '%1' は Qt プラグインではありません。 + + + + The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) + プラグイン '%1' はこの Qt と互換性のないライブラリを使用しています。 (デバック版とリリース版のライブラリを同時に使用することはできません) + + + + + Cannot load library %1: %2 + ライブラリ '%1' を読み込むことができません: %2 + + + + + Cannot unload library %1: %2 + ライブラリ %1 を解放することができません: %2 + + + + + Cannot resolve symbol "%1" in %2: %3 + '%2'に含まれる識別子 "%1" を解決できません: %3 + + + + QLineEdit + + + &Undo + 元に戻す(&U) + + + + &Redo + やり直す(&R) + + + + Cu&t + 切り取り(&T) + + + + &Copy + コピー(&C) + + + + &Paste + 貼り付け(&P) + + + + Delete + 削除 + + + + Select All + すべてを選択 + + + + QLocalServer + + + + %1: Name error + %1: 名前の解決に失敗 + + + + %1: Permission denied + %1: 許可されていません + + + + %1: Address in use + %1: アドレスは既に使用されています + + + + %1: Unknown error %2 + %1: 未知のエラー %2 + + + + QLocalSocket + + + + %1: Connection refused + %1: 接続が拒否されました + + + + + %1: Remote closed + %1: リモートにより接続が閉じられました + + + + + + + %1: Invalid name + %1: 無効な名前です + + + + + %1: Socket access error + %1: ソケットアクセスのエラーです + + + + + %1: Socket resource error + %1: ソケットリソースのエラーです + + + + + %1: Socket operation timed out + %1: ソケット操作がタイムアウトしました + + + + + %1: Datagram too large + %1: データグラムが大きすぎます + + + + + + %1: Connection error + %1: 接続のエラーが発生しました + + + + + %1: The socket operation is not supported + %1: そのソケット操作はサポートされていません + + + + %1: Unknown error + %1: 未知のエラーです + + + + + %1: Unknown error %2 + %1: 未知のエラー %2 + + + + QMYSQLDriver + + + Unable to open database ' + データベースをオープンできません ' + + + + Unable to connect + 接続できません + + + + Unable to begin transaction + トランザクションを開始できません + + + + Unable to commit transaction + トランザクションをコミットできません + + + + Unable to rollback transaction + トランザクションをロールバックできません + + + + QMYSQLResult + + + Unable to fetch data + データをフェッチできません + + + + Unable to execute query + クエリーを実行できません + + + + Unable to store result + 実行結果を記録できません + + + + + Unable to prepare statement + プリペアステートメントを使えません + + + + Unable to reset statement + ステートメントをリセットできません + + + + Unable to bind value + 値をバインドできません + + + + Unable to execute statement + ステートメントを実行できません + + + + + Unable to bind outvalues + 出力値をバインドできません + + + + Unable to store statement results + ステートメントの実行結果を記録できません + + + + Unable to execute next query + 次のクエリーを実行できません + + + + Unable to store next result + 次の結果を記録できません + + + + QMdiArea + + + (Untitled) + (タイトルなし) + + + + QMdiSubWindow + + + %1 - [%2] + %1 - [%2] + + + + Close + 閉じる + + + + Minimize + 最小化 + + + + Restore Down + 元に戻す + + + + &Restore + 元に戻す(&R) + + + + &Move + 移動(&M) + + + + &Size + サイズ(&S) + + + + Mi&nimize + 最小化(&N) + + + + Ma&ximize + 最大化(&X) + + + + Stay on &Top + 常に手前に表示(&T) + + + + &Close + 閉じる(&C) + + + + - [%1] + - [%1] + + + + Maximize + 最大化 + + + + Unshade + たぶん選択・非選択状態のウィンドウのことだと思うけど。fvwmなどのx11で使われている用語 + 非選択 + + + + Shade + 選択 + + + + Restore + 元に戻す + + + + Help + ヘルプ + + + + Menu + メニュー + + + + QMenu + + + + Close + 閉じる + + + + + Open + オープン + + + + + + Execute + 実行 + + + + QMenuBar + + About Qt + Qt について + + + + QMessageBox + + + Help + ヘルプ + + + + + + + OK + OK + + + <h3>About Qt</h3>%1<p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qtopia Core.</p><p>Qt is a Trolltech product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p> + <h3>Qt について</h3>%1 +<p>QtはクロスプラットフォームのC++ アプリケーション開発ツールキットです。</p> +<p>Qt は MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, 商用のUnix派生版でソースコード互換を実現します。また、Qtopia Coreのように、内蔵デバイスでも利用可能です。</p> +<p>QtはTrolltechの商品です。詳細は<tt>http://qt.nokia.com/</tt>を参照してください。</p> + + + <p>This program uses Qt version %1.</p> + <p>このプログラムは Qt バージョン %1 を使用しています。</p> + + + <p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://qt.nokia.com/company/model/">qt.nokia.com/company/model/</a> for an overview of Qt licensing.</p> + <p>このプログラムは Qt オープンソース版バージョン %1 を使用しています。</p> +<p>Qt オープンソース版はオープンソースのアプリケーションの開発用です。ソースコードを公開しない商用アプリケーションを開発するには商用版のライセンスが必要です。</p><p>Qtのライセンスについては<tt>http://qt.nokia.com/company/model.html</tt>を参照してください。</p> + + + + About Qt + Qt について + + + + Show Details... + 詳細を表示... + + + + Hide Details... + 詳細を隠す... + + + + <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p> + <h3>Qtについて</h3> +<p>このプログラムは Qt バージョン %1 を使用しています。</p> +<p>Qt は、クロスプラットホームのアプリケーション開発に使用される C++ のツールキットです。</p> +<p>Qt は、 MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, そして多数の Unix 系OS環境に対して、単一のソースからバイナリを生成します。 +また、 Linux および Windows CE を元とした組み込み環境にも対応しています。</p> +<p>Qt は様々なユーザの要望に応じるために、3つの異なるライセンスで提供されています。</p> +<p> +Qt 商用ライセンスは、プロプライエタリまたは商用ソフトウェアに適用できます。 +この場合は、他者とのソースコードの共有を拒否し、 GNU LGP バージョン 2.1 または GNU GPL バージョン 3.0 を許容できないソフトウェアにおいて Qt を使用できます。 +</p> +<p> +Qt GNU LGPL バージョン 2.1 ライセンスは、プロプライエタリまたはオープンソースソフトウェアに適用できます。 +この場合は、 GNU LGPL バージョン 2.1 に従う必要があります。 +</p> +<p> +Qt GNU General Public License バージョン 3.0 ライセンスは、GNU GPL バージョン 3.0 または GPL 3.0 と互換性のあるライセンスを採用しているソフトウェアに適用されます。 +この場合は、GNU GPL バージョン 3.0 に従う必要があります。 +</p> +<p> +ライセンスの詳細については、<a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> +を参照してください。</p> +<p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p> +<p>Qt は Nokia の製品です。詳細については<a href="http://qt.nokia.com/">qt.nokia.com</a> を参照してください。</p> +<p> +訳注: ライセンスはここにある翻訳は参考のためのものであり、オリジナルの(英語の)ものが正式なものとなります。 +</p> + + + + QMultiInputContext + + + Select IM + インプットメソッドを選択 + + + + QMultiInputContextPlugin + + + Multiple input method switcher + 複数のインプットメソッドを切り替え + + + + Multiple input method switcher that uses the context menu of the text widgets + テキストウィジェットのコンテキストメニューを使った複数のインプットメソッドの切り替えです + + + + QNativeSocketEngine + + + Unable to initialize non-blocking socket + 非ブロック型ソケットを初期化できません + + + + Unable to initialize broadcast socket + ブロードキャストソケットを初期化できません + + + + Attempt to use IPv6 socket on a platform with no IPv6 support + IPv6 がサポートされていないプラットフォームで IPv6 ソケットを使用しようとしています + + + + The remote host closed the connection + リモートホストは接続を閉じました + + + + Network operation timed out + ネットワーク操作がタイムアウトしました + + + + Out of resources + リソースが足りません + + + + Unsupported socket operation + サポートされていないソケット操作です + + + + Protocol type not supported + プロトコル型がサポートされていません + + + + Invalid socket descriptor + 無効なソケット記述子です + + + + Host unreachable + ホストへ到達できません + + + + Network unreachable + ネットワークへ到達できません + + + + Permission denied + 許可されていません + + + + Connection timed out + 接続がタイムアウトしました + + + + Connection refused + 接続を拒否されました + + + + The bound address is already in use + バインドアドレスは既に使われています + + + + The address is not available + そのアドレスは使用できません + + + + The address is protected + そのアドレスへのアクセス権がありません + + + + Datagram was too large to send + データグラムが大き過ぎて送信できませんでした + + + + Unable to send a message + メッセージを送信できません + + + + Unable to receive a message + メッセージを受信できません + + + + Unable to write + 書き込みができません + + + + Network error + ネットワークエラー + + + + Another socket is already listening on the same port + 別のソケットが同じポートで既に待ち受けています + + + + Operation on non-socket + 非ソケットに対する操作です + + + + Unknown error + 不明なエラー + + + + The proxy type is invalid for this operation + このプロキシーは、この操作に対応していません + + + + QNetworkAccessCacheBackend + + + Error opening %1 + オープンのエラー %1 + + + + QNetworkAccessDebugPipeBackend + + + Write error writing to %1: %2 + %1 への書き込み時にエラーが発生しました: %2 + + + + QNetworkAccessFileBackend + + + Request for opening non-local file %1 + 非ローカルファイル %1 をオープンするよう要求されましたが、ローカルファイルのみオープンできます + + + + Error opening %1: %2 + %1 をオープンする時にエラーが発生しました: %2 + + + + Write error writing to %1: %2 + %1 への書き込み時にエラーが発生しました: %2 + + + + Cannot open %1: Path is a directory + %1 をオープンできません。指定されたパスはディレクトリです + + + + Read error reading from %1: %2 + %1 を読み込み時にエラーが発生しました: %2 + + + + QNetworkAccessFtpBackend + + + No suitable proxy found + 適切なプロキシーがみつかりません + + + + Cannot open %1: is a directory + %1 をオープンできません。指定されたパスはディレクトリです + + + + Logging in to %1 failed: authentication required + %1 へのログインに失敗しました。認証が必要です + + + + Error while downloading %1: %2 + %1 をダウンロード中にエラーが発生しました: %2 + + + + Error while uploading %1: %2 + %1 をアップロード中にエラーが発生しました: %2 + + + + QNetworkAccessHttpBackend + + + No suitable proxy found + 適切なプロキシーがみつかりません + + + + QNetworkReply + + + Error downloading %1 - server replied: %2 + %1 をダウンロード中にエラーが発生しました。サーバの返答: %2 + + + + Protocol "%1" is unknown + プロトコル "%1" はサポートされていません + + + + QNetworkReplyImpl + + + + Operation canceled + 操作はキャンセルされました + + + + QOCIDriver + + + Unable to initialize + QOCIDriver + 初期化できません + + + + Unable to logon + ログオンできません + + + + Unable to begin transaction + トランザクションを開始できません + + + + Unable to commit transaction + トランザクションをコミットできません + + + + Unable to rollback transaction + トランザクションをロールバックできません + + + + QOCIResult + + + + + Unable to bind column for batch execute + バッチ処理用にフィールドをバインドできません + + + + Unable to execute batch statement + バッチステートメントを実行できません + + + + Unable to goto next + 次のレコードへ進めません + + + + Unable to alloc statement + ステートメントの領域を確保できません + + + + Unable to prepare statement + プリペアステートメントを使えません + + + + Unable to bind value + 値をバインドできません + + + Unable to execute select statement + SELECT ステートメントを実行できません + + + + Unable to execute statement + ステートメントを実行できません + + + + QODBCDriver + + + Unable to connect + 接続できません + + + + Unable to connect - Driver doesn't support all needed functionality + 接続できません - ドライバは全ての必要な機能をサポートしていません + + + + Unable to disable autocommit + オートコミットを無効にできません + + + + Unable to commit transaction + トランザクションをコミットできません + + + + Unable to rollback transaction + トランザクションをロールバックできません + + + + Unable to enable autocommit + オートコミットを有効にできません + + + + QODBCResult + + + + Unable to execute statement + ステートメントを実行できません + + + + Unable to fetch next + 次のレコードをフェッチできません + + + + Unable to prepare statement + プリペアステートメントを使えません + + + + Unable to bind variable + 変数をバインドできません + + + + + QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration + QODBCResult::reset: ステートメントの属性として 'SQL_CURSOR_STATUS' を設定できません。ODBC ドライバの構成をチェックしてください + + + + + + Unable to fetch last + リストを取得できません + + + + Unable to fetch + フェッチできません + + + + Unable to fetch first + 最初のレコードをフェッチできません + + + + Unable to fetch previous + 前のレコードをフェッチできません + + + + QObject + + False + False + + + True + True + + + + Home + ホーム + + + + Operation not supported on %1 + %1 ではこの操作はサポートされていません + + + + Invalid URI: %1 + 無効なURIです: %1 + + + + Socket error on %1: %2 + %1 のソケットにおいてエラーが発生しました: %2 + + + + Remote host closed the connection prematurely on %1 + リモートホスト %1 との接続が通信の終了前に切断されました + + + + + No host name given + ホストネームが与えられていません + + + + QPPDOptionsModel + + + Name + 名前 + + + + Value + + + + + QPSQLDriver + + + Unable to connect + 接続できません + + + + Could not begin transaction + トランザクションを開始できませんでした + + + + Could not commit transaction + トランザクションをコミットできませんでした + + + + Could not rollback transaction + トランザクションをロールバックできませんでした + + + + Unable to subscribe + subscribe できません + + + + Unable to unsubscribe + unsubscribe できません + + + + QPSQLResult + + + Unable to create query + クエリーを作成できません + + + + Unable to prepare statement + プリペアステートメントを使えません + + + + QPageSetupWidget + + + Centimeters (cm) + センチメートル (cm) + + + + Millimeters (mm) + ミリメートル (mm) + + + + Inches (in) + インチ (in) + + + + Points (pt) + ポイント (pt) + + + + Form + 書式設定 + + + + Paper + 用紙 + + + + Page size: + ページサイズ: + + + + Width: + 幅: + + + + Height: + 高さ: + + + + Paper source: + 給紙装置: + + + + Orientation + 印刷方向 + + + + Portrait + 縦 (ポートレート) + + + + Landscape + 横 (ランドスケープ) + + + + Reverse landscape + 横 反転 (リバースランドスケープ) + + + + Reverse portrait + 縦 反転 (リバースポートレート) + + + + Margins + 余白 + + + + top margin + 上端余白 + + + + left margin + 左端余白 + + + + right margin + 右端余白 + + + + bottom margin + 下端余白 + + + + QPatternist::QtXmlPatterns + + + An %1-attribute with value %2 has already been declared. + 属性 %1 の値 %2 は既に宣言されています。 + + + + An %1-attribute must have a valid %2 as value, which %3 isn't. + 属性 %1 の値は %2 の型でなければなりませんが、 %3 が指定されました。 + + + + %1 is an unsupported encoding. + %1 はサポートされていないエンコーディングです。 + + + + %1 contains octets which are disallowed in the requested encoding %2. + エンコーディング %2 では許可されていないオクテットが %1 に含まれています。 + + + + The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. + %2 で使用されているエンコード %3 では、コードポイント %1 は有効な XML 表現ではありません。 + + + + Network timeout. + ネットワーク接続がタイムアウトしました。 + + + + Element %1 can't be serialized because it appears outside the document element. + エレメント %1 はシリアライズできません。このドキュメントの範囲を越えるエレメントを含んでいます。 + + + + Attribute %1 can't be serialized because it appears at the top level. + 属性 %1 はシリアライズできません。トップレベルに現れているためです。 + + + + Year %1 is invalid because it begins with %2. + %1 年はむこうです。%2 で始まっています。 + + + + Day %1 is outside the range %2..%3. + %1 日は、有効な範囲 %2..%3 を逸脱しています。 + + + + Month %1 is outside the range %2..%3. + %1 月は、有効な範囲 %2..%3 を逸脱しています。 + + + + Overflow: Can't represent date %1. + オーバーフロー: 日付 %1 を再現できません。 + + + + Day %1 is invalid for month %2. + %2 月には、%1 日は存在しません。 + + + + Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; + 24:%1:%2.%3 は無効です。24時0分0秒のみ使用できます + + + + Time %1:%2:%3.%4 is invalid. + 時刻 %1時%2分%3.%4秒は無効です。 + + + + Overflow: Date can't be represented. + オーバーフロー: 日付を再現できません。 + + + + + At least one component must be present. + 年、月、日のうちいずれかを指定しなければなりません。 + + + + At least one time component must appear after the %1-delimiter. + %1 の後には、時刻を指定しなければなりません。 + + + + No operand in an integer division, %1, can be %2. + ゼロ除算? NaN? + 整数の除算のためのオペランドが不足しています。%1 は %2 でなければなりません。 + + + + The first operand in an integer division, %1, cannot be infinity (%2). + 整数の除算における最初のオペランド %1 を認識できません (%2)。 + + + + The second operand in a division, %1, cannot be zero (%2). + 整数の除算における二つ目のオペランド %1 はゼロであってはいけまん(%2)。 + + + + %1 is not a valid value of type %2. + %1 は、%2 の型に対して有効な値ではありません。 + + + + When casting to %1 from %2, the source value cannot be %3. + %2 から %1 への型変換に際しては、値 %3 は有効な値ではありません。 + + + + Integer division (%1) by zero (%2) is undefined. + 整数の除算において %1 をゼロ (%2) で割った結果は定義されていません。 + + + + Division (%1) by zero (%2) is undefined. + 除算において %1 をゼロ (%2) で割った結果は定義されていません。 + + + + Modulus division (%1) by zero (%2) is undefined. + 剰余を求めるに際し、%1 をゼロ (%2) で除した結果は定義されていません。 + + + + + Dividing a value of type %1 by %2 (not-a-number) is not allowed. + 型 %1 を非数 %2 (NaN) で除すことはできません。 + + + + Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. + 型 %1 を%2 または %3 (正または負のゼロ) で除することはできません。 + + + + Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. + 型 %1 を %2 または %3 (正または負のゼロ)で乗ずることはできません。 + + + + A value of type %1 cannot have an Effective Boolean Value. + 型 %1 は有効な論理型(bool)ではありません。 + + + + Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. + ?? + 論理型は、論理型以外の複数の値からなる計算によって求めることはできません。 + + + + Value %1 of type %2 exceeds maximum (%3). + 型 %2 の値 %1 は、上限 (%3) を越えています。 + + + + Value %1 of type %2 is below minimum (%3). + 型 %2 の値 %1 は、下限 (%3) を越えています。 + + + + A value of type %1 must contain an even number of digits. The value %2 does not. + 型 %1 の値は偶数個の十進数文字を必要とします。しかし、%2 はそうではありません。 + + + + %1 is not valid as a value of type %2. + 型 %2 に対して、値 %1 は有効ではありません。 + + + + Ambiguous rule match. + 曖昧なルールにマッチしました。 + + + + Operator %1 cannot be used on type %2. + 型 %2 に対して、オペレータ %1 は使用できません。 + + + + Operator %1 cannot be used on atomic values of type %2 and %3. + アトミックな型 %2 と %3 に対して、オペレータ %1 は使用できません。 + + + + The namespace URI in the name for a computed attribute cannot be %1. + computed attrib. ってなんてやくすのが適当かな。 + 結合された属性に対する名前空間のURIとして、%1 を使用することはできません。 + + + + The name for a computed attribute cannot have the namespace URI %1 with the local name %2. + 結合された属性の名前空間URI %1 は、ローカルな名前である %2 と併用できません。 + + + + Type error in cast, expected %1, received %2. + 型変換時のエラーです。望んでいた %1 ではなく、%2 になりました。 + + + + When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. + %1 またはそれを継承している型への型変換においては、元の値の型は同じ型か、リテラルな文字列である必要があります。型 %2 は許可されていません。 + + + + No casting is possible with %1 as the target type. + 目標とする型に %1 を型変換することはできません。 + + + + It is not possible to cast from %1 to %2. + 型 %1 を型 %2 に型変換することはできません。 + + + + Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated. + 型 %1 への型変換はできません。抽象型であり、インスタンス化することができないからです。 + + + + It's not possible to cast the value %1 of type %2 to %3 + 型 %2 の値 %1 を、型 %3 に型変換することはできません + + + + Failure when casting from %1 to %2: %3 + %1 を %2 に型変換することができません: %3 + + + + A comment cannot contain %1 + コメントが %1 を含むことはできません + + + + A comment cannot end with a %1. + コメントは %1 で終了することはできません。 + + + + No comparisons can be done involving the type %1. + 型 %1 に対して比較を行うことはできません。 + + + + Operator %1 is not available between atomic values of type %2 and %3. + オペレータ %1 は、アトミックな型である %2 と %3 には適用できません。 + + + + In a namespace constructor, the value for a namespace cannot be an empty string. + 名前空間のスントラクトにおいて、空白の文字列を名前空間の値として使用することはできません。 + + + + The prefix must be a valid %1, which %2 is not. + プレフィックスは %1 でなければなりません。%2 は無効です。 + + + + The prefix %1 cannot be bound. + プレフィックス %1 はバウンドできません。 + + + + Only the prefix %1 can be bound to %2 and vice versa. + プレフィックス %1 は、%2 にのみバウンドできます。逆も同じです。 + + + + An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. + ドキュメントノードの子として属性ノードを指定することはできません。属性 %1 は誤った場所にあります。 + + + + Circularity detected + 循環を検出しました + + + + A library module cannot be evaluated directly. It must be imported from a main module. + ライブラリモジュールを直接評価することはできません。メインモジュールからインポートする必要があります。 + + + + No template by name %1 exists. + テンプレート名 %1 は存在しません。 + + + + A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. + 型 %1 は述部として使用できません。数値型か、論理型である必要があります。 + + + + A positional predicate must evaluate to a single numeric value. + positional? + 述部は評価されたとき、単一の数値になるようにしなければなりません。 + + + + The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid. + ターゲットとしている名前は、%1 であってはなりません。%2 は無効です。 + + + + %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. + %1 はターゲットとして無効です。%2 である必要があります。例えば "%3" のようにです。 + + + + The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. + バスの末端であるリーフは、単一のノードかアトミックな値である必要があります。複数の型の組み合わせであってはいけません。 + + + + The data of a processing instruction cannot contain the string %1 + 処理中のデータは、以下の文字列を含んでいてはなりません: %1 + + + + No namespace binding exists for the prefix %1 + プレフィックス %1 にバインドされたネームスペースがありません + + + + No namespace binding exists for the prefix %1 in %2 + %2 におけるプレフィックス %1 にバインディングされたネームスペースが存在しません + + + + + %1 is an invalid %2 + 型 %2 に対し、値 %1 は無効です + + + + The parameter %1 is passed, but no corresponding %2 exists. + パラメータ %1 を処理しました。しかし、対応する %2 が存在しません。 + + + + The parameter %1 is required, but no corresponding %2 is supplied. + パメータ %1 が必要です。しかし、対応する %2 がありません。 + + + + %1 takes at most %n argument(s). %2 is therefore invalid. + + %1 は、最大で %n 個の引数をとることができます。%2 は無効です。 + + + + + %1 requires at least %n argument(s). %2 is therefore invalid. + + %1 は、少くとも %n 個の引数を必要とします。%2 は無効です。 + + + + + The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. + %1 への最初の引数は、型 %2 であってはなりません。数値型、xs:yerMonthDuration、xs:dayTimeDurationである必要があります。 + + + + The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + %1 への最初の引数は、型 %2 であってはなりません。%3, %4, %5 のいずれかである必要があります。 + + + + The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. + %1 への二つ目の引数は、型 %2 であってはなりません。%3, %4, %5 のいずれかである必要があります。 + + + + %1 is not a valid XML 1.0 character. + %1 は XML 1.0 において有効な文字ではありません。 + + + + The first argument to %1 cannot be of type %2. + %1 への最初の引数は、型 %2 であってはなりません。 + + + + The root node of the second argument to function %1 must be a document node. %2 is not a document node. + %1 への二つ目の引数のルートノードは、ドキュメントノードでなければなりません。しかし、%2 はドキュメントノードではありません。 + + + + If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. + ゾーンオフセットってなに? xmlにそんなのあったっけ? + もし二つの値がゾーンオフセットをもつ場合、両者は同じゾーンオフセットでなければなりません。%1 と %2 は同一ではありません。 + + + + %1 was called. + %1 が呼ばれました。 + + + + %1 must be followed by %2 or %3, not at the end of the replacement string. + %1 の後には、%2 か %3 が続かなければなりません。 + + + + In the replacement string, %1 must be followed by at least one digit when not escaped. + 置換操作において、%1 には少くとも一文字以上の数値が続く必要があります(エスケープされている場合を除く)。 + + + + In the replacement string, %1 can only be used to escape itself or %2, not %3 + 置換操作において、%1 はそれ自身または %2 をエスケープする為にのみ使用できます。%3 に対しては使用できません + + + + %1 matches newline characters + %1 は改行文字(列)にマッチしました + + + + %1 and %2 match the start and end of a line. + %1 と %2 は、行の先頭と末尾にマッチしました。 + + + + Matches are case insensitive + マッチは大文字小文字を区別しません + + + + Whitespace characters are removed, except when they appear in character classes + CDATA? + 空白文字は削除されました。ただし、キャラクタークラスに属するものは除きます + + + + %1 is an invalid regular expression pattern: %2 + %1 は有効な正規表現ではありません。: %2 + + + + %1 is an invalid flag for regular expressions. Valid flags are: + %1 は正規表現において無効なフラグです。使用可能なフラグは次の通りです: + + + + If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. + もし、最初の引数が空白からなる文字列か、長さが0 (名前空間をともなわない)である場合、プレフィックスを指定することはできません。しかし、プレフィックスとして %1 が指定されています。 + + + + It will not be possible to retrieve %1. + %1 を取得することはできないかもしれません。 + + + + The default collection is undefined + デフォルトのコレクションが定義されていません + + + + %1 cannot be retrieved + %1 を取得できません + + + + The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). + つまり、空白の文字です、はどうでもいいよね。 + 正規化された表現 %1 はサポートされていません。サポートされている表現は、%2, %3, %4, %5 のみです。 + + + + A zone offset must be in the range %1..%2 inclusive. %3 is out of range. + ゾーンオフセットは、%1 から %2 の範囲である必要があります(境界を含む)。%3 は範囲外です。 + + + + %1 is not a whole number of minutes. + %1 は、分を現す値ではありません。 + + + + The URI cannot have a fragment + この URI はフラグメントをもつことはできません + + + + Required cardinality is %1; got cardinality %2. + カーディナリティ %1 が必要です。%2 ではありません。 + + + + The item %1 did not match the required type %2. + アイテム %1 は、要求された型 %2 にマッチしません。 + + + + Attribute %1 cannot appear on the element %2. Only the standard attributes can appear. + エレメント %2 に属性 %1 を指定することはできません。標準の属性のみが許可されています。 + + + + Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes. + エレメント %2 に属性 %1 を指定することはできません。%3 と標準の属性のみが許可されています。 + + + + Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes. + エレメント %2 に属性 %1 を指定することはできません。%3, %4 と標準の属性のみが許可されています。 + + + + Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes. + エレメント %2 に %1 は指定できません。%3 と標準の属性のみが指定できます。 + + + + XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is. + XSLT エレメントに対するXSLT属性は、名前空間がnullでなければなりません。%1 は使用できません。 + + + + The attribute %1 must appear on element %2. + 属性 %1 は、エレメント %2 にのみ記述できます。 + + + + The element with local name %1 does not exist in XSL-T. + ローカル名 %1 のエレメントは、XSLTに存在しません。 + + + + The variable %1 is unused + 値 %1 は使用されませんでした + + + + A construct was encountered which only is allowed in XQuery. + XQuery でのみ許可されている construct に遭遇しました。 + + + + + %1 is an unknown schema type. + %1 はサポートされていないスキーマのタイプです。 + + + + A template by name %1 has already been declared. + テンプレート名 '%1' は、既に宣言されています。 + + + + %1 is not a valid numeric literal. + %1 は数値リテラルとして無効です。 + + + + Only one %1 declaration can occur in the query prolog. + クェリーのプロローグでは、%1 は一回のみ宣言できます。 + + + + The initialization of variable %1 depends on itself + 再帰? + 値 %1 の初期化は、それ自身に依存しています + + + + No variable by name %1 exists + 変数 %1 は存在しません + + + + Version %1 is not supported. The supported XQuery version is 1.0. + バージョン %1 はサポートされていません。XQuery バージョン 1.0 のみサポートされています。 + + + + The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. + エンコーディング '%1' は無効です。ラテン文字 (空白を除く) からなるもので、正規表現 '%2' にマッチするもののみ使用できます。 + + + + No function with signature %1 is available + シグネチャ %1 をもつ関数がみつかりません + + + + + A default namespace declaration must occur before function, variable, and option declarations. + 標準の名前空間の宣言は、関数、変数、オプションの宣言の前にしなければなりません。 + + + + Namespace declarations must occur before function, variable, and option declarations. + 名前空間の宣言は、関数、変数、オプションの宣言の前にしなければなりません。 + + + + Module imports must occur before function, variable, and option declarations. + モジュールのインポートは、関数、変数、オプションの宣言の前にしなければなりません。 + + + + The keyword %1 cannot occur with any other mode name. + キーワード %1 は、他の名をともなって使用することはできません。 + + + + The value of attribute %1 must of type %2, which %3 isn't. + 属性 '%1' の値として '%3' が指定されましたが、型 '%2' でなければなりません。 + + + + It is not possible to redeclare prefix %1. + プレフィックス '%1' を再定義することはできません。 + + + + The prefix %1 can not be bound. By default, it is already bound to the namespace %2. + プレフィックス '%1' はバウンドできません。デフォルトでは、それは既に名前空間 '%2' にバウンドされています。 + + + + Prefix %1 is already declared in the prolog. + プロローグ部において、プレフィックス '%1' はすでに宣言されています。 + + + + The name of an option must have a prefix. There is no default namespace for options. + オプションの名前はプレフィックスをもたなければなりません。このオプションに対するデフォルトの名前空間は存在しません。 + + + + The Schema Import feature is not supported, and therefore %1 declarations cannot occur. + このスキーマのインポート機能は使用できません。また、'%1' 宣言も使用できません。 + + + + The target namespace of a %1 cannot be empty. + 名前空間 '%1' は、空であってはなりません。 + + + + The module import feature is not supported + モジュールインポートの機能はサポートされていません + + + + A variable by name %1 has already been declared. + 名前 '%1' の変数は、すでに宣言されています。 + + + + No value is available for the external variable by name %1. + 外部変数 '%1' の値がみつかりません。 + + + + A stylesheet function must have a prefixed name. + スタイルシート関数は、プレフィックス名を持たなければなりません。 + + + + The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) + ユーザ定義の関数の名前空間は、空であってはなりません。(すでに定義されているプレフィックス '%1' が使用できます) + + + + The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. + 名前空間 '%1' は予約済です。ユーザ定義の関数では使用することはできません。プレフィックス '%2' が使用できます。 + + + + The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 + ライブラリモジュールで使用されている名前空間は、モジュールの名前空間と同一でなければなりません。つまり、'%2' ではなく、'%1' でなければなりません + + + + A function already exists with the signature %1. + シグネチャー '%1' の関数はすでに存在しています。 + + + + No external functions are supported. All supported functions can be used directly, without first declaring them as external + 外部関数はサポートされていません。すべてのサポートされている関数は、外部宣言をすることなく、直接使用することができます + + + + An argument by name %1 has already been declared. Every argument name must be unique. + 引数名 '%1' は既に宣言されています。すべての引数名はユニークである必要があります。 + + + + When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. + パターン一致の内側で関数 '%1' を使用する場合、引数はリテラルな文字列を参照する値でなければなりません。 + + + + In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. + XSL-T パターンマッチングにおいて、関数 '%1' の最初の引数は、リテラルな文字列でなければなりません。 + + + + In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. + variable ref? + XSL-T パターンマッチングにおいて、関数 '%1' への最初の引数は、リテラルか変数でなければなりません。 + + + + In an XSL-T pattern, function %1 cannot have a third argument. + XSL-T パターンにおいて、関数 '%1' は三つの引数をもつことはできません。 + + + + In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. + XSL-T パターンマッチングにおいて、関数 '%1' と '%2' のみ使用できます。'%3' は使用できません。 + + + + In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. + XSL-T パターンにおいて、axis %1 は使用できません。%2 または %3 のみ使用できます。 + + + + %1 is an invalid template mode name. + %1 はテンプレートモジュール名として無効です。 + + + + The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. + for 構文において使用する変数は、場所に関する変数とは異なる必要があります。つまり、'%1' が重複して使用されています。 + + + + The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. + スキーマの検証機能はサポートされていません。よって、'%1' 構文は使用できません。 + + + + None of the pragma expressions are supported. Therefore, a fallback expression must be present + pragma 構文はサポートされていません。fallback 構文でなければなりません + + + + Each name of a template parameter must be unique; %1 is duplicated. + テンプレートパラメータ名はユニークである必要があります。'%1' は重複しています。 + + + + The %1-axis is unsupported in XQuery + XQuery において、%1 axis はサポートされていません + + + + No function by name %1 is available. + 関数名 '%1' はみつかりません。 + + + + The namespace URI cannot be the empty string when binding to a prefix, %1. + プレフィックス '%1' にバインディングする名前空間の URI は、空であってはなりません。 + + + + %1 is an invalid namespace URI. + %1 は名前空間 URI として無効です。 + + + + It is not possible to bind to the prefix %1 + プレフィックス %1 にバインドすることはできません + + + + Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). + ? + 名前空間 %1 は %2 にのみバウンドできます。 + + + + Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). + プリフィックス %1 は %2 にのみバウンドできます。 + + + + Two namespace declaration attributes have the same name: %1. + 二つの名前空間宣言の属性が、同じ名前 '%1' をもっています。 + + + + The namespace URI must be a constant and cannot use enclosed expressions. + 名前空間 URI は、constantでなければなりません。式を含むことはできません。 + + + + An attribute by name %1 has already appeared on this element. + 属性名 '%1' は、すでにこのエレメントで使用されています。 + + + + A direct element constructor is not well-formed. %1 is ended with %2. + 直積的な指定のエレメントがwell formedではありません。'%1' が、'%2' で終わっています。 + + + + The name %1 does not refer to any schema type. + 名前 '%1' は、なんのスキーマタイプも参照していません。 + + + + %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. + '%1' は complex 型です。complex 型への型変換はできません。しかし、アトミックな型である '%2' への変換はできます。 + + + + %1 is not an atomic type. Casting is only possible to atomic types. + '%1' はアトミックな型ではありません。型変換はアトミックな型に対してのみ可能です。 + + + + %1 is not a valid name for a processing-instruction. + 処理指定において、'%1' は無効です。 + + + + + %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. + '%1' は、スコープ属性宣言ではありません。スキーマインポート機能はサポートされていません。 + + + + The name of an extension expression must be in a namespace. + 拡張式 (extension expression) の名前は、名前空間の中になければなりません。 + + + + Element %1 is not allowed at this location. + この場所にエレメント '%1' をおくことは許されていません。 + + + + Text nodes are not allowed at this location. + この場所にテキストノードをおくことは許されていません。 + + + + Parse error: %1 + パースエラー: %1 + + + + The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. + XSL-T バージョン属性の値は、'%1' 型でなければなりません。'%2' はそうではありません。 + + + + Running an XSL-T 1.0 stylesheet with a 2.0 processor. + XSL-T 1.0 のスタイルシートを 2.0 のプロセッサで使用します。 + + + + Unknown XSL-T attribute %1. + 未知の XSL-T 属性 %1 があります。 + + + + Attribute %1 and %2 are mutually exclusive. + 属性 '%1' と '%2' は排他的にのみ使用できます。 + + + + In a simplified stylesheet module, attribute %1 must be present. + simplified stylesheet モジュールにおいては、属性 '%1' を指定されなければなりません。 + + + + If element %1 has no attribute %2, it cannot have attribute %3 or %4. + エレメント '%1' が属性 '%2' を持たない場合は、属性 '%3' や '%4' を使用することはできません。 + + + + Element %1 must have at least one of the attributes %2 or %3. + エレメント '%1' は、属性 '%2' か '%3' のいずれかを持たなければなりません。 + + + + At least one mode must be specified in the %1-attribute on element %2. + エレメント '%2' において、'%1' 属性は少くとも一つのモードを指定しなければなりません。 + + + + Element %1 must come last. + エレメント %1 は最後になければなりません。 + + + + At least one %1-element must occur before %2. + %2 の前に、少くとも一つは %1 エレメントが存在しなければなりません。 + + + + Only one %1-element can appear. + %1 エレメントは一つのみ存在しなければなりません。 + + + + At least one %1-element must occur inside %2. + %2 の内側には、少くとも一つの '%1' エレメントが存在しなければなりません。 + + + + When attribute %1 is present on %2, a sequence constructor cannot be used. + %2 に属性 %1 がある場合、sequence constructor は使用できません。 + + + + Element %1 must have either a %2-attribute or a sequence constructor. + エレメント %1 には、%2 属性またはsequence constructorがなければなりません。 + + + + When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. + パラメータが要求されているときには、デフォルトの値は、%1 属性または sequence constructor によって指定されていてはなりません。 + + + + Element %1 cannot have children. + エレメント %1 は、子要素を持つことができません。 + + + + Element %1 cannot have a sequence constructor. + エレメント %1 は、sequence constructor を含むことができません。 + + + + + The attribute %1 cannot appear on %2, when it is a child of %3. + %2 が %3 の子要素であるときは、属性 %1 を使用してはなりません。 + + + + A parameter in a function cannot be declared to be a tunnel. + 関数へのパラメータは、トンネルであってはなりません。 + + + + This processor is not Schema-aware and therefore %1 cannot be used. + この処理系は、Schema-aware ではありません。よって、%1 は使用できません。 + + + + Top level stylesheet elements must be in a non-null namespace, which %1 isn't. + トップレベルのスタイルシートのエレメントは、non-nullな名前空間を持っていなければなりません。しかし、%1 はそうではありません。 + + + + The value for attribute %1 on element %2 must either be %3 or %4, not %5. + エレメント %2 の属性 %1 の値は、%3 または %4 でなければなりません。%5 は異なります。 + + + + Attribute %1 cannot have the value %2. + 属性 %1 に、値 %2 を指定することはできません。 + + + + The attribute %1 can only appear on the first %2 element. + 属性 %1 は、最初の %2 エレメントにのみ指定できます。 + + + + At least one %1 element must appear as child of %2. + %2 の子要素としては、少くとも一つは %1 エレメントがなければなりません。 + + + + empty + + + + + zero or one + ゼロまたは一つ + + + + exactly one + 厳密に一つ + + + + one or more + 一つまたは複数 + + + + zero or more + ゼロまたはそれ以上 + + + + Required type is %1, but %2 was found. + 要求されている型は %1 ですが、 %2 があります。 + + + + Promoting %1 to %2 may cause loss of precision. + %1 を %2 に変換する際に、精度のロスが生じます。 + + + + The focus is undefined. + フォーカスが定義されていません。 + + + + It's not possible to add attributes after any other kind of node. + 他の種類のノードの中では、属性を追加することはできません。 + + + + An attribute by name %1 has already been created. + 名前 '%1' の属性は、すでに生成されています。 + + + + Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. + UNICODE Codepoint Collection のみ使用できます(%1)。 %2 はサポートされていません。 + + + + QPluginLoader + + + Unknown error + 不明なエラー + + + + The plugin was not loaded. + そのプラグインはロードされていません。 + + + + QPrintDialog + + Page size: + ページサイズ: + + + Orientation: + 方向: + + + Paper source: + 給紙装置: + + + + OK + OK + + + Cancel + キャンセル + + + Portrait + + + + Landscape + + + + + locally connected + ローカルに接続しています + + + + + Aliases: %1 + エイリアス: %1 + + + + + unknown + 不明 + + + Print in color if available + 可能であればカラーで印刷 + + + Print to file + ファイルに出力: + + + Browse + 参照... + + + + Print all + すべて印刷 + + + Selection + 選択した部分を印刷 + + + + Print range + 印刷範囲 + + + Pages from + 先頭のページ: + + + to + 末尾のページ: + + + Print last page first + 末尾のページから印刷 + + + Number of copies: + 部数: + + + Paper format + 用紙の形式 + + + + A0 (841 x 1189 mm) + A0 (841 x 1189mm) + + + + A1 (594 x 841 mm) + A1 (594 x 841mm) + + + + A2 (420 x 594 mm) + A2 (420 x 594mm) + + + + A3 (297 x 420 mm) + A3 (297 x 420mm) + + + + A4 (210 x 297 mm, 8.26 x 11.7 inches) + A4 (210 x 297mm、8.26 x 11.7インチ) + + + + A5 (148 x 210 mm) + A5 (148 x 210mm) + + + + A6 (105 x 148 mm) + A6 (105 x 148mm) + + + + A7 (74 x 105 mm) + A7 (74 x 105mm) + + + + A8 (52 x 74 mm) + A8 (52 x 74mm) + + + + A9 (37 x 52 mm) + A9 (37 x 52mm) + + + + B0 (1000 x 1414 mm) + B0 (1000 x 1414mm) + + + + B1 (707 x 1000 mm) + B1 (707 x 1000mm) + + + + B2 (500 x 707 mm) + B2 (500 x 707mm) + + + + B3 (353 x 500 mm) + B3 (353 x 500mm) + + + + B4 (250 x 353 mm) + B4 (250 x 353mm) + + + + B5 (176 x 250 mm, 6.93 x 9.84 inches) + B5 (176 x 250mm、6.93 x 9.84インチ) + + + + B6 (125 x 176 mm) + B6 (125 x 176mm) + + + + B7 (88 x 125 mm) + B7 (88 x 125mm) + + + + B8 (62 x 88 mm) + B8 (62 x 88mm) + + + + B9 (44 x 62 mm) + B9 (44 x 62mm) + + + + B10 (31 x 44 mm) + B10 (31 x 44mm) + + + + C5E (163 x 229 mm) + C5E (163 x 229mm) + + + + DLE (110 x 220 mm) + DLE (110 x 220mm) + + + + Executive (7.5 x 10 inches, 191 x 254 mm) + Executive (7.5 x 10インチ、191 x 254mm) + + + + Folio (210 x 330 mm) + Folio (210 x 330mm) + + + + Ledger (432 x 279 mm) + Ledger (432 x 279mm) + + + + Legal (8.5 x 14 inches, 216 x 356 mm) + Legal (8.5 x 14インチ、216 x 356mm) + + + + Letter (8.5 x 11 inches, 216 x 279 mm) + Letter (8.5 x 11インチ、216 x 279mm) + + + + Tabloid (279 x 432 mm) + Tabloid (279 x 432mm) + + + + US Common #10 Envelope (105 x 241 mm) + US Common #10 Envelope (105 x 241mm) + + + Print dialog + プリントダイアログ + + + Size: + サイズ: + + + Printer + プリンタ + + + Properties + プロパティ + + + Printer info: + プリンタ情報: + + + Copies + 印刷部数 + + + Collate + 丁合い + + + Other + その他 + + + Double side printing + 両面印刷 + + + + + + Print + 印刷 + + + File + ファイル + + + + Print To File ... + ファイルへ出力... + + + + File %1 is not writable. +Please choose a different file name. + ファイル %1 は書き込み可能ではありません。 +別のファイル名を選んでください。 + + + + %1 already exists. +Do you want to overwrite it? + %1 はすでに存在します。 +上書きしますか? + + + + File exists + ファイルは既に存在しています + + + + <qt>Do you want to overwrite it?</qt> + <qt>ファイルを上書きしてもよろしいですか?</qt> + + + + Print selection + 選択された範囲を印刷 + + + + %1 is a directory. +Please choose a different file name. + %1 はディレクトリです。 +ファイル名を指定してください。 + + + + A0 + A0 + + + + A1 + A1 + + + + A2 + A2 + + + + A3 + A3 + + + + A4 + A4 + + + + A5 + A5 + + + + A6 + A6 + + + + A7 + A7 + + + + A8 + A8 + + + + A9 + A9 + + + + B0 + B0 + + + + B1 + B1 + + + + B2 + B2 + + + + B3 + B3 + + + + B4 + B4 + + + + B5 + B5 + + + + B6 + B6 + + + + B7 + B7 + + + + B8 + B8 + + + + B9 + B9 + + + + B10 + B10 + + + + C5E + C5E + + + + DLE + DLE + + + + Executive + Exclusive + + + + Folio + Folio + + + + Ledger + Ledger + + + + Legal + リーガルサイズ + + + + Letter + レターサイズ + + + + Tabloid + タブロイドサイズ + + + + US Common #10 Envelope + US標準#10封筒 + + + + Custom + カスタム + + + + + &Options >> + オプション(&O) >> + + + + &Print + 印刷(&P) + + + + &Options << + オプション(&O) << + + + + Print to File (PDF) + PDFファイルに出力 + + + + Print to File (Postscript) + Postscriptファイルに出力 + + + + Local file + ローカルファイル + + + + Write %1 file + ファイル %1 に書き込みました + + + + The 'From' value cannot be greater than the 'To' value. + QPrintPropertiesWidgetにFromとToがあってそれを指している + 印刷開始ページ番号は、印刷終了ページ番号より小さくなければなりません。 + + + + QPrintPreviewDialog + + + + Page Setup + ページの設定 + + + + %1% + %1% + + + + Print Preview + 印刷のプレビュー + + + + Next page + 次のページ + + + + Previous page + 前のページ + + + + First page + 最初のページ + + + + Last page + 最後のページ + + + + Fit width + 幅をあわせる + + + + Fit page + 高さをあわせる + + + + Zoom in + 拡大 + + + + Zoom out + 縮小 + + + + Portrait + + + + + Landscape + + + + + Show single page + 一枚のページを表示する + + + + Show facing pages + 見開きのページを表示する + + + + Show overview of all pages + すべてのページを表示する + + + + Print + 印刷 + + + + Page setup + ページの設定 + + + Close + 閉じる + + + + Export to PDF + PDFに出力 + + + + Export to PostScript + Postscriptに出力 + + + + QPrintPropertiesDialog + + PPD Properties + 印刷プロパティのダイアログのプロパティ + + + Save + 保存 + + + OK + OK + + + + QPrintPropertiesWidget + + + Form + 書式 + + + + Page + ページ + + + + Advanced + 高度な設定 + + + + QPrintSettingsOutput + + + Form + 書式 + + + + Copies + 印刷部数 + + + + Print range + 印刷範囲 + + + + Print all + すべて印刷 + + + + Pages from + 先頭のページ + + + + to + 末尾のページ + + + + Selection + 選択した部分を印刷 + + + + Output Settings + 出力設定 + + + + Copies: + 印刷部数: + + + + Collate + 丁合い + + + + Reverse + 逆順 + + + + Options + オプション + + + + Color Mode + + + + + Color + カラー + + + + Grayscale + グレースケール + + + + Duplex Printing + 両面印刷 + + + + None + なし + + + + Long side + 長辺綴じ + + + + Short side + 短辺綴じ + + + + QPrintWidget + + + Form + 書式 + + + + Printer + プリンタ + + + + &Name: + 名前(&N): + + + + P&roperties + プロパティ(&r) + + + + Location: + 設置場所: + + + + Preview + プレビュー + + + + Type: + タイプ: + + + + Output &file: + 出力ファイル名(&f): + + + + ... + ... + + + + QProcess + + + + Could not open input redirection for reading + 標準入力リダイレクトを読み込みのためにオープンすることができません + + + + + Could not open output redirection for writing + 標準出力リダイレクトを書き込みのためにオープンすることができません + + + + Resource error (fork failure): %1 + リソースエラー (fork に失敗しました): %1 + + + + + + + + + + + + Process operation timed out + プロセス処理がタイムアウトしました + + + + + + + Error reading from process + プロセスからの読み込みにおいてエラーが発生しました + + + + + + Error writing to process + プロセスへの書き込みにおいてエラーが発生しました + + + + Process crashed + プロセスがクラッシュしました + + + + No program defined + プログラム名が指定されていません + + + + Process failed to start + プロセスのスタートに失敗しました + + + + QProgressDialog + + + Cancel + キャンセル + + + + QPushButton + + + Open + オープン + + + + QRadioButton + + + Check + 選択 + + + + QRegExp + + + no error occurred + エラーは発生しませんでした + + + + disabled feature used + 無効な機能が使用されました + + + + bad char class syntax + 不正なcharクラス構文 + + + + bad lookahead syntax + 不正なlookahead構文 + + + + bad repetition syntax + 不正なrepetition構文 + + + + invalid octal value + 無効な8進値 + + + + missing left delim + 左の区切り文字がありません + + + + unexpected end + 予期しない末尾です + + + + met internal limit + 内部制限を満たしました + + + + QSQLite2Driver + + + Error to open database + データベースのオープンでエラーが発生しました + + + + Unable to begin transaction + トランザクションを開始できません + + + + Unable to commit transaction + トランザクションをコミットできません + + + + Unable to rollback Transaction + トランザクションをロールバックできません + + + + QSQLite2Result + + + Unable to fetch results + 実行結果をフェッチできません + + + + Unable to execute statement + ステートメントを実行できません + + + + QSQLiteDriver + + + Error opening database + データベースのオープンでエラーが発生しました + + + + Error closing database + データベースのクローズでエラーが発生しました + + + + Unable to begin transaction + トランザクションを開始できません + + + + Unable to commit transaction + トランザクションをコミットできません + + + Unable to roll back transaction + トランザクションをロールバックできません + + + + Unable to rollback transaction + トランザクションをロールバックできません + + + + QSQLiteResult + + + + + Unable to fetch row + レコードをフェッチできません + + + + Unable to execute statement + ステートメントを実行できません + + + + Unable to reset statement + ステートメントをリセットできません + + + + Unable to bind parameters + パラメータをバインドできません + + + + Parameter count mismatch + パラメータの数が合っていません + + + + No query + クェリーがありません + + + + QScrollBar + + + Scroll here + ここにスクロール + + + + Left edge + 左端 + + + + Top + 上端 + + + + Right edge + 右端 + + + + Bottom + 下端 + + + + Page left + 1ページ左へスクロール + + + + + Page up + 1ページ戻る + + + + Page right + 1ページ右へスクロール + + + + + Page down + 1ページ進む + + + + Scroll left + 左へスクロール + + + + Scroll up + 上へスクロール + + + + Scroll right + 右へスクロール + + + + Scroll down + 下へスクロール + + + + Line up + 1行上へ + + + + Position + 位置 + + + + Line down + 1行下へ + + + + QSharedMemory + + + %1: unable to set key on lock + 共有メモリ関連 + %1: ロックするためのキーを設定できません + + + + %1: create size is less then 0 + %1: 0より小さいサイズの共有メモリは作成できません + + + + + %1: unable to lock + %1: ロックできません + + + + %1: unable to unlock + %1: アンロックできません + + + + + %1: permission denied + %1: 許可されていません + + + + + %1: already exists + %1: 既に存在します + + + + + %1: doesn't exists + %1: 存在しません + + + + + %1: out of resources + %1: リソース不足です + + + + + %1: unknown error %2 + %1: 未知のエラー %2 + + + + %1: key is empty + %1: キーが空です + + + + %1: unix key file doesn't exists + ? + %1: UNIX key file が存在しません + + + + %1: ftok failed + %1: fork に失敗しました + + + + + %1: unable to make key + %1: キーを作成できません + + + + %1: system-imposed size restrictions + EINVAL + %1: 指定されたサイズはシステムにより拒否されました + + + + %1: not attached + %1: アタッチしていません + + + + %1: invalid size + %1: 無効なサイズです + + + + %1: key error + safekey.isEmpty()==true + %1: キーかありません + + + + %1: size query failed + %1: サイズのクェリーに失敗しました + + + + QShortcut + + + Space + Space + + + + Esc + Esc + + + + Tab + Tab + + + + Backtab + Backtab + + + + Backspace + Backspace + + + + Return + Return + + + + Enter + Enter + + + + Ins + Ins + + + + Del + Del + + + + Pause + Pause + + + + Print + Print + + + + SysReq + SysReq + + + + Home + Home + + + + End + End + + + + Left + + + + + Up + + + + + Right + + + + + Down + + + + + PgUp + PgUp + + + + PgDown + PgDown + + + + CapsLock + CapsLock + + + + NumLock + NumLock + + + + ScrollLock + ScrollLock + + + + Menu + メニュー + + + + Help + ヘルプ + + + + Back + 戻る + + + + Forward + 進む + + + + Stop + 停止 + + + + Refresh + 更新間隔 + + + + Volume Down + 音量を下げる + + + + Volume Mute + 消音 + + + + Volume Up + 音量を上げる + + + + Bass Boost + 低音ブースト + + + + Bass Up + 低音を上げる + + + + Bass Down + 低音を下げる + + + + Treble Up + 高音を上げる + + + + Treble Down + 高音を下げる + + + + Media Play + メディアの再生 + + + + Media Stop + メディアの停止 + + + + Media Previous + 前のメディア + + + + Media Next + 次のメディア + + + + Media Record + メディアの録音 + + + + Home Page + ホームページ + + + + Favorites + お気に入り + + + + Search + 検索 + + + + Standby + スタンバイ + + + + Open URL + URLを開く + + + + Launch Mail + メールの起動 + + + + Launch Media + メディアの起動 + + + + Launch (0) + (0)の起動 + + + + Launch (1) + (1)の起動 + + + + Launch (2) + (2)の起動 + + + + Launch (3) + (3)の起動 + + + + Launch (4) + (4)の起動 + + + + Launch (5) + (5)の起動 + + + + Launch (6) + (6)の起動 + + + + Launch (7) + (7)の起動 + + + + Launch (8) + (8)の起動 + + + + Launch (9) + (9)の起動 + + + + Launch (A) + (A)の起動 + + + + Launch (B) + (B)の起動 + + + + Launch (C) + (C)の起動 + + + + Launch (D) + (D)の起動 + + + + Launch (E) + (E)の起動 + + + + Launch (F) + (F)の起動 + + + + Print Screen + Print Screen + + + + Page Up + Page Up + + + + Page Down + Page Down + + + + Caps Lock + Caps Lock + + + + Num Lock + Num Lock + + + + Number Lock + Number Lock + + + + Scroll Lock + Scroll Lock + + + + Insert + Insert + + + + Delete + Delete + + + + Escape + Escape + + + + System Request + System Request + + + + Select + Select + + + + Yes + はい + + + + No + いいえ + + + + Context1 + Context1 + + + + Context2 + Context2 + + + + Context3 + Context3 + + + + Context4 + Context4 + + + + Call + Call + + + + Hangup + Hangup + + + + Flip + Flip + + + + + Ctrl + Ctrl + + + + + Shift + Shift + + + + + Alt + Alt + + + + + Meta + Meta + + + + + + + + + + + F%1 + F%1 + + + + QSlider + + + Page left + 1ページ左へスクロール + + + + Page up + 1ページ戻る + + + + Position + 位置 + + + + Page right + 1ページ右へスクロール + + + + Page down + 1ページ進む + + + + QSocks5SocketEngine + + + Connection to proxy refused + プロキシーへの接続が拒否されました + + + + Connection to proxy closed prematurely + プロキシーの接続が通信の終了前に切断されました + + + + Proxy host not found + プロキシーホストが見つかりません + + + + Connection to proxy timed out + プロキシーとの接続がタイムアウトしました + + + + Proxy authentication failed + プロキシーの認証に失敗しました + + + + Proxy authentication failed: %1 + プロキシーの認証に失敗しました: %1 + + + + SOCKS version 5 protocol error + SOCKS バージョン 5 プロトコルのエラーです + + + + General SOCKSv5 server failure + SOCKS バージョン 5 サーバのエラーです + + + + Connection not allowed by SOCKSv5 server + SOCKSv5 サーバより接続を拒否されました + + + + TTL expired + 実際はホップ数です + 有効期限(TTL)がきれました + + + + SOCKSv5 command not supported + この SOCKSv5 コマンドはサポートされていません + + + + Address type not supported + 指定されたアドレスタイプはサポートされていません + + + + Unknown SOCKSv5 proxy error code 0x%1 + 未知の SOCKSv5 プロキシーエラーです: 0x%1 + + + Socks5 timeout error connecting to socks server + Socks5 はソックスサーバ接続しようとしてタイムアウトになりました + + + + Network operation timed out + ネットワーク操作がタイムアウトしました + + + + QSpinBox + + + More + 増やす + + + + Less + 減らす + + + + QSql + + + Delete + 削除 + + + + Delete this record? + このレコードを削除しますか? + + + + + + Yes + はい + + + + + + No + いいえ + + + + Insert + 挿入 + + + + Update + アップデート + + + + Save edits? + 編集内容を保存しますか? + + + + Cancel + キャンセル + + + + Confirm + 確認 + + + + Cancel your edits? + 編集をキャンセルしますか? + + + + QSslSocket + + + Error creating SSL context (%1) + SSL content の作成に失敗しました (%1) + + + + Invalid or empty cipher list (%1) + 暗号方式リストが無効または空です (%1) + + + + Cannot provide a certificate with no key, %1 + 鍵が指定されていないため、証明書を扱えません。 %1 + + + + Error loading local certificate, %1 + ローカルの証明書をロードできません。 %1 + + + + Error loading private key, %1 + プライベートキーをロードできません。 %1 + + + + Private key does not certificate public key, %1 + プライベートキーが、パブリックキーの証明書となっていません %1 + + + + Error creating SSL session, %1 + SSL セッションを作成できません。 %1 + + + + Error creating SSL session: %1 + SSL セッションを作成できません: %1 + + + + Unable to write data: %1 + 書き込みできません: %1 + + + + Error while reading: %1 + 読み込み時にエラーが発生しました: %1 + + + + Error during SSL handshake: %1 + SSL ハンドシェーク時にエラーが発生しました: %1 + + + + QSystemSemaphore + + + + %1: out of resources + %1: リソース不足です + + + + + %1: permission denied + %1: 許可されていません + + + + %1: already exists + %1: 既に存在します + + + + %1: does not exist + %1: 存在しません + + + + + %1: unknown error %2 + %1: 未知のエラーです %2 + + + + QTDSDriver + + + Unable to open connection + 接続をオープンできません + + + + Unable to use database + データベースを使用できません + + + + QTabBar + + + Scroll Left + 左へスクロール + + + + Scroll Right + 右へスクロール + + + + QTcpServer + + Socket operation unsupported + ソケット操作はサポートされていません + + + + Operation on socket is not supported + このソケットへの操作はサポートされていません + + + + QTextControl + + + &Undo + 元に戻す(&U) + + + + &Redo + やり直す(&R) + + + + Cu&t + 切り取り(&T) + + + + &Copy + コピー(&C) + + + + Copy &Link Location + リンクの場所をコピー(&L) + + + + &Paste + 貼り付け(&P) + + + + Delete + 削除 + + + + Select All + すべてを選択 + + + + QToolButton + + + + Press + 押す + + + + + Open + オープン + + + + QUdpSocket + + + This platform does not support IPv6 + このプラットフォームは IPv6 をサポートしていません + + + + QUndoGroup + + + Undo + 元に戻す + + + + Redo + やり直す + + + + QUndoModel + + + <empty> + <空> + + + + QUndoStack + + + Undo + 元に戻す + + + + Redo + やり直す + + + + QUnicodeControlCharacterMenu + + + LRM Left-to-right mark + LRM (左横書き指定) + + + + RLM Right-to-left mark + RLM (右横書き指定) + + + + ZWJ Zero width joiner + ZWJ (幅のない接続文字) + + + + ZWNJ Zero width non-joiner + ZWNJ (幅のない非接続文字) + + + + ZWSP Zero width space + ZWSP (幅の無い空白) + + + + LRE Start of left-to-right embedding + LRE (左横書き開始指定) + + + + RLE Start of right-to-left embedding + RLE (右横書き開始指定) + + + + LRO Start of left-to-right override + LRO (左横書き上書き開始指定) + + + + RLO Start of right-to-left override + RLO (右横書き上書き開始指定) + + + + PDF Pop directional formatting + PDF (方向上書きの終了指定) + + + + Insert Unicode control character + Unicode制御文字を挿入 + + + + QWebFrame + + + Request cancelled + リクエストはキャンセルされました + + + + Request blocked + リクエストはブロックされました + + + + Cannot show URL + URL を表示できません + + + + Frame load interruped by policy change + ポリシーの変更により、フレームのロードが中断しました + + + + Cannot show mimetype + MIME Type を表示できません + + + + File does not exist + ファイルが存在しません + + + + QWebPage + + + Bad HTTP request + 誤った HTTP のリクエストです + + + + Submit + default label for Submit buttons in forms on web pages + 送信 + + + + Submit + Submit (input element) alt text for <input> elements with no alt, title, or value + 送信 + + + + Reset + default label for Reset buttons in forms on web pages + リセット + + + + This is a searchable index. Enter search keywords: + text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' + 検索が可能です。検索のためのキーワードを入力してください: + + + + Choose File + title for file button used in HTML forms + ファイルを選ぶ + + + + No file selected + text to display in file button used in HTML forms when no file is selected + ファイルが選択されていません + + + + Open in New Window + Open in New Window context menu item + 新しいウィンドウで開く + + + + Save Link... + Download Linked File context menu item + リンク先を保存... + + + + Copy Link + Copy Link context menu item + リンク先をコピー + + + + Open Image + Open Image in New Window context menu item + イメージを開く + + + + Save Image + Download Image context menu item + 画像を保存 + + + + Copy Image + Copy Link context menu item + 画像をコピー + + + + Open Frame + Open Frame in New Window context menu item + フレームを新しいウィンドウで開く + + + + Copy + Copy context menu item + コピー + + + + Go Back + Back context menu item + 戻る + + + + Go Forward + Forward context menu item + 進む + + + + Stop + Stop context menu item + 停止 + + + + Reload + Reload context menu item + リロード + + + + Cut + Cut context menu item + 切り取り + + + + Paste + Paste context menu item + 貼り付け + + + + No Guesses Found + No Guesses Found context menu item + 推測候補はありません + + + + Ignore + Ignore Spelling context menu item + 無視 + + + + Add To Dictionary + Learn Spelling context menu item + 辞書に追加 + + + + Search The Web + Search The Web context menu item + Web を検索 + + + + Look Up In Dictionary + Look Up in Dictionary context menu item + 辞書から探す + + + + Open Link + Open Link context menu item + リンクを開く + + + + Ignore + Ignore Grammar context menu item + 無視 + + + + Spelling + Spelling and Grammar context sub-menu item + スペル + + + + Show Spelling and Grammar + menu item title + スペルと文法を表示 + + + + Hide Spelling and Grammar + menu item title + スペルと文法を隠す + + + + Check Spelling + Check spelling context menu item + スペルをチェックする + + + + Check Spelling While Typing + Check spelling while typing context menu item + 入力中にスペルをチェックする + + + + Check Grammar With Spelling + Check grammar with spelling context menu item + スペルおよび文法をチェックする + + + + Fonts + Font context sub-menu item + フォント + + + + Bold + Bold context menu item + 太字 + + + + Italic + Italic context menu item + イタリック + + + + Underline + Underline context menu item + 下線 + + + + Outline + Outline context menu item + アウトライン + + + + Direction + Writing direction context sub-menu item + 方向 + + + + Text Direction + Text direction context sub-menu item + テキストの方向 + + + + Default + Default writing direction context menu item + デフォルト + + + + LTR + Left to Right context menu item + 左横書き + + + + RTL + Right to Left context menu item + 右横書き + + + + Inspect + Inspect Element context menu item + ? + 検査 + + + + No recent searches + Label for only item in menu that appears when clicking on the search field image, when no searches have been performed + 検索の履歴はありません + + + + Recent searches + label for first item in the menu that appears when clicking on the search field image, used as embedded menu title + 検索の履歴 + + + + Clear recent searches + menu item in Recent Searches menu that empties menu's contents + 検索の履歴をクリア + + + + Unknown + Unknown filesize FTP directory listing item + 不明 + + + + %1 (%2x%3 pixels) + Title string for images + %1 (%2x%3 ピクセル) + + + + Web Inspector - %2 + Web の検査 - %2 + + + + Scroll here + ここにスクロール + + + + Left edge + 左端 + + + + Top + 上端 + + + + Right edge + 右端 + + + + Bottom + 下端 + + + + Page left + 1ページ左へスクロール + + + + Page up + 1ページ戻る + + + + Page right + 1ページ右へスクロール + + + + Page down + 1ページ進む + + + + Scroll left + 左へスクロール + + + + Scroll up + 上へスクロール + + + + Scroll right + 右へスクロール + + + + Scroll down + 下へスクロール + + + + %n file(s) + number of chosen file + + %n 個のファイル + + + + + JavaScript Alert - %1 + JavaScript アラート - %1 + + + + JavaScript Confirm - %1 + JavaScript 確認 - %1 + + + + JavaScript Prompt - %1 + JavaScript 質問 - %1 + + + + Move the cursor to the next character + 次の文字へカーソルを移動 + + + + Move the cursor to the previous character + 前の文字にカーソルを移動 + + + + Move the cursor to the next word + 次の単語にカーソルを移動 + + + + Move the cursor to the previous word + 前の単語にカーソルを移動 + + + + Move the cursor to the next line + 次の行にカーソルを移動 + + + + Move the cursor to the previous line + 前の行にカーソルを移動 + + + + Move the cursor to the start of the line + 文なのか行なのか + 文頭にカーソルを移動 + + + + Move the cursor to the end of the line + 文末にカーソルを移動 + + + + Move the cursor to the start of the block + ブロックの先頭にカーソルを移動 + + + + Move the cursor to the end of the block + ブロックの末尾にカーソルを移動 + + + + Move the cursor to the start of the document + 文章の先頭にカーソルを移動 + + + + Move the cursor to the end of the document + 文章の末尾にカーソルを移動 + + + + Select all + すべてを選択 + + + + Select to the next character + 次の文字を選択 + + + + Select to the previous character + 前の文字を選択 + + + + Select to the next word + 次の単語を選択 + + + + Select to the previous word + 前の単語を選択 + + + + Select to the next line + 次の行を選択 + + + + Select to the previous line + 前の行を選択 + + + + Select to the start of the line + 文頭から選択 + + + + Select to the end of the line + 文末まで選択 + + + + Select to the start of the block + ブロックの先頭から選択 + + + + Select to the end of the block + ブロックの末尾まで選択 + + + + Select to the start of the document + ドキュメントの先頭から選択 + + + + Select to the end of the document + ドキュメントの末尾まで選択 + + + + Delete to the start of the word + 単語の先頭まで削除 + + + + Delete to the end of the word + 単語の末尾まで削除 + + + + Insert a new paragraph + 新しい段落を挿入 + + + + Insert a new line + 新しい行を挿入 + + + + QWhatsThisAction + + + What's This? + ヒント? + + + + QWidget + + + * + * + + + + QWizard + + + Go Back + 戻る + + + + Continue + 続き + + + + Commit + 適用 + + + + Done + 終了 + + + + Help + ヘルプ + + + + < &Back + < 戻る(&B) + + + + &Finish + 完了(&F) + + + + Cancel + キャンセル + + + + &Help + ヘルプ(&H) + + + + &Next + 次へ(&N) + + + + &Next > + 次へ(&N) > + + + + QWorkspace + + + &Restore + 元に戻す(&R) + + + + &Move + 移動(&M) + + + + &Size + サイズを変更(&S) + + + + Mi&nimize + 最小化(&N) + + + + Ma&ximize + 最大化(&X) + + + + &Close + 閉じる(&C) + + + + Stay on &Top + 常に手前に表示(&T) + + + + + Sh&ade + シェード(&A) + + + + + %1 - [%2] + %1 - [%2] + + + + Minimize + 最小化 + + + + Restore Down + 元に戻す + + + + Close + 閉じる + + + + &Unshade + シェードを解除(&U) + + + + QXml + + + no error occurred + エラーは発生しませんでした + + + + error triggered by consumer + 消費者によってエラーが誘発されました + + + + unexpected end of file + 予期せぬファイルの終りです + + + + more than one document type definition + ドキュメントタイプの定義が複数あります + + + + error occurred while parsing element + 要素の解析中にエラーが発生しました + + + + tag mismatch + タグが一致しません + + + + error occurred while parsing content + コンテンツの解析中にエラーが発生しました + + + + unexpected character + 予期しない文字です + + + + invalid name for processing instruction + 処理の指示に無効な名前です + + + + version expected while reading the XML declaration + XML宣言を読み込むにはバージョンが必要です + + + + wrong value for standalone declaration + スタンドアロン宣言として正しくない値です + + + + encoding declaration or standalone declaration expected while reading the XML declaration + XML宣言を読み込むにはエンコーディング宣言かスタンドアローン宣言が必要です + + + + standalone declaration expected while reading the XML declaration + XML宣言を読み込むにはスタンドアローン宣言が必要です + + + + error occurred while parsing document type definition + ドキュメントタイプの定義を解析中にエラーが発生しました + + + + letter is expected + 文字が必要です + + + + error occurred while parsing comment + コメントの解析中にエラーが発生しました + + + + error occurred while parsing reference + 参照の解析中にエラーが発生しました + + + + internal general entity reference not allowed in DTD + 内部一般エンティティ参照はDTDで許されていません + + + + external parsed general entity reference not allowed in attribute value + 解析された外部一般エンティティ参照は属性値で許されていません + + + + external parsed general entity reference not allowed in DTD + 解析された外部一般エンティティ参照はDTDで許されていません + + + + unparsed entity reference in wrong context + 不正な文脈で解析されないエンティティ参照です + + + + recursive entities + 再帰的エンティティ + + + + error in the text declaration of an external entity + 外部エンティティのテキスト宣言にエラーがあります + + + + QXmlStream + + + + Extra content at end of document. + ドキュメントの末尾に余計なものがついています。 + + + + Invalid entity value. + エンティティの値が無効です。 + + + + Invalid XML character. + 無効な XML 文字です。 + + + + Sequence ']]>' not allowed in content. + このコンテキストでは、']]>' は許可されていません。 + + + + + Encountered incorrectly encoded content. + 正しくないエンコードの文脈に遭遇しました。 + + + + Namespace prefix '%1' not declared + 名前空間のブリフィックス '%1' は宣言されていません + + + + Attribute redefined. + 属性が再度指定されています。 + + + + Unexpected character '%1' in public id literal. + DTD宣言の部分 + 公開 ID 指定に使用できない文字 '%1' が使用されています。 + + + + Invalid XML version string. + 無効な XML バージョン指定です。 + + + + Unsupported XML version. + この XML のバージョンはサポートされていません。 + + + + The standalone pseudo attribute must appear after the encoding. + &ddd; は、エンコーディングを指定していないと使えないということかな。utf8だとおもうけど。 + 仮想属性指定は、エンコーディング指定の後にのみ使用できます。 + + + + %1 is an invalid encoding name. + %1 は無効なエンコーディングの名前です。 + + + + Encoding %1 is unsupported + エンコーディング '%1' はサポートされていません + + + + Standalone accepts only yes or no. + standalone の指定は yes または no のみ指定できます。 + + + + Invalid attribute in XML declaration. + XML 宣言に無効な属性がついています。 + + + + Premature end of document. + ドキュメントが途中で終わっています。 + + + + Invalid document. + 無効なドキュメントです。 + + + + Expected + 予期していた表現は、 + + + + , but got ' + ですが、取得した表現は以下のものでした ' + + + + Unexpected ' + 予期していなかった表現 ' + + + + Expected character data. + 予期していた文字列。 + + + + Recursive entity detected. + 再帰しているエンティティを発見しました。 + + + + Start tag expected. + 開始タグをよきしていましたが、みつかりません。 + + + + NDATA in parameter entity declaration. + パラメータエンティティの宣言において NDATA があります。 + + + + XML declaration not at start of document. + XML 宣言がドキュメントの先頭にありません。 + + + + %1 is an invalid processing instruction name. + XMLにそんなのあったっけ? + %1 は無効な処理指定の名前です。 + + + + Invalid processing instruction name. + 無効な処理命令です。 + + + + %1 is an invalid PUBLIC identifier. + %1 は、公開 (PUBLIC) 識別子として無効です。 + + + + + + + Illegal namespace declaration. + 無効な名前空間の指定です。 + + + + Invalid XML name. + 無効な XML 名です。 + + + + Opening and ending tag mismatch. + 開始タグと、終了タグがマッチしません。 + + + + Reference to unparsed entity '%1'. + まだパースしていないエンティティ '%1' を参照しています。 + + + + + + Entity '%1' not declared. + エンティティ '%1' は宣言されていません。 + + + + Reference to external entity '%1' in attribute value. + 属性値として、外部エンティティ '%1' を再度指定しています。 + + + + Invalid character reference. + 無効な文字への参照です。 + + + diff --git a/translations/qt_ja_JP.ts b/translations/qt_ja_JP.ts deleted file mode 100644 index e6f92b7..0000000 --- a/translations/qt_ja_JP.ts +++ /dev/null @@ -1,8070 +0,0 @@ - - - - - MAC_APPLICATION_MENU - - - Services - サービス - - - - Hide %1 - %1を隠す - - - - Hide Others - ほかを隠す - - - - Show All - すべてを表示 - - - - Preferences... - 環境設定... - - - - Quit %1 - %1 を終了 - - - - About %1 - %1 について - - - - CloseButton - - - Close Tab - ToolTip - タブを閉じる - - - - PPDOptionsModel - - Name - 名前 - - - Value - - - - - Phonon:: - - - Notifications - 通知 - - - - Music - 音楽 - - - - Video - 動画 - - - - Communication - コミュニケーション - - - - Games - ゲーム - - - - Accessibility - アクセシビリティ - - - - Phonon::AudioOutput - - - <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html> - <html>オーディオ再生デバイス<b>%1</b>が動作しません。<br/><b>%2</b>を使用します。</html> - - - - <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html> - <html>より高いパフォーマンスを得られるオーディオデバイス <b>%1</b> が使用可能となったので、使用します。</html> - - - - Revert back to device '%1' - デバイス '%1' に戻す - - - - Phonon::Gstreamer::Backend - - - Warning: You do not seem to have the package gstreamer0.10-plugins-good installed. - Some video features have been disabled. - 警告: gstreamer0.10-plugins-good がインストールされていません。幾つかの動画機能は使用できません。 - - - - Warning: You do not seem to have the base GStreamer plugins installed. - All audio and video support has been disabled - 警告: GStreamer plugin がインストールされていません。すべての音声、動画機能は使用できません - - - - Phonon::Gstreamer::MediaObject - - - Cannot start playback. - -Check your Gstreamer installation and make sure you -have libgstreamer-plugins-base installed. - 再生できません。 - -Gstreamer と libgstreamer-plugins-base が正しくインストールされているか確認してください。 - - - - A required codec is missing. You need to install the following codec(s) to play this content: %0 - 必要なコーデックがみつかりません。このコンテンツを再生するためには、以下のコーデックをインストールする必要があります: %0 - - - - - - - - - - - Could not open media source. - メディアソースを開くことができません。 - - - - Invalid source type. - 無効なソースの形式です。 - - - - Could not locate media source. - メディアソースがみつかりません。 - - - - Could not open audio device. The device is already in use. - オーディオデバイスを開くことができません。デバイスは既に他のプロセスにより使用されています。 - - - - Could not decode media source. - メディアソースを開くことができません。見つからないか、未知の形式です。 - - - - Phonon::VolumeSlider - - - - - - Volume: %1% - 音量: %1% - - - - - - Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1% - スライダを用いて音量を指定してください。左端が0%、右端が%1%になります - - - - Muted - ミュート - - - - Q3Accel - - - %1, %2 not defined - %1, %2 は定義されていません - - - - Ambiguous %1 not handled - 曖昧な %1 は扱えません - - - - Q3DataTable - - - True - - - - - False - - - - - Insert - 挿入 - - - - Update - アップデート - - - - Delete - 削除 - - - - Q3FileDialog - - - All Files (*.*) - すべてのファイル(*.*) - - - - Open - オープン - - - - Select a Directory - ディレクトリを選択 - - - - Copy or Move a File - ファイルをコピーまたは移動 - - - - Read: %1 - 読み込み: %1 - - - - - Write: %1 - 書き込み: %1 - - - - - Cancel - キャンセル - - - - - - - All Files (*) - すべてのファイル(*) - - - - Name - 名前 - - - - Size - サイズ - - - - Type - タイプ - - - - Date - 日付 - - - - Attributes - 属性 - - - - - &OK - OK(&O) - - - - Look &in: - 検索する場所(&I): - - - - - - File &name: - ファイル名(&N): - - - - File &type: - ファイルタイプ(&T): - - - - Back - 戻る - - - - One directory up - 1つ上のディレクトリへ移動 - - - - Create New Folder - 新しいフォルダの作成 - - - - List View - 一覧表示 - - - - Detail View - 詳細表示 - - - - Preview File Info - ファイル情報のプレビュー - - - - Preview File Contents - ファイルの内容のプレビュー - - - - Read-write - 読み込み/書き込み - - - - Read-only - 読み込み専用 - - - - Write-only - 書き込み専用 - - - - Inaccessible - アクセス不可 - - - - Symlink to File - ファイルへのシンボリックリンク - - - - Symlink to Directory - ディレクトリへのシンボリックリンク - - - - Symlink to Special - スペシャルファイルへのシンボリックリンク - - - - File - ファイル - - - - Dir - ディレクトリ - - - - Special - スペシャル - - - - - - Open - オープン - - - - - Save As - 名前を付けて保存 - - - - - - &Open - オープン(&O) - - - - - &Save - 保存(&S) - - - - &Rename - 名前の変更(&R) - - - - &Delete - 削除(&D) - - - - R&eload - リロード(&E) - - - - Sort by &Name - 名前順にソート(&N) - - - - Sort by &Size - サイズ順にソート(&S) - - - - Sort by &Date - 日付順にソート(&D) - - - - &Unsorted - ソート解除(&U) - - - - Sort - ソート - - - - Show &hidden files - 隠しファイルの表示(&H) - - - - the file - ファイル - - - - the directory - ディレクトリ - - - - the symlink - シンボリックリンク - - - - Delete %1 - %1 の削除 - - - - <qt>Are you sure you wish to delete %1 "%2"?</qt> - <qt>%1 "%2" を削除しますか?</qt> - - - - &Yes - はい(&Y) - - - - &No - いいえ(&N) - - - - New Folder 1 - 新しいフォルダ1 - - - - New Folder - 新しいフォルダ - - - - New Folder %1 - 新しいフォルダ %1 - - - - Find Directory - ディレクトリの検索 - - - - - Directories - ディレクトリ - - - - Directory: - ディレクトリ: - - - - - Error - エラー - - - - %1 -File not found. -Check path and filename. - %1 -ファイルが見つかりませんでした。 -パスおよびファイル名を確認してください。 - - - - Q3LocalFs - - - - Could not read directory -%1 - ディレクトリを読み込めませんでした -%1 - - - - Could not create directory -%1 - ディレクトリを作成できませんでした -%1 - - - - Could not remove file or directory -%1 - ファイルまたはディレクトリを削除できませんでした -%1 - - - - Could not rename -%1 -to -%2 - 名前を変更できませんでした -%1 -を -%2 -へ - - - - Could not open -%1 - 開けませんでした -%1 - - - - Could not write -%1 - 書き込めませんでした -%1 - - - - Q3MainWindow - - - Line up - 整列 - - - - Customize... - カスタマイズ... - - - - Q3NetworkProtocol - - - Operation stopped by the user - 操作がユーザによって停止されました - - - - Q3ProgressDialog - - - - Cancel - キャンセル - - - - Q3TabDialog - - - - OK - OK - - - - Apply - 適用 - - - - Help - ヘルプ - - - - Defaults - デフォルト - - - - Cancel - キャンセル - - - - Q3TextEdit - - - &Undo - 元に戻す(&U) - - - - &Redo - やり直す(&R) - - - - Cu&t - 切り取り(&T) - - - - &Copy - コピー(&C) - - - - &Paste - 貼り付け(&P) - - - - Clear - 消去 - - - - - Select All - すべてを選択 - - - - Q3TitleBar - - - System - システム - - - - Restore up - 元に戻す - - - - Minimize - 最小化 - - - - Restore down - 元に戻す - - - - Maximize - 最大化 - - - - Close - 閉じる - - - - Contains commands to manipulate the window - ウィンドウを操作するコマンドを含みます - - - - Puts a minimized back to normal - 最小化されたウィンドウを元のサイズに戻します - - - - Moves the window out of the way - ウィンドウを隠します - - - - Puts a maximized window back to normal - 最大化されたウィンドウを元のサイズに戻します - - - - Makes the window full screen - ウィンドウをフルスクリーンにします - - - - Closes the window - ウィンドウを閉じます - - - - Displays the name of the window and contains controls to manipulate it - ウィンドウの名前と、ウィンドウを操作するコントロールを表示します - - - - Q3ToolBar - - - More... - その他... - - - - Q3UrlOperator - - - - - The protocol `%1' is not supported - プロトコル '%1' はサポートされていません - - - - The protocol `%1' does not support listing directories - プロトコル '%1' はディレクトリのリスティングをサポートしていません - - - - The protocol `%1' does not support creating new directories - プロトコル '%1' は新しいディレクトリの作成をサポートしていません - - - - The protocol `%1' does not support removing files or directories - プロトコル '%1' はファイルまたはディレクトリの削除をサポートしていません - - - - The protocol `%1' does not support renaming files or directories - プロトコル '%1' はファイルまたはディレクトリの名前の変更をサポートしていません - - - - The protocol `%1' does not support getting files - プロトコル '%1' はファイルの取得をサポートしていません - - - - The protocol `%1' does not support putting files - プロトコル '%1' はファイルの送信をサポートしていません - - - - - The protocol `%1' does not support copying or moving files or directories - プロトコル '%1' はファイルまたはディレクトリのコピーまたは移動をサポートしていません - - - - - (unknown) - (不明) - - - - Q3Wizard - - - &Cancel - キャンセル(&C) - - - - < &Back - < 戻る(&B) - - - - &Next > - 次へ(&N) > - - - - &Finish - 完了(&F) - - - - &Help - ヘルプ(&H) - - - - QAbstractSocket - - - - - - Host not found - ホストが見つかりませんでした - - - - - - Connection refused - 接続が拒否されました - - - - Connection timed out - 接続がタイムアウトしました - - - - - - Operation on socket is not supported - 抽象ソケットクラスでのソケットのエラー - このソケットへのこの操作はサポートされていません - - - - Socket operation timed out - ソケット操作がタイムアウトしました - - - - Socket is not connected - ソケットが接続されていません - - - - Network unreachable - ネットワークへ到達できません - - - - QAbstractSpinBox - - - &Step up - 上(&S) - - - - Step &down - 下(&D) - - - - &Select All - すべてを選択(&S) - - - - QApplication - - - Activate - アクティブに - - - - Activates the program's main window - メインウィンドウをアクティブにする - - - - Executable '%1' requires Qt %2, found Qt %3. - 実行可能ファイル '%1' には Qt %2 が必要です。Qt %3 が見つかりました。 - - - - Incompatible Qt Library Error - 互換性のないQtライブラリエラー - - - - QT_LAYOUT_DIRECTION - Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. - LTR - - - - QAxSelect - - - Select ActiveX Control - ActiveX Control を選択 - - - - OK - OK - - - - &Cancel - キャンセル(&C) - - - - COM &Object: - COM オブジェクト(&O): - - - - QCheckBox - - - Uncheck - 選択解除 - - - - Check - 選択 - - - - Toggle - 反転 - - - - QColorDialog - - - Hu&e: - 色相(&E): - - - - &Sat: - 彩度(&S): - - - - &Val: - 明度(&V): - - - - &Red: - 赤(&R): - - - - &Green: - 緑(&G): - - - - Bl&ue: - 青(&U): - - - - A&lpha channel: - アルファチャネル(&L): - - - - Select Color - - - - - &Basic colors - 基本的なカラー(&B) - - - - &Custom colors - カスタムカラー(&C) - - - &Define Custom Colors >> - カスタムカラーの定義(&D) >> - - - OK - OK - - - Cancel - キャンセル - - - - &Add to Custom Colors - カスタムカラーに追加(&A) - - - Select color - カラーの選択 - - - - QComboBox - - - - Open - オープン - - - - False - - - - - True - - - - - Close - 閉じる - - - - QCoreApplication - - - %1: key is empty - QSystemSemaphore - %1: キーが空です - - - - %1: unable to make key - QSystemSemaphore - %1: キーを作成できません - - - - %1: ftok failed - QSystemSemaphore - %1: fork に失敗しました - - - - QDB2Driver - - - Unable to connect - 接続できません - - - - Unable to commit transaction - トランザクションをコミットできません - - - - Unable to rollback transaction - トランザクションをロールバックできません - - - - Unable to set autocommit - オートコミットを設定できません - - - - QDB2Result - - - - Unable to execute statement - ステートメントを実行できません - - - - Unable to prepare statement - プリペアステートメントを使えません - - - - Unable to bind variable - 変数をバインドできません - - - - Unable to fetch record %1 - レコード %1 をフェッチできません - - - - Unable to fetch next - 次のレコードをフェッチできません - - - - Unable to fetch first - 最初のレコードをフェッチできません - - - - QDateTimeEdit - - - AM - AM - - - - am - am - - - - PM - PM - - - - pm - pm - - - - QDial - - - QDial - ダイヤル - - - - SpeedoMeter - スピードメータ - - - - SliderHandle - スライダハンドル - - - - QDialog - - - What's This? - ヒント? - - - - Done - 終了 - - - - QDialogButtonBox - - - - - OK - OK - - - - Cancel - キャンセル - - - - Apply - 適用 - - - - Ignore - 無視 - - - - Retry - 再試行 - - - - Abort - 中止 - - - - Help - ヘルプ - - - - Save - 保存 - - - - &Save - 保存(&S) - - - - Open - オープン - - - - &Cancel - キャンセル(&C) - - - - Close - 閉じる - - - - &Close - 閉じる(&C) - - - - Reset - リセット - - - - Don't Save - 保存しない - - - - Close without Saving - 保存せずに閉じる - - - - Discard - 変更を破棄 - - - - &Yes - はい(&Y) - - - - Yes to &All - 全てにはい(&A) - - - - &No - いいえ(&N) - - - - N&o to All - 全てにいいえ(&O) - - - - Save All - すべて保存 - - - - Restore Defaults - デフォルトに戻す - - - - &OK - OK(&O) - - - - QDirModel - - - Name - 名前 - - - - Size - サイズ - - - - Date Modified - 更新日 - - - - Kind - Match OS X Finder - 種類 - - - - Type - All other platforms - タイプ - - - - QDockWidget - - - Close - 閉じる - - - - Dock - ドック - - - - Float - フロート - - - - QDoubleSpinBox - - - More - 増やす - - - - Less - 減らす - - - - QErrorMessage - - - Debug Message: - デバッグメッセージ: - - - - Warning: - 警告: - - - - Fatal Error: - 致命的なエラー: - - - - &Show this message again - 次回もこのメッセージを表示する(&S) - - - - &OK - OK(&O) - - - - QFile - - - - Destination file exists - 新しい名前のファイルは既に存在します - - - - Cannot remove source file - 元のファイルを削除できません - - - - Cannot open %1 for input - コピー元ファイル %1 を読めません - - - - Cannot open for output - コピー先のファイルをオープンできません - - - - Failure to write block - 書き込みに失敗しました - - - - Cannot create %1 for output - コピー先として %1 を作成できません - - - - QFileDialog - - - - All Files (*) - すべてのファイル(*) - - - - Directories - ディレクトリ - - - - - Directory: - ディレクトリ: - - - - - File &name: - ファイル名(&N): - - - - - - - &Open - オープン(&O) - - - - - &Save - 保存(&S) - - - - Open - オープン - - - Save - 保存 - - - -File not found. -Please verify the correct file name was given - -ファイルが見つかりません。 -正しいファイル名が入力されたかどうか確認してください - - - - %1 already exists. -Do you want to replace it? - %1 はすでに存在します。 -置き換えますか? - - - - %1 -File not found. -Please verify the correct file name was given. - %1 -ファイルが見つかりません。 -正しいファイル名が入力されたかどうか確認してください。 - - - - My Computer - マイ コンピュータ - - - - - %1 -Directory not found. -Please verify the correct directory name was given. - %1 -ディレクトリが見つかりません。 -正しいディレクトリ名が入力されたかどうか確認してください。 - - - Sort - ソート - - - - &Rename - 名前の変更(&R) - - - - &Delete - 削除(&D) - - - &Reload - リロード(&R) - - - Sort by &Name - 名前順にソート(&N) - - - Sort by &Size - サイズ順にソート(&S) - - - Sort by &Date - 日付順にソート(&D) - - - &Unsorted - ソート解除(&U) - - - - Show &hidden files - 隠しファイルの表示(&H) - - - - - Back - 戻る - - - - - Parent Directory - 親ディレクトリ - - - - - Create New Folder - 新しいフォルダの作成 - - - - - List View - 一覧表示 - - - - - Detail View - 詳細表示 - - - - - Look in: - 検索する場所: - - - - - Files of type: - ファイルの種類: - - - - Drive - ドライブ - - - - - File - ファイル - - - - File Folder - Match Windows Explorer - ファイルフォルダ - - - - Folder - All other platforms - フォルダ - - - - Alias - Mac OS X Finder - エイリアス - - - - Shortcut - All other platforms - ショートカット - - - - Unknown - 不明 - - - - All Files (*.*) - すべてのファイル(*.*) - - - - Save As - 名前を付けて保存 - - - Open - オープン - - - Select a Directory - ディレクトリを選択 - - - - '%1' is write protected. -Do you want to delete it anyway? - '%1' は書き込みが禁止されています。 -本当に削除しますか? - - - - Are sure you want to delete '%1'? - '%1' を本当に削除しますか? - - - - Could not delete directory. - ディレクトリを削除できませんでした。 - - - - Find Directory - ディレクトリの検索 - - - - Show - 表示 - - - - &New Folder - 新しいフォルダ(&N) - - - - - &Choose - 選択(&C) - - - - New Folder - 新しいフォルダ - - - - Recent Places - 履歴 - - - - - Forward - 進む - - - - Remove - 削除 - - - - QFileSystemModel - - - Name - 名前 - - - - Size - サイズ - - - - Date Modified - 更新日 - - - - Kind - Match OS X Finder - 種類 - - - - Type - All other platforms - タイプ - - - - - %1 TB - %1 TB - - - - - %1 GB - %1 GB - - - - - %1 MB - %1 MB - - - - - %1 KB - %1 KB - - - - - %1 bytes - %1 バイト - - - - Invalid filename - 無効なファイル名 - - - - <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks. - <b>ファイル名 "%1" は使用できません。</b><p>名前を短くしたり、アクセント記号などを削除して再度試してください。 - - - - My Computer - マイ コンピュータ - - - - Computer - コンピュータ - - - - QFontDatabase - - - - Normal - ここはどう訳すべきか... - 明朝 - - - - - - Bold - ゴシック - - - - - Demi Bold - Demi Bold - - - - - - Black - 太字 - - - - Demi - Demi - - - - - Light - 細字 - - - - - Italic - イタリック - - - - - Oblique - 斜体 - - - - Any - すべて - - - - Latin - ラテン - - - - Greek - ギリシャ - - - - Cyrillic - キリル - - - - Armenian - アルメニア - - - - Hebrew - ヘブライ - - - - Arabic - アラビア - - - - Syriac - シリア - - - - Thaana - ターナ - - - - Devanagari - デーヴァナーガリー - - - - Bengali - ベンガル - - - - Gurmukhi - グルムキー - - - - Gujarati - グジャラート - - - - Oriya - オリヤー - - - - Tamil - タミル - - - - Telugu - テルグ - - - - Kannada - カンナダ - - - - Malayalam - マラヤーラム - - - - Sinhala - シンハラ - - - - Thai - タイ - - - - Lao - ラーオ - - - - Tibetan - チベット - - - - Myanmar - ビルマ - - - - Georgian - グルジア - - - - Khmer - クメール - - - - Simplified Chinese - 簡体中国 - - - - Traditional Chinese - 繁体中国 - - - - Japanese - 日本 - - - - Korean - ハングル - - - - Vietnamese - ベトナム - - - - Symbol - 記号 - - - - Ogham - オガム - - - - Runic - ルーン - - - - QFontDialog - - - &Font - フォント(&F) - - - - Font st&yle - フォントスタイル(&Y) - - - - &Size - サイズ(&S) - - - - Effects - 文字飾り - - - - Stri&keout - 取り消し線(&K) - - - - &Underline - 下線(&U) - - - - Sample - サンプル - - - - Wr&iting System - 言語(&I) - - - - - Select Font - フォントの選択 - - - - QFtp - - - - Not connected - 未接続です - - - - - Host %1 not found - ホスト %1 が見つかりませんでした - - - - - Connection refused to host %1 - ホスト %1 への接続が拒否されました - - - - Connection timed out to host %1 - ホスト %1 への接続がタイムアウトしました - - - - - - Connected to host %1 - ホスト %1 に接続しました - - - - - Connection refused for data connection - データ接続のための接続が拒否されました - - - - - - - Unknown error - 不明なエラー - - - - - Connecting to host failed: -%1 - ホストへの接続に失敗しました: -%1 - - - - - Login failed: -%1 - ログインに失敗しました: -%1 - - - - - Listing directory failed: -%1 - ディレクトリのリストに失敗しました: -%1 - - - - - Changing directory failed: -%1 - ディレクトリの変更に失敗しました: -%1 - - - - - Downloading file failed: -%1 - ファイルのダウンロードに失敗しました: -%1 - - - - - Uploading file failed: -%1 - ファイルのアップロードに失敗しました: -%1 - - - - - Removing file failed: -%1 - ファイルの削除に失敗しました: -%1 - - - - - Creating directory failed: -%1 - ディレクトリの作成に失敗しました: -%1 - - - - - Removing directory failed: -%1 - ディレクトリの削除に失敗しました: -%1 - - - - - - Connection closed - 接続が閉じられました - - - - Host %1 found - ホスト %1 が見つかりました - - - - Connection to %1 closed - %1 への接続が閉じられました - - - - Host found - ホストが見つかりました - - - - Connected to host - ホストに接続しました - - - - QHostInfo - - - Unknown error - 不明なエラー - - - - QHostInfoAgent - - - - - - - - - - Host not found - ホストが見つかりません - - - - - - - Unknown address type - 不明なアドレス型です - - - - - - Unknown error - 不明なエラー - - - - QHttp - - - HTTPS connection requested but SSL support not compiled in - HTTPSによる接続が要求されましたが、SSLのサポートがコンパイル時に組み込まれていないため、接続できません - - - - - - - Unknown error - 不明なエラー - - - - - Request aborted - 要求が中止されました - - - - - No server set to connect to - 接続が設定されているサーバがありません - - - - - Wrong content length - コンテンツの長さが正しくありません - - - - - Server closed connection unexpectedly - サーバの接続が予期せず閉じられました - - - - Unknown authentication method - 非対応の認証方法が要求されました - - - - Error writing response to device - デバイスへの書き込み時にエラーが発生しました - - - - - Connection refused - 接続が拒否されました - - - - - - Host %1 not found - ホスト %1 が見つかりませんでした - - - - - - - HTTP request failed - HTTP要求に失敗しました - - - - - Invalid HTTP response header - 無効なHTTP応答ヘッダです - - - - - - - Invalid HTTP chunked body - 無効なHTTPチャンクドボディです - - - - Host %1 found - ホスト %1 が見つかりました - - - - Connected to host %1 - ホスト %1 に接続しました - - - - Connection to %1 closed - %1 への接続が閉じられました - - - - Host found - ホストが見つかりました - - - - Connected to host - ホストに接続しました - - - - - Connection closed - 接続が閉じられました - - - - Proxy authentication required - プロキシーの認証が必要です - - - - Authentication required - 認証が必要です - - - - Connection refused (or timed out) - 接続が拒否されたか、タイムアウトしました - - - - Proxy requires authentication - プロキシーの認証が必要です - - - - Host requires authentication - ホストの認証が必要です - - - - Data corrupted - データが破損しています - - - - Unknown protocol specified - 未対応のプロトコルです - - - - SSL handshake failed - SSLのハンドシェークに失敗しました - - - - QHttpSocketEngine - - - Did not receive HTTP response from proxy - プロキシーからHTTPレスポンスを受信できませんでした - - - - Error parsing authentication request from proxy - プロキシーからの認証要求のパースに失敗しました - - - - Authentication required - 認証が必要です - - - - Proxy denied connection - プロキシーが接続を拒否しました - - - - Error communicating with HTTP proxy - HTTP プロキシーとの通信にて、エラーが発生しました - - - - Proxy server not found - プロキシーサーバが見つかりません - - - - Proxy connection refused - プロキシーが接続を拒否しました - - - - Proxy server connection timed out - プロキシーとの接続がタイムアウトしました - - - - Proxy connection closed prematurely - プロキシーの接続が通信の終了前に切断されました - - - - QIBaseDriver - - - Error opening database - データベースのオープンでエラーが発生しました - - - - Could not start transaction - トランザクションを開始できませんでした - - - - Unable to commit transaction - トランザクションをコミットできません - - - - Unable to rollback transaction - トランザクションをロールバックできません - - - - QIBaseResult - - - Unable to create BLOB - バイナリラージオブジェクトを作成できません - - - - Unable to write BLOB - バイナリラージオブジェクトを書き込めません - - - - Unable to open BLOB - バイナリラージオブジェクトをオープンできません - - - - Unable to read BLOB - バイナリラージオブジェクトを読み込めません - - - - - Could not find array - 配列が見つかりませんでした - - - - Could not get array data - 配列データを取得できませんでした - - - - Could not get query info - クエリー情報を取得できませんでした - - - - Could not start transaction - トランザクションを開始できませんでした - - - - Unable to commit transaction - トランザクションをコミットできません - - - - Could not allocate statement - ステートメントの領域を確保できませんでした - - - - Could not prepare statement - プリペアステートメントを使えませんでした - - - - - Could not describe input statement - INPUT ステートメントの情報を取得できませんでした - - - - Could not describe statement - ステートメントの情報を取得できませんでした - - - - Unable to close statement - ステートメントをクローズできません - - - - Unable to execute query - クエリーを実行できません - - - - Could not fetch next item - 次のレコードをフェッチできませんでした - - - - Could not get statement info - ステートメントの情報を取得できませんでした - - - - QIODevice - - - Permission denied - 許可されていません - - - - Too many open files - 開かれたファイルが多すぎます - - - - No such file or directory - そのようなファイルやディレクトリはありません - - - - No space left on device - デバイスの残り容量がありません - - - - Unknown error - 不明なエラー - - - - QInputContext - - - XIM - XIM - - - - XIM input method - XIM 入力メソッド - - - - Windows input method - Windows 入力メソッド - - - - Mac OS X input method - Mac OS X 入力メソッド - - - - QInputDialog - - - Enter a value: - 数値を入力: - - - - QLibrary - - - Could not mmap '%1': %2 - '%1' をメモリにマッピングできませんでした: %2 - - - - Plugin verification data mismatch in '%1' - '%1' でプラグイン検証データが一致しません - - - - Could not unmap '%1': %2 - '%1' のマッピングを解除できませんでした: %2 - - - - The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] - プラグイン '%1' は、互換性のない Qt ライブラリを使用しています。(%2.%3.%4) [%5] - - - - The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" - プラグイン '%1' は、互換性のない Qt ライブラリを使用しています。ビルドキー "%2" が必要ですが、"%3" しかありません - - - - Unknown error - 不明なエラー - - - QLibrary::load_sys: Cannot load %1 (%2) - QLibrary::load_sys: %1 をロードできません (%2) - - - QLibrary::unload_sys: Cannot unload %1 (%2) - QLibrary::unload_sys: %1 をアンロードできません (%2) - - - QLibrary::resolve_sys: Symbol "%1" undefined in %2 (%3) - QLibrary::resolve_sys: シンボル "%1" は %2 で定義されていません (%3) - - - - - The shared library was not found. - 共有ライブラリがみつかりません。 - - - - The file '%1' is not a valid Qt plugin. - ファイル '%1' は Qt プラグインではありません。 - - - - The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) - プラグイン '%1' はこの Qt と互換性のないライブラリを使用しています。 (デバック版とリリース版のライブラリを同時に使用することはできません) - - - - - Cannot load library %1: %2 - ライブラリ '%1' を読み込むことができません: %2 - - - - - Cannot unload library %1: %2 - ライブラリ %1 を解放することができません: %2 - - - - - Cannot resolve symbol "%1" in %2: %3 - '%2'に含まれる識別子 "%1" を解決できません: %3 - - - - QLineEdit - - - &Undo - 元に戻す(&U) - - - - &Redo - やり直す(&R) - - - - Cu&t - 切り取り(&T) - - - - &Copy - コピー(&C) - - - - &Paste - 貼り付け(&P) - - - - Delete - 削除 - - - - Select All - すべてを選択 - - - - QLocalServer - - - - %1: Name error - %1: 名前の解決に失敗 - - - - %1: Permission denied - %1: 許可されていません - - - - %1: Address in use - %1: アドレスは既に使用されています - - - - %1: Unknown error %2 - %1: 未知のエラー %2 - - - - QLocalSocket - - - - %1: Connection refused - %1: 接続が拒否されました - - - - - %1: Remote closed - %1: リモートにより接続が閉じられました - - - - - - - %1: Invalid name - %1: 無効な名前です - - - - - %1: Socket access error - %1: ソケットアクセスのエラーです - - - - - %1: Socket resource error - %1: ソケットリソースのエラーです - - - - - %1: Socket operation timed out - %1: ソケット操作がタイムアウトしました - - - - - %1: Datagram too large - %1: データグラムが大きすぎます - - - - - - %1: Connection error - %1: 接続のエラーが発生しました - - - - - %1: The socket operation is not supported - %1: そのソケット操作はサポートされていません - - - - %1: Unknown error - %1: 未知のエラーです - - - - - %1: Unknown error %2 - %1: 未知のエラー %2 - - - - QMYSQLDriver - - - Unable to open database ' - データベースをオープンできません ' - - - - Unable to connect - 接続できません - - - - Unable to begin transaction - トランザクションを開始できません - - - - Unable to commit transaction - トランザクションをコミットできません - - - - Unable to rollback transaction - トランザクションをロールバックできません - - - - QMYSQLResult - - - Unable to fetch data - データをフェッチできません - - - - Unable to execute query - クエリーを実行できません - - - - Unable to store result - 実行結果を記録できません - - - - - Unable to prepare statement - プリペアステートメントを使えません - - - - Unable to reset statement - ステートメントをリセットできません - - - - Unable to bind value - 値をバインドできません - - - - Unable to execute statement - ステートメントを実行できません - - - - - Unable to bind outvalues - 出力値をバインドできません - - - - Unable to store statement results - ステートメントの実行結果を記録できません - - - - Unable to execute next query - 次のクエリーを実行できません - - - - Unable to store next result - 次の結果を記録できません - - - - QMdiArea - - - (Untitled) - (タイトルなし) - - - - QMdiSubWindow - - - %1 - [%2] - %1 - [%2] - - - - Close - 閉じる - - - - Minimize - 最小化 - - - - Restore Down - 元に戻す - - - - &Restore - 元に戻す(&R) - - - - &Move - 移動(&M) - - - - &Size - サイズ(&S) - - - - Mi&nimize - 最小化(&N) - - - - Ma&ximize - 最大化(&X) - - - - Stay on &Top - 常に手前に表示(&T) - - - - &Close - 閉じる(&C) - - - - - [%1] - - [%1] - - - - Maximize - 最大化 - - - - Unshade - たぶん選択・非選択状態のウィンドウのことだと思うけど。fvwmなどのx11で使われている用語 - 非選択 - - - - Shade - 選択 - - - - Restore - 元に戻す - - - - Help - ヘルプ - - - - Menu - メニュー - - - - QMenu - - - - Close - 閉じる - - - - - Open - オープン - - - - - - Execute - 実行 - - - - QMenuBar - - About Qt - Qt について - - - - QMessageBox - - - Help - ヘルプ - - - - - - - OK - OK - - - <h3>About Qt</h3>%1<p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qtopia Core.</p><p>Qt is a Trolltech product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p> - <h3>Qt について</h3>%1 -<p>QtはクロスプラットフォームのC++ アプリケーション開発ツールキットです。</p> -<p>Qt は MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, 商用のUnix派生版でソースコード互換を実現します。また、Qtopia Coreのように、内蔵デバイスでも利用可能です。</p> -<p>QtはTrolltechの商品です。詳細は<tt>http://qt.nokia.com/</tt>を参照してください。</p> - - - <p>This program uses Qt version %1.</p> - <p>このプログラムは Qt バージョン %1 を使用しています。</p> - - - <p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://qt.nokia.com/company/model/">qt.nokia.com/company/model/</a> for an overview of Qt licensing.</p> - <p>このプログラムは Qt オープンソース版バージョン %1 を使用しています。</p> -<p>Qt オープンソース版はオープンソースのアプリケーションの開発用です。ソースコードを公開しない商用アプリケーションを開発するには商用版のライセンスが必要です。</p><p>Qtのライセンスについては<tt>http://qt.nokia.com/company/model.html</tt>を参照してください。</p> - - - - About Qt - Qt について - - - - Show Details... - 詳細を表示... - - - - Hide Details... - 詳細を隠す... - - - - <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p> - <h3>Qtについて</h3> -<p>このプログラムは Qt バージョン %1 を使用しています。</p> -<p>Qt は、クロスプラットホームのアプリケーション開発に使用される C++ のツールキットです。</p> -<p>Qt は、 MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, そして多数の Unix 系OS環境に対して、単一のソースからバイナリを生成します。 -また、 Linux および Windows CE を元とした組み込み環境にも対応しています。</p> -<p>Qt は様々なユーザの要望に応じるために、3つの異なるライセンスで提供されています。</p> -<p> -Qt 商用ライセンスは、プロプライエタリまたは商用ソフトウェアに適用できます。 -この場合は、他者とのソースコードの共有を拒否し、 GNU LGP バージョン 2.1 または GNU GPL バージョン 3.0 を許容できないソフトウェアにおいて Qt を使用できます。 -</p> -<p> -Qt GNU LGPL バージョン 2.1 ライセンスは、プロプライエタリまたはオープンソースソフトウェアに適用できます。 -この場合は、 GNU LGPL バージョン 2.1 に従う必要があります。 -</p> -<p> -Qt GNU General Public License バージョン 3.0 ライセンスは、GNU GPL バージョン 3.0 または GPL 3.0 と互換性のあるライセンスを採用しているソフトウェアに適用されます。 -この場合は、GNU GPL バージョン 3.0 に従う必要があります。 -</p> -<p> -ライセンスの詳細については、<a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> -を参照してください。</p> -<p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p> -<p>Qt は Nokia の製品です。詳細については<a href="http://qt.nokia.com/">qt.nokia.com</a> を参照してください。</p> -<p> -訳注: ライセンスはここにある翻訳は参考のためのものであり、オリジナルの(英語の)ものが正式なものとなります。 -</p> - - - - QMultiInputContext - - - Select IM - インプットメソッドを選択 - - - - QMultiInputContextPlugin - - - Multiple input method switcher - 複数のインプットメソッドを切り替え - - - - Multiple input method switcher that uses the context menu of the text widgets - テキストウィジェットのコンテキストメニューを使った複数のインプットメソッドの切り替えです - - - - QNativeSocketEngine - - - Unable to initialize non-blocking socket - 非ブロック型ソケットを初期化できません - - - - Unable to initialize broadcast socket - ブロードキャストソケットを初期化できません - - - - Attempt to use IPv6 socket on a platform with no IPv6 support - IPv6 がサポートされていないプラットフォームで IPv6 ソケットを使用しようとしています - - - - The remote host closed the connection - リモートホストは接続を閉じました - - - - Network operation timed out - ネットワーク操作がタイムアウトしました - - - - Out of resources - リソースが足りません - - - - Unsupported socket operation - サポートされていないソケット操作です - - - - Protocol type not supported - プロトコル型がサポートされていません - - - - Invalid socket descriptor - 無効なソケット記述子です - - - - Host unreachable - ホストへ到達できません - - - - Network unreachable - ネットワークへ到達できません - - - - Permission denied - 許可されていません - - - - Connection timed out - 接続がタイムアウトしました - - - - Connection refused - 接続を拒否されました - - - - The bound address is already in use - バインドアドレスは既に使われています - - - - The address is not available - そのアドレスは使用できません - - - - The address is protected - そのアドレスへのアクセス権がありません - - - - Datagram was too large to send - データグラムが大き過ぎて送信できませんでした - - - - Unable to send a message - メッセージを送信できません - - - - Unable to receive a message - メッセージを受信できません - - - - Unable to write - 書き込みができません - - - - Network error - ネットワークエラー - - - - Another socket is already listening on the same port - 別のソケットが同じポートで既に待ち受けています - - - - Operation on non-socket - 非ソケットに対する操作です - - - - Unknown error - 不明なエラー - - - - The proxy type is invalid for this operation - このプロキシーは、この操作に対応していません - - - - QNetworkAccessCacheBackend - - - Error opening %1 - オープンのエラー %1 - - - - QNetworkAccessDebugPipeBackend - - - Write error writing to %1: %2 - %1 への書き込み時にエラーが発生しました: %2 - - - - QNetworkAccessFileBackend - - - Request for opening non-local file %1 - 非ローカルファイル %1 をオープンするよう要求されましたが、ローカルファイルのみオープンできます - - - - Error opening %1: %2 - %1 をオープンする時にエラーが発生しました: %2 - - - - Write error writing to %1: %2 - %1 への書き込み時にエラーが発生しました: %2 - - - - Cannot open %1: Path is a directory - %1 をオープンできません。指定されたパスはディレクトリです - - - - Read error reading from %1: %2 - %1 を読み込み時にエラーが発生しました: %2 - - - - QNetworkAccessFtpBackend - - - No suitable proxy found - 適切なプロキシーがみつかりません - - - - Cannot open %1: is a directory - %1 をオープンできません。指定されたパスはディレクトリです - - - - Logging in to %1 failed: authentication required - %1 へのログインに失敗しました。認証が必要です - - - - Error while downloading %1: %2 - %1 をダウンロード中にエラーが発生しました: %2 - - - - Error while uploading %1: %2 - %1 をアップロード中にエラーが発生しました: %2 - - - - QNetworkAccessHttpBackend - - - No suitable proxy found - 適切なプロキシーがみつかりません - - - - QNetworkReply - - - Error downloading %1 - server replied: %2 - %1 をダウンロード中にエラーが発生しました。サーバの返答: %2 - - - - Protocol "%1" is unknown - プロトコル "%1" はサポートされていません - - - - QNetworkReplyImpl - - - - Operation canceled - 操作はキャンセルされました - - - - QOCIDriver - - - Unable to initialize - QOCIDriver - 初期化できません - - - - Unable to logon - ログオンできません - - - - Unable to begin transaction - トランザクションを開始できません - - - - Unable to commit transaction - トランザクションをコミットできません - - - - Unable to rollback transaction - トランザクションをロールバックできません - - - - QOCIResult - - - - - Unable to bind column for batch execute - バッチ処理用にフィールドをバインドできません - - - - Unable to execute batch statement - バッチステートメントを実行できません - - - - Unable to goto next - 次のレコードへ進めません - - - - Unable to alloc statement - ステートメントの領域を確保できません - - - - Unable to prepare statement - プリペアステートメントを使えません - - - - Unable to bind value - 値をバインドできません - - - Unable to execute select statement - SELECT ステートメントを実行できません - - - - Unable to execute statement - ステートメントを実行できません - - - - QODBCDriver - - - Unable to connect - 接続できません - - - - Unable to connect - Driver doesn't support all needed functionality - 接続できません - ドライバは全ての必要な機能をサポートしていません - - - - Unable to disable autocommit - オートコミットを無効にできません - - - - Unable to commit transaction - トランザクションをコミットできません - - - - Unable to rollback transaction - トランザクションをロールバックできません - - - - Unable to enable autocommit - オートコミットを有効にできません - - - - QODBCResult - - - - Unable to execute statement - ステートメントを実行できません - - - - Unable to fetch next - 次のレコードをフェッチできません - - - - Unable to prepare statement - プリペアステートメントを使えません - - - - Unable to bind variable - 変数をバインドできません - - - - - QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration - QODBCResult::reset: ステートメントの属性として 'SQL_CURSOR_STATUS' を設定できません。ODBC ドライバの構成をチェックしてください - - - - - - Unable to fetch last - リストを取得できません - - - - Unable to fetch - フェッチできません - - - - Unable to fetch first - 最初のレコードをフェッチできません - - - - Unable to fetch previous - 前のレコードをフェッチできません - - - - QObject - - False - False - - - True - True - - - - Home - ホーム - - - - Operation not supported on %1 - %1 ではこの操作はサポートされていません - - - - Invalid URI: %1 - 無効なURIです: %1 - - - - Socket error on %1: %2 - %1 のソケットにおいてエラーが発生しました: %2 - - - - Remote host closed the connection prematurely on %1 - リモートホスト %1 との接続が通信の終了前に切断されました - - - - - No host name given - ホストネームが与えられていません - - - - QPPDOptionsModel - - - Name - 名前 - - - - Value - - - - - QPSQLDriver - - - Unable to connect - 接続できません - - - - Could not begin transaction - トランザクションを開始できませんでした - - - - Could not commit transaction - トランザクションをコミットできませんでした - - - - Could not rollback transaction - トランザクションをロールバックできませんでした - - - - Unable to subscribe - subscribe できません - - - - Unable to unsubscribe - unsubscribe できません - - - - QPSQLResult - - - Unable to create query - クエリーを作成できません - - - - Unable to prepare statement - プリペアステートメントを使えません - - - - QPageSetupWidget - - - Centimeters (cm) - センチメートル (cm) - - - - Millimeters (mm) - ミリメートル (mm) - - - - Inches (in) - インチ (in) - - - - Points (pt) - ポイント (pt) - - - - Form - 書式設定 - - - - Paper - 用紙 - - - - Page size: - ページサイズ: - - - - Width: - 幅: - - - - Height: - 高さ: - - - - Paper source: - 給紙装置: - - - - Orientation - 印刷方向 - - - - Portrait - 縦 (ポートレート) - - - - Landscape - 横 (ランドスケープ) - - - - Reverse landscape - 横 反転 (リバースランドスケープ) - - - - Reverse portrait - 縦 反転 (リバースポートレート) - - - - Margins - 余白 - - - - top margin - 上端余白 - - - - left margin - 左端余白 - - - - right margin - 右端余白 - - - - bottom margin - 下端余白 - - - - QPatternist::QtXmlPatterns - - - An %1-attribute with value %2 has already been declared. - 属性 %1 の値 %2 は既に宣言されています。 - - - - An %1-attribute must have a valid %2 as value, which %3 isn't. - 属性 %1 の値は %2 の型でなければなりませんが、 %3 が指定されました。 - - - - %1 is an unsupported encoding. - %1 はサポートされていないエンコーディングです。 - - - - %1 contains octets which are disallowed in the requested encoding %2. - エンコーディング %2 では許可されていないオクテットが %1 に含まれています。 - - - - The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. - %2 で使用されているエンコード %3 では、コードポイント %1 は有効な XML 表現ではありません。 - - - - Network timeout. - ネットワーク接続がタイムアウトしました。 - - - - Element %1 can't be serialized because it appears outside the document element. - エレメント %1 はシリアライズできません。このドキュメントの範囲を越えるエレメントを含んでいます。 - - - - Attribute %1 can't be serialized because it appears at the top level. - 属性 %1 はシリアライズできません。トップレベルに現れているためです。 - - - - Year %1 is invalid because it begins with %2. - %1 年はむこうです。%2 で始まっています。 - - - - Day %1 is outside the range %2..%3. - %1 日は、有効な範囲 %2..%3 を逸脱しています。 - - - - Month %1 is outside the range %2..%3. - %1 月は、有効な範囲 %2..%3 を逸脱しています。 - - - - Overflow: Can't represent date %1. - オーバーフロー: 日付 %1 を再現できません。 - - - - Day %1 is invalid for month %2. - %2 月には、%1 日は存在しません。 - - - - Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; - 24:%1:%2.%3 は無効です。24時0分0秒のみ使用できます - - - - Time %1:%2:%3.%4 is invalid. - 時刻 %1時%2分%3.%4秒は無効です。 - - - - Overflow: Date can't be represented. - オーバーフロー: 日付を再現できません。 - - - - - At least one component must be present. - 年、月、日のうちいずれかを指定しなければなりません。 - - - - At least one time component must appear after the %1-delimiter. - %1 の後には、時刻を指定しなければなりません。 - - - - No operand in an integer division, %1, can be %2. - ゼロ除算? NaN? - 整数の除算のためのオペランドが不足しています。%1 は %2 でなければなりません。 - - - - The first operand in an integer division, %1, cannot be infinity (%2). - 整数の除算における最初のオペランド %1 を認識できません (%2)。 - - - - The second operand in a division, %1, cannot be zero (%2). - 整数の除算における二つ目のオペランド %1 はゼロであってはいけまん(%2)。 - - - - %1 is not a valid value of type %2. - %1 は、%2 の型に対して有効な値ではありません。 - - - - When casting to %1 from %2, the source value cannot be %3. - %2 から %1 への型変換に際しては、値 %3 は有効な値ではありません。 - - - - Integer division (%1) by zero (%2) is undefined. - 整数の除算において %1 をゼロ (%2) で割った結果は定義されていません。 - - - - Division (%1) by zero (%2) is undefined. - 除算において %1 をゼロ (%2) で割った結果は定義されていません。 - - - - Modulus division (%1) by zero (%2) is undefined. - 剰余を求めるに際し、%1 をゼロ (%2) で除した結果は定義されていません。 - - - - - Dividing a value of type %1 by %2 (not-a-number) is not allowed. - 型 %1 を非数 %2 (NaN) で除すことはできません。 - - - - Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed. - 型 %1 を%2 または %3 (正または負のゼロ) で除することはできません。 - - - - Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed. - 型 %1 を %2 または %3 (正または負のゼロ)で乗ずることはできません。 - - - - A value of type %1 cannot have an Effective Boolean Value. - 型 %1 は有効な論理型(bool)ではありません。 - - - - Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. - ?? - 論理型は、論理型以外の複数の値からなる計算によって求めることはできません。 - - - - Value %1 of type %2 exceeds maximum (%3). - 型 %2 の値 %1 は、上限 (%3) を越えています。 - - - - Value %1 of type %2 is below minimum (%3). - 型 %2 の値 %1 は、下限 (%3) を越えています。 - - - - A value of type %1 must contain an even number of digits. The value %2 does not. - 型 %1 の値は偶数個の十進数文字を必要とします。しかし、%2 はそうではありません。 - - - - %1 is not valid as a value of type %2. - 型 %2 に対して、値 %1 は有効ではありません。 - - - - Ambiguous rule match. - 曖昧なルールにマッチしました。 - - - - Operator %1 cannot be used on type %2. - 型 %2 に対して、オペレータ %1 は使用できません。 - - - - Operator %1 cannot be used on atomic values of type %2 and %3. - アトミックな型 %2 と %3 に対して、オペレータ %1 は使用できません。 - - - - The namespace URI in the name for a computed attribute cannot be %1. - computed attrib. ってなんてやくすのが適当かな。 - 結合された属性に対する名前空間のURIとして、%1 を使用することはできません。 - - - - The name for a computed attribute cannot have the namespace URI %1 with the local name %2. - 結合された属性の名前空間URI %1 は、ローカルな名前である %2 と併用できません。 - - - - Type error in cast, expected %1, received %2. - 型変換時のエラーです。望んでいた %1 ではなく、%2 になりました。 - - - - When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed. - %1 またはそれを継承している型への型変換においては、元の値の型は同じ型か、リテラルな文字列である必要があります。型 %2 は許可されていません。 - - - - No casting is possible with %1 as the target type. - 目標とする型に %1 を型変換することはできません。 - - - - It is not possible to cast from %1 to %2. - 型 %1 を型 %2 に型変換することはできません。 - - - - Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated. - 型 %1 への型変換はできません。抽象型であり、インスタンス化することができないからです。 - - - - It's not possible to cast the value %1 of type %2 to %3 - 型 %2 の値 %1 を、型 %3 に型変換することはできません - - - - Failure when casting from %1 to %2: %3 - %1 を %2 に型変換することができません: %3 - - - - A comment cannot contain %1 - コメントが %1 を含むことはできません - - - - A comment cannot end with a %1. - コメントは %1 で終了することはできません。 - - - - No comparisons can be done involving the type %1. - 型 %1 に対して比較を行うことはできません。 - - - - Operator %1 is not available between atomic values of type %2 and %3. - オペレータ %1 は、アトミックな型である %2 と %3 には適用できません。 - - - - In a namespace constructor, the value for a namespace cannot be an empty string. - 名前空間のスントラクトにおいて、空白の文字列を名前空間の値として使用することはできません。 - - - - The prefix must be a valid %1, which %2 is not. - プレフィックスは %1 でなければなりません。%2 は無効です。 - - - - The prefix %1 cannot be bound. - プレフィックス %1 はバウンドできません。 - - - - Only the prefix %1 can be bound to %2 and vice versa. - プレフィックス %1 は、%2 にのみバウンドできます。逆も同じです。 - - - - An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place. - ドキュメントノードの子として属性ノードを指定することはできません。属性 %1 は誤った場所にあります。 - - - - Circularity detected - 循環を検出しました - - - - A library module cannot be evaluated directly. It must be imported from a main module. - ライブラリモジュールを直接評価することはできません。メインモジュールからインポートする必要があります。 - - - - No template by name %1 exists. - テンプレート名 %1 は存在しません。 - - - - A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. - 型 %1 は述部として使用できません。数値型か、論理型である必要があります。 - - - - A positional predicate must evaluate to a single numeric value. - positional? - 述部は評価されたとき、単一の数値になるようにしなければなりません。 - - - - The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid. - ターゲットとしている名前は、%1 であってはなりません。%2 は無効です。 - - - - %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. - %1 はターゲットとして無効です。%2 である必要があります。例えば "%3" のようにです。 - - - - The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. - バスの末端であるリーフは、単一のノードかアトミックな値である必要があります。複数の型の組み合わせであってはいけません。 - - - - The data of a processing instruction cannot contain the string %1 - 処理中のデータは、以下の文字列を含んでいてはなりません: %1 - - - - No namespace binding exists for the prefix %1 - プレフィックス %1 にバインドされたネームスペースがありません - - - - No namespace binding exists for the prefix %1 in %2 - %2 におけるプレフィックス %1 にバインディングされたネームスペースが存在しません - - - - - %1 is an invalid %2 - 型 %2 に対し、値 %1 は無効です - - - - The parameter %1 is passed, but no corresponding %2 exists. - パラメータ %1 を処理しました。しかし、対応する %2 が存在しません。 - - - - The parameter %1 is required, but no corresponding %2 is supplied. - パメータ %1 が必要です。しかし、対応する %2 がありません。 - - - - %1 takes at most %n argument(s). %2 is therefore invalid. - - %1 は、最大で %n 個の引数をとることができます。%2 は無効です。 - - - - - %1 requires at least %n argument(s). %2 is therefore invalid. - - %1 は、少くとも %n 個の引数を必要とします。%2 は無効です。 - - - - - The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration. - %1 への最初の引数は、型 %2 であってはなりません。数値型、xs:yerMonthDuration、xs:dayTimeDurationである必要があります。 - - - - The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. - %1 への最初の引数は、型 %2 であってはなりません。%3, %4, %5 のいずれかである必要があります。 - - - - The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5. - %1 への二つ目の引数は、型 %2 であってはなりません。%3, %4, %5 のいずれかである必要があります。 - - - - %1 is not a valid XML 1.0 character. - %1 は XML 1.0 において有効な文字ではありません。 - - - - The first argument to %1 cannot be of type %2. - %1 への最初の引数は、型 %2 であってはなりません。 - - - - The root node of the second argument to function %1 must be a document node. %2 is not a document node. - %1 への二つ目の引数のルートノードは、ドキュメントノードでなければなりません。しかし、%2 はドキュメントノードではありません。 - - - - If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same. - ゾーンオフセットってなに? xmlにそんなのあったっけ? - もし二つの値がゾーンオフセットをもつ場合、両者は同じゾーンオフセットでなければなりません。%1 と %2 は同一ではありません。 - - - - %1 was called. - %1 が呼ばれました。 - - - - %1 must be followed by %2 or %3, not at the end of the replacement string. - %1 の後には、%2 か %3 が続かなければなりません。 - - - - In the replacement string, %1 must be followed by at least one digit when not escaped. - 置換操作において、%1 には少くとも一文字以上の数値が続く必要があります(エスケープされている場合を除く)。 - - - - In the replacement string, %1 can only be used to escape itself or %2, not %3 - 置換操作において、%1 はそれ自身または %2 をエスケープする為にのみ使用できます。%3 に対しては使用できません - - - - %1 matches newline characters - %1 は改行文字(列)にマッチしました - - - - %1 and %2 match the start and end of a line. - %1 と %2 は、行の先頭と末尾にマッチしました。 - - - - Matches are case insensitive - マッチは大文字小文字を区別しません - - - - Whitespace characters are removed, except when they appear in character classes - CDATA? - 空白文字は削除されました。ただし、キャラクタークラスに属するものは除きます - - - - %1 is an invalid regular expression pattern: %2 - %1 は有効な正規表現ではありません。: %2 - - - - %1 is an invalid flag for regular expressions. Valid flags are: - %1 は正規表現において無効なフラグです。使用可能なフラグは次の通りです: - - - - If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. - もし、最初の引数が空白からなる文字列か、長さが0 (名前空間をともなわない)である場合、プレフィックスを指定することはできません。しかし、プレフィックスとして %1 が指定されています。 - - - - It will not be possible to retrieve %1. - %1 を取得することはできないかもしれません。 - - - - The default collection is undefined - デフォルトのコレクションが定義されていません - - - - %1 cannot be retrieved - %1 を取得できません - - - - The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). - つまり、空白の文字です、はどうでもいいよね。 - 正規化された表現 %1 はサポートされていません。サポートされている表現は、%2, %3, %4, %5 のみです。 - - - - A zone offset must be in the range %1..%2 inclusive. %3 is out of range. - ゾーンオフセットは、%1 から %2 の範囲である必要があります(境界を含む)。%3 は範囲外です。 - - - - %1 is not a whole number of minutes. - %1 は、分を現す値ではありません。 - - - - The URI cannot have a fragment - この URI はフラグメントをもつことはできません - - - - Required cardinality is %1; got cardinality %2. - カーディナリティ %1 が必要です。%2 ではありません。 - - - - The item %1 did not match the required type %2. - アイテム %1 は、要求された型 %2 にマッチしません。 - - - - Attribute %1 cannot appear on the element %2. Only the standard attributes can appear. - エレメント %2 に属性 %1 を指定することはできません。標準の属性のみが許可されています。 - - - - Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes. - エレメント %2 に属性 %1 を指定することはできません。%3 と標準の属性のみが許可されています。 - - - - Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes. - エレメント %2 に属性 %1 を指定することはできません。%3, %4 と標準の属性のみが許可されています。 - - - - Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes. - エレメント %2 に %1 は指定できません。%3 と標準の属性のみが指定できます。 - - - - XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is. - XSLT エレメントに対するXSLT属性は、名前空間がnullでなければなりません。%1 は使用できません。 - - - - The attribute %1 must appear on element %2. - 属性 %1 は、エレメント %2 にのみ記述できます。 - - - - The element with local name %1 does not exist in XSL-T. - ローカル名 %1 のエレメントは、XSLTに存在しません。 - - - - The variable %1 is unused - 値 %1 は使用されませんでした - - - - A construct was encountered which only is allowed in XQuery. - XQuery でのみ許可されている construct に遭遇しました。 - - - - - %1 is an unknown schema type. - %1 はサポートされていないスキーマのタイプです。 - - - - A template by name %1 has already been declared. - テンプレート名 '%1' は、既に宣言されています。 - - - - %1 is not a valid numeric literal. - %1 は数値リテラルとして無効です。 - - - - Only one %1 declaration can occur in the query prolog. - クェリーのプロローグでは、%1 は一回のみ宣言できます。 - - - - The initialization of variable %1 depends on itself - 再帰? - 値 %1 の初期化は、それ自身に依存しています - - - - No variable by name %1 exists - 変数 %1 は存在しません - - - - Version %1 is not supported. The supported XQuery version is 1.0. - バージョン %1 はサポートされていません。XQuery バージョン 1.0 のみサポートされています。 - - - - The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. - エンコーディング '%1' は無効です。ラテン文字 (空白を除く) からなるもので、正規表現 '%2' にマッチするもののみ使用できます。 - - - - No function with signature %1 is available - シグネチャ %1 をもつ関数がみつかりません - - - - - A default namespace declaration must occur before function, variable, and option declarations. - 標準の名前空間の宣言は、関数、変数、オプションの宣言の前にしなければなりません。 - - - - Namespace declarations must occur before function, variable, and option declarations. - 名前空間の宣言は、関数、変数、オプションの宣言の前にしなければなりません。 - - - - Module imports must occur before function, variable, and option declarations. - モジュールのインポートは、関数、変数、オプションの宣言の前にしなければなりません。 - - - - The keyword %1 cannot occur with any other mode name. - キーワード %1 は、他の名をともなって使用することはできません。 - - - - The value of attribute %1 must of type %2, which %3 isn't. - 属性 '%1' の値として '%3' が指定されましたが、型 '%2' でなければなりません。 - - - - It is not possible to redeclare prefix %1. - プレフィックス '%1' を再定義することはできません。 - - - - The prefix %1 can not be bound. By default, it is already bound to the namespace %2. - プレフィックス '%1' はバウンドできません。デフォルトでは、それは既に名前空間 '%2' にバウンドされています。 - - - - Prefix %1 is already declared in the prolog. - プロローグ部において、プレフィックス '%1' はすでに宣言されています。 - - - - The name of an option must have a prefix. There is no default namespace for options. - オプションの名前はプレフィックスをもたなければなりません。このオプションに対するデフォルトの名前空間は存在しません。 - - - - The Schema Import feature is not supported, and therefore %1 declarations cannot occur. - このスキーマのインポート機能は使用できません。また、'%1' 宣言も使用できません。 - - - - The target namespace of a %1 cannot be empty. - 名前空間 '%1' は、空であってはなりません。 - - - - The module import feature is not supported - モジュールインポートの機能はサポートされていません - - - - A variable by name %1 has already been declared. - 名前 '%1' の変数は、すでに宣言されています。 - - - - No value is available for the external variable by name %1. - 外部変数 '%1' の値がみつかりません。 - - - - A stylesheet function must have a prefixed name. - スタイルシート関数は、プレフィックス名を持たなければなりません。 - - - - The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) - ユーザ定義の関数の名前空間は、空であってはなりません。(すでに定義されているプレフィックス '%1' が使用できます) - - - - The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. - 名前空間 '%1' は予約済です。ユーザ定義の関数では使用することはできません。プレフィックス '%2' が使用できます。 - - - - The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 - ライブラリモジュールで使用されている名前空間は、モジュールの名前空間と同一でなければなりません。つまり、'%2' ではなく、'%1' でなければなりません - - - - A function already exists with the signature %1. - シグネチャー '%1' の関数はすでに存在しています。 - - - - No external functions are supported. All supported functions can be used directly, without first declaring them as external - 外部関数はサポートされていません。すべてのサポートされている関数は、外部宣言をすることなく、直接使用することができます - - - - An argument by name %1 has already been declared. Every argument name must be unique. - 引数名 '%1' は既に宣言されています。すべての引数名はユニークである必要があります。 - - - - When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. - パターン一致の内側で関数 '%1' を使用する場合、引数はリテラルな文字列を参照する値でなければなりません。 - - - - In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. - XSL-T パターンマッチングにおいて、関数 '%1' の最初の引数は、リテラルな文字列でなければなりません。 - - - - In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. - variable ref? - XSL-T パターンマッチングにおいて、関数 '%1' への最初の引数は、リテラルか変数でなければなりません。 - - - - In an XSL-T pattern, function %1 cannot have a third argument. - XSL-T パターンにおいて、関数 '%1' は三つの引数をもつことはできません。 - - - - In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. - XSL-T パターンマッチングにおいて、関数 '%1' と '%2' のみ使用できます。'%3' は使用できません。 - - - - In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. - XSL-T パターンにおいて、axis %1 は使用できません。%2 または %3 のみ使用できます。 - - - - %1 is an invalid template mode name. - %1 はテンプレートモジュール名として無効です。 - - - - The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. - for 構文において使用する変数は、場所に関する変数とは異なる必要があります。つまり、'%1' が重複して使用されています。 - - - - The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. - スキーマの検証機能はサポートされていません。よって、'%1' 構文は使用できません。 - - - - None of the pragma expressions are supported. Therefore, a fallback expression must be present - pragma 構文はサポートされていません。fallback 構文でなければなりません - - - - Each name of a template parameter must be unique; %1 is duplicated. - テンプレートパラメータ名はユニークである必要があります。'%1' は重複しています。 - - - - The %1-axis is unsupported in XQuery - XQuery において、%1 axis はサポートされていません - - - - No function by name %1 is available. - 関数名 '%1' はみつかりません。 - - - - The namespace URI cannot be the empty string when binding to a prefix, %1. - プレフィックス '%1' にバインディングする名前空間の URI は、空であってはなりません。 - - - - %1 is an invalid namespace URI. - %1 は名前空間 URI として無効です。 - - - - It is not possible to bind to the prefix %1 - プレフィックス %1 にバインドすることはできません - - - - Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). - ? - 名前空間 %1 は %2 にのみバウンドできます。 - - - - Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). - プリフィックス %1 は %2 にのみバウンドできます。 - - - - Two namespace declaration attributes have the same name: %1. - 二つの名前空間宣言の属性が、同じ名前 '%1' をもっています。 - - - - The namespace URI must be a constant and cannot use enclosed expressions. - 名前空間 URI は、constantでなければなりません。式を含むことはできません。 - - - - An attribute by name %1 has already appeared on this element. - 属性名 '%1' は、すでにこのエレメントで使用されています。 - - - - A direct element constructor is not well-formed. %1 is ended with %2. - 直積的な指定のエレメントがwell formedではありません。'%1' が、'%2' で終わっています。 - - - - The name %1 does not refer to any schema type. - 名前 '%1' は、なんのスキーマタイプも参照していません。 - - - - %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. - '%1' は complex 型です。complex 型への型変換はできません。しかし、アトミックな型である '%2' への変換はできます。 - - - - %1 is not an atomic type. Casting is only possible to atomic types. - '%1' はアトミックな型ではありません。型変換はアトミックな型に対してのみ可能です。 - - - - %1 is not a valid name for a processing-instruction. - 処理指定において、'%1' は無効です。 - - - - - %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. - '%1' は、スコープ属性宣言ではありません。スキーマインポート機能はサポートされていません。 - - - - The name of an extension expression must be in a namespace. - 拡張式 (extension expression) の名前は、名前空間の中になければなりません。 - - - - Element %1 is not allowed at this location. - この場所にエレメント '%1' をおくことは許されていません。 - - - - Text nodes are not allowed at this location. - この場所にテキストノードをおくことは許されていません。 - - - - Parse error: %1 - パースエラー: %1 - - - - The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. - XSL-T バージョン属性の値は、'%1' 型でなければなりません。'%2' はそうではありません。 - - - - Running an XSL-T 1.0 stylesheet with a 2.0 processor. - XSL-T 1.0 のスタイルシートを 2.0 のプロセッサで使用します。 - - - - Unknown XSL-T attribute %1. - 未知の XSL-T 属性 %1 があります。 - - - - Attribute %1 and %2 are mutually exclusive. - 属性 '%1' と '%2' は排他的にのみ使用できます。 - - - - In a simplified stylesheet module, attribute %1 must be present. - simplified stylesheet モジュールにおいては、属性 '%1' を指定されなければなりません。 - - - - If element %1 has no attribute %2, it cannot have attribute %3 or %4. - エレメント '%1' が属性 '%2' を持たない場合は、属性 '%3' や '%4' を使用することはできません。 - - - - Element %1 must have at least one of the attributes %2 or %3. - エレメント '%1' は、属性 '%2' か '%3' のいずれかを持たなければなりません。 - - - - At least one mode must be specified in the %1-attribute on element %2. - エレメント '%2' において、'%1' 属性は少くとも一つのモードを指定しなければなりません。 - - - - Element %1 must come last. - エレメント %1 は最後になければなりません。 - - - - At least one %1-element must occur before %2. - %2 の前に、少くとも一つは %1 エレメントが存在しなければなりません。 - - - - Only one %1-element can appear. - %1 エレメントは一つのみ存在しなければなりません。 - - - - At least one %1-element must occur inside %2. - %2 の内側には、少くとも一つの '%1' エレメントが存在しなければなりません。 - - - - When attribute %1 is present on %2, a sequence constructor cannot be used. - %2 に属性 %1 がある場合、sequence constructor は使用できません。 - - - - Element %1 must have either a %2-attribute or a sequence constructor. - エレメント %1 には、%2 属性またはsequence constructorがなければなりません。 - - - - When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. - パラメータが要求されているときには、デフォルトの値は、%1 属性または sequence constructor によって指定されていてはなりません。 - - - - Element %1 cannot have children. - エレメント %1 は、子要素を持つことができません。 - - - - Element %1 cannot have a sequence constructor. - エレメント %1 は、sequence constructor を含むことができません。 - - - - - The attribute %1 cannot appear on %2, when it is a child of %3. - %2 が %3 の子要素であるときは、属性 %1 を使用してはなりません。 - - - - A parameter in a function cannot be declared to be a tunnel. - 関数へのパラメータは、トンネルであってはなりません。 - - - - This processor is not Schema-aware and therefore %1 cannot be used. - この処理系は、Schema-aware ではありません。よって、%1 は使用できません。 - - - - Top level stylesheet elements must be in a non-null namespace, which %1 isn't. - トップレベルのスタイルシートのエレメントは、non-nullな名前空間を持っていなければなりません。しかし、%1 はそうではありません。 - - - - The value for attribute %1 on element %2 must either be %3 or %4, not %5. - エレメント %2 の属性 %1 の値は、%3 または %4 でなければなりません。%5 は異なります。 - - - - Attribute %1 cannot have the value %2. - 属性 %1 に、値 %2 を指定することはできません。 - - - - The attribute %1 can only appear on the first %2 element. - 属性 %1 は、最初の %2 エレメントにのみ指定できます。 - - - - At least one %1 element must appear as child of %2. - %2 の子要素としては、少くとも一つは %1 エレメントがなければなりません。 - - - - empty - - - - - zero or one - ゼロまたは一つ - - - - exactly one - 厳密に一つ - - - - one or more - 一つまたは複数 - - - - zero or more - ゼロまたはそれ以上 - - - - Required type is %1, but %2 was found. - 要求されている型は %1 ですが、 %2 があります。 - - - - Promoting %1 to %2 may cause loss of precision. - %1 を %2 に変換する際に、精度のロスが生じます。 - - - - The focus is undefined. - フォーカスが定義されていません。 - - - - It's not possible to add attributes after any other kind of node. - 他の種類のノードの中では、属性を追加することはできません。 - - - - An attribute by name %1 has already been created. - 名前 '%1' の属性は、すでに生成されています。 - - - - Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. - UNICODE Codepoint Collection のみ使用できます(%1)。 %2 はサポートされていません。 - - - - QPluginLoader - - - Unknown error - 不明なエラー - - - - The plugin was not loaded. - そのプラグインはロードされていません。 - - - - QPrintDialog - - Page size: - ページサイズ: - - - Orientation: - 方向: - - - Paper source: - 給紙装置: - - - - OK - OK - - - Cancel - キャンセル - - - Portrait - - - - Landscape - - - - - locally connected - ローカルに接続しています - - - - - Aliases: %1 - エイリアス: %1 - - - - - unknown - 不明 - - - Print in color if available - 可能であればカラーで印刷 - - - Print to file - ファイルに出力: - - - Browse - 参照... - - - - Print all - すべて印刷 - - - Selection - 選択した部分を印刷 - - - - Print range - 印刷範囲 - - - Pages from - 先頭のページ: - - - to - 末尾のページ: - - - Print last page first - 末尾のページから印刷 - - - Number of copies: - 部数: - - - Paper format - 用紙の形式 - - - - A0 (841 x 1189 mm) - A0 (841 x 1189mm) - - - - A1 (594 x 841 mm) - A1 (594 x 841mm) - - - - A2 (420 x 594 mm) - A2 (420 x 594mm) - - - - A3 (297 x 420 mm) - A3 (297 x 420mm) - - - - A4 (210 x 297 mm, 8.26 x 11.7 inches) - A4 (210 x 297mm、8.26 x 11.7インチ) - - - - A5 (148 x 210 mm) - A5 (148 x 210mm) - - - - A6 (105 x 148 mm) - A6 (105 x 148mm) - - - - A7 (74 x 105 mm) - A7 (74 x 105mm) - - - - A8 (52 x 74 mm) - A8 (52 x 74mm) - - - - A9 (37 x 52 mm) - A9 (37 x 52mm) - - - - B0 (1000 x 1414 mm) - B0 (1000 x 1414mm) - - - - B1 (707 x 1000 mm) - B1 (707 x 1000mm) - - - - B2 (500 x 707 mm) - B2 (500 x 707mm) - - - - B3 (353 x 500 mm) - B3 (353 x 500mm) - - - - B4 (250 x 353 mm) - B4 (250 x 353mm) - - - - B5 (176 x 250 mm, 6.93 x 9.84 inches) - B5 (176 x 250mm、6.93 x 9.84インチ) - - - - B6 (125 x 176 mm) - B6 (125 x 176mm) - - - - B7 (88 x 125 mm) - B7 (88 x 125mm) - - - - B8 (62 x 88 mm) - B8 (62 x 88mm) - - - - B9 (44 x 62 mm) - B9 (44 x 62mm) - - - - B10 (31 x 44 mm) - B10 (31 x 44mm) - - - - C5E (163 x 229 mm) - C5E (163 x 229mm) - - - - DLE (110 x 220 mm) - DLE (110 x 220mm) - - - - Executive (7.5 x 10 inches, 191 x 254 mm) - Executive (7.5 x 10インチ、191 x 254mm) - - - - Folio (210 x 330 mm) - Folio (210 x 330mm) - - - - Ledger (432 x 279 mm) - Ledger (432 x 279mm) - - - - Legal (8.5 x 14 inches, 216 x 356 mm) - Legal (8.5 x 14インチ、216 x 356mm) - - - - Letter (8.5 x 11 inches, 216 x 279 mm) - Letter (8.5 x 11インチ、216 x 279mm) - - - - Tabloid (279 x 432 mm) - Tabloid (279 x 432mm) - - - - US Common #10 Envelope (105 x 241 mm) - US Common #10 Envelope (105 x 241mm) - - - Print dialog - プリントダイアログ - - - Size: - サイズ: - - - Printer - プリンタ - - - Properties - プロパティ - - - Printer info: - プリンタ情報: - - - Copies - 印刷部数 - - - Collate - 丁合い - - - Other - その他 - - - Double side printing - 両面印刷 - - - - - - Print - 印刷 - - - File - ファイル - - - - Print To File ... - ファイルへ出力... - - - - File %1 is not writable. -Please choose a different file name. - ファイル %1 は書き込み可能ではありません。 -別のファイル名を選んでください。 - - - - %1 already exists. -Do you want to overwrite it? - %1 はすでに存在します。 -上書きしますか? - - - - File exists - ファイルは既に存在しています - - - - <qt>Do you want to overwrite it?</qt> - <qt>ファイルを上書きしてもよろしいですか?</qt> - - - - Print selection - 選択された範囲を印刷 - - - - %1 is a directory. -Please choose a different file name. - %1 はディレクトリです。 -ファイル名を指定してください。 - - - - A0 - A0 - - - - A1 - A1 - - - - A2 - A2 - - - - A3 - A3 - - - - A4 - A4 - - - - A5 - A5 - - - - A6 - A6 - - - - A7 - A7 - - - - A8 - A8 - - - - A9 - A9 - - - - B0 - B0 - - - - B1 - B1 - - - - B2 - B2 - - - - B3 - B3 - - - - B4 - B4 - - - - B5 - B5 - - - - B6 - B6 - - - - B7 - B7 - - - - B8 - B8 - - - - B9 - B9 - - - - B10 - B10 - - - - C5E - C5E - - - - DLE - DLE - - - - Executive - Exclusive - - - - Folio - Folio - - - - Ledger - Ledger - - - - Legal - リーガルサイズ - - - - Letter - レターサイズ - - - - Tabloid - タブロイドサイズ - - - - US Common #10 Envelope - US標準#10封筒 - - - - Custom - カスタム - - - - - &Options >> - オプション(&O) >> - - - - &Print - 印刷(&P) - - - - &Options << - オプション(&O) << - - - - Print to File (PDF) - PDFファイルに出力 - - - - Print to File (Postscript) - Postscriptファイルに出力 - - - - Local file - ローカルファイル - - - - Write %1 file - ファイル %1 に書き込みました - - - - The 'From' value cannot be greater than the 'To' value. - QPrintPropertiesWidgetにFromとToがあってそれを指している - 印刷開始ページ番号は、印刷終了ページ番号より小さくなければなりません。 - - - - QPrintPreviewDialog - - - - Page Setup - ページの設定 - - - - %1% - %1% - - - - Print Preview - 印刷のプレビュー - - - - Next page - 次のページ - - - - Previous page - 前のページ - - - - First page - 最初のページ - - - - Last page - 最後のページ - - - - Fit width - 幅をあわせる - - - - Fit page - 高さをあわせる - - - - Zoom in - 拡大 - - - - Zoom out - 縮小 - - - - Portrait - - - - - Landscape - - - - - Show single page - 一枚のページを表示する - - - - Show facing pages - 見開きのページを表示する - - - - Show overview of all pages - すべてのページを表示する - - - - Print - 印刷 - - - - Page setup - ページの設定 - - - Close - 閉じる - - - - Export to PDF - PDFに出力 - - - - Export to PostScript - Postscriptに出力 - - - - QPrintPropertiesDialog - - PPD Properties - 印刷プロパティのダイアログのプロパティ - - - Save - 保存 - - - OK - OK - - - - QPrintPropertiesWidget - - - Form - 書式 - - - - Page - ページ - - - - Advanced - 高度な設定 - - - - QPrintSettingsOutput - - - Form - 書式 - - - - Copies - 印刷部数 - - - - Print range - 印刷範囲 - - - - Print all - すべて印刷 - - - - Pages from - 先頭のページ - - - - to - 末尾のページ - - - - Selection - 選択した部分を印刷 - - - - Output Settings - 出力設定 - - - - Copies: - 印刷部数: - - - - Collate - 丁合い - - - - Reverse - 逆順 - - - - Options - オプション - - - - Color Mode - - - - - Color - カラー - - - - Grayscale - グレースケール - - - - Duplex Printing - 両面印刷 - - - - None - なし - - - - Long side - 長辺綴じ - - - - Short side - 短辺綴じ - - - - QPrintWidget - - - Form - 書式 - - - - Printer - プリンタ - - - - &Name: - 名前(&N): - - - - P&roperties - プロパティ(&r) - - - - Location: - 設置場所: - - - - Preview - プレビュー - - - - Type: - タイプ: - - - - Output &file: - 出力ファイル名(&f): - - - - ... - ... - - - - QProcess - - - - Could not open input redirection for reading - 標準入力リダイレクトを読み込みのためにオープンすることができません - - - - - Could not open output redirection for writing - 標準出力リダイレクトを書き込みのためにオープンすることができません - - - - Resource error (fork failure): %1 - リソースエラー (fork に失敗しました): %1 - - - - - - - - - - - - Process operation timed out - プロセス処理がタイムアウトしました - - - - - - - Error reading from process - プロセスからの読み込みにおいてエラーが発生しました - - - - - - Error writing to process - プロセスへの書き込みにおいてエラーが発生しました - - - - Process crashed - プロセスがクラッシュしました - - - - No program defined - プログラム名が指定されていません - - - - Process failed to start - プロセスのスタートに失敗しました - - - - QProgressDialog - - - Cancel - キャンセル - - - - QPushButton - - - Open - オープン - - - - QRadioButton - - - Check - 選択 - - - - QRegExp - - - no error occurred - エラーは発生しませんでした - - - - disabled feature used - 無効な機能が使用されました - - - - bad char class syntax - 不正なcharクラス構文 - - - - bad lookahead syntax - 不正なlookahead構文 - - - - bad repetition syntax - 不正なrepetition構文 - - - - invalid octal value - 無効な8進値 - - - - missing left delim - 左の区切り文字がありません - - - - unexpected end - 予期しない末尾です - - - - met internal limit - 内部制限を満たしました - - - - QSQLite2Driver - - - Error to open database - データベースのオープンでエラーが発生しました - - - - Unable to begin transaction - トランザクションを開始できません - - - - Unable to commit transaction - トランザクションをコミットできません - - - - Unable to rollback Transaction - トランザクションをロールバックできません - - - - QSQLite2Result - - - Unable to fetch results - 実行結果をフェッチできません - - - - Unable to execute statement - ステートメントを実行できません - - - - QSQLiteDriver - - - Error opening database - データベースのオープンでエラーが発生しました - - - - Error closing database - データベースのクローズでエラーが発生しました - - - - Unable to begin transaction - トランザクションを開始できません - - - - Unable to commit transaction - トランザクションをコミットできません - - - Unable to roll back transaction - トランザクションをロールバックできません - - - - Unable to rollback transaction - トランザクションをロールバックできません - - - - QSQLiteResult - - - - - Unable to fetch row - レコードをフェッチできません - - - - Unable to execute statement - ステートメントを実行できません - - - - Unable to reset statement - ステートメントをリセットできません - - - - Unable to bind parameters - パラメータをバインドできません - - - - Parameter count mismatch - パラメータの数が合っていません - - - - No query - クェリーがありません - - - - QScrollBar - - - Scroll here - ここにスクロール - - - - Left edge - 左端 - - - - Top - 上端 - - - - Right edge - 右端 - - - - Bottom - 下端 - - - - Page left - 1ページ左へスクロール - - - - - Page up - 1ページ戻る - - - - Page right - 1ページ右へスクロール - - - - - Page down - 1ページ進む - - - - Scroll left - 左へスクロール - - - - Scroll up - 上へスクロール - - - - Scroll right - 右へスクロール - - - - Scroll down - 下へスクロール - - - - Line up - 1行上へ - - - - Position - 位置 - - - - Line down - 1行下へ - - - - QSharedMemory - - - %1: unable to set key on lock - 共有メモリ関連 - %1: ロックするためのキーを設定できません - - - - %1: create size is less then 0 - %1: 0より小さいサイズの共有メモリは作成できません - - - - - %1: unable to lock - %1: ロックできません - - - - %1: unable to unlock - %1: アンロックできません - - - - - %1: permission denied - %1: 許可されていません - - - - - %1: already exists - %1: 既に存在します - - - - - %1: doesn't exists - %1: 存在しません - - - - - %1: out of resources - %1: リソース不足です - - - - - %1: unknown error %2 - %1: 未知のエラー %2 - - - - %1: key is empty - %1: キーが空です - - - - %1: unix key file doesn't exists - ? - %1: UNIX key file が存在しません - - - - %1: ftok failed - %1: fork に失敗しました - - - - - %1: unable to make key - %1: キーを作成できません - - - - %1: system-imposed size restrictions - EINVAL - %1: 指定されたサイズはシステムにより拒否されました - - - - %1: not attached - %1: アタッチしていません - - - - %1: invalid size - %1: 無効なサイズです - - - - %1: key error - safekey.isEmpty()==true - %1: キーかありません - - - - %1: size query failed - %1: サイズのクェリーに失敗しました - - - - QShortcut - - - Space - Space - - - - Esc - Esc - - - - Tab - Tab - - - - Backtab - Backtab - - - - Backspace - Backspace - - - - Return - Return - - - - Enter - Enter - - - - Ins - Ins - - - - Del - Del - - - - Pause - Pause - - - - Print - Print - - - - SysReq - SysReq - - - - Home - Home - - - - End - End - - - - Left - - - - - Up - - - - - Right - - - - - Down - - - - - PgUp - PgUp - - - - PgDown - PgDown - - - - CapsLock - CapsLock - - - - NumLock - NumLock - - - - ScrollLock - ScrollLock - - - - Menu - メニュー - - - - Help - ヘルプ - - - - Back - 戻る - - - - Forward - 進む - - - - Stop - 停止 - - - - Refresh - 更新間隔 - - - - Volume Down - 音量を下げる - - - - Volume Mute - 消音 - - - - Volume Up - 音量を上げる - - - - Bass Boost - 低音ブースト - - - - Bass Up - 低音を上げる - - - - Bass Down - 低音を下げる - - - - Treble Up - 高音を上げる - - - - Treble Down - 高音を下げる - - - - Media Play - メディアの再生 - - - - Media Stop - メディアの停止 - - - - Media Previous - 前のメディア - - - - Media Next - 次のメディア - - - - Media Record - メディアの録音 - - - - Home Page - ホームページ - - - - Favorites - お気に入り - - - - Search - 検索 - - - - Standby - スタンバイ - - - - Open URL - URLを開く - - - - Launch Mail - メールの起動 - - - - Launch Media - メディアの起動 - - - - Launch (0) - (0)の起動 - - - - Launch (1) - (1)の起動 - - - - Launch (2) - (2)の起動 - - - - Launch (3) - (3)の起動 - - - - Launch (4) - (4)の起動 - - - - Launch (5) - (5)の起動 - - - - Launch (6) - (6)の起動 - - - - Launch (7) - (7)の起動 - - - - Launch (8) - (8)の起動 - - - - Launch (9) - (9)の起動 - - - - Launch (A) - (A)の起動 - - - - Launch (B) - (B)の起動 - - - - Launch (C) - (C)の起動 - - - - Launch (D) - (D)の起動 - - - - Launch (E) - (E)の起動 - - - - Launch (F) - (F)の起動 - - - - Print Screen - Print Screen - - - - Page Up - Page Up - - - - Page Down - Page Down - - - - Caps Lock - Caps Lock - - - - Num Lock - Num Lock - - - - Number Lock - Number Lock - - - - Scroll Lock - Scroll Lock - - - - Insert - Insert - - - - Delete - Delete - - - - Escape - Escape - - - - System Request - System Request - - - - Select - Select - - - - Yes - はい - - - - No - いいえ - - - - Context1 - Context1 - - - - Context2 - Context2 - - - - Context3 - Context3 - - - - Context4 - Context4 - - - - Call - Call - - - - Hangup - Hangup - - - - Flip - Flip - - - - - Ctrl - Ctrl - - - - - Shift - Shift - - - - - Alt - Alt - - - - - Meta - Meta - - - - + - + - - - - F%1 - F%1 - - - - QSlider - - - Page left - 1ページ左へスクロール - - - - Page up - 1ページ戻る - - - - Position - 位置 - - - - Page right - 1ページ右へスクロール - - - - Page down - 1ページ進む - - - - QSocks5SocketEngine - - - Connection to proxy refused - プロキシーへの接続が拒否されました - - - - Connection to proxy closed prematurely - プロキシーの接続が通信の終了前に切断されました - - - - Proxy host not found - プロキシーホストが見つかりません - - - - Connection to proxy timed out - プロキシーとの接続がタイムアウトしました - - - - Proxy authentication failed - プロキシーの認証に失敗しました - - - - Proxy authentication failed: %1 - プロキシーの認証に失敗しました: %1 - - - - SOCKS version 5 protocol error - SOCKS バージョン 5 プロトコルのエラーです - - - - General SOCKSv5 server failure - SOCKS バージョン 5 サーバのエラーです - - - - Connection not allowed by SOCKSv5 server - SOCKSv5 サーバより接続を拒否されました - - - - TTL expired - 実際はホップ数です - 有効期限(TTL)がきれました - - - - SOCKSv5 command not supported - この SOCKSv5 コマンドはサポートされていません - - - - Address type not supported - 指定されたアドレスタイプはサポートされていません - - - - Unknown SOCKSv5 proxy error code 0x%1 - 未知の SOCKSv5 プロキシーエラーです: 0x%1 - - - Socks5 timeout error connecting to socks server - Socks5 はソックスサーバ接続しようとしてタイムアウトになりました - - - - Network operation timed out - ネットワーク操作がタイムアウトしました - - - - QSpinBox - - - More - 増やす - - - - Less - 減らす - - - - QSql - - - Delete - 削除 - - - - Delete this record? - このレコードを削除しますか? - - - - - - Yes - はい - - - - - - No - いいえ - - - - Insert - 挿入 - - - - Update - アップデート - - - - Save edits? - 編集内容を保存しますか? - - - - Cancel - キャンセル - - - - Confirm - 確認 - - - - Cancel your edits? - 編集をキャンセルしますか? - - - - QSslSocket - - - Error creating SSL context (%1) - SSL content の作成に失敗しました (%1) - - - - Invalid or empty cipher list (%1) - 暗号方式リストが無効または空です (%1) - - - - Cannot provide a certificate with no key, %1 - 鍵が指定されていないため、証明書を扱えません。 %1 - - - - Error loading local certificate, %1 - ローカルの証明書をロードできません。 %1 - - - - Error loading private key, %1 - プライベートキーをロードできません。 %1 - - - - Private key does not certificate public key, %1 - プライベートキーが、パブリックキーの証明書となっていません %1 - - - - Error creating SSL session, %1 - SSL セッションを作成できません。 %1 - - - - Error creating SSL session: %1 - SSL セッションを作成できません: %1 - - - - Unable to write data: %1 - 書き込みできません: %1 - - - - Error while reading: %1 - 読み込み時にエラーが発生しました: %1 - - - - Error during SSL handshake: %1 - SSL ハンドシェーク時にエラーが発生しました: %1 - - - - QSystemSemaphore - - - - %1: out of resources - %1: リソース不足です - - - - - %1: permission denied - %1: 許可されていません - - - - %1: already exists - %1: 既に存在します - - - - %1: does not exist - %1: 存在しません - - - - - %1: unknown error %2 - %1: 未知のエラーです %2 - - - - QTDSDriver - - - Unable to open connection - 接続をオープンできません - - - - Unable to use database - データベースを使用できません - - - - QTabBar - - - Scroll Left - 左へスクロール - - - - Scroll Right - 右へスクロール - - - - QTcpServer - - Socket operation unsupported - ソケット操作はサポートされていません - - - - Operation on socket is not supported - このソケットへの操作はサポートされていません - - - - QTextControl - - - &Undo - 元に戻す(&U) - - - - &Redo - やり直す(&R) - - - - Cu&t - 切り取り(&T) - - - - &Copy - コピー(&C) - - - - Copy &Link Location - リンクの場所をコピー(&L) - - - - &Paste - 貼り付け(&P) - - - - Delete - 削除 - - - - Select All - すべてを選択 - - - - QToolButton - - - - Press - 押す - - - - - Open - オープン - - - - QUdpSocket - - - This platform does not support IPv6 - このプラットフォームは IPv6 をサポートしていません - - - - QUndoGroup - - - Undo - 元に戻す - - - - Redo - やり直す - - - - QUndoModel - - - <empty> - <空> - - - - QUndoStack - - - Undo - 元に戻す - - - - Redo - やり直す - - - - QUnicodeControlCharacterMenu - - - LRM Left-to-right mark - LRM (左横書き指定) - - - - RLM Right-to-left mark - RLM (右横書き指定) - - - - ZWJ Zero width joiner - ZWJ (幅のない接続文字) - - - - ZWNJ Zero width non-joiner - ZWNJ (幅のない非接続文字) - - - - ZWSP Zero width space - ZWSP (幅の無い空白) - - - - LRE Start of left-to-right embedding - LRE (左横書き開始指定) - - - - RLE Start of right-to-left embedding - RLE (右横書き開始指定) - - - - LRO Start of left-to-right override - LRO (左横書き上書き開始指定) - - - - RLO Start of right-to-left override - RLO (右横書き上書き開始指定) - - - - PDF Pop directional formatting - PDF (方向上書きの終了指定) - - - - Insert Unicode control character - Unicode制御文字を挿入 - - - - QWebFrame - - - Request cancelled - リクエストはキャンセルされました - - - - Request blocked - リクエストはブロックされました - - - - Cannot show URL - URL を表示できません - - - - Frame load interruped by policy change - ポリシーの変更により、フレームのロードが中断しました - - - - Cannot show mimetype - MIME Type を表示できません - - - - File does not exist - ファイルが存在しません - - - - QWebPage - - - Bad HTTP request - 誤った HTTP のリクエストです - - - - Submit - default label for Submit buttons in forms on web pages - 送信 - - - - Submit - Submit (input element) alt text for <input> elements with no alt, title, or value - 送信 - - - - Reset - default label for Reset buttons in forms on web pages - リセット - - - - This is a searchable index. Enter search keywords: - text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' - 検索が可能です。検索のためのキーワードを入力してください: - - - - Choose File - title for file button used in HTML forms - ファイルを選ぶ - - - - No file selected - text to display in file button used in HTML forms when no file is selected - ファイルが選択されていません - - - - Open in New Window - Open in New Window context menu item - 新しいウィンドウで開く - - - - Save Link... - Download Linked File context menu item - リンク先を保存... - - - - Copy Link - Copy Link context menu item - リンク先をコピー - - - - Open Image - Open Image in New Window context menu item - イメージを開く - - - - Save Image - Download Image context menu item - 画像を保存 - - - - Copy Image - Copy Link context menu item - 画像をコピー - - - - Open Frame - Open Frame in New Window context menu item - フレームを新しいウィンドウで開く - - - - Copy - Copy context menu item - コピー - - - - Go Back - Back context menu item - 戻る - - - - Go Forward - Forward context menu item - 進む - - - - Stop - Stop context menu item - 停止 - - - - Reload - Reload context menu item - リロード - - - - Cut - Cut context menu item - 切り取り - - - - Paste - Paste context menu item - 貼り付け - - - - No Guesses Found - No Guesses Found context menu item - 推測候補はありません - - - - Ignore - Ignore Spelling context menu item - 無視 - - - - Add To Dictionary - Learn Spelling context menu item - 辞書に追加 - - - - Search The Web - Search The Web context menu item - Web を検索 - - - - Look Up In Dictionary - Look Up in Dictionary context menu item - 辞書から探す - - - - Open Link - Open Link context menu item - リンクを開く - - - - Ignore - Ignore Grammar context menu item - 無視 - - - - Spelling - Spelling and Grammar context sub-menu item - スペル - - - - Show Spelling and Grammar - menu item title - スペルと文法を表示 - - - - Hide Spelling and Grammar - menu item title - スペルと文法を隠す - - - - Check Spelling - Check spelling context menu item - スペルをチェックする - - - - Check Spelling While Typing - Check spelling while typing context menu item - 入力中にスペルをチェックする - - - - Check Grammar With Spelling - Check grammar with spelling context menu item - スペルおよび文法をチェックする - - - - Fonts - Font context sub-menu item - フォント - - - - Bold - Bold context menu item - 太字 - - - - Italic - Italic context menu item - イタリック - - - - Underline - Underline context menu item - 下線 - - - - Outline - Outline context menu item - アウトライン - - - - Direction - Writing direction context sub-menu item - 方向 - - - - Text Direction - Text direction context sub-menu item - テキストの方向 - - - - Default - Default writing direction context menu item - デフォルト - - - - LTR - Left to Right context menu item - 左横書き - - - - RTL - Right to Left context menu item - 右横書き - - - - Inspect - Inspect Element context menu item - ? - 検査 - - - - No recent searches - Label for only item in menu that appears when clicking on the search field image, when no searches have been performed - 検索の履歴はありません - - - - Recent searches - label for first item in the menu that appears when clicking on the search field image, used as embedded menu title - 検索の履歴 - - - - Clear recent searches - menu item in Recent Searches menu that empties menu's contents - 検索の履歴をクリア - - - - Unknown - Unknown filesize FTP directory listing item - 不明 - - - - %1 (%2x%3 pixels) - Title string for images - %1 (%2x%3 ピクセル) - - - - Web Inspector - %2 - Web の検査 - %2 - - - - Scroll here - ここにスクロール - - - - Left edge - 左端 - - - - Top - 上端 - - - - Right edge - 右端 - - - - Bottom - 下端 - - - - Page left - 1ページ左へスクロール - - - - Page up - 1ページ戻る - - - - Page right - 1ページ右へスクロール - - - - Page down - 1ページ進む - - - - Scroll left - 左へスクロール - - - - Scroll up - 上へスクロール - - - - Scroll right - 右へスクロール - - - - Scroll down - 下へスクロール - - - - %n file(s) - number of chosen file - - %n 個のファイル - - - - - JavaScript Alert - %1 - JavaScript アラート - %1 - - - - JavaScript Confirm - %1 - JavaScript 確認 - %1 - - - - JavaScript Prompt - %1 - JavaScript 質問 - %1 - - - - Move the cursor to the next character - 次の文字へカーソルを移動 - - - - Move the cursor to the previous character - 前の文字にカーソルを移動 - - - - Move the cursor to the next word - 次の単語にカーソルを移動 - - - - Move the cursor to the previous word - 前の単語にカーソルを移動 - - - - Move the cursor to the next line - 次の行にカーソルを移動 - - - - Move the cursor to the previous line - 前の行にカーソルを移動 - - - - Move the cursor to the start of the line - 文なのか行なのか - 文頭にカーソルを移動 - - - - Move the cursor to the end of the line - 文末にカーソルを移動 - - - - Move the cursor to the start of the block - ブロックの先頭にカーソルを移動 - - - - Move the cursor to the end of the block - ブロックの末尾にカーソルを移動 - - - - Move the cursor to the start of the document - 文章の先頭にカーソルを移動 - - - - Move the cursor to the end of the document - 文章の末尾にカーソルを移動 - - - - Select all - すべてを選択 - - - - Select to the next character - 次の文字を選択 - - - - Select to the previous character - 前の文字を選択 - - - - Select to the next word - 次の単語を選択 - - - - Select to the previous word - 前の単語を選択 - - - - Select to the next line - 次の行を選択 - - - - Select to the previous line - 前の行を選択 - - - - Select to the start of the line - 文頭から選択 - - - - Select to the end of the line - 文末まで選択 - - - - Select to the start of the block - ブロックの先頭から選択 - - - - Select to the end of the block - ブロックの末尾まで選択 - - - - Select to the start of the document - ドキュメントの先頭から選択 - - - - Select to the end of the document - ドキュメントの末尾まで選択 - - - - Delete to the start of the word - 単語の先頭まで削除 - - - - Delete to the end of the word - 単語の末尾まで削除 - - - - Insert a new paragraph - 新しい段落を挿入 - - - - Insert a new line - 新しい行を挿入 - - - - QWhatsThisAction - - - What's This? - ヒント? - - - - QWidget - - - * - * - - - - QWizard - - - Go Back - 戻る - - - - Continue - 続き - - - - Commit - 適用 - - - - Done - 終了 - - - - Help - ヘルプ - - - - < &Back - < 戻る(&B) - - - - &Finish - 完了(&F) - - - - Cancel - キャンセル - - - - &Help - ヘルプ(&H) - - - - &Next - 次へ(&N) - - - - &Next > - 次へ(&N) > - - - - QWorkspace - - - &Restore - 元に戻す(&R) - - - - &Move - 移動(&M) - - - - &Size - サイズを変更(&S) - - - - Mi&nimize - 最小化(&N) - - - - Ma&ximize - 最大化(&X) - - - - &Close - 閉じる(&C) - - - - Stay on &Top - 常に手前に表示(&T) - - - - - Sh&ade - シェード(&A) - - - - - %1 - [%2] - %1 - [%2] - - - - Minimize - 最小化 - - - - Restore Down - 元に戻す - - - - Close - 閉じる - - - - &Unshade - シェードを解除(&U) - - - - QXml - - - no error occurred - エラーは発生しませんでした - - - - error triggered by consumer - 消費者によってエラーが誘発されました - - - - unexpected end of file - 予期せぬファイルの終りです - - - - more than one document type definition - ドキュメントタイプの定義が複数あります - - - - error occurred while parsing element - 要素の解析中にエラーが発生しました - - - - tag mismatch - タグが一致しません - - - - error occurred while parsing content - コンテンツの解析中にエラーが発生しました - - - - unexpected character - 予期しない文字です - - - - invalid name for processing instruction - 処理の指示に無効な名前です - - - - version expected while reading the XML declaration - XML宣言を読み込むにはバージョンが必要です - - - - wrong value for standalone declaration - スタンドアロン宣言として正しくない値です - - - - encoding declaration or standalone declaration expected while reading the XML declaration - XML宣言を読み込むにはエンコーディング宣言かスタンドアローン宣言が必要です - - - - standalone declaration expected while reading the XML declaration - XML宣言を読み込むにはスタンドアローン宣言が必要です - - - - error occurred while parsing document type definition - ドキュメントタイプの定義を解析中にエラーが発生しました - - - - letter is expected - 文字が必要です - - - - error occurred while parsing comment - コメントの解析中にエラーが発生しました - - - - error occurred while parsing reference - 参照の解析中にエラーが発生しました - - - - internal general entity reference not allowed in DTD - 内部一般エンティティ参照はDTDで許されていません - - - - external parsed general entity reference not allowed in attribute value - 解析された外部一般エンティティ参照は属性値で許されていません - - - - external parsed general entity reference not allowed in DTD - 解析された外部一般エンティティ参照はDTDで許されていません - - - - unparsed entity reference in wrong context - 不正な文脈で解析されないエンティティ参照です - - - - recursive entities - 再帰的エンティティ - - - - error in the text declaration of an external entity - 外部エンティティのテキスト宣言にエラーがあります - - - - QXmlStream - - - - Extra content at end of document. - ドキュメントの末尾に余計なものがついています。 - - - - Invalid entity value. - エンティティの値が無効です。 - - - - Invalid XML character. - 無効な XML 文字です。 - - - - Sequence ']]>' not allowed in content. - このコンテキストでは、']]>' は許可されていません。 - - - - - Encountered incorrectly encoded content. - 正しくないエンコードの文脈に遭遇しました。 - - - - Namespace prefix '%1' not declared - 名前空間のブリフィックス '%1' は宣言されていません - - - - Attribute redefined. - 属性が再度指定されています。 - - - - Unexpected character '%1' in public id literal. - DTD宣言の部分 - 公開 ID 指定に使用できない文字 '%1' が使用されています。 - - - - Invalid XML version string. - 無効な XML バージョン指定です。 - - - - Unsupported XML version. - この XML のバージョンはサポートされていません。 - - - - The standalone pseudo attribute must appear after the encoding. - &ddd; は、エンコーディングを指定していないと使えないということかな。utf8だとおもうけど。 - 仮想属性指定は、エンコーディング指定の後にのみ使用できます。 - - - - %1 is an invalid encoding name. - %1 は無効なエンコーディングの名前です。 - - - - Encoding %1 is unsupported - エンコーディング '%1' はサポートされていません - - - - Standalone accepts only yes or no. - standalone の指定は yes または no のみ指定できます。 - - - - Invalid attribute in XML declaration. - XML 宣言に無効な属性がついています。 - - - - Premature end of document. - ドキュメントが途中で終わっています。 - - - - Invalid document. - 無効なドキュメントです。 - - - - Expected - 予期していた表現は、 - - - - , but got ' - ですが、取得した表現は以下のものでした ' - - - - Unexpected ' - 予期していなかった表現 ' - - - - Expected character data. - 予期していた文字列。 - - - - Recursive entity detected. - 再帰しているエンティティを発見しました。 - - - - Start tag expected. - 開始タグをよきしていましたが、みつかりません。 - - - - NDATA in parameter entity declaration. - パラメータエンティティの宣言において NDATA があります。 - - - - XML declaration not at start of document. - XML 宣言がドキュメントの先頭にありません。 - - - - %1 is an invalid processing instruction name. - XMLにそんなのあったっけ? - %1 は無効な処理指定の名前です。 - - - - Invalid processing instruction name. - 無効な処理命令です。 - - - - %1 is an invalid PUBLIC identifier. - %1 は、公開 (PUBLIC) 識別子として無効です。 - - - - - - - Illegal namespace declaration. - 無効な名前空間の指定です。 - - - - Invalid XML name. - 無効な XML 名です。 - - - - Opening and ending tag mismatch. - 開始タグと、終了タグがマッチしません。 - - - - Reference to unparsed entity '%1'. - まだパースしていないエンティティ '%1' を参照しています。 - - - - - - Entity '%1' not declared. - エンティティ '%1' は宣言されていません。 - - - - Reference to external entity '%1' in attribute value. - 属性値として、外部エンティティ '%1' を再度指定しています。 - - - - Invalid character reference. - 無効な文字への参照です。 - - - diff --git a/translations/translations.pri b/translations/translations.pri index 2edc89a..37295ff 100644 --- a/translations/translations.pri +++ b/translations/translations.pri @@ -13,7 +13,7 @@ LUPDATE += -locations relative -no-ui-lines ###### Qt Libraries -QT_TS = ar cs da de es fr he hu ja_JP pl pt ru sk sl sv uk zh_CN zh_TW +QT_TS = ar cs da de es fr he hu ja pl pt ru sk sl sv uk zh_CN zh_TW ts-qt.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \ -I../include -I../include/Qt \ -- cgit v0.12 From bf966d125d5c5fa7719ae9f9110db8742d5a4c85 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 7 Jun 2010 17:19:31 +0200 Subject: add check-ts target to auto-asses translation completeness --- translations/check-ts.pl | 85 +++++++++++++++++++++++++++++++++++++++++++ translations/check-ts.xq | 3 ++ translations/translations.pri | 5 ++- 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100755 translations/check-ts.pl create mode 100644 translations/check-ts.xq diff --git a/translations/check-ts.pl b/translations/check-ts.pl new file mode 100755 index 0000000..7b46bf5 --- /dev/null +++ b/translations/check-ts.pl @@ -0,0 +1,85 @@ +#! /usr/bin/perl -w + +use strict; + +# "qt" must come last to avoid prefix matching. +my @groups = ("assistant", "designer", "linguist", "qt_help", "qtconfig", "qvfb", "qt"); + +my %scores = (); +my %langs = (); + +my $files = join("\n", <*.ts>); +my $res = `xmlpatterns -param files=\"$files\" check-ts.xq`; +for my $i (split(/ /, $res)) { + $i =~ /^([^.]+).ts:(.*)$/; + my ($fn, $pc) = ($1, $2); + for my $g (@groups) { + if ($fn =~ /^${g}_(.*)$/) { + my $lang = $1; + $scores{$g}{$lang} = $pc; + $langs{$lang} = 1; + last; + } + } +} + +# now we move "qt" to the front, as it should be the first column. +pop @groups; +unshift @groups, "qt"; + +my $code = ""; + +print "L10n "; +for my $g (@groups) { + print " ".$g." "; +} +print "\n"; +for my $lang (sort(keys(%langs))) { + printf "%-5s ", $lang; + my $qt = 1; + my $rest = 1; + my $line = ""; + for my $g (@groups) { + my $pc = $scores{$g}{$lang}; + $pc = "0" if !defined($pc); + if (int($pc) < 98 or !$qt) { + if ($g eq "qt") { + $qt = 0; + } else { + $rest = 0; + } + } else { + $line .= " ".$g."_".$lang.".ts"; + } + printf " %-".(length($g)+1)."s", $pc; + } + if ($qt) { + $code .= " \\\n ".$line; + if (!$rest) { + print " (partial)"; + } + } else { + print " (excluded)"; + } + print "\n"; +} + +my $fn = "translations.pro"; +my $nfn = $fn."new"; +open IN, $fn or die; +open OUT, ">".$nfn or die; +while (1) { + $_ = ; + last if (/^TRANSLATIONS /); + print OUT $_; +} +while ($_ =~ /\\\n$/) { + $_ = ; +} +print OUT "TRANSLATIONS =".$code."\n"; +while () { + print OUT $_; +} +close OUT; +close IN; +rename $nfn, $fn; diff --git a/translations/check-ts.xq b/translations/check-ts.xq new file mode 100644 index 0000000..2d6404c --- /dev/null +++ b/translations/check-ts.xq @@ -0,0 +1,3 @@ +for $file in tokenize($files, codepoints-to-string(10)) + let $fresh := doc($file)/TS/context/message[not (translation/@type = 'obsolete')] + return concat($file, ":", count($fresh/translation[not (@type = 'unfinished')]) * 100 idiv count($fresh)) diff --git a/translations/translations.pri b/translations/translations.pri index 37295ff..9ab72fc 100644 --- a/translations/translations.pri +++ b/translations/translations.pri @@ -73,5 +73,8 @@ ts-qvfb.depends = sub-tools ts.depends = ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb +check-ts.commands = (cd $$PWD && perl check-ts.pl) +check-ts.depends = ts + QMAKE_EXTRA_TARGETS += ts-qt ts-designer ts-linguist ts-assistant ts-qtconfig ts-qvfb \ - ts + ts check-ts -- cgit v0.12 From d0a27b157c6a5d3cf4b75c6b1b71de399733f553 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 4 Jun 2010 10:28:11 +0200 Subject: Fixed GestureOverride event delivery in GraphicsView. GestureOverride event was not respected when delivering to items in GraphicsView. Task-number: QTBUG-10745 Reviewed-by: Thomas Zander --- src/gui/graphicsview/qgraphicsscene.cpp | 9 ++++- tests/auto/gestures/tst_gestures.cpp | 66 +++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 22c3f92..53a24a8 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -6088,8 +6088,15 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event) if (ev.isAccepted() || ev.isAccepted(g)) { conflictedGestures.remove(g); // mark the item as a gesture target - if (item) + if (item) { gestureTargets.insert(g, item.data()); + QHash >::iterator it, e; + it = cachedItemGestures.begin(); + e = cachedItemGestures.end(); + for(; it != e; ++it) + it.value().remove(g); + cachedItemGestures[item.data()].insert(g); + } DEBUG() << "QGraphicsScenePrivate::gestureEventHandler:" << "override was accepted:" << g << item.data(); diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp index 4a9f1d1..644a9b3 100644 --- a/tests/auto/gestures/tst_gestures.cpp +++ b/tests/auto/gestures/tst_gestures.cpp @@ -333,6 +333,7 @@ private slots: void gestureOverChild(); void multipleWidgetOnlyGestureInTree(); void conflictingGestures(); + void conflictingGesturesInGraphicsView(); void finishedWithoutStarted(); void unknownGesture(); void graphicsItemGesture(); @@ -2069,5 +2070,70 @@ void tst_Gestures::testQGestureRecognizerCleanup() delete w; } +void tst_Gestures::conflictingGesturesInGraphicsView() +{ + QGraphicsScene scene; + GraphicsView view(&scene); + view.setWindowFlags(Qt::X11BypassWindowManagerHint); + + GestureItem *item1 = new GestureItem("item1"); + item1->grabGesture(CustomGesture::GestureType); + item1->size = QRectF(0, 0, 100, 100); + item1->setZValue(2); + scene.addItem(item1); + + GestureItem *item2 = new GestureItem("item2"); + item2->grabGesture(CustomGesture::GestureType); + item2->size = QRectF(0, 0, 100, 100); + item2->setZValue(5); + scene.addItem(item2); + + view.show(); + QTest::qWaitForWindowShown(&view); + view.ensureVisible(scene.sceneRect()); + + static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1; + + CustomEvent event; + + // nobody accepts override + item1->acceptGestureOverride = false; + item2->acceptGestureOverride = false; + event.hotSpot = mapToGlobal(item2->boundingRect().center(), item2, &view); + event.hasHotSpot = true; + sendCustomGesture(&event, item2, &scene); + QCOMPARE(item2->gestureOverrideEventsReceived, 1); + QCOMPARE(item2->gestureEventsReceived, TotalGestureEventsCount); + QCOMPARE(item1->gestureOverrideEventsReceived, 1); + QCOMPARE(item1->gestureEventsReceived, 0); + + item1->reset(); item2->reset(); + + // the original target accepts override + item1->acceptGestureOverride = false; + item2->acceptGestureOverride = true; + event.hotSpot = mapToGlobal(item2->boundingRect().center(), item2, &view); + event.hasHotSpot = true; + sendCustomGesture(&event, item2, &scene); + QCOMPARE(item2->gestureOverrideEventsReceived, 1); + QCOMPARE(item2->gestureEventsReceived, TotalGestureEventsCount); + QCOMPARE(item1->gestureOverrideEventsReceived, 0); + QCOMPARE(item1->gestureEventsReceived, 0); + + item1->reset(); item2->reset(); + + // the item behind accepts override + item1->acceptGestureOverride = true; + item2->acceptGestureOverride = false; + event.hotSpot = mapToGlobal(item2->boundingRect().center(), item2, &view); + event.hasHotSpot = true; + sendCustomGesture(&event, item2, &scene); + + QCOMPARE(item2->gestureOverrideEventsReceived, 1); + QCOMPARE(item2->gestureEventsReceived, 0); + QCOMPARE(item1->gestureOverrideEventsReceived, 1); + QCOMPARE(item1->gestureEventsReceived, TotalGestureEventsCount); +} + QTEST_MAIN(tst_Gestures) #include "tst_gestures.moc" -- cgit v0.12 From c28da4dd467c2763bed5c6b31471f078ac26cee6 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 4 Jun 2010 11:13:19 +0200 Subject: Added setting a hotspot on standard gestures In order for gestures to work in graphicsview the hotspot should be set. The fix adds the hotspot to standard gestures that are shipped with Qt. Task-number: QTBUG-10967 Task-number: QT-3406 Reviewed-by: trustme --- src/gui/kernel/qstandardgestures.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp index a575717..bfcfa86 100644 --- a/src/gui/kernel/qstandardgestures.cpp +++ b/src/gui/kernel/qstandardgestures.cpp @@ -110,6 +110,7 @@ QGestureRecognizer::Result QPanGestureRecognizer::recognize(QGesture *state, p1.pos().y() - p1.startPos().y() + p2.pos().y() - p2.startPos().y()) / 2; if (d->offset.x() > 10 || d->offset.y() > 10 || d->offset.x() < -10 || d->offset.y() < -10) { + q->setHotSpot(p1.startScreenPos()); result = QGestureRecognizer::TriggerGesture; } else { result = QGestureRecognizer::MayBeGesture; @@ -439,6 +440,7 @@ QGestureRecognizer::Result QTapGestureRecognizer::recognize(QGesture *state, switch (event->type()) { case QEvent::TouchBegin: { d->position = ev->touchPoints().at(0).pos(); + q->setHotSpot(ev->touchPoints().at(0).screenPos()); result = QGestureRecognizer::TriggerGesture; break; } @@ -521,6 +523,7 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object, if (d->timerId) q->killTimer(d->timerId); d->timerId = q->startTimer(TimerInterval); + q->setHotSpot(ev->touchPoints().at(0).startScreenPos()); result = QGestureRecognizer::TriggerGesture; break; case QEvent::TouchEnd: -- cgit v0.12 From 0c0f22ec0e36d7001c8195dcc6e390a37118e33e Mon Sep 17 00:00:00 2001 From: Michael Hasselmann Date: Mon, 7 Jun 2010 17:18:54 +0200 Subject: Fix QApplication/QWidget to really take ownership of input contexts * src/gui/kernel/[qapplication|qwidget].cpp, tests/auto/qapplication/tst_[qapplication|qwidget].cpp (setInputContext): The documentation for [QApplication|QWidget]::setInputContext claims that the [QApplication|QWidget] instance would take ownership. This commit fixes the setter to also reparent the input context. Furthermore, the crappy test for this setter was improved. Reviewed-by: Denis Dzyubenko --- src/gui/kernel/qapplication.cpp | 1 + src/gui/kernel/qwidget.cpp | 2 ++ tests/auto/qapplication/tst_qapplication.cpp | 19 +++++++++++++------ tests/auto/qwidget/tst_qwidget.cpp | 6 +++++- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index a2c058a..8529615 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -5297,6 +5297,7 @@ void QApplication::setInputContext(QInputContext *inputContext) } delete QApplicationPrivate::inputContext; QApplicationPrivate::inputContext = inputContext; + QApplicationPrivate::inputContext->setParent(this); } /*! diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index b5879ae..91dfaab 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -332,6 +332,8 @@ void QWidget::setInputContext(QInputContext *context) if (d->ic) delete d->ic; d->ic = context; + if (d->ic) + d->ic->setParent(this); #endif } diff --git a/tests/auto/qapplication/tst_qapplication.cpp b/tests/auto/qapplication/tst_qapplication.cpp index 43fbba1..1a38070 100644 --- a/tests/auto/qapplication/tst_qapplication.cpp +++ b/tests/auto/qapplication/tst_qapplication.cpp @@ -189,15 +189,22 @@ void tst_QApplication::getSetCheck() { int argc = 0; QApplication obj1(argc, 0, QApplication::GuiServer); - // QInputContext * QApplication::inputContext() - // void QApplication::setInputContext(QInputContext *) MyInputContext *var1 = new MyInputContext; + + // QApplication takes ownership, so check for reparenting: obj1.setInputContext(var1); - QCOMPARE((QInputContext *)var1, obj1.inputContext()); + QCOMPARE(var1->parent(), static_cast(&obj1)); + + // Test for self-assignment: + obj1.setInputContext(obj1.inputContext()); + QVERIFY(obj1.inputContext()); + QCOMPARE(static_cast(var1), obj1.inputContext()); + + // Resetting the input context to 0 is not allowed: QTest::ignoreMessage(QtWarningMsg, "QApplication::setInputContext: called with 0 input context"); - obj1.setInputContext((QInputContext *)0); - QCOMPARE((QInputContext *)var1, obj1.inputContext()); - // delete var1; // No delete, since QApplication takes ownership + obj1.setInputContext(0); + + QCOMPARE(static_cast(var1), obj1.inputContext()); } class CloseEventTestWindow : public QWidget diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 5d47aed..83a9e3a 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -605,10 +605,14 @@ void tst_QWidget::getSetCheck() obj1.setAttribute(Qt::WA_InputMethodEnabled); obj1.setInputContext(var13); QCOMPARE(static_cast(var13), obj1.inputContext()); + // QWidget takes ownership, so check parent + QCOMPARE(var13->parent(), static_cast(&obj1)); + // Check self assignment + obj1.setInputContext(obj1.inputContext()); + QCOMPARE(static_cast(var13), obj1.inputContext()); obj1.setInputContext((QInputContext *)0); QCOMPARE(qApp->inputContext(), obj1.inputContext()); QVERIFY(qApp->inputContext() != var13); - //delete var13; // No delete, since QWidget takes ownership // bool QWidget::autoFillBackground() // void QWidget::setAutoFillBackground(bool) -- cgit v0.12 From dfbd44c8ec75d3b0156547ef3fb5811a4548a0a5 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 7 Jun 2010 18:49:48 +0200 Subject: Unbreak Linux build when qendian.h is included before qglobal.h --- mkspecs/common/g++.conf | 2 +- mkspecs/common/linux.conf | 4 +-- src/corelib/global/qendian.h | 1 + src/gui/image/qimage.cpp | 10 ++++++ src/plugins/imageformats/gif/qgifhandler.cpp | 49 ++++++++++++++-------------- 5 files changed, 38 insertions(+), 28 deletions(-) diff --git a/mkspecs/common/g++.conf b/mkspecs/common/g++.conf index d3db24a..b3d6296 100644 --- a/mkspecs/common/g++.conf +++ b/mkspecs/common/g++.conf @@ -7,7 +7,7 @@ QMAKE_CFLAGS += -pipe QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_RELEASE += -g -O2 QMAKE_CFLAGS_DEBUG += -g QMAKE_CFLAGS_SHLIB += -fPIC QMAKE_CFLAGS_STATIC_LIB += -fPIC diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf index 4fbe2dc..320ae71 100644 --- a/mkspecs/common/linux.conf +++ b/mkspecs/common/linux.conf @@ -51,8 +51,8 @@ QMAKE_COPY_DIR = $(COPY) -r QMAKE_MOVE = mv -f QMAKE_DEL_FILE = rm -f QMAKE_DEL_DIR = rmdir -QMAKE_STRIP = strip -QMAKE_STRIPFLAGS_LIB += --strip-unneeded +#QMAKE_STRIP = strip +#QMAKE_STRIPFLAGS_LIB += --strip-unneeded QMAKE_CHK_DIR_EXISTS = test -d QMAKE_MKDIR = mkdir -p QMAKE_INSTALL_FILE = install -m 644 -p diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h index 353e8b9..01550cf 100644 --- a/src/corelib/global/qendian.h +++ b/src/corelib/global/qendian.h @@ -43,6 +43,7 @@ #define QENDIAN_H #ifdef Q_OS_LINUX +# include QT_BEGIN_INCLUDE_NAMESPACE # include QT_END_INCLUDE_NAMESPACE diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 98f235e..6408432 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -245,6 +245,11 @@ QImageData * QImageData::create(const QSize &size, QImage::Format format, int nu return 0; } + if (d->nbytes == 15840000) + { + d->nbytes = 15840000; + } + d->ref.ref(); return d.take(); @@ -898,6 +903,11 @@ QImageData *QImageData::create(uchar *data, int width, int height, int bpl, QIm d->bytes_per_line = bpl; d->nbytes = d->bytes_per_line * height; + if (d->nbytes == 15840000) + { + d->nbytes = 15840000; + } + return d; } diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 8abc2d1..fa89f0a 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -78,8 +78,8 @@ public: bool partialNewFrame; private: - void fillRect(QImage *image, int x, int y, int w, int h, QRgb col); - inline QRgb color(uchar index) const; + void fillRect(QImage *image, int x, int y, int w, int h, uchar col); + //inline uchar color(uchar index) const; // GIF specific stuff QRgb* globalcmap; @@ -197,13 +197,13 @@ void QGIFFormat::disposePrevious(QImage *image) case RestoreBackground: if (trans_index>=0) { // Easy: we use the transparent color - fillRect(image, l, t, r-l+1, b-t+1, Q_TRANSPARENT); + fillRect(image, l, t, r-l+1, b-t+1, trans_index); } else if (bgcol>=0) { // Easy: we use the bgcol given - fillRect(image, l, t, r-l+1, b-t+1, color(bgcol)); + fillRect(image, l, t, r-l+1, b-t+1, bgcol); } else { // Impossible: We don't know of a bgcol - use pixel 0 - QRgb *bits = (QRgb*)image->bits(); + const uchar *bits = image->constBits(); fillRect(image, l, t, r-l+1, b-t+1, bits[0]); } // ### Changed: QRect(l, t, r-l+1, b-t+1) @@ -211,9 +211,7 @@ void QGIFFormat::disposePrevious(QImage *image) case RestoreImage: { if (frame >= 0) { for (int ln=t; ln<=b; ln++) { - memcpy(image->scanLine(ln)+l, - backingstore.scanLine(ln-t), - (r-l+1)*sizeof(QRgb)); + memcpy(image->scanLine(ln)+l, backingstore.constScanLine(ln-t), (r-l+1)); } // ### Changed: QRect(l, t, r-l+1, b-t+1) } @@ -341,9 +339,8 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, if (sheight <= 0) sheight = newtop + newheight; - QImage::Format format = trans_index >= 0 ? QImage::Format_ARGB32 : QImage::Format_RGB32; if (image->isNull()) { - (*image) = QImage(swidth, sheight, format); + (*image) = QImage(swidth, sheight, QImage::Format_Indexed8); bpl = image->bytesPerLine(); bits = image->bits(); memset(bits, 0, image->byteCount()); @@ -377,10 +374,10 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, if (left || top || width= 0) { - fillRect(image, 0, 0, swidth, sheight, color(trans_index)); + fillRect(image, 0, 0, swidth, sheight, trans_index); // ### Changed: QRect(0, 0, swidth, sheight) } else if (bgcol>=0) { - fillRect(image, 0, 0, swidth, sheight, color(bgcol)); + fillRect(image, 0, 0, swidth, sheight, bgcol); // ### Changed: QRect(0, 0, swidth, sheight) } } @@ -399,7 +396,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, // We just use the backing store as a byte array backingstore = QImage(qMax(backingstore.width(), w), qMax(backingstore.height(), h), - QImage::Format_RGB32); + QImage::Format_Indexed8); memset(bits, 0, image->byteCount()); } const int dest_bpl = backingstore.bytesPerLine(); @@ -479,7 +476,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, if (needfirst) { firstcode=oldcode=code; if (!out_of_bounds && image->height() > y && firstcode!=trans_index) - ((QRgb*)FAST_SCAN_LINE(bits, bpl, y))[x] = color(firstcode); + FAST_SCAN_LINE(bits, bpl, y)[x] = firstcode; x++; if (x>=swidth) out_of_bounds = true; needfirst=false; @@ -909,11 +906,11 @@ void QGIFFormat::scan(QIODevice *device, QVector *imageSizes, int *loopCo return; } -void QGIFFormat::fillRect(QImage *image, int col, int row, int w, int h, QRgb color) +void QGIFFormat::fillRect(QImage *image, int col, int row, int w, int h, uchar color) { if (w>0) { for (int j=0; jscanLine(j+row); + uchar *line = (uchar*)image->scanLine(j+row); for (int i=0; i= sheight) out_of_bounds=true; //y=bottom; } -inline QRgb QGIFFormat::color(uchar index) const +#if 0 +inline uchar QGIFFormat::color(uchar index) const { if (index == trans_index || index > ncols) - return Q_TRANSPARENT; + return trans_index; - QRgb *map = lcmap ? localcmap : globalcmap; + uchar *map = lcmap ? localcmap : globalcmap; return map ? map[index] : 0; } +#endif //------------------------------------------------------------------------- //------------------------------------------------------------------------- -- cgit v0.12 From fee316304b48bb3437e122c34b2127d6ccc4f469 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 7 Jun 2010 19:08:46 +0200 Subject: Revert accidental commit of irrelevant stuff. Silly mondays.. This reverts commit dfbd44c8ec75d3b0156547ef3fb5811a4548a0a5. --- mkspecs/common/g++.conf | 2 +- mkspecs/common/linux.conf | 4 +-- src/corelib/global/qendian.h | 1 - src/gui/image/qimage.cpp | 10 ------ src/plugins/imageformats/gif/qgifhandler.cpp | 49 ++++++++++++++-------------- 5 files changed, 28 insertions(+), 38 deletions(-) diff --git a/mkspecs/common/g++.conf b/mkspecs/common/g++.conf index b3d6296..d3db24a 100644 --- a/mkspecs/common/g++.conf +++ b/mkspecs/common/g++.conf @@ -7,7 +7,7 @@ QMAKE_CFLAGS += -pipe QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w -QMAKE_CFLAGS_RELEASE += -g -O2 +QMAKE_CFLAGS_RELEASE += -O2 QMAKE_CFLAGS_DEBUG += -g QMAKE_CFLAGS_SHLIB += -fPIC QMAKE_CFLAGS_STATIC_LIB += -fPIC diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf index 320ae71..4fbe2dc 100644 --- a/mkspecs/common/linux.conf +++ b/mkspecs/common/linux.conf @@ -51,8 +51,8 @@ QMAKE_COPY_DIR = $(COPY) -r QMAKE_MOVE = mv -f QMAKE_DEL_FILE = rm -f QMAKE_DEL_DIR = rmdir -#QMAKE_STRIP = strip -#QMAKE_STRIPFLAGS_LIB += --strip-unneeded +QMAKE_STRIP = strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded QMAKE_CHK_DIR_EXISTS = test -d QMAKE_MKDIR = mkdir -p QMAKE_INSTALL_FILE = install -m 644 -p diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h index 01550cf..353e8b9 100644 --- a/src/corelib/global/qendian.h +++ b/src/corelib/global/qendian.h @@ -43,7 +43,6 @@ #define QENDIAN_H #ifdef Q_OS_LINUX -# include QT_BEGIN_INCLUDE_NAMESPACE # include QT_END_INCLUDE_NAMESPACE diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 6408432..98f235e 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -245,11 +245,6 @@ QImageData * QImageData::create(const QSize &size, QImage::Format format, int nu return 0; } - if (d->nbytes == 15840000) - { - d->nbytes = 15840000; - } - d->ref.ref(); return d.take(); @@ -903,11 +898,6 @@ QImageData *QImageData::create(uchar *data, int width, int height, int bpl, QIm d->bytes_per_line = bpl; d->nbytes = d->bytes_per_line * height; - if (d->nbytes == 15840000) - { - d->nbytes = 15840000; - } - return d; } diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index fa89f0a..8abc2d1 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -78,8 +78,8 @@ public: bool partialNewFrame; private: - void fillRect(QImage *image, int x, int y, int w, int h, uchar col); - //inline uchar color(uchar index) const; + void fillRect(QImage *image, int x, int y, int w, int h, QRgb col); + inline QRgb color(uchar index) const; // GIF specific stuff QRgb* globalcmap; @@ -197,13 +197,13 @@ void QGIFFormat::disposePrevious(QImage *image) case RestoreBackground: if (trans_index>=0) { // Easy: we use the transparent color - fillRect(image, l, t, r-l+1, b-t+1, trans_index); + fillRect(image, l, t, r-l+1, b-t+1, Q_TRANSPARENT); } else if (bgcol>=0) { // Easy: we use the bgcol given - fillRect(image, l, t, r-l+1, b-t+1, bgcol); + fillRect(image, l, t, r-l+1, b-t+1, color(bgcol)); } else { // Impossible: We don't know of a bgcol - use pixel 0 - const uchar *bits = image->constBits(); + QRgb *bits = (QRgb*)image->bits(); fillRect(image, l, t, r-l+1, b-t+1, bits[0]); } // ### Changed: QRect(l, t, r-l+1, b-t+1) @@ -211,7 +211,9 @@ void QGIFFormat::disposePrevious(QImage *image) case RestoreImage: { if (frame >= 0) { for (int ln=t; ln<=b; ln++) { - memcpy(image->scanLine(ln)+l, backingstore.constScanLine(ln-t), (r-l+1)); + memcpy(image->scanLine(ln)+l, + backingstore.scanLine(ln-t), + (r-l+1)*sizeof(QRgb)); } // ### Changed: QRect(l, t, r-l+1, b-t+1) } @@ -339,8 +341,9 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, if (sheight <= 0) sheight = newtop + newheight; + QImage::Format format = trans_index >= 0 ? QImage::Format_ARGB32 : QImage::Format_RGB32; if (image->isNull()) { - (*image) = QImage(swidth, sheight, QImage::Format_Indexed8); + (*image) = QImage(swidth, sheight, format); bpl = image->bytesPerLine(); bits = image->bits(); memset(bits, 0, image->byteCount()); @@ -374,10 +377,10 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, if (left || top || width= 0) { - fillRect(image, 0, 0, swidth, sheight, trans_index); + fillRect(image, 0, 0, swidth, sheight, color(trans_index)); // ### Changed: QRect(0, 0, swidth, sheight) } else if (bgcol>=0) { - fillRect(image, 0, 0, swidth, sheight, bgcol); + fillRect(image, 0, 0, swidth, sheight, color(bgcol)); // ### Changed: QRect(0, 0, swidth, sheight) } } @@ -396,7 +399,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, // We just use the backing store as a byte array backingstore = QImage(qMax(backingstore.width(), w), qMax(backingstore.height(), h), - QImage::Format_Indexed8); + QImage::Format_RGB32); memset(bits, 0, image->byteCount()); } const int dest_bpl = backingstore.bytesPerLine(); @@ -476,7 +479,7 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, if (needfirst) { firstcode=oldcode=code; if (!out_of_bounds && image->height() > y && firstcode!=trans_index) - FAST_SCAN_LINE(bits, bpl, y)[x] = firstcode; + ((QRgb*)FAST_SCAN_LINE(bits, bpl, y))[x] = color(firstcode); x++; if (x>=swidth) out_of_bounds = true; needfirst=false; @@ -906,11 +909,11 @@ void QGIFFormat::scan(QIODevice *device, QVector *imageSizes, int *loopCo return; } -void QGIFFormat::fillRect(QImage *image, int col, int row, int w, int h, uchar color) +void QGIFFormat::fillRect(QImage *image, int col, int row, int w, int h, QRgb color) { if (w>0) { for (int j=0; jscanLine(j+row); + QRgb *line = (QRgb*)image->scanLine(j+row); for (int i=0; i= sheight) out_of_bounds=true; //y=bottom; } -#if 0 -inline uchar QGIFFormat::color(uchar index) const +inline QRgb QGIFFormat::color(uchar index) const { if (index == trans_index || index > ncols) - return trans_index; + return Q_TRANSPARENT; - uchar *map = lcmap ? localcmap : globalcmap; + QRgb *map = lcmap ? localcmap : globalcmap; return map ? map[index] : 0; } -#endif //------------------------------------------------------------------------- //------------------------------------------------------------------------- -- cgit v0.12 From d70dcb5f120affb8a908d4fbcdf16eef4c51389c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 7 Jun 2010 19:10:44 +0200 Subject: Unbreak Linux build when qendian.h is included before qglobal.h --- src/corelib/global/qendian.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h index 353e8b9..01550cf 100644 --- a/src/corelib/global/qendian.h +++ b/src/corelib/global/qendian.h @@ -43,6 +43,7 @@ #define QENDIAN_H #ifdef Q_OS_LINUX +# include QT_BEGIN_INCLUDE_NAMESPACE # include QT_END_INCLUDE_NAMESPACE -- cgit v0.12 From 004ed1e661614273111629e932f4c1826b3cd353 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 7 Jun 2010 19:58:09 +0200 Subject: Doc: Fixed whitespace in the Simplified Chinese doc configuration. Reviewed-by: Trust Me --- tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf | 52 +++++++++++++-------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index c324926..909a2d4 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -30,32 +30,32 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - images/bg_l.png \ - images/bg_l_blank.png \ - images/bg_r.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_gt.png \ - images/bullet_dn.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/feedbackground.png \ - images/horBar.png \ - images/page.png \ - images/page_bg.png \ - images/sprites-combined.png \ - images/arrow-down.png \ - images/spinner.gif \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style.css + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/arrow-down.png \ + images/spinner.gif \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style.css language = Cpp -- cgit v0.12 From f2c30b0f13a4bacbb937d44c8e88ac1c202139cd Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 7 Jun 2010 20:45:09 +0200 Subject: Doc: Fixed whitespace in the other configuration file for zh_CN. Reviewed-by: Trust Me --- tools/qdoc3/test/qt_zh_CN.qdocconf | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf index e894607..4983f9e 100644 --- a/tools/qdoc3/test/qt_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt_zh_CN.qdocconf @@ -32,28 +32,28 @@ qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - images/bg_l.png \ - images/bg_l_blank.png \ - images/bg_r.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_gt.png \ - images/bullet_dn.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/feedbackground.png \ - images/horBar.png \ - images/page.png \ - images/page_bg.png \ - images/sprites-combined.png \ - images/spinner.gif \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - style/style.css + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/spinner.gif \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + style/style.css language = Cpp -- cgit v0.12 From e4c7f469d1cdaf535b5e7aacaca7f96553084b79 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 7 Jun 2010 17:04:45 +1000 Subject: Make declarative autotests compile on Symbian abld build system Task-number: Reviewed-by: Martin Jones --- tests/auto/declarative/declarative.pro | 2 +- tests/auto/declarative/examples/examples.pro | 3 +-- tests/auto/declarative/examples/tst_examples.cpp | 5 +++++ tests/auto/declarative/parserstress/parserstress.pro | 3 +-- tests/auto/declarative/parserstress/tst_parserstress.cpp | 5 +++++ .../auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro | 3 +-- .../declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp | 5 +++++ .../qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro | 3 +-- .../qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp | 5 +++++ .../declarative/qdeclarativeanimations/qdeclarativeanimations.pro | 3 +-- .../qdeclarativeanimations/tst_qdeclarativeanimations.cpp | 5 +++++ .../declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro | 3 +-- .../qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp | 5 +++++ .../auto/declarative/qdeclarativebinding/qdeclarativebinding.pro | 4 +--- .../declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp | 5 +++++ .../qdeclarativeborderimage/qdeclarativeborderimage.pro | 4 +--- .../qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp | 4 ++++ .../declarative/qdeclarativecomponent/qdeclarativecomponent.pro | 4 +--- .../qdeclarativecomponent/tst_qdeclarativecomponent.cpp | 5 +++++ .../declarative/qdeclarativeconnection/qdeclarativeconnection.pro | 4 +--- .../qdeclarativeconnection/tst_qdeclarativeconnection.cpp | 5 +++++ .../auto/declarative/qdeclarativecontext/qdeclarativecontext.pro | 4 +--- .../declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp | 5 +++++ tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro | 3 +-- tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp | 5 +++++ .../declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro | 8 +++++++- .../qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 5 +++++ tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro | 5 +---- .../declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp | 5 +++++ tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro | 4 +--- .../auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp | 5 +++++ .../declarative/qdeclarativeflickable/qdeclarativeflickable.pro | 4 +--- .../qdeclarativeflickable/tst_qdeclarativeflickable.cpp | 5 +++++ .../declarative/qdeclarativeflipable/qdeclarativeflipable.pro | 4 +--- .../declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp | 5 +++++ .../declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro | 3 +-- .../qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp | 4 ++++ .../qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro | 4 +--- .../tst_qdeclarativefolderlistmodel.cpp | 5 +++++ .../declarative/qdeclarativefontloader/qdeclarativefontloader.pro | 4 +--- .../qdeclarativefontloader/tst_qdeclarativefontloader.cpp | 5 +++++ .../declarative/qdeclarativegridview/qdeclarativegridview.pro | 4 +--- .../declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp | 5 +++++ tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro | 4 +--- .../auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp | 4 ++++ .../qdeclarativeimageprovider/qdeclarativeimageprovider.pro | 4 +--- .../qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp | 5 +++++ tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro | 3 +-- tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp | 5 +++++ .../qdeclarativeinstruction/qdeclarativeinstruction.pro | 4 +--- .../qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp | 5 +++++ tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro | 3 +-- tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp | 5 +++++ .../declarative/qdeclarativelanguage/qdeclarativelanguage.pro | 3 +-- .../declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp | 5 +++++ .../declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro | 6 ++---- .../qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp | 5 +++++ .../declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro | 4 +--- .../qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp | 5 +++++ .../declarative/qdeclarativelistview/qdeclarativelistview.pro | 4 +--- .../declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp | 5 +++++ tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro | 3 +-- .../declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp | 5 +++++ .../declarative/qdeclarativemetatype/qdeclarativemetatype.pro | 4 +--- .../declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp | 5 +++++ .../qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp | 5 +++++ .../qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro | 4 ++-- .../declarative/qdeclarativemousearea/qdeclarativemousearea.pro | 4 +--- .../qdeclarativemousearea/tst_qdeclarativemousearea.cpp | 5 +++++ .../declarative/qdeclarativeparticles/qdeclarativeparticles.pro | 4 +--- .../qdeclarativeparticles/tst_qdeclarativeparticles.cpp | 5 +++++ .../declarative/qdeclarativepathview/qdeclarativepathview.pro | 4 +--- .../declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp | 5 +++++ .../qdeclarativepixmapcache/qdeclarativepixmapcache.pro | 3 +-- .../qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp | 5 +++++ .../qdeclarativepositioners/qdeclarativepositioners.pro | 4 +--- .../qdeclarativepositioners/tst_qdeclarativepositioners.cpp | 5 +++++ .../declarative/qdeclarativeproperty/qdeclarativeproperty.pro | 3 +-- .../declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp | 5 +++++ tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro | 3 +-- tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp | 5 +++++ .../declarative/qdeclarativerepeater/qdeclarativerepeater.pro | 4 +--- .../declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp | 5 +++++ .../qdeclarativesmoothedanimation.pro | 4 +--- .../tst_qdeclarativesmoothedanimation.cpp | 5 +++++ .../qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro | 4 +--- .../qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp | 5 +++++ .../qdeclarativespringfollow/qdeclarativespringfollow.pro | 4 +--- .../qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp | 5 +++++ .../qdeclarativesqldatabase/qdeclarativesqldatabase.pro | 4 +--- .../qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp | 5 +++++ tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro | 4 +--- .../declarative/qdeclarativestates/tst_qdeclarativestates.cpp | 4 ++++ .../qdeclarativesystempalette/qdeclarativesystempalette.pro | 5 +---- .../qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp | 5 +++++ tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro | 3 +-- tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp | 5 +++++ .../declarative/qdeclarativetextedit/qdeclarativetextedit.pro | 4 +--- .../declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 5 +++++ .../declarative/qdeclarativetextinput/qdeclarativetextinput.pro | 4 +--- .../qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 5 +++++ tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro | 4 +--- .../auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp | 5 +++++ .../declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro | 3 +-- .../qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp | 5 +++++ tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro | 3 +-- tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp | 5 +++++ tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro | 3 +-- .../declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp | 5 +++++ .../qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro | 3 +-- .../tst_qdeclarativevisualdatamodel.cpp | 5 +++++ .../auto/declarative/qdeclarativewebview/qdeclarativewebview.pro | 4 +--- .../declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp | 5 +++++ .../qdeclarativeworkerscript/qdeclarativeworkerscript.pro | 4 +--- .../qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp | 5 +++++ .../qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro | 4 +--- .../qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp | 5 +++++ .../qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro | 3 +-- .../qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp | 5 +++++ tests/auto/declarative/qmlvisual/qmlvisual.pro | 4 +--- tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp | 5 +++++ 121 files changed, 365 insertions(+), 160 deletions(-) diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index 484fbef..3d2dbf0 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -1,12 +1,12 @@ TEMPLATE = subdirs !symbian: { SUBDIRS += \ - examples \ qdeclarativemetatype \ qmetaobjectbuilder } SUBDIRS += \ + examples \ parserstress \ qdeclarativeanchors \ qdeclarativeanimatedimage \ diff --git a/tests/auto/declarative/examples/examples.pro b/tests/auto/declarative/examples/examples.pro index 92a16f1..2e243b4 100644 --- a/tests/auto/declarative/examples/examples.pro +++ b/tests/auto/declarative/examples/examples.pro @@ -7,9 +7,8 @@ SOURCES += tst_examples.cpp include(../../../../tools/qml/qml.pri) symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp index 605345e..da115a7 100644 --- a/tests/auto/declarative/examples/tst_examples.cpp +++ b/tests/auto/declarative/examples/tst_examples.cpp @@ -47,6 +47,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_examples : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/parserstress/parserstress.pro b/tests/auto/declarative/parserstress/parserstress.pro index 3a675e4..bb1d69f 100644 --- a/tests/auto/declarative/parserstress/parserstress.pro +++ b/tests/auto/declarative/parserstress/parserstress.pro @@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle SOURCES += tst_parserstress.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = ..\\..\\qscriptjstestsuite\\tests - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/parserstress/tst_parserstress.cpp b/tests/auto/declarative/parserstress/tst_parserstress.cpp index c86908b..522a63a 100644 --- a/tests/auto/declarative/parserstress/tst_parserstress.cpp +++ b/tests/auto/declarative/parserstress/tst_parserstress.cpp @@ -46,6 +46,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_parserstress : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro index 452ad55..9798bb6 100644 --- a/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro +++ b/tests/auto/declarative/qdeclarativeanchors/qdeclarativeanchors.pro @@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativeanchors.cpp macx:CONFIG -= app_bundle symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp index 22f7966..97b77d0 100644 --- a/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp +++ b/tests/auto/declarative/qdeclarativeanchors/tst_qdeclarativeanchors.cpp @@ -50,6 +50,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + Q_DECLARE_METATYPE(QDeclarativeAnchors::Anchor) Q_DECLARE_METATYPE(QDeclarativeAnchorLine::AnchorLine) diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro index 7213abd..0a2f0f2 100644 --- a/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro +++ b/tests/auto/declarative/qdeclarativeanimatedimage/qdeclarativeanimatedimage.pro @@ -5,9 +5,8 @@ SOURCES += tst_qdeclarativeanimatedimage.cpp ../shared/testhttpserver.cpp macx:CONFIG -= app_bundle symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp index 237a436..1001278 100644 --- a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp +++ b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp @@ -48,6 +48,11 @@ #include "../shared/testhttpserver.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + #define TRY_WAIT(expr) \ do { \ for (int ii = 0; ii < 6; ++ii) { \ diff --git a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro index f7ed371..ed47dca 100644 --- a/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro +++ b/tests/auto/declarative/qdeclarativeanimations/qdeclarativeanimations.pro @@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativeanimations.cpp macx:CONFIG -= app_bundle symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp index ed7e506..5cf4c23 100644 --- a/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp +++ b/tests/auto/declarative/qdeclarativeanimations/tst_qdeclarativeanimations.cpp @@ -48,6 +48,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativeanimations : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro index 7137af1..cfb59ef 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro +++ b/tests/auto/declarative/qdeclarativebehaviors/qdeclarativebehaviors.pro @@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativebehaviors.cpp macx:CONFIG -= app_bundle symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp index 45e5304..70739fb 100644 --- a/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp +++ b/tests/auto/declarative/qdeclarativebehaviors/tst_qdeclarativebehaviors.cpp @@ -49,6 +49,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativebehaviors : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro index 04535db..a7ba2a8 100644 --- a/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro +++ b/tests/auto/declarative/qdeclarativebinding/qdeclarativebinding.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativebinding.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp index 8ab7b0b..653b34a 100644 --- a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp +++ b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp @@ -45,6 +45,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativebinding : public QObject { diff --git a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro index 3aa2197..a21761b 100644 --- a/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro +++ b/tests/auto/declarative/qdeclarativeborderimage/qdeclarativeborderimage.pro @@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle HEADERS += ../shared/testhttpserver.h SOURCES += tst_qdeclarativeborderimage.cpp ../shared/testhttpserver.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp index 69b4a89..1b73cf7 100644 --- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp +++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp @@ -54,6 +54,10 @@ #include "../shared/testhttpserver.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif #define SERVER_PORT 14446 #define SERVER_ADDR "http://127.0.0.1:14446" diff --git a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro index 98c38ad..4124f94 100644 --- a/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro +++ b/tests/auto/declarative/qdeclarativecomponent/qdeclarativecomponent.pro @@ -5,9 +5,7 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativecomponent.cpp -symbian: { - DEFINES += SRCDIR=\".\" -} else { +!symbian: { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp index faa1c21..8a19b8b 100644 --- a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp +++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp @@ -45,6 +45,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativecomponent : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro index bbf8630..d06ce4f 100644 --- a/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro +++ b/tests/auto/declarative/qdeclarativeconnection/qdeclarativeconnection.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeconnection.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp index 00e97ca..d384372 100644 --- a/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp +++ b/tests/auto/declarative/qdeclarativeconnection/tst_qdeclarativeconnection.cpp @@ -46,6 +46,11 @@ #include "../../../shared/util.h" #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativeconnection : public QObject { diff --git a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro index 0e1a5b1..74bb78c 100644 --- a/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro +++ b/tests/auto/declarative/qdeclarativecontext/qdeclarativecontext.pro @@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative SOURCES += tst_qdeclarativecontext.cpp macx:CONFIG -= app_bundle -symbian: { - DEFINES += SRCDIR=\".\" -} else { +!symbian: { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp index 7f0e6c0..605cf8e 100644 --- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp +++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp @@ -46,6 +46,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativecontext : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro index 9f1e50c..415d4e2 100644 --- a/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro +++ b/tests/auto/declarative/qdeclarativedom/qdeclarativedom.pro @@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativedom.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp index 6c19566..13960b1 100644 --- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp +++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp @@ -46,6 +46,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativedom : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro index c907be5..58cad34 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro +++ b/tests/auto/declarative/qdeclarativeecmascript/qdeclarativeecmascript.pro @@ -12,7 +12,13 @@ INCLUDEPATH += ../shared # QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage # LIBS += -lgcov -DEFINES += SRCDIR=\\\"$$PWD\\\" +symbian: { + importFiles.sources = data + importFiles.path = . + DEPLOYMENT = importFiles +} else { + DEFINES += SRCDIR=\\\"$$PWD\\\" +} CONFIG += parallel_test diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index e75abac..16e7ec5 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -53,6 +53,11 @@ #include "testtypes.h" #include "testhttpserver.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + /* This test covers evaluation of ECMAScript expressions and bindings from within QML. This does not include static QML language issues. diff --git a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro index 23afd07..7119ad9 100644 --- a/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro +++ b/tests/auto/declarative/qdeclarativeengine/qdeclarativeengine.pro @@ -4,10 +4,7 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeengine.cpp -# Define SRCDIR equal to test's source directory -symbian: { - DEFINES += SRCDIR=\".\" -} else { +!symbian: { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp index 0aebea1..56ebd73 100644 --- a/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp +++ b/tests/auto/declarative/qdeclarativeengine/tst_qdeclarativeengine.cpp @@ -50,6 +50,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativeengine : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro index fae11f9..29b7149 100644 --- a/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro +++ b/tests/auto/declarative/qdeclarativeerror/qdeclarativeerror.pro @@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative SOURCES += tst_qdeclarativeerror.cpp macx:CONFIG -= app_bundle -symbian: { - DEFINES += SRCDIR=\".\" -} else { +!symbian: { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp b/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp index ba1ebae..0279953 100644 --- a/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp +++ b/tests/auto/declarative/qdeclarativeerror/tst_qdeclarativeerror.cpp @@ -43,6 +43,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativeerror : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro index 7a70109..be0ba6c 100644 --- a/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro +++ b/tests/auto/declarative/qdeclarativeflickable/qdeclarativeflickable.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeflickable.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp index 2c6890e..2ba5574 100644 --- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp +++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp @@ -46,6 +46,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativeflickable : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro index 9b4fbc9..759e80b 100644 --- a/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro +++ b/tests/auto/declarative/qdeclarativeflipable/qdeclarativeflipable.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeflipable.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp index f32cdbd..f56c032 100644 --- a/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp +++ b/tests/auto/declarative/qdeclarativeflipable/tst_qdeclarativeflipable.cpp @@ -48,6 +48,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativeflipable : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro index c021fcf..24749c6 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro +++ b/tests/auto/declarative/qdeclarativefocusscope/qdeclarativefocusscope.pro @@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativefocusscope.cpp macx:CONFIG -= app_bundle symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp b/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp index 04bb1c5..7732e6d 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp +++ b/tests/auto/declarative/qdeclarativefocusscope/tst_qdeclarativefocusscope.cpp @@ -48,6 +48,10 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif class tst_qdeclarativefocusscope : public QObject { diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro index 487d0e1..91bf4a7 100644 --- a/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro +++ b/tests/auto/declarative/qdeclarativefolderlistmodel/qdeclarativefolderlistmodel.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativefolderlistmodel.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp b/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp index 3cf9613..b2e3a5b 100644 --- a/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp +++ b/tests/auto/declarative/qdeclarativefolderlistmodel/tst_qdeclarativefolderlistmodel.cpp @@ -48,6 +48,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + // From qdeclarastivefolderlistmodel.h const int FileNameRole = Qt::UserRole+1; const int FilePathRole = Qt::UserRole+2; diff --git a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro index dbe0dcb..01dca26 100644 --- a/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro +++ b/tests/auto/declarative/qdeclarativefontloader/qdeclarativefontloader.pro @@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle HEADERS += ../shared/testhttpserver.h SOURCES += tst_qdeclarativefontloader.cpp ../shared/testhttpserver.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp index 36908d9..ae23017 100644 --- a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp +++ b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp @@ -47,6 +47,11 @@ #define SERVER_PORT 14448 +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativefontloader : public QObject { diff --git a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro index 033e20e..a99a1b9 100644 --- a/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro +++ b/tests/auto/declarative/qdeclarativegridview/qdeclarativegridview.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativegridview.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index fb09d39..9b7c261 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -52,6 +52,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_QDeclarativeGridView : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro index a8b8eca..244a1e1 100644 --- a/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro +++ b/tests/auto/declarative/qdeclarativeimage/qdeclarativeimage.pro @@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle HEADERS += ../shared/testhttpserver.h SOURCES += tst_qdeclarativeimage.cpp ../shared/testhttpserver.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index 720702a..c09f7fc 100644 --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -55,6 +55,10 @@ #include "../shared/testhttpserver.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif #define SERVER_PORT 14451 #define SERVER_ADDR "http://127.0.0.1:14451" diff --git a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro index 1b828a5..bdb6423 100644 --- a/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro +++ b/tests/auto/declarative/qdeclarativeimageprovider/qdeclarativeimageprovider.pro @@ -8,11 +8,9 @@ SOURCES += tst_qdeclarativeimageprovider.cpp # QMAKE_CXXFLAGS = -fprofile-arcs -ftest-coverage # LIBS += -lgcov -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp index cc4ec20..4185790 100644 --- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp +++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp @@ -45,6 +45,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + // QDeclarativeImageProvider::request() is run in an idle thread where possible // Be generous in our timeout. #define TRY_WAIT(expr) \ diff --git a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro index c6719c0..2c20e7e 100644 --- a/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro +++ b/tests/auto/declarative/qdeclarativeinfo/qdeclarativeinfo.pro @@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeinfo.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp index 36db448..03df71f 100644 --- a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp +++ b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp @@ -46,6 +46,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativeinfo : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro index 350f6c6..c8a48c9 100644 --- a/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro +++ b/tests/auto/declarative/qdeclarativeinstruction/qdeclarativeinstruction.pro @@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative script SOURCES += tst_qdeclarativeinstruction.cpp macx:CONFIG -= app_bundle -symbian: { - DEFINES += SRCDIR=\".\" -} else { +!symbian: { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp index 1e88255..d5a911a 100644 --- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp +++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp @@ -42,6 +42,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativeinstruction : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro index f494ef1..f4901c4 100644 --- a/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro +++ b/tests/auto/declarative/qdeclarativeitem/qdeclarativeitem.pro @@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeitem.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp index ecc813e..c2d3660 100644 --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp @@ -47,6 +47,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_QDeclarativeItem : public QObject { diff --git a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro index 2b7eb1c..43c451f 100644 --- a/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro +++ b/tests/auto/declarative/qdeclarativelanguage/qdeclarativelanguage.pro @@ -12,9 +12,8 @@ HEADERS += ../shared/testhttpserver.h SOURCES += ../shared/testhttpserver.cpp symbian: { - DEFINES += SRCDIR=\".\"\"\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 011870c..413843a 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -55,6 +55,11 @@ #include "../../../shared/util.h" #include "testhttpserver.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + DEFINE_BOOL_CONFIG_OPTION(qmlCheckTypes, QML_CHECK_TYPES) diff --git a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro index 79954fe..5076e51 100644 --- a/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro +++ b/tests/auto/declarative/qdeclarativelayoutitem/qdeclarativelayoutitem.pro @@ -4,12 +4,10 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativelayoutitem.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" -} \ No newline at end of file +} diff --git a/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp index c0c5abc..bbdba74 100644 --- a/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp +++ b/tests/auto/declarative/qdeclarativelayoutitem/tst_qdeclarativelayoutitem.cpp @@ -49,6 +49,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativelayoutitem : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro index 53bb9ec..e90db49 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro +++ b/tests/auto/declarative/qdeclarativelistmodel/qdeclarativelistmodel.pro @@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativelistmodel.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp index be4ffe8..b3b6c20 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp +++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp @@ -51,6 +51,11 @@ #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativelistmodel : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro index b406fde..2c5a859 100644 --- a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro +++ b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativelistview.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index 2aef9bb..7376c00 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -52,6 +52,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_QDeclarativeListView : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro index 9334928..b07bf9e 100644 --- a/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro +++ b/tests/auto/declarative/qdeclarativeloader/qdeclarativeloader.pro @@ -8,9 +8,8 @@ SOURCES += tst_qdeclarativeloader.cpp \ ../shared/testhttpserver.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp index 11cc61b..d047a2a 100644 --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp @@ -50,6 +50,11 @@ #define SERVER_PORT 14450 +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + inline QUrl TEST_FILE(const QString &filename) { return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename); diff --git a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro index 0d32ab8..f13250e 100644 --- a/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro +++ b/tests/auto/declarative/qdeclarativemetatype/qdeclarativemetatype.pro @@ -3,9 +3,7 @@ contains(QT_CONFIG,declarative): QT += declarative SOURCES += tst_qdeclarativemetatype.cpp macx:CONFIG -= app_bundle -symbian: { - DEFINES += SRCDIR=\".\" -} else { +!symbian: { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp index 76e86c9..8964f8a 100644 --- a/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp +++ b/tests/auto/declarative/qdeclarativemetatype/tst_qdeclarativemetatype.cpp @@ -54,6 +54,11 @@ #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativemetatype : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp index 6d17acc..2081f0e 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp @@ -56,6 +56,11 @@ private slots: void importsPlugin(); }; +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + #define VERIFY_ERRORS(errorfile) \ if (!errorfile) { \ if (qgetenv("DEBUG") != "" && !component.errors().isEmpty()) \ diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro index 29a1009..fb3630f 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro +++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro @@ -2,10 +2,10 @@ load(qttest_p4) SOURCES = tst_qdeclarativemoduleplugin.cpp QT += declarative CONFIG -= app_bundle + symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro index 6f9c98c..3d39aa8 100644 --- a/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro +++ b/tests/auto/declarative/qdeclarativemousearea/qdeclarativemousearea.pro @@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle HEADERS += ../shared/testhttpserver.h SOURCES += tst_qdeclarativemousearea.cpp ../shared/testhttpserver.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp index ff3bf45..5a10372 100644 --- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp +++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp @@ -46,6 +46,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_QDeclarativeMouseArea: public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro index 31172a9..f9ca90f 100644 --- a/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro +++ b/tests/auto/declarative/qdeclarativeparticles/qdeclarativeparticles.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeparticles.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp b/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp index 093190c..caf69fc 100644 --- a/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp +++ b/tests/auto/declarative/qdeclarativeparticles/tst_qdeclarativeparticles.cpp @@ -43,6 +43,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_QDeclarativeParticles : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro index 6bef61c..04fd26b 100644 --- a/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro +++ b/tests/auto/declarative/qdeclarativepathview/qdeclarativepathview.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativepathview.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp index dffc7ac..bf1e13a 100644 --- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp +++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp @@ -57,6 +57,11 @@ #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_QDeclarativePathView : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro index 99a94bc..3130364 100644 --- a/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro +++ b/tests/auto/declarative/qdeclarativepixmapcache/qdeclarativepixmapcache.pro @@ -10,9 +10,8 @@ HEADERS += ../shared/testhttpserver.h SOURCES += ../shared/testhttpserver.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp index 0cc13ad..f1018b2 100644 --- a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp +++ b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp @@ -49,6 +49,11 @@ // These don't let normal people run tests! //#include "../network-settings.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativepixmapcache : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro index 2c5b473..5dc7bb8 100644 --- a/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro +++ b/tests/auto/declarative/qdeclarativepositioners/qdeclarativepositioners.pro @@ -3,11 +3,9 @@ contains(QT_CONFIG,declarative): QT += declarative SOURCES += tst_qdeclarativepositioners.cpp macx:CONFIG -= app_bundle -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp index e639014..62ec707 100644 --- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp +++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp @@ -48,6 +48,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_QDeclarativePositioners : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro index f37d952..4121a33 100644 --- a/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro +++ b/tests/auto/declarative/qdeclarativeproperty/qdeclarativeproperty.pro @@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeproperty.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp index 53614fe..0ca0e03 100644 --- a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp +++ b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp @@ -48,6 +48,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + inline QUrl TEST_FILE(const QString &filename) { QFileInfo fileInfo(__FILE__); diff --git a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro index b381a9b..6af6500 100644 --- a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro +++ b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro @@ -4,9 +4,8 @@ SOURCES += tst_qdeclarativeqt.cpp macx:CONFIG -= app_bundle symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp index 5095be8..06561fa 100644 --- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp +++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp @@ -51,6 +51,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativeqt : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro index 51667af..f3ff9ed 100644 --- a/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro +++ b/tests/auto/declarative/qdeclarativerepeater/qdeclarativerepeater.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativerepeater.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp index e6b2fdd..3cc68f4 100644 --- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp +++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp @@ -48,6 +48,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + inline QUrl TEST_FILE(const QString &filename) { return QUrl::fromLocalFile(QLatin1String(SRCDIR) + QLatin1String("/data/") + filename); diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro index 6b98f1e..872aeb9 100644 --- a/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro +++ b/tests/auto/declarative/qdeclarativesmoothedanimation/qdeclarativesmoothedanimation.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativesmoothedanimation.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp b/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp index 7cf318a..d9164f6 100644 --- a/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp +++ b/tests/auto/declarative/qdeclarativesmoothedanimation/tst_qdeclarativesmoothedanimation.cpp @@ -46,6 +46,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativesmoothedanimation : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro b/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro index eb7d793..dff4922 100644 --- a/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro +++ b/tests/auto/declarative/qdeclarativesmoothedfollow/qdeclarativesmoothedfollow.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativesmoothedfollow.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp b/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp index ac750d9..b9ac23f 100644 --- a/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp +++ b/tests/auto/declarative/qdeclarativesmoothedfollow/tst_qdeclarativesmoothedfollow.cpp @@ -48,6 +48,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativesmoothedfollow : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro index 6ed8924..1c17ba0 100644 --- a/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro +++ b/tests/auto/declarative/qdeclarativespringfollow/qdeclarativespringfollow.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativespringfollow.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp b/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp index 8a07d6b..e0e2892 100644 --- a/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp +++ b/tests/auto/declarative/qdeclarativespringfollow/tst_qdeclarativespringfollow.cpp @@ -45,6 +45,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativespringfollow : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro index 9cdb884..1462c9a 100644 --- a/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro +++ b/tests/auto/declarative/qdeclarativesqldatabase/qdeclarativesqldatabase.pro @@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativesqldatabase.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp index 7486a4b..f92d7e8 100644 --- a/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp +++ b/tests/auto/declarative/qdeclarativesqldatabase/tst_qdeclarativesqldatabase.cpp @@ -53,6 +53,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativesqldatabase : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro index 6f4ecb3..2bae041 100644 --- a/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro +++ b/tests/auto/declarative/qdeclarativestates/qdeclarativestates.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativestates.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index 055a34c..f196837 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -49,6 +49,10 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif class MyRect : public QDeclarativeRectangle { diff --git a/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro index 786bc1b..0062688 100644 --- a/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro +++ b/tests/auto/declarative/qdeclarativesystempalette/qdeclarativesystempalette.pro @@ -4,10 +4,7 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativesystempalette.cpp -# Define SRCDIR equal to test's source directory -symbian: { - DEFINES += SRCDIR=\".\" -} else { +!symbian: { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp index 7927d97..dd1fd7a 100644 --- a/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp +++ b/tests/auto/declarative/qdeclarativesystempalette/tst_qdeclarativesystempalette.cpp @@ -47,6 +47,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativesystempalette : public QObject { diff --git a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro index 51c7f43..c1a36fd 100644 --- a/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro +++ b/tests/auto/declarative/qdeclarativetext/qdeclarativetext.pro @@ -10,9 +10,8 @@ HEADERS += ../shared/testhttpserver.h SOURCES += ../shared/testhttpserver.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp index 551e17b..01120b1 100644 --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp @@ -51,6 +51,11 @@ #include "../../../shared/util.h" #include "testhttpserver.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativetext : public QObject { diff --git a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro index 2adb2b8..4b6bd49 100644 --- a/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro +++ b/tests/auto/declarative/qdeclarativetextedit/qdeclarativetextedit.pro @@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativetextedit.cpp ../shared/testhttpserver.cpp HEADERS += ../shared/testhttpserver.h -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 053c9ef..f7ba7a1 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -56,6 +56,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativetextedit : public QObject { diff --git a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro index 2953567..8f42448 100644 --- a/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro +++ b/tests/auto/declarative/qdeclarativetextinput/qdeclarativetextinput.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativetextinput.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index c9de0aa..3143580 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -50,6 +50,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativetextinput : public QObject { diff --git a/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro index d95165c..398139a 100644 --- a/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro +++ b/tests/auto/declarative/qdeclarativetimer/qdeclarativetimer.pro @@ -4,9 +4,7 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativetimer.cpp -symbian: { - DEFINES += SRCDIR=\".\" -} else { +!symbian: { DEFINES += SRCDIR=\\\"$$PWD\\\" } diff --git a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp index da2d173..f49cbd0 100644 --- a/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp +++ b/tests/auto/declarative/qdeclarativetimer/tst_qdeclarativetimer.cpp @@ -46,6 +46,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativetimer : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro index 02c480c..90e46d3 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro +++ b/tests/auto/declarative/qdeclarativevaluetypes/qdeclarativevaluetypes.pro @@ -8,9 +8,8 @@ SOURCES += tst_qdeclarativevaluetypes.cpp \ testtypes.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp index 5e46fab..237d020 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp +++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp @@ -46,6 +46,11 @@ #include #include "testtypes.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + extern int qt_defaultDpi(); class tst_qdeclarativevaluetypes : public QObject diff --git a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro index ad54713..21a9195 100644 --- a/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro +++ b/tests/auto/declarative/qdeclarativeview/qdeclarativeview.pro @@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeview.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp index b183105..cc48bd0 100644 --- a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp +++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp @@ -47,6 +47,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_QDeclarativeView : public QObject { diff --git a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro index 9bb6161..6189916 100644 --- a/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro +++ b/tests/auto/declarative/qdeclarativeviewer/qdeclarativeviewer.pro @@ -7,9 +7,8 @@ include(../../../../tools/qml/qml.pri) SOURCES += tst_qdeclarativeviewer.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp index f296d9e..49273ea 100644 --- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp +++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp @@ -45,6 +45,11 @@ #include #include "qmlruntime.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_QDeclarativeViewer : public QObject { diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro index c87171b..92e5f60 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/qdeclarativevisualdatamodel.pro @@ -5,9 +5,8 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativevisualdatamodel.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp index 8f3fb16..90c9c6f 100644 --- a/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp +++ b/tests/auto/declarative/qdeclarativevisualdatamodel/tst_qdeclarativevisualdatamodel.cpp @@ -52,6 +52,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + static void initStandardTreeModel(QStandardItemModel *model) { QStandardItem *item; diff --git a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro index 8caa393..562a9fb 100644 --- a/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro +++ b/tests/auto/declarative/qdeclarativewebview/qdeclarativewebview.pro @@ -5,11 +5,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativewebview.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp index beabf86..f33e5a4 100644 --- a/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp +++ b/tests/auto/declarative/qdeclarativewebview/tst_qdeclarativewebview.cpp @@ -50,6 +50,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativewebview : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro index 36b3449..2f8f23d 100644 --- a/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro +++ b/tests/auto/declarative/qdeclarativeworkerscript/qdeclarativeworkerscript.pro @@ -4,11 +4,9 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativeworkerscript.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp index 7a4315a..52c11e9 100644 --- a/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp +++ b/tests/auto/declarative/qdeclarativeworkerscript/tst_qdeclarativeworkerscript.cpp @@ -53,6 +53,11 @@ Q_DECLARE_METATYPE(QScriptValue) +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_QDeclarativeWorkerScript : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro index b54f670..619b239 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/qdeclarativexmlhttprequest.pro @@ -8,11 +8,9 @@ HEADERS += ../shared/testhttpserver.h SOURCES += tst_qdeclarativexmlhttprequest.cpp \ ../shared/testhttpserver.cpp -# Define SRCDIR equal to test's source directory symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp index 1d26f2c..8141fcb 100644 --- a/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp +++ b/tests/auto/declarative/qdeclarativexmlhttprequest/tst_qdeclarativexmlhttprequest.cpp @@ -48,6 +48,11 @@ #define SERVER_PORT 14445 +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + class tst_qdeclarativexmlhttprequest : public QObject { Q_OBJECT diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro index 7c006f1..472cffb 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro +++ b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro @@ -9,9 +9,8 @@ macx:CONFIG -= app_bundle SOURCES += tst_qdeclarativexmllistmodel.cpp symbian: { - DEFINES += SRCDIR=\".\" importFiles.sources = data - importFiles.path = + importFiles.path = . DEPLOYMENT = importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp index 35790e4..bd19bd3 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp +++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp @@ -50,6 +50,11 @@ #include #include "../../../shared/util.h" +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + typedef QPair QDeclarativeXmlListRange; typedef QList QDeclarativeXmlModelData; diff --git a/tests/auto/declarative/qmlvisual/qmlvisual.pro b/tests/auto/declarative/qmlvisual/qmlvisual.pro index dca9b04..cb7e5d7 100644 --- a/tests/auto/declarative/qmlvisual/qmlvisual.pro +++ b/tests/auto/declarative/qmlvisual/qmlvisual.pro @@ -5,7 +5,7 @@ macx:CONFIG -= app_bundle SOURCES += tst_qmlvisual.cpp symbian: { - importFiles.path = + importFiles.path = . importFiles.sources = animation \ fillmode \ focusscope \ @@ -28,8 +28,6 @@ symbian: { selftest_noimages \ webview DEPLOYMENT = importFiles - - DEFINES += QT_TEST_SOURCE_DIR=\".\" } else { DEFINES += QT_TEST_SOURCE_DIR=\"\\\"$$PWD\\\"\" } diff --git a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp index 71dc451..a2d3273 100644 --- a/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp +++ b/tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp @@ -47,6 +47,11 @@ #include #include +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define QT_TEST_SOURCE_DIR "." +#endif + enum Mode { Record, RecordNoVisuals, RecordSnapshot, Play, TestVisuals, RemoveVisuals, UpdateVisuals, UpdatePlatformVisuals, Test }; static QString testdir; -- cgit v0.12 From 0656d1578e86a2e9e0e1ec1d3c79e8766415a86d Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 8 Jun 2010 10:59:53 +1000 Subject: Add test for PropertyChanges with attached properties. Task-number: QTBUG-11283 --- .../data/attachedPropertyChanges.qml | 20 ++++++++++ .../qdeclarativestates/tst_qdeclarativestates.cpp | 43 ++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml diff --git a/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml b/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml new file mode 100644 index 0000000..e17823b --- /dev/null +++ b/tests/auto/declarative/qdeclarativestates/data/attachedPropertyChanges.qml @@ -0,0 +1,20 @@ +import Qt.test 1.0 +import Qt 4.7 + +Item { + id: item + width: 100; height: 100 + MyRectangle.foo: 0 + + states: State { + name: "foo1" + PropertyChanges { + target: item + MyRectangle.foo: 1 + width: 50 + } + } + + Component.onCompleted: item.state = "foo1" +} + diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index 055a34c..1ddbe4d 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -50,6 +50,20 @@ #include +class MyAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(int foo READ foo WRITE setFoo) +public: + MyAttached(QObject *parent) : QObject(parent), m_foo(13) {} + + int foo() const { return m_foo; } + void setFoo(int f) { m_foo = f; } + +private: + int m_foo; +}; + class MyRect : public QDeclarativeRectangle { Q_OBJECT @@ -61,6 +75,10 @@ public: int propertyWithNotify() const { return m_prop; } void setPropertyWithNotify(int i) { m_prop = i; emit oddlyNamedNotifySignal(); } + + static MyAttached *qmlAttachedProperties(QObject *o) { + return new MyAttached(o); + } Q_SIGNALS: void didSomething(); void oddlyNamedNotifySignal(); @@ -69,6 +87,8 @@ private: int m_prop; }; +QML_DECLARE_TYPE(MyRect) +QML_DECLARE_TYPEINFO(MyRect, QML_HAS_ATTACHED_PROPERTIES) class tst_qdeclarativestates : public QObject { @@ -83,6 +103,7 @@ private slots: void initTestCase(); void basicChanges(); + void attachedPropertyChanges(); void basicExtension(); void basicBinding(); void signalOverride(); @@ -220,6 +241,28 @@ void tst_qdeclarativestates::basicChanges() } } +void tst_qdeclarativestates::attachedPropertyChanges() +{ + QDeclarativeEngine engine; + + QDeclarativeComponent component(&engine, SRCDIR "/data/attachedPropertyChanges.qml"); + QVERIFY(component.isReady()); + + QDeclarativeItem *item = qobject_cast(component.create()); + QVERIFY(item != 0); + QCOMPARE(item->width(), 50.0); + + // Ensure attached property has been changed + QObject *attObj = qmlAttachedPropertiesObject(item, false); + QVERIFY(attObj); + + MyAttached *att = qobject_cast(attObj); + QVERIFY(att); + + QEXPECT_FAIL("", "QTBUG-11283", Abort); + QCOMPARE(att->foo(), 1); +} + void tst_qdeclarativestates::basicExtension() { QDeclarativeEngine engine; -- cgit v0.12 From 31de141d722a2994b98f079b5be91a98cb34a3dc Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 8 Jun 2010 11:36:49 +1000 Subject: Add an example of animated item add/remove in ListView --- .../declarative/modelviews/listview/dynamic.qml | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/examples/declarative/modelviews/listview/dynamic.qml b/examples/declarative/modelviews/listview/dynamic.qml index cf0e387..df2e094 100644 --- a/examples/declarative/modelviews/listview/dynamic.qml +++ b/examples/declarative/modelviews/listview/dynamic.qml @@ -95,6 +95,7 @@ Rectangle { id: fruitDelegate Item { + id: wrapper width: container.width; height: 55 Column { @@ -169,6 +170,38 @@ Rectangle { MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) } } + + // Animate adding and removing items + ListView.delayRemove: true // so that the item is not destroyed immediately + ListView.onAdd: state = "add" + ListView.onRemove: state = "remove" + states: [ + State { + name: "add" + PropertyChanges { target: wrapper; height: 55; clip: true } + }, + State { + name: "remove" + PropertyChanges { target: wrapper; height: 0; clip: true } + } + ] + transitions: [ + Transition { + to: "add" + SequentialAnimation { + NumberAnimation { properties: "height"; from: 0; to: 55 } + PropertyAction { target: wrapper; property: "state"; value: "" } + } + }, + Transition { + to: "remove" + SequentialAnimation { + NumberAnimation { properties: "height" } + // Make sure delayRemove is set back to false so that the item can be destroyed + PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false } + } + } + ] } } -- cgit v0.12 From 249cb1cd68f9bb5417823f534b1af1f8dafccbc5 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Wed, 2 Jun 2010 15:41:22 +1000 Subject: Split Symbian bearer plugin into three platform specfic plugins Symbian bearer plugin has more functionality when built for newer platforms, so split the plugin into three platform specific plugins, and deploy the correct one depending on what the device supports. Written by: Miikka Heikkinen --- src/plugins/bearer/symbian/3_1/3_1.pro | 4 +++ src/plugins/bearer/symbian/3_2/3_2.pro | 12 +++++++ src/plugins/bearer/symbian/symbian.pri | 30 ++++++++++++++++ src/plugins/bearer/symbian/symbian.pro | 42 ++-------------------- src/plugins/bearer/symbian/symbian_3/symbian_3.pro | 14 ++++++++ src/s60installs/qsymbianbearer.qtplugin | 1 + src/s60installs/s60installs.pro | 25 +++++++++---- 7 files changed, 81 insertions(+), 47 deletions(-) create mode 100644 src/plugins/bearer/symbian/3_1/3_1.pro create mode 100644 src/plugins/bearer/symbian/3_2/3_2.pro create mode 100644 src/plugins/bearer/symbian/symbian.pri create mode 100644 src/plugins/bearer/symbian/symbian_3/symbian_3.pro create mode 100644 src/s60installs/qsymbianbearer.qtplugin diff --git a/src/plugins/bearer/symbian/3_1/3_1.pro b/src/plugins/bearer/symbian/3_1/3_1.pro new file mode 100644 index 0000000..a60d18b --- /dev/null +++ b/src/plugins/bearer/symbian/3_1/3_1.pro @@ -0,0 +1,4 @@ +include(../symbian.pri) + +LIBS += -lapengine +TARGET = $${TARGET}_3_1 diff --git a/src/plugins/bearer/symbian/3_2/3_2.pro b/src/plugins/bearer/symbian/3_2/3_2.pro new file mode 100644 index 0000000..4e5b416 --- /dev/null +++ b/src/plugins/bearer/symbian/3_2/3_2.pro @@ -0,0 +1,12 @@ +include(../symbian.pri) + +exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \ +exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) { + DEFINES += SNAP_FUNCTIONALITY_AVAILABLE + LIBS += -lcmmanager +} else { + # Fall back to 3_1 implementation on platforms that do not have cmmanager + LIBS += -lapengine +} + +TARGET = $${TARGET}_3_2 diff --git a/src/plugins/bearer/symbian/symbian.pri b/src/plugins/bearer/symbian/symbian.pri new file mode 100644 index 0000000..bfcd9ed --- /dev/null +++ b/src/plugins/bearer/symbian/symbian.pri @@ -0,0 +1,30 @@ +TARGET = qsymbianbearer +include(../../qpluginbase.pri) + +QT += network + +HEADERS += ../symbianengine.h \ + ../qnetworksession_impl.h + +SOURCES += ../symbianengine.cpp \ + ../qnetworksession_impl.cpp \ + ../main.cpp + +TARGET.UID3=0x20021319 + +INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE +symbian-abld:INCLUDEPATH += $$QT_BUILD_TREE/include/QtNetwork/private + +LIBS += -lcommdb \ + -lapsettingshandlerui \ + -lconnmon \ + -lcentralrepository \ + -lesock \ + -linsock \ + -lecom \ + -lefsrv \ + -lnetmeta + +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer +target.path += $$[QT_INSTALL_PLUGINS]/bearer +INSTALLS += target diff --git a/src/plugins/bearer/symbian/symbian.pro b/src/plugins/bearer/symbian/symbian.pro index 4f1e51c..f320eb6 100644 --- a/src/plugins/bearer/symbian/symbian.pro +++ b/src/plugins/bearer/symbian/symbian.pro @@ -1,41 +1,3 @@ -TARGET = qsymbianbearer -include(../../qpluginbase.pri) +TEMPLATE = subdirs -QT += network - -HEADERS += symbianengine.h \ - qnetworksession_impl.h - -SOURCES += symbianengine.cpp \ - qnetworksession_impl.cpp \ - main.cpp - -symbian { - TARGET.UID3=0x20021319 - exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \ - exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) { - message("Building with SNAP support") - DEFINES += SNAP_FUNCTIONALITY_AVAILABLE - LIBS += -lcmmanager - } else { - message("Building without SNAP support") - LIBS += -lapengine - } -} - -INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE -symbian-abld:INCLUDEPATH += $$QT_BUILD_TREE/include/QtNetwork/private - -LIBS += -lcommdb \ - -lapsettingshandlerui \ - -lconnmon \ - -lcentralrepository \ - -lesock \ - -linsock \ - -lecom \ - -lefsrv \ - -lnetmeta - -QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer -target.path += $$[QT_INSTALL_PLUGINS]/bearer -INSTALLS += target +SUBDIRS += 3_1 3_2 symbian_3 \ No newline at end of file diff --git a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro new file mode 100644 index 0000000..455aa67 --- /dev/null +++ b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro @@ -0,0 +1,14 @@ +include(../symbian.pri) + +exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \ +exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) { + DEFINES += SNAP_FUNCTIONALITY_AVAILABLE + LIBS += -lcmmanager + + exists($$MW_LAYER_PUBLIC_EXPORT_PATH(extendedconnpref.h)) { + DEFINES += OCC_FUNCTIONALITY_AVAILABLE + } +} else { + # Fall back to 3_1 implementation on platforms that do not have cmmanager + LIBS += -lapengine +} diff --git a/src/s60installs/qsymbianbearer.qtplugin b/src/s60installs/qsymbianbearer.qtplugin new file mode 100644 index 0000000..5c45bdd --- /dev/null +++ b/src/s60installs/qsymbianbearer.qtplugin @@ -0,0 +1 @@ +This file is a Qt plugin stub file. The real Qt plugin is located in /sys/bin. Created:2010-06-02T14:02:21 diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index d3d9eed..1e0e268 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -54,20 +54,35 @@ symbian: { symbian-abld|symbian-sbsv2 { pluginLocations = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET) + bearerPluginLocation = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET) + bearerStubZ = $${EPOCROOT}$${HW_ZDIR}$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin + BLD_INF_RULES.prj_exports += \ + "qsymbianbearer.qtplugin $$bearerStubZ" \ + "qsymbianbearer.qtplugin $${EPOCROOT}/epoc32/winscw/c$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin" } else { pluginLocations = $$QT_BUILD_TREE/plugins/s60 + bearerPluginLocation = $$QT_BUILD_TREE/plugins/bearer + bearerStubZ = $${PWD}/qsymbianbearer.qtplugin } qts60plugindeployment = \ - "IF package(0x1028315F)" \ + "IF package(0x20022E6D)" \ " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \ + " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ + "ELSEIF package(0x1028315F)" \ + " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \ + " \"$$bearerPluginLocation/qsymbianbearer_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ "ELSEIF package(0x102752AE)" \ " \"$$pluginLocations/qts60plugin_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2$${QT_LIBINFIX}.dll\"" \ + " \"$$bearerPluginLocation/qsymbianbearer_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ "ELSEIF package(0x102032BE)" \ " \"$$pluginLocations/qts60plugin_3_1$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1$${QT_LIBINFIX}.dll\"" \ + " \"$$bearerPluginLocation/qsymbianbearer_3_1$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ "ELSE" \ " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \ - "ENDIF" + " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ + "ENDIF" \ + " \"$$bearerStubZ\" - \"c:$$replace(QT_PLUGINS_BASE_DIR,/,\\)\\bearer\\qsymbianbearer$${QT_LIBINFIX}.qtplugin\" qtlibraries.pkg_postrules += qts60plugindeployment @@ -118,15 +133,11 @@ symbian: { qtbackup.sources = backup_registration.xml qtbackup.path = c:/private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,) - bearer_plugins.path = c:$$QT_PLUGINS_BASE_DIR/bearer - bearer_plugins.sources += $$QT_BUILD_TREE/plugins/bearer/qsymbianbearer$${QT_LIBINFIX}.dll - DEPLOYMENT += qtlibraries \ qtbackup \ imageformats_plugins \ codecs_plugins \ - graphicssystems_plugins \ - bearer_plugins + graphicssystems_plugins contains(QT_CONFIG, svg): { qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtSvg$${QT_LIBINFIX}.dll -- cgit v0.12 From 436395417fb092dc143d64aea52ad00d7c9b7488 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 8 Jun 2010 16:47:58 +1000 Subject: Don't layout multiple times when an ancestor becomes (in)visible. It is also only necessary to omit positioning an item if it is explicitly not visible. Task-number: QTBUG-11236 --- .../graphicsitems/qdeclarativepositioners.cpp | 18 +++++++++++------- .../graphicsitems/qdeclarativepositioners_p_p.h | 16 ++++++++++------ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index 20cc46b..18618ab 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -219,6 +219,7 @@ void QDeclarativeBasePositioner::prePositioning() QDeclarativeItem *child = qobject_cast(children.at(ii)); if (!child) continue; + QDeclarativeItemPrivate *childPrivate = static_cast(QGraphicsItemPrivate::get(child)); PositionedItem *item = 0; PositionedItem posItem(child); int wIdx = oldItems.find(posItem); @@ -227,11 +228,13 @@ void QDeclarativeBasePositioner::prePositioning() positionedItems.append(posItem); item = &positionedItems[positionedItems.count()-1]; item->isNew = true; - if (child->opacity() <= 0.0 || !child->isVisible()) + if (child->opacity() <= 0.0 || childPrivate->explicitlyHidden) item->isVisible = false; } else { item = &oldItems[wIdx]; - if (child->opacity() <= 0.0 || !child->isVisible()) { + // Items are only omitted from positioning if they are explicitly hidden + // i.e. their positioning is not affected if an ancestor is hidden. + if (child->opacity() <= 0.0 || childPrivate->explicitlyHidden) { item->isVisible = false; } else if (!item->isVisible) { item->isVisible = true; @@ -299,6 +302,12 @@ void QDeclarativeBasePositioner::finishApplyTransitions() d->moveActions.clear(); } +static inline bool isInvisible(QDeclarativeItem *child) +{ + QDeclarativeItemPrivate *childPrivate = static_cast(QGraphicsItemPrivate::get(child)); + return child->opacity() == 0.0 || childPrivate->explicitlyHidden || !child->width() || !child->height(); +} + /*! \qmlclass Column QDeclarativeColumn \since 4.7 @@ -416,11 +425,6 @@ QDeclarativeColumn::QDeclarativeColumn(QDeclarativeItem *parent) { } -static inline bool isInvisible(QDeclarativeItem *child) -{ - return child->opacity() == 0.0 || !child->isVisible() || !child->width() || !child->height(); -} - void QDeclarativeColumn::doPositioning(QSizeF *contentSize) { int voffset = 0; diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h index 04f0181..822079b 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h @@ -100,18 +100,23 @@ public: bool doingPositioning : 1; bool anchorConflict : 1; - virtual void itemSiblingOrderChanged(QDeclarativeItem* other) + void schedulePositioning() { Q_Q(QDeclarativeBasePositioner); - Q_UNUSED(other); if(!queuedPositioning){ - //Delay is due to many children often being reordered at once - //And we only want to reposition them all once QTimer::singleShot(0,q,SLOT(prePositioning())); queuedPositioning = true; } } + virtual void itemSiblingOrderChanged(QDeclarativeItem* other) + { + Q_UNUSED(other); + //Delay is due to many children often being reordered at once + //And we only want to reposition them all once + schedulePositioning(); + } + void itemGeometryChanged(QDeclarativeItem *, const QRectF &newGeometry, const QRectF &oldGeometry) { Q_Q(QDeclarativeBasePositioner); @@ -120,8 +125,7 @@ public: } virtual void itemVisibilityChanged(QDeclarativeItem *) { - Q_Q(QDeclarativeBasePositioner); - q->prePositioning(); + schedulePositioning(); } virtual void itemOpacityChanged(QDeclarativeItem *) { -- cgit v0.12 From 3e707f559f6f26ab7a5d5623f8e5af9ea9cc317e Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 8 Jun 2010 09:25:04 +0200 Subject: Fix slow network access in qmlviewer (Windows) If no proxy is defined in the preferences, qmlviewer uses systemProxyForQuery to automatically retrieve the proxy settings of the Operating System. However, calling systemProxyForQuery can take several seconds in case Windows to automatically detect proxies (QTBUG-10106). This hot fix therefore just disables querying the OS proxies on Windows. Task-number: QTBUG-11261 Reviewed-by: Warwick Allison --- tools/qml/qmlruntime.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 5b0139f..d95bec2 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -281,7 +281,12 @@ public: ret << httpProxy; return ret; } +#ifdef Q_OS_WIN + // systemProxyForQuery can take insanely long on Windows (QTBUG-10106) + return QNetworkProxyFactory::proxyForQuery(query); +#else return QNetworkProxyFactory::systemProxyForQuery(query); +#endif } void setHttpProxy (QNetworkProxy proxy) { -- cgit v0.12 From c252a57f59fb6291d0e9a6b772b208bd1763779f Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Tue, 8 Jun 2010 10:16:16 +0200 Subject: Fix configure test for DirectFB The availability of directfb-config does not depend on pkg-config Merge-request: 2409 Reviewed-by: Oswald Buddenhagen --- configure | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 916b2e5..9aff8cd 100755 --- a/configure +++ b/configure @@ -5834,14 +5834,12 @@ if [ "$PLATFORM_QWS" = "yes" ]; then fi if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then - if [ -n "$PKG_CONFIG" ]; then - if $PKG_CONFIG --exists directfb 2>/dev/null; then - QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null` - QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null` - elif directfb-config --version >/dev/null 2>&1; then - QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null` - QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null` - fi + if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then + QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null` + QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null` + elif directfb-config --version >/dev/null 2>&1; then + QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null` + QT_LIBS_DIRECTFB=`directfb-config --libs 2>/dev/null` fi # QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero. -- cgit v0.12 From 77046223395c290d18b69850ee4f05d1660b15df Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Tue, 8 Jun 2010 10:19:54 +0200 Subject: Fix a freetype link failure. qfontengine_ft.cpp uses the function FT_GlyphSlot_Embolden but ftsynth.c (where the function is implmented) isn't compiled in when QT_CONFIG contains freetype. Merge-request: 672 Reviewed-by: Oswald Buddenhagen --- src/gui/text/text.pri | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri index 9ec3142..34311a9 100644 --- a/src/gui/text/text.pri +++ b/src/gui/text/text.pri @@ -138,7 +138,8 @@ contains(QT_CONFIG, freetype) { ../3rdparty/freetype/src/base/ftinit.c \ ../3rdparty/freetype/src/base/ftmm.c \ ../3rdparty/freetype/src/base/fttype1.c \ - ../3rdparty/freetype/src/base/ftbitmap.c\ + ../3rdparty/freetype/src/base/ftsynth.c \ + ../3rdparty/freetype/src/base/ftbitmap.c \ ../3rdparty/freetype/src/bdf/bdf.c \ ../3rdparty/freetype/src/cache/ftcache.c \ ../3rdparty/freetype/src/cff/cff.c \ -- cgit v0.12 From dcb9b85376718d768f538e19ae231f5e061b7b31 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 8 Jun 2010 10:31:41 +0200 Subject: I10n: Update German translations for 4.7.0 --- translations/qt_de.ts | 477 ++++++++++++++++++++++++++------------------------ 1 file changed, 253 insertions(+), 224 deletions(-) diff --git a/translations/qt_de.ts b/translations/qt_de.ts index 226b7da..7d32ead 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -4,7 +4,7 @@ CloseButton - + Close Tab Schließen @@ -12,7 +12,7 @@ FakeReply - + Fake error ! Fake error ! @@ -25,7 +25,7 @@ MAC_APPLICATION_MENU - + Services Dienste @@ -1275,7 +1275,7 @@ nach Diese Socket-Operation wird nicht unterstützt - + Socket operation timed out Das Zeitlimit für die Operation wurde überschritten @@ -1597,7 +1597,7 @@ nach QDeclarativeAbstractAnimation - + Cannot animate non-existent property "%1" Die Eigenschaft '%1" existiert nicht und kann daher nicht animiert werden @@ -1606,11 +1606,24 @@ nach Cannot animate read-only property "%1" Die Eigenschaft '%1" ist schreibgeschützt und kann daher nicht animiert werden + + + Animation is an abstract class + Die Klasse Animation ist abstrakt + + + + QDeclarativeAnchorAnimation + + + Cannot set a duration of < 0 + Es kann keine Zeitdauer <0 gesetzt werden + QDeclarativeAnchors - + Possible anchor loop detected on fill. Bei der Fülloperation wurde eine potentielle Endlosschleife der Anker festgestellt. @@ -1676,9 +1689,17 @@ nach + QDeclarativeAnimatedImage + + + Qt was built without support for QMovie + Diese Version der Qt-Bibliothek wurde ohne Unterstützung für die Klasse QMovie erstellt + + + QDeclarativeBehavior - + Cannot change the animation assigned to a Behavior. Die zu einem Behavior-Element gehörende Animation kann nicht geändert werden. @@ -1686,7 +1707,7 @@ nach QDeclarativeBinding - + Binding loop detected for property "%1" Bei der für die Eigenschaft "%1" angegebenen Bindung wurde eine Endlosschleife festgestellt @@ -1694,7 +1715,7 @@ nach QDeclarativeCompiledBindings - + Binding loop detected for property "%1" Bei der für die Eigenschaft "%1" angegebenen Bindung wurde eine Endlosschleife festgestellt @@ -1703,16 +1724,16 @@ nach QDeclarativeCompiler - - - + + + - + Invalid property assignment: "%1" is a read-only property Ungültige Zuweisung bei Eigenschaft: "%1" ist schreibgeschützt - + Invalid property assignment: unknown enumeration Ungültige Zuweisung bei Eigenschaft: Ungültiger Aufzählungswert @@ -1727,32 +1748,32 @@ nach Ungültige Zuweisung bei Eigenschaft: Es wird eine URL erwartet - + Invalid property assignment: unsigned int expected Ungültige Zuweisung bei Eigenschaft: Es wird eine vorzeichenloser Ganzzahlwert erwartet - + Invalid property assignment: int expected Ungültige Zuweisung bei Eigenschaft: Es wird ein Ganzzahlwert erwartet - + Invalid property assignment: float expected Ungültige Zuweisung bei Eigenschaft: Es wird eine Gleitkommazahl erwartet - + Invalid property assignment: double expected Ungültige Zuweisung bei Eigenschaft: Es wird eine Gleitkommazahl (double) erwartet - + Invalid property assignment: color expected Ungültige Zuweisung bei Eigenschaft: Es wird eine Farbspezifikation erwartet - + Invalid property assignment: date expected Ungültige Zuweisung bei Eigenschaft: Es wird eine Datumsangabe erwartet @@ -1767,7 +1788,7 @@ nach Ungültige Zuweisung bei Eigenschaft: Es wird eine Datumsangabe erwartet - + Invalid property assignment: point expected Ungültige Zuweisung bei Eigenschaft: Es wird eine Koordinatenangabe für einen Punkt erwartet @@ -1797,63 +1818,38 @@ nach Ungültige Zuweisung bei Eigenschaft: Der Typ "%1" ist nicht unterstützt - + Element is not creatable. Das Element kann nicht erzeugt werden. - + Component elements may not contain properties other than id Komponenten dürfen außer id keine weiteren Eigenschaften enthalten. - - Component elements may not contain script blocks - Komponenten dürfen keine Skripte enthalten - - Invalid component id specification Ungültige Komponentenspezifikation - + id is not unique ID-Wert nicht eindeutig - + Invalid component body specification Inhalt der Komponente ungültig - + Cannot create empty component specification Es kann keine leere Komponentenangabe erzeugt werden - - Invalid Script block. Specify either the source property or inline script - Ungültiges Skript. Es muss die Eigenschaft oder ein eingebettetes Skript angegeben werden - - - - Invalid Script source value - Ungültige Angabe für Skript - - - - Properties cannot be set on Script block - Für ein Skript können keine Eigenschaften angegeben werden - - - - Invalid Script block - Ungültiges Skript - - - + Empty signal assignment Leere Signalzuweisung @@ -1869,29 +1865,29 @@ nach - + Non-existent attached object Es existiert kein Bezugselement für die Eigenschaft - - + + Invalid attached object assignment Ungültige Zuweisung des Bezugselements - + Cannot assign to non-existent default property Es kann keine Zuweisung erfolgen, da keine Vorgabe-Eigenschaft existiert - + Cannot assign to non-existent property "%1" Es kann keine Zuweisung erfolgen, da keine Eigenschaft des Namens '%1" existiert - + Invalid use of namespace Ungültige Verwendung eines Namensraums @@ -1901,24 +1897,44 @@ nach Kein gültiger Name einer Eigenschaft des Typs 'attached' - + Invalid use of id property Ungültige Verwendung einer Eigenschaft des Typs 'Id' - + Incorrectly specified signal assignment - + + Component objects cannot declare new properties. + Komponentenobjekte können keine neuen Eigenschaften deklarieren. + + + + Component objects cannot declare new signals. + Komponentenobjekte können keine neuen Signale deklarieren. + + + + Component objects cannot declare new functions. + Komponentenobjekte können keine neuen Funktionen deklarieren. + + + + Cannot assign a value to a signal (expecting a script to be run) + Einem Signal können keine Werte zugewiesen werden (es wird ein Skript erwartet) + + + Property has already been assigned a value Der Eigenschaft wurde bereits ein Wert zugewiesen - + Invalid grouped property access Falsche Gruppierung bei Zugriff auf Eigenschaft @@ -1973,7 +1989,7 @@ nach Ungültige Zuweisung bei Eigenschaft: Es wird ein Skript erwartet - + Cannot assign object to property Zuweisung eines Objekts an eine Eigenschaft nicht zulässig @@ -2033,7 +2049,7 @@ nach Eine als 'FINAL' ausgewiesene Eigenschaft kann nicht überschrieben werden - + Invalid property type Ungültiger Typ der Eigenschaft @@ -2088,7 +2104,7 @@ nach QDeclarativeComponent - + Invalid empty URL Ungültige (leere) URL @@ -2096,23 +2112,23 @@ nach QDeclarativeCompositeTypeManager - - + + Resource %1 unavailable Auf die Ressource %1 konnte nicht zugegriffen werden - + Namespace %1 cannot be used as a type Der Namensraum %1 kann nicht als Typangabe verwendet werden - %1 is not a type - %1 ist keine Typangabe + %1 %2 + %1 %2 - + Type %1 unavailable Der Typ %1 ist nicht verfügbar @@ -2120,14 +2136,13 @@ nach QDeclarativeConnections - - - + + Cannot assign to non-existent property "%1" Es kann keine Zuweisung erfolgen, da keine Eigenschaft des Namens '%1" existiert - + Connections: nested objects not allowed Verbindungen: Verschachtelte Objekte sind nicht zulässig @@ -2175,13 +2190,29 @@ nach SQL: database version mismatch SQL: Die Version der Datenbank entspricht nicht der erwarteten Version + + + QDeclarativeFlipable + + + front is a write-once property + 'front' kann nur einmal zugewiesen werden + + + + back is a write-once property + 'back' kann nur einmal zugewiesen werden + + + + QDeclarativeImportDatabase - + module "%1" definition "%2" not readable Modul "%1" Definition "%2" kann nicht gelesen werden - + plugin cannot be loaded for module "%1": %2 Das Plugin des Moduls "%1" konnte nicht geladen werden: %2 @@ -2191,7 +2222,7 @@ nach Modul "%1" Plugin "%2" konnte nicht gefunden werden - + module "%1" version %2.%3 is not installed Modul "%1" Version %2.%3 ist nicht installiert @@ -2210,29 +2241,59 @@ nach import "%1" has no qmldir and no namespace - "qmldir" und Namensraum fehlt bei Import "%1" + "qmldir" und Namensraum fehlen bei dem Import "%1" - - - QDeclarativeFlipable - - front is a write-once property - 'front' kann nur einmal zugewiesen werden + + - %1 is not a namespace + - %1 ist kein gültiger Namensraum - - back is a write-once property - 'back' kann nur einmal zugewiesen werden + + - nested namespaces not allowed + - geschachtelte Namensräume sind nicht zulässig + + + + + local directory + Lokales Verzeichnis' + + + + is ambiguous. Found in %1 and in %2 + ist mehrdeutig. Es kommt in %1 und in %2 vor + + + + is ambiguous. Found in %1 in version %2.%3 and %4.%5 + ist mehrdeutig. Es kommt in %1 in den Version %2.%3 und %4.%5 vor + + + + is instantiated recursively + wird rekursiv instanziiert + + + + is not a type + ist kein Typ - QDeclarativeInfo + QDeclarativeKeyNavigationAttached - - - unknown location - Unbekannter Ort + + KeyNavigation is only available via attached properties + Tastennavigation ist nur über Eigenschaften des Typs 'attached' verfügbar + + + + QDeclarativeKeysAttached + + + Keys is only available via attached properties + Die Unterstützung für Tasten ist nur über Eigenschaften des Typs 'attached' verfügbar @@ -2263,12 +2324,7 @@ nach append: Der Wert ist kein Objekt - - get: index %1 out of range - get: Der Index %1 ist außerhalb des gültigen Bereichs - - - + set: value is not an object set: Der Wert ist kein Objekt @@ -2303,7 +2359,7 @@ nach QDeclarativeLoader - + Loader does not support loading non-visual elements. Das Laden nicht-visueller Elemente ist nicht unterstützt. @@ -2311,7 +2367,7 @@ nach QDeclarativeParentAnimation - + Unable to preserve appearance under complex transform Das Erscheinungsbild kann bei einer komplexen Transformation nicht beibehalten werden @@ -2330,7 +2386,7 @@ nach QDeclarativeParentChange - + Unable to preserve appearance under complex transform Das Erscheinungsbild kann bei einer komplexen Transformation nicht beibehalten werden @@ -2349,7 +2405,7 @@ nach QDeclarativeParser - + Illegal character Ungültiges Zeichen @@ -2364,17 +2420,19 @@ nach Ungültiges Escape-Sequenz - + + + Illegal unicode escape sequence Ungültige Unicode-Escape-Sequenz - + Unclosed comment at end of file Kommentar am Dateiende nicht abgeschlossen - + Illegal syntax for exponential number Ungültige Syntax des Exponenten @@ -2384,16 +2442,27 @@ nach Ein Bezeichner darf nicht mit einem numerischen Literal beginnen - + Unterminated regular expression literal Regulärer Ausdruck nicht abgeschlossen - + Invalid regular expression flag '%0' Ungültiger Modifikator '%0' bei regulärem Ausdruck + + + Unterminated regular expression backslash sequence + Regulärer Ausdruck nicht abgeschlossen + + + + Unterminated regular expression class + Klasse im regulären Ausdruck nicht abgeschlossen + + Syntax error @@ -2411,28 +2480,28 @@ nach Es wird das Element '%1' erwartet - - + + Property value set multiple times Mehrfache Zuweisung eines Wertes an eine Eigenschaft - + Expected type name Es wird ein Typname erwartet - - Invalid use of Script block - Ungültige Verwendung von Skript-Blöcken - - - + Invalid import qualifier ID Ungültige Id-Angabe bei Import + + Reserved name "Qt" cannot be used as an qualifier + Der reservierte Name "Qt" kann nicht als Bezeichner verwendet werden + + Script import qualifiers must be unique. Der für den Skript-Import angegebene Qualifizierer muss eindeutig sein. @@ -2448,7 +2517,7 @@ nach Der Import einer Bibliothek erfordert eine Versionsangabe - + Expected parameter type Es wird eine Typangabe für den Parameter erwartet @@ -2473,20 +2542,15 @@ nach 'read-only' wird an dieser Stelle noch nicht unterstützt - + JavaScript declaration outside Script element Eine JavaScript-Deklaration ist außerhalb eines Skriptelementes nicht zulässig - - - Variable declarations not allow in inline Script blocks - Variablendeklarationen sind in eingebetteten Script-Blöcken nicht zulässig - QDeclarativePauseAnimation - + Cannot set a duration of < 0 Es kann keine Zeitdauer <0 gesetzt werden @@ -2494,7 +2558,7 @@ nach QDeclarativePixmapCache - + Error decoding: %1: %2 Fehler beim Decodieren: %1: %2 @@ -2505,7 +2569,7 @@ nach - + Cannot open: %1 Fehlschlag beim Öffnen: %1 @@ -2518,7 +2582,7 @@ nach QDeclarativePropertyAnimation - + Cannot set a duration of < 0 Es kann keine Zeitdauer <0 gesetzt werden @@ -2526,12 +2590,12 @@ nach QDeclarativePropertyChanges - + PropertyChanges does not support creating state-specific objects. Die Erzeugung von Objekten, die einem Zustand zugeordnet sind, wird von PropertyChanges nicht unterstützt. - + Cannot assign to non-existent property "%1" Es kann keine Zuweisung erfolgen, da keine Eigenschaft des Namens '%1" existiert @@ -2544,13 +2608,13 @@ nach QDeclarativeTextInput - - + + Could not load cursor delegate Cursor-Delegate konnte nicht geladen werden - + Could not instantiate cursor delegate Cursor-Delegate konnte angelegt werden @@ -2563,7 +2627,7 @@ nach Es konnte kein Objekt des Typs %1 erzeugt werden - + Cannot assign value %1 to property %2 Der Wert '%1' kann nicht der Eigenschaft %2 zugewiesen werden @@ -2583,7 +2647,7 @@ nach Der Signal-Eigenschaft %1 kann kein Objekt zugewiesen werden - + Cannot assign object to list Zuweisung eines Objekts an eine Liste nicht zulässig @@ -2606,15 +2670,24 @@ nach QDeclarativeVisualDataModel - + Delegate component must be Item type. Delegate-Komponente muss vom Typ 'Item' sein + QDeclarativeXmlListModel + + + + Qt was built without support for xmlpatterns + Diese Version der Qt-Bibliothek wurde ohne Unterstützung für xmlpatterns erstellt + + + QDeclarativeXmlListModelRole - + An XmlRole query must not start with '/' Eine XmlRole-Abfrage darf nicht mit '/' beginnen @@ -2622,7 +2695,7 @@ nach QDeclarativeXmlRoleList - + An XmlListModel query must start with '/' or "//" Eine XmlListModel-Abfrage muss mit '/' oder "//" beginnen @@ -3690,7 +3763,7 @@ Möchten Sie die Datei trotzdem löschen? Unbekannter Fehler - + No host name given Es wurde kein Hostname angegeben @@ -3698,9 +3771,9 @@ Möchten Sie die Datei trotzdem löschen? QHostInfoAgent - + - + Host not found Rechner konnte nicht gefunden werden @@ -4051,7 +4124,7 @@ Möchten Sie die Datei trotzdem löschen? QIODevice - + Permission denied Zugriff verweigert @@ -4071,7 +4144,7 @@ Möchten Sie die Datei trotzdem löschen? Kein freier Speicherplatz auf dem Gerät vorhanden - + Unknown error Unbekannter Fehler @@ -4188,7 +4261,7 @@ Möchten Sie die Datei trotzdem löschen? QLineEdit - + Select All Alles auswählen @@ -4509,39 +4582,6 @@ Möchten Sie die Datei trotzdem löschen? - QMediaPlayer - - - The QMediaPlayer object does not have a valid service - Das QMediaPlayer-Objekt verfügt über keinen gültigen Dienst - - - - QMediaPlaylist - - - - Could not add items to read only playlist. - Es konnten keine Einträge zur Wiedergabeliste hinzugefügt werden, da sie schreibgeschützt ist. - - - - - Playlist format is not supported - Das Format der Wiedergabeliste ist nicht unterstützt - - - - The file could not be accessed. - Auf die Datei konnte nicht zugegriffen werden. - - - - Playlist format is not supported. - Das Format der Wiedergabeliste ist nicht unterstützt. - - - QMenu @@ -4566,7 +4606,7 @@ Möchten Sie die Datei trotzdem löschen? QMenuBar - + Actions Optionen @@ -4867,7 +4907,7 @@ Möchten Sie die Datei trotzdem löschen? QNetworkAccessHttpBackend - + No suitable proxy found Es konnte kein geeigneter Proxy-Server gefunden werden @@ -4875,7 +4915,7 @@ Möchten Sie die Datei trotzdem löschen? QNetworkAccessManager - + Network access is disabled. Der Zugriff auf das Netzwerk ist nicht gestattet. @@ -4883,12 +4923,12 @@ Möchten Sie die Datei trotzdem löschen? QNetworkReply - + Error downloading %1 - server replied: %2 Beim Herunterladen von %1 trat ein Fehler auf - Die Antwort des Servers ist: %2 - + Protocol "%1" is unknown Das Protokoll "%1" ist unbekannt @@ -4898,7 +4938,7 @@ Möchten Sie die Datei trotzdem löschen? Fehler bei Netzwerkverbindung. - + Temporary network failure. Das Netzwerk ist zur Zeit ausgefallen. @@ -4906,7 +4946,7 @@ Möchten Sie die Datei trotzdem löschen? QNetworkReplyImpl - + Operation canceled Operation abgebrochen @@ -4924,7 +4964,7 @@ Möchten Sie die Datei trotzdem löschen? QNetworkSessionPrivateImpl - + Unknown session error. Unbekannter Fehler bei Netzwerkverbindung. @@ -5130,11 +5170,17 @@ Möchten Sie die Datei trotzdem löschen? QObject - + "%1" duplicates a previous role name and will be disabled. "%1" ist bereits als Name einer Rolle vergeben und wird daher deaktiviert. + + + invalid query: "%1" + Ungültige Abfrage: "%1" + + PulseAudio Sound Server @@ -6212,7 +6258,7 @@ Bitte wählen Sie einen anderen Dateinamen. QSQLiteDriver - + Error opening database Die Datenbankverbindung konnte nicht geöffnet werden @@ -6240,8 +6286,8 @@ Bitte wählen Sie einen anderen Dateinamen. QSQLiteResult - - + + Unable to fetch row Der Datensatz konnte nicht abgeholt werden @@ -6267,7 +6313,7 @@ Bitte wählen Sie einen anderen Dateinamen. Die Anzahl der Parameter ist falsch - + No query Kein Abfrage @@ -6810,8 +6856,9 @@ Bitte wählen Sie einen anderen Dateinamen. QShortcut - + Space + This and all following "incomprehensible" strings in QShortcut context are key names. Please use the localized names appearing on actual keyboards or whatever is commonly used. Leertaste @@ -7999,7 +8046,7 @@ Bitte wählen Sie einen anderen Dateinamen. Abbrechen - + Exit Beenden @@ -8343,7 +8390,7 @@ Bitte wählen Sie einen anderen Dateinamen. QTextControl - + &Undo &Rückgängig @@ -9056,7 +9103,7 @@ Bitte wählen Sie einen anderen Dateinamen. Unbekannt - + Web Inspector - %2 Web Inspector - %2 @@ -9067,7 +9114,12 @@ Bitte wählen Sie einen anderen Dateinamen. %1 (%2x%3 Pixel) - + + Redirection limit reached + Maximal Anzahl von Weiterleitungen wurde erreicht + + + Bad HTTP request Ungültige HTTP-Anforderung @@ -9152,7 +9204,7 @@ Bitte wählen Sie einen anderen Dateinamen. - + JavaScript Alert - %1 JavaScript-Hinweis - %1 @@ -9177,7 +9229,7 @@ Bitte wählen Sie einen anderen Dateinamen. Das Skript dieser Webseite ist fehlerhaft. Möchten Sie es anhalten? - + Move the cursor to the next character Positionsmarke auf folgendes Zeichen setzen @@ -9398,7 +9450,7 @@ Bitte wählen Sie einen anderen Dateinamen. QWidget - + * * @@ -11303,13 +11355,13 @@ Bitte wählen Sie einen anderen Dateinamen. - + Type %1 of %2 element cannot be resolved. Der Typ %1 des Elements %2 kann nicht aufgelöst werden. - + Base type %1 of complex type cannot be resolved. Der Basistyp %1 des komplexen Typs kann nicht aufgelöst werden. @@ -11319,7 +11371,7 @@ Bitte wählen Sie einen anderen Dateinamen. %1 kann keinen komplexen Basistyp haben, der '%2' spezifiziert. - + Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type. Das Inhaltsmodell des komplexen Typs %1enthält ein Element '%2'; es kann daher nicht durch Erweiterung von einem Typ abgeleitet werden, der nicht leer ist. @@ -12229,27 +12281,4 @@ Bitte wählen Sie einen anderen Dateinamen. Das Attribut '%1' enthält einen ungültigen qualifizierten Namen: %2. - - Widget - - - Widget - Widget - - - - about:blank - about:blank - - - - Image from Qt to HTML - Bild von Qt zu HTML - - - - Pixmap from Qt to HTML - Pixmap von Qt zu HTML - - -- cgit v0.12 From a46e97c429077022bc7f426a3adec588643abc57 Mon Sep 17 00:00:00 2001 From: mae Date: Fri, 4 Jun 2010 11:39:07 +0200 Subject: Cursor positioning in QTextDocument after undo() QTextDocument had no way of storing the cursor position from which a document change was initiated in the undo stack. That means that any undo operation would reposition the text cursor to the text position where the actual change happened. This works in many cases, but not always. In Qt Creator we have standard IDE shortcuts like e.g. Ctrl+Return for InsertLineBelowCurrentLine, which insert a newline at the end of the current line, not at the cursor position. Using undo there resulted in a surprisingly wrong cursor position. The problem becomes worse with more advanced refactoring and productivity tools (like snippets). The patch creates a synthetic CursorMoved undo item with the position which was current at the time of calling QTextCursor::beginEditBlock(), but only if necesary, i.e. only in those cases where the cursor would be positioned wrongly. Reviewed-by: Roberto Raggi --- src/gui/text/qtextcursor.cpp | 3 +++ src/gui/text/qtextdocument_p.cpp | 19 +++++++++++++++++++ src/gui/text/qtextdocument_p.h | 2 ++ tests/auto/qtextcursor/tst_qtextcursor.cpp | 18 +++++++++++++++++- 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index d6ac3aa..3db66ce 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -2437,6 +2437,9 @@ void QTextCursor::beginEditBlock() if (!d || !d->priv) return; + if (d->priv->editBlock == 0) // we are the initial edit block, store current cursor position for undo + d->priv->editBlockCursorPosition = d->position; + d->priv->beginEditBlock(); } diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index e2bca04..f3cd481 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -192,6 +192,7 @@ QTextDocumentPrivate::QTextDocumentPrivate() initialBlockCharFormatIndex(-1) // set correctly later in init() { editBlock = 0; + editBlockCursorPosition = -1; docChangeFrom = -1; undoState = 0; @@ -967,6 +968,10 @@ int QTextDocumentPrivate::undoRedo(bool undo) editPos = -1; break; } + case QTextUndoCommand::CursorMoved: + editPos = c.pos; + editLength = 0; + break; case QTextUndoCommand::Custom: resetBlockRevision = -1; // ## TODO if (undo) @@ -1046,6 +1051,18 @@ void QTextDocumentPrivate::appendUndoItem(const QTextUndoCommand &c) if (undoState < undoStack.size()) clearUndoRedoStacks(QTextDocument::RedoStack); + if (editBlock != 0 && editBlockCursorPosition >= 0) { // we had a beginEditBlock() with a cursor position + if (c.pos != (quint32) editBlockCursorPosition) { // and that cursor position is different from the command + // generate a CursorMoved undo item + QT_INIT_TEXTUNDOCOMMAND(cc, QTextUndoCommand::CursorMoved, true, QTextUndoCommand::MoveCursor, + 0, 0, editBlockCursorPosition, 0, 0); + undoStack.append(cc); + undoState++; + editBlockCursorPosition = -1; + } + } + + if (!undoStack.isEmpty() && modified) { QTextUndoCommand &last = undoStack[undoState - 1]; @@ -1167,6 +1184,8 @@ void QTextDocumentPrivate::endEditBlock() } } + editBlockCursorPosition = -1; + finishEdit(); } diff --git a/src/gui/text/qtextdocument_p.h b/src/gui/text/qtextdocument_p.h index ac5ed3c..d1bd698 100644 --- a/src/gui/text/qtextdocument_p.h +++ b/src/gui/text/qtextdocument_p.h @@ -132,6 +132,7 @@ public: BlockAdded = 6, BlockDeleted = 7, GroupFormatChange = 8, + CursorMoved = 9, Custom = 256 }; enum Operation { @@ -315,6 +316,7 @@ private: bool modified; int editBlock; + int editBlockCursorPosition; int docChangeFrom; int docChangeOldLength; int docChangeLength; diff --git a/tests/auto/qtextcursor/tst_qtextcursor.cpp b/tests/auto/qtextcursor/tst_qtextcursor.cpp index 99babac..41835bb 100644 --- a/tests/auto/qtextcursor/tst_qtextcursor.cpp +++ b/tests/auto/qtextcursor/tst_qtextcursor.cpp @@ -151,6 +151,7 @@ private slots: void cursorPositionWithBlockUndoAndRedo(); void cursorPositionWithBlockUndoAndRedo2(); + void cursorPositionWithBlockUndoAndRedo3(); private: int blockCount(); @@ -1756,9 +1757,9 @@ void tst_QTextCursor::adjustCursorsOnInsert() void tst_QTextCursor::cursorPositionWithBlockUndoAndRedo() { cursor.insertText("AAAABBBBCCCCDDDD"); - cursor.beginEditBlock(); cursor.setPosition(12); int cursorPositionBefore = cursor.position(); + cursor.beginEditBlock(); cursor.insertText("*"); cursor.setPosition(8); cursor.insertText("*"); @@ -1814,5 +1815,20 @@ void tst_QTextCursor::cursorPositionWithBlockUndoAndRedo2() QCOMPARE(cursor.position(), cursorPositionBefore); } +void tst_QTextCursor::cursorPositionWithBlockUndoAndRedo3() +{ + // verify that it's the position of the beginEditBlock that counts, and not the last edit position + cursor.insertText("AAAABBBB"); + int cursorPositionBefore = cursor.position(); + cursor.beginEditBlock(); + cursor.setPosition(4); + QVERIFY(cursor.position() != cursorPositionBefore); + cursor.insertText("*"); + cursor.endEditBlock(); + QCOMPARE(cursor.position(), 5); + doc->undo(&cursor); + QCOMPARE(cursor.position(), cursorPositionBefore); +} + QTEST_MAIN(tst_QTextCursor) #include "tst_qtextcursor.moc" -- cgit v0.12 From 9623b49fd3055ede03569e6e9a46a4237f6e119f Mon Sep 17 00:00:00 2001 From: mae Date: Tue, 8 Jun 2010 11:30:28 +0200 Subject: Add qmlmethod Item::childAt() to delarative item The method allows for more flexbile mouse and touch handling. It offers a fast way to identify a child item for a given pixel position. --- src/declarative/graphicsitems/qdeclarativeitem.cpp | 24 +++++++++++++++++++++- src/declarative/graphicsitems/qdeclarativeitem.h | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 9949e65..bef09bb 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1633,7 +1633,7 @@ void QDeclarativeItemPrivate::data_append(QDeclarativeListProperty *pro QObject *QDeclarativeItemPrivate::resources_at(QDeclarativeListProperty *prop, int index) { - QObjectList children = prop->object->children(); + const QObjectList children = prop->object->children(); if (index < children.count()) return children.at(index); else @@ -2391,6 +2391,28 @@ void QDeclarativeItem::forceFocus() } } + +/*! + \qmlmethod Item::childAt(real x, real y) + + Returns the visible child item at point (\a x, \a y), which is in this + item's coordinate system, or \c null if there is no such item. + */ +QDeclarativeItem *QDeclarativeItem::childAt(qreal x, qreal y) const +{ + const QList children = childItems(); + for (int i = children.count()-1; i >= 0; --i) { + if (QDeclarativeItem *child = qobject_cast(children.at(i))) { + if (child->isVisible() && child->x() <= x + && child->x() + child->width() >= x + && child->y() <= y + && child->y() + child->height() >= y) + return child; + } + } + return 0; +} + void QDeclarativeItemPrivate::focusChanged(bool flag) { Q_Q(QDeclarativeItem); diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h index 77e316b..4f420f8 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.h +++ b/src/declarative/graphicsitems/qdeclarativeitem.h @@ -148,6 +148,7 @@ public: Q_INVOKABLE QScriptValue mapFromItem(const QScriptValue &item, qreal x, qreal y) const; Q_INVOKABLE QScriptValue mapToItem(const QScriptValue &item, qreal x, qreal y) const; Q_INVOKABLE void forceFocus(); + Q_INVOKABLE QDeclarativeItem *childAt(qreal x, qreal y) const; Q_SIGNALS: void childrenChanged(); -- cgit v0.12 From e5567b2e0513f5a03987f78df2d565c0e6c6a951 Mon Sep 17 00:00:00 2001 From: mae Date: Tue, 8 Jun 2010 12:00:17 +0200 Subject: Fix snake demo Code degeneration lead to three bugs: 1. progress bar worked only the first time 2. restart was broken 3. highscore model was not persistent Reviewed-by: Trust me --- demos/declarative/snake/content/HighScoreModel.qml | 2 +- demos/declarative/snake/content/snake.js | 1 + demos/declarative/snake/snake.qml | 12 ++++++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/demos/declarative/snake/content/HighScoreModel.qml b/demos/declarative/snake/content/HighScoreModel.qml index 99799c8..42482f8 100644 --- a/demos/declarative/snake/content/HighScoreModel.qml +++ b/demos/declarative/snake/content/HighScoreModel.qml @@ -106,7 +106,7 @@ ListModel { } if (rs.rows.length > maxScores) tx.executeSql("DELETE FROM HighScores WHERE game=? AND score <= ?", - [rs.rows.item(maxScores).score]); + [game, rs.rows.item(maxScores).score]); } } ) diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js index 6f78b33..4d05e33 100644 --- a/demos/declarative/snake/content/snake.js +++ b/demos/declarative/snake/content/snake.js @@ -37,6 +37,7 @@ function startNewGame() startNewGameTimer.running = true; return; } + numRows = numRowsAvailable; numColumns = numColumnsAvailable; board = new Array(numRows * numColumns); diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml index 565e92c..46114f5 100644 --- a/demos/declarative/snake/snake.qml +++ b/demos/declarative/snake/snake.qml @@ -86,7 +86,7 @@ Rectangle { onTriggered: { Logic.moveSkull() } } Timer { - + id: startNewGameTimer; interval: 700; onTriggered: { Logic.startNewGame(); } } @@ -177,7 +177,6 @@ Rectangle { id: progressIndicator color: "#221edd"; width: 0; - Behavior on width { NumberAnimation { duration: startHeartbeatTimer.running ? 1000 : 0}} height: 30; } } @@ -227,4 +226,13 @@ Rectangle { } ] + transitions: [ + Transition { + from: "*" + to: "starting" + NumberAnimation { target: progressIndicator; property: "width"; duration: 1000 } + + } + ] + } -- cgit v0.12 From fb68f9975f801fb20ec4917dc7a980be2f162876 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 4 Jun 2010 13:46:00 +0200 Subject: syncqt: change tabs to spaces This file originally used tabwidth of 8. --- bin/syncqt | 752 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 376 insertions(+), 376 deletions(-) diff --git a/bin/syncqt b/bin/syncqt index 71f2eab..f993fd9 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -146,12 +146,12 @@ sub shouldMasterInclude { return 0 if(basename($iheader) =~ /qconfig/); if(open(F, "<$iheader")) { while() { - chomp; - return 0 if(/^\#pragma qt_no_master_include$/); - } - close(F); + chomp; + return 0 if(/^\#pragma qt_no_master_include$/); + } + close(F); } else { - return 0; + return 0; } return 1; } @@ -168,17 +168,17 @@ sub classNames { my @ret; my ($iheader) = @_; if(basename($iheader) eq "qglobal.h") { - push @ret, "QtGlobal"; + push @ret, "QtGlobal"; } elsif(basename($iheader) eq "qendian.h") { - push @ret, "QtEndian"; + push @ret, "QtEndian"; } elsif(basename($iheader) eq "qconfig.h") { push @ret, "QtConfig"; } elsif(basename($iheader) eq "qplugin.h") { - push @ret, "QtPlugin"; + push @ret, "QtPlugin"; } elsif(basename($iheader) eq "qalgorithms.h") { - push @ret, "QtAlgorithms"; + push @ret, "QtAlgorithms"; } elsif(basename($iheader) eq "qcontainerfwd.h") { - push @ret, "QtContainerFwd"; + push @ret, "QtContainerFwd"; } elsif(basename($iheader) eq "qdebug.h") { push @ret, "QtDebug"; } elsif(basename($iheader) eq "qevent.h") { @@ -186,7 +186,7 @@ sub classNames { } elsif(basename($iheader) eq "qnamespace.h") { push @ret, "Qt" } elsif(basename($iheader) eq "qssl.h") { - push @ret, "QSsl"; + push @ret, "QSsl"; } elsif(basename($iheader) eq "qtest.h") { push @ret, "QTest" } elsif(basename($iheader) eq "qtconcurrentmap.h") { @@ -204,7 +204,7 @@ sub classNames { while() { my $line = $_; chomp $line; - chop $line if ($line =~ /\r$/); + chop $line if ($line =~ /\r$/); if($line =~ /^\#/) { if($line =~ /\\$/) { while($line = ) { @@ -212,18 +212,18 @@ sub classNames { last unless($line =~ /\\$/); } } - return @ret if($line =~ m/^#pragma qt_sync_stop_processing/); + return @ret if($line =~ m/^#pragma qt_sync_stop_processing/); push(@ret, "$1") if($line =~ m/^#pragma qt_class\(([^)]*)\)[\r\n]*$/); - $line = 0; + $line = 0; } - if($line) { + if($line) { $line =~ s,//.*$,,; #remove c++ comments - $line .= ";" if($line =~ m/^Q_[A-Z_]*\(.*\)[\r\n]*$/); #qt macro - $line .= ";" if($line =~ m/^QT_(BEGIN|END)_HEADER[\r\n]*$/); #qt macro - $line .= ";" if($line =~ m/^QT_(BEGIN|END)_NAMESPACE[\r\n]*$/); #qt macro - $line .= ";" if($line =~ m/^QT_MODULE\(.*\)[\r\n]*$/); # QT_MODULE macro + $line .= ";" if($line =~ m/^Q_[A-Z_]*\(.*\)[\r\n]*$/); #qt macro + $line .= ";" if($line =~ m/^QT_(BEGIN|END)_HEADER[\r\n]*$/); #qt macro + $line .= ";" if($line =~ m/^QT_(BEGIN|END)_NAMESPACE[\r\n]*$/); #qt macro + $line .= ";" if($line =~ m/^QT_MODULE\(.*\)[\r\n]*$/); # QT_MODULE macro $parsable .= " " . $line; - } + } } close(F); } @@ -259,7 +259,7 @@ sub classNames { $i = $i2 if($end eq ";"); $last_definition = $i + 1; last BLOCK; - } + } } } } @@ -267,42 +267,42 @@ sub classNames { } elsif($character eq ";") { $definition = substr($parsable, $last_definition, $i - $last_definition + 1); $last_definition = $i + 1; - } elsif($character eq "}") { - # a naked } must be a namespace ending - # if it's not a namespace, it's eaten by the loop above - pop @namespaces; - $last_definition = $i + 1; - } + } elsif($character eq "}") { + # a naked } must be a namespace ending + # if it's not a namespace, it's eaten by the loop above + pop @namespaces; + $last_definition = $i + 1; + } - if (substr($parsable, $last_definition, $i - $last_definition + 1) =~ m/ namespace ([^ ]*) / - && substr($parsable, $i+1, 1) eq "{") { - push @namespaces, $1; + if (substr($parsable, $last_definition, $i - $last_definition + 1) =~ m/ namespace ([^ ]*) / + && substr($parsable, $i+1, 1) eq "{") { + push @namespaces, $1; - # Eat the opening { so that the condensing loop above doesn't see it - $i++; - $last_definition = $i + 1; - } + # Eat the opening { so that the condensing loop above doesn't see it + $i++; + $last_definition = $i + 1; + } if($definition) { - $definition =~ s=[\n\r]==g; + $definition =~ s=[\n\r]==g; my @symbols; if($definition =~ m/^ *typedef *.*\(\*([^\)]*)\)\(.*\);$/) { - push @symbols, $1; + push @symbols, $1; } elsif($definition =~ m/^ *typedef +(.*) +([^ ]*);$/) { - push @symbols, $2; + push @symbols, $2; } elsif($definition =~ m/^ *(template *<.*> *)?(class|struct) +([^ ]* +)?([^<\s]+) ?(<[^>]*> ?)?\s*((,|:)\s*(public|protected|private) *.*)? *\{\}$/) { - push @symbols, $4; + push @symbols, $4; } elsif($definition =~ m/^ *Q_DECLARE_.*ITERATOR\((.*)\);$/) { - push @symbols, "Q" . $1 . "Iterator"; - push @symbols, "QMutable" . $1 . "Iterator"; - } + push @symbols, "Q" . $1 . "Iterator"; + push @symbols, "QMutable" . $1 . "Iterator"; + } - foreach (@symbols) { - my $symbol = $_; - $symbol = (join("::", @namespaces) . "::" . $symbol) if (scalar @namespaces); - push @ret, $symbol - if ($symbol =~ /^Q[^:]*$/ # no-namespace, starting with Q - || $symbol =~ /^Phonon::/); # or in the Phonon namespace + foreach (@symbols) { + my $symbol = $_; + $symbol = (join("::", @namespaces) . "::" . $symbol) if (scalar @namespaces); + push @ret, $symbol + if ($symbol =~ /^Q[^:]*$/ # no-namespace, starting with Q + || $symbol =~ /^Phonon::/); # or in the Phonon namespace } } } @@ -453,37 +453,37 @@ sub copyFile $filecontents = ; close I; if ( open(I, "< " . $ifile) ) { - local $/; - binmode I; - $ifilecontents = ; - close I; - $copy = fileCompare($file, $ifile); - $knowdiff = 0, + local $/; + binmode I; + $ifilecontents = ; + close I; + $copy = fileCompare($file, $ifile); + $knowdiff = 0, } else { - $copy = -1; - $knowdiff = 1; + $copy = -1; + $knowdiff = 1; } if ( $knowdiff || ($filecontents ne $ifilecontents) ) { - if ( $copy > 0 ) { - my $file_dir = dirname($file); - mkpath $file_dir, !$quiet unless(-e "$file_dir"); - open(O, "> " . $file) || die "Could not open $file for writing (no write permission?)"; - local $/; - binmode O; - print O $ifilecontents; - close O; - return 1; - } elsif ( $copy < 0 ) { - my $ifile_dir = dirname($ifile); - mkpath $ifile_dir, !$quiet unless(-e "$ifile_dir"); - open(O, "> " . $ifile) || die "Could not open $ifile for writing (no write permission?)"; - local $/; - binmode O; - print O $filecontents; - close O; - return 1; - } + if ( $copy > 0 ) { + my $file_dir = dirname($file); + mkpath $file_dir, !$quiet unless(-e "$file_dir"); + open(O, "> " . $file) || die "Could not open $file for writing (no write permission?)"; + local $/; + binmode O; + print O $ifilecontents; + close O; + return 1; + } elsif ( $copy < 0 ) { + my $ifile_dir = dirname($ifile); + mkpath $ifile_dir, !$quiet unless(-e "$ifile_dir"); + open(O, "> " . $ifile) || die "Could not open $ifile for writing (no write permission?)"; + local $/; + binmode O; + print O $filecontents; + close O; + return 1; + } } return 0; } @@ -568,37 +568,37 @@ while ( @ARGV ) { #parse my $arg = shift @ARGV; if ("$arg" eq "-h" || "$arg" eq "-help" || "$arg" eq "?") { - $var = "show_help"; - $val = "yes"; + $var = "show_help"; + $val = "yes"; } elsif("$arg" eq "-copy") { - $var = "copy"; - $val = "yes"; + $var = "copy"; + $val = "yes"; } elsif("$arg" eq "-o" || "$arg" eq "-outdir") { - $var = "output"; - $val = shift @ARGV; + $var = "output"; + $val = shift @ARGV; } elsif("$arg" eq "-showonly" || "$arg" eq "-remove-stale" || "$arg" eq "-windows" || - "$arg" eq "-relative" || "$arg" eq "-check-includes") { - $var = substr($arg, 1); - $val = "yes"; + "$arg" eq "-relative" || "$arg" eq "-check-includes") { + $var = substr($arg, 1); + $val = "yes"; } elsif("$arg" =~ /^-no-(.*)$/) { - $var = $1; - $val = "no"; - #these are for commandline compat + $var = $1; + $val = "no"; + #these are for commandline compat } elsif("$arg" eq "-inc") { - $var = "output"; - $val = shift @ARGV; + $var = "output"; + $val = shift @ARGV; } elsif("$arg" eq "-module") { - $var = "module"; - $val = shift @ARGV; + $var = "module"; + $val = shift @ARGV; } elsif("$arg" eq "-separate-module") { - $var = "separate-module"; - $val = shift @ARGV; + $var = "separate-module"; + $val = shift @ARGV; } elsif("$arg" eq "-show") { - $var = "showonly"; - $val = "yes"; + $var = "showonly"; + $val = "yes"; } elsif("$arg" eq "-quiet") { - $var = "quiet"; - $val = "yes"; + $var = "quiet"; + $val = "yes"; } elsif("$arg" eq "-base-dir") { # skip, it's been dealt with at the top of the file shift @ARGV; @@ -607,54 +607,54 @@ while ( @ARGV ) { #do something if(!$var || "$var" eq "show_help") { - print "Unknown option: $arg\n\n" if(!$var); - showUsage(); + print "Unknown option: $arg\n\n" if(!$var); + showUsage(); } elsif ("$var" eq "copy") { - if("$val" eq "yes") { - $copy_headers++; - } elsif($showonly) { - $copy_headers--; - } + if("$val" eq "yes") { + $copy_headers++; + } elsif($showonly) { + $copy_headers--; + } } elsif ("$var" eq "showonly") { - if("$val" eq "yes") { - $showonly++; - } elsif($showonly) { - $showonly--; - } + if("$val" eq "yes") { + $showonly++; + } elsif($showonly) { + $showonly--; + } } elsif ("$var" eq "quiet") { - if("$val" eq "yes") { - $quiet++; - } elsif($quiet) { - $quiet--; - } + if("$val" eq "yes") { + $quiet++; + } elsif($quiet) { + $quiet--; + } } elsif ("$var" eq "check-includes") { - if("$val" eq "yes") { - $check_includes++; - } elsif($check_includes) { - $check_includes--; - } + if("$val" eq "yes") { + $check_includes++; + } elsif($check_includes) { + $check_includes--; + } } elsif ("$var" eq "remove-stale") { - if("$val" eq "yes") { - $remove_stale++; - } elsif($remove_stale) { - $remove_stale--; - } + if("$val" eq "yes") { + $remove_stale++; + } elsif($remove_stale) { + $remove_stale--; + } } elsif ("$var" eq "windows") { - if("$val" eq "yes") { - $force_win++; - } elsif($force_win) { - $force_win--; - } + if("$val" eq "yes") { + $force_win++; + } elsif($force_win) { + $force_win--; + } } elsif ("$var" eq "relative") { - if("$val" eq "yes") { - $force_relative++; - } elsif($force_relative) { - $force_relative--; - } + if("$val" eq "yes") { + $force_relative++; + } elsif($force_relative) { + $force_relative--; + } } elsif ("$var" eq "module") { - print "module :$val:\n" unless $quiet; - die "No such module: $val" unless(defined $modules{$val}); - push @modules_to_sync, $val; + print "module :$val:\n" unless $quiet; + die "No such module: $val" unless(defined $modules{$val}); + push @modules_to_sync, $val; } elsif ("$var" eq "separate-module") { my ($module, $prodir, $headerdir) = split(/:/, $val); $modules{$module} = $prodir; @@ -663,16 +663,16 @@ while ( @ARGV ) { $create_uic_class_map = 0; $create_private_headers = 0; } elsif ("$var" eq "output") { - my $outdir = $val; - if(checkRelative($outdir)) { - $out_basedir = getcwd(); - chomp $out_basedir; - $out_basedir .= "/" . $outdir; - } else { - $out_basedir = $outdir; - } - # \ -> / - $out_basedir =~ s=\\=/=g; + my $outdir = $val; + if(checkRelative($outdir)) { + $out_basedir = getcwd(); + chomp $out_basedir; + $out_basedir .= "/" . $outdir; + } else { + $out_basedir = $outdir; + } + # \ -> / + $out_basedir =~ s=\\=/=g; } } @modules_to_sync = keys(%modules) if($#modules_to_sync == -1); @@ -708,77 +708,77 @@ foreach (@modules_to_sync) { #get dependencies if(-e "$dir/" . basename($dir) . ".pro") { - if(open(F, "<$dir/" . basename($dir) . ".pro")) { - while() { - my $line = $_; - chomp $line; - if($line =~ /^ *QT *\+?= *([^\r\n]*)/) { - foreach(split(/ /, "$1")) { - $master_contents .= "#include \n" if("$_" eq "core"); - $master_contents .= "#include \n" if("$_" eq "gui"); - $master_contents .= "#include \n" if("$_" eq "network"); - $master_contents .= "#include \n" if("$_" eq "svg"); - $master_contents .= "#include \n" if("$_" eq "declarative"); - $master_contents .= "#include \n" if("$_" eq "script"); - $master_contents .= "#include \n" if("$_" eq "scripttools"); - $master_contents .= "#include \n" if("$_" eq "qt3support"); - $master_contents .= "#include \n" if("$_" eq "sql"); - $master_contents .= "#include \n" if("$_" eq "xml"); - $master_contents .= "#include \n" if("$_" eq "xmlpatterns"); - $master_contents .= "#include \n" if("$_" eq "opengl"); - $master_contents .= "#include \n" if("$_" eq "openvg"); - } - } - } - close(F); - } + if(open(F, "<$dir/" . basename($dir) . ".pro")) { + while() { + my $line = $_; + chomp $line; + if($line =~ /^ *QT *\+?= *([^\r\n]*)/) { + foreach(split(/ /, "$1")) { + $master_contents .= "#include \n" if("$_" eq "core"); + $master_contents .= "#include \n" if("$_" eq "gui"); + $master_contents .= "#include \n" if("$_" eq "network"); + $master_contents .= "#include \n" if("$_" eq "svg"); + $master_contents .= "#include \n" if("$_" eq "declarative"); + $master_contents .= "#include \n" if("$_" eq "script"); + $master_contents .= "#include \n" if("$_" eq "scripttools"); + $master_contents .= "#include \n" if("$_" eq "qt3support"); + $master_contents .= "#include \n" if("$_" eq "sql"); + $master_contents .= "#include \n" if("$_" eq "xml"); + $master_contents .= "#include \n" if("$_" eq "xmlpatterns"); + $master_contents .= "#include \n" if("$_" eq "opengl"); + $master_contents .= "#include \n" if("$_" eq "openvg"); + } + } + } + close(F); + } } #remove the old files if($remove_stale) { - my @subdirs = ("$out_basedir/include/$lib"); - foreach (@subdirs) { - my $subdir = "$_"; - if (opendir DIR, "$subdir") { - while(my $t = readdir(DIR)) { - my $file = "$subdir/$t"; - if(-d "$file") { - push @subdirs, "$file" unless($t eq "." || $t eq ".."); - } else { - my @files = ("$file"); - #push @files, "$out_basedir/include/Qt/$t" if(-e "$out_basedir/include/Qt/$t"); - foreach (@files) { - my $file = $_; - my $remove_file = 0; - if(open(F, "<$file")) { - while() { - my $line = $_; - chomp $line; - if($line =~ /^\#include \"([^\"]*)\"$/) { - my $include = $1; - $include = $subdir . "/" . $include unless(substr($include, 0, 1) eq "/"); - $remove_file = 1 unless(-e "$include"); - } else { - $remove_file = 0; - last; - } - } - close(F); - unlink "$file" if($remove_file); - } - } - } - } - closedir DIR; + my @subdirs = ("$out_basedir/include/$lib"); + foreach (@subdirs) { + my $subdir = "$_"; + if (opendir DIR, "$subdir") { + while(my $t = readdir(DIR)) { + my $file = "$subdir/$t"; + if(-d "$file") { + push @subdirs, "$file" unless($t eq "." || $t eq ".."); + } else { + my @files = ("$file"); + #push @files, "$out_basedir/include/Qt/$t" if(-e "$out_basedir/include/Qt/$t"); + foreach (@files) { + my $file = $_; + my $remove_file = 0; + if(open(F, "<$file")) { + while() { + my $line = $_; + chomp $line; + if($line =~ /^\#include \"([^\"]*)\"$/) { + my $include = $1; + $include = $subdir . "/" . $include unless(substr($include, 0, 1) eq "/"); + $remove_file = 1 unless(-e "$include"); + } else { + $remove_file = 0; + last; + } + } + close(F); + unlink "$file" if($remove_file); + } + } + } + } + closedir DIR; } - } + } } #create the new ones foreach (split(/;/, $dir)) { - my $current_dir = "$_"; - my $headers_dir = $current_dir; + my $current_dir = "$_"; + my $headers_dir = $current_dir; $headers_dir .= "/$pathtoheaders" if ($pathtoheaders); #calc subdirs my @subdirs = ($headers_dir); @@ -787,7 +787,7 @@ foreach (@modules_to_sync) { opendir DIR, "$subdir" or next; while(my $t = readdir(DIR)) { push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") && - !($t eq "..") && !($t eq ".obj") && + !($t eq "..") && !($t eq ".obj") && !($t eq ".moc") && !($t eq ".rcc") && !($t eq ".uic") && !($t eq "build")); } @@ -805,85 +805,85 @@ foreach (@modules_to_sync) { $header = 0 if("$header" eq "$_"); } if($header) { - my $header_copies = 0; - #figure out if it is a public header - my $public_header = $header; - if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) { - $public_header = 0; - } else { - foreach (@ignore_for_master_contents) { - $public_header = 0 if("$header" eq "$_"); - } - } + my $header_copies = 0; + #figure out if it is a public header + my $public_header = $header; + if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) { + $public_header = 0; + } else { + foreach (@ignore_for_master_contents) { + $public_header = 0 if("$header" eq "$_"); + } + } my $iheader = $subdir . "/" . $header; - my @classes = $public_header ? classNames($iheader) : (); + my @classes = $public_header ? classNames($iheader) : (); if($showonly) { print "$header [$lib]\n"; - foreach(@classes) { - print "SYMBOL: $_\n"; - } + foreach(@classes) { + print "SYMBOL: $_\n"; + } } else { - #find out all the places it goes.. - my @headers; - if ($public_header) { - @headers = ( "$out_basedir/include/$lib/$header" ); - push @headers, "$out_basedir/include/Qt/$header" - if ("$lib" ne "phonon" && "$subdir" =~ /^$basedir\/src/); + #find out all the places it goes.. + my @headers; + if ($public_header) { + @headers = ( "$out_basedir/include/$lib/$header" ); + push @headers, "$out_basedir/include/Qt/$header" + if ("$lib" ne "phonon" && "$subdir" =~ /^$basedir\/src/); - foreach(@classes) { - my $header_base = basename($header); - my $class = $_; - # Strip namespaces: - $class =~ s/^.*:://; -# if ($class =~ m/::/) { -# class =~ s,::,/,g; -# } - $class_lib_map_contents .= "QT_CLASS_LIB($_, $lib, $header_base)\n"; - $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0)); + foreach(@classes) { + my $header_base = basename($header); + my $class = $_; + # Strip namespaces: + $class =~ s/^.*:://; +# if ($class =~ m/::/) { +# class =~ s,::,/,g; +# } + $class_lib_map_contents .= "QT_CLASS_LIB($_, $lib, $header_base)\n"; + $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0)); - # KDE-Compat headers for Phonon - if ($lib eq "phonon") { - $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0)); - } - } - } elsif ($create_private_headers) { - @headers = ( "$out_basedir/include/$lib/private/$header" ); - push @headers, "$out_basedir/include/Qt/private/$header" + # KDE-Compat headers for Phonon + if ($lib eq "phonon") { + $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0)); + } + } + } elsif ($create_private_headers) { + @headers = ( "$out_basedir/include/$lib/private/$header" ); + push @headers, "$out_basedir/include/Qt/private/$header" if ("$lib" ne "phonon"); - } - foreach(@headers) { #sync them - $header_copies++ if(syncHeader($_, $iheader, $copy_headers)); - } + } + foreach(@headers) { #sync them + $header_copies++ if(syncHeader($_, $iheader, $copy_headers)); + } - if($public_header) { - #put it into the master file - $master_contents .= "#include \"$public_header\"\n" if(shouldMasterInclude($iheader)); + if($public_header) { + #put it into the master file + $master_contents .= "#include \"$public_header\"\n" if(shouldMasterInclude($iheader)); - #deal with the install directives - if($public_header) { - my $pri_install_iheader = fixPaths($iheader, $current_dir); - foreach(@classes) { - my $class = $_; - # Strip namespaces: - $class =~ s/^.*:://; -# if ($class =~ m/::/) { -# $class =~ s,::,/,g; -# } - my $class_header = fixPaths("$out_basedir/include/$lib/$class", - $current_dir) . " "; - $pri_install_classes .= $class_header - unless($pri_install_classes =~ $class_header); - } - $pri_install_files.= "$pri_install_iheader ";; - } - } - else { - my $pri_install_iheader = fixPaths($iheader, $current_dir); - $pri_install_pfiles.= "$pri_install_iheader ";; - } + #deal with the install directives + if($public_header) { + my $pri_install_iheader = fixPaths($iheader, $current_dir); + foreach(@classes) { + my $class = $_; + # Strip namespaces: + $class =~ s/^.*:://; +# if ($class =~ m/::/) { +# $class =~ s,::,/,g; +# } + my $class_header = fixPaths("$out_basedir/include/$lib/$class", + $current_dir) . " "; + $pri_install_classes .= $class_header + unless($pri_install_classes =~ $class_header); + } + $pri_install_files.= "$pri_install_iheader ";; + } + } + else { + my $pri_install_iheader = fixPaths($iheader, $current_dir); + $pri_install_pfiles.= "$pri_install_iheader ";; + } } - print "header created for $iheader ($header_copies)\n" if($header_copies > 0 && !$quiet); + print "header created for $iheader ($header_copies)\n" if($header_copies > 0 && !$quiet); } } } @@ -894,8 +894,8 @@ foreach (@modules_to_sync) { unless($showonly) { my @master_includes; - push @master_includes, "$out_basedir/include/$lib/$lib"; - push @master_includes, "$out_basedir/include/phonon_compat/Phonon/Phonon" if ($lib eq "phonon"); + push @master_includes, "$out_basedir/include/$lib/$lib"; + push @master_includes, "$out_basedir/include/phonon_compat/Phonon/Phonon" if ($lib eq "phonon"); foreach my $master_include (@master_includes) { #generate the "master" include file my @tmp = split(/;/,$modules{$lib}); @@ -920,10 +920,10 @@ foreach (@modules_to_sync) { } #handle the headers.pri for each module - my $headers_pri_contents = ""; - $headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n"; - $headers_pri_contents .= "SYNCQT.HEADER_CLASSES = $pri_install_classes\n"; - $headers_pri_contents .= "SYNCQT.PRIVATE_HEADER_FILES = $pri_install_pfiles\n"; + my $headers_pri_contents = ""; + $headers_pri_contents .= "SYNCQT.HEADER_FILES = $pri_install_files\n"; + $headers_pri_contents .= "SYNCQT.HEADER_CLASSES = $pri_install_classes\n"; + $headers_pri_contents .= "SYNCQT.PRIVATE_HEADER_FILES = $pri_install_pfiles\n"; my $headers_pri_file = "$out_basedir/include/$lib/headers.pri"; if(-e "$headers_pri_file") { open HEADERS_PRI_FILE, "<$headers_pri_file"; @@ -947,125 +947,125 @@ foreach (@modules_to_sync) { unless($showonly || !$create_uic_class_map) { my $class_lib_map = "$out_basedir/src/tools/uic/qclass_lib_map.h"; if(-e "$class_lib_map") { - open CLASS_LIB_MAP, "<$class_lib_map"; - local $/; - binmode CLASS_LIB_MAP; - my $old_class_lib_map_contents = ; - close CLASS_LIB_MAP; - $old_class_lib_map_contents =~ s/\r//g; # remove \r's , so comparison is ok on all platforms - $class_lib_map = 0 if($old_class_lib_map_contents eq $class_lib_map_contents); + open CLASS_LIB_MAP, "<$class_lib_map"; + local $/; + binmode CLASS_LIB_MAP; + my $old_class_lib_map_contents = ; + close CLASS_LIB_MAP; + $old_class_lib_map_contents =~ s/\r//g; # remove \r's , so comparison is ok on all platforms + $class_lib_map = 0 if($old_class_lib_map_contents eq $class_lib_map_contents); } if($class_lib_map) { - my $class_lib_map_dir = dirname($class_lib_map); - mkpath $class_lib_map_dir, !$quiet; - open CLASS_LIB_MAP, ">$class_lib_map"; - print CLASS_LIB_MAP "$class_lib_map_contents"; - close CLASS_LIB_MAP; + my $class_lib_map_dir = dirname($class_lib_map); + mkpath $class_lib_map_dir, !$quiet; + open CLASS_LIB_MAP, ">$class_lib_map"; + print CLASS_LIB_MAP "$class_lib_map_contents"; + close CLASS_LIB_MAP; } } if($check_includes) { for (keys(%modules)) { - #iteration info - my $lib = $_; - my $dir = "$modules{$lib}"; - foreach (split(/;/, $dir)) { - my $current_dir = "$_"; - #calc subdirs - my @subdirs = ($current_dir); - foreach (@subdirs) { - my $subdir = "$_"; - opendir DIR, "$subdir"; - while(my $t = readdir(DIR)) { + #iteration info + my $lib = $_; + my $dir = "$modules{$lib}"; + foreach (split(/;/, $dir)) { + my $current_dir = "$_"; + #calc subdirs + my @subdirs = ($current_dir); + foreach (@subdirs) { + my $subdir = "$_"; + opendir DIR, "$subdir"; + while(my $t = readdir(DIR)) { push @subdirs, "$subdir/$t" if(-d "$subdir/$t" && !($t eq ".") && !($t eq "..") && !($t eq ".obj") && !($t eq ".moc") && !($t eq ".rcc") && !($t eq ".uic") && !($t eq "build")); - } - closedir DIR; - } + } + closedir DIR; + } - foreach (@subdirs) { - my $subdir = "$_"; + foreach (@subdirs) { + my $subdir = "$_"; my $header_skip_qt_module_test = 0; foreach(@ignore_for_qt_module_check) { foreach (split(/;/, $_)) { $header_skip_qt_module_test = 1 if ("$subdir" =~ /^$_/); } } - my @headers = findFiles("$subdir", "^[-a-z0-9_]*\\.h\$" , 0); - foreach (@headers) { - my $header = "$_"; + my @headers = findFiles("$subdir", "^[-a-z0-9_]*\\.h\$" , 0); + foreach (@headers) { + my $header = "$_"; my $header_skip_qt_begin_header_test = 0; my $header_skip_qt_begin_namespace_test = 0; - $header = 0 if("$header" =~ /^ui_.*.h/); - foreach (@ignore_headers) { - $header = 0 if("$header" eq "$_"); - } - if($header) { - my $public_header = $header; - if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) { - $public_header = 0; - } else { - foreach (@ignore_for_master_contents) { - $public_header = 0 if("$header" eq "$_"); - } - if($public_header) { - foreach (@ignore_for_include_check) { - $public_header = 0 if("$header" eq "$_"); - } + $header = 0 if("$header" =~ /^ui_.*.h/); + foreach (@ignore_headers) { + $header = 0 if("$header" eq "$_"); + } + if($header) { + my $public_header = $header; + if($public_header =~ /_p.h$/ || $public_header =~ /_pch.h$/) { + $public_header = 0; + } else { + foreach (@ignore_for_master_contents) { + $public_header = 0 if("$header" eq "$_"); + } + if($public_header) { + foreach (@ignore_for_include_check) { + $public_header = 0 if("$header" eq "$_"); + } foreach(@ignore_for_qt_begin_header_check) { $header_skip_qt_begin_header_test = 1 if ("$header" eq "$_"); } foreach(@ignore_for_qt_begin_namespace_check) { $header_skip_qt_begin_namespace_test = 1 if ("$header" eq "$_"); } - } - } + } + } - my $iheader = $subdir . "/" . $header; - if($public_header) { - if(open(F, "<$iheader")) { + my $iheader = $subdir . "/" . $header; + if($public_header) { + if(open(F, "<$iheader")) { my $qt_module_found = 0; - my $qt_begin_header_found = 0; - my $qt_end_header_found = 0; - my $qt_begin_namespace_found = 0; - my $qt_end_namespace_found = 0; - my $line; - while($line = ) { - chomp $line; - my $output_line = 1; + my $qt_begin_header_found = 0; + my $qt_end_header_found = 0; + my $qt_begin_namespace_found = 0; + my $qt_end_namespace_found = 0; + my $line; + while($line = ) { + chomp $line; + my $output_line = 1; if($line =~ /^ *\# *pragma (qt_no_included_check|qt_sync_stop_processing)/) { - last; - } elsif($line =~ /^ *\# *include/) { - my $include = $line; - if($line =~ /<.*>/) { - $include =~ s,.*<(.*)>.*,$1,; - } elsif($line =~ /".*"/) { - $include =~ s,.*"(.*)".*,$1,; - } else { - $include = 0; - } - if($include) { - for (keys(%modules)) { - my $trylib = $_; - if(-e "$out_basedir/include/$trylib/$include") { - print "WARNING: $iheader includes $include when it should include $trylib/$include\n"; - } - } - } - } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_BEGIN_HEADER\s*$/) { - $qt_begin_header_found = 1; - } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_END_HEADER\s*$/) { - $qt_end_header_found = 1; - } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE\s*$/) { - $qt_begin_namespace_found = 1; - } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE\s*$/) { - $qt_end_namespace_found = 1; + last; + } elsif($line =~ /^ *\# *include/) { + my $include = $line; + if($line =~ /<.*>/) { + $include =~ s,.*<(.*)>.*,$1,; + } elsif($line =~ /".*"/) { + $include =~ s,.*"(.*)".*,$1,; + } else { + $include = 0; + } + if($include) { + for (keys(%modules)) { + my $trylib = $_; + if(-e "$out_basedir/include/$trylib/$include") { + print "WARNING: $iheader includes $include when it should include $trylib/$include\n"; + } + } + } + } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_BEGIN_HEADER\s*$/) { + $qt_begin_header_found = 1; + } elsif ($header_skip_qt_begin_header_test == 0 and $line =~ /^QT_END_HEADER\s*$/) { + $qt_end_header_found = 1; + } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_BEGIN_NAMESPACE\s*$/) { + $qt_begin_namespace_found = 1; + } elsif ($header_skip_qt_begin_namespace_test == 0 and $line =~ /^QT_END_NAMESPACE\s*$/) { + $qt_end_namespace_found = 1; } elsif ($header_skip_qt_module_test == 0 and $line =~ /^QT_MODULE\(.*\)\s*$/) { $qt_module_found = 1; } - } + } if ($header_skip_qt_begin_header_test == 0) { if ($qt_begin_header_found == 0) { print "WARNING: $iheader does not include QT_BEGIN_HEADER\n"; @@ -1091,13 +1091,13 @@ if($check_includes) { print "WARNING: $iheader does not include QT_MODULE\n"; } } - close(F); - } - } - } - } - } - } + close(F); + } + } + } + } + } + } } } -- cgit v0.12 From a9b3381f4b42e1641834cbc1dfff4815b625807b Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 3 Jun 2010 15:44:40 +0200 Subject: deprecate header files in $$QT_BUILD_TREE/include/Qt To resolve the header file conflict as described in QTBUG-10647, we * remove include/Qt/private * "syncqt -copy" creates in include/Qt local forwarding headers instead of header file copies In case of a conflict, e.g. qxmlstream.h, we include both header files. All header files in include/Qt now yield a preprocessor warning, if they're included. They should not be used and will vanish some day. Task-number: QTBUG-10647 Reviewed-by: ossi --- bin/syncqt | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/bin/syncqt b/bin/syncqt index f993fd9..f499bbc 100755 --- a/bin/syncqt +++ b/bin/syncqt @@ -681,6 +681,7 @@ $isunix = checkUnix; #cache checkUnix # create path mkpath "$out_basedir/include", !$quiet; +mkpath "$out_basedir/include/Qt", !$quiet; my @ignore_headers = (); my $class_lib_map_contents = ""; @@ -689,6 +690,7 @@ my @ignore_for_include_check = ( "qatomic.h" ); my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" ); 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 = (); foreach (@modules_to_sync) { #iteration info @@ -828,8 +830,30 @@ foreach (@modules_to_sync) { my @headers; if ($public_header) { @headers = ( "$out_basedir/include/$lib/$header" ); - push @headers, "$out_basedir/include/Qt/$header" - if ("$lib" ne "phonon" && "$subdir" =~ /^$basedir\/src/); + + # write forwarding headers to include/Qt + if ("$lib" ne "phonon" && "$subdir" =~ /^$basedir\/src/) { + my $file_name = "$out_basedir/include/Qt/$header"; + my $header_content = ''; + if (exists $colliding_headers{$file_name}) { + $file_name = ">>$file_name"; + } else { + $colliding_headers{$file_name} = 1; + $file_name = ">$file_name"; + my $warning_msg = 'Inclusion of header files from include/Qt is deprecated.'; + $header_content = "#ifndef QT_NO_QT_INCLUDE_WARN\n" . + " #if defined(__GNUC__)\n" . + " #pragma warning \"$warning_msg\"\n" . + " #elif defined(_MSC_VER)\n" . + " #pragma message \"WARNING: $warning_msg\"\n" . + " #endif\n". + "#endif\n\n"; + } + $header_content .= '#include "' . "../$lib/$header" . "\"\n"; + open HEADERFILE, $file_name; + print HEADERFILE $header_content; + close HEADERFILE; + } foreach(@classes) { my $header_base = basename($header); @@ -849,8 +873,6 @@ foreach (@modules_to_sync) { } } elsif ($create_private_headers) { @headers = ( "$out_basedir/include/$lib/private/$header" ); - push @headers, "$out_basedir/include/Qt/private/$header" - if ("$lib" ne "phonon"); } foreach(@headers) { #sync them $header_copies++ if(syncHeader($_, $iheader, $copy_headers)); -- cgit v0.12 From 5c6501970c7b6805b7edc30f90187700f05d9f15 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Wed, 9 Jun 2010 11:51:29 +1000 Subject: Fix drawing flicker on Qml Viewer startup Task-number: QTBUG-10251 and QTBUG-11156 Reviewed-by: Martin Jones --- src/declarative/QmlChanges.txt | 2 + src/declarative/util/qdeclarativeview.cpp | 20 ++- src/declarative/util/qdeclarativeview.h | 1 + .../qdeclarativeview/tst_qdeclarativeview.cpp | 5 + .../qdeclarativeviewer/tst_qdeclarativeviewer.cpp | 187 +++++++++++++++++++++ tools/qml/qmlruntime.cpp | 7 +- 6 files changed, 214 insertions(+), 8 deletions(-) diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt index 5735b1e..8b6b83f 100644 --- a/src/declarative/QmlChanges.txt +++ b/src/declarative/QmlChanges.txt @@ -1,6 +1,8 @@ ============================================================================= The changes below are pre Qt 4.7.0 RC +QDeclarativeView + - initialSize() function added TextInput and TextEdit: - openSoftwareInputPanel() and closeSoftwareInputPanel() functions added Flickable: diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp index 6059ad6..0414e65 100644 --- a/src/declarative/util/qdeclarativeview.cpp +++ b/src/declarative/util/qdeclarativeview.cpp @@ -131,7 +131,7 @@ class QDeclarativeViewPrivate : public QGraphicsViewPrivate, public QDeclarative Q_DECLARE_PUBLIC(QDeclarativeView) public: QDeclarativeViewPrivate() - : root(0), declarativeItemRoot(0), graphicsWidgetRoot(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject) {} + : root(0), declarativeItemRoot(0), graphicsWidgetRoot(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject), initialSize(0,0) {} ~QDeclarativeViewPrivate() { delete root; } void execute(); void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry); @@ -150,6 +150,7 @@ public: QBasicTimer resizetimer; QDeclarativeView::ResizeMode resizeMode; + QSize initialSize; QElapsedTimer frameTimer; void init(); @@ -586,9 +587,11 @@ void QDeclarativeView::setRootObject(QObject *obj) } if (d->root) { - QSize initialSize = d->rootObjectSize(); - if (initialSize != size()) { - resize(initialSize); + d->initialSize = d->rootObjectSize(); + if (d->initialSize != size()) { + if (!(parentWidget() && parentWidget()->layout())) { + resize(d->initialSize); + } } d->initResize(); } @@ -638,6 +641,15 @@ QSize QDeclarativeView::sizeHint() const } /*! + Returns the initial size of the root object +*/ +QSize QDeclarativeView::initialSize() const +{ + Q_D(const QDeclarativeView); + return d->initialSize; +} + +/*! Returns the view's root \l {QGraphicsObject} {item}. */ QGraphicsObject *QDeclarativeView::rootObject() const diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h index e9cff32..cdcf134 100644 --- a/src/declarative/util/qdeclarativeview.h +++ b/src/declarative/util/qdeclarativeview.h @@ -90,6 +90,7 @@ public: QList errors() const; QSize sizeHint() const; + QSize initialSize() const; Q_SIGNALS: void sceneResized(QSize size); // ??? diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp index cc48bd0..6450e38 100644 --- a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp +++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp @@ -80,6 +80,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem() QVERIFY(canvas); QSignalSpy sceneResizedSpy(canvas, SIGNAL(sceneResized(QSize))); canvas->setResizeMode(QDeclarativeView::SizeRootObjectToView); + QCOMPARE(QSize(0,0), canvas->initialSize()); canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/resizemodedeclarativeitem.qml")); QDeclarativeItem* declarativeItem = qobject_cast(canvas->rootObject()); QVERIFY(declarativeItem); @@ -90,6 +91,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem() QCOMPARE(declarativeItem->height(), 200.0); QCOMPARE(canvas->size(), QSize(200, 200)); QCOMPARE(canvas->size(), canvas->sizeHint()); + QCOMPARE(canvas->size(), canvas->initialSize()); QCOMPARE(sceneResizedSpy.count(), 1); // size update from view @@ -135,6 +137,7 @@ void tst_QDeclarativeView::resizemodedeclarativeitem() QCOMPARE(declarativeItem->width(), 200.0); QCOMPARE(declarativeItem->height(), 200.0); QCOMPARE(canvas->size(), canvas->sizeHint()); + QCOMPARE(canvas->size(), canvas->initialSize()); QCOMPARE(sceneResizedSpy2.count(), 1); // size update from root object @@ -184,6 +187,7 @@ void tst_QDeclarativeView::resizemodegraphicswidget() QCOMPARE(canvas->size(), QSize(200, 200)); QCOMPARE(canvas->size(), QSize(200, 200)); QCOMPARE(canvas->size(), canvas->sizeHint()); + QCOMPARE(canvas->size(), canvas->initialSize()); QCOMPARE(sceneResizedSpy.count(), 1); // size update from view @@ -223,6 +227,7 @@ void tst_QDeclarativeView::resizemodegraphicswidget() QCOMPARE(graphicsWidget->size(), QSizeF(200.0, 200.0)); QCOMPARE(canvas->size(), QSize(200, 200)); QCOMPARE(canvas->size(), canvas->sizeHint()); + QCOMPARE(canvas->size(), canvas->initialSize()); QCOMPARE(sceneResizedSpy2.count(), 1); // size update from root object diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp index 49273ea..91b7cf8 100644 --- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp +++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp @@ -59,6 +59,11 @@ public: private slots: void orientation(); + void loading(); + void fileBrowser(); + void resizing(); + void paths(); + void slowMode(); private: QDeclarativeEngine engine; @@ -108,6 +113,188 @@ void tst_QDeclarativeViewer::orientation() QCOMPARE(viewer->size(), viewer->sizeHint()); } +void tst_QDeclarativeViewer::loading() +{ + QDeclarativeViewer *viewer = new QDeclarativeViewer(); + QVERIFY(viewer); + viewer->setSizeToView(true); + viewer->open(SRCDIR "/data/orientation.qml"); + QVERIFY(viewer->view()); + QVERIFY(viewer->menuBar()); + QDeclarativeItem* rootItem = qobject_cast(viewer->view()->rootObject()); + QVERIFY(rootItem); + viewer->show(); + + // initial size + QCOMPARE(rootItem->width(), 200.0); + QCOMPARE(rootItem->height(), 300.0); + QCOMPARE(viewer->view()->size(), QSize(200, 300)); + QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300)); + QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height())); + QCOMPARE(viewer->size(), viewer->sizeHint()); + + viewer->resize(QSize(400, 500)); + qApp->processEvents(); + + // window resized + QCOMPARE(rootItem->width(), 400.0); + QCOMPARE(rootItem->height(), 500.0-viewer->menuBar()->height()); + QCOMPARE(viewer->view()->size(), QSize(400, 500-viewer->menuBar()->height())); + QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); + QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500-viewer->menuBar()->height())); + QCOMPARE(viewer->size(), QSize(400, 500)); + QCOMPARE(viewer->size(), viewer->sizeHint()); + + viewer->reload(); + rootItem = qobject_cast(viewer->view()->rootObject()); + QVERIFY(rootItem); + + // reload cause the window to return back to initial size + QCOMPARE(rootItem->width(), 200.0); + QCOMPARE(rootItem->height(), 300.0); + QCOMPARE(viewer->view()->size(), QSize(200, 300)); + QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); + QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300)); + QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height())); + QCOMPARE(viewer->size(), viewer->sizeHint()); + + viewer->resize(QSize(400, 500)); + qApp->processEvents(); + + // window resized again + QCOMPARE(rootItem->width(), 400.0); + QCOMPARE(rootItem->height(), 500.0-viewer->menuBar()->height()); + QCOMPARE(viewer->view()->size(), QSize(400, 500-viewer->menuBar()->height())); + QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); + QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500-viewer->menuBar()->height())); + QCOMPARE(viewer->size(), QSize(400, 500)); + QCOMPARE(viewer->size(), viewer->sizeHint()); + + viewer->open(SRCDIR "/data/orientation.qml"); + rootItem = qobject_cast(viewer->view()->rootObject()); + QVERIFY(rootItem); + + // open also causes the window to return back to initial size + QCOMPARE(rootItem->width(), 200.0); + QCOMPARE(rootItem->height(), 300.0); + QCOMPARE(viewer->view()->size(), QSize(200, 300)); + QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); + QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300)); + QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height())); + QCOMPARE(viewer->size(), viewer->sizeHint()); +} + +void tst_QDeclarativeViewer::fileBrowser() +{ + QDeclarativeViewer *viewer = new QDeclarativeViewer(); + QVERIFY(viewer); + viewer->setUseNativeFileBrowser(false); + viewer->openFile(); + viewer->show(); + + // Browser.qml successfully loaded + QDeclarativeItem* browserItem = qobject_cast(viewer->view()->rootObject()); + QVERIFY(viewer->view()); + QVERIFY(viewer->menuBar()); + QVERIFY(browserItem); + + // load something + viewer->open(SRCDIR "/data/orientation.qml"); + QVERIFY(viewer->view()); + QVERIFY(viewer->menuBar()); + QDeclarativeItem* rootItem = qobject_cast(viewer->view()->rootObject()); + QVERIFY(rootItem); + QVERIFY(browserItem != rootItem); + + // go back to Browser.qml + viewer->openFile(); + browserItem = qobject_cast(viewer->view()->rootObject()); + QVERIFY(viewer->view()); + QVERIFY(viewer->menuBar()); + QVERIFY(browserItem); +} + +void tst_QDeclarativeViewer::resizing() +{ + QDeclarativeViewer *viewer = new QDeclarativeViewer(); + QVERIFY(viewer); + viewer->open(SRCDIR "/data/orientation.qml"); + QVERIFY(viewer->view()); + QVERIFY(viewer->menuBar()); + QDeclarativeItem* rootItem = qobject_cast(viewer->view()->rootObject()); + QVERIFY(rootItem); + viewer->show(); + + // initial size + QCOMPARE(rootItem->width(), 200.0); + QCOMPARE(rootItem->height(), 300.0); + QCOMPARE(viewer->view()->size(), QSize(200, 300)); + QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); + QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300)); + QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height())); + QCOMPARE(viewer->size(), viewer->sizeHint()); + + viewer->setSizeToView(false); + + // size view to root object + rootItem->setWidth(100); + rootItem->setHeight(200); + qApp->processEvents(); + + QCOMPARE(rootItem->width(), 100.0); + QCOMPARE(rootItem->height(), 200.0); + QCOMPARE(viewer->view()->size(), QSize(100, 200)); + QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); + QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(100, 200)); + QCOMPARE(viewer->size(), QSize(100, 200+viewer->menuBar()->height())); + QCOMPARE(viewer->size(), viewer->sizeHint()); + + // do not size root object to view + viewer->resize(QSize(150,250)); + QCOMPARE(rootItem->width(), 100.0); + QCOMPARE(rootItem->height(), 200.0); + + viewer->setSizeToView(true); + + // size root object to view + viewer->resize(QSize(250,350)); + qApp->processEvents(); + + QCOMPARE(rootItem->width(), 250.0); + QCOMPARE(rootItem->height(), 350.0-viewer->menuBar()->height()); + QCOMPARE(viewer->view()->size(), QSize(250, 350-viewer->menuBar()->height())); + QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); + QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350-viewer->menuBar()->height())); + QCOMPARE(viewer->size(), QSize(250, 350)); + QCOMPARE(viewer->size(), viewer->sizeHint()); + + // do not size view to root object + rootItem->setWidth(100); + rootItem->setHeight(200); + QCOMPARE(viewer->size(), QSize(250, 350)); +} + +void tst_QDeclarativeViewer::paths() +{ + QDeclarativeViewer *viewer = new QDeclarativeViewer(); + QVERIFY(viewer); + + viewer->addLibraryPath("miscImportPath"); + viewer->view()->engine()->importPathList().contains("miscImportPath"); + + viewer->addPluginPath("miscPluginPath"); + viewer->view()->engine()->pluginPathList().contains("miscPluginPath"); +} + +void tst_QDeclarativeViewer::slowMode() +{ + QDeclarativeViewer *viewer = new QDeclarativeViewer(); + QVERIFY(viewer); + + viewer->setSlowMode(true); + viewer->setSlowMode(false); +} + QTEST_MAIN(tst_QDeclarativeViewer) #include "tst_qdeclarativeviewer.moc" diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index d95bec2..676881d 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -804,11 +804,11 @@ void QDeclarativeViewer::statusChanged() tester->executefailure(); if (canvas->status() == QDeclarativeView::Ready) { - initialSize = canvas->sizeHint(); + initialSize = canvas->initialSize(); if (canvas->resizeMode() == QDeclarativeView::SizeRootObjectToView) { - updateSizeHints(); if (!isFullScreen() && !isMaximized()) { resize(QSize(initialSize.width(), initialSize.height()+menuBarHeight())); + updateSizeHints(); } } } @@ -941,7 +941,7 @@ void QDeclarativeViewer::sceneResized(QSize size) if (canvas->resizeMode() == QDeclarativeView::SizeViewToRootObject) { updateSizeHints(); } - } + } } void QDeclarativeViewer::keyPressEvent(QKeyEvent *event) @@ -1264,7 +1264,6 @@ void QDeclarativeViewer::updateSizeHints() setMinimumSize(QSize(0,0)); setMaximumSize(QSize(16777215,16777215)); } - updateGeometry(); } void QDeclarativeViewer::registerTypes() -- cgit v0.12 From 5ba8d0703d1b8388679473da1311e368ed0c3086 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 9 Jun 2010 14:15:56 +1000 Subject: Fixed `nmake clean' breaking declarative imports on Windows. Generally, doing a `clean' ought to clean up space by deleting intermediate objects, but leave the build in a working state (as opposed to `distclean' which deletes intermediate and target objects). For this to work for declarative imports, the qmldir file should be treated as a target, not an intermediate object. --- src/imports/qimportbase.pri | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/imports/qimportbase.pri b/src/imports/qimportbase.pri index 91f6552..02364af 100644 --- a/src/imports/qimportbase.pri +++ b/src/imports/qimportbase.pri @@ -17,6 +17,8 @@ copy2build.output = $$QT_BUILD_TREE/imports/$$TARGETPATH/qmldir copy2build.commands = $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} copy2build.name = COPY ${QMAKE_FILE_IN} copy2build.CONFIG += no_link +# `clean' should leave the build in a runnable state, which means it shouldn't delete qmldir +copy2build.CONFIG += no_clean QMAKE_EXTRA_COMPILERS += copy2build TARGET = $$qtLibraryTarget($$TARGET) -- cgit v0.12 From cd05d3ec57a9e1de604933201530ee0a81d12a39 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 9 Jun 2010 14:39:28 +1000 Subject: Fix autotest. --- .../declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp index 237d020..81334f2 100644 --- a/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp +++ b/tests/auto/declarative/qdeclarativevaluetypes/tst_qdeclarativevaluetypes.cpp @@ -51,7 +51,9 @@ #define SRCDIR "." #endif +QT_BEGIN_NAMESPACE extern int qt_defaultDpi(); +QT_END_NAMESPACE class tst_qdeclarativevaluetypes : public QObject { -- cgit v0.12 From 17fcc84e5ebcf09f80a4bbebafde913d0422a91e Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 9 Jun 2010 16:18:33 +1000 Subject: Small optimization when checking if MouseArea's onPressAndHold is being used. --- src/declarative/graphicsitems/qdeclarativemousearea.cpp | 2 +- src/declarative/graphicsitems/qdeclarativemousearea_p_p.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index 6fca283..a68e664 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -410,7 +410,7 @@ void QDeclarativeMouseArea::mousePressEvent(QGraphicsSceneMouseEvent *event) setHovered(true); d->startScene = event->scenePos(); // we should only start timer if pressAndHold is connected to. - if (d->isConnected("pressAndHold(QDeclarativeMouseEvent*)")) + if (d->isPressAndHoldConnected()) d->pressAndHoldTimer.start(PressAndHoldDelay, this); setKeepMouseGrab(false); event->setAccepted(setPressed(true)); diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h index 4e909ff..3d7bd1e 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h @@ -88,9 +88,9 @@ public: lastModifiers = event->modifiers(); } - bool isConnected(const char *signal) { + bool isPressAndHoldConnected() { Q_Q(QDeclarativeMouseArea); - int idx = QObjectPrivate::get(q)->signalIndex(signal); + static int idx = QObjectPrivate::get(q)->signalIndex("pressAndHold(QDeclarativeMouseEvent*)"); return QObjectPrivate::get(q)->isSignalConnected(idx); } -- cgit v0.12 From 22d7c82b71f34df637efd0ed39b3d63719a2bf67 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 9 Jun 2010 16:29:14 +1000 Subject: Fix GridView bounds behavior with snapping enabled. Task-number: QTBUG-11299 --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 82c69a0..538bc69 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -261,12 +261,19 @@ public: return -1; // Not in visibleList } - qreal snapPosAt(qreal pos) { + qreal snapPosAt(qreal pos) const { + Q_Q(const QDeclarativeGridView); qreal snapPos = 0; if (!visibleItems.isEmpty()) { pos += rowSize()/2; snapPos = visibleItems.first()->rowPos() - visibleIndex / columns * rowSize(); snapPos = pos - fmodf(pos - snapPos, qreal(rowSize())); + qreal maxExtent = flow == QDeclarativeGridView::LeftToRight ? -q->maxYExtent() : -q->maxXExtent(); + qreal minExtent = flow == QDeclarativeGridView::LeftToRight ? -q->minYExtent() : -q->minXExtent(); + if (snapPos > maxExtent) + snapPos = maxExtent; + if (snapPos < minExtent) + snapPos = minExtent; } return snapPos; } @@ -901,7 +908,6 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m } } else if (snapMode != QDeclarativeGridView::NoSnap) { qreal pos = -snapPosAt(-(data.move.value() - highlightRangeStart)) + highlightRangeStart; - pos = qMin(qMax(pos, maxExtent), minExtent); qreal dist = qAbs(data.move.value() - pos); if (dist > 0) { timeline.reset(data.move); @@ -923,7 +929,6 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity) { Q_Q(QDeclarativeGridView); - moveReason = Mouse; if ((!haveHighlightRange || highlightRange != QDeclarativeGridView::StrictlyEnforceRange) && snapMode == QDeclarativeGridView::NoSnap) { @@ -968,9 +973,10 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m qreal accel = deceleration; qreal v2 = v * v; qreal overshootDist = 0.0; - if (maxDistance > 0.0 && v2 / (2.0f * maxDistance) < accel) { + if ((maxDistance > 0.0 && v2 / (2.0f * maxDistance) < accel) || snapMode == QDeclarativeGridView::SnapOneRow) { // + rowSize()/4 to encourage moving at least one item in the flick direction qreal dist = v2 / (accel * 2.0) + rowSize()/4; + dist = qMin(dist, maxDistance); if (v > 0) dist = -dist; data.flickTarget = -snapPosAt(-(data.move.value() - highlightRangeStart) + dist) + highlightRangeStart; @@ -1826,7 +1832,7 @@ qreal QDeclarativeGridView::maxXExtent() const if (d->highlightRangeEnd != d->highlightRangeStart) extent = qMin(extent, -(d->endPosition() - d->highlightRangeEnd + 1)); } else { - extent = -(d->endPosition() - height()); + extent = -(d->endPosition() - width()); } if (d->footer) extent -= d->footer->item->width(); -- cgit v0.12 From 7fb445a5cbfb24a7846270ef8da63362c6b6f84d Mon Sep 17 00:00:00 2001 From: Marek Wieckowski Date: Wed, 9 Jun 2010 09:11:30 +0200 Subject: designer: add sorting in signal-slot editor window Reviewed-by: Friedemann Kleint --- .../src/components/signalsloteditor/signalsloteditorwindow.cpp | 10 +++++++--- .../src/components/signalsloteditor/signalsloteditorwindow.h | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp index a25bd5d..5547761 100644 --- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp +++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp @@ -63,6 +63,7 @@ #include #include #include +#include #include #include #include @@ -712,9 +713,12 @@ SignalSlotEditorWindow::SignalSlotEditorWindow(QDesignerFormEditorInterface *cor m_remove_button(new QToolButton), m_core(core), m_model(new ConnectionModel(this)), + m_proxy_model(new QSortFilterProxyModel(this)), m_handling_selection_change(false) { - m_view->setModel(m_model); + m_proxy_model->setSourceModel(m_model); + m_view->setModel(m_proxy_model); + m_view->setSortingEnabled(true); m_view->setItemDelegate(new ConnectionDelegate(this)); m_view->setEditTriggers(QAbstractItemView::DoubleClicked | QAbstractItemView::EditKeyPressed); @@ -790,7 +794,7 @@ void SignalSlotEditorWindow::updateDialogSelection(Connection *con) if (m_handling_selection_change || m_editor == 0) return; - QModelIndex index = m_model->connectionToIndex(con); + QModelIndex index = m_proxy_model->mapFromSource(m_model->connectionToIndex(con)); if (index == m_view->currentIndex()) return; m_handling_selection_change = true; @@ -808,7 +812,7 @@ void SignalSlotEditorWindow::updateEditorSelection(const QModelIndex &index) if (m_editor == 0) return; - Connection *con = m_model->indexToConnection(index); + Connection *con = m_model->indexToConnection(m_proxy_model->mapToSource(index)); if (m_editor->selected(con)) return; m_handling_selection_change = true; diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.h b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.h index 9315955..665f0b7 100644 --- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.h +++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.h @@ -50,6 +50,7 @@ QT_BEGIN_NAMESPACE class QDesignerFormWindowInterface; class QDesignerFormEditorInterface; class QModelIndex; +class QSortFilterProxyModel; class QTreeView; class QToolButton; @@ -84,6 +85,7 @@ private: QToolButton *m_add_button, *m_remove_button; QDesignerFormEditorInterface *m_core; ConnectionModel *m_model; + QSortFilterProxyModel *m_proxy_model; bool m_handling_selection_change; }; -- cgit v0.12 From 3a72a4004fc7aaa610ac8ef988371ae37a99630a Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Wed, 9 Jun 2010 10:43:14 +0200 Subject: minor cosmetic improvements Made whitespace and case more consistent. Merge-request: 2407 Reviewed-by: Oswald Buddenhagen --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 1980cf1..663faf9 100755 --- a/configure +++ b/configure @@ -4668,7 +4668,7 @@ if [ "$CFG_IWMMXT" = "yes" ]; then fi # detect neon support -if ([ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ]) && [ "${CFG_NEON}" = "auto" ]; then +if ( [ "$CFG_ARCH" = "arm" ] || [ "$CFG_ARCH" = "armv6" ] ) && [ "${CFG_NEON}" = "auto" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $l_FLAGS "-mfpu=neon"; then CFG_NEON=yes else @@ -5354,7 +5354,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then fi fi # X11/QWS -# x11 +# X11 if [ "$PLATFORM_X11" = "yes" ]; then x11tests="$relpath/config.tests/x11" X11TESTS_FLAGS= -- cgit v0.12 From e6f601ce80726bf2d5c2fdb1b87a62b563cb471b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 9 Jun 2010 20:24:17 +0200 Subject: Attempt to fix build failure on Linux introduced by 09c6a81109 --- src/corelib/global/qendian.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h index 01550cf..d867738 100644 --- a/src/corelib/global/qendian.h +++ b/src/corelib/global/qendian.h @@ -42,8 +42,9 @@ #ifndef QENDIAN_H #define QENDIAN_H +#include + #ifdef Q_OS_LINUX -# include QT_BEGIN_INCLUDE_NAMESPACE # include QT_END_INCLUDE_NAMESPACE @@ -53,8 +54,6 @@ QT_END_INCLUDE_NAMESPACE #include #endif -#include - QT_BEGIN_HEADER QT_BEGIN_NAMESPACE -- cgit v0.12 From 96032bd846c7188ce2655d2402c7a745e91a5168 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 10 Jun 2010 09:32:20 +1000 Subject: Fix crash when changing ListView model with highlightRangeMode: ListView.StrictlyEnforceRange Task-number: QTBUG-11328 --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 8 ++++++-- src/declarative/graphicsitems/qdeclarativelistview.cpp | 8 ++++++-- .../declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp | 7 +++++++ .../declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp | 8 ++++++++ 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 538bc69..0609a48 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1791,7 +1791,9 @@ qreal QDeclarativeGridView::maxYExtent() const if (d->flow == QDeclarativeGridView::TopToBottom) return QDeclarativeFlickable::maxYExtent(); qreal extent; - if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { + if (!d->model || !d->model->count()) { + extent = 0; + } else if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { extent = -(d->rowPosAt(d->model->count()-1) - d->highlightRangeStart); if (d->highlightRangeEnd != d->highlightRangeStart) extent = qMin(extent, -(d->endPosition() - d->highlightRangeEnd + 1)); @@ -1827,7 +1829,9 @@ qreal QDeclarativeGridView::maxXExtent() const if (d->flow == QDeclarativeGridView::LeftToRight) return QDeclarativeFlickable::maxXExtent(); qreal extent; - if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { + if (!d->model || !d->model->count()) { + extent = 0; + } if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { extent = -(d->rowPosAt(d->model->count()-1) - d->highlightRangeStart); if (d->highlightRangeEnd != d->highlightRangeStart) extent = qMin(extent, -(d->endPosition() - d->highlightRangeEnd + 1)); diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index f2cc971..3f2b4ce 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -2248,7 +2248,9 @@ qreal QDeclarativeListView::maxYExtent() const if (d->orient == QDeclarativeListView::Horizontal) return height(); if (d->maxExtentDirty) { - if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { + if (!d->model || !d->model->count()) { + d->maxExtent = 0; + } else if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { d->maxExtent = -(d->positionAt(d->model->count()-1) - d->highlightRangeStart); if (d->highlightRangeEnd != d->highlightRangeStart) d->maxExtent = qMin(d->maxExtent, -(d->endPosition() - d->highlightRangeEnd + 1)); @@ -2290,7 +2292,9 @@ qreal QDeclarativeListView::maxXExtent() const if (d->orient == QDeclarativeListView::Vertical) return width(); if (d->maxExtentDirty) { - if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { + if (!d->model || !d->model->count()) { + d->maxExtent = 0; + } else if (d->haveHighlightRange && d->highlightRange == StrictlyEnforceRange) { d->maxExtent = -(d->positionAt(d->model->count()-1) - d->highlightRangeStart); if (d->highlightRangeEnd != d->highlightRangeStart) d->maxExtent = qMin(d->maxExtent, -(d->endPosition() - d->highlightRangeEnd + 1)); diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index 9b7c261..4e35bc0 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -1110,6 +1110,13 @@ void tst_QDeclarativeGridView::enforceRange() gridview->setCurrentIndex(5); QTRY_COMPARE(gridview->contentY(), 100.); + TestModel model2; + for (int i = 0; i < 5; i++) + model2.addItem("Item" + QString::number(i), ""); + + ctxt->setContextProperty("testModel", &model2); + QCOMPARE(gridview->count(), 5); + delete canvas; } diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index 7376c00..cd42b63 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -807,6 +807,14 @@ void tst_QDeclarativeListView::enforceRange() QTRY_COMPARE(listview->currentIndex(), 6); + // change model + TestModel model2; + for (int i = 0; i < 5; i++) + model2.addItem("Item" + QString::number(i), ""); + + ctxt->setContextProperty("testModel", &model2); + QCOMPARE(listview->count(), 5); + delete canvas; } -- cgit v0.12 From ce8a3100868e2c545d0af3332e9b801c1fd0bc3f Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 8 Jun 2010 10:50:07 +1000 Subject: Move some example code into snippets/ and add other doc fixes --- doc/src/declarative/animation.qdoc | 149 ++++----------------- doc/src/declarative/qdeclarativestates.qdoc | 52 ++----- doc/src/snippets/declarative/anchorchanges.qml | 28 ++++ doc/src/snippets/declarative/animation.qml | 141 +++++++++++++++++++ doc/src/snippets/declarative/createQmlObject.qml | 4 +- doc/src/snippets/declarative/state.qml | 29 ++++ doc/src/snippets/declarative/states.qml | 41 ++++++ src/declarative/qml/qdeclarativecomponent.cpp | 2 +- src/declarative/qml/qdeclarativeengine.cpp | 11 +- .../util/qdeclarativepropertychanges.cpp | 6 +- src/declarative/util/qdeclarativestate.cpp | 34 ++++- src/declarative/util/qdeclarativestategroup.cpp | 4 +- .../util/qdeclarativestateoperations.cpp | 32 ++--- 13 files changed, 329 insertions(+), 204 deletions(-) create mode 100644 doc/src/snippets/declarative/anchorchanges.qml create mode 100644 doc/src/snippets/declarative/animation.qml create mode 100644 doc/src/snippets/declarative/state.qml create mode 100644 doc/src/snippets/declarative/states.qml diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc index 6e98949..c320898 100644 --- a/doc/src/declarative/animation.qdoc +++ b/doc/src/declarative/animation.qdoc @@ -46,14 +46,14 @@ Animation in QML is done by animating properties of objects. Properties of type real, int, color, rect, point, size, and vector3d can all be animated. -QML supports three main forms of animation - basic property animation, +QML supports three main forms of animation: basic property animation, transitions, and property behaviors. \tableofcontents \section1 Basic Property Animation -The simplest form of animation is directly using \l PropertyAnimation, which can animate all of the property +The simplest form of animation is a \l PropertyAnimation, which can animate all of the property types listed above. If the property you are animating is a number or color, you can alternatively use NumberAnimation or ColorAnimation. These elements don't add any additional functionality, but will help enforce type correctness and are slightly more efficient. @@ -62,61 +62,23 @@ A property animation can be specified as a value source using the \e Animation \ for repeating animations. The following example creates a bouncing effect: -\qml -Rectangle { - id: rect - width: 120; height: 200; - Image { - id: img - source: "qt-logo.png" - x: 60-img.width/2 - y: 0 - SequentialAnimation on y { - loops: Animation.Infinite - NumberAnimation { to: 200-img.height; easing.type: Easing.OutBounce; duration: 2000 } - PauseAnimation { duration: 1000 } - NumberAnimation { to: 0; easing.type: Easing.OutQuad; duration: 1000 } - } - } -} -\endqml +\snippet doc/src/snippets/declarative/animation.qml property-anim-1 \image propanim.gif When you assign an animation as a value source, you do not need to specify \c property -or \c target; they are automatically selected for you. You do, however, need to specify \c to. +or \c target values; they are automatically selected for you. You do, however, need to specify a \c to value. An animation specified as a value source will be \c running by default. -\qml -Rectangle { - id: rect - width: 200; height: 200; - Rectangle { - color: "red" - width: 50; height: 50 - NumberAnimation on x { to: 50 } - } -} -\endqml +For example, here is a rectangle that uses a \l NumberAnimation value source to animate the movement +from its current position to an \c x value of 50. The animation starts immediately, and only the \c to +property is required: + +\snippet doc/src/snippets/declarative/animation.qml property-anim-2 A property animation can also be specified as a resource that is manipulated from script. -\qml -PropertyAnimation { - id: animation - target: image - property: "scale" - from: 1; to: .5 -} -Image { - id: image - source: "image.png" - MouseArea { - anchors.fill: parent - onPressed: animation.start() - } -} -\endqml +\snippet doc/src/snippets/declarative/animation.qml property-anim-3 As can be seen, when an animation is used like this (as opposed to as a value source) you will need to explicitly set the \c target and \c property to animate. @@ -131,50 +93,20 @@ can only be triggered by a state change. For example, a transition could describe how an item moves from its initial position to its new position: -\code -transitions: [ - Transition { - NumberAnimation { - properties: "x,y" - easing.type: Easing.OutBounce - duration: 200 - } - } -] -\endcode +\snippet doc/src/snippets/declarative/animation.qml transitions-1 As can be seen, transitions make use of the same basic animation classes introduced above. In the above example we have specified that we want to animate the \c x and \c y properties, but have not -specified the objects to animate or the \c to values. By default these values are supplied by the framework -- +specified the objects to animate or the \c to values. By default these values are supplied by the framework; the animation will animate any \c targets whose \c x and \c y have changed, and the \c to values will be those defined in the end state. You can always supply explicit values to override these implicit values when needed. -\code -Transition { - from: "*" - to: "MyState" - reversible: true - SequentialAnimation { - NumberAnimation { - duration: 1000 - easing.type: Easing.OutBounce - // animate myItem's x and y if they have changed in the state - target: myItem - properties: "x,y" - } - NumberAnimation { - duration: 1000 - // animate myItem2's y to 200, regardless of what happens in the state - target: myItem2 - property: "y" - to: 200 - } - } -} -\endcode +\snippet doc/src/snippets/declarative/animation.qml transitions-2 QML transitions have selectors to determine which state changes a transition should apply to. The following transition will only be triggered when we enter into the \c "details" state. +(The "*" value is a wildcard value that specifies the transition should be applied when changing +from \e any state to the "details" state.) \code Transition { @@ -188,30 +120,7 @@ Transitions can happen in parallel, in sequence, or in any combination of the tw animations in a transition will happen in parallel. The following example shows a rather complex transition making use of both sequential and parallel animations: -\code -Transition { - from: "*" - to: "MyState" - reversible: true - SequentialAnimation { - ColorAnimation { duration: 1000 } - PauseAnimation { duration: 1000 } - ParallelAnimation { - NumberAnimation { - duration: 1000 - easing.type: Easing.OutBounce - targets: box1 - properties: "x,y" - } - NumberAnimation { - duration: 1000 - targets: box2 - properties: "x,y" - } - } - } -} -\endcode +\snippet doc/src/snippets/declarative/animation.qml transitions-3 \section1 Property Behaviors @@ -219,24 +128,15 @@ A \l{Behavior}{property behavior} specifies a default animation to run whenever of what caused the change. The \c enabled property can be used to force a \l Behavior to only apply under certain circumstances. -In the following snippet, we specify that we want the x position of redRect to be animated -whenever it changes. The animation will last 300 milliseconds and use an InOutQuad easing curve. +In the following snippet, we specify that we want the \c x position of \c redRect to be animated +whenever it changes. The animation will last 300 milliseconds and use an \l{PropertyAnimation::easing.type}{Easing.InOutQuad} easing curve. -\qml -Rectangle { - id: redRect - color: "red" - width: 100; height: 100 - Behavior on x { NumberAnimation { duration: 300; easing.type: Easing.InOutQuad } } -} -\endqml +\snippet doc/src/snippets/declarative/animation.qml behavior Like using an animation as a value source, when used in a Behavior and animation does not need to specify a \c target or \c property. -To trigger this behavior, we could: -\list -\o Enter a state that changes x +To trigger this behavior, we could enter a state that changes \c x: \qml State { @@ -249,7 +149,7 @@ State { } \endqml -\o Update x from a script +Or, update \c x from a script: \qml MouseArea { @@ -257,11 +157,10 @@ MouseArea { onClicked: redRect.x = 24; } \endqml -\endlist -If x were bound to another property, triggering the binding would also trigger the behavior. +If \c x were bound to another property, triggering the binding would also trigger the behavior. -If a state change has a transition animation matching a property with a Behavior, the transition animation -will override the Behavior for that state change. +If a state change has a transition animation matching a property with a \l Behavior, the transition animation +will override the \l Behavior for that state change. */ diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc index fd0c677..43b5c31 100644 --- a/doc/src/declarative/qdeclarativestates.qdoc +++ b/doc/src/declarative/qdeclarativestates.qdoc @@ -70,58 +70,30 @@ In QML: \o A state can affect the properties of other objects, not just the object owning the state (and not just that object's children). \endlist +To define a state for an item, add a \l State element to the \l{Item::states}{states} property. To +change the current state of an \l Item, set the \l{Item::state}{state} property to the name +of the required state. + Here is an example of using states. In the default state \c myRect is positioned at 0,0. In the 'moved' state it is positioned at 50,50. Clicking within the mouse area changes the state from the default state to the 'moved' state, thus moving the rectangle. -\qml -Item { - id: myItem - - Rectangle { - id: myRect - width: 100 - height: 100 - color: "red" - } - - states: [ - State { - name: "moved" - PropertyChanges { - target: myRect - x: 50 - y: 50 - } - } - ] - - MouseArea { - anchors.fill: parent - onClicked: myItem.state = 'moved' - } -} -\endqml +\snippet doc/src/snippets/declarative/states.qml 0 +\snippet doc/src/snippets/declarative/states.qml 1 State changes can be animated using \l{state-transitions}{Transitions}. -For example, adding this code to the above \c {Item {}} element animates the transition to the "moved" state: +For example, adding this code to the above \c Item element animates the transition to the "moved" state: -\qml - transitions: [ - Transition { - NumberAnimation { properties: "x,y"; duration: 500 } - } - ] -\endqml +\snippet doc/src/snippets/declarative/states.qml transitions See \l{state-transitions}{Transitions} for more information. Other things you can do in a state change: \list -\o override signal handlers with PropertyChanges -\o change an item's visual parent with ParentChange -\o change an item's anchors with AnchorChanges -\o run some script with StateChangeScript +\o Override signal handlers with PropertyChanges +\o Change an item's visual parent with ParentChange +\o Change an item's anchors with AnchorChanges +\o Run some script with StateChangeScript \endlist */ diff --git a/doc/src/snippets/declarative/anchorchanges.qml b/doc/src/snippets/declarative/anchorchanges.qml new file mode 100644 index 0000000..6c0a0ad --- /dev/null +++ b/doc/src/snippets/declarative/anchorchanges.qml @@ -0,0 +1,28 @@ +//![0] +import Qt 4.7 + +Item { + id: window + width: 200; height: 200 + + Rectangle { id: myRect; width: 100; height: 100; color: "red" } + + states: State { + name: "reanchored" + + AnchorChanges { + target: myRect + anchors.top: window.top + anchors.bottom: window.bottom + } + PropertyChanges { + target: myRect + anchors.topMargin: 3 + anchors.bottomMargin: 3 + } + } + + MouseArea { anchors.fill: parent; onClicked: window.state = "reanchored" } +} +//![0] + diff --git a/doc/src/snippets/declarative/animation.qml b/doc/src/snippets/declarative/animation.qml new file mode 100644 index 0000000..f5c6bf6 --- /dev/null +++ b/doc/src/snippets/declarative/animation.qml @@ -0,0 +1,141 @@ +import Qt 4.7 + +Row { + +//![property-anim-1] +Rectangle { + id: rect + width: 120; height: 200 + + Image { + id: img + source: "pics/qt.png" + x: 60 - img.width/2 + y: 0 + + SequentialAnimation on y { + loops: Animation.Infinite + NumberAnimation { to: 200 - img.height; easing.type: Easing.OutBounce; duration: 2000 } + PauseAnimation { duration: 1000 } + NumberAnimation { to: 0; easing.type: Easing.OutQuad; duration: 1000 } + } + } +} +//![property-anim-1] + +//![property-anim-2] +Rectangle { + width: 200; height: 200 + + Rectangle { + color: "red" + width: 50; height: 50 + NumberAnimation on x { to: 50 } + } +} +//![property-anim-2] + + +Item { +//![property-anim-3] +PropertyAnimation { + id: animation + target: image + property: "scale" + from: 1; to: 0.5 +} + +Image { + id: image + source: "pics/qt.png" + MouseArea { + anchors.fill: parent + onPressed: animation.start() + } +} +//![property-anim-3] +} + + +//![transitions-1] +transitions: [ + Transition { + NumberAnimation { + properties: "x,y" + easing.type: Easing.OutBounce + duration: 200 + } + } +] +//![transitions-1] + + +//![transitions-2] +Transition { + from: "*" + to: "MyState" + reversible: true + + SequentialAnimation { + NumberAnimation { + duration: 1000 + easing.type: Easing.OutBounce + + // animate myItem's x and y if they have changed in the state + target: myItem + properties: "x,y" + } + + NumberAnimation { + duration: 1000 + + // animate myItem2's y to 200, regardless of what happens in the state + target: myItem2 + property: "y" + to: 200 + } + } +} +//![transitions-2] + + +//![transitions-3] +Transition { + from: "*" + to: "MyState" + reversible: true + + SequentialAnimation { + ColorAnimation { duration: 1000 } + PauseAnimation { duration: 1000 } + + ParallelAnimation { + NumberAnimation { + duration: 1000 + easing.type: Easing.OutBounce + targets: box1 + properties: "x,y" + } + NumberAnimation { + duration: 1000 + targets: box2 + properties: "x,y" + } + } + } +} +//![transitions-3] + +//![behavior] +Rectangle { + id: redRect + color: "red" + width: 100; height: 100 + + Behavior on x { + NumberAnimation { duration: 300; easing.type: Easing.InOutQuad } + } +} +//![behavior] + +} diff --git a/doc/src/snippets/declarative/createQmlObject.qml b/doc/src/snippets/declarative/createQmlObject.qml index f2ac6e6..f274e40 100644 --- a/doc/src/snippets/declarative/createQmlObject.qml +++ b/doc/src/snippets/declarative/createQmlObject.qml @@ -42,7 +42,7 @@ import Qt 4.7 Rectangle { - id: targetItem + id: parentItem property QtObject newObject width: 100 @@ -51,7 +51,7 @@ Rectangle { function createIt() { //![0] newObject = Qt.createQmlObject('import Qt 4.7; Rectangle {color: "red"; width: 20; height: 20}', - targetItem, "dynamicSnippet1"); + parentItem, "dynamicSnippet1"); //![0] } diff --git a/doc/src/snippets/declarative/state.qml b/doc/src/snippets/declarative/state.qml new file mode 100644 index 0000000..0954298 --- /dev/null +++ b/doc/src/snippets/declarative/state.qml @@ -0,0 +1,29 @@ +//![0] +import Qt 4.7 + +Rectangle { + id: myRect + width: 100; height: 100 + color: "black" + + states: [ + State { + name: "clicked" + PropertyChanges { + target: myRect + color: "red" + } + } + ] + + MouseArea { + anchors.fill: parent + onClicked: { + if (myRect.state == "") // i.e. the default state + myRect.state = "clicked"; + else + myRect.state = ""; + } + } +} +//![0] diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/declarative/states.qml new file mode 100644 index 0000000..7bfb5bd --- /dev/null +++ b/doc/src/snippets/declarative/states.qml @@ -0,0 +1,41 @@ +//![0] +import Qt 4.7 + +Item { + id: myItem + width: 200; height: 200 + + Rectangle { + id: myRect + width: 100; height: 100 + color: "red" + } + + states: [ + State { + name: "moved" + PropertyChanges { + target: myRect + x: 50 + y: 50 + } + } + ] + + MouseArea { + anchors.fill: parent + onClicked: myItem.state = 'moved' + } +//![0] + +//![transitions] +transitions: [ + Transition { + NumberAnimation { properties: "x,y"; duration: 500 } + } +] +//![transitions] + +//![1] +} +//![1] diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 9847079..7b51239 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -78,7 +78,7 @@ class QByteArray; \since 4.7 \brief The Component element encapsulates a QML component description. - Components are reusable, encapsulated Qml element with a well-defined interface. + Components are reusable, encapsulated QML elements with well-defined interfaces. They are often defined in \l {qdeclarativedocuments.html}{Component Files}. The \e Component element allows defining components within a QML file. diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 39b0802..0715624 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -191,7 +191,7 @@ when the property has one of the following types: \o \c vector3d - use \l{Qt::vector3d()}{Qt.vector3d()} \endlist -There are also string based constructors for these types, see \l{qdeclarativebasictypes.html}{QML Basic Types}. +There are also string based constructors for these types. See \l{qdeclarativebasictypes.html}{QML Basic Types} for more information. \section1 Date/Time Formatters @@ -1054,8 +1054,9 @@ or \c null if there was an error in creating the component. Call \l {Component::createObject()}{Component.createObject()} on the returned component to create an object instance of the component. -Here is an example. Remember that QML files that might be loaded -over the network cannot be expected to be ready immediately. +Here is an example. Notice it checks whether the component \l{Component::status}{status} is +\c Component.Ready before calling \l {Component::createObject()}{createObject()} +in case the QML file is loaded over a network and thus is not ready immediately. \snippet doc/src/snippets/declarative/componentCreation.js 0 \codeline @@ -1095,12 +1096,12 @@ QScriptValue QDeclarativeEnginePrivate::createComponent(QScriptContext *ctxt, QS /*! \qmlmethod object Qt::createQmlObject(string qml, object parent, string filepath) -Returns a new object created from the given \a string of QML with the specified \a parent, +Returns a new object created from the given \a string of QML which will have the specified \a parent, or \c null if there was an error in creating the object. If \a filepath is specified, it will be used for error reporting for the created object. -Example (where \c targetItem is the id of an existing QML item): +Example (where \c parentItem is the id of an existing QML item): \snippet doc/src/snippets/declarative/createQmlObject.qml 0 diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index e98afeb..8e3ec82 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -91,7 +91,7 @@ QT_BEGIN_NAMESPACE \endqml By default, PropertyChanges will establish new bindings where appropriate. - For example, the following creates a new binding for myItem's height property. + For example, the following creates a new binding for myItem's \c height property. \qml PropertyChanges { @@ -500,8 +500,8 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() If explicit is set to true, any potential bindings will be interpreted as once-off assignments that occur when the state is entered. - In the following example, the addition of explicit prevents myItem.width from - being bound to parent.width. Instead, it is assigned the value of parent.width + In the following example, the addition of explicit prevents \c myItem.width from + being bound to \c parent.width. Instead, it is assigned the value of \c parent.width at the time of the state change. \qml PropertyChanges { diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index eca90a4..37f9f6a 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -136,12 +136,30 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje \since 4.7 \brief The State element defines configurations of objects and properties. - A state is specified as a set of batched changes from the default configuration. + A \e state is a set of batched changes from the default configuration. + + All items have a default state that defines the default configuration of objects + and property values. New states can be defined by adding State items to the \l {Item::states}{states} property to + allow items to switch between different configurations. These configurations + can, for example, be used to apply different sets of property values or execute + different scripts. + + Here is an example. In the default state, \c myRect is colored black. In the "clicked" + state, the color is red. Clicking within the MouseArea toggles the rectangle's state + between the default state and the "clicked" state, thus toggling the color of the + rectangle between black and red. + + \snippet doc/src/snippets/declarative/state.qml 0 + + Notice the default state is referred to using an empty string (""). + + States are commonly used together with \l {state-transitions}{Transitions} to provide + animations when state changes occur. \note setting the state of an object from within another state of the same object is not allowed. - \sa {qmlstates}{States}, {state-transitions}{Transitions}, QtDeclarative + \sa {declarative/animation/states}{states example}, {qmlstates}{States}, {state-transitions}{Transitions}, QtDeclarative */ /*! @@ -173,7 +191,7 @@ QDeclarativeState::~QDeclarativeState() /*! \qmlproperty string State::name - This property holds the name of the state + This property holds the name of the state. Each state should have a unique name. */ @@ -204,12 +222,12 @@ bool QDeclarativeState::isWhenKnown() const /*! \qmlproperty bool State::when - This property holds when the state should be applied + This property holds when the state should be applied. - This should be set to an expression that evaluates to true when you want the state to + This should be set to an expression that evaluates to \c true when you want the state to be applied. - If multiple states in a group have \c when clauses that evaluate to true at the same time, + If multiple states in a group have \c when clauses that evaluate to \c true at the same time, the first matching state will be applied. For example, in the following snippet \c state1 will always be selected rather than \c state2 when sharedCondition becomes \c true. @@ -236,7 +254,9 @@ void QDeclarativeState::setWhen(QDeclarativeBinding *when) /*! \qmlproperty string State::extend - This property holds the state that this state extends + This property holds the state that this state extends. + + When a state extends another state, it inherits all the changes of that state. The state being extended is treated as the base state in regards to the changes specified by the extending state. diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp index 1e530a1..67cd12e 100644 --- a/src/declarative/util/qdeclarativestategroup.cpp +++ b/src/declarative/util/qdeclarativestategroup.cpp @@ -91,8 +91,8 @@ public: \since 4.7 \brief The StateGroup element provides state support for non-Item elements. - Item (and all dervied elements) provides built in support for states and transitions - via its state, states and transitions properties. StateGroup provides an easy way to + Item (and all derived elements) provides built in support for states and transitions + via its \l{Item::state}{state}, \l{Item::states}{states} and \l{Item::transitions}{transitions} properties. StateGroup provides an easy way to use this support in other (non-Item-derived) elements. \qml diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index 99f163e..2d55931 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -583,9 +583,9 @@ public: \qmlclass StateChangeScript QDeclarativeStateChangeScript \brief The StateChangeScript element allows you to run a script in a state. - StateChangeScripts are run when entering the state. You can use - ScriptAction to specify at which point in the transition - you want the StateChangeScript to be run. + A StateChangeScript is run upon entering a state. You can optionally use + ScriptAction to specify the point in the transition at which + the StateChangeScript should to be run. \qml State { @@ -687,22 +687,16 @@ QString QDeclarativeStateChangeScript::typeName() const \qmlclass AnchorChanges QDeclarativeAnchorChanges \brief The AnchorChanges element allows you to change the anchors of an item in a state. - In the following example we change the top and bottom anchors of an item: - \qml - State { - name: "reanchored" - AnchorChanges { - target: content; - anchors.top: window.top; - anchors.bottom: window.bottom - } - PropertyChanges { - target: content; - anchors.topMargin: 3 - anchors.bottomMargin: 3; - } - } - \endqml + The AnchorChanges element is used to modify the anchors of an item in a \l State. + + AnchorChanges cannot be used to modify the margins on an item. For this, use + PropertyChanges intead. + + In the following example we change the top and bottom anchors of an item + using AnchorChanges, and the top and bottom anchor margins using + PropertyChanges: + + \snippet doc/src/snippets/declarative/anchorchanges.qml 0 AnchorChanges can be animated using AnchorAnimation. \qml -- cgit v0.12 From 4a36a17e06b3ec7c20bcef9692d46dba5504151a Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 9 Jun 2010 18:04:48 +1000 Subject: Doc improvements: move some example code to snippets, add screenshots, other minor doc fixes --- doc/src/declarative/elements.qdoc | 2 - doc/src/declarative/pics/anchorchanges.png | Bin 0 -> 566 bytes doc/src/declarative/pics/listmodel-nested.png | Bin 0 -> 7493 bytes doc/src/declarative/pics/listmodel.png | Bin 0 -> 3407 bytes doc/src/declarative/pics/parentchange.png | Bin 0 -> 509 bytes doc/src/snippets/declarative/anchorchanges.qml | 51 ++++++++- doc/src/snippets/declarative/animation.qml | 40 +++++++ doc/src/snippets/declarative/listmodel-nested.qml | 103 +++++++++++++++++ doc/src/snippets/declarative/listmodel-simple.qml | 80 +++++++++++++ doc/src/snippets/declarative/listmodel.qml | 60 ++++++++++ doc/src/snippets/declarative/parentchange.qml | 69 +++++++++++ doc/src/snippets/declarative/state.qml | 40 +++++++ doc/src/snippets/declarative/states.qml | 40 +++++++ doc/src/snippets/declarative/visualdatamodel.qml | 65 +++++++++++ .../declarative/visualdatamodel_rootindex/main.cpp | 63 +++++++++++ .../declarative/visualdatamodel_rootindex/view.qml | 66 +++++++++++ .../visualdatamodel_rootindex.pro | 4 + src/declarative/graphicsitems/qdeclarativeitem.cpp | 2 +- .../graphicsitems/qdeclarativevisualitemmodel.cpp | 99 +++++----------- src/declarative/qml/qdeclarativecomponent.cpp | 12 +- src/declarative/qml/qdeclarativecontext.cpp | 2 +- src/declarative/util/qdeclarativeanimation.cpp | 21 ++-- src/declarative/util/qdeclarativeconnections.cpp | 29 ++--- src/declarative/util/qdeclarativelistmodel.cpp | 126 ++++----------------- src/declarative/util/qdeclarativepackage.cpp | 8 +- src/declarative/util/qdeclarativestate.cpp | 5 +- .../util/qdeclarativestateoperations.cpp | 10 ++ src/declarative/util/qdeclarativexmllistmodel.cpp | 10 +- tests/auto/declarative/examples/tst_examples.cpp | 1 + 29 files changed, 783 insertions(+), 225 deletions(-) create mode 100644 doc/src/declarative/pics/anchorchanges.png create mode 100644 doc/src/declarative/pics/listmodel-nested.png create mode 100644 doc/src/declarative/pics/listmodel.png create mode 100644 doc/src/declarative/pics/parentchange.png create mode 100644 doc/src/snippets/declarative/listmodel-nested.qml create mode 100644 doc/src/snippets/declarative/listmodel-simple.qml create mode 100644 doc/src/snippets/declarative/listmodel.qml create mode 100644 doc/src/snippets/declarative/parentchange.qml create mode 100644 doc/src/snippets/declarative/visualdatamodel.qml create mode 100644 doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp create mode 100644 doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml create mode 100644 doc/src/snippets/declarative/visualdatamodel_rootindex/visualdatamodel_rootindex.pro diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index aa48bcb..31fa948 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -211,6 +211,4 @@ The following table lists the QML elements provided by the \l {QtDeclarative}{Qt \endlist \endtable -\o - */ diff --git a/doc/src/declarative/pics/anchorchanges.png b/doc/src/declarative/pics/anchorchanges.png new file mode 100644 index 0000000..4973e4e Binary files /dev/null and b/doc/src/declarative/pics/anchorchanges.png differ diff --git a/doc/src/declarative/pics/listmodel-nested.png b/doc/src/declarative/pics/listmodel-nested.png new file mode 100644 index 0000000..ee7ffba Binary files /dev/null and b/doc/src/declarative/pics/listmodel-nested.png differ diff --git a/doc/src/declarative/pics/listmodel.png b/doc/src/declarative/pics/listmodel.png new file mode 100644 index 0000000..7ab1771 Binary files /dev/null and b/doc/src/declarative/pics/listmodel.png differ diff --git a/doc/src/declarative/pics/parentchange.png b/doc/src/declarative/pics/parentchange.png new file mode 100644 index 0000000..93206fb Binary files /dev/null and b/doc/src/declarative/pics/parentchange.png differ diff --git a/doc/src/snippets/declarative/anchorchanges.qml b/doc/src/snippets/declarative/anchorchanges.qml index 6c0a0ad..993618b 100644 --- a/doc/src/snippets/declarative/anchorchanges.qml +++ b/doc/src/snippets/declarative/anchorchanges.qml @@ -1,11 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ //![0] import Qt 4.7 -Item { +Rectangle { id: window - width: 200; height: 200 + width: 120; height: 120 + color: "black" - Rectangle { id: myRect; width: 100; height: 100; color: "red" } + Rectangle { id: myRect; width: 50; height: 50; color: "red" } states: State { name: "reanchored" @@ -17,8 +58,8 @@ Item { } PropertyChanges { target: myRect - anchors.topMargin: 3 - anchors.bottomMargin: 3 + anchors.topMargin: 10 + anchors.bottomMargin: 10 } } diff --git a/doc/src/snippets/declarative/animation.qml b/doc/src/snippets/declarative/animation.qml index f5c6bf6..65acd36 100644 --- a/doc/src/snippets/declarative/animation.qml +++ b/doc/src/snippets/declarative/animation.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ import Qt 4.7 Row { diff --git a/doc/src/snippets/declarative/listmodel-nested.qml b/doc/src/snippets/declarative/listmodel-nested.qml new file mode 100644 index 0000000..4ae43ff --- /dev/null +++ b/doc/src/snippets/declarative/listmodel-nested.qml @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import Qt 4.7 + +Rectangle { + width: 200; height: 200 + + +//![model] +ListModel { + id: fruitModel + + ListElement { + name: "Apple" + cost: 2.45 + attributes: [ + ListElement { description: "Core" }, + ListElement { description: "Deciduous" } + ] + } + ListElement { + name: "Orange" + cost: 3.25 + attributes: [ + ListElement { description: "Citrus" } + ] + } + ListElement { + name: "Banana" + cost: 1.95 + attributes: [ + ListElement { description: "Tropical" }, + ListElement { description: "Seedless" } + ] + } +} +//![model] + +//![delegate] +Component { + id: fruitDelegate + Item { + width: 200; height: 50 + Text { id: nameField; text: name } + Text { text: '$' + cost; anchors.left: nameField.right } + Row { + anchors.top: nameField.bottom + spacing: 5 + Text { text: "Attributes:" } + Repeater { + model: attributes + Text { text: description } + } + } + } +} +//![delegate] + +ListView { + width: 200; height: 200 + model: fruitModel + delegate: fruitDelegate +} + +} diff --git a/doc/src/snippets/declarative/listmodel-simple.qml b/doc/src/snippets/declarative/listmodel-simple.qml new file mode 100644 index 0000000..00b8cb0 --- /dev/null +++ b/doc/src/snippets/declarative/listmodel-simple.qml @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +//![0] +import Qt 4.7 + +Rectangle { + width: 200; height: 200 + + ListModel { + id: fruitModel +//![0] + ListElement { + name: "Apple" + cost: 2.45 + } + ListElement { + name: "Orange" + cost: 3.25 + } + ListElement { + name: "Banana" + cost: 1.95 + } +//![1] + } + + Component { + id: fruitDelegate + Row { + spacing: 10 + Text { text: name } + Text { text: '$' + cost } + } + } + + ListView { + anchors.fill: parent + model: fruitModel + delegate: fruitDelegate + } +} +//![1] diff --git a/doc/src/snippets/declarative/listmodel.qml b/doc/src/snippets/declarative/listmodel.qml new file mode 100644 index 0000000..91b8230 --- /dev/null +++ b/doc/src/snippets/declarative/listmodel.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +//![0] +import Qt 4.7 + +ListModel { + id: fruitModel + + ListElement { + name: "Apple" + cost: 2.45 + } + ListElement { + name: "Orange" + cost: 3.25 + } + ListElement { + name: "Banana" + cost: 1.95 + } +} +//![0] diff --git a/doc/src/snippets/declarative/parentchange.qml b/doc/src/snippets/declarative/parentchange.qml new file mode 100644 index 0000000..7f5718a --- /dev/null +++ b/doc/src/snippets/declarative/parentchange.qml @@ -0,0 +1,69 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +//![0] +import Qt 4.7 + +Rectangle { + width: 200 + height: 100 + + Rectangle { + id: redRect + width: 100; height: 100 + color: "red" + } + + Rectangle { + id: blueRect + x: redRect.width + width: 50; height: 50 + color: "blue" + + states: State { + name: "reparented" + ParentChange { target: blueRect; parent: redRect; x: 10; y: 10 } + } + + MouseArea { anchors.fill: parent; onClicked: blueRect.state = "reparented" } + } +} +//![0] + diff --git a/doc/src/snippets/declarative/state.qml b/doc/src/snippets/declarative/state.qml index 0954298..a99c2e2 100644 --- a/doc/src/snippets/declarative/state.qml +++ b/doc/src/snippets/declarative/state.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ //![0] import Qt 4.7 diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/declarative/states.qml index 7bfb5bd..c3b1796 100644 --- a/doc/src/snippets/declarative/states.qml +++ b/doc/src/snippets/declarative/states.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ //![0] import Qt 4.7 diff --git a/doc/src/snippets/declarative/visualdatamodel.qml b/doc/src/snippets/declarative/visualdatamodel.qml new file mode 100644 index 0000000..cdde513 --- /dev/null +++ b/doc/src/snippets/declarative/visualdatamodel.qml @@ -0,0 +1,65 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +//![0] +import Qt 4.7 + +Rectangle { + width: 200; height: 100 + + VisualDataModel { + id: visualModel + model: ListModel { + ListElement { name: "Apple" } + ListElement { name: "Orange" } + } + delegate: Rectangle { + height: 25 + width: 100 + Text { text: "Name: " + name} + } + } + + ListView { + anchors.fill: parent + model: visualModel + } +} +//![0] diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp b/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp new file mode 100644 index 0000000..f77061e --- /dev/null +++ b/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp @@ -0,0 +1,63 @@ +myModel/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include + +#include +#include + +//![0] +int main(int argc, char ** argv) +{ + QApplication app(argc, argv); + + QDeclarativeView view; + + QDirModel model; + view.rootContext()->setContextProperty("dirModel", &model); + + view.setSource(QUrl::fromLocalFile("view.qml")); + view.show(); + + return app.exec(); +} +//![0] + diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml b/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml new file mode 100644 index 0000000..e623faa --- /dev/null +++ b/doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +//![0] +import Qt 4.7 + +ListView { + id: view + width: 300 + height: 400 + + model: VisualDataModel { + model: dirModel + + delegate: Rectangle { + width: 200; height: 25 + Text { text: filePath } + + MouseArea { + anchors.fill: parent + onClicked: { + if (hasModelChildren) + view.model.rootIndex = view.model.modelIndex(index) + } + } + } + } +} +//![0] diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/visualdatamodel_rootindex.pro b/doc/src/snippets/declarative/visualdatamodel_rootindex/visualdatamodel_rootindex.pro new file mode 100644 index 0000000..fec070c --- /dev/null +++ b/doc/src/snippets/declarative/visualdatamodel_rootindex/visualdatamodel_rootindex.pro @@ -0,0 +1,4 @@ +TEMPLATE = app +QT += gui declarative + +SOURCES += main.cpp diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index bef09bb..7ab280e 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -726,7 +726,7 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post) The signal properties have a \l KeyEvent parameter, named \e event which contains details of the event. If a key is handled \e event.accepted should be set to true to prevent the - event from propagating up the item heirarchy. + event from propagating up the item hierarchy. \code Item { diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 2a88a80..e133adb 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -113,16 +113,18 @@ public: \since 4.7 \brief The VisualItemModel allows items to be provided to a view. - The children of the VisualItemModel are provided in a model which - can be used in a view. Note that no delegate should be - provided to a view since the VisualItemModel contains the - visual delegate (items). + A VisualItemModel contains the visual items to be used in a view. + When a VisualItemModel is used in a view, the view does not require + a delegate since the VisualItemModel already contains the visual + delegate (items). An item can determine its index within the model via the \c VisualItemModel.index attached property. The example below places three colored rectangles in a ListView. \code + import Qt 4.7 + Rectangle { VisualItemModel { id: itemModel @@ -607,30 +609,15 @@ QDeclarativeVisualDataModelData *QDeclarativeVisualDataModelPrivate::data(QObjec A VisualDataModel encapsulates a model and the delegate that will be instantiated for items in the model. - It is usually not necessary to create a VisualDataModel directly, - since the QML views will create one internally. + It is usually not necessary to create VisualDataModel elements. + However, it can be useful for manipulating and accessing the \l modelIndex + when a QAbstractItemModel subclass is used as the + model. Also, VisualDataModel is used together with \l Package to + provide delegates to multiple views. The example below illustrates using a VisualDataModel with a ListView. - \code - VisualDataModel { - id: visualModel - model: myModel - delegate: Component { - Rectangle { - height: 25 - width: 100 - Text { text: "Name:" + name} - } - } - } - ListView { - width: 100 - height: 100 - anchors.fill: parent - model: visualModel - } - \endcode + \snippet doc/src/snippets/declarative/visualdatamodel.qml 0 */ QDeclarativeVisualDataModel::QDeclarativeVisualDataModel() @@ -805,56 +792,22 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate) /*! \qmlproperty QModelIndex VisualDataModel::rootIndex - QAbstractItemModel provides a heirachical tree of data, whereas + QAbstractItemModel provides a hierarchical tree of data, whereas QML only operates on list data. \c rootIndex allows the children of any node in a QAbstractItemModel to be provided by this model. This property only affects models of type QAbstractItemModel. - \code - // main.cpp - - int main(int argc, char ** argv) - { - QApplication app(argc, argv); - - QDeclarativeView view; - - QDirModel model; - view.rootContext()->setContextProperty("myModel", &model); + For example, here is a simple interactive file system browser. + When a directory name is clicked, the view's \c rootIndex is set to the + QModelIndex node of the clicked directory, thus updating the view to show + the new directory's contents. - view.setSource(QUrl("qrc:view.qml")); - view.show(); - - return app.exec(); - } - - #include "main.moc" - \endcode - - \code - // view.qml - import Qt 4.7 - - ListView { - id: view - width: 200 - height: 200 - model: VisualDataModel { - model: myModel - delegate: Component { - Rectangle { - height: 25; width: 200 - Text { text: filePath } - MouseArea { - anchors.fill: parent; - onClicked: if (hasModelChildren) view.model.rootIndex = view.model.modelIndex(index) - } - } - } - } - } - \endcode + \c main.cpp: + \snippet doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp 0 + + \c view.qml: + \snippet doc/src/snippets/declarative/visualdatamodel_rootindex/view.qml 0 \sa modelIndex(), parentModelIndex() */ @@ -886,7 +839,7 @@ void QDeclarativeVisualDataModel::setRootIndex(const QVariant &root) /*! \qmlmethod QModelIndex VisualDataModel::modelIndex(int index) - QAbstractItemModel provides a heirachical tree of data, whereas + QAbstractItemModel provides a hierarchical tree of data, whereas QML only operates on list data. This function assists in using tree models in QML. @@ -906,7 +859,7 @@ QVariant QDeclarativeVisualDataModel::modelIndex(int idx) const /*! \qmlmethod QModelIndex VisualDataModel::parentModelIndex() - QAbstractItemModel provides a heirachical tree of data, whereas + QAbstractItemModel provides a hierarchical tree of data, whereas QML only operates on list data. This function assists in using tree models in QML. @@ -1000,10 +953,10 @@ QDeclarativeVisualDataModel::ReleaseFlags QDeclarativeVisualDataModel::release(Q The \a parts property selects a VisualDataModel which creates delegates from the part named. This is used in conjunction with - the Package element. + the \l Package element. For example, the code below selects a model which creates - delegates named \e list from a Package: + delegates named \e list from a \l Package: \code VisualDataModel { diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 7b51239..55ee783 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -547,16 +547,18 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q /*! \qmlmethod object Component::createObject(parent) - Returns an object instance from this component, or null if object creation fails. + + Creates and returns an object instance of this component that will have the given + \a parent. Returns null if object creation fails. The object will be created in the same context as the one in which the component was created. This function will always return null when called on components which were not created in QML. - Note that if the returned object is to be displayed, its \c parent must be set to - an existing item in a scene, or else the object will not be visible. The parent - argument is required to help you avoid this, you must explicitly pass in null if - you wish to create an object without setting a parent. + If you wish to create an object without setting a parent, specify \c null for + the \a parent value. Note that if the returned object is to be displayed, you + must provide a valid \a parent value or set the returned object's \l{Item::parent}{parent} + property, or else the object will not be visible. */ /*! diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp index 6a13f15..2221d78 100644 --- a/src/declarative/qml/qdeclarativecontext.cpp +++ b/src/declarative/qml/qdeclarativecontext.cpp @@ -116,7 +116,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate() All properties added explicitly by QDeclarativeContext::setContextProperty() take precedence over the context object's properties. - Contexts form a hierarchy. The root of this heirarchy is the QDeclarativeEngine's + Contexts form a hierarchy. The root of this hierarchy is the QDeclarativeEngine's \l {QDeclarativeEngine::rootContext()}{root context}. A component instance can access the data in its own context, as well as all its ancestor contexts. Data can be made available to all instances by modifying the diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 1447532..25cf133 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -1774,7 +1774,7 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t) To specify an easing curve you need to specify at least the type. For some curves you can also specify amplitude, period and/or overshoot (more details provided after the table). The default easing curve is - Linear. + \c Easing.Linear. \qml PropertyAnimation { properties: "y"; easing.type: Easing.InOutElastic; easing.amplitude: 2.0; easing.period: 1.5 } @@ -1951,15 +1951,15 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t) \o \inlineimage qeasingcurve-outinbounce.png \endtable - easing.amplitude is only applicable for bounce and elastic curves (curves of type - Easing.InBounce, Easing.OutBounce, Easing.InOutBounce, Easing.OutInBounce, Easing.InElastic, - Easing.OutElastic, Easing.InOutElastic or Easing.OutInElastic). + \c easing.amplitude is only applicable for bounce and elastic curves (curves of type + \c Easing.InBounce, \c Easing.OutBounce, \c Easing.InOutBounce, \c Easing.OutInBounce, \c Easing.InElastic, + \c Easing.OutElastic, \c Easing.InOutElastic or \c Easing.OutInElastic). - easing.overshoot is only applicable if type is: Easing.InBack, Easing.OutBack, - Easing.InOutBack or Easing.OutInBack. + \c easing.overshoot is only applicable if \c easing.type is: \c Easing.InBack, \c Easing.OutBack, + \c Easing.InOutBack or \c Easing.OutInBack. - easing.period is only applicable if type is: Easing.InElastic, Easing.OutElastic, - Easing.InOutElastic or Easing.OutInElastic. + \c easing.period is only applicable if easing.type is: \c Easing.InElastic, \c Easing.OutElastic, + \c Easing.InOutElastic or \c Easing.OutInElastic. See the \l {declarative/animation/easing}{easing} example for a demonstration of the different easing settings. @@ -2045,8 +2045,9 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop) The singular forms are slightly optimized, so if you do have only a single target/property to animate you should try to use them. - In many cases these properties do not need to be explicitly specified -- they can be - inferred from the animation framework. + In many cases these properties do not need to be explicitly specified, as they can be + inferred from the animation framework: + \table 80% \row \o Value Source / Behavior diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp index 808d196..b364821 100644 --- a/src/declarative/util/qdeclarativeconnections.cpp +++ b/src/declarative/util/qdeclarativeconnections.cpp @@ -72,7 +72,9 @@ public: /*! \qmlclass Connections QDeclarativeConnections \since 4.7 - \brief A Connections object describes generalized connections to signals. + \brief A Connections element describes generalized connections to signals. + + A Connections object creates a connection to a QML signal. When connecting to signals in QML, the usual way is to create an "on" handler that reacts when a signal is received, like this: @@ -83,16 +85,16 @@ public: } \endqml - However, in some cases, it is not possible to connect to a signal in this - way, such as: + However, it is not possible to connect to a signal in this way in some + cases, such as when: \list - \i multiple connections to the same signal - \i connections outside the scope of the signal sender - \i connections to targets not defined in QML + \i Multiple connections to the same signal are required + \i Creating connections outside the scope of the signal sender + \i Connecting to targets not defined in QML \endlist - When any of these are needed, the Connections object can be used instead. + When any of these are needed, the Connections element can be used instead. For example, the above code can be changed to use a Connections object, like this: @@ -105,7 +107,7 @@ public: } \endqml - More generally, the Connections object can be a child of some other object than + More generally, the Connections object can be a child of some object other than the sender of the signal: \qml @@ -141,7 +143,7 @@ QDeclarativeConnections::~QDeclarativeConnections() \qmlproperty Object Connections::target This property holds the object that sends the signal. - If not set at all, the target defaults to be the parent of the Connections. + If this property is not set, the \c target defaults to the parent of the Connection. If set to null, no connection is made and any signal handlers are ignored until the target is not null. @@ -175,12 +177,11 @@ void QDeclarativeConnections::setTarget(QObject *obj) /*! \qmlproperty bool Connections::ignoreUnknownSignals - Normally, you will get a runtime error if you try to connect - to signals on an object which the object does not have. + Normally, a connection to a non-existent signal produces runtime errors. - By setting this flag to true, such errors are ignored. This is - useful if you intend to connect to different types of object, handling - a different set of signals for each. + If this property is set to \c true, such errors are ignored. + This is useful if you intend to connect to different types of objects, handling + a different set of signals for each object. */ bool QDeclarativeConnections::ignoreUnknownSignals() const { diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 7518eb7..78a3207 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -76,125 +76,41 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM For example: - \code - ListModel { - id: fruitModel - ListElement { - name: "Apple" - cost: 2.45 - } - ListElement { - name: "Orange" - cost: 3.25 - } - ListElement { - name: "Banana" - cost: 1.95 - } - } - \endcode + \snippet doc/src/snippets/declarative/listmodel.qml 0 - Roles (properties) must begin with a lower-case letter.The above example defines a + Roles (properties) must begin with a lower-case letter. The above example defines a ListModel containing three elements, with the roles "name" and "cost". Values must be simple constants - either strings (quoted), bools (true, false), numbers, or enum values (like Text.AlignHCenter). The defined model can be used in views such as ListView: - \code - Component { - id: fruitDelegate - Item { - width: 200; height: 50 - Text { text: name } - Text { text: '$'+cost; anchors.right: parent.right } - } - } - ListView { - model: fruitModel - delegate: fruitDelegate - anchors.fill: parent - } - \endcode + \snippet doc/src/snippets/declarative/listmodel-simple.qml 0 + \dots 8 + \snippet doc/src/snippets/declarative/listmodel-simple.qml 1 + \image listmodel.png It is possible for roles to contain list data. In the example below we create a list of fruit attributes: - \code - ListModel { - id: fruitModel - ListElement { - name: "Apple" - cost: 2.45 - attributes: [ - ListElement { description: "Core" }, - ListElement { description: "Deciduous" } - ] - } - ListElement { - name: "Orange" - cost: 3.25 - attributes: [ - ListElement { description: "Citrus" } - ] - } - ListElement { - name: "Banana" - cost: 1.95 - attributes: [ - ListElement { description: "Tropical" }, - ListElement { description: "Seedless" } - ] - } - } - \endcode + \snippet doc/src/snippets/declarative/listmodel-nested.qml model + + The delegate below displays all the fruit attributes: + + \snippet doc/src/snippets/declarative/listmodel-nested.qml delegate + \image listmodel-nested.png - The delegate below will list all the fruit attributes: - \code - Component { - id: fruitDelegate - Item { - width: 200; height: 50 - Text { id: name; text: name } - Text { text: '$'+cost; anchors.right: parent.right } - Row { - anchors.top: name.bottom - spacing: 5 - Text { text: "Attributes:" } - Repeater { - model: attributes - Component { Text { text: description } } - } - } - } - } - \endcode \section2 Modifying list models The content of a ListModel may be created and modified using the clear(), - append(), and set() methods. For example: - - \code - Component { - id: fruitDelegate - Item { - width: 200; height: 50 - Text { text: name } - Text { text: '$'+cost; anchors.right: parent.right } - - // Double the price when clicked. - MouseArea { - anchors.fill: parent - onClicked: fruitModel.set(index, "cost", cost*2) - } - } - } - \endcode + append(), set() and setProperty() methods. For example: + + \snippet doc/src/snippets/declarative/listmodel-modify.qml delegate When creating content dynamically, note that the set of available properties cannot be changed - except by first clearing the model - whatever properties are first added are then the - only permitted properties in the model. + except by first clearing the model. Whatever properties are first added to the model are then the + only permitted properties in the model until it is cleared. \section2 Using threaded list models with WorkerScript @@ -214,11 +130,11 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM \snippet examples/declarative/threading/threadedlistmodel/dataloader.js 0 The application's \tt Timer object periodically sends a message to the - worker script by calling \tt WorkerScript::sendMessage(). When this message - is received, \tt WorkerScript.onMessage() is invoked in + worker script by calling \l WorkerScript::sendMessage(). When this message + is received, \l {WorkerScript::onMessage}{WorkerScript.onMessage()} is invoked in \tt dataloader.js, which appends the current time to the list model. - Note the call to sync() from the \c WorkerScript.onMessage() handler. + Note the call to sync() from the \l {WorkerScript::onMessage}{WorkerScript.onMessage()} handler. You must call sync() or else the changes made to the list from the external thread will not be reflected in the list model in the main thread. @@ -454,7 +370,7 @@ void QDeclarativeListModel::insert(int index, const QScriptValue& valuemap) to the end of the list: \code - fruitModel.move(0,fruitModel.count-3,3) + fruitModel.move(0, fruitModel.count - 3, 3) \endcode \sa append() diff --git a/src/declarative/util/qdeclarativepackage.cpp b/src/declarative/util/qdeclarativepackage.cpp index 9617b86..9245fc2 100644 --- a/src/declarative/util/qdeclarativepackage.cpp +++ b/src/declarative/util/qdeclarativepackage.cpp @@ -48,9 +48,9 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Package QDeclarativePackage - \brief Package provides a collection of named items + \brief Package provides a collection of named items. - The Package class is currently used in conjunction with + The Package class is used in conjunction with VisualDataModel to enable delegates with a shared context to be provided to multiple views. @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE \e {Package.name} attached property. The example below creates a Package containing two named items; - \e list and \e grid. The third element in the package is parented to whichever + \e list and \e grid. The third element in the package (the \l Rectangle) is parented to whichever delegate it should appear in. This allows an item to move between views. @@ -70,7 +70,7 @@ QT_BEGIN_NAMESPACE \snippet examples/declarative/modelviews/package/view.qml 0 - \sa QtDeclarative + \sa {declarative/modelviews/package}{Package example}, QtDeclarative */ diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index 37f9f6a..ae19a9c 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -144,8 +144,9 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje can, for example, be used to apply different sets of property values or execute different scripts. - Here is an example. In the default state, \c myRect is colored black. In the "clicked" - state, the color is red. Clicking within the MouseArea toggles the rectangle's state + The following example displays a single Rectangle. In the default state, the rectangle + is colored black. In the "clicked" state, a PropertyChanges element changes the + rectangle's color to red. Clicking within the MouseArea toggles the rectangle's state between the default state and the "clicked" state, thus toggling the color of the rectangle between black and red. diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index 2d55931..51e6f99 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -172,6 +172,14 @@ void QDeclarativeParentChangePrivate::doChange(QDeclarativeItem *targetParent, Q items involved in the reparenting (i.e. items in the common ancestor tree for the original and new parent). + The example below displays a large red rectangle and a small blue rectangle, side by side. + When the \c blueRect is clicked, it changes to the "reparented" state: its parent is changed to \c redRect and it is + positioned at (10, 10) within the red rectangle, as specified in the ParentChange. + + \snippet doc/src/snippets/declarative/parentchange.qml 0 + + \image parentchange.png + You can specify at which point in a transition you want a ParentChange to occur by using a ParentAnimation. */ @@ -698,6 +706,8 @@ QString QDeclarativeStateChangeScript::typeName() const \snippet doc/src/snippets/declarative/anchorchanges.qml 0 + \image anchorchanges.png + AnchorChanges can be animated using AnchorAnimation. \qml //animate our anchor changes diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 4f9355b..4adef25 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -523,10 +523,13 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty in the XML document. The XmlRole objects define the - model item attributes; here, each model item will have \c title and \c pubDate + model item attributes. Here, each model item will have \c title and \c pubDate attributes that match the \c title and \c pubDate values of its corresponding \c . (See \l XmlRole::query for more examples of valid XPath expressions for XmlRole.) @@ -672,11 +675,11 @@ void QDeclarativeXmlListModel::setSource(const QUrl &src) /*! \qmlproperty string XmlListModel::xml - This property holds XML text set directly. + This property holds the XML data for this model, if set. The text is assumed to be UTF-8 encoded. - If both source and xml are set, xml will be used. + If both \l source and \c xml are set, \c xml will be used. */ QString QDeclarativeXmlListModel::xml() const { @@ -733,6 +736,7 @@ void QDeclarativeXmlListModel::setQuery(const QString &query) source: "http://mysite.com/feed.xml" query: "/feed/entry" namespaceDeclarations: "declare default element namespace 'http://www.w3.org/2005/Atom';" + XmlRole { name: "title"; query: "title/string()" } } \endqml diff --git a/tests/auto/declarative/examples/tst_examples.cpp b/tests/auto/declarative/examples/tst_examples.cpp index da115a7..cff0b46 100644 --- a/tests/auto/declarative/examples/tst_examples.cpp +++ b/tests/auto/declarative/examples/tst_examples.cpp @@ -85,6 +85,7 @@ tst_examples::tst_examples() // Add directories you want excluded here + excludedDirs << "doc/src/snippets/declarative/visualdatamodel_rootindex"; #ifdef QT_NO_WEBKIT excludedDirs << "examples/declarative/modelviews/webview"; -- cgit v0.12 From 433ad48e3ce0fd66d6165714c0bd811d5cb79a35 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 10 Jun 2010 09:48:27 +1000 Subject: qmlviewer: ensure that only clicks on the current file list are handled. Task-number: QTBUG-11315 --- tools/qml/content/Browser.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qml/content/Browser.qml b/tools/qml/content/Browser.qml index 838a848..ff2bb47 100644 --- a/tools/qml/content/Browser.qml +++ b/tools/qml/content/Browser.qml @@ -134,7 +134,7 @@ Rectangle { MouseArea { id: mouseRegion anchors.fill: parent - onClicked: { launch() } + onClicked: { if (folders == wrapper.ListView.view.model) launch() } } states: [ State { -- cgit v0.12 From f0418a4370a3cc3393f15518188fa028b0bb2255 Mon Sep 17 00:00:00 2001 From: Toby Tomkins Date: Thu, 10 Jun 2010 10:21:49 +1000 Subject: Problems with missing symbols on QWS/AIX. Include freetype synthesis file for cross-compilation. Reviewed-by: Rohan McGovern --- src/gui/text/text.pri | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri index 9ec3142..d5a9c74 100644 --- a/src/gui/text/text.pri +++ b/src/gui/text/text.pri @@ -138,6 +138,7 @@ contains(QT_CONFIG, freetype) { ../3rdparty/freetype/src/base/ftinit.c \ ../3rdparty/freetype/src/base/ftmm.c \ ../3rdparty/freetype/src/base/fttype1.c \ + ../3rdparty/freetype/src/base/ftsynth.c \ ../3rdparty/freetype/src/base/ftbitmap.c\ ../3rdparty/freetype/src/bdf/bdf.c \ ../3rdparty/freetype/src/cache/ftcache.c \ -- cgit v0.12 From 6eb8af2ceca2d0fc8b7108bec3525d915d31fe65 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 10 Jun 2010 10:22:34 +1000 Subject: Improve test stability. --- .../qdeclarativeviewer/tst_qdeclarativeviewer.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp index 91b7cf8..abc9688 100644 --- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp +++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp @@ -44,6 +44,7 @@ #include #include #include "qmlruntime.h" +#include "../../../shared/util.h" #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir @@ -85,6 +86,10 @@ void tst_QDeclarativeViewer::orientation() QVERIFY(rootItem); window.show(); + QApplication::setActiveWindow(&window); + QTest::qWaitForWindowShown(&window); + QTRY_COMPARE(QApplication::activeWindow(), static_cast(&window)); + QCOMPARE(rootItem->width(), 200.0); QCOMPARE(rootItem->height(), 300.0); QCOMPARE(viewer->view()->size(), QSize(200, 300)); @@ -125,6 +130,10 @@ void tst_QDeclarativeViewer::loading() QVERIFY(rootItem); viewer->show(); + QApplication::setActiveWindow(viewer); + QTest::qWaitForWindowShown(viewer); + QTRY_COMPARE(QApplication::activeWindow(), static_cast(viewer)); + // initial size QCOMPARE(rootItem->width(), 200.0); QCOMPARE(rootItem->height(), 300.0); @@ -192,6 +201,10 @@ void tst_QDeclarativeViewer::fileBrowser() viewer->openFile(); viewer->show(); + QApplication::setActiveWindow(viewer); + QTest::qWaitForWindowShown(viewer); + QTRY_COMPARE(QApplication::activeWindow(), static_cast(viewer)); + // Browser.qml successfully loaded QDeclarativeItem* browserItem = qobject_cast(viewer->view()->rootObject()); QVERIFY(viewer->view()); @@ -225,6 +238,10 @@ void tst_QDeclarativeViewer::resizing() QVERIFY(rootItem); viewer->show(); + QApplication::setActiveWindow(viewer); + QTest::qWaitForWindowShown(viewer); + QTRY_COMPARE(QApplication::activeWindow(), static_cast(viewer)); + // initial size QCOMPARE(rootItem->width(), 200.0); QCOMPARE(rootItem->height(), 300.0); -- cgit v0.12 From 85864036462e80c18b8a272eb4dcbe339b7033e0 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 10 Jun 2010 10:33:44 +1000 Subject: Stablize qmlviewer test --- .../qdeclarativeviewer/tst_qdeclarativeviewer.cpp | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp index 91b7cf8..8626560 100644 --- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp +++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp @@ -43,6 +43,7 @@ #include #include #include +#include "../../../shared/util.h" #include "qmlruntime.h" #ifdef Q_OS_SYMBIAN @@ -126,8 +127,8 @@ void tst_QDeclarativeViewer::loading() viewer->show(); // initial size - QCOMPARE(rootItem->width(), 200.0); - QCOMPARE(rootItem->height(), 300.0); + QTRY_COMPARE(rootItem->width(), 200.0); + QTRY_COMPARE(rootItem->height(), 300.0); QCOMPARE(viewer->view()->size(), QSize(200, 300)); QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300)); QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height())); @@ -137,8 +138,8 @@ void tst_QDeclarativeViewer::loading() qApp->processEvents(); // window resized - QCOMPARE(rootItem->width(), 400.0); - QCOMPARE(rootItem->height(), 500.0-viewer->menuBar()->height()); + QTRY_COMPARE(rootItem->width(), 400.0); + QTRY_COMPARE(rootItem->height(), 500.0-viewer->menuBar()->height()); QCOMPARE(viewer->view()->size(), QSize(400, 500-viewer->menuBar()->height())); QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500-viewer->menuBar()->height())); @@ -150,8 +151,8 @@ void tst_QDeclarativeViewer::loading() QVERIFY(rootItem); // reload cause the window to return back to initial size - QCOMPARE(rootItem->width(), 200.0); - QCOMPARE(rootItem->height(), 300.0); + QTRY_COMPARE(rootItem->width(), 200.0); + QTRY_COMPARE(rootItem->height(), 300.0); QCOMPARE(viewer->view()->size(), QSize(200, 300)); QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300)); @@ -162,8 +163,8 @@ void tst_QDeclarativeViewer::loading() qApp->processEvents(); // window resized again - QCOMPARE(rootItem->width(), 400.0); - QCOMPARE(rootItem->height(), 500.0-viewer->menuBar()->height()); + QTRY_COMPARE(rootItem->width(), 400.0); + QTRY_COMPARE(rootItem->height(), 500.0-viewer->menuBar()->height()); QCOMPARE(viewer->view()->size(), QSize(400, 500-viewer->menuBar()->height())); QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(400, 500-viewer->menuBar()->height())); @@ -175,8 +176,8 @@ void tst_QDeclarativeViewer::loading() QVERIFY(rootItem); // open also causes the window to return back to initial size - QCOMPARE(rootItem->width(), 200.0); - QCOMPARE(rootItem->height(), 300.0); + QTRY_COMPARE(rootItem->width(), 200.0); + QTRY_COMPARE(rootItem->height(), 300.0); QCOMPARE(viewer->view()->size(), QSize(200, 300)); QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300)); @@ -260,8 +261,8 @@ void tst_QDeclarativeViewer::resizing() viewer->resize(QSize(250,350)); qApp->processEvents(); - QCOMPARE(rootItem->width(), 250.0); - QCOMPARE(rootItem->height(), 350.0-viewer->menuBar()->height()); + QTRY_COMPARE(rootItem->width(), 250.0); + QTRY_COMPARE(rootItem->height(), 350.0-viewer->menuBar()->height()); QCOMPARE(viewer->view()->size(), QSize(250, 350-viewer->menuBar()->height())); QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350-viewer->menuBar()->height())); @@ -271,7 +272,7 @@ void tst_QDeclarativeViewer::resizing() // do not size view to root object rootItem->setWidth(100); rootItem->setHeight(200); - QCOMPARE(viewer->size(), QSize(250, 350)); + QTRY_COMPARE(viewer->size(), QSize(250, 350)); } void tst_QDeclarativeViewer::paths() -- cgit v0.12 From d346ba1ec7a1becd5120fbe181da0374606481c6 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Thu, 10 Jun 2010 10:49:13 +1000 Subject: Add 'on' prefix to documentation of signals --- src/declarative/graphicsitems/qdeclarativetext.cpp | 2 +- src/imports/webkit/qdeclarativewebview.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index f4722c3..3b89ad9 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1171,7 +1171,7 @@ void QDeclarativeText::mousePressEvent(QGraphicsSceneMouseEvent *event) } /*! - \qmlsignal Text::linkActivated(link) + \qmlsignal Text::onLinkActivated(link) This handler is called when the user clicks on a link embedded in the text. */ diff --git a/src/imports/webkit/qdeclarativewebview.cpp b/src/imports/webkit/qdeclarativewebview.cpp index 9e5647f..383f1ce 100644 --- a/src/imports/webkit/qdeclarativewebview.cpp +++ b/src/imports/webkit/qdeclarativewebview.cpp @@ -1163,9 +1163,9 @@ QString QDeclarativeWebPage::chooseFile(QWebFrame *originatingFrame, const QStri } /*! - \qmlsignal WebView::alert(message) + \qmlsignal WebView::onAlert(message) - This signal is emitted when the web engine sends a JavaScript alert. The \a message is the text + This handler is called when the web engine sends a JavaScript alert. The \a message is the text to be displayed in the alert to the user. */ -- cgit v0.12 From 2306073c6806e3e35d0786fec5c49e165b119e36 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Thu, 10 Jun 2010 11:19:48 +1000 Subject: Document attached properties --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 2 +- src/declarative/graphicsitems/qdeclarativepathview.cpp | 7 +++++++ src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 9 ++++++++- src/declarative/util/qdeclarativepackage.cpp | 7 ++++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 0609a48..ed1d271 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1087,7 +1087,7 @@ QDeclarativeGridView::~QDeclarativeGridView() /*! \qmlattachedproperty bool GridView::isCurrentItem - This attched property is true if this delegate is the current item; otherwise false. + This attached property is true if this delegate is the current item; otherwise false. It is attached to each instance of the delegate. */ diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index f58b054..0c2d249 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -358,6 +358,13 @@ QDeclarativePathView::~QDeclarativePathView() } /*! + \qmlattachedproperty PathView PathView::view + This attached property holds the view that manages this delegate instance. + + It is attached to each instance of the delegate. +*/ + +/*! \qmlattachedproperty bool PathView::onPath This attached property holds whether the item is currently on the path. diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index e133adb..410f526 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -119,7 +119,7 @@ public: delegate (items). An item can determine its index within the - model via the \c VisualItemModel.index attached property. + model via the \l{VisualItemModel::index}{index} attached property. The example below places three colored rectangles in a ListView. \code @@ -147,6 +147,13 @@ QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(QObject *parent) { } +/*! + \qmlattachedproperty int VisualItemModel::index + This attached property holds the index of this delegate's item within the model. + + It is attached to each instance of the delegate. +*/ + QDeclarativeListProperty QDeclarativeVisualItemModel::children() { Q_D(QDeclarativeVisualItemModel); diff --git a/src/declarative/util/qdeclarativepackage.cpp b/src/declarative/util/qdeclarativepackage.cpp index 9245fc2..b149120 100644 --- a/src/declarative/util/qdeclarativepackage.cpp +++ b/src/declarative/util/qdeclarativepackage.cpp @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE to be provided to multiple views. Any item within a Package may be assigned a name via the - \e {Package.name} attached property. + \l{Package::name}{Package.name} attached property. The example below creates a Package containing two named items; \e list and \e grid. The third element in the package (the \l Rectangle) is parented to whichever @@ -73,6 +73,11 @@ QT_BEGIN_NAMESPACE \sa {declarative/modelviews/package}{Package example}, QtDeclarative */ +/*! + \qmlattachedproperty bool Package::name + This attached property holds the name of an item within a Package. +*/ + class QDeclarativePackagePrivate : public QObjectPrivate { -- cgit v0.12 From 28b14cbb2003671f6f76b15d069572ef42194e62 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Thu, 10 Jun 2010 11:21:09 +1000 Subject: Remove 'XXX Experimental' from VisualItemModel/VisualDataModel and Package --- src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h | 5 ----- src/declarative/util/qdeclarativepackage_p.h | 6 ------ 2 files changed, 11 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h index 0bdbbcf..079c9e6 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel_p.h @@ -54,11 +54,6 @@ Q_DECLARE_METATYPE(QModelIndex) QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -/***************************************************************************** - ***************************************************************************** - XXX Experimental - ***************************************************************************** -*****************************************************************************/ class QDeclarativeItem; class QDeclarativeComponent; diff --git a/src/declarative/util/qdeclarativepackage_p.h b/src/declarative/util/qdeclarativepackage_p.h index 57d9c22..6b12ef7 100644 --- a/src/declarative/util/qdeclarativepackage_p.h +++ b/src/declarative/util/qdeclarativepackage_p.h @@ -50,12 +50,6 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -/***************************************************************************** - ***************************************************************************** - XXX Experimental - ***************************************************************************** -*****************************************************************************/ - class QDeclarativePackagePrivate; class QDeclarativePackageAttached; class Q_AUTOTEST_EXPORT QDeclarativePackage : public QObject -- cgit v0.12 From 558089fb21e7f388f9810c51abbd9bf3872b2178 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Thu, 10 Jun 2010 13:46:34 +1000 Subject: QMovie cpu usage up to 100% Changed gif default frame rate from 0 to 100ms. This is the same as what web browsers seem to be using. Task-number:QTBUG-2441 Reviewed-by:Dmytro Poplavskiy --- src/plugins/imageformats/gif/qgifhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 25d3dfa..56dac52 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -1026,7 +1026,7 @@ inline QRgb QGIFFormat::color(uchar index) const QGifHandler::QGifHandler() { gifFormat = new QGIFFormat; - nextDelay = 0; + nextDelay = 100; loopCnt = 1; frameNumber = -1; scanIsCached = false; -- cgit v0.12 From 2115bbae2387335f8ea29e0ffee70e00d4a15dc1 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Thu, 10 Jun 2010 14:29:21 +1000 Subject: Add go button to webbrowser example. Task-number: QTBUG-11310 --- demos/declarative/webbrowser/content/Button.qml | 10 ++++++++-- demos/declarative/webbrowser/content/Header.qml | 22 +++++++++++++++++++-- demos/declarative/webbrowser/content/UrlInput.qml | 7 +++++++ .../content/pics/go-jump-locationbar.png | Bin 0 -> 714 bytes demos/declarative/webbrowser/webbrowser.qml | 1 + 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 demos/declarative/webbrowser/content/pics/go-jump-locationbar.png diff --git a/demos/declarative/webbrowser/content/Button.qml b/demos/declarative/webbrowser/content/Button.qml index 4642cc7..2a2e7ef 100644 --- a/demos/declarative/webbrowser/content/Button.qml +++ b/demos/declarative/webbrowser/content/Button.qml @@ -45,15 +45,21 @@ Item { property alias image: icon.source property variant action + signal clicked + width: 40; height: parent.height Image { id: icon; anchors.centerIn: parent - opacity: if(action != undefined) {action.enabled ? 1.0 : 0.4} else 0 + opacity: if (action != undefined) { action.enabled ? 1.0 : 0.4 } else 1 } MouseArea { anchors { fill: parent; topMargin: -10; bottomMargin: -10 } - onClicked: action.trigger() + onClicked: { + if (action != undefined) + action.trigger() + parent.clicked() + } } } diff --git a/demos/declarative/webbrowser/content/Header.qml b/demos/declarative/webbrowser/content/Header.qml index 2c9d0fb..5abf440 100644 --- a/demos/declarative/webbrowser/content/Header.qml +++ b/demos/declarative/webbrowser/content/Header.qml @@ -42,7 +42,10 @@ import Qt 4.7 Image { + id: header + property alias editUrl: urlInput.url + property bool urlChanged: false source: "pics/titlebar-bg.png"; fillMode: Image.TileHorizontally @@ -91,19 +94,34 @@ Image { onUrlEntered: { webBrowser.urlString = url webBrowser.focus = true + header.urlChanged = false } + onUrlChanged: header.urlChanged = true } Button { id: reloadButton anchors { right: parent.right; rightMargin: 4 } - action: webView.reload; image: "pics/view-refresh.png"; visible: webView.progress == 1.0 + action: webView.reload; image: "pics/view-refresh.png" + visible: webView.progress == 1.0 && !header.urlChanged } Button { id: stopButton anchors { right: parent.right; rightMargin: 4 } - action: webView.stop; image: "pics/edit-delete.png"; visible: webView.progress < 1.0 + action: webView.stop; image: "pics/edit-delete.png" + visible: webView.progress < 1.0 && !header.urlChanged + } + + Button { + id: goButton + anchors { right: parent.right; rightMargin: 4 } + onClicked: { + webBrowser.urlString = urlInput.url + webBrowser.focus = true + header.urlChanged = false + } + image: "pics/go-jump-locationbar.png"; visible: header.urlChanged } } } diff --git a/demos/declarative/webbrowser/content/UrlInput.qml b/demos/declarative/webbrowser/content/UrlInput.qml index b57fae6..9992456 100644 --- a/demos/declarative/webbrowser/content/UrlInput.qml +++ b/demos/declarative/webbrowser/content/UrlInput.qml @@ -48,6 +48,7 @@ Item { property alias url: urlText.text signal urlEntered(string url) + signal urlChanged width: parent.height; height: parent.height @@ -69,18 +70,24 @@ Item { id: urlText horizontalAlignment: TextEdit.AlignLeft font.pixelSize: 14; focusOnPress: true + + onTextChanged: container.urlChanged() + Keys.onEscapePressed: { urlText.text = webView.url webView.focus = true } + Keys.onEnterPressed: { container.urlEntered(urlText.text) webView.focus = true } + Keys.onReturnPressed: { container.urlEntered(urlText.text) webView.focus = true } + anchors { left: parent.left; right: parent.right; leftMargin: 18; rightMargin: 18 verticalCenter: parent.verticalCenter diff --git a/demos/declarative/webbrowser/content/pics/go-jump-locationbar.png b/demos/declarative/webbrowser/content/pics/go-jump-locationbar.png new file mode 100644 index 0000000..636fe38 Binary files /dev/null and b/demos/declarative/webbrowser/content/pics/go-jump-locationbar.png differ diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index a923c92..53ba6da 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -55,6 +55,7 @@ Rectangle { FlickableWebView { id: webView url: webBrowser.urlString + onProgressChanged: header.urlChanged = false anchors { top: headerSpace.bottom; left: parent.left; right: parent.right; bottom: parent.bottom } } -- cgit v0.12 From a4df1784086ee086e64b35fc1d2df827704708be Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Thu, 10 Jun 2010 14:36:54 +1000 Subject: Regression Qt4.4: QMovie does not render properly some mng files Task-number:QTBUG-2414 Reviewed-by:Dmytro Poplavskiy --- src/plugins/imageformats/mng/qmnghandler.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/imageformats/mng/qmnghandler.cpp b/src/plugins/imageformats/mng/qmnghandler.cpp index d408e6c..9dbb885 100644 --- a/src/plugins/imageformats/mng/qmnghandler.cpp +++ b/src/plugins/imageformats/mng/qmnghandler.cpp @@ -271,7 +271,6 @@ bool QMngHandlerPrivate::getNextImage(QImage *result) } if ((MNG_NOERROR == ret) || (MNG_NEEDTIMERWAIT == ret)) { *result = image; - image.fill(0); frameIndex = nextIndex++; if (haveReadAll && (frameCount == 0)) frameCount = nextIndex; -- cgit v0.12 From b14860e0f3b9853f96c2042b261f0c1394360ccd Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 10 Jun 2010 15:47:23 +1000 Subject: Update on color change. Task-number: QTBUG-11330 --- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index b877c50..c74e0a2 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -249,7 +249,11 @@ QColor QDeclarativeTextInput::color() const void QDeclarativeTextInput::setColor(const QColor &c) { Q_D(QDeclarativeTextInput); - d->color = c; + if (c != d->color) { + d->color = c; + clearCache(); + update(); + } } -- cgit v0.12 From 7f06f14d01547ca115bc7d06c04bbaf924148910 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 10 Jun 2010 15:47:23 +1000 Subject: Update on color change. Task-number: QTBUG-11330 --- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index c74e0a2..01b1447 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -253,6 +253,7 @@ void QDeclarativeTextInput::setColor(const QColor &c) d->color = c; clearCache(); update(); + emit colorChanged(c); } } -- cgit v0.12 From c6468c19975e2d05b13f3cc60da46929ab44ea8d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 10 Jun 2010 10:10:46 +0200 Subject: actually fix namespaced compile --- src/corelib/global/qendian.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h index d867738..d53504a 100644 --- a/src/corelib/global/qendian.h +++ b/src/corelib/global/qendian.h @@ -45,9 +45,7 @@ #include #ifdef Q_OS_LINUX -QT_BEGIN_INCLUDE_NAMESPACE # include -QT_END_INCLUDE_NAMESPACE #endif #ifdef __GLIBC__ -- cgit v0.12 From 904089839b164dff3eb3230e6345b0a6d456dabf Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 10 Jun 2010 10:15:09 +0200 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( d8a9d09376a47b92ea49f1a078c392cbfdbc0ed6 ) Changes in WebKit/qt since the last update: * https://bugs.webkit.org/show_bug.cgi?id=39958 -- [Qt] TextBreakIterator Qt performance --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 31 +++++++++++ .../platform/text/qt/TextBreakIteratorQt.cpp | 64 ++++++++++++---------- 3 files changed, 68 insertions(+), 29 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 51d663b..b92486d 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - d6d6c3821ed111b214a753f1ce8fa969c1a94dc3 + d8a9d09376a47b92ea49f1a078c392cbfdbc0ed6 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index c3df1bf..bf8b745 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,34 @@ +2010-06-08 Kenneth Rohde Christiansen + + Unreviewed Buildbot fix. + + Reset the Qt TextBreakIterator when reusing it. + + * platform/text/qt/TextBreakIteratorQt.cpp: + (WebCore::setUpIterator): + +2010-06-08 Kenneth Rohde Christiansen + + Reviewed by Antti Koivisto. + + [Qt] TextBreakIterator Qt performance + https://bugs.webkit.org/show_bug.cgi?id=39958 + + Rework TextBreakIteratorQt to be more in line with the ICU version. + + We now reuse iterators where ever possible. The string data is compared + with memcmp, which should be faster than using a hash, as you need + to traverse the full buffer in the case the strings don't match, + where as the compare would fail quickly. + + * platform/text/qt/TextBreakIteratorQt.cpp: + (WebCore::TextBreakIterator::TextBreakIterator): + (WebCore::setUpIterator): + (WebCore::wordBreakIterator): + (WebCore::characterBreakIterator): + (WebCore::lineBreakIterator): + (WebCore::sentenceBreakIterator): + 2010-04-19 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. diff --git a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp index d80e270..0302db8 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp @@ -36,31 +36,49 @@ namespace WebCore { + static unsigned char buffer[1024]; + class TextBreakIterator : public QTextBoundaryFinder { + public: + TextBreakIterator(QTextBoundaryFinder::BoundaryType type, const UChar* string, int length) + : QTextBoundaryFinder(type, (const QChar*)string, length, buffer, sizeof(buffer)) + , length(length) + , string(string) {} + TextBreakIterator() + : QTextBoundaryFinder() + , length(0) + , string(0) {} + + int length; + const UChar* string; }; - static QTextBoundaryFinder* iterator = 0; - static unsigned char buffer[1024]; - TextBreakIterator* wordBreakIterator(const UChar* string, int length) + TextBreakIterator* setUpIterator(TextBreakIterator& iterator, QTextBoundaryFinder::BoundaryType type, const UChar* string, int length) { if (!string) return 0; - if (!iterator) - iterator = new QTextBoundaryFinder; - *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Word, (const QChar *)string, length, buffer, sizeof(buffer)); - return static_cast(iterator); + if (iterator.isValid() && type == iterator.type() && length == iterator.length + && memcmp(string, iterator.string, length) == 0) { + iterator.toStart(); + return &iterator; + } + + iterator = TextBreakIterator(type, string, length); + + return &iterator; } - TextBreakIterator* characterBreakIterator(const UChar* string, int length) + TextBreakIterator* wordBreakIterator(const UChar* string, int length) { - if (!string) - return 0; - if (!iterator) - iterator = new QTextBoundaryFinder; + static TextBreakIterator staticWordBreakIterator; + return setUpIterator(staticWordBreakIterator, QTextBoundaryFinder::Word, string, length); + } - *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Grapheme, (const QChar *)string, length, buffer, sizeof(buffer)); - return static_cast(iterator); + TextBreakIterator* characterBreakIterator(const UChar* string, int length) + { + static TextBreakIterator staticCharacterBreakIterator; + return setUpIterator(staticCharacterBreakIterator, QTextBoundaryFinder::Grapheme, string, length); } TextBreakIterator* cursorMovementIterator(const UChar* string, int length) @@ -70,25 +88,15 @@ namespace WebCore { TextBreakIterator* lineBreakIterator(const UChar* string, int length) { - static QTextBoundaryFinder *iterator = 0; - if (!string) - return 0; - if (!iterator) - iterator = new QTextBoundaryFinder; - - *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Line, (const QChar *)string, length, buffer, sizeof(buffer)); - return static_cast(iterator); + static TextBreakIterator staticLineBreakIterator; + return setUpIterator(staticLineBreakIterator, QTextBoundaryFinder::Line, string, length); } TextBreakIterator* sentenceBreakIterator(const UChar* string, int length) { - if (!string) - return 0; - if (!iterator) - iterator = new QTextBoundaryFinder; + static TextBreakIterator staticSentenceBreakIterator; + return setUpIterator(staticSentenceBreakIterator, QTextBoundaryFinder::Sentence, string, length); - *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Sentence, (const QChar *)string, length, buffer, sizeof(buffer)); - return static_cast(iterator); } int textBreakFirst(TextBreakIterator* bi) -- cgit v0.12 From 3c486f8329ff0284c76e40460613023bf3e2d1fa Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 10 Jun 2010 11:39:31 +0300 Subject: Explicit EXPORTUNFROZEN will prevent default defBlock generation If MMP_RULES contains EXPORTUNFROZEN, no DEFFILE statements should be generated to mmp files. Reviewed-by: Janne Koskinen --- mkspecs/features/symbian/def_files.prf | 3 ++- mkspecs/features/symbian/def_files_disabled.prf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf index 6a95763..1b8e551 100644 --- a/mkspecs/features/symbian/def_files.prf +++ b/mkspecs/features/symbian/def_files.prf @@ -7,7 +7,8 @@ symbian-abld|symbian-sbsv2 { # Firstly, if the MMP_RULES already contain a defBlock variable, don't generate another one # (this bit is slightly magic, because it depends upon everyone creating their DEFFILE statements # in a defBlock variable; but otherwise we have to expand MMP_RULES then scan for the DEFFILE keyword) - !contains(MMP_RULES, defBlock) { + # Similarly, explicit EXPORTUNFROZEN should block adding defBlock + !contains(MMP_RULES, defBlock):!contains(MMP_RULES, EXPORTUNFROZEN) { # Apps are executables on Symbian, so don't have exports, and therefore don't have DEF files # Plugins use standard DEF files, which qmake generates, so shouldn't be using these DEFFILE # statements - they use the qmake generated statements instead diff --git a/mkspecs/features/symbian/def_files_disabled.prf b/mkspecs/features/symbian/def_files_disabled.prf index 557c5e3..0344911 100644 --- a/mkspecs/features/symbian/def_files_disabled.prf +++ b/mkspecs/features/symbian/def_files_disabled.prf @@ -8,6 +8,6 @@ CONFIG -= def_files !contains(TEMPLATE, app):!contains(CONFIG, plugin):!contains(CONFIG, staticlib): { # with EXPORTUNFROZEN enabled, new exports are included in the dll and dso/lib without # needing to run abld/sbs freeze - MMP_RULES += EXPORTUNFROZEN + MMP_RULES *= EXPORTUNFROZEN } } -- cgit v0.12 From 1fc149fdc32e12043c9c2676e2a381e225886dbf Mon Sep 17 00:00:00 2001 From: ck Date: Thu, 10 Jun 2010 12:05:10 +0200 Subject: Demos: Fix compilation with namespace. --- demos/spectrum/app/mainwidget.h | 1 - 1 file changed, 1 deletion(-) diff --git a/demos/spectrum/app/mainwidget.h b/demos/spectrum/app/mainwidget.h index b3dc352..ddab8b7 100644 --- a/demos/spectrum/app/mainwidget.h +++ b/demos/spectrum/app/mainwidget.h @@ -59,7 +59,6 @@ QT_FORWARD_DECLARE_CLASS(QLabel) QT_FORWARD_DECLARE_CLASS(QPushButton) QT_FORWARD_DECLARE_CLASS(QMenu) QT_FORWARD_DECLARE_CLASS(QAction) -QT_END_NAMESPACE /** * Main application widget, responsible for connecting the various UI -- cgit v0.12 From 2bd88e81fc70b694f65efbde2866cc5262f09da2 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 10 Jun 2010 14:13:48 +0300 Subject: QS60Style: QComboBox displays checkboxes for items QComboMenuDelegate claims that all combobox menu items should be checkable even if they aren't. In all the other styles, it has been circumvented in the style code that this particular setting from QComboMenuDelegate is ignored. :) Adding the same workaround to QS60Style as well. Task-number: QTBUG-11322 Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index d28e1d9..4992e34 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1750,6 +1750,12 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, } const bool enabled = optionMenuItem.state & State_Enabled; const bool checkable = optionMenuItem.checkType != QStyleOptionMenuItem::NotCheckable; + bool ignoreCheckMark = false; + +#ifndef QT_NO_COMBOBOX + if (qobject_cast(widget)) + ignoreCheckMark = true; //ignore the checkmarks provided by the QComboMenuDelegate +#endif uint text_flags = Qt::AlignLeading | Qt::TextShowMnemonic | Qt::TextDontClip | Qt::TextSingleLine | Qt::AlignVCenter; @@ -1787,7 +1793,8 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, iconRect.translate(-optionCheckBox.rect.width() - vSpacing, 0); optionCheckBox.rect.translate(textRect.width() + iconRect.width(), 0); } - drawPrimitive(PE_IndicatorMenuCheckMark, &optionCheckBox, painter, widget); + if (!ignoreCheckMark) + drawPrimitive(PE_IndicatorMenuCheckMark, &optionCheckBox, painter, widget); } //draw icon and/or checkState QPixmap pix = menuItem->icon.pixmap(pixelMetric(PM_SmallIconSize), -- cgit v0.12 From 68dafa5c85122148d63e61fb22509996cd6159bc Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 10 Jun 2010 13:27:02 +0200 Subject: Enable runonphone target for libraries as well. RevBy: Miikka Heikkinen --- mkspecs/features/symbian/run_on_phone.prf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf index c4c7baf..8a33dbd 100644 --- a/mkspecs/features/symbian/run_on_phone.prf +++ b/mkspecs/features/symbian/run_on_phone.prf @@ -1,9 +1,10 @@ # make sure we have a sis file and then call 'runonphone' to execute it on the phone -contains(TEMPLATE, app) { +contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) { run_target.target = runonphone run_target.depends = sis - run_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" "$${TARGET}.exe" $(QT_RUN_OPTIONS) + run_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" + contains(TEMPLATE, "app"):run_target.commands += "$${TARGET}.exe" $(QT_RUN_OPTIONS) QMAKE_EXTRA_TARGETS += run_target } -- cgit v0.12 From 69b2e6e861debf71132277b123b59c87bb6e2c9e Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 10 Jun 2010 13:31:40 +0200 Subject: Fixed destdir not being defined. Local variables can't be counted upon between different profiles. RevBy: Trust me --- mkspecs/features/symbian/run_on_phone.prf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf index 8a33dbd..d3d2cfb 100644 --- a/mkspecs/features/symbian/run_on_phone.prf +++ b/mkspecs/features/symbian/run_on_phone.prf @@ -1,6 +1,10 @@ # make sure we have a sis file and then call 'runonphone' to execute it on the phone contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) { + sis_destdir = $$DESTDIR + !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\\\]$"):sis_destdir = $${sis_destdir}/ + contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\") + run_target.target = runonphone run_target.depends = sis run_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" -- cgit v0.12 From 0d5649713af91dcce58a623bbef7d38e2fbdf13b Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 10 Jun 2010 14:35:03 +0200 Subject: use "win32-g++*" scope to match all MinGW makespecs The scope "win32-g++" comes from the name of the makespec. However, it is frequently used to check for MinGW. This works fine as long as win32-g++ is the only makespec for MinGW. Now we need the wildcard to cover "win32-g++-cross" as well. Also reordered test of win32 before win32-g++*. Also took opportunity to use else. Merge-request: 2407 Reviewed-by: Oswald Buddenhagen --- doc/doc.pri | 6 +++--- examples/activeqt/activeqt.pro | 2 +- qmake/qmake.pri | 2 +- src/3rdparty/javascriptcore/WebKit.pri | 2 +- .../webkit/JavaScriptCore/JavaScriptCore.pro | 2 +- src/3rdparty/webkit/WebCore/WebCore.pro | 4 ++-- src/3rdparty/webkit/WebKit.pri | 2 +- src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro | 2 +- src/activeqt/container/container.pro | 2 +- src/activeqt/control/control.pro | 4 ++-- src/gui/painting/painting.pri | 2 +- src/plugins/sqldrivers/psql/psql.pro | 4 ++-- src/sql/drivers/drivers.pri | 20 +++++++++----------- src/winmain/winmain.pro | 2 +- .../auto/qprocess/testProcessEOF/testProcessEOF.pro | 2 +- tests/auto/qsqldriver/qsqldriver.pro | 2 +- .../qsqlrelationaltablemodel.pro | 2 +- .../qtcpserver/crashingServer/crashingServer.pro | 2 +- tools/activeqt/testcon/testcon.pro | 2 +- .../assistant/lib/fulltextsearch/fulltextsearch.pro | 2 +- tools/configure/configure.pro | 2 +- 21 files changed, 34 insertions(+), 36 deletions(-) diff --git a/doc/doc.pri b/doc/doc.pri index 0a5cc9a..f748f3d 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -5,9 +5,9 @@ DOCS_GENERATION_DEFINES = GENERATOR = $$QT_BUILD_TREE/bin/qhelpgenerator -win32:!win32-g++ { +win32:!win32-g++* { unixstyle = false -} else :win32-g++:isEmpty(QMAKE_SH) { +} else :win32-g++*:isEmpty(QMAKE_SH) { unixstyle = false } else { unixstyle = true @@ -41,7 +41,7 @@ QT_JA_JP_DOCUMENTATION = ($$QDOC qt-api-only_ja_JP.qdocconf) && \ $$GENERATOR doc-build/html-qt_ja_JP/qt.qhp -o doc/qch/qt_ja_JP.qch \ ) -win32-g++:isEmpty(QMAKE_SH) { +win32-g++*:isEmpty(QMAKE_SH) { QT_DOCUMENTATION = $$replace(QT_DOCUMENTATION, "/", "\\\\") QT_ZH_CN_DOCUMENTATION = $$replace(QT_ZH_CN_DOCUMENTATION, "/", "\\\\") QT_JA_JP_DOCUMENTATION = $$replace(QT_JA_JP_DOCUMENTATION, "/", "\\\\") diff --git a/examples/activeqt/activeqt.pro b/examples/activeqt/activeqt.pro index 262e1a1..79d257a 100644 --- a/examples/activeqt/activeqt.pro +++ b/examples/activeqt/activeqt.pro @@ -11,7 +11,7 @@ contains(QT_CONFIG, opengl):SUBDIRS += opengl # For now only the contain examples with mingw, for the others you need # an IDL compiler -win32-g++|wince*:SUBDIRS = webbrowser +win32-g++*|wince*:SUBDIRS = webbrowser # install target.path = $$[QT_INSTALL_EXAMPLES]/activeqt diff --git a/qmake/qmake.pri b/qmake/qmake.pri index 6e0f8a2..a7e0ab1 100644 --- a/qmake/qmake.pri +++ b/qmake/qmake.pri @@ -134,7 +134,7 @@ bootstrap { #Qt code } else:win32 { SOURCES += qfsfileengine_win.cpp qfsfileengine_iterator_win.cpp qsettings_win.cpp win32-msvc*:LIBS += ole32.lib advapi32.lib - win32-g++:LIBS += -lole32 -luuid + win32-g++*:LIBS += -lole32 -luuid } qnx { diff --git a/src/3rdparty/javascriptcore/WebKit.pri b/src/3rdparty/javascriptcore/WebKit.pri index 0dd0799..9aaaa99 100644 --- a/src/3rdparty/javascriptcore/WebKit.pri +++ b/src/3rdparty/javascriptcore/WebKit.pri @@ -36,7 +36,7 @@ building-libs { win32-*|wince* { CONFIG(debug, debug|release):build_pass: QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}$${QT_MAJOR_VERSION} - win32-g++: LIBS += -l$$QTWEBKITLIBNAME + win32-g++*: LIBS += -l$$QTWEBKITLIBNAME else: LIBS += $${QTWEBKITLIBNAME}.lib } else { LIBS += -lQtWebKit diff --git a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro index 22fcc91..3f1ac86 100644 --- a/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro +++ b/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro @@ -43,7 +43,7 @@ CONFIG(QTDIR_build) { } # Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC -win32-g++ { +win32-g++* { TMPPATH = $$quote($$(INCLUDE)) QMAKE_INCDIR_POST += $$split(TMPPATH,";") TMPPATH = $$quote($$(LIB)) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 048fc93..92082b5 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -103,7 +103,7 @@ win32-msvc2005|win32-msvc2008:{ } # Pick up 3rdparty libraries from INCLUDE/LIB just like with MSVC -win32-g++ { +win32-g++* { TMPPATH = $$quote($$(INCLUDE)) QMAKE_INCDIR_POST += $$split(TMPPATH,";") TMPPATH = $$quote($$(LIB)) @@ -2935,7 +2935,7 @@ CONFIG(QTDIR_build) { CONFIG += no_debug_info } -!win32-g++:win32:contains(QMAKE_HOST.arch, x86_64):{ +win32:!win32-g++*:contains(QMAKE_HOST.arch, x86_64):{ asm_compiler.commands = ml64 /c asm_compiler.commands += /Fo ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} asm_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} diff --git a/src/3rdparty/webkit/WebKit.pri b/src/3rdparty/webkit/WebKit.pri index 921a6e0..fcd2891 100644 --- a/src/3rdparty/webkit/WebKit.pri +++ b/src/3rdparty/webkit/WebKit.pri @@ -24,7 +24,7 @@ building-libs { win32-*|wince* { !CONFIG(release, debug|release):build_pass: QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}d QTWEBKITLIBNAME = $${QTWEBKITLIBNAME}$${QT_MAJOR_VERSION} - win32-g++: LIBS += -l$$QTWEBKITLIBNAME + win32-g++*: LIBS += -l$$QTWEBKITLIBNAME else: LIBS += $${QTWEBKITLIBNAME}.lib } else { LIBS += -lQtWebKit diff --git a/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro index 22d4c8d..62546f6 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro +++ b/src/3rdparty/webkit/WebKit/qt/Api/DerivedSources.pro @@ -12,7 +12,7 @@ DOUBLE_ESCAPED_QUOTE = "" ESCAPE = "" win32-msvc*|symbian { ESCAPE = "^" -} else:win32-g++:isEmpty(QMAKE_SH) { +} else:win32-g++*:isEmpty(QMAKE_SH) { # MinGW's make will run makefile commands using sh, even if make # was run from the Windows shell, if it finds sh in the path. ESCAPE = "^" diff --git a/src/activeqt/container/container.pro b/src/activeqt/container/container.pro index d654f92..4c9b3a8 100644 --- a/src/activeqt/container/container.pro +++ b/src/activeqt/container/container.pro @@ -19,7 +19,7 @@ QTDIR_build:DESTDIR = $$QT_BUILD_TREE/lib LIBS += -lole32 -loleaut32 !wince*:LIBS += -luser32 -lgdi32 -ladvapi32 -win32-g++:LIBS += -luuid +win32-g++*:LIBS += -luuid HEADERS = ../control/qaxaggregated.h \ qaxbase.h \ diff --git a/src/activeqt/control/control.pro b/src/activeqt/control/control.pro index 44eb928..361ca29 100644 --- a/src/activeqt/control/control.pro +++ b/src/activeqt/control/control.pro @@ -18,11 +18,11 @@ CONFIG += qt warn_off staticlib QTDIR_build:DESTDIR = $$QT_BUILD_TREE\\lib DEFINES += QAX_SERVER -win32-g++:DEFINES += QT_NEEDS_QMAIN +win32-g++*:DEFINES += QT_NEEDS_QMAIN win32-borland:DEFINES += QT_NEEDS_QMAIN LIBS += -luser32 -lole32 -loleaut32 -lgdi32 -win32-g++:LIBS += -luuid +win32-g++*:LIBS += -luuid HEADERS = qaxaggregated.h \ qaxbindable.h \ diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index 123af1c..c3b0e3e 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -234,7 +234,7 @@ contains(QMAKE_MAC_XARCH, no) { IWMMXT_SOURCES += painting/qdrawhelper_iwmmxt.cpp } - win32-g++|!win32:!*-icc* { + win32-g++*|!win32:!*-icc* { mmx { mmx_compiler.commands = $$QMAKE_CXX -c -Winline diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro index 0a38ee4..80a5348 100644 --- a/src/plugins/sqldrivers/psql/psql.pro +++ b/src/plugins/sqldrivers/psql/psql.pro @@ -4,7 +4,7 @@ HEADERS = ../../../sql/drivers/psql/qsql_psql.h SOURCES = main.cpp \ ../../../sql/drivers/psql/qsql_psql.cpp -unix|win32-g++: { +unix|win32-g++*: { !isEmpty(QT_LFLAGS_PSQL) { !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz !static:LIBS *= $$QT_LFLAGS_PSQL @@ -13,6 +13,6 @@ unix|win32-g++: { !contains(LIBS, .*pq.*):LIBS *= -lpq } -win32:!win32-g++:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32 +win32:!win32-g++*:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32 include(../qsqldriverbase.pri) diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri index 8dfc50f..05e7265 100644 --- a/src/sql/drivers/drivers.pri +++ b/src/sql/drivers/drivers.pri @@ -6,16 +6,14 @@ contains(sql-drivers, psql) { HEADERS += drivers/psql/qsql_psql.h SOURCES += drivers/psql/qsql_psql.cpp - unix|win32-g++ { + unix|win32-g++* { !static:!isEmpty(QT_LFLAGS_PSQL) { !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz !static:LIBS *= $$QT_LFLAGS_PSQL QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL } !contains(LIBS, .*pq.*):LIBS *= -lpq - } - - win32:!win32-g++:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32 + } else:win32:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32 } contains(sql-drivers, mysql) { @@ -35,8 +33,8 @@ contains(sql-drivers, mysql) { } win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) { - !win32-g++:LIBS *= -llibmysql - win32-g++:LIBS *= -lmysql + !win32-g++*:LIBS *= -llibmysql + else:LIBS *= -lmysql } } @@ -49,8 +47,8 @@ contains(sql-drivers, odbc) { unix:DEFINES += UNICODE win32 { - !win32-borland:LIBS *= -lodbc32 - win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib + !win32-borland:LIBS *= -lodbc32 + else:LIBS *= $(BCB)/lib/PSDK/odbc32.lib } } @@ -71,7 +69,7 @@ contains(sql-drivers, tds) { win32 { !win32-borland:LIBS += -lNTWDBLIB - win32-borland:LIBS += $(BCB)/lib/PSDK/NTWDBLIB.LIB + else:LIBS += $(BCB)/lib/PSDK/NTWDBLIB.LIB } } @@ -83,7 +81,7 @@ contains(sql-drivers, db2) { win32 { !win32-borland:LIBS += -ldb2cli -# win32-borland:LIBS += $(BCB)/lib/PSDK/db2cli.lib +# else:LIBS += $(BCB)/lib/PSDK/db2cli.lib } } @@ -95,7 +93,7 @@ contains(sql-drivers, ibase) { win32 { !win32-borland:LIBS *= -lgds32_ms - win32-borland:LIBS += gds32.lib + else:LIBS += gds32.lib } } diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro index bc322b9..efee3cd 100644 --- a/src/winmain/winmain.pro +++ b/src/winmain/winmain.pro @@ -8,7 +8,7 @@ CONFIG += staticlib warn_on CONFIG -= qt shared win32 { - win32-g++:DEFINES += QT_NEEDS_QMAIN + win32-g++*:DEFINES += QT_NEEDS_QMAIN win32-borland:DEFINES += QT_NEEDS_QMAIN SOURCES = qtmain_win.cpp CONFIG += png zlib diff --git a/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro b/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro index f406759..756bd23 100644 --- a/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro +++ b/tests/auto/qprocess/testProcessEOF/testProcessEOF.pro @@ -2,7 +2,7 @@ SOURCES = main.cpp CONFIG -= qt app_bundle CONFIG += console -!win32-g++:win32:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS- +win32:!win32-g++*:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS- DESTDIR = ./ diff --git a/tests/auto/qsqldriver/qsqldriver.pro b/tests/auto/qsqldriver/qsqldriver.pro index d04ca83..2e9ed67 100644 --- a/tests/auto/qsqldriver/qsqldriver.pro +++ b/tests/auto/qsqldriver/qsqldriver.pro @@ -9,7 +9,7 @@ wince*: { DEPLOYMENT += plugFiles LIBS += -lws2 } else { - win32-g++ { + win32-g++* { LIBS += -lws2_32 } else:win32 { LIBS += ws2_32.lib diff --git a/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro b/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro index ee4f2f0..c6681d5 100644 --- a/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro +++ b/tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro @@ -17,7 +17,7 @@ wince*: { } } } else { - win32-g++ { + win32-g++* { LIBS += -lws2_32 } else:win32 { LIBS += ws2_32.lib diff --git a/tests/auto/qtcpserver/crashingServer/crashingServer.pro b/tests/auto/qtcpserver/crashingServer/crashingServer.pro index 70e42b4..0bea655 100644 --- a/tests/auto/qtcpserver/crashingServer/crashingServer.pro +++ b/tests/auto/qtcpserver/crashingServer/crashingServer.pro @@ -5,4 +5,4 @@ DESTDIR = ./ # This means the auto test works on some machines for MinGW. No dialog stalls # the application. -win32-g++:CONFIG += console +win32-g++*:CONFIG += console diff --git a/tools/activeqt/testcon/testcon.pro b/tools/activeqt/testcon/testcon.pro index dc98218..89f8067 100644 --- a/tools/activeqt/testcon/testcon.pro +++ b/tools/activeqt/testcon/testcon.pro @@ -16,6 +16,6 @@ RC_FILE = testcon.rc win32-borland { QMAKE_POST_LINK = -midl $$QT_SOURCE_TREE/tools/activeqt/testcon/testcon.idl } else { - !win32-g++:QMAKE_POST_LINK = midl $$QT_SOURCE_TREE/tools/activeqt/testcon/testcon.idl && move testcon.tlb $(TARGETDIR) + !win32-g++*:QMAKE_POST_LINK = midl $$QT_SOURCE_TREE/tools/activeqt/testcon/testcon.idl && move testcon.tlb $(TARGETDIR) } diff --git a/tools/assistant/lib/fulltextsearch/fulltextsearch.pro b/tools/assistant/lib/fulltextsearch/fulltextsearch.pro index fb1a0dd..4d2fddb 100644 --- a/tools/assistant/lib/fulltextsearch/fulltextsearch.pro +++ b/tools/assistant/lib/fulltextsearch/fulltextsearch.pro @@ -29,7 +29,7 @@ unix:QMAKE_PKGCONFIG_REQUIRES = QtCore CONFIG(exceptions_off) { CONFIG -= exceptions_off CONFIG += exceptions - !win32|win32-g++ { + !win32|win32-g++* { QMAKE_CFLAGS -= -fno-exceptions QMAKE_CXXFLAGS -= -fno-exceptions QMAKE_LFLAGS -= -fno-exceptions diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro index d926a76..64a6d9a 100644 --- a/tools/configure/configure.pro +++ b/tools/configure/configure.pro @@ -8,7 +8,7 @@ DEFINES += QT_BOOTSTRAPPED win32 : LIBS += -lole32 -ladvapi32 win32-msvc.net | win32-msvc2* : QMAKE_CXXFLAGS += /EHsc -win32-g++ : LIBS += -luuid +win32-g++* : LIBS += -luuid win32-msvc* { QMAKE_CFLAGS_RELEASE -= -MD -- cgit v0.12 From b65a1e0be447abca16f20001efe1be43a0469808 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 10 Jun 2010 14:35:05 +0200 Subject: support for cross building Qt for MinGW (win32-g++) on Unix This changeset provides the basis for targetting win32-g++ on Unix using the configure shell script: support added to the configure script itself support added to relevant config.tests support added to mingw makefile generator in qmake new makespec: unsupported/win32-g++-cross The makespec is based on the win32-g++ makespec. Merge-request: 2407 Reviewed-by: Oswald Buddenhagen --- config.tests/unix/compile.test | 6 +- config.tests/unix/getaddrinfo/getaddrinfotest.cpp | 7 ++ config.tests/unix/iconv/iconv.pro | 2 +- config.tests/unix/ipv6/ipv6test.cpp | 5 + config.tests/unix/odbc/odbc.cpp | 3 + config.tests/unix/odbc/odbc.pro | 3 +- config.tests/x11/opengl/opengl.pro | 3 +- configure | 70 +++++++++++--- mkspecs/unsupported/win32-g++-cross/qmake.conf | 101 +++++++++++++++++++++ .../unsupported/win32-g++-cross/qplatformdefs.h | 42 +++++++++ qmake/generators/metamakefile.cpp | 11 ++- qmake/generators/win32/mingw_make.cpp | 7 +- 12 files changed, 241 insertions(+), 19 deletions(-) create mode 100644 mkspecs/unsupported/win32-g++-cross/qmake.conf create mode 100644 mkspecs/unsupported/win32-g++-cross/qplatformdefs.h diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test index 67a4636..99ebfd2 100755 --- a/config.tests/unix/compile.test +++ b/config.tests/unix/compile.test @@ -65,8 +65,10 @@ test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST" cd "$OUTDIR/$TEST" test -r Makefile && $MAKE distclean >/dev/null 2>&1 +# Make sure output from possible previous tests is gone +rm -f "$EXE" "${EXE}.exe" -"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" +"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" if [ "$VERBOSE" = "yes" ]; then $MAKE @@ -74,7 +76,7 @@ else $MAKE >/dev/null 2>&1 fi -[ -x "$EXE" ] && SUCCESS=yes +( [ -x "$EXE" ] || [ -x "${EXE}.exe" ] ) && SUCCESS=yes # done if [ "$SUCCESS" != "yes" ]; then diff --git a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp index 0c482cc..df6ae10 100644 --- a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp +++ b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp @@ -42,9 +42,16 @@ /* Sample program for configure to test for getaddrinfo on the unix platform. we check for all structures and functions required. */ +#include +#include +#ifdef __MINGW32__ +#include +#include +#else #include #include #include +#endif int main() { diff --git a/config.tests/unix/iconv/iconv.pro b/config.tests/unix/iconv/iconv.pro index 8cdc776..d642da2 100644 --- a/config.tests/unix/iconv/iconv.pro +++ b/config.tests/unix/iconv/iconv.pro @@ -1,3 +1,3 @@ SOURCES = iconv.cpp CONFIG -= qt dylib app_bundle -mac:LIBS += -liconv +mac|win32-g++*:LIBS += -liconv diff --git a/config.tests/unix/ipv6/ipv6test.cpp b/config.tests/unix/ipv6/ipv6test.cpp index 4fb27f2..4243f2d 100644 --- a/config.tests/unix/ipv6/ipv6test.cpp +++ b/config.tests/unix/ipv6/ipv6test.cpp @@ -46,9 +46,14 @@ platforms. We check for the required IPv6 data structures. */ #define _HPUX_SOURCE #endif +#ifdef __MINGW32__ +#include +#include +#else #include #include #include +#endif int main() { diff --git a/config.tests/unix/odbc/odbc.cpp b/config.tests/unix/odbc/odbc.cpp index 32602c0..98f3571 100644 --- a/config.tests/unix/odbc/odbc.cpp +++ b/config.tests/unix/odbc/odbc.cpp @@ -39,6 +39,9 @@ ** ****************************************************************************/ +#ifdef __MINGW32__ +#include +#endif #include #include diff --git a/config.tests/unix/odbc/odbc.pro b/config.tests/unix/odbc/odbc.pro index c588ede..06a548f 100644 --- a/config.tests/unix/odbc/odbc.pro +++ b/config.tests/unix/odbc/odbc.pro @@ -1,4 +1,5 @@ SOURCES = odbc.cpp CONFIG -= qt dylib mac:CONFIG -= app_bundle -LIBS += -lodbc +win32-g++*:LIBS += -lodbc32 +else:LIBS += -lodbc diff --git a/config.tests/x11/opengl/opengl.pro b/config.tests/x11/opengl/opengl.pro index 432bd8d..5fd41d3 100644 --- a/config.tests/x11/opengl/opengl.pro +++ b/config.tests/x11/opengl/opengl.pro @@ -7,4 +7,5 @@ for(p, QMAKE_LIBDIR_OPENGL) { } CONFIG -= qt -LIBS += -lGL -lGLU +win32-g++*:LIBS += -lopengl32 +else:LIBS += -lGL -lGLU diff --git a/configure b/configure index 663faf9..5ba0e57 100755 --- a/configure +++ b/configure @@ -779,6 +779,7 @@ RPATH_FLAGS= l_FLAGS= QCONFIG_FLAGS= XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++" or "symbian/linux-gcce" +XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*) PLATFORM=$QMAKESPEC QT_CROSS_COMPILE=no OPT_CONFIRM_LICENSE=no @@ -1326,7 +1327,9 @@ while [ "$#" -gt 0 ]; do fi ;; arch) - if [ "$PLATFORM_MAC" = "yes" ]; then + # if this is a Mac then "windows" probably means + # we are cross-compiling for MinGW + if [ "$PLATFORM_MAC" = "yes" ] && [ "$VAL" != "windows" ]; then CFG_MAC_ARCHS="$CFG_MAC_ARCHS $VAL" else CFG_ARCH=$VAL @@ -1444,6 +1447,7 @@ while [ "$#" -gt 0 ]; do ;; xplatform) XPLATFORM="$VAL" + case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac ;; debug-and-release) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then @@ -2578,9 +2582,13 @@ if [ -z "$PLATFORM" ]; then " ;; SunOS:5*) - #PLATFORM=solaris-g++ - PLATFORM=solaris-cc - #PLATFORM=solaris-cc64 + if [ "$XPLATFORM_MINGW" = "yes" ]; then + PLATFORM="solaris-g++" + else + #PLATFORM=solaris-g++ + PLATFORM=solaris-cc + #PLATFORM=solaris-cc64 + fi PLATFORM_NOTES=" - Also available for Solaris: solaris-g++ solaris-cc-64 " @@ -2650,6 +2658,9 @@ else fi [ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM" + +case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac + if [ -d "$PLATFORM" ]; then QMAKESPEC="$PLATFORM" else @@ -2922,6 +2933,8 @@ if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then CFG_ARCH="$CFG_EMBEDDED" ;; esac +elif [ "$XPLATFORM_MINGW" = "yes" ]; then + [ -z "$CFG_ARCH" ] && CFG_ARCH="windows" elif [ "$PLATFORM_MAC" = "yes" ] || [ -z "$CFG_ARCH" ]; then CFG_ARCH=$CFG_HOST_ARCH fi @@ -4087,6 +4100,8 @@ elif [ "$PLATFORM_MAC" = "yes" ]; then Platform="Qt for Mac OS X" elif echo "$XPLATFORM" | grep "symbian" > /dev/null ; then Platform="Qt for Symbian" +elif [ "$XPLATFORM_MINGW" = "yes" ]; then + Platform="Qt for Windows" elif [ '!' -z "`getQMakeConf \"$XQMAKESPEC\" | grep QMAKE_LIBS_X11 | awk '{print $3;}'`" ]; then PLATFORM_X11=yes Platform="Qt for Linux/X11" @@ -4698,6 +4713,8 @@ if [ "$CFG_ZLIB" = "auto" ]; then fi fi +[ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista" + case "$XPLATFORM" in *symbian*) QMakeVar set styles "windows s60" #overwrite previous default CFG_LIBFREETYPE=no @@ -4897,7 +4914,8 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; psql) if [ "$CFG_SQL_psql" != "no" ]; then - if "$WHICH" pg_config >/dev/null 2>&1; then + # Be careful not to use native pg_config when cross building. + if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null` QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null` fi @@ -4924,7 +4942,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; odbc) if [ "$CFG_SQL_odbc" != "no" ]; then - if [ "$PLATFORM_MAC" != "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if ( [ "$PLATFORM_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then if [ "$CFG_SQL_odbc" = "auto" ]; then CFG_SQL_odbc=plugin fi @@ -5190,6 +5208,7 @@ if [ "$PLATFORM_MAC" = "yes" -a ! -z "$QT_NAMESPACE" ]; then QT_NAMESPACE_MAC_CRC=`"$mactests/crc.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/crc $QT_NAMESPACE $L_FLAGS $I_FLAGS $l_FLAGS` fi +# X11/QWS if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then # auto-detect Glib support @@ -5375,7 +5394,10 @@ if [ "$PLATFORM_X11" = "yes" ]; then echo " QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in ${XQMAKESPEC}." exit 1 fi +fi +# X11/MINGW OpenGL +if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x) if [ "$CFG_GUI" = "no" ]; then if [ "$CFG_OPENGL" = "auto" ]; then @@ -5471,7 +5493,10 @@ if [ "$PLATFORM_X11" = "yes" ]; then echo "OpenGL Graphics System is disabled due to missing OpenGL support..." CFG_GRAPHICS_SYSTEM=default fi +fi # X11/MINGW OpenGL +# X11 +if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect Xcursor support if [ "$CFG_XCURSOR" != "no" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xcursor "Xcursor" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then @@ -5917,9 +5942,12 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then fi fi +[ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_PHONON" != "no" ] && CFG_PHONON="yes" + # freetype support [ "x$CFG_EMBEDDED" != "xno" ] && CFG_LIBFREETYPE="$CFG_QWS_FREETYPE" [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no +[ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no if [ "$CFG_LIBFREETYPE" = "auto" ]; then if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then CFG_LIBFREETYPE=system @@ -5929,7 +5957,9 @@ if [ "$CFG_LIBFREETYPE" = "auto" ]; then fi if [ "$CFG_ENDIAN" = "auto" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then + if [ "$XPLATFORM_MINGW" = "yes" ]; then + CFG_ENDIAN="Q_LITTLE_ENDIAN" + elif [ "$PLATFORM_MAC" = "yes" ]; then true #leave as auto elif [ "$XPLATFORM" = "symbian-sbsv2" ]; then CFG_ENDIAN="Q_LITTLE_ENDIAN" @@ -6255,6 +6285,11 @@ if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then fi fi +if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then + echo "Warning: largefile support cannot be disabled for win32." + CFG_LARGEFILE="yes" +fi + #------------------------------------------------------------------------------- # ask for all that hasn't been auto-detected or specified in the arguments #------------------------------------------------------------------------------- @@ -6357,6 +6392,9 @@ if [ "$PLATFORM_MAC" = "yes" ]; then fi fi +# but disable Cocoa if cross-building for mingw +[ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no" + # set the global Mac deployment target. This is overridden on an arch-by-arch basis # in some cases, see code further down case "$PLATFORM,$CFG_MAC_COCOA" in @@ -6495,7 +6533,7 @@ QMakeVar set OBJECTS_DIR ".obj/$QMAKE_OUTDIR" QMakeVar set MOC_DIR ".moc/$QMAKE_OUTDIR" QMakeVar set RCC_DIR ".rcc/$QMAKE_OUTDIR" QMakeVar set UI_DIR ".uic/$QMAKE_OUTDIR" -if [ "$CFG_LARGEFILE" = "yes" ]; then +if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then QMAKE_CONFIG="$QMAKE_CONFIG largefile" fi if [ "$CFG_STL" = "no" ]; then @@ -6611,7 +6649,7 @@ else fi -if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM" != "win32-g++" ]; then +if [ "x$PLATFORM_MAC" = "xyes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then #On Mac we implicitly link against libz, so we #never use the 3rdparty stuff. [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system" @@ -6750,6 +6788,12 @@ if [ "$CFG_EXCEPTIONS" != "no" ]; then QTCONFIG_CONFIG="$QTCONFIG_CONFIG exceptions" fi +if [ "$XPLATFORM_MINGW" = "yes" ]; then + # mkspecs/features/win32/default_pre.prf sets "no-rtti". + # Follow default behavior of configure.exe by overriding with "rtti". + QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti" +fi + if [ "$CFG_ALSA" = "yes" ]; then QT_CONFIG="$QT_CONFIG alsa" fi @@ -7343,7 +7387,7 @@ EOF echo '/* Compile time features */' >>"$outpath/src/corelib/global/qconfig.h.new" [ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\"" >>"$outpath/src/corelib/global/qconfig.h.new" -if [ "$CFG_LARGEFILE" = "yes" ]; then +if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then echo "#define QT_LARGEFILE_SUPPORT 64" >>"$outpath/src/corelib/global/qconfig.h.new" fi @@ -7688,7 +7732,7 @@ QMAKE_LIBDIR_QT = \$\$QT_BUILD_TREE/lib EOF # Ensure we can link to uninistalled libraries -if linkerSupportsFlag -rpath-link "$outpath/lib"; then +if [ "$XPLATFORM_MINGW" != "yes" ] && linkerSupportsFlag -rpath-link "$outpath/lib"; then echo "QMAKE_LFLAGS += -Wl,-rpath-link,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp" fi @@ -8226,7 +8270,9 @@ for file in .projects .projects.3; do [ "$IN_ROOT" = "no" ] && continue case $a in - *winmain/winmain.pro) continue ;; + *winmain/winmain.pro) + [ "$XPLATFORM_MINGW" = "yes" ] || continue + SPEC=$XQMAKESPEC ;; *s60main/s60main.pro) continue ;; *examples/activeqt/*) continue ;; */qmake/qmake.pro) continue ;; diff --git a/mkspecs/unsupported/win32-g++-cross/qmake.conf b/mkspecs/unsupported/win32-g++-cross/qmake.conf new file mode 100644 index 0000000..e338a22 --- /dev/null +++ b/mkspecs/unsupported/win32-g++-cross/qmake.conf @@ -0,0 +1,101 @@ +# +# qmake configuration for win32-g++-cross +# +# Written for MinGW cross building on Unix +# + +MAKEFILE_GENERATOR = MINGW +TEMPLATE = app +CONFIG += qt warn_on release link_prl copy_dir_files debug_and_release debug_and_release_target precompile_header +QT += core gui +DEFINES += UNICODE QT_LARGEFILE_SUPPORT +QMAKE_COMPILER_DEFINES += __GNUC__ WIN32 + +QMAKE_EXT_OBJ = .o +QMAKE_EXT_RES = _res.o + +QMAKE_CC = i686-pc-mingw32-gcc +QMAKE_LEX = flex +QMAKE_LEXFLAGS = +QMAKE_YACC = byacc +QMAKE_YACCFLAGS = -d +QMAKE_CFLAGS = -pipe +QMAKE_CFLAGS_DEPS = -M +QMAKE_CFLAGS_WARN_ON = -Wall +QMAKE_CFLAGS_WARN_OFF = -w +QMAKE_CFLAGS_RELEASE = -O2 +QMAKE_CFLAGS_DEBUG = -g +QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses + +QMAKE_CXX = i686-pc-mingw32-g++ +QMAKE_CXXFLAGS = $$QMAKE_CFLAGS +QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS +QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON +QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG +QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC +QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD +QMAKE_CXXFLAGS_RTTI_ON = -frtti +QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti +QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads +QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions + +QMAKE_INCDIR = +QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] +QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] + +QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src +QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< +QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src +QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +QMAKE_LINK = i686-pc-mingw32-g++ +QMAKE_LINK_C = i686-pc-mingw32-gcc +QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc +QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl +QMAKE_LFLAGS_EXCEPTIONS_OFF = +QMAKE_LFLAGS_RELEASE = -Wl,-s +QMAKE_LFLAGS_DEBUG = +QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console +QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows +QMAKE_LFLAGS_DLL = -shared +QMAKE_LINK_OBJECT_MAX = 10 +QMAKE_LINK_OBJECT_SCRIPT= object_script + + +QMAKE_LIBS = +QMAKE_LIBS_CORE = -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 +QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lws2_32 -lole32 -luuid -luser32 -ladvapi32 +QMAKE_LIBS_NETWORK = -lws2_32 +QMAKE_LIBS_OPENGL = -lopengl32 -lglu32 -lgdi32 -luser32 +QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32 +QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain + +QMAKE_SH = bash + +MINGW_IN_SHELL = 1 +QMAKE_DIR_SEP = / +QMAKE_COPY = cp +QMAKE_COPY_DIR = cp -r +QMAKE_MOVE = mv +QMAKE_DEL_FILE = rm -f +QMAKE_MKDIR = mkdir -p +QMAKE_DEL_DIR = rmdir +QMAKE_SYMBOLIC_LINK = ln -s +QMAKE_CHK_DIR_EXISTS = test -d + +#QMAKE_IDC = i686-pc-mingw32-idc +QMAKE_MOC = i686-pc-mingw32-moc +QMAKE_RCC = i686-pc-mingw32-rcc +QMAKE_UIC = i686-pc-mingw32-uic + +#QMAKE_IDL = midl +QMAKE_LIB = i686-pc-mingw32-ar -ru +QMAKE_RC = i686-pc-mingw32-windres +QMAKE_ZIP = zip -r -9 + +QMAKE_STRIP = i686-pc-mingw32-strip +QMAKE_STRIPFLAGS_LIB += --strip-unneeded +PKG_CONFIG = i686-pc-mingw32-pkg-config +load(qt_config) diff --git a/mkspecs/unsupported/win32-g++-cross/qplatformdefs.h b/mkspecs/unsupported/win32-g++-cross/qplatformdefs.h new file mode 100644 index 0000000..309e24a --- /dev/null +++ b/mkspecs/unsupported/win32-g++-cross/qplatformdefs.h @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the qmake spec of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "../../win32-g++/qplatformdefs.h" diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp index ad8750b..e98831d 100644 --- a/qmake/generators/metamakefile.cpp +++ b/qmake/generators/metamakefile.cpp @@ -529,9 +529,18 @@ MetaMakefileGenerator::modesForGenerator(const QString &gen, *host_mode = Option::HOST_UNIX_MODE; *target_mode = Option::TARG_UNIX_MODE; #endif - } else if (gen == "MSVC.NET" || gen == "MINGW" || gen == "BMAKE" || gen == "MSBUILD") { + } else if (gen == "MSVC.NET" || gen == "BMAKE" || gen == "MSBUILD") { *host_mode = Option::HOST_WIN_MODE; *target_mode = Option::TARG_WIN_MODE; + } else if (gen == "MINGW") { +#if defined(Q_OS_MAC) + *host_mode = Option::HOST_MACX_MODE; +#elif defined(Q_OS_UNIX) + *host_mode = Option::HOST_UNIX_MODE; +#else + *host_mode = Option::HOST_WIN_MODE; +#endif + *target_mode = Option::TARG_WIN_MODE; } else if (gen == "PROJECTBUILDER" || gen == "XCODE") { *host_mode = Option::HOST_MACX_MODE; *target_mode = Option::TARG_MACX_MODE; diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 0936d15..5685d6b 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -371,7 +371,12 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t) ar_script_file += "." + var("BUILD_NAME"); } createArObjectScriptFile(ar_script_file, var("DEST_TARGET"), project->values("OBJECTS")); - objectsLinkLine = "ar -M < " + ar_script_file; + // QMAKE_LIB is used for win32, including mingw, whereas QMAKE_AR is used on Unix. + // Strip off any options since the ar commands will be read from file. + QString ar_cmd = var("QMAKE_LIB").section(" ", 0, 0);; + if (ar_cmd.isEmpty()) + ar_cmd = "ar"; + objectsLinkLine = ar_cmd + " -M < " + ar_script_file; } else { QString ld_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET"); if (!var("BUILD_NAME").isEmpty()) { -- cgit v0.12 From ec3bc9bbba71438374148118e539e75ee119a65f Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 10 Jun 2010 14:58:16 +0200 Subject: make postgresql support sensitive to PSQL_LIBS The PSQL_LIBS environment variable is a standard way to pass the required library list. The changes here add support for this to the configures. Merge-request: 673 Reviewed-by: Oswald Buddenhagen --- config.tests/unix/psql/psql.pro | 2 +- configure | 2 ++ tools/configure/configureapp.cpp | 4 ++++ tools/configure/configureapp.h | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config.tests/unix/psql/psql.pro b/config.tests/unix/psql/psql.pro index 64bb3d6..38bfb3e 100644 --- a/config.tests/unix/psql/psql.pro +++ b/config.tests/unix/psql/psql.pro @@ -1,4 +1,4 @@ SOURCES = psql.cpp CONFIG -= qt dylib mac:CONFIG -= app_bundle -LIBS += -lpq +LIBS *= -lpq diff --git a/configure b/configure index 5ba0e57..f61ac6c 100755 --- a/configure +++ b/configure @@ -4921,6 +4921,8 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do fi [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL" [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL" + # But, respect PSQL_LIBS if set + [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS" if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then if [ "$CFG_SQL_psql" = "auto" ]; then CFG_SQL_psql=plugin diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index a5f9f2c..2e2d8ba 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1035,6 +1035,8 @@ void Configure::parseCmdLine() qmakeLibs += QString("-l" + configCmdLine.at(i)); } else if (configCmdLine.at(i).startsWith("OPENSSL_LIBS=")) { opensslLibs = configCmdLine.at(i); + } else if (configCmdLine.at(i).startsWith("PSQL_LIBS=")) { + psqlLibs = configCmdLine.at(i); } else if( ( configCmdLine.at(i) == "-override-version" ) || ( configCmdLine.at(i) == "-version-override" ) ){ @@ -2747,6 +2749,8 @@ void Configure::generateOutputVars() else qmakeVars += QString("OPENSSL_LIBS = -lssleay32 -llibeay32"); } + if (!psqlLibs.isEmpty()) + qmakeVars += QString("QT_LFLAGS_PSQL=") + psqlLibs.section("=", 1); if (!qmakeSql.isEmpty()) qmakeVars += QString("sql-drivers += ") + qmakeSql.join( " " ); if (!qmakeSqlPlugins.isEmpty()) diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index 6c10dd8..ff2ee8b 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -133,6 +133,7 @@ private: QStringList qmakeIncludes; QStringList qmakeLibs; QString opensslLibs; + QString psqlLibs; QMap licenseInfo; QString outputLine; -- cgit v0.12 From f3e1f11b79060eb7cad0a8e79396d51ded3ed0a6 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 10 Jun 2010 14:13:06 +0100 Subject: Update 4.7 def files Reviewed-by: Trust Me --- src/s60installs/bwins/QtDeclarativeu.def | 38 +++++++++++++++++++++---------- src/s60installs/bwins/QtGuiu.def | 8 +++++++ src/s60installs/eabi/QtDeclarativeu.def | 39 ++++++++++++++++++++++---------- src/s60installs/eabi/QtGuiu.def | 6 +++++ 4 files changed, 67 insertions(+), 24 deletions(-) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index 3df0f47..2992cf6 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -862,7 +862,7 @@ EXPORTS ?cursorPositionChanged@QDeclarativeTextEdit@@IAEXXZ @ 861 NONAME ; void QDeclarativeTextEdit::cursorPositionChanged(void) ?cursorPositionChanged@QDeclarativeTextInput@@IAEXXZ @ 862 NONAME ; void QDeclarativeTextInput::cursorPositionChanged(void) ?cursorRect@QDeclarativeTextEdit@@QBE?AVQRect@@XZ @ 863 NONAME ABSENT ; class QRect QDeclarativeTextEdit::cursorRect(void) const - ?cursorRect@QDeclarativeTextInput@@QBE?AVQRect@@XZ @ 864 NONAME ; class QRect QDeclarativeTextInput::cursorRect(void) const + ?cursorRect@QDeclarativeTextInput@@QBE?AVQRect@@XZ @ 864 NONAME ABSENT ; class QRect QDeclarativeTextInput::cursorRect(void) const ?cursorVisibleChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 865 NONAME ; void QDeclarativeTextEdit::cursorVisibleChanged(bool) ?cursorVisibleChanged@QDeclarativeTextInput@@IAEX_N@Z @ 866 NONAME ; void QDeclarativeTextInput::cursorVisibleChanged(bool) ?customParser@QDeclarativeType@@QBEPAVQDeclarativeCustomParser@@XZ @ 867 NONAME ; class QDeclarativeCustomParser * QDeclarativeType::customParser(void) const @@ -2568,10 +2568,10 @@ EXPORTS ?setSelectedTextColor@QDeclarativeTextInput@@QAEXABVQColor@@@Z @ 2567 NONAME ; void QDeclarativeTextInput::setSelectedTextColor(class QColor const &) ?setSelectionColor@QDeclarativeTextEdit@@QAEXABVQColor@@@Z @ 2568 NONAME ; void QDeclarativeTextEdit::setSelectionColor(class QColor const &) ?setSelectionColor@QDeclarativeTextInput@@QAEXABVQColor@@@Z @ 2569 NONAME ; void QDeclarativeTextInput::setSelectionColor(class QColor const &) - ?setSelectionEnd@QDeclarativeTextEdit@@QAEXH@Z @ 2570 NONAME ; void QDeclarativeTextEdit::setSelectionEnd(int) - ?setSelectionEnd@QDeclarativeTextInput@@QAEXH@Z @ 2571 NONAME ; void QDeclarativeTextInput::setSelectionEnd(int) - ?setSelectionStart@QDeclarativeTextEdit@@QAEXH@Z @ 2572 NONAME ; void QDeclarativeTextEdit::setSelectionStart(int) - ?setSelectionStart@QDeclarativeTextInput@@QAEXH@Z @ 2573 NONAME ; void QDeclarativeTextInput::setSelectionStart(int) + ?setSelectionEnd@QDeclarativeTextEdit@@QAEXH@Z @ 2570 NONAME ABSENT ; void QDeclarativeTextEdit::setSelectionEnd(int) + ?setSelectionEnd@QDeclarativeTextInput@@QAEXH@Z @ 2571 NONAME ABSENT ; void QDeclarativeTextInput::setSelectionEnd(int) + ?setSelectionStart@QDeclarativeTextEdit@@QAEXH@Z @ 2572 NONAME ABSENT ; void QDeclarativeTextEdit::setSelectionStart(int) + ?setSelectionStart@QDeclarativeTextInput@@QAEXH@Z @ 2573 NONAME ABSENT ; void QDeclarativeTextInput::setSelectionStart(int) ?setSmooth@QDeclarativeItem@@QAEX_N@Z @ 2574 NONAME ; void QDeclarativeItem::setSmooth(bool) ?setSmoothCache@QDeclarativePaintedItem@@QAEX_N@Z @ 2575 NONAME ; void QDeclarativePaintedItem::setSmoothCache(bool) ?setSnapMode@QDeclarativeListView@@QAEXW4SnapMode@1@@Z @ 2576 NONAME ; void QDeclarativeListView::setSnapMode(enum QDeclarativeListView::SnapMode) @@ -3891,7 +3891,7 @@ EXPORTS ?wrapMode@QDeclarativeTextEdit@@QBE?AW4WrapMode@1@XZ @ 3890 NONAME ; enum QDeclarativeTextEdit::WrapMode QDeclarativeTextEdit::wrapMode(void) const ?wrapModeChanged@QDeclarativeText@@IAEXXZ @ 3891 NONAME ; void QDeclarativeText::wrapModeChanged(void) ?wrapModeChanged@QDeclarativeTextEdit@@IAEXXZ @ 3892 NONAME ; void QDeclarativeTextEdit::wrapModeChanged(void) - ?xToPosition@QDeclarativeTextInput@@QAEHH@Z @ 3893 NONAME ; int QDeclarativeTextInput::xToPosition(int) + ?xToPosition@QDeclarativeTextInput@@QAEHH@Z @ 3893 NONAME ABSENT ; int QDeclarativeTextInput::xToPosition(int) ?staticMetaObject@QDeclarativeSmoothedFollow@@2UQMetaObject@@B @ 3894 NONAME ; struct QMetaObject const QDeclarativeSmoothedFollow::staticMetaObject ?trUtf8@QDeclarativeCompiler@@SA?AVQString@@PBD0H@Z @ 3895 NONAME ; class QString QDeclarativeCompiler::trUtf8(char const *, char const *, int) ?findSignalByName@QDeclarativePropertyPrivate@@SA?AVQMetaMethod@@PBUQMetaObject@@ABVQByteArray@@@Z @ 3896 NONAME ; class QMetaMethod QDeclarativePropertyPrivate::findSignalByName(struct QMetaObject const *, class QByteArray const &) @@ -4024,10 +4024,10 @@ EXPORTS ?restart@QDeclarativeItemPrivate@@SA_JAAVQElapsedTimer@@@Z @ 4023 NONAME ; long long QDeclarativeItemPrivate::restart(class QElapsedTimer &) ?get@QDeclarativeXmlListModel@@QBE?AVQScriptValue@@H@Z @ 4024 NONAME ; class QScriptValue QDeclarativeXmlListModel::get(int) const ?setScale@QDeclarativeParentChange@@QAEXVQDeclarativeScriptString@@@Z @ 4025 NONAME ; void QDeclarativeParentChange::setScale(class QDeclarativeScriptString) - ?showInputPanelOnFocusChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 4026 NONAME ; void QDeclarativeTextEdit::showInputPanelOnFocusChanged(bool) + ?showInputPanelOnFocusChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 4026 NONAME ABSENT ; void QDeclarativeTextEdit::showInputPanelOnFocusChanged(bool) ?focusOutEvent@QDeclarativeTextInput@@MAEXPAVQFocusEvent@@@Z @ 4027 NONAME ; void QDeclarativeTextInput::focusOutEvent(class QFocusEvent *) ?height@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4028 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::height(void) const - ?showInputPanelOnFocus@QDeclarativeTextEdit@@QBE_NXZ @ 4029 NONAME ; bool QDeclarativeTextEdit::showInputPanelOnFocus(void) const + ?showInputPanelOnFocus@QDeclarativeTextEdit@@QBE_NXZ @ 4029 NONAME ABSENT ; bool QDeclarativeTextEdit::showInputPanelOnFocus(void) const ?errorString@QDeclarativeComponent@@QBE?AVQString@@XZ @ 4030 NONAME ; class QString QDeclarativeComponent::errorString(void) const ?elapsed@QDeclarativeItemPrivate@@SA_JAAVQElapsedTimer@@@Z @ 4031 NONAME ; long long QDeclarativeItemPrivate::elapsed(class QElapsedTimer &) ?focusInEvent@QDeclarativeTextInput@@MAEXPAVQFocusEvent@@@Z @ 4032 NONAME ; void QDeclarativeTextInput::focusInEvent(class QFocusEvent *) @@ -4042,15 +4042,15 @@ EXPORTS ?errorString@QDeclarativeXmlListModel@@QBE?AVQString@@XZ @ 4041 NONAME ; class QString QDeclarativeXmlListModel::errorString(void) const ?consistentTime@QDeclarativeItemPrivate@@2_JA @ 4042 NONAME ; long long QDeclarativeItemPrivate::consistentTime ?scale@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4043 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::scale(void) const - ?showInputPanelOnFocus@QDeclarativeTextInput@@QBE_NXZ @ 4044 NONAME ; bool QDeclarativeTextInput::showInputPanelOnFocus(void) const + ?showInputPanelOnFocus@QDeclarativeTextInput@@QBE_NXZ @ 4044 NONAME ABSENT ; bool QDeclarativeTextInput::showInputPanelOnFocus(void) const ?focusInEvent@QDeclarativeTextEdit@@MAEXPAVQFocusEvent@@@Z @ 4045 NONAME ; void QDeclarativeTextEdit::focusInEvent(class QFocusEvent *) ?y@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4046 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::y(void) const ?setY@QDeclarativeParentChange@@QAEXVQDeclarativeScriptString@@@Z @ 4047 NONAME ; void QDeclarativeParentChange::setY(class QDeclarativeScriptString) - ?setShowInputPanelOnFocus@QDeclarativeTextEdit@@QAEX_N@Z @ 4048 NONAME ; void QDeclarativeTextEdit::setShowInputPanelOnFocus(bool) + ?setShowInputPanelOnFocus@QDeclarativeTextEdit@@QAEX_N@Z @ 4048 NONAME ABSENT ; void QDeclarativeTextEdit::setShowInputPanelOnFocus(bool) ?paintedSizeChanged@QDeclarativeText@@IAEXXZ @ 4049 NONAME ; void QDeclarativeText::paintedSizeChanged(void) ?selectByMouseChanged@QDeclarativeTextEdit@@IAEX_N@Z @ 4050 NONAME ; void QDeclarativeTextEdit::selectByMouseChanged(bool) ?openSoftwareInputPanel@QDeclarativeTextInput@@QAEXXZ @ 4051 NONAME ; void QDeclarativeTextInput::openSoftwareInputPanel(void) - ?setShowInputPanelOnFocus@QDeclarativeTextInput@@QAEX_N@Z @ 4052 NONAME ; void QDeclarativeTextInput::setShowInputPanelOnFocus(bool) + ?setShowInputPanelOnFocus@QDeclarativeTextInput@@QAEX_N@Z @ 4052 NONAME ABSENT ; void QDeclarativeTextInput::setShowInputPanelOnFocus(bool) ?boundingRect@QDeclarativePaintedItem@@MBE?AVQRectF@@XZ @ 4053 NONAME ; class QRectF QDeclarativePaintedItem::boundingRect(void) const ?closeSoftwareInputPanel@QDeclarativeTextInput@@QAEXXZ @ 4054 NONAME ; void QDeclarativeTextInput::closeSoftwareInputPanel(void) ?setWidth@QDeclarativeParentChange@@QAEXVQDeclarativeScriptString@@@Z @ 4055 NONAME ; void QDeclarativeParentChange::setWidth(class QDeclarativeScriptString) @@ -4067,11 +4067,25 @@ EXPORTS ?selectByMouse@QDeclarativeTextEdit@@QBE_NXZ @ 4066 NONAME ; bool QDeclarativeTextEdit::selectByMouse(void) const ?setHeight@QDeclarativeParentChange@@QAEXVQDeclarativeScriptString@@@Z @ 4067 NONAME ; void QDeclarativeParentChange::setHeight(class QDeclarativeScriptString) ?start@QDeclarativeItemPrivate@@SAXAAVQElapsedTimer@@@Z @ 4068 NONAME ; void QDeclarativeItemPrivate::start(class QElapsedTimer &) - ?showInputPanelOnFocusChanged@QDeclarativeTextInput@@IAEX_N@Z @ 4069 NONAME ; void QDeclarativeTextInput::showInputPanelOnFocusChanged(bool) + ?showInputPanelOnFocusChanged@QDeclarativeTextInput@@IAEX_N@Z @ 4069 NONAME ABSENT ; void QDeclarativeTextInput::showInputPanelOnFocusChanged(bool) ?x@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4070 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::x(void) const ?selectByMouseChanged@QDeclarativeTextInput@@IAEX_N@Z @ 4071 NONAME ; void QDeclarativeTextInput::selectByMouseChanged(bool) ?width@QDeclarativeParentChange@@QBE?AVQDeclarativeScriptString@@XZ @ 4072 NONAME ; class QDeclarativeScriptString QDeclarativeParentChange::width(void) const ?openSoftwareInputPanel@QDeclarativeTextEdit@@QAEXXZ @ 4073 NONAME ; void QDeclarativeTextEdit::openSoftwareInputPanel(void) ?cursorRectangleChanged@QDeclarativeTextEdit@@IAEXXZ @ 4074 NONAME ; void QDeclarativeTextEdit::cursorRectangleChanged(void) ?cursorRectangle@QDeclarativeTextEdit@@QBE?AVQRect@@XZ @ 4075 NONAME ; class QRect QDeclarativeTextEdit::cursorRectangle(void) const + ?selectWord@QDeclarativeTextInput@@QAEXXZ @ 4076 NONAME ; void QDeclarativeTextInput::selectWord(void) + ?positionToRectangle@QDeclarativeTextEdit@@QBE?AVQRectF@@H@Z @ 4077 NONAME ; class QRectF QDeclarativeTextEdit::positionToRectangle(int) const + ?cursorRectangle@QDeclarativeTextInput@@QBE?AVQRect@@XZ @ 4078 NONAME ; class QRect QDeclarativeTextInput::cursorRectangle(void) const + ?mouseDoubleClickEvent@QDeclarativeTextInput@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 4079 NONAME ; void QDeclarativeTextInput::mouseDoubleClickEvent(class QGraphicsSceneMouseEvent *) + ?positionAt@QDeclarativeTextEdit@@QBEHHH@Z @ 4080 NONAME ; int QDeclarativeTextEdit::positionAt(int, int) const + ?cut@QDeclarativeTextEdit@@QAEXXZ @ 4081 NONAME ; void QDeclarativeTextEdit::cut(void) + ?copy@QDeclarativeTextEdit@@QAEXXZ @ 4082 NONAME ; void QDeclarativeTextEdit::copy(void) + ?select@QDeclarativeTextEdit@@QAEXHH@Z @ 4083 NONAME ; void QDeclarativeTextEdit::select(int, int) + ?moveCursorSelection@QDeclarativeTextEdit@@QAEXH@Z @ 4084 NONAME ; void QDeclarativeTextEdit::moveCursorSelection(int) + ?select@QDeclarativeTextInput@@QAEXHH@Z @ 4085 NONAME ; void QDeclarativeTextInput::select(int, int) + ?paste@QDeclarativeTextEdit@@QAEXXZ @ 4086 NONAME ; void QDeclarativeTextEdit::paste(void) + ?positionToRectangle@QDeclarativeTextInput@@QBE?AVQRectF@@H@Z @ 4087 NONAME ; class QRectF QDeclarativeTextInput::positionToRectangle(int) const + ?positionAt@QDeclarativeTextInput@@QBEHH@Z @ 4088 NONAME ; int QDeclarativeTextInput::positionAt(int) const + ?selectWord@QDeclarativeTextEdit@@QAEXXZ @ 4089 NONAME ; void QDeclarativeTextEdit::selectWord(void) diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index a1e05e2..9b4ecc2 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -12805,4 +12805,12 @@ EXPORTS ?setPerformanceHint@QStaticText@@QAEXW4PerformanceHint@1@@Z @ 12804 NONAME ; void QStaticText::setPerformanceHint(enum QStaticText::PerformanceHint) ??0QStaticText@@QAE@ABV0@@Z @ 12805 NONAME ; QStaticText::QStaticText(class QStaticText const &) ??0QImageTextureGlyphCache@@QAE@W4Type@QFontEngineGlyphCache@@ABVQTransform@@@Z @ 12806 NONAME ; QImageTextureGlyphCache::QImageTextureGlyphCache(enum QFontEngineGlyphCache::Type, class QTransform const &) + ?verticalMovementX@QTextCursor@@QBEHXZ @ 12807 NONAME ; int QTextCursor::verticalMovementX(void) const + ?runtime_graphics_system@QApplicationPrivate@@2_NA @ 12808 NONAME ; bool QApplicationPrivate::runtime_graphics_system + ?keepPositionOnInsert@QTextCursor@@QBE_NXZ @ 12809 NONAME ; bool QTextCursor::keepPositionOnInsert(void) const + ?setKeepPositionOnInsert@QTextCursor@@QAEX_N@Z @ 12810 NONAME ; void QTextCursor::setKeepPositionOnInsert(bool) + ?textDirection@QProgressBar@@QBE?AW4Direction@1@XZ @ 12811 NONAME ; enum QProgressBar::Direction QProgressBar::textDirection(void) const + ?setVerticalMovementX@QTextCursor@@QAEXH@Z @ 12812 NONAME ; void QTextCursor::setVerticalMovementX(int) + ?invertedAppearance@QProgressBar@@QBE_NXZ @ 12813 NONAME ; bool QProgressBar::invertedAppearance(void) const + ?width@QFontMetrics@@QBEHABVQString@@HH@Z @ 12814 NONAME ; int QFontMetrics::width(class QString const &, int, int) const diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index 320a780..1c4cd5d 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -911,7 +911,7 @@ EXPORTS _ZN20QDeclarativeTextEdit15mousePressEventEP24QGraphicsSceneMouseEvent @ 910 NONAME _ZN20QDeclarativeTextEdit15readOnlyChangedEb @ 911 NONAME _ZN20QDeclarativeTextEdit15setFocusOnPressEb @ 912 NONAME - _ZN20QDeclarativeTextEdit15setSelectionEndEi @ 913 NONAME + _ZN20QDeclarativeTextEdit15setSelectionEndEi @ 913 NONAME ABSENT _ZN20QDeclarativeTextEdit16inputMethodEventEP17QInputMethodEvent @ 914 NONAME _ZN20QDeclarativeTextEdit16selectionChangedEv @ 915 NONAME _ZN20QDeclarativeTextEdit16setCursorVisibleEb @ 916 NONAME @@ -921,7 +921,7 @@ EXPORTS _ZN20QDeclarativeTextEdit17setCursorDelegateEP21QDeclarativeComponent @ 920 NONAME _ZN20QDeclarativeTextEdit17setCursorPositionEi @ 921 NONAME _ZN20QDeclarativeTextEdit17setSelectionColorERK6QColor @ 922 NONAME - _ZN20QDeclarativeTextEdit17setSelectionStartEi @ 923 NONAME + _ZN20QDeclarativeTextEdit17setSelectionStartEi @ 923 NONAME ABSENT _ZN20QDeclarativeTextEdit17textFormatChangedENS_10TextFormatE @ 924 NONAME _ZN20QDeclarativeTextEdit17textMarginChangedEf @ 925 NONAME _ZN20QDeclarativeTextEdit18loadCursorDelegateEv @ 926 NONAME @@ -1207,7 +1207,7 @@ EXPORTS _ZN21QDeclarativeTextInput15mousePressEventEP24QGraphicsSceneMouseEvent @ 1206 NONAME _ZN21QDeclarativeTextInput15readOnlyChangedEb @ 1207 NONAME _ZN21QDeclarativeTextInput15setFocusOnPressEb @ 1208 NONAME - _ZN21QDeclarativeTextInput15setSelectionEndEi @ 1209 NONAME + _ZN21QDeclarativeTextInput15setSelectionEndEi @ 1209 NONAME ABSENT _ZN21QDeclarativeTextInput16cursorPosChangedEv @ 1210 NONAME _ZN21QDeclarativeTextInput16inputMaskChangedERK7QString @ 1211 NONAME _ZN21QDeclarativeTextInput16selectionChangedEv @ 1212 NONAME @@ -1218,7 +1218,7 @@ EXPORTS _ZN21QDeclarativeTextInput17setCursorDelegateEP21QDeclarativeComponent @ 1217 NONAME _ZN21QDeclarativeTextInput17setCursorPositionEi @ 1218 NONAME _ZN21QDeclarativeTextInput17setSelectionColorERK6QColor @ 1219 NONAME - _ZN21QDeclarativeTextInput17setSelectionStartEi @ 1220 NONAME + _ZN21QDeclarativeTextInput17setSelectionStartEi @ 1220 NONAME ABSENT _ZN21QDeclarativeTextInput19focusOnPressChangedEb @ 1221 NONAME _ZN21QDeclarativeTextInput19getStaticMetaObjectEv @ 1222 NONAME _ZN21QDeclarativeTextInput19selectedTextChangedEv @ 1223 NONAME @@ -2627,7 +2627,7 @@ EXPORTS _ZNK21QDeclarativeRectangle8gradientEv @ 2626 NONAME _ZNK21QDeclarativeScaleGrid10metaObjectEv @ 2627 NONAME _ZNK21QDeclarativeScaleGrid6isNullEv @ 2628 NONAME - _ZNK21QDeclarativeTextInput10cursorRectEv @ 2629 NONAME + _ZNK21QDeclarativeTextInput10cursorRectEv @ 2629 NONAME ABSENT _ZNK21QDeclarativeTextInput10isReadOnlyEv @ 2630 NONAME _ZNK21QDeclarativeTextInput10metaObjectEv @ 2631 NONAME _ZNK21QDeclarativeTextInput12focusOnPressEv @ 2632 NONAME @@ -3413,7 +3413,7 @@ EXPORTS _ZN20QDeclarativePathView28highlightMoveDurationChangedEv @ 3412 NONAME _ZN20QDeclarativeTextEdit11setWrapModeENS_8WrapModeE @ 3413 NONAME _ZN20QDeclarativeTextEdit15wrapModeChangedEv @ 3414 NONAME - _ZN21QDeclarativeTextInput11xToPositionEi @ 3415 NONAME + _ZN21QDeclarativeTextInput11xToPositionEi @ 3415 NONAME ABSENT _ZN21QDeclarativeTextInput13setAutoScrollEb @ 3416 NONAME _ZN21QDeclarativeTextInput14mouseMoveEventEP24QGraphicsSceneMouseEvent @ 3417 NONAME _ZN21QDeclarativeTextInput17autoScrollChangedEb @ 3418 NONAME @@ -3612,16 +3612,16 @@ EXPORTS _ZN20QDeclarativeTextEdit22cursorRectangleChangedEv @ 3611 NONAME _ZN20QDeclarativeTextEdit22openSoftwareInputPanelEv @ 3612 NONAME _ZN20QDeclarativeTextEdit23closeSoftwareInputPanelEv @ 3613 NONAME - _ZN20QDeclarativeTextEdit24setShowInputPanelOnFocusEb @ 3614 NONAME - _ZN20QDeclarativeTextEdit28showInputPanelOnFocusChangedEb @ 3615 NONAME + _ZN20QDeclarativeTextEdit24setShowInputPanelOnFocusEb @ 3614 NONAME ABSENT + _ZN20QDeclarativeTextEdit28showInputPanelOnFocusChangedEb @ 3615 NONAME ABSENT _ZN21QDeclarativeTextInput12focusInEventEP11QFocusEvent @ 3616 NONAME _ZN21QDeclarativeTextInput13focusOutEventEP11QFocusEvent @ 3617 NONAME _ZN21QDeclarativeTextInput16setSelectByMouseEb @ 3618 NONAME _ZN21QDeclarativeTextInput20selectByMouseChangedEb @ 3619 NONAME _ZN21QDeclarativeTextInput22openSoftwareInputPanelEv @ 3620 NONAME _ZN21QDeclarativeTextInput23closeSoftwareInputPanelEv @ 3621 NONAME - _ZN21QDeclarativeTextInput24setShowInputPanelOnFocusEb @ 3622 NONAME - _ZN21QDeclarativeTextInput28showInputPanelOnFocusChangedEb @ 3623 NONAME + _ZN21QDeclarativeTextInput24setShowInputPanelOnFocusEb @ 3622 NONAME ABSENT + _ZN21QDeclarativeTextInput28showInputPanelOnFocusChangedEb @ 3623 NONAME ABSENT _ZN22QDeclarativeExpressionC1EP19QDeclarativeContextP7QObjectRK7QStringS3_ @ 3624 NONAME _ZN22QDeclarativeExpressionC1EP23QDeclarativeContextDataP7QObjectRK7QString @ 3625 NONAME _ZN22QDeclarativeExpressionC1EP23QDeclarativeContextDataP7QObjectRK7QStringR29QDeclarativeExpressionPrivate @ 3626 NONAME @@ -3645,10 +3645,10 @@ EXPORTS _ZNK20QDeclarativeTextEdit13paintedHeightEv @ 3644 NONAME _ZNK20QDeclarativeTextEdit13selectByMouseEv @ 3645 NONAME _ZNK20QDeclarativeTextEdit15cursorRectangleEv @ 3646 NONAME - _ZNK20QDeclarativeTextEdit21showInputPanelOnFocusEv @ 3647 NONAME + _ZNK20QDeclarativeTextEdit21showInputPanelOnFocusEv @ 3647 NONAME ABSENT _ZNK21QDeclarativeComponent11errorStringEv @ 3648 NONAME _ZNK21QDeclarativeTextInput13selectByMouseEv @ 3649 NONAME - _ZNK21QDeclarativeTextInput21showInputPanelOnFocusEv @ 3650 NONAME + _ZNK21QDeclarativeTextInput21showInputPanelOnFocusEv @ 3650 NONAME ABSENT _ZNK23QDeclarativePaintedItem12boundingRectEv @ 3651 NONAME _ZNK24QDeclarativeXmlListModel11errorStringEv @ 3652 NONAME _ZNK24QDeclarativeXmlListModel3getEi @ 3653 NONAME @@ -3657,4 +3657,19 @@ EXPORTS _ZThn8_N21QDeclarativeTextInput12focusInEventEP11QFocusEvent @ 3656 NONAME _ZThn8_N21QDeclarativeTextInput13focusOutEventEP11QFocusEvent @ 3657 NONAME _ZThn8_NK23QDeclarativePaintedItem12boundingRectEv @ 3658 NONAME + _ZN20QDeclarativeTextEdit10selectWordEv @ 3659 NONAME + _ZN20QDeclarativeTextEdit19moveCursorSelectionEi @ 3660 NONAME + _ZN20QDeclarativeTextEdit3cutEv @ 3661 NONAME + _ZN20QDeclarativeTextEdit4copyEv @ 3662 NONAME + _ZN20QDeclarativeTextEdit5pasteEv @ 3663 NONAME + _ZN20QDeclarativeTextEdit6selectEii @ 3664 NONAME + _ZN21QDeclarativeTextInput10selectWordEv @ 3665 NONAME + _ZN21QDeclarativeTextInput21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 3666 NONAME + _ZN21QDeclarativeTextInput6selectEii @ 3667 NONAME + _ZNK20QDeclarativeTextEdit10positionAtEii @ 3668 NONAME + _ZNK20QDeclarativeTextEdit19positionToRectangleEi @ 3669 NONAME + _ZNK21QDeclarativeTextInput10positionAtEi @ 3670 NONAME + _ZNK21QDeclarativeTextInput15cursorRectangleEv @ 3671 NONAME + _ZNK21QDeclarativeTextInput19positionToRectangleEi @ 3672 NONAME + _ZThn8_N21QDeclarativeTextInput21mouseDoubleClickEventEP24QGraphicsSceneMouseEvent @ 3673 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 8aafde9..9c1002d 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -12006,4 +12006,10 @@ EXPORTS _ZTV20QGraphicsViewPrivate @ 12005 NONAME _ZTV23QImageTextureGlyphCache @ 12006 NONAME _ZTV26QAbstractScrollAreaPrivate @ 12007 NONAME + _ZN11QTextCursor20setVerticalMovementXEi @ 12008 NONAME + _ZN11QTextCursor23setKeepPositionOnInsertEb @ 12009 NONAME + _ZN19QApplicationPrivate23runtime_graphics_systemE @ 12010 NONAME DATA 1 + _ZNK11QTextCursor17verticalMovementXEv @ 12011 NONAME + _ZNK11QTextCursor20keepPositionOnInsertEv @ 12012 NONAME + _ZNK12QFontMetrics5widthERK7QStringii @ 12013 NONAME -- cgit v0.12 From 90518a59df46312d56e4c6bc7080415b44b928f4 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 10 Jun 2010 12:36:15 +0200 Subject: tst_qlocalsocket: pro files of client / server examples fixed Reviewed-by: ossi --- tests/auto/qlocalsocket/example/client/client.pro | 6 ------ tests/auto/qlocalsocket/example/server/server.pro | 6 ------ 2 files changed, 12 deletions(-) diff --git a/tests/auto/qlocalsocket/example/client/client.pro b/tests/auto/qlocalsocket/example/client/client.pro index eb7e6e6..84f20d6 100644 --- a/tests/auto/qlocalsocket/example/client/client.pro +++ b/tests/auto/qlocalsocket/example/client/client.pro @@ -1,14 +1,8 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Wed Jun 6 17:07:12 2007 -###################################################################### - TEMPLATE = app TARGET = DEPENDPATH += . INCLUDEPATH += . CONFIG += console -include(../../src/src.pri) -# Input QT = core network SOURCES += main.cpp diff --git a/tests/auto/qlocalsocket/example/server/server.pro b/tests/auto/qlocalsocket/example/server/server.pro index 438462d..bfd14d2 100644 --- a/tests/auto/qlocalsocket/example/server/server.pro +++ b/tests/auto/qlocalsocket/example/server/server.pro @@ -1,7 +1,3 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Wed Jun 6 15:16:48 2007 -###################################################################### - TEMPLATE = app TARGET = DEPENDPATH += . @@ -11,8 +7,6 @@ CONFIG += console QT = core network -include(../../src/src.pri) - # Input SOURCES += main.cpp -- cgit v0.12 From 6c8b980a8ea8009a7b80fcce419e331df778a989 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 10 Jun 2010 12:37:47 +0200 Subject: tst_QLocalSocket::threadedConnection autotest stabilized Fixed race condition on connection. Done-with: ossi Reviewed-by: ossi --- tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 38 +++++++++------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index 44f3c12..dbb58c1 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -683,25 +683,11 @@ public: QString testLine = "test"; LocalSocket socket; QSignalSpy spyReadyRead(&socket, SIGNAL(readyRead())); - int tries = 0; - do { - socket.connectToServer("qlocalsocket_threadtest"); - if (socket.error() != QLocalSocket::ServerNotFoundError - && socket.error() != QLocalSocket::ConnectionRefusedError) - break; - QTest::qWait(100); - ++tries; - } while ((socket.error() == QLocalSocket::ServerNotFoundError - || socket.error() == QLocalSocket::ConnectionRefusedError) - && tries < 1000); - if (tries == 0 && socket.state() != QLocalSocket::ConnectedState) { - QVERIFY(socket.waitForConnected(7000)); - QVERIFY(socket.state() == QLocalSocket::ConnectedState); - } + socket.connectToServer("qlocalsocket_threadtest"); + QVERIFY(socket.waitForConnected(1000)); // We should *not* have this signal yet! - if (tries == 0) - QCOMPARE(spyReadyRead.count(), 0); + QCOMPARE(spyReadyRead.count(), 0); socket.waitForReadyRead(); QCOMPARE(spyReadyRead.count(), 1); QTextStream in(&socket); @@ -715,6 +701,8 @@ class Server : public QThread public: int clients; + QMutex mutex; + QWaitCondition wc; void run() { QString testLine = "test"; @@ -722,6 +710,9 @@ public: server.setMaxPendingConnections(10); QVERIFY2(server.listen("qlocalsocket_threadtest"), server.errorString().toLatin1().constData()); + mutex.lock(); + wc.wakeAll(); + mutex.unlock(); int done = clients; while (done > 0) { bool timedOut = true; @@ -746,14 +737,9 @@ void tst_QLocalSocket::threadedConnection_data() QTest::addColumn("threads"); QTest::newRow("1 client") << 1; QTest::newRow("2 clients") << 2; -#ifdef Q_OS_WINCE - QTest::newRow("4 clients") << 4; -#endif -#ifndef Q_OS_WIN QTest::newRow("5 clients") << 5; - QTest::newRow("10 clients") << 10; -#endif #ifndef Q_OS_WINCE + QTest::newRow("10 clients") << 10; QTest::newRow("20 clients") << 20; #endif } @@ -770,7 +756,9 @@ void tst_QLocalSocket::threadedConnection() server.setStackSize(0x14000); #endif server.clients = threads; + server.mutex.lock(); server.start(); + server.wc.wait(&server.mutex); QList clients; for (int i = 0; i < threads; ++i) { @@ -784,9 +772,7 @@ void tst_QLocalSocket::threadedConnection() server.wait(); while (!clients.isEmpty()) { QVERIFY(clients.first()->wait(3000)); - Client *client =clients.takeFirst(); - client->terminate(); - delete client; + delete clients.takeFirst(); } } -- cgit v0.12 From cbe3425a3bd226c61c94f92c521dc5c9b090ef96 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 10 Jun 2010 12:42:13 +0200 Subject: QLocalServer: make many simultaneous connection attempts work on Windows Don't call GetOverlappedResult if ConnectNamedPipe connects instantly. Autotest: tst_qlocalsocket::threadedConnection Task-number: QTBUG-8477 Done-with: ossi Reviewed-by: ossi --- src/network/socket/qlocalserver_p.h | 1 + src/network/socket/qlocalserver_win.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/network/socket/qlocalserver_p.h b/src/network/socket/qlocalserver_p.h index feaaae0..4f92b64 100644 --- a/src/network/socket/qlocalserver_p.h +++ b/src/network/socket/qlocalserver_p.h @@ -99,6 +99,7 @@ public: struct Listener { HANDLE handle; OVERLAPPED overlapped; + bool connected; }; void setError(const QString &function); diff --git a/src/network/socket/qlocalserver_win.cpp b/src/network/socket/qlocalserver_win.cpp index 50d6ca4..940455c 100644 --- a/src/network/socket/qlocalserver_win.cpp +++ b/src/network/socket/qlocalserver_win.cpp @@ -85,8 +85,10 @@ bool QLocalServerPrivate::addListener() if (!ConnectNamedPipe(listener.handle, &listener.overlapped)) { switch (GetLastError()) { case ERROR_IO_PENDING: + listener.connected = false; break; case ERROR_PIPE_CONNECTED: + listener.connected = true; SetEvent(eventHandle); break; default: @@ -155,7 +157,9 @@ void QLocalServerPrivate::_q_onNewConnection() // a client connection first, so there is no way around polling all of them. for (int i = 0; i < listeners.size(); ) { HANDLE handle = listeners[i].handle; - if (GetOverlappedResult(handle, &listeners[i].overlapped, &dummy, FALSE)) { + if (listeners[i].connected + || GetOverlappedResult(handle, &listeners[i].overlapped, &dummy, FALSE)) + { listeners.removeAt(i); addListener(); -- cgit v0.12 From 12614b2c5aaaed44ef9b3d1b3f6dbf50fd2d405f Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 10 Jun 2010 13:10:27 +0200 Subject: QLocalSocket: fix reading from a socket after broken connection Reading from a socket with a broken connection didn't work, even if there were still bytes to read in the internal read buffer. Autotest: tst_QLocalSocket::writeToClientAndDisconnect Task-number: QTBUG-10921 Reviewed-by: ossi --- src/network/socket/qlocalsocket_win.cpp | 10 ++++++---- tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index 5f46ecb..dc87ade 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -192,6 +192,9 @@ qint64 QLocalSocket::readData(char *data, qint64 maxSize) { Q_D(QLocalSocket); + if (d->pipeClosed && d->actualReadBufferSize == 0) + return -1; // signal EOF + qint64 readSoFar; // If startAsyncRead() read data, copy it to its destination. if (maxSize == 1 && d->actualReadBufferSize > 0) { @@ -213,10 +216,8 @@ qint64 QLocalSocket::readData(char *data, qint64 maxSize) } if (d->pipeClosed) { - if (readSoFar == 0) { + if (d->actualReadBufferSize == 0) QTimer::singleShot(0, this, SLOT(_q_pipeClosed())); - return -1; // signal EOF - } } else { if (!d->readSequenceStarted) d->startAsyncRead(); @@ -345,7 +346,8 @@ DWORD QLocalSocketPrivate::bytesAvailable() if (!pipeClosed) { pipeClosed = true; emit q->readChannelFinished(); - QTimer::singleShot(0, q, SLOT(_q_pipeClosed())); + if (actualReadBufferSize == 0) + QTimer::singleShot(0, q, SLOT(_q_pipeClosed())); } } return 0; diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index dbb58c1..87a30c2 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -980,6 +980,7 @@ void tst_QLocalSocket::writeToClientAndDisconnect() QLocalServer server; QLocalSocket client; + QSignalSpy readChannelFinishedSpy(&client, SIGNAL(readChannelFinished())); QVERIFY(server.listen("writeAndDisconnectServer")); client.connectToServer("writeAndDisconnectServer"); @@ -992,10 +993,19 @@ void tst_QLocalSocket::writeToClientAndDisconnect() memset(buffer, 0, sizeof(buffer)); QCOMPARE(clientSocket->write(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); clientSocket->waitForBytesWritten(); - clientSocket->disconnectFromServer(); - QVERIFY(client.waitForReadyRead()); + clientSocket->close(); + server.close(); + + // Wait for the client to notice the broken connection. + int timeout = 5000; + do { + const int timestep = 100; + QTest::qWait(timestep); + timeout -= timestep; + } while (!readChannelFinishedSpy.count() && timeout > 0); + + QVERIFY(!readChannelFinishedSpy.isEmpty()); QCOMPARE(client.read(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); - QVERIFY(client.waitForDisconnected()); QCOMPARE(client.state(), QLocalSocket::UnconnectedState); } -- cgit v0.12 From 98da12415aa8bb7497120cd841e7a798e3e5206e Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 10 Jun 2010 14:14:18 +0200 Subject: QLocalSocket/Win: QLocalSocketPrivate::bytesAvailable renamed QLocalSocketPrivate::bytesAvailable has been renamed to QLocalSocketPrivate::checkPipeState to match the purpose of this method. Reviewed-by: ossi --- src/network/socket/qlocalsocket_p.h | 2 +- src/network/socket/qlocalsocket_win.cpp | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/network/socket/qlocalsocket_p.h b/src/network/socket/qlocalsocket_p.h index 0f1c23c..57ca3c2 100644 --- a/src/network/socket/qlocalsocket_p.h +++ b/src/network/socket/qlocalsocket_p.h @@ -135,7 +135,7 @@ public: void _q_canWrite(); void _q_pipeClosed(); void _q_emitReadyRead(); - DWORD bytesAvailable(); + DWORD checkPipeState(); void startAsyncRead(); bool completeAsyncRead(); void checkReadyRead(); diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index dc87ade..aa597da 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -251,7 +251,7 @@ void QLocalSocketPrivate::checkReadyRead() void QLocalSocketPrivate::startAsyncRead() { do { - DWORD bytesToRead = bytesAvailable(); + DWORD bytesToRead = checkPipeState(); if (bytesToRead == 0) { // There are no bytes in the pipe but we need to // start the overlapped read with some buffer size. @@ -334,9 +334,11 @@ void QLocalSocket::abort() } /*! - The number of bytes available from the pipe - */ -DWORD QLocalSocketPrivate::bytesAvailable() + \internal + Returns the number of available bytes in the pipe. + Sets QLocalSocketPrivate::pipeClosed to true if the connection is broken. + */ +DWORD QLocalSocketPrivate::checkPipeState() { Q_Q(QLocalSocket); DWORD bytes; @@ -531,7 +533,7 @@ bool QLocalSocket::waitForDisconnected(int msecs) } QIncrementalSleepTimer timer(msecs); forever { - d->bytesAvailable(); // to check if PeekNamedPipe fails + d->checkPipeState(); if (d->pipeClosed) close(); if (state() == UnconnectedState) -- cgit v0.12 From 073d04f1c2c5dc7020469bfc92708dce634f4779 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 10 Jun 2010 14:16:24 +0200 Subject: QLocalSocket: don't emit readChannelFinished() twice on Windows Reviewed-by: ossi --- src/network/socket/qlocalsocket_win.cpp | 3 +++ tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index aa597da..2223ebe 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -252,6 +252,9 @@ void QLocalSocketPrivate::startAsyncRead() { do { DWORD bytesToRead = checkPipeState(); + if (pipeClosed) + return; + if (bytesToRead == 0) { // There are no bytes in the pipe but we need to // start the overlapped read with some buffer size. diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index 87a30c2..d2cba6e 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -1004,7 +1004,7 @@ void tst_QLocalSocket::writeToClientAndDisconnect() timeout -= timestep; } while (!readChannelFinishedSpy.count() && timeout > 0); - QVERIFY(!readChannelFinishedSpy.isEmpty()); + QCOMPARE(readChannelFinishedSpy.count(), 1); QCOMPARE(client.read(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); QCOMPARE(client.state(), QLocalSocket::UnconnectedState); } -- cgit v0.12 From 66539b167c01968f3040bfad9a59561a8b253639 Mon Sep 17 00:00:00 2001 From: Constantin Makshin Date: Thu, 10 Jun 2010 16:38:42 +0200 Subject: Updated project files so it is now possible to use "-system-zlib" configuration option on Windows and Symbian platforms. Improved support of "-system-jpeg" "-system-mng" "-system-png" and "-system-tiff" configuration options on Windows (thanks to Mark Brand ) Merge-request: 2411 Reviewed-by: Oswald Buddenhagen --- src/corelib/tools/tools.pri | 5 +++-- src/gui/image/image.pri | 14 +++++++++++--- src/gui/painting/painting.pri | 5 +++-- src/network/access/access.pri | 5 +++-- src/plugins/imageformats/jpeg/jpeg.pro | 4 ++-- src/plugins/imageformats/mng/mng.pro | 13 +++++++------ src/plugins/imageformats/tiff/tiff.pro | 18 ++++++++++++------ src/qbase.pri | 1 - src/svg/svg.pro | 4 +++- src/tools/bootstrap/bootstrap.pri | 5 +++-- src/tools/bootstrap/bootstrap.pro | 4 ++++ src/winmain/winmain.pro | 2 +- 12 files changed, 52 insertions(+), 28 deletions(-) diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index 4e0ebbc..e579dd5 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -106,8 +106,9 @@ contains(QT_CONFIG, zlib) { ../3rdparty/zlib/uncompr.c \ ../3rdparty/zlib/zutil.c } else:!contains(QT_CONFIG, no-zlib) { - unix:LIBS_PRIVATE += -lz -# win32:LIBS += libz.lib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } DEFINES += HB_EXPORT=Q_CORE_EXPORT diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri index 8d75fdd..c4eac95 100644 --- a/src/gui/image/image.pri +++ b/src/gui/image/image.pri @@ -93,12 +93,12 @@ SOURCES += \ SOURCES += image/qpnghandler.cpp contains(QT_CONFIG, system-png) { - unix:LIBS_PRIVATE += -lpng - win32:LIBS += libpng.lib + unix|win32-g++*:LIBS_PRIVATE += -lpng + win32:!win32-g++*:LIBS += libpng.lib } else { DEFINES *= QT_USE_BUNDLED_LIBPNG !isEqual(QT_ARCH, i386):!isEqual(QT_ARCH, x86_64):DEFINES += PNG_NO_ASSEMBLER_CODE - INCLUDEPATH += ../3rdparty/libpng ../3rdparty/zlib + INCLUDEPATH += ../3rdparty/libpng SOURCES += ../3rdparty/libpng/png.c \ ../3rdparty/libpng/pngerror.c \ ../3rdparty/libpng/pngget.c \ @@ -114,6 +114,14 @@ SOURCES += \ ../3rdparty/libpng/pngwrite.c \ ../3rdparty/libpng/pngwtran.c \ ../3rdparty/libpng/pngwutil.c + + contains(QT_CONFIG, system-zlib) { + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib + } else { + INCLUDEPATH += ../3rdparty/zlib + } } } else { DEFINES *= QT_NO_IMAGEFORMAT_PNG diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index c3b0e3e..1900750 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -405,7 +405,8 @@ neon:*-g++* { contains(QT_CONFIG, zlib) { INCLUDEPATH += ../3rdparty/zlib } else:!contains(QT_CONFIG, no-zlib) { - unix:LIBS_PRIVATE += -lz -# win32:LIBS += libz.lib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } diff --git a/src/network/access/access.pri b/src/network/access/access.pri index aa36890..b91ccbd 100644 --- a/src/network/access/access.pri +++ b/src/network/access/access.pri @@ -61,6 +61,7 @@ SOURCES += access/qftp.cpp \ contains(QT_CONFIG, zlib) { INCLUDEPATH += ../3rdparty/zlib } else:!contains(QT_CONFIG, no-zlib) { - unix:LIBS_PRIVATE += -lz -# win32:LIBS += libz.lib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro index 5b45422..e28c5fb 100644 --- a/src/plugins/imageformats/jpeg/jpeg.pro +++ b/src/plugins/imageformats/jpeg/jpeg.pro @@ -22,8 +22,8 @@ symbian: { } contains(QT_CONFIG, system-jpeg) { - unix:LIBS += -ljpeg - win32:LIBS += libjpeg.lib + unix|win32-g++*:LIBS += -ljpeg + win32:!win32-g++*:LIBS += libjpeg.lib } !contains(QT_CONFIG, system-jpeg) { INCLUDEPATH += ../../../3rdparty/libjpeg diff --git a/src/plugins/imageformats/mng/mng.pro b/src/plugins/imageformats/mng/mng.pro index de7dfa7..f23a5ef 100644 --- a/src/plugins/imageformats/mng/mng.pro +++ b/src/plugins/imageformats/mng/mng.pro @@ -14,8 +14,8 @@ symbian: { } contains(QT_CONFIG, system-mng) { - unix:LIBS += -lmng - win32:LIBS += libmng.lib + unix|win32-g++*:LIBS += -lmng + win32:!win32-g++*:LIBS += libmng.lib } !contains(QT_CONFIG, system-mng) { DEFINES += MNG_BUILD_SO @@ -44,10 +44,11 @@ contains(QT_CONFIG, system-mng) { } contains(QT_CONFIG, system-zlib) { - LIBS += -lz -} -!contains(QT_CONFIG, system-zlib) { - INCLUDEPATH += ../../../3rdparty/zlib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib +} else { + INCLUDEPATH += ../../../3rdparty/zlib } QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro index 3cb64ad..3bf203c 100644 --- a/src/plugins/imageformats/tiff/tiff.pro +++ b/src/plugins/imageformats/tiff/tiff.pro @@ -8,8 +8,13 @@ SOURCES += main.cpp \ qtiffhandler.cpp contains(QT_CONFIG, system-tiff) { - unix:LIBS += -ltiff - win32:LIBS += libtiff.lib + unix|win32-g++*:LIBS += -ltiff + win32:!win32-g++*:LIBS += libtiff.lib + + contains(QT_CONFIG, system-jpeg) { + unix|win32-g++*:LIBS += -ljpeg + win32:!win32-g++*:LIBS += libjpeg.lib + } } !contains(QT_CONFIG, system-tiff) { INCLUDEPATH += ../../../3rdparty/libtiff/libtiff @@ -64,10 +69,11 @@ contains(QT_CONFIG, system-tiff) { } contains(QT_CONFIG, system-zlib) { - LIBS += -lz -} -!contains(QT_CONFIG, system-zlib) { - INCLUDEPATH += ../../../3rdparty/zlib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib +} else { + INCLUDEPATH += ../../../3rdparty/zlib } QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/imageformats diff --git a/src/qbase.pri b/src/qbase.pri index 83ae069..064e67c 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -85,7 +85,6 @@ win32-borland { } win32 { - CONFIG += zlib INCLUDEPATH += tmp !static: DEFINES+=QT_MAKEDLL } diff --git a/src/svg/svg.pro b/src/svg/svg.pro index d2a4227..fa975e7 100644 --- a/src/svg/svg.pro +++ b/src/svg/svg.pro @@ -46,5 +46,7 @@ symbian:TARGET.UID3=0x2001B2E2 contains(QT_CONFIG, zlib) { INCLUDEPATH += ../3rdparty/zlib } else:!contains(QT_CONFIG, no-zlib) { - unix:LIBS_PRIVATE += -lz + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri index 1de7b18..1aa8121 100644 --- a/src/tools/bootstrap/bootstrap.pri +++ b/src/tools/bootstrap/bootstrap.pri @@ -52,8 +52,9 @@ hpux-acc*|hpuxi-acc* { LIBS += -lbootstrap } !contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib):!cross_compile { - unix:LIBS += -lz -# win32:LIBS += libz.lib + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } win32:LIBS += -luser32 diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 44dd625..149291a 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -109,6 +109,10 @@ contains(QT_CONFIG, zlib)|cross_compile { ../3rdparty/zlib/trees.c \ ../3rdparty/zlib/uncompr.c \ ../3rdparty/zlib/zutil.c +} else:!contains(QT_CONFIG, no-zlib) { + symbian:LIBS_PRIVATE += -llibz + else:if(unix|win32-g++*):LIBS_PRIVATE += -lz + else:LIBS += zdll.lib } lib.CONFIG = dummy_install diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro index efee3cd..0c9b214 100644 --- a/src/winmain/winmain.pro +++ b/src/winmain/winmain.pro @@ -11,7 +11,7 @@ win32 { win32-g++*:DEFINES += QT_NEEDS_QMAIN win32-borland:DEFINES += QT_NEEDS_QMAIN SOURCES = qtmain_win.cpp - CONFIG += png zlib + CONFIG += png CONFIG -= jpeg INCLUDEPATH += tmp $$QMAKE_INCDIR_QT/QtCore } -- cgit v0.12 From f7f4cd37c9e649ed62d2d95a6dbb71d631391b53 Mon Sep 17 00:00:00 2001 From: Constantin Makshin Date: Thu, 10 Jun 2010 16:38:44 +0200 Subject: Updated leading whitespace to make indentation more consistent Merge-request: 2411 Reviewed-by: Oswald Buddenhagen --- src/gui/painting/painting.pri | 2 +- src/network/access/access.pri | 2 +- src/svg/svg.pro | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index 1900750..a5cfb84 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -403,7 +403,7 @@ neon:*-g++* { } contains(QT_CONFIG, zlib) { - INCLUDEPATH += ../3rdparty/zlib + INCLUDEPATH += ../3rdparty/zlib } else:!contains(QT_CONFIG, no-zlib) { symbian:LIBS_PRIVATE += -llibz else:if(unix|win32-g++*):LIBS_PRIVATE += -lz diff --git a/src/network/access/access.pri b/src/network/access/access.pri index b91ccbd..173a087 100644 --- a/src/network/access/access.pri +++ b/src/network/access/access.pri @@ -59,7 +59,7 @@ SOURCES += access/qftp.cpp \ #zlib support contains(QT_CONFIG, zlib) { - INCLUDEPATH += ../3rdparty/zlib + INCLUDEPATH += ../3rdparty/zlib } else:!contains(QT_CONFIG, no-zlib) { symbian:LIBS_PRIVATE += -llibz else:if(unix|win32-g++*):LIBS_PRIVATE += -lz diff --git a/src/svg/svg.pro b/src/svg/svg.pro index fa975e7..de4bba6 100644 --- a/src/svg/svg.pro +++ b/src/svg/svg.pro @@ -44,7 +44,7 @@ symbian:TARGET.UID3=0x2001B2E2 #zlib support contains(QT_CONFIG, zlib) { - INCLUDEPATH += ../3rdparty/zlib + INCLUDEPATH += ../3rdparty/zlib } else:!contains(QT_CONFIG, no-zlib) { symbian:LIBS_PRIVATE += -llibz else:if(unix|win32-g++*):LIBS_PRIVATE += -lz -- cgit v0.12 From 9385f050620f14e3c3e4616906cf1999bf166041 Mon Sep 17 00:00:00 2001 From: Constantin Makshin Date: Thu, 10 Jun 2010 16:38:46 +0200 Subject: Replaced redundant "!contains" scopes in "contains(A, B) {...} !contains(A, B) {...}" constructions with "else" Merge-request: 2411 Reviewed-by: Oswald Buddenhagen --- src/plugins/imageformats/jpeg/jpeg.pro | 3 +-- src/plugins/imageformats/mng/mng.pro | 3 +-- src/plugins/imageformats/tiff/tiff.pro | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro index e28c5fb..0b5d389 100644 --- a/src/plugins/imageformats/jpeg/jpeg.pro +++ b/src/plugins/imageformats/jpeg/jpeg.pro @@ -24,8 +24,7 @@ symbian: { contains(QT_CONFIG, system-jpeg) { unix|win32-g++*:LIBS += -ljpeg win32:!win32-g++*:LIBS += libjpeg.lib -} -!contains(QT_CONFIG, system-jpeg) { +} else { INCLUDEPATH += ../../../3rdparty/libjpeg SOURCES += \ ../../../3rdparty/libjpeg/jaricom.c \ diff --git a/src/plugins/imageformats/mng/mng.pro b/src/plugins/imageformats/mng/mng.pro index f23a5ef..c188b47 100644 --- a/src/plugins/imageformats/mng/mng.pro +++ b/src/plugins/imageformats/mng/mng.pro @@ -16,8 +16,7 @@ symbian: { contains(QT_CONFIG, system-mng) { unix|win32-g++*:LIBS += -lmng win32:!win32-g++*:LIBS += libmng.lib -} -!contains(QT_CONFIG, system-mng) { +} else { DEFINES += MNG_BUILD_SO DEFINES += MNG_NO_INCLUDE_JNG INCLUDEPATH += ../../../3rdparty/libmng diff --git a/src/plugins/imageformats/tiff/tiff.pro b/src/plugins/imageformats/tiff/tiff.pro index 3bf203c..90868e8 100644 --- a/src/plugins/imageformats/tiff/tiff.pro +++ b/src/plugins/imageformats/tiff/tiff.pro @@ -15,8 +15,7 @@ contains(QT_CONFIG, system-tiff) { unix|win32-g++*:LIBS += -ljpeg win32:!win32-g++*:LIBS += libjpeg.lib } -} -!contains(QT_CONFIG, system-tiff) { +} else { INCLUDEPATH += ../../../3rdparty/libtiff/libtiff SOURCES += \ ../../../3rdparty/libtiff/libtiff/tif_aux.c \ -- cgit v0.12 From f50b196c3bf2b18e3b1e66f8459be94b42326dc6 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 11 Jun 2010 09:41:23 +1000 Subject: Remove accidentaly added characters. --- doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp b/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp index f77061e..174adee 100644 --- a/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp +++ b/doc/src/snippets/declarative/visualdatamodel_rootindex/main.cpp @@ -1,4 +1,4 @@ -myModel/**************************************************************************** +/**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. -- cgit v0.12 From 3b15102a287c48bb6766acf49c61471abe003bef Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 11 Jun 2010 10:08:04 +1000 Subject: Make snippet compile and pass license test, and add missing snippet file --- doc/src/snippets/declarative/listmodel-modify.qml | 97 +++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 doc/src/snippets/declarative/listmodel-modify.qml diff --git a/doc/src/snippets/declarative/listmodel-modify.qml b/doc/src/snippets/declarative/listmodel-modify.qml new file mode 100644 index 0000000..03fb314 --- /dev/null +++ b/doc/src/snippets/declarative/listmodel-modify.qml @@ -0,0 +1,97 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +import Qt 4.7 + +Rectangle { + width: 200; height: 200 + +ListModel { + id: fruitModel + + ListElement { + name: "Apple" + cost: 2.45 + attributes: [ + ListElement { description: "Core" }, + ListElement { description: "Deciduous" } + ] + } + ListElement { + name: "Orange" + cost: 3.25 + attributes: [ + ListElement { description: "Citrus" } + ] + } + ListElement { + name: "Banana" + cost: 1.95 + attributes: [ + ListElement { description: "Tropical" }, + ListElement { description: "Seedless" } + ] + } +} + +//![delegate] + Component { + id: fruitDelegate + Item { + width: 200; height: 50 + Text { text: name } + Text { text: '$' + cost; anchors.right: parent.right } + + // Double the price when clicked. + MouseArea { + anchors.fill: parent + onClicked: fruitModel.setProperty(index, "cost", cost * 2) + } + } + } +//![delegate] + +ListView { + width: 200; height: 200 + model: fruitModel + delegate: fruitDelegate +} + +} -- cgit v0.12 From 90786cb0d8dd8da2cc53258c93c0129f7c4095fc Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 11 Jun 2010 10:14:13 +1000 Subject: Avoid recursive refill() in List/GridView Task-number: QTBUG-11362 --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 16 ++++++---------- src/declarative/graphicsitems/qdeclarativelistview.cpp | 16 ++++++---------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index ed1d271..da01eb5 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -897,12 +897,10 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m timeline.reset(data.move); if (viewPos != position()) { - if (fixupDuration) { + if (fixupDuration) timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - } else { - data.move.setValue(-viewPos); - q->viewportMoved(); - } + else + timeline.set(data.move, -viewPos); } vTime = timeline.time(); } @@ -911,12 +909,10 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m qreal dist = qAbs(data.move.value() - pos); if (dist > 0) { timeline.reset(data.move); - if (fixupDuration) { + if (fixupDuration) timeline.move(data.move, pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - } else { - data.move.setValue(pos); - q->viewportMoved(); - } + else + timeline.set(data.move, pos); vTime = timeline.time(); } } else { diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 3f2b4ce..4848008 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1144,12 +1144,10 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m timeline.reset(data.move); if (viewPos != position()) { - if (fixupDuration) { + if (fixupDuration) timeline.move(data.move, -viewPos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - } else { - data.move.setValue(-viewPos); - q->viewportMoved(); - } + else + timeline.set(data.move, -viewPos); } vTime = timeline.time(); } @@ -1159,12 +1157,10 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m qreal dist = qAbs(data.move + pos); if (dist > 0) { timeline.reset(data.move); - if (fixupDuration) { + if (fixupDuration) timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - } else { - data.move.setValue(-pos); - q->viewportMoved(); - } + else + timeline.set(data.move, -pos); vTime = timeline.time(); } } -- cgit v0.12 From 6de46501e508fd8d1bbf3d73903f2a3d50218f6b Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Fri, 11 Jun 2010 10:57:17 +1000 Subject: Attempt to fix build failure on Symbian. --- mkspecs/features/symbian/data_caging_paths.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/symbian/data_caging_paths.prf b/mkspecs/features/symbian/data_caging_paths.prf index 6b709cc..a3fe7e7 100644 --- a/mkspecs/features/symbian/data_caging_paths.prf +++ b/mkspecs/features/symbian/data_caging_paths.prf @@ -74,8 +74,8 @@ exists($${EPOCROOT}epoc32/include/data_caging_paths.prf) { BOOTDATA_DIR = /resource/bootdata } -isEmpty(QT_PLUGINS_BASE_DIR): QT_PLUGINS_BASE_DIR = $$RESOURCE_FILES_DIR/qt$${QT_LIBINFIX}/plugins +QT_PLUGINS_BASE_DIR = $$RESOURCE_FILES_DIR/qt$${QT_LIBINFIX}/plugins isEmpty(QT_IMPORTS_BASE_DIR): QT_IMPORTS_BASE_DIR = $$RESOURCE_FILES_DIR/qt/imports isEmpty(HW_ZDIR): HW_ZDIR = epoc32/data/z isEmpty(REG_RESOURCE_DIR): REG_RESOURCE_DIR = /private/10003a3f/apps -isEmpty(REG_RESOURCE_IMPORT_DIR): REG_RESOURCE_IMPORT_DIR = /private/10003a3f/import/apps \ No newline at end of file +isEmpty(REG_RESOURCE_IMPORT_DIR): REG_RESOURCE_IMPORT_DIR = /private/10003a3f/import/apps -- cgit v0.12 From 779b07d29e390bac21c31b77f97e0316e6c26454 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 11 Jun 2010 11:12:20 +1000 Subject: Do not keep flush timer running once no pixmaps are detached. Task-number: QT-3500 --- src/gui/image/qpixmapcache.cpp | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp index 7a6a73f..ca21a0c 100644 --- a/src/gui/image/qpixmapcache.cpp +++ b/src/gui/image/qpixmapcache.cpp @@ -196,9 +196,10 @@ public: static QPixmapCache::KeyData* getKeyData(QPixmapCache::Key *key); QList< QPair > allPixmaps() const; - void flushDetachedPixmaps(bool nt); + bool flushDetachedPixmaps(bool nt); private: + enum { soon_time = 10000, flush_time = 30000 }; int *keyArray; int theid; int ps; @@ -236,38 +237,44 @@ QPMCache::~QPMCache() cleaning-up, and to not cut down the size of the cache while the cache is in active use. - When the last pixmap has been deleted from the cache, kill the - timer so Qt won't keep the CPU from going into sleep mode. + When the last detached pixmap has been deleted from the cache, kill the + timer so Qt won't keep the CPU from going into sleep mode. Currently + the timer is not restarted when the pixmap becomes unused, but it does + restart once something else is added (i.e. the cache space is actually needed). + + Returns true if any were removed. */ -void QPMCache::flushDetachedPixmaps(bool nt) +bool QPMCache::flushDetachedPixmaps(bool nt) { int mc = maxCost(); setMaxCost(nt ? totalCost() * 3 / 4 : totalCost() -1); setMaxCost(mc); ps = totalCost(); + bool any = false; QHash::iterator it = cacheKeys.begin(); while (it != cacheKeys.end()) { if (!contains(it.value())) { releaseKey(it.value()); it = cacheKeys.erase(it); + any = true; } else { ++it; } } + + return any; } void QPMCache::timerEvent(QTimerEvent *) { bool nt = totalCost() == ps; - flushDetachedPixmaps(nt); - - if (!size()) { + if (!flushDetachedPixmaps(nt)) { killTimer(theid); theid = 0; } else if (nt != t) { killTimer(theid); - theid = startTimer(nt ? 10000 : 30000); + theid = startTimer(nt ? soon_time : flush_time); t = nt; } } @@ -315,7 +322,7 @@ bool QPMCache::insert(const QString& key, const QPixmap &pixmap, int cost) if (success) { cacheKeys.insert(key, cacheKey); if (!theid) { - theid = startTimer(30000); + theid = startTimer(flush_time); t = false; } } else { @@ -331,7 +338,7 @@ QPixmapCache::Key QPMCache::insert(const QPixmap &pixmap, int cost) bool success = QCache::insert(cacheKey, new QPixmapCacheEntry(cacheKey, pixmap), cost); if (success) { if (!theid) { - theid = startTimer(30000); + theid = startTimer(flush_time); t = false; } } else { @@ -352,7 +359,7 @@ bool QPMCache::replace(const QPixmapCache::Key &key, const QPixmap &pixmap, int bool success = QCache::insert(cacheKey, new QPixmapCacheEntry(cacheKey, pixmap), cost); if (success) { if(!theid) { - theid = startTimer(30000); + theid = startTimer(flush_time); t = false; } const_cast(key) = cacheKey; -- cgit v0.12 From 947358481f27ae44423d218aaece36375a2f7a2d Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 11 Jun 2010 11:45:01 +1000 Subject: Fix qmlviewer test failure on windows Attempted to make window size smaller than Windows minimum. --- .../qdeclarativeviewer/tst_qdeclarativeviewer.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp index ef99173..c249414 100644 --- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp +++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp @@ -255,21 +255,21 @@ void tst_QDeclarativeViewer::resizing() viewer->setSizeToView(false); // size view to root object - rootItem->setWidth(100); + rootItem->setWidth(150); rootItem->setHeight(200); qApp->processEvents(); - QCOMPARE(rootItem->width(), 100.0); + QCOMPARE(rootItem->width(), 150.0); QCOMPARE(rootItem->height(), 200.0); - QCOMPARE(viewer->view()->size(), QSize(100, 200)); + QCOMPARE(viewer->view()->size(), QSize(150, 200)); QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); - QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(100, 200)); - QCOMPARE(viewer->size(), QSize(100, 200+viewer->menuBar()->height())); + QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(150, 200)); + QCOMPARE(viewer->size(), QSize(150, 200+viewer->menuBar()->height())); QCOMPARE(viewer->size(), viewer->sizeHint()); // do not size root object to view - viewer->resize(QSize(150,250)); - QCOMPARE(rootItem->width(), 100.0); + viewer->resize(QSize(180,250)); + QCOMPARE(rootItem->width(), 150.0); QCOMPARE(rootItem->height(), 200.0); viewer->setSizeToView(true); @@ -287,7 +287,7 @@ void tst_QDeclarativeViewer::resizing() QCOMPARE(viewer->size(), viewer->sizeHint()); // do not size view to root object - rootItem->setWidth(100); + rootItem->setWidth(150); rootItem->setHeight(200); QTRY_COMPARE(viewer->size(), QSize(250, 350)); } -- cgit v0.12 From ab0d9f5efd274c8062a03fb3a1c83e4d16afd6fb Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 11 Jun 2010 11:13:37 +1000 Subject: Doc improvements, including snippet fixes, linking to examples, making docs more consistent --- doc/src/declarative/pics/repeater-simple.png | Bin 0 -> 404 bytes doc/src/snippets/declarative/repeater-index.qml | 56 ------------ .../snippets/declarative/repeater-modeldata.qml | 52 ------------ doc/src/snippets/declarative/repeater.qml | 53 +++++++++--- doc/src/snippets/declarative/rotation.qml | 56 ++++++------ doc/src/snippets/declarative/systempalette.qml | 55 ++++++++++++ .../graphicsitems/qdeclarativeanimatedimage.cpp | 7 +- .../graphicsitems/qdeclarativeflickable.cpp | 8 +- .../graphicsitems/qdeclarativeimage.cpp | 2 + src/declarative/graphicsitems/qdeclarativeitem.cpp | 12 +-- .../graphicsitems/qdeclarativelistview.cpp | 2 + .../graphicsitems/qdeclarativeloader.cpp | 28 ++++-- .../graphicsitems/qdeclarativepositioners.cpp | 6 ++ .../graphicsitems/qdeclarativerepeater.cpp | 94 +++++++++++++-------- src/declarative/graphicsitems/qdeclarativetext.cpp | 16 ++-- .../graphicsitems/qdeclarativetextedit.cpp | 51 ++++++----- .../graphicsitems/qdeclarativetextinput.cpp | 25 ++++-- src/declarative/util/qdeclarativefontloader.cpp | 21 +++-- src/declarative/util/qdeclarativesystempalette.cpp | 42 +++++---- 19 files changed, 324 insertions(+), 262 deletions(-) create mode 100644 doc/src/declarative/pics/repeater-simple.png delete mode 100644 doc/src/snippets/declarative/repeater-index.qml delete mode 100644 doc/src/snippets/declarative/repeater-modeldata.qml create mode 100644 doc/src/snippets/declarative/systempalette.qml diff --git a/doc/src/declarative/pics/repeater-simple.png b/doc/src/declarative/pics/repeater-simple.png new file mode 100644 index 0000000..6da6295 Binary files /dev/null and b/doc/src/declarative/pics/repeater-simple.png differ diff --git a/doc/src/snippets/declarative/repeater-index.qml b/doc/src/snippets/declarative/repeater-index.qml deleted file mode 100644 index 3eee742..0000000 --- a/doc/src/snippets/declarative/repeater-index.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 - -Rectangle { - width: 50; height: childrenRect.height; color: "white" - -//! [0] - Column { - Repeater { - model: 10 - Text { text: "I'm item " + index } - } - } -//! [0] -} - diff --git a/doc/src/snippets/declarative/repeater-modeldata.qml b/doc/src/snippets/declarative/repeater-modeldata.qml deleted file mode 100644 index 3b4cc6d..0000000 --- a/doc/src/snippets/declarative/repeater-modeldata.qml +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 - -//! [0] -Column { - Repeater { - model: ["apples", "oranges", "pears"] - Text { text: "Data: " + modelData } - } -} -//! [0] - diff --git a/doc/src/snippets/declarative/repeater.qml b/doc/src/snippets/declarative/repeater.qml index 8b4d9cb..be5d62d 100644 --- a/doc/src/snippets/declarative/repeater.qml +++ b/doc/src/snippets/declarative/repeater.qml @@ -39,19 +39,52 @@ ** ****************************************************************************/ +//! [import] import Qt 4.7 +//! [import] -Rectangle { - width: 220; height: 20; color: "white" +Row { -//! [0] - Row { - Rectangle { width: 10; height: 20; color: "red" } - Repeater { - model: 10 - Rectangle { width: 20; height: 20; radius: 10; color: "green" } +//! [simple] +Row { + Repeater { + model: 3 + Rectangle { + width: 100; height: 40 + border.width: 1 + color: "yellow" } - Rectangle { width: 10; height: 20; color: "blue" } } -//! [0] +} +//! [simple] + +//! [index] +Column { + Repeater { + model: 10 + Text { text: "I'm item " + index } + } +} +//! [index] + +//! [modeldata] +Column { + Repeater { + model: ["apples", "oranges", "pears"] + Text { text: "Data: " + modelData } + } +} +//! [modeldata] + +//! [layout] +Row { + Rectangle { width: 10; height: 20; color: "red" } + Repeater { + model: 10 + Rectangle { width: 20; height: 20; radius: 10; color: "green" } + } + Rectangle { width: 10; height: 20; color: "blue" } +} +//! [layout] + } diff --git a/doc/src/snippets/declarative/rotation.qml b/doc/src/snippets/declarative/rotation.qml index 0fb9a61..5437292 100644 --- a/doc/src/snippets/declarative/rotation.qml +++ b/doc/src/snippets/declarative/rotation.qml @@ -38,37 +38,33 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - +//! [0] import Qt 4.7 -Rectangle { - width: 360; height: 80 - color: "white" -//! [0] - Row { - x: 10; y: 10 - spacing: 10 - Image { source: "pics/qt.png" } - Image { - source: "pics/qt.png" - transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 18 } - smooth: true - } - Image { - source: "pics/qt.png" - transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 36 } - smooth: true - } - Image { - source: "pics/qt.png" - transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 54 } - smooth: true - } - Image { - source: "pics/qt.png" - transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 72 } - smooth: true - } +Row { + x: 10; y: 10 + spacing: 10 + + Image { source: "pics/qt.png" } + Image { + source: "pics/qt.png" + transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 18 } + smooth: true + } + Image { + source: "pics/qt.png" + transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 36 } + smooth: true + } + Image { + source: "pics/qt.png" + transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 54 } + smooth: true + } + Image { + source: "pics/qt.png" + transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 72 } + smooth: true } -//! [0] } +//! [0] diff --git a/doc/src/snippets/declarative/systempalette.qml b/doc/src/snippets/declarative/systempalette.qml new file mode 100644 index 0000000..98b333e --- /dev/null +++ b/doc/src/snippets/declarative/systempalette.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +//![0] +import Qt 4.7 + +Rectangle { + SystemPalette { id: myPalette; colorGroup: SystemPalette.Active } + + width: 640; height: 480 + color: myPalette.window + + Text { + anchors.fill: parent + text: "Hello!"; color: myPalette.windowText + } +} +//![0] diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp index 261cc5c..d8527d3 100644 --- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp @@ -63,9 +63,10 @@ QT_BEGIN_NAMESPACE \inherits Image \since 4.7 - This item provides for playing animations stored as images containing a series of frames, - such as GIF files. The full list of supported formats can be determined with - QMovie::supportedFormats(). + The AnimatedImage element provides for playing animations stored as images containing a series of frames, + such as GIF files. + + The full list of supported formats can be determined with QMovie::supportedFormats(). \table \row diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 10dc0f8..fdc1444 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -351,6 +351,8 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd() Flickable places its children on a surface that can be dragged and flicked. \code + import Qt 4.7 + Flickable { width: 200; height: 200 contentWidth: image.width; contentHeight: image.height @@ -1039,11 +1041,11 @@ QDeclarativeListProperty QDeclarativeFlickable::flickableChildr The \c boundsBehavior can be one of: \list - \o \e Flickable.StopAtBounds - the contents can not be dragged beyond the boundary + \o Flickable.StopAtBounds - the contents can not be dragged beyond the boundary of the flickable, and flicks will not overshoot. - \o \e Flickable.DragOverBounds - the contents can be dragged beyond the boundary + \o Flickable.DragOverBounds - the contents can be dragged beyond the boundary of the Flickable, but flicks will not overshoot. - \o \e Flickable.DragAndOvershootBounds (default) - the contents can be dragged + \o Flickable.DragAndOvershootBounds (default) - the contents can be dragged beyond the boundary of the Flickable, and can overshoot the boundary when flicked. \endlist diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 94240c2..463ad5a 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -83,6 +83,8 @@ QT_BEGIN_NAMESPACE that images which do not form part of the user interface have their size bounded via the \l sourceSize property. This is especially important for content that is loaded from external sources or provided by the user. + + \sa {declarative/imageelements/image}{Image example} */ /*! diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 7ab280e..18806e7 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -86,8 +86,8 @@ QT_BEGIN_NAMESPACE The Transform elements let you create and control advanced transformations that can be configured independently using specialized properties. - You can assign any number of Transform elements to an Item. Each Transform is applied in order, - one at a time, to the Item it's assigned to. + You can assign any number of Transform elements to an \l Item. Each Transform is applied in order, + one at a time. */ /*! @@ -134,9 +134,9 @@ QT_BEGIN_NAMESPACE /*! \qmlclass Scale QGraphicsScale \since 4.7 - \brief The Scale object provides a way to scale an Item. + \brief The Scale element provides a way to scale an Item. - The Scale object gives more control over scaling than using Item's scale property. Specifically, + The Scale element gives more control over scaling than using \l Item's \l{Item::scale}{scale} property. Specifically, it allows a different scale for the x and y axes, and allows the scale to be relative to an arbitrary point. @@ -148,6 +148,8 @@ QT_BEGIN_NAMESPACE transform: Scale { origin.x: 25; origin.y: 25; xScale: 3} } \endqml + + \sa Rotate, Translate */ /*! @@ -175,7 +177,7 @@ QT_BEGIN_NAMESPACE \since 4.7 \brief The Rotation object provides a way to rotate an Item. - The Rotation object gives more control over rotation than using Item's rotation property. + The Rotation object gives more control over rotation than using \l Item's \l{Item::rotation}{rotation} property. Specifically, it allows (z axis) rotation to be relative to an arbitrary point. The following example rotates a Rectangle around its interior point 25, 25: diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 4848008..5cead2b 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1358,6 +1358,8 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m is not clipped by another item or the screen, it will be necessary to set \e {clip: true} in order to have the out of view items clipped nicely. + + \sa ListModel, GridView */ QDeclarativeListView::QDeclarativeListView(QDeclarativeItem *parent) diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index 898c5a5..25b1119 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -112,27 +112,35 @@ void QDeclarativeLoaderPrivate::initResize() \inherits Item \brief The Loader item allows dynamically loading an Item-based - subtree from a QML URL or Component. + subtree from a URL or Component. - Loader instantiates an item from a component. The component to - instantiate may be specified directly by the \l sourceComponent + The Loader element instantiates an item from a component. The component to + be instantiated may be specified directly by the \l sourceComponent property, or loaded from a URL via the \l source property. - It is also an effective means of delaying the creation of a component - until it is required: + Loader can be used to delay the creation of a component until it is required. + For example, this loads "Page1.qml" as a component into the \l Loader element + when the \l MouseArea is clicked: + \code import Qt 4.7 - Loader { id: pageLoader } + Item { + width: 200; height: 200 - Rectangle { MouseArea { anchors.fill: parent onClicked: pageLoader.source = "Page1.qml" } + + Loader { id: pageLoader } } \endcode + Note that Loader is like any other graphical Item and needs to be positioned + and sized accordingly to become visible. When a component is loaded, the + Loader is automatically resized to the size of the component. + If the Loader source is changed, any previous items instantiated will be destroyed. Setting \l source to an empty string, or setting sourceComponent to \e undefined @@ -225,7 +233,7 @@ void QDeclarativeLoader::setSource(const QUrl &url) /*! \qmlproperty Component Loader::sourceComponent - The sourceComponent property holds the \l{Component} to instantiate. + This property holds the \l{Component} to instantiate. \qml Item { @@ -239,6 +247,8 @@ void QDeclarativeLoader::setSource(const QUrl &url) } \endqml + Note this value must hold a \l Component object; it cannot be a \l Item. + \sa source, progress */ @@ -401,7 +411,7 @@ void QDeclarativeLoader::componentComplete() /*! \qmlsignal Loader::onLoaded() - This handler is called when the \l status becomes Loader.Ready, or on successful + This handler is called when the \l status becomes \c Loader.Ready, or on successful initial load. */ diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index 18618ab..ad61bab 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -358,6 +358,7 @@ Column { positioner may exhibit strange behaviour. If you need to perform any of these actions, consider positioning the items without the use of a Column. + \sa Row, {declarative/positioners}{Positioners example} */ /*! \qmlproperty Transition Column::add @@ -500,6 +501,8 @@ Row { width of a child depend on the position of a child, then the positioner may exhibit strange behaviour. If you need to perform any of these actions, consider positioning the items without the use of a Row. + + \sa Column, {declarative/positioners}{Positioners example} */ /*! \qmlproperty Transition Row::add @@ -653,6 +656,8 @@ Grid { width or height of a child depend on the position of a child, then the positioner may exhibit strange behaviour. If you need to perform any of these actions, consider positioning the items without the use of a Grid. + + \sa Flow, {declarative/positioners}{Positioners example} */ /*! \qmlproperty Transition Grid::add @@ -908,6 +913,7 @@ void QDeclarativeGrid::reportConflictingAnchors() positioner may exhibit strange behaviour. If you need to perform any of these actions, consider positioning the items without the use of a Flow. + \sa Grid, {declarative/positioners}{Positioners example} */ /*! \qmlproperty Transition Flow::add diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp index 691cfa2..995e22a 100644 --- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp +++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp @@ -65,55 +65,75 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() \since 4.7 \inherits Item - \brief The Repeater item allows you to repeat an Item-based component using a model. + \brief The Repeater element allows you to repeat an Item-based component using a model. - The Repeater item is used to create a large number of - similar items. For each entry in the model, an item is instantiated - in a context seeded with data from the model. If the repeater will - be instantiating a large number of instances, it may be more efficient to - use one of Qt Declarative's \l {xmlViews}{view items}. + The Repeater element is used to create a large number of + similar items. Like other view elements, a Repeater has a \l model and a \l delegate: + for each entry in the model, the delegate is instantiated + in a context seeded with data from the model. A Repeater item is usually + enclosed in a positioner element such as \l Row or \l Column to visually + position the multiple delegate items created by the Repeater. - The model may be either an object list, a string list, a number or a Qt model. - In each case, the data element and the index is exposed to each instantiated - component. - - The index is always exposed as an accessible \c index property. - In the case of an object or string list, the data element (of type string - or object) is available as the \c modelData property. In the case of a Qt model, - all roles are available as named properties just like in the view classes. + The following Repeater creates three instances of a \l Rectangle item within + a \l Row: + + \snippet doc/src/snippets/declarative/repeater.qml import + \codeline + \snippet doc/src/snippets/declarative/repeater.qml simple + + \image repeater-simple.png + + The \l model of a Repeater can be specified as a model object, a number, a string list + or an object list. If a model object is used, the + \l delegate can access the model roles as named properties, just as for view elements like + ListView and GridView. - The following example shows how to use the \c index property inside the instantiated - items: + The \l delegate can also access two additional properties: - \snippet doc/src/snippets/declarative/repeater-index.qml 0 - \image repeater-index.png + \list + \o \c index - the index of the delegate's item + \o \c modelData - the data element for the delegate, which is useful where the \l model is a string or object list + \endlist - The repeater could also use the \c modelData property to reference the data for a + Here is a Repeater that uses the \c index property inside the instantiated items: + + \table + \row + \o \snippet doc/src/snippets/declarative/repeater.qml index + \o \image repeater-index.png + \endtable + + Here is another Repeater that uses the \c modelData property to reference the data for a particular index: - \snippet doc/src/snippets/declarative/repeater-modeldata.qml 0 - \image repeater-modeldata.png + \table + \row + \o \snippet doc/src/snippets/declarative/repeater.qml modeldata + \o \image repeater-modeldata.png + \endtable Items instantiated by the Repeater are inserted, in order, as children of the Repeater's parent. The insertion starts immediately after - the repeater's position in its parent stacking list. This is to allow - you to use a Repeater inside a layout. The following QML example shows how - the instantiated items would visually appear stacked between the red and - blue rectangles. - - \snippet doc/src/snippets/declarative/repeater.qml 0 + the repeater's position in its parent stacking list. This allows + a Repeater to be used inside a layout. For example, the following Repeater's + items are stacked between a red rectangle and a blue rectangle: + + \snippet doc/src/snippets/declarative/repeater.qml layout \image repeater.png - The repeater instance continues to own all items it instantiates, even - if they are otherwise manipulated. It is illegal to manually remove an item - created by the Repeater. + A Repeater item owns all items it instantiates. Removing or dynamically destroying + an item created by a Repeater results in unpredictable behavior. - \note Repeater is Item-based, and cannot be used to repeat non-Item-derived objects. + Note that if a repeater is + required to instantiate a large number of items, it may be more efficient to + use other view elements such as ListView. + + \note Repeater is \l {Item}-based, and can only repeat \l {Item}-derived objects. For example, it cannot be used to repeat QtObjects. \badcode Item { - //XXX illegal. Can't repeat QtObject as it doesn't derive from Item. + //XXX does not work! Can't repeat QtObject as it doesn't derive from Item. Repeater { model: 10 QtObject {} @@ -149,7 +169,15 @@ QDeclarativeRepeater::~QDeclarativeRepeater() The model providing data for the repeater. - The model may be either an object list, a string list, a number or a Qt model. + This property can be set to any of the following: + + \list + \o A number that indicates the number of delegates to be created + \o A model (e.g. a ListModel item, or a QAbstractItemModel subclass) + \o A string list + \o An object list + \endlist + In each case, the data element and the index is exposed to each instantiated component. The index is always exposed as an accessible \c index property. In the case of an object or string list, the data element (of type string diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 3b89ad9..0fe3c74 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -119,8 +119,6 @@ QSet QTextDocumentWithImageResources::errors; A Text item can display both plain and rich text. For example: \qml - import Qt 4.7 - Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" } Text { text: "Hello World!" } \endqml @@ -128,10 +126,10 @@ QSet QTextDocumentWithImageResources::errors; \image declarative-text.png If height and width are not explicitly set, Text will attempt to determine how - much room is needed and set it accordingly. Unless \c wrapMode is set, it will always + much room is needed and set it accordingly. Unless \l wrapMode is set, it will always prefer width to height (all text will be placed on a single line). - The \c elide property can alternatively be used to fit a single line of + The \l elide property can alternatively be used to fit a single line of plain text to a set width. Note that the \l{Supported HTML Subset} is limited. Also, if the text contains @@ -507,13 +505,11 @@ void QDeclarativeText::setVAlign(VAlignment align) wrap if an explicit width has been set. wrapMode can be one of: \list - \o Text.NoWrap - no wrapping will be performed. If the text contains insufficient newlines, then implicitWidth will exceed a set width. - \o Text.WordWrap - wrapping is done on word boundaries only. If a word is too long, implicitWidth will exceed a set width. + \o Text.NoWrap (default) - no wrapping will be performed. If the text contains insufficient newlines, then \l paintedWidth will exceed a set width. + \o Text.WordWrap - wrapping is done on word boundaries only. If a word is too long, \l paintedWidth will exceed a set width. \o Text.WrapAnywhere - wrapping is done at any point on a line, even if it occurs in the middle of a word. \o Text.Wrap - if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word. \endlist - - The default is Text.NoWrap. */ QDeclarativeText::WrapMode QDeclarativeText::wrapMode() const { @@ -543,13 +539,13 @@ void QDeclarativeText::setWrapMode(WrapMode mode) Supported text formats are: \list - \o Text.AutoText + \o Text.AutoText (default) \o Text.PlainText \o Text.RichText \o Text.StyledText \endlist - The default is Text.AutoText. If the text format is Text.AutoText the text element + If the text format is \c Text.AutoText the text element will automatically determine whether the text should be treated as rich text. This determination is made using Qt::mightBeRichText(). diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index c086851..451f0fa 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -62,25 +62,28 @@ QT_BEGIN_NAMESPACE /*! \qmlclass TextEdit QDeclarativeTextEdit \since 4.7 - \brief The TextEdit item allows you to add editable formatted text to a scene. + \brief The TextEdit item displays multiple lines of editable formatted text. \inherits Item + The TextEdit item displays a block of editable, formatted text. + It can display both plain and rich text. For example: \qml TextEdit { - id: edit + width: 240 text: "Hello World!" - focus: true font.family: "Helvetica" font.pointSize: 20 color: "blue" - width: 240 + focus: true } \endqml \image declarative-textedit.gif + Setting \l {Item::focus}{focus} to \c true enables the TextEdit item to receive keyboard focus. + Note that the TextEdit does not implement scrolling, following the cursor, or other behaviors specific to a look-and-feel. For example, to add flickable scrolling that follows the cursor: @@ -96,7 +99,7 @@ TextEdit { You can translate between cursor positions (characters from the start of the document) and pixel points using positionAt() and positionToRectangle(). - \sa Text + \sa Text, TextInput */ /*! @@ -206,7 +209,7 @@ QString QDeclarativeTextEdit::text() const Sets the font size in pixels. Using this function makes the font device dependent. - Use \c pointSize to set the size of the font in a device independent manner. + Use \l pointSize to set the size of the font in a device independent manner. */ /*! @@ -453,12 +456,22 @@ void QDeclarativeTextEdit::setSelectedTextColor(const QColor &color) \qmlproperty enumeration TextEdit::horizontalAlignment \qmlproperty enumeration TextEdit::verticalAlignment - Sets the horizontal and vertical alignment of the text within the TextEdit items + Sets the horizontal and vertical alignment of the text within the TextEdit item's width and height. By default, the text is top-left aligned. - The valid values for \c horizontalAlignment are \c TextEdit.AlignLeft, \c TextEdit.AlignRight and - \c TextEdit.AlignHCenter. The valid values for \c verticalAlignment are \c TextEdit.AlignTop, \c TextEdit.AlignBottom - and \c TextEdit.AlignVCenter. + Valid values for \c horizontalAlignment are: + \list + \o TextEdit.AlignLeft (default) + \o TextEdit.AlignRight + \o TextEdit.AlignHCenter + \endlist + + Valid values for \c verticalAlignment are: + \list + \o TextEdit.AlignTop (default) + \o TextEdit.AlignBottom + \c TextEdit.AlignVCenter + \endlist */ QDeclarativeTextEdit::HAlignment QDeclarativeTextEdit::hAlign() const { @@ -529,8 +542,8 @@ void QDeclarativeTextEdit::setWrapMode(WrapMode mode) /*! \qmlproperty real TextEdit::paintedWidth - Returns the width of the text, including width past the width - which is covered due to insufficient wrapping if WrapMode is set. + Returns the width of the text, including the width past the width + which is covered due to insufficient wrapping if \l wrapMode is set. */ qreal QDeclarativeTextEdit::paintedWidth() const { @@ -540,8 +553,8 @@ qreal QDeclarativeTextEdit::paintedWidth() const /*! \qmlproperty real TextEdit::paintedHeight - Returns the height of the text, including height past the height - which is covered due to there being more text than fits in the set height. + Returns the height of the text, including the height past the height + that is covered if the text does not fit within the set height. */ qreal QDeclarativeTextEdit::paintedHeight() const { @@ -567,10 +580,10 @@ QRectF QDeclarativeTextEdit::positionToRectangle(int pos) const /*! \qmlmethod int TextEdit::positionAt(x,y) - Returns the text position closest to pixel position (\a x,\a y). + Returns the text position closest to pixel position (\a x, \a y). Position 0 is before the first character, position 1 is after the first character - but before the second, and so on until position text.length, which is after all characters. + but before the second, and so on until position \l {text}.length, which is after all characters. */ int QDeclarativeTextEdit::positionAt(int x, int y) const { @@ -1082,7 +1095,7 @@ void QDeclarativeTextEdit::copy() /*! \qmlmethod TextEdit::paste() - Relaces the currently selected text by the contents of the system clipboard. + Replaces the currently selected text by the contents of the system clipboard. */ void QDeclarativeTextEdit::paste() { @@ -1395,7 +1408,7 @@ void QDeclarativeTextEditPrivate::updateDefaultTextOption() the panels are automatically opened when TextEdit element gains focus. Input panels are always closed if no editor owns focus. - . You can disable the automatic behavior by setting the property \c focusOnPress to false + You can disable the automatic behavior by setting the property \c focusOnPress to false and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement the behavior you want. @@ -1446,7 +1459,7 @@ void QDeclarativeTextEdit::openSoftwareInputPanel() the panels are automatically opened when TextEdit element gains focus. Input panels are always closed if no editor owns focus. - . You can disable the automatic behavior by setting the property \c focusOnPress to false + You can disable the automatic behavior by setting the property \c focusOnPress to false and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement the behavior you want. diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 01b1447..ad7a3a7 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -56,17 +56,20 @@ QT_BEGIN_NAMESPACE /*! \qmlclass TextInput QDeclarativeTextInput \since 4.7 - \brief The TextInput item allows you to add an editable line of text to a scene. + \brief The TextInput item displays an editable line of text. \inherits Item - TextInput can only display a single line of text, and can only display - plain text. However it can provide addition input constraints on the text. + The TextInput element displays a single line of editable plain text. - Input constraints include setting a QValidator, an input mask, or a - maximum input length. + TextInput is used to accept a line of text input. Input constraints + can be placed on a TextInput item (for example, through a \l validator or \l inputMask), + and setting \l echoMode to an appropriate value enables TextInput to be used for + a password input field. On Mac OS X, the Up/Down key bindings for Home/End are explicitly disabled. If you want such bindings (on any platform), you will need to construct them in QML. + + \sa TextEdit, Text */ QDeclarativeTextInput::QDeclarativeTextInput(QDeclarativeItem* parent) : QDeclarativePaintedItem(*(new QDeclarativeTextInputPrivate), parent) @@ -558,7 +561,7 @@ void QDeclarativeTextInput::setAutoScroll(bool b) /*! \qmlclass IntValidator QIntValidator - This element provides a validator for integer values + This element provides a validator for integer values. */ /*! \qmlproperty int IntValidator::top @@ -601,10 +604,14 @@ void QDeclarativeTextInput::setAutoScroll(bool b) \qmlproperty enumeration DoubleValidator::notation This property holds the notation of how a string can describe a number. - The values for this property are DoubleValidator.StandardNotation or DoubleValidator.ScientificNotation. - If this property is set to DoubleValidator.ScientificNotation, the written number may have an exponent part(i.e. 1.5E-2). + The possible values for this property are: + + \list + \o DoubleValidator.StandardNotation + \o DoubleValidator.ScientificNotation (default) + \endlist - By default, this property is set to DoubleValidator.ScientificNotation. + If this property is set to DoubleValidator.ScientificNotation, the written number may have an exponent part (e.g. 1.5E-2). */ /*! diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp index 3c2e239..83bdb17 100644 --- a/src/declarative/util/qdeclarativefontloader.cpp +++ b/src/declarative/util/qdeclarativefontloader.cpp @@ -79,18 +79,27 @@ public: /*! \qmlclass FontLoader QDeclarativeFontLoader \since 4.7 - \brief This item allows using fonts by name or url. + \brief The FontLoader element allows fonts to be loaded by name or URL. - Example: + The FontLoader element is used to load fonts by name or URL. + + The \l status indicates when the font has been loaded, which is useful + for fonts loaded from remote sources. + + For example: \qml import Qt 4.7 - FontLoader { id: fixedFont; name: "Courier" } - FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" } + Column { + FontLoader { id: fixedFont; name: "Courier" } + FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" } - Text { text: "Fixed-size font"; font.family: fixedFont.name } - Text { text: "Fancy font"; font.family: webFont.name } + Text { text: "Fixed-size font"; font.family: fixedFont.name } + Text { text: "Fancy font"; font.family: webFont.name } + } \endqml + + \sa {declarative/text/fonts}{Fonts example} */ QDeclarativeFontLoader::QDeclarativeFontLoader(QObject *parent) : QObject(*(new QDeclarativeFontLoaderPrivate), parent) diff --git a/src/declarative/util/qdeclarativesystempalette.cpp b/src/declarative/util/qdeclarativesystempalette.cpp index 6c62446..c334859 100644 --- a/src/declarative/util/qdeclarativesystempalette.cpp +++ b/src/declarative/util/qdeclarativesystempalette.cpp @@ -59,22 +59,25 @@ public: /*! \qmlclass SystemPalette QDeclarativeSystemPalette \since 4.7 - \brief The SystemPalette item gives access to the Qt palettes. - \sa QPalette + \brief The SystemPalette element provides access to the Qt palettes. - Example: - \qml - SystemPalette { id: myPalette; colorGroup: Qt.Active } + The SystemPalette element provides access to the Qt application + palettes. This provides information about the standard colors used + for application windows, buttons and other features. These colors + are grouped into three \e {color groups}: \c Active, \c Inactive, + and \c Disabled. See the QPalette documentation for details about + color groups and the properties provided by SystemPalette. - Rectangle { - width: 640; height: 480 - color: myPalette.window - Text { - anchors.fill: parent - text: "Hello!"; color: myPalette.windowText - } - } - \endqml + This can be used to color items in a way that provides a more + native look and feel. + + The following example creates a palette from the \c Active color + group and uses this to color the window and text items + appropriately: + + \snippet doc/src/snippets/declarative/systempalette.qml 0 + + \sa QPalette */ QDeclarativeSystemPalette::QDeclarativeSystemPalette(QObject *parent) : QObject(*(new QDeclarativeSystemPalettePrivate), parent) @@ -258,10 +261,15 @@ QColor QDeclarativeSystemPalette::highlightedText() const } /*! - \qmlproperty QDeclarativeSystemPalette::ColorGroup SystemPalette::colorGroup + \qmlproperty enumeration SystemPalette::colorGroup + + The color group of the palette. This can be one of: - The color group of the palette. It can be Active, Inactive or Disabled. - Active is the default. + \list + \o SystemPalette.Active (default) + \o SystemPalette.Inactive + \o SystemPalette.Disabled + \endlist \sa QPalette::ColorGroup */ -- cgit v0.12 From 6f420a858afabf906977072f5efc67cdfc831d99 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 11 Jun 2010 11:45:55 +1000 Subject: Minor doc fixes --- src/declarative/graphicsitems/qdeclarativeborderimage.cpp | 2 +- src/declarative/graphicsitems/qdeclarativeimage.cpp | 2 +- src/declarative/graphicsitems/qdeclarativemousearea.cpp | 4 ++-- src/declarative/graphicsitems/qdeclarativetext.cpp | 2 +- src/declarative/graphicsitems/qdeclarativetextedit.cpp | 2 +- src/declarative/qml/qdeclarativeworkerscript.cpp | 5 ++++- src/declarative/util/qdeclarativelistmodel.cpp | 2 +- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 1f1e453..cf458da 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -138,7 +138,7 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() BorderImage can handle any image format supported by Qt, loaded from any URL scheme supported by Qt. - It can also handle .sci files, which are a Qml-specific format. A .sci file uses a simple text-based format that specifies + It can also handle .sci files, which are a QML-specific format. A .sci file uses a simple text-based format that specifies the borders, the image file and the tile rules. The following .sci file sets the borders to 10 on each side for the image \c picture.png: diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 463ad5a..ec08517 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -97,7 +97,7 @@ QT_BEGIN_NAMESPACE Image { source: "pics/star.png" } \endqml - A QDeclarativeImage object can be instantiated in Qml using the tag \l Image. + A QDeclarativeImage object can be instantiated in QML using the tag \l Image. */ QDeclarativeImage::QDeclarativeImage(QDeclarativeItem *parent) diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index a68e664..c4956df 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -305,12 +305,12 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() /*! \internal \class QDeclarativeMouseArea - \brief The QDeclarativeMouseArea class provides a simple mouse handling abstraction for use within Qml. + \brief The QDeclarativeMouseArea class provides a simple mouse handling abstraction for use within QML. All QDeclarativeItem derived classes can do mouse handling but the QDeclarativeMouseArea class exposes mouse handling data as properties and tracks flicking and dragging of the mouse. - A QDeclarativeMouseArea object can be instantiated in Qml using the tag \l MouseArea. + A QDeclarativeMouseArea object can be instantiated in QML using the tag \l MouseArea. */ QDeclarativeMouseArea::QDeclarativeMouseArea(QDeclarativeItem *parent) : QDeclarativeItem(*(new QDeclarativeMouseAreaPrivate), parent) diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 0fe3c74..c2e0d67 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -161,7 +161,7 @@ QSet QTextDocumentWithImageResources::errors; The \c elide property can alternatively be used to fit a line of plain text to a set width. - A QDeclarativeText object can be instantiated in Qml using the tag \c Text. + A QDeclarativeText object can be instantiated in QML using the tag \c Text. */ QDeclarativeText::QDeclarativeText(QDeclarativeItem *parent) : QDeclarativeItem(*(new QDeclarativeTextPrivate), parent) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 451f0fa..3b4f2a7 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -113,7 +113,7 @@ TextEdit { \image declarative-textedit.png - A QDeclarativeTextEdit object can be instantiated in Qml using the tag \c <TextEdit>. + A QDeclarativeTextEdit object can be instantiated in QML using the tag \c <TextEdit>. */ /*! diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp index e0ee84f..aec84a6 100644 --- a/src/declarative/qml/qdeclarativeworkerscript.cpp +++ b/src/declarative/qml/qdeclarativeworkerscript.cpp @@ -523,7 +523,7 @@ void QDeclarativeWorkerScriptEngine::run() Messages can be passed between the new thread and the parent thread using \l sendMessage() and the \l {WorkerScript::onMessage}{onMessage()} handler. - Here is an example: + An example: \snippet doc/src/snippets/declarative/workerscript.qml 0 @@ -541,6 +541,9 @@ void QDeclarativeWorkerScriptEngine::run() called, triggering the \tt WorkerScript.onMessage() handler in \tt script.js. This in turn sends a reply message that is then received by the \tt onMessage() handler of \tt myWorker. + + \sa {declarative/threading/workerscript}{WorkerScript example}, + {declarative/threading/threadedlistmodel}{Threaded ListModel example} */ QDeclarativeWorkerScript::QDeclarativeWorkerScript(QObject *parent) : QObject(parent), m_engine(0), m_scriptId(-1), m_componentComplete(true) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 78a3207..ff83227 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -160,7 +160,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM In addition, the WorkerScript cannot add any list data to the model. - \sa {qmlmodels}{Data Models}, WorkerScript, QtDeclarative + \sa {qmlmodels}{Data Models}, {declarative/threading/threadedlistmodel}{Threaded ListModel example}, QtDeclarative */ -- cgit v0.12 From 6ecb66ef888fd4c1f3e92ca6de8a227a96da3ec1 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Fri, 11 Jun 2010 12:09:02 +1000 Subject: Revert "Attempt to fix build failure on Symbian." This reverts commit 6de46501e508fd8d1bbf3d73903f2a3d50218f6b. --- mkspecs/features/symbian/data_caging_paths.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/symbian/data_caging_paths.prf b/mkspecs/features/symbian/data_caging_paths.prf index a3fe7e7..6b709cc 100644 --- a/mkspecs/features/symbian/data_caging_paths.prf +++ b/mkspecs/features/symbian/data_caging_paths.prf @@ -74,8 +74,8 @@ exists($${EPOCROOT}epoc32/include/data_caging_paths.prf) { BOOTDATA_DIR = /resource/bootdata } -QT_PLUGINS_BASE_DIR = $$RESOURCE_FILES_DIR/qt$${QT_LIBINFIX}/plugins +isEmpty(QT_PLUGINS_BASE_DIR): QT_PLUGINS_BASE_DIR = $$RESOURCE_FILES_DIR/qt$${QT_LIBINFIX}/plugins isEmpty(QT_IMPORTS_BASE_DIR): QT_IMPORTS_BASE_DIR = $$RESOURCE_FILES_DIR/qt/imports isEmpty(HW_ZDIR): HW_ZDIR = epoc32/data/z isEmpty(REG_RESOURCE_DIR): REG_RESOURCE_DIR = /private/10003a3f/apps -isEmpty(REG_RESOURCE_IMPORT_DIR): REG_RESOURCE_IMPORT_DIR = /private/10003a3f/import/apps +isEmpty(REG_RESOURCE_IMPORT_DIR): REG_RESOURCE_IMPORT_DIR = /private/10003a3f/import/apps \ No newline at end of file -- cgit v0.12 From 90a671581d2eef96f7ab5b04c1db798da24d0f6b Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 11 Jun 2010 12:01:50 +1000 Subject: Fixed error deploying qsymbianbearer.qtplugin on Symbian. EPOCROOT already ends with a slash, adding another one breaks it. --- src/s60installs/s60installs.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 963515e..e360a84 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -58,7 +58,7 @@ symbian: { bearerStubZ = $${EPOCROOT}$${HW_ZDIR}$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin BLD_INF_RULES.prj_exports += \ "qsymbianbearer.qtplugin $$bearerStubZ" \ - "qsymbianbearer.qtplugin $${EPOCROOT}/epoc32/winscw/c$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin" + "qsymbianbearer.qtplugin $${EPOCROOT}epoc32/winscw/c$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin" } else { pluginLocations = $$QT_BUILD_TREE/plugins/s60 bearerPluginLocation = $$QT_BUILD_TREE/plugins/bearer -- cgit v0.12 From 5e99815f85c953760d027be50caea5a386b6b710 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 11 Jun 2010 14:15:30 +1000 Subject: Fix test - sizeHint should not change after initial load. Also use QTRY_COMPARE for some tests. --- .../declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp index c249414..f30f758 100644 --- a/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp +++ b/tests/auto/declarative/qdeclarativeviewer/tst_qdeclarativeviewer.cpp @@ -93,7 +93,7 @@ void tst_QDeclarativeViewer::orientation() QCOMPARE(rootItem->width(), 200.0); QCOMPARE(rootItem->height(), 300.0); - QCOMPARE(viewer->view()->size(), QSize(200, 300)); + QTRY_COMPARE(viewer->view()->size(), QSize(200, 300)); QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300)); QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height())); QCOMPARE(viewer->size(), viewer->sizeHint()); @@ -103,7 +103,7 @@ void tst_QDeclarativeViewer::orientation() QCOMPARE(rootItem->width(), 300.0); QCOMPARE(rootItem->height(), 200.0); - QCOMPARE(viewer->view()->size(), QSize(300, 200)); + QTRY_COMPARE(viewer->view()->size(), QSize(300, 200)); QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(300, 200)); QCOMPARE(viewer->size(), QSize(300, 200+viewer->menuBar()->height())); QCOMPARE(viewer->size(), viewer->sizeHint()); @@ -113,7 +113,7 @@ void tst_QDeclarativeViewer::orientation() QCOMPARE(rootItem->width(), 200.0); QCOMPARE(rootItem->height(), 300.0); - QCOMPARE(viewer->view()->size(), QSize(200, 300)); + QTRY_COMPARE(viewer->view()->size(), QSize(200, 300)); QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(200, 300)); QCOMPARE(viewer->size(), QSize(200, 300+viewer->menuBar()->height())); QCOMPARE(viewer->size(), viewer->sizeHint()); @@ -265,7 +265,6 @@ void tst_QDeclarativeViewer::resizing() QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(150, 200)); QCOMPARE(viewer->size(), QSize(150, 200+viewer->menuBar()->height())); - QCOMPARE(viewer->size(), viewer->sizeHint()); // do not size root object to view viewer->resize(QSize(180,250)); @@ -284,7 +283,6 @@ void tst_QDeclarativeViewer::resizing() QCOMPARE(viewer->view()->initialSize(), QSize(200, 300)); QCOMPARE(viewer->view()->sceneRect().size(), QSizeF(250, 350-viewer->menuBar()->height())); QCOMPARE(viewer->size(), QSize(250, 350)); - QCOMPARE(viewer->size(), viewer->sizeHint()); // do not size view to root object rootItem->setWidth(150); -- cgit v0.12 From db414f8db1cca5d811416eb1ecec0536c379e107 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 11 Jun 2010 15:11:12 +1000 Subject: Make snapping work properly for highlight ranges > item size Snapping was only being applied to the current item when it was at a highlight range boundary. Task-number: QTBUG-11304 --- .../graphicsitems/qdeclarativegridview.cpp | 62 +++++++++++++++++----- .../graphicsitems/qdeclarativelistview.cpp | 50 +++++++++++------ 2 files changed, 84 insertions(+), 28 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index da01eb5..dc2bbd9 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -278,6 +278,20 @@ public: return snapPos; } + FxGridItem *snapItemAt(qreal pos) { + for (int i = 0; i < visibleItems.count(); ++i) { + FxGridItem *item = visibleItems[i]; + if (item->index == -1) + continue; + qreal itemTop = item->rowPos(); + if (item->index == model->count()-1 || (itemTop+rowSize()/2 >= pos)) + return item; + } + if (visibleItems.count() && visibleItems.first()->rowPos() <= pos) + return visibleItems.first(); + return 0; + } + int snapIndex() { int index = currentIndex; for (int i = 0; i < visibleItems.count(); ++i) { @@ -877,7 +891,6 @@ void QDeclarativeGridViewPrivate::fixupPosition() void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent) { - Q_Q(QDeclarativeGridView); if ((flow == QDeclarativeGridView::TopToBottom && &data == &vData) || (flow == QDeclarativeGridView::LeftToRight && &data == &hData)) return; @@ -885,7 +898,41 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m int oldDuration = fixupDuration; fixupDuration = moveReason == Mouse ? fixupDuration : 0; - if (haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) { + if (snapMode != QDeclarativeGridView::NoSnap) { + FxGridItem *topItem = snapItemAt(position()+highlightRangeStart); + FxGridItem *bottomItem = snapItemAt(position()+highlightRangeEnd); + qreal pos; + if (topItem && bottomItem && haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) { + qreal topPos = qMin(topItem->rowPos() - highlightRangeStart, -maxExtent); + qreal bottomPos = qMax(bottomItem->rowPos() - highlightRangeEnd, -minExtent); + pos = qAbs(data.move + topPos) < qAbs(data.move + bottomPos) ? topPos : bottomPos; + } else if (topItem) { + pos = qMax(qMin(topItem->rowPos() - highlightRangeStart, -maxExtent), -minExtent); + } else if (bottomItem) { + pos = qMax(qMin(bottomItem->rowPos() - highlightRangeStart, -maxExtent), -minExtent); + } else { + fixupDuration = oldDuration; + return; + } + if (currentItem && haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) { + updateHighlight(); + qreal currPos = currentItem->rowPos(); + if (pos < currPos + rowSize() - highlightRangeEnd) + pos = currPos + rowSize() - highlightRangeEnd; + if (pos > currPos - highlightRangeStart) + pos = currPos - highlightRangeStart; + } + + qreal dist = qAbs(data.move + pos); + if (dist > 0) { + timeline.reset(data.move); + if (fixupDuration) + timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); + else + timeline.set(data.move, -pos); + vTime = timeline.time(); + } + } else if (haveHighlightRange && highlightRange == QDeclarativeGridView::StrictlyEnforceRange) { if (currentItem) { updateHighlight(); qreal pos = currentItem->rowPos(); @@ -904,17 +951,6 @@ void QDeclarativeGridViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m } vTime = timeline.time(); } - } else if (snapMode != QDeclarativeGridView::NoSnap) { - qreal pos = -snapPosAt(-(data.move.value() - highlightRangeStart)) + highlightRangeStart; - qreal dist = qAbs(data.move.value() - pos); - if (dist > 0) { - timeline.reset(data.move); - if (fixupDuration) - timeline.move(data.move, pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - else - timeline.set(data.move, pos); - vTime = timeline.time(); - } } else { QDeclarativeFlickablePrivate::fixup(data, minExtent, maxExtent); } diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 4848008..72be670 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1124,7 +1124,6 @@ void QDeclarativeListViewPrivate::fixupPosition() void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal maxExtent) { - Q_Q(QDeclarativeListView); if ((orient == QDeclarativeListView::Horizontal && &data == &vData) || (orient == QDeclarativeListView::Vertical && &data == &hData)) return; @@ -1132,7 +1131,41 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m int oldDuration = fixupDuration; fixupDuration = moveReason == Mouse ? fixupDuration : 0; - if (haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) { + if (snapMode != QDeclarativeListView::NoSnap) { + FxListItem *topItem = snapItemAt(position()+highlightRangeStart); + FxListItem *bottomItem = snapItemAt(position()+highlightRangeEnd); + qreal pos; + if (topItem && bottomItem && haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) { + qreal topPos = qMin(topItem->position() - highlightRangeStart, -maxExtent); + qreal bottomPos = qMax(bottomItem->position() - highlightRangeEnd, -minExtent); + pos = qAbs(data.move + topPos) < qAbs(data.move + bottomPos) ? topPos : bottomPos; + } else if (topItem) { + pos = qMax(qMin(topItem->position() - highlightRangeStart, -maxExtent), -minExtent); + } else if (bottomItem) { + pos = qMax(qMin(bottomItem->position() - highlightRangeStart, -maxExtent), -minExtent); + } else { + fixupDuration = oldDuration; + return; + } + if (currentItem && haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) { + updateHighlight(); + qreal currPos = currentItem->position(); + if (pos < currPos + currentItem->size() - highlightRangeEnd) + pos = currPos + currentItem->size() - highlightRangeEnd; + if (pos > currPos - highlightRangeStart) + pos = currPos - highlightRangeStart; + } + + qreal dist = qAbs(data.move + pos); + if (dist > 0) { + timeline.reset(data.move); + if (fixupDuration) + timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); + else + timeline.set(data.move, -pos); + vTime = timeline.time(); + } + } else if (haveHighlightRange && highlightRange == QDeclarativeListView::StrictlyEnforceRange) { if (currentItem) { updateHighlight(); qreal pos = currentItem->position(); @@ -1151,19 +1184,6 @@ void QDeclarativeListViewPrivate::fixup(AxisData &data, qreal minExtent, qreal m } vTime = timeline.time(); } - } else if (snapMode != QDeclarativeListView::NoSnap) { - if (FxListItem *item = snapItemAt(position())) { - qreal pos = qMin(item->position() - highlightRangeStart, -maxExtent); - qreal dist = qAbs(data.move + pos); - if (dist > 0) { - timeline.reset(data.move); - if (fixupDuration) - timeline.move(data.move, -pos, QEasingCurve(QEasingCurve::InOutQuad), fixupDuration/2); - else - timeline.set(data.move, -pos); - vTime = timeline.time(); - } - } } else { QDeclarativeFlickablePrivate::fixup(data, minExtent, maxExtent); } -- cgit v0.12 From f0bb05cb7e85715d8a47c5d1ddd603edc6959c20 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 11 Jun 2010 14:59:09 +1000 Subject: Move listview/itemlist.qml to a separate visualitemmodel example --- doc/src/declarative/examples.qdoc | 1 + doc/src/examples/qml-examples.qdoc | 7 + .../modelviews/listview/content/pics/add.png | Bin 1577 -> 0 bytes .../modelviews/listview/content/pics/del.png | Bin 1661 -> 0 bytes .../modelviews/listview/content/pics/trash.png | Bin 989 -> 0 bytes .../declarative/modelviews/listview/dynamic.qml | 281 --------------------- .../modelviews/listview/dynamiclist.qml | 281 +++++++++++++++++++++ .../modelviews/listview/expandingdelegates.qml | 200 +++++++++++++++ .../modelviews/listview/highlightranges.qml | 133 ++++++++++ .../declarative/modelviews/listview/itemlist.qml | 107 -------- .../modelviews/listview/listview-example.qml | 133 ---------- .../declarative/modelviews/listview/recipes.qml | 200 --------------- .../modelviews/visualitemmodel/visualitemmodel.qml | 107 ++++++++ .../visualitemmodel/visualitemmodel.qmlproject | 16 ++ .../graphicsitems/qdeclarativevisualitemmodel.cpp | 2 + 15 files changed, 747 insertions(+), 721 deletions(-) delete mode 100644 examples/declarative/modelviews/listview/content/pics/add.png delete mode 100644 examples/declarative/modelviews/listview/content/pics/del.png delete mode 100644 examples/declarative/modelviews/listview/content/pics/trash.png delete mode 100644 examples/declarative/modelviews/listview/dynamic.qml create mode 100644 examples/declarative/modelviews/listview/dynamiclist.qml create mode 100644 examples/declarative/modelviews/listview/expandingdelegates.qml create mode 100644 examples/declarative/modelviews/listview/highlightranges.qml delete mode 100644 examples/declarative/modelviews/listview/itemlist.qml delete mode 100644 examples/declarative/modelviews/listview/listview-example.qml delete mode 100644 examples/declarative/modelviews/listview/recipes.qml create mode 100644 examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml create mode 100644 examples/declarative/modelviews/visualitemmodel/visualitemmodel.qmlproject diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc index cc67664..ad8c10c 100644 --- a/doc/src/declarative/examples.qdoc +++ b/doc/src/declarative/examples.qdoc @@ -118,6 +118,7 @@ For example, from your build directory, run: \o \l{declarative/modelviews/package}{Package} \o \l{declarative/modelviews/parallax}{Parallax} \o \l{declarative/modelviews/stringlistmodel}{String ListModel} +\o \l{declarative/modelviews/visualitemmodel}{VisualItemModel} \o \l{declarative/modelviews/webview}{WebView} \endlist diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc index 9dbf853..b6069f2 100644 --- a/doc/src/examples/qml-examples.qdoc +++ b/doc/src/examples/qml-examples.qdoc @@ -247,6 +247,13 @@ */ /*! + \title Models and Views: VisualItemModel + \example declarative/modelviews/visualitemmodel + + This example shows how to use the VisualItemModel element. +*/ + +/*! \title Models and Views: WebView \example declarative/modelviews/webview diff --git a/examples/declarative/modelviews/listview/content/pics/add.png b/examples/declarative/modelviews/listview/content/pics/add.png deleted file mode 100644 index f29d84b..0000000 Binary files a/examples/declarative/modelviews/listview/content/pics/add.png and /dev/null differ diff --git a/examples/declarative/modelviews/listview/content/pics/del.png b/examples/declarative/modelviews/listview/content/pics/del.png deleted file mode 100644 index 1d753a3..0000000 Binary files a/examples/declarative/modelviews/listview/content/pics/del.png and /dev/null differ diff --git a/examples/declarative/modelviews/listview/content/pics/trash.png b/examples/declarative/modelviews/listview/content/pics/trash.png deleted file mode 100644 index 2042595..0000000 Binary files a/examples/declarative/modelviews/listview/content/pics/trash.png and /dev/null differ diff --git a/examples/declarative/modelviews/listview/dynamic.qml b/examples/declarative/modelviews/listview/dynamic.qml deleted file mode 100644 index df2e094..0000000 --- a/examples/declarative/modelviews/listview/dynamic.qml +++ /dev/null @@ -1,281 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 -import "content" -import "../../ui-components/scrollbar" - -Rectangle { - id: container - width: 640; height: 480 - color: "#343434" - - ListModel { - id: fruitModel - - ListElement { - name: "Apple"; cost: 2.45 - attributes: [ - ListElement { description: "Core" }, - ListElement { description: "Deciduous" } - ] - } - ListElement { - name: "Banana"; cost: 1.95 - attributes: [ - ListElement { description: "Tropical" }, - ListElement { description: "Seedless" } - ] - } - ListElement { - name: "Cumquat"; cost: 3.25 - attributes: [ - ListElement { description: "Citrus" } - ] - } - ListElement { - name: "Durian"; cost: 9.95 - attributes: [ - ListElement { description: "Tropical" }, - ListElement { description: "Smelly" } - ] - } - ListElement { - name: "Elderberry"; cost: 0.05 - attributes: [ - ListElement { description: "Berry" } - ] - } - ListElement { - name: "Fig"; cost: 0.25 - attributes: [ - ListElement { description: "Flower" } - ] - } - } - - Component { - id: fruitDelegate - - Item { - id: wrapper - width: container.width; height: 55 - - Column { - id: moveButtons - x: 5; width: childrenRect.width; anchors.verticalCenter: parent.verticalCenter - - Image { - source: "content/pics/go-up.png" - MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index-1,1) } - } - Image { source: "content/pics/go-down.png" - MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index+1,1) } - } - } - - Column { - anchors { right: itemButtons.left; verticalCenter: parent.verticalCenter; left: moveButtons.right; leftMargin: 10 } - - Text { - id: label - width: parent.width - color: "White" - font.bold: true; font.pixelSize: 15 - text: name; elide: Text.ElideRight - } - Row { - spacing: 5 - Repeater { - model: attributes - Component { - Text { text: description; color: "White" } - } - } - } - } - - Row { - id: itemButtons - - anchors { right: removeButton.left; rightMargin: 35; verticalCenter: parent.verticalCenter } - width: childrenRect.width - spacing: 10 - - Image { - source: "content/pics/list-add.png" - scale: clickUp.isPressed ? 0.9 : 1 - - ClickAutoRepeating { - id: clickUp - anchors.fill: parent - onClicked: fruitModel.setProperty(index, "cost", cost+0.25) - } - } - - Text { id: costText; text: '$'+Number(cost).toFixed(2); font.pixelSize: 15; color: "White"; font.bold: true; } - - Image { - source: "content/pics/list-remove.png" - scale: clickDown.isPressed ? 0.9 : 1 - - ClickAutoRepeating { - id: clickDown - anchors.fill: parent - onClicked: fruitModel.setProperty(index, "cost", Math.max(0,cost-0.25)) - } - } - } - Image { - id: removeButton - anchors { verticalCenter: parent.verticalCenter; right: parent.right; rightMargin: 10 } - source: "content/pics/archive-remove.png" - - MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) } - } - - // Animate adding and removing items - ListView.delayRemove: true // so that the item is not destroyed immediately - ListView.onAdd: state = "add" - ListView.onRemove: state = "remove" - states: [ - State { - name: "add" - PropertyChanges { target: wrapper; height: 55; clip: true } - }, - State { - name: "remove" - PropertyChanges { target: wrapper; height: 0; clip: true } - } - ] - transitions: [ - Transition { - to: "add" - SequentialAnimation { - NumberAnimation { properties: "height"; from: 0; to: 55 } - PropertyAction { target: wrapper; property: "state"; value: "" } - } - }, - Transition { - to: "remove" - SequentialAnimation { - NumberAnimation { properties: "height" } - // Make sure delayRemove is set back to false so that the item can be destroyed - PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false } - } - } - ] - } - } - - ListView { - id: view - anchors { top: parent.top; left: parent.left; right: parent.right; bottom: buttons.top } - model: fruitModel - delegate: fruitDelegate - } - - // Attach scrollbar to the right edge of the view. - ScrollBar { - id: verticalScrollBar - - width: 8; height: view.height; anchors.right: view.right - opacity: 0 - orientation: Qt.Vertical - position: view.visibleArea.yPosition - pageSize: view.visibleArea.heightRatio - - // Only show the scrollbar when the view is moving. - states: State { - name: "ShowBars"; when: view.movingVertically - PropertyChanges { target: verticalScrollBar; opacity: 1 } - } - transitions: Transition { - NumberAnimation { properties: "opacity"; duration: 400 } - } - } - - Row { - id: buttons - - x: 8; width: childrenRect.width; height: childrenRect.height - anchors { bottom: parent.bottom; bottomMargin: 8 } - spacing: 8 - - Image { - source: "content/pics/archive-insert.png" - - MouseArea { - anchors.fill: parent - onClicked: { - fruitModel.append({ - "name": "Pizza Margarita", - "cost": 5.95, - "attributes": [{"description": "Cheese"},{"description": "Tomato"}] - }) - } - } - } - - Image { - source: "content/pics/archive-insert.png" - - MouseArea { - anchors.fill: parent; - onClicked: { - fruitModel.insert(0, { - "name": "Pizza Supreme", - "cost": 9.95, - "attributes": [{"description": "Cheese"},{"description": "Tomato"},{"description": "The Works"}] - }) - } - } - } - - Image { - source: "content/pics/archive-remove.png" - - MouseArea { - anchors.fill: parent - onClicked: fruitModel.clear() - } - } - } -} diff --git a/examples/declarative/modelviews/listview/dynamiclist.qml b/examples/declarative/modelviews/listview/dynamiclist.qml new file mode 100644 index 0000000..df2e094 --- /dev/null +++ b/examples/declarative/modelviews/listview/dynamiclist.qml @@ -0,0 +1,281 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 +import "content" +import "../../ui-components/scrollbar" + +Rectangle { + id: container + width: 640; height: 480 + color: "#343434" + + ListModel { + id: fruitModel + + ListElement { + name: "Apple"; cost: 2.45 + attributes: [ + ListElement { description: "Core" }, + ListElement { description: "Deciduous" } + ] + } + ListElement { + name: "Banana"; cost: 1.95 + attributes: [ + ListElement { description: "Tropical" }, + ListElement { description: "Seedless" } + ] + } + ListElement { + name: "Cumquat"; cost: 3.25 + attributes: [ + ListElement { description: "Citrus" } + ] + } + ListElement { + name: "Durian"; cost: 9.95 + attributes: [ + ListElement { description: "Tropical" }, + ListElement { description: "Smelly" } + ] + } + ListElement { + name: "Elderberry"; cost: 0.05 + attributes: [ + ListElement { description: "Berry" } + ] + } + ListElement { + name: "Fig"; cost: 0.25 + attributes: [ + ListElement { description: "Flower" } + ] + } + } + + Component { + id: fruitDelegate + + Item { + id: wrapper + width: container.width; height: 55 + + Column { + id: moveButtons + x: 5; width: childrenRect.width; anchors.verticalCenter: parent.verticalCenter + + Image { + source: "content/pics/go-up.png" + MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index-1,1) } + } + Image { source: "content/pics/go-down.png" + MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index+1,1) } + } + } + + Column { + anchors { right: itemButtons.left; verticalCenter: parent.verticalCenter; left: moveButtons.right; leftMargin: 10 } + + Text { + id: label + width: parent.width + color: "White" + font.bold: true; font.pixelSize: 15 + text: name; elide: Text.ElideRight + } + Row { + spacing: 5 + Repeater { + model: attributes + Component { + Text { text: description; color: "White" } + } + } + } + } + + Row { + id: itemButtons + + anchors { right: removeButton.left; rightMargin: 35; verticalCenter: parent.verticalCenter } + width: childrenRect.width + spacing: 10 + + Image { + source: "content/pics/list-add.png" + scale: clickUp.isPressed ? 0.9 : 1 + + ClickAutoRepeating { + id: clickUp + anchors.fill: parent + onClicked: fruitModel.setProperty(index, "cost", cost+0.25) + } + } + + Text { id: costText; text: '$'+Number(cost).toFixed(2); font.pixelSize: 15; color: "White"; font.bold: true; } + + Image { + source: "content/pics/list-remove.png" + scale: clickDown.isPressed ? 0.9 : 1 + + ClickAutoRepeating { + id: clickDown + anchors.fill: parent + onClicked: fruitModel.setProperty(index, "cost", Math.max(0,cost-0.25)) + } + } + } + Image { + id: removeButton + anchors { verticalCenter: parent.verticalCenter; right: parent.right; rightMargin: 10 } + source: "content/pics/archive-remove.png" + + MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) } + } + + // Animate adding and removing items + ListView.delayRemove: true // so that the item is not destroyed immediately + ListView.onAdd: state = "add" + ListView.onRemove: state = "remove" + states: [ + State { + name: "add" + PropertyChanges { target: wrapper; height: 55; clip: true } + }, + State { + name: "remove" + PropertyChanges { target: wrapper; height: 0; clip: true } + } + ] + transitions: [ + Transition { + to: "add" + SequentialAnimation { + NumberAnimation { properties: "height"; from: 0; to: 55 } + PropertyAction { target: wrapper; property: "state"; value: "" } + } + }, + Transition { + to: "remove" + SequentialAnimation { + NumberAnimation { properties: "height" } + // Make sure delayRemove is set back to false so that the item can be destroyed + PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false } + } + } + ] + } + } + + ListView { + id: view + anchors { top: parent.top; left: parent.left; right: parent.right; bottom: buttons.top } + model: fruitModel + delegate: fruitDelegate + } + + // Attach scrollbar to the right edge of the view. + ScrollBar { + id: verticalScrollBar + + width: 8; height: view.height; anchors.right: view.right + opacity: 0 + orientation: Qt.Vertical + position: view.visibleArea.yPosition + pageSize: view.visibleArea.heightRatio + + // Only show the scrollbar when the view is moving. + states: State { + name: "ShowBars"; when: view.movingVertically + PropertyChanges { target: verticalScrollBar; opacity: 1 } + } + transitions: Transition { + NumberAnimation { properties: "opacity"; duration: 400 } + } + } + + Row { + id: buttons + + x: 8; width: childrenRect.width; height: childrenRect.height + anchors { bottom: parent.bottom; bottomMargin: 8 } + spacing: 8 + + Image { + source: "content/pics/archive-insert.png" + + MouseArea { + anchors.fill: parent + onClicked: { + fruitModel.append({ + "name": "Pizza Margarita", + "cost": 5.95, + "attributes": [{"description": "Cheese"},{"description": "Tomato"}] + }) + } + } + } + + Image { + source: "content/pics/archive-insert.png" + + MouseArea { + anchors.fill: parent; + onClicked: { + fruitModel.insert(0, { + "name": "Pizza Supreme", + "cost": 9.95, + "attributes": [{"description": "Cheese"},{"description": "Tomato"},{"description": "The Works"}] + }) + } + } + } + + Image { + source: "content/pics/archive-remove.png" + + MouseArea { + anchors.fill: parent + onClicked: fruitModel.clear() + } + } + } +} diff --git a/examples/declarative/modelviews/listview/expandingdelegates.qml b/examples/declarative/modelviews/listview/expandingdelegates.qml new file mode 100644 index 0000000..f4b97ea --- /dev/null +++ b/examples/declarative/modelviews/listview/expandingdelegates.qml @@ -0,0 +1,200 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 +import "content" + +// This example illustrates expanding a list item to show a more detailed view + +Rectangle { + id: page + width: 400; height: 240 + color: "black" + + // Delegate for the recipes. This delegate has two modes: + // 1. the list mode (default), which just shows the picture and title of the recipe. + // 2. the details mode, which also shows the ingredients and method. + Component { + id: recipeDelegate + + Item { + id: wrapper + + // Create a property to contain the visibility of the details. + // We can bind multiple element's opacity to this one property, + // rather than having a "PropertyChanges" line for each element we + // want to fade. + property real detailsOpacity : 0 + + width: list.width + + // A simple rounded rectangle for the background + Rectangle { + id: background + x: 1; y: 2; width: parent.width - 2; height: parent.height - 4 + color: "#FEFFEE" + border.color: "#FFBE4F" + radius: 5 + } + + // This mouse region covers the entire delegate. + // When clicked it changes mode to 'Details'. If we are already + // in Details mode, then no change will happen. + MouseArea { + id: pageMouse + anchors.fill: parent + onClicked: wrapper.state = 'Details'; + } + + // Layout the page. Picture, title and ingredients at the top, method at the + // bottom. Note that elements that should not be visible in the list + // mode have their opacity set to wrapper.detailsOpacity. + Row { + id: topLayout + x: 10; y: 10; height: recipePic.height; width: parent.width + spacing: 10 + + Image { + id: recipePic + source: picture; width: 48; height: 48 + } + + Column { + width: background.width-recipePic.width-20; height: recipePic.height; + spacing: 5 + + Text { id: name; text: title; font.bold: true; font.pointSize: 16 } + + Text { + text: "Ingredients" + font.pointSize: 12; font.bold: true + opacity: wrapper.detailsOpacity + } + + Text { + text: ingredients + wrapMode: Text.WordWrap + width: parent.width + opacity: wrapper.detailsOpacity + } + } + } + + Item { + id: details + x: 10; width: parent.width-20 + anchors { top: topLayout.bottom; topMargin: 10; bottom: parent.bottom; bottomMargin: 10 } + opacity: wrapper.detailsOpacity + + Text { + id: methodTitle + anchors.top: parent.top + text: "Method" + font.pointSize: 12; font.bold: true + } + + Flickable { + id: flick + width: parent.width + anchors { top: methodTitle.bottom; bottom: parent.bottom } + contentHeight: methodText.height; clip: true + + Text { id: methodText; text: method; wrapMode: Text.WordWrap; width: details.width } + } + + Image { + anchors { right: flick.right; top: flick.top } + source: "content/pics/moreUp.png" + opacity: flick.atYBeginning ? 0 : 1 + } + + Image { + anchors { right: flick.right; bottom: flick.bottom } + source: "content/pics/moreDown.png" + opacity: flick.atYEnd ? 0 : 1 + } + } + + // A button to close the detailed view, i.e. set the state back to default (''). + MediaButton { + y: 10; anchors { right: background.right; rightMargin: 5 } + opacity: wrapper.detailsOpacity + text: "Close" + + onClicked: wrapper.state = ''; + } + + // Set the default height to the height of the picture, plus margin. + height: 68 + + states: State { + name: "Details" + + PropertyChanges { target: background; color: "white" } + PropertyChanges { target: recipePic; width: 128; height: 128 } // Make picture bigger + PropertyChanges { target: wrapper; detailsOpacity: 1; x: 0 } // Make details visible + PropertyChanges { target: wrapper; height: list.height } // Fill the entire list area with the detailed view + + // Move the list so that this item is at the top. + PropertyChanges { target: wrapper.ListView.view; explicit: true; contentY: wrapper.y } + + // Disallow flicking while we're in detailed view + PropertyChanges { target: wrapper.ListView.view; interactive: false } + } + + transitions: Transition { + // Make the state changes smooth + ParallelAnimation { + ColorAnimation { property: "color"; duration: 500 } + NumberAnimation { duration: 300; properties: "detailsOpacity,x,contentY,height,width" } + } + } + } + } + + // The actual list + ListView { + id: list + anchors.fill: parent + clip: true + model: Recipes + delegate: recipeDelegate + } +} diff --git a/examples/declarative/modelviews/listview/highlightranges.qml b/examples/declarative/modelviews/listview/highlightranges.qml new file mode 100644 index 0000000..a8a95c4 --- /dev/null +++ b/examples/declarative/modelviews/listview/highlightranges.qml @@ -0,0 +1,133 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + width: 600; height: 300 + + // MyPets model is defined in dummydata/MyPetsModel.qml + // The viewer automatically loads files in dummydata/* to assist + // development without a real data source. + // This one contains my pets. + + // Define a delegate component. A component will be + // instantiated for each visible item in the list. + Component { + id: petDelegate + Item { + width: 200; height: 50 + Column { + Text { text: 'Name: ' + name } + Text { text: 'Type: ' + type } + Text { text: 'Age: ' + age } + } + } + } + + // Define a highlight component. Just one of these will be instantiated + // by each ListView and placed behind the current item. + Component { + id: petHighlight + Rectangle { color: "#FFFF88" } + } + + // Show the model in three lists, with different highlight ranges. + // preferredHighlightBegin and preferredHighlightEnd set the + // range in which to attempt to maintain the highlight. + // + // Note that the second and third ListView + // set their currentIndex to be the same as the first, and that + // the first ListView is given keyboard focus. + // + // The default mode allows the currentItem to move freely + // within the visible area. If it would move outside the visible + // area, the view is scrolled to keep it visible. + // + // The second list sets a highlight range which attempts to keep the + // current item within the the bounds of the range, however + // items will not scroll beyond the beginning or end of the view, + // forcing the highlight to move outside the range at the ends. + // + // The third list sets the highlightRangeMode to StrictlyEnforceRange + // and sets a range smaller than the height of an item. This + // forces the current item to change when the view is flicked, + // since the highlight is unable to move. + // + // Note that the first ListView sets its currentIndex to be equal to + // the third ListView's currentIndex. By flicking List3 with + // the mouse, the current index of List1 will be changed. + + ListView { + id: list1 + width: 200; height: parent.height + model: MyPetsModel + delegate: petDelegate + + highlight: petHighlight + currentIndex: list3.currentIndex + focus: true + } + + ListView { + id: list2 + x: 200; width: 200; height: parent.height + model: MyPetsModel + delegate: petDelegate + + highlight: petHighlight + currentIndex: list1.currentIndex + preferredHighlightBegin: 80; preferredHighlightEnd: 220 + highlightRangeMode: ListView.ApplyRange + } + + ListView { + id: list3 + x: 400; width: 200; height: parent.height + model: MyPetsModel + delegate: petDelegate + + highlight: Rectangle { color: "lightsteelblue" } + currentIndex: list1.currentIndex + preferredHighlightBegin: 125; preferredHighlightEnd: 125 + highlightRangeMode: ListView.StrictlyEnforceRange + flickDeceleration: 1000 + } +} diff --git a/examples/declarative/modelviews/listview/itemlist.qml b/examples/declarative/modelviews/listview/itemlist.qml deleted file mode 100644 index 1b44e05..0000000 --- a/examples/declarative/modelviews/listview/itemlist.qml +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// This example demonstrates placing items in a view using -// a VisualItemModel - -import Qt 4.7 - -Rectangle { - color: "lightgray" - width: 240 - height: 320 - - VisualItemModel { - id: itemModel - - Rectangle { - width: view.width; height: view.height - color: "#FFFEF0" - Text { text: "Page 1"; font.bold: true; anchors.centerIn: parent } - } - Rectangle { - width: view.width; height: view.height - color: "#F0FFF7" - Text { text: "Page 2"; font.bold: true; anchors.centerIn: parent } - } - Rectangle { - width: view.width; height: view.height - color: "#F4F0FF" - Text { text: "Page 3"; font.bold: true; anchors.centerIn: parent } - } - } - - ListView { - id: view - anchors { fill: parent; bottomMargin: 30 } - model: itemModel - preferredHighlightBegin: 0; preferredHighlightEnd: 0 - highlightRangeMode: ListView.StrictlyEnforceRange - orientation: ListView.Horizontal - snapMode: ListView.SnapOneItem; flickDeceleration: 2000 - } - - Rectangle { - width: 240; height: 30 - anchors { top: view.bottom; bottom: parent.bottom } - color: "gray" - - Row { - anchors.centerIn: parent - spacing: 20 - - Repeater { - model: itemModel.count - - Rectangle { - width: 5; height: 5 - radius: 3 - color: view.currentIndex == index ? "blue" : "white" - - MouseArea { - width: 20; height: 20 - anchors.centerIn: parent - onClicked: view.currentIndex = index - } - } - } - } - } -} diff --git a/examples/declarative/modelviews/listview/listview-example.qml b/examples/declarative/modelviews/listview/listview-example.qml deleted file mode 100644 index a8a95c4..0000000 --- a/examples/declarative/modelviews/listview/listview-example.qml +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 - -Rectangle { - width: 600; height: 300 - - // MyPets model is defined in dummydata/MyPetsModel.qml - // The viewer automatically loads files in dummydata/* to assist - // development without a real data source. - // This one contains my pets. - - // Define a delegate component. A component will be - // instantiated for each visible item in the list. - Component { - id: petDelegate - Item { - width: 200; height: 50 - Column { - Text { text: 'Name: ' + name } - Text { text: 'Type: ' + type } - Text { text: 'Age: ' + age } - } - } - } - - // Define a highlight component. Just one of these will be instantiated - // by each ListView and placed behind the current item. - Component { - id: petHighlight - Rectangle { color: "#FFFF88" } - } - - // Show the model in three lists, with different highlight ranges. - // preferredHighlightBegin and preferredHighlightEnd set the - // range in which to attempt to maintain the highlight. - // - // Note that the second and third ListView - // set their currentIndex to be the same as the first, and that - // the first ListView is given keyboard focus. - // - // The default mode allows the currentItem to move freely - // within the visible area. If it would move outside the visible - // area, the view is scrolled to keep it visible. - // - // The second list sets a highlight range which attempts to keep the - // current item within the the bounds of the range, however - // items will not scroll beyond the beginning or end of the view, - // forcing the highlight to move outside the range at the ends. - // - // The third list sets the highlightRangeMode to StrictlyEnforceRange - // and sets a range smaller than the height of an item. This - // forces the current item to change when the view is flicked, - // since the highlight is unable to move. - // - // Note that the first ListView sets its currentIndex to be equal to - // the third ListView's currentIndex. By flicking List3 with - // the mouse, the current index of List1 will be changed. - - ListView { - id: list1 - width: 200; height: parent.height - model: MyPetsModel - delegate: petDelegate - - highlight: petHighlight - currentIndex: list3.currentIndex - focus: true - } - - ListView { - id: list2 - x: 200; width: 200; height: parent.height - model: MyPetsModel - delegate: petDelegate - - highlight: petHighlight - currentIndex: list1.currentIndex - preferredHighlightBegin: 80; preferredHighlightEnd: 220 - highlightRangeMode: ListView.ApplyRange - } - - ListView { - id: list3 - x: 400; width: 200; height: parent.height - model: MyPetsModel - delegate: petDelegate - - highlight: Rectangle { color: "lightsteelblue" } - currentIndex: list1.currentIndex - preferredHighlightBegin: 125; preferredHighlightEnd: 125 - highlightRangeMode: ListView.StrictlyEnforceRange - flickDeceleration: 1000 - } -} diff --git a/examples/declarative/modelviews/listview/recipes.qml b/examples/declarative/modelviews/listview/recipes.qml deleted file mode 100644 index f4b97ea..0000000 --- a/examples/declarative/modelviews/listview/recipes.qml +++ /dev/null @@ -1,200 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 -import "content" - -// This example illustrates expanding a list item to show a more detailed view - -Rectangle { - id: page - width: 400; height: 240 - color: "black" - - // Delegate for the recipes. This delegate has two modes: - // 1. the list mode (default), which just shows the picture and title of the recipe. - // 2. the details mode, which also shows the ingredients and method. - Component { - id: recipeDelegate - - Item { - id: wrapper - - // Create a property to contain the visibility of the details. - // We can bind multiple element's opacity to this one property, - // rather than having a "PropertyChanges" line for each element we - // want to fade. - property real detailsOpacity : 0 - - width: list.width - - // A simple rounded rectangle for the background - Rectangle { - id: background - x: 1; y: 2; width: parent.width - 2; height: parent.height - 4 - color: "#FEFFEE" - border.color: "#FFBE4F" - radius: 5 - } - - // This mouse region covers the entire delegate. - // When clicked it changes mode to 'Details'. If we are already - // in Details mode, then no change will happen. - MouseArea { - id: pageMouse - anchors.fill: parent - onClicked: wrapper.state = 'Details'; - } - - // Layout the page. Picture, title and ingredients at the top, method at the - // bottom. Note that elements that should not be visible in the list - // mode have their opacity set to wrapper.detailsOpacity. - Row { - id: topLayout - x: 10; y: 10; height: recipePic.height; width: parent.width - spacing: 10 - - Image { - id: recipePic - source: picture; width: 48; height: 48 - } - - Column { - width: background.width-recipePic.width-20; height: recipePic.height; - spacing: 5 - - Text { id: name; text: title; font.bold: true; font.pointSize: 16 } - - Text { - text: "Ingredients" - font.pointSize: 12; font.bold: true - opacity: wrapper.detailsOpacity - } - - Text { - text: ingredients - wrapMode: Text.WordWrap - width: parent.width - opacity: wrapper.detailsOpacity - } - } - } - - Item { - id: details - x: 10; width: parent.width-20 - anchors { top: topLayout.bottom; topMargin: 10; bottom: parent.bottom; bottomMargin: 10 } - opacity: wrapper.detailsOpacity - - Text { - id: methodTitle - anchors.top: parent.top - text: "Method" - font.pointSize: 12; font.bold: true - } - - Flickable { - id: flick - width: parent.width - anchors { top: methodTitle.bottom; bottom: parent.bottom } - contentHeight: methodText.height; clip: true - - Text { id: methodText; text: method; wrapMode: Text.WordWrap; width: details.width } - } - - Image { - anchors { right: flick.right; top: flick.top } - source: "content/pics/moreUp.png" - opacity: flick.atYBeginning ? 0 : 1 - } - - Image { - anchors { right: flick.right; bottom: flick.bottom } - source: "content/pics/moreDown.png" - opacity: flick.atYEnd ? 0 : 1 - } - } - - // A button to close the detailed view, i.e. set the state back to default (''). - MediaButton { - y: 10; anchors { right: background.right; rightMargin: 5 } - opacity: wrapper.detailsOpacity - text: "Close" - - onClicked: wrapper.state = ''; - } - - // Set the default height to the height of the picture, plus margin. - height: 68 - - states: State { - name: "Details" - - PropertyChanges { target: background; color: "white" } - PropertyChanges { target: recipePic; width: 128; height: 128 } // Make picture bigger - PropertyChanges { target: wrapper; detailsOpacity: 1; x: 0 } // Make details visible - PropertyChanges { target: wrapper; height: list.height } // Fill the entire list area with the detailed view - - // Move the list so that this item is at the top. - PropertyChanges { target: wrapper.ListView.view; explicit: true; contentY: wrapper.y } - - // Disallow flicking while we're in detailed view - PropertyChanges { target: wrapper.ListView.view; interactive: false } - } - - transitions: Transition { - // Make the state changes smooth - ParallelAnimation { - ColorAnimation { property: "color"; duration: 500 } - NumberAnimation { duration: 300; properties: "detailsOpacity,x,contentY,height,width" } - } - } - } - } - - // The actual list - ListView { - id: list - anchors.fill: parent - clip: true - model: Recipes - delegate: recipeDelegate - } -} diff --git a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml new file mode 100644 index 0000000..1b44e05 --- /dev/null +++ b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +// This example demonstrates placing items in a view using +// a VisualItemModel + +import Qt 4.7 + +Rectangle { + color: "lightgray" + width: 240 + height: 320 + + VisualItemModel { + id: itemModel + + Rectangle { + width: view.width; height: view.height + color: "#FFFEF0" + Text { text: "Page 1"; font.bold: true; anchors.centerIn: parent } + } + Rectangle { + width: view.width; height: view.height + color: "#F0FFF7" + Text { text: "Page 2"; font.bold: true; anchors.centerIn: parent } + } + Rectangle { + width: view.width; height: view.height + color: "#F4F0FF" + Text { text: "Page 3"; font.bold: true; anchors.centerIn: parent } + } + } + + ListView { + id: view + anchors { fill: parent; bottomMargin: 30 } + model: itemModel + preferredHighlightBegin: 0; preferredHighlightEnd: 0 + highlightRangeMode: ListView.StrictlyEnforceRange + orientation: ListView.Horizontal + snapMode: ListView.SnapOneItem; flickDeceleration: 2000 + } + + Rectangle { + width: 240; height: 30 + anchors { top: view.bottom; bottom: parent.bottom } + color: "gray" + + Row { + anchors.centerIn: parent + spacing: 20 + + Repeater { + model: itemModel.count + + Rectangle { + width: 5; height: 5 + radius: 3 + color: view.currentIndex == index ? "blue" : "white" + + MouseArea { + width: 20; height: 20 + anchors.centerIn: parent + onClicked: view.currentIndex = index + } + } + } + } + } +} diff --git a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qmlproject b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 410f526..5092349 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -141,6 +141,8 @@ public: \endcode \image visualitemmodel.png + + \sa {declarative/modelviews/visualitemmodel}{VisualItemModel example} */ QDeclarativeVisualItemModel::QDeclarativeVisualItemModel(QObject *parent) : QDeclarativeVisualModel(*(new QDeclarativeVisualItemModelPrivate), parent) -- cgit v0.12 From 6e34e119551a7e20e7202d819568d537458fb776 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 11 Jun 2010 15:52:13 +1000 Subject: ListView.onRemove animation is not played when the list has only one item. Task-number: QTBUG-11285 --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 2 +- src/declarative/graphicsitems/qdeclarativelistview.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index dc2bbd9..3792595 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -603,7 +603,7 @@ void QDeclarativeGridViewPrivate::layout() { Q_Q(QDeclarativeGridView); layoutScheduled = false; - if (!isValid()) { + if (!isValid() && !visibleItems.count()) { clear(); return; } diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index d8d317c..dcf18af 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -737,7 +737,7 @@ void QDeclarativeListViewPrivate::layout() { Q_Q(QDeclarativeListView); layoutScheduled = false; - if (!isValid()) { + if (!isValid() && !visibleItems.count()) { clear(); setPosition(0); return; -- cgit v0.12 From 2b3c318c102f3c1304968e6b111b1ac96764c115 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 10 Jun 2010 15:27:34 +0300 Subject: Fix recursive 'make sis' for symbian builds It makes no sense for 'sis' to depend on 'first' or really any target in symbian-abld and symbian-sbsv2 builds, as all builds are recursive anyway. Also do not generate real sis targets for projects that do not actually deploy anything, making the check equivalent to one in qmake for generating pkg files. Task-number: QTBUG-5312 Reviewed-by: Janne Koskinen --- mkspecs/features/sis_targets.prf | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf index 0023b54..b149a22 100644 --- a/mkspecs/features/sis_targets.prf +++ b/mkspecs/features/sis_targets.prf @@ -1,5 +1,15 @@ # Sis file creation -contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) { +GENERATE_SIS_TARGETS = false + +contains(TEMPLATE, app): GENERATE_SIS_TARGETS = true +else:!equals(DEPLOYMENT, default_deployment) { + for(dep_item, $$list($$DEPLOYMENT)) { + dep_item_sources = $$eval($${dep_item}.sources) + !isEmpty(dep_item_sources): GENERATE_SIS_TARGETS = true + } +} + +equals(GENERATE_SIS_TARGETS, true) { symbian-abld|symbian-sbsv2 { sis_destdir = make_cache_name = .make.cache @@ -129,7 +139,8 @@ contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) { } else { # Make sure we build everything, since other sis targets in a recursive invocation # may depend on them, even if this one is empty. - sis_target.depends = first + # In abld/sbsv2, we assume that subdir has been built already, as all builds are recursive. + !symbian-abld:!symbian-sbsv2: sis_target.depends = first } sis_target.commands = sis_target.target = sis -- cgit v0.12 From 801bb087f8fc2f911bddc42441d450b876a09d8b Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 11 Jun 2010 11:00:56 +0300 Subject: Fix recursive targets for src.pro Dependencies to tools moc, rcc and uic on some subdirs break recursive targets like 'make sis' for symbian-abld and symbian-sbsv2 builds. There is no need to have any subdir dependencies for above mkspecs as those builds are always ordered anyway. Task-number: QTBUG-5312 Reviewed-by: Janne Koskinen --- src/src.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/src.pro b/src/src.pro index 5436c4a..3ac69be 100644 --- a/src/src.pro +++ b/src/src.pro @@ -84,7 +84,7 @@ src_declarative.subdir = $$QT_SOURCE_TREE/src/declarative src_declarative.target = sub-declarative #CONFIG += ordered -!wince*:!ordered { +!wince*:!ordered:!symbian-abld:!symbian-sbsv2 { src_corelib.depends = src_tools_moc src_tools_rcc src_gui.depends = src_corelib src_tools_uic embedded: src_gui.depends += src_network -- cgit v0.12 From fbb3aca27682bfe81c17866f518eae23b3158aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 11 Jun 2010 10:29:06 +0200 Subject: Compile fix. The PFNGLXCREATECONTEXTATTRIBSARBPROC typedef isn't defined on all GLX 1.3 systems, so we use our own. Reviewed-by: Trond --- src/opengl/qgl_x11.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index 3e71a48..da072c7 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -672,8 +672,12 @@ bool QGLContext::chooseContext(const QGLContext* shareContext) GLX_CONTEXT_PROFILE_MASK_ARB, profile, 0 }; - PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs = - (PFNGLXCREATECONTEXTATTRIBSARBPROC) qglx_getProcAddress("glXCreateContextAttribsARB"); + typedef GLXContext ( * Q_PFNGLXCREATECONTEXTATTRIBSARBPROC) + (Display* dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); + + + Q_PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribs = + (Q_PFNGLXCREATECONTEXTATTRIBSARBPROC) qglx_getProcAddress("glXCreateContextAttribsARB"); if (glXCreateContextAttribs) { int spec[45]; -- cgit v0.12 From 045732d43f38dadc6019e3ca53e547e4bcb31190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Fri, 11 Jun 2010 10:52:43 +0200 Subject: Fixed an on-exit application crash for GL apps using EGL. Task-number: QT-3498 Reviewed-by: Samuel --- src/opengl/qgl_egl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index 44e8ae9..4a89b26 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -190,7 +190,7 @@ void QGLContext::makeCurrent() if (!d->workaroundsCached) { d->workaroundsCached = true; const char *renderer = reinterpret_cast(glGetString(GL_RENDERER)); - if (strstr(renderer, "SGX") || strstr(renderer, "MBX")) { + if (renderer && (strstr(renderer, "SGX") || strstr(renderer, "MBX"))) { // PowerVR MBX/SGX chips needs to clear all buffers when starting to render // a new frame, otherwise there will be a performance penalty to pay for // each frame. -- cgit v0.12 From 3ff9474b8e3812f629869bc349ffb0a7f70c93a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Fri, 11 Jun 2010 12:25:29 +0200 Subject: Fix another potential strstr() crash for EGL based GL apps. Task-number: releated to QT-3498 Reviewed-by: Samuel --- src/opengl/qgl_egl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index 4a89b26..0a19531 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -200,7 +200,8 @@ void QGLContext::makeCurrent() // bug which prevents glCopyTexSubImage2D() to work with a POT // or GL_ALPHA texture bound to an FBO. The only way to // identify that driver is to check the EGL version number for it. - if (strstr(eglQueryString(d->eglContext->display(), EGL_VERSION), "1.3")) + const char *egl_version = eglQueryString(d->eglContext->display(), EGL_VERSION); + if (egl_version && strstr(egl_version, "1.3")) d->workaround_brokenFBOReadBack = true; } } -- cgit v0.12 From 7f338180e88b71e793069e2fbe9a70f3c434e126 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 11 Jun 2010 12:36:34 +0200 Subject: Changed the way we detect touch screen on Windows. Instead of using the IInkTablets interface (which sometimes freezes in the get_Count() call for 10 seconds), we just check if there is digitizer support. Task-number: QTBUG-6007 Reviewed-by: Prasanth --- src/gui/kernel/qapplication_win.cpp | 36 +++------------------- .../kernel/qwinnativepangesturerecognizer_win_p.h | 32 +++++++++++++++++++ 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 09535fa..622d4e4 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -118,8 +118,6 @@ extern void qt_wince_hide_taskbar(HWND hwnd); //defined in qguifunctions_wince.c # include #endif -#include "private/qwinnativepangesturerecognizer_win_p.h" - #ifndef WM_TOUCH # define WM_TOUCH 0x0240 @@ -4066,36 +4064,10 @@ PtrCloseTouchInputHandle QApplicationPrivate::CloseTouchInputHandle = 0; void QApplicationPrivate::initializeMultitouch_sys() { - static const IID QT_IID_IInkTablets = {0x112086D9, 0x7779, 0x4535, {0xA6, 0x99, 0x86, 0x2B, 0x43, 0xAC, 0x18, 0x63} }; - static const IID QT_IID_IInkTablet2 = {0x90c91ad2, 0xfa36, 0x49d6, {0x95, 0x16, 0xce, 0x8d, 0x57, 0x0f, 0x6f, 0x85} }; - static const CLSID QT_CLSID_InkTablets = {0x6E4FCB12, 0x510A, 0x4d40, {0x93, 0x04, 0x1D, 0xA1, 0x0A, 0xE9, 0x14, 0x7C} }; - - IInkTablets *iInkTablets = 0; - HRESULT hr = CoCreateInstance(QT_CLSID_InkTablets, NULL, CLSCTX_ALL, QT_IID_IInkTablets, (void**)&iInkTablets); - if (SUCCEEDED(hr)) { - long count = 0; - iInkTablets->get_Count(&count); - for (long i = 0; i < count; ++i) { - IInkTablet *iInkTablet = 0; - hr = iInkTablets->Item(i, &iInkTablet); - if (FAILED(hr)) - continue; - IInkTablet2 *iInkTablet2 = 0; - hr = iInkTablet->QueryInterface(QT_IID_IInkTablet2, (void**)&iInkTablet2); - iInkTablet->Release(); - if (FAILED(hr)) - continue; - TabletDeviceKind kind; - hr = iInkTablet2->get_DeviceKind(&kind); - iInkTablet2->Release(); - if (FAILED(hr)) - continue; - if (kind == TDK_Touch) { - QApplicationPrivate::HasTouchSupport = true; - break; - } - } - iInkTablets->Release(); + if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { + static const int QT_SM_DIGITIZER = 94; + QApplicationPrivate::HasTouchSupport = GetSystemMetrics(QT_SM_DIGITIZER); + qDebug() << "QApplicationPrivate::HasTouchSupport " << QApplicationPrivate::HasTouchSupport; } QLibrary library(QLatin1String("user32")); diff --git a/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h b/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h index 64addeb..eb99b74 100644 --- a/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h +++ b/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h @@ -54,6 +54,38 @@ // #include +#include + +class IInkRectangle; +class TabletHardwareCapabilities; +class TabletPropertyMetricUnit; +DECLARE_INTERFACE_(IInkTablet, IDispatch) +{ + STDMETHOD(get_Name)(THIS_ BSTR *Name) PURE; + STDMETHOD(get_PlugAndPlayId)(THIS_ BSTR *Id) PURE; + STDMETHOD(get_MaximumInputRectangle)(THIS_ IInkRectangle **Rectangle) PURE; + STDMETHOD(get_HardwareCapabilities)(THIS_ TabletHardwareCapabilities *Capabilities) PURE; + STDMETHOD(IsPacketPropertySupported)(THIS_ BSTR packetPropertyName) PURE; + STDMETHOD(GetPropertyMetrics)(THIS_ BSTR propertyName, long *Minimum, long *Maximum, TabletPropertyMetricUnit *Units, float *Resolution) PURE; +}; +enum TabletDeviceKind +{ + TDK_Mouse = 0, + TDK_Pen = 1, + TDK_Touch = 2 +}; +DECLARE_INTERFACE_(IInkTablet2, IDispatch) +{ + STDMETHOD(get_DeviceKind)(THIS_ TabletDeviceKind *Kind) PURE; +}; +DECLARE_INTERFACE_(IInkTablets, IDispatch) +{ + STDMETHOD(get_Count)(THIS_ long *Count) PURE; + STDMETHOD(get__NewEnum)(THIS_ IUnknown **_NewEnum) PURE; + STDMETHOD(get_DefaultTablet)(THIS_ IInkTablet **DefaultTablet) PURE; + STDMETHOD(Item)(THIS_ long Index, IInkTablet **Tablet) PURE; + STDMETHOD(IsPacketPropertySupported)(THIS_ BSTR packetPropertyName, VARIANT_BOOL *Supported) PURE; +}; #include -- cgit v0.12 From 833d391917901b72c4c977bea0f6b3396dc4ed48 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 11 Jun 2010 14:17:01 +0300 Subject: Incorrectly named keys in QS60StyleEnums::SkinParts Some of the internal part names of QS60Style do not match the real theme item names, making automated tool use to make "theme blob" for QCreator simulator manual work. Renamed the parts to match native side names. Task-number: QTBUG-11053 Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 12 ++++---- src/gui/styles/qs60style_p.h | 48 ++++++++++++++++---------------- src/gui/styles/qs60style_s60.cpp | 60 ++++++++++++++++++++-------------------- 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 4992e34..91d3fa6 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -135,13 +135,13 @@ const struct QS60StylePrivate::frameElementCenter QS60StylePrivate::m_frameEleme {SE_TableHeaderItem, QS60StyleEnums::SP_QsnFrCaleHeadingCenter}, {SE_ToolTip, QS60StyleEnums::SP_QsnFrPopupPreviewCenter}, {SE_ToolBar, QS60StyleEnums::SP_QsnFrPopupSubCenter}, - {SE_ToolBarButton, QS60StyleEnums::SP_QsnFrSctrlButtonCenter}, - {SE_ToolBarButtonPressed, QS60StyleEnums::SP_QsnFrSctrlButtonCenterPressed}, + {SE_ToolBarButton, QS60StyleEnums::SP_QgnFrSctrlButtonCenter}, + {SE_ToolBarButtonPressed, QS60StyleEnums::SP_QgnFrSctrlButtonCenterPressed}, {SE_PanelBackground, QS60StyleEnums::SP_QsnFrSetOptCenter}, {SE_ButtonInactive, QS60StyleEnums::SP_QsnFrButtonCenterInactive}, {SE_Editor, QS60StyleEnums::SP_QsnFrInputCenter}, {SE_TableItemPressed, QS60StyleEnums::SP_QsnFrGridCenterPressed}, - {SE_ListItemPressed, QS60StyleEnums::SP_QsnFrListPressed}, + {SE_ListItemPressed, QS60StyleEnums::SP_QsnFrListCenterPressed}, }; static const int frameElementsCount = @@ -1824,7 +1824,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, QS60StylePrivate::SF_PointNorth : QS60StylePrivate::SF_PointSouth; painter->save(); painter->setPen(option->palette.windowText().color()); - QS60StylePrivate::drawSkinPart(QS60StyleEnums::SP_QgnIndiSubMenu, painter, arrowOptions.rect, + QS60StylePrivate::drawSkinPart(QS60StyleEnums::SP_QgnIndiSubmenu, painter, arrowOptions.rect, (flags | QS60StylePrivate::SF_ColorSkinned | arrowDirection)); painter->restore(); } @@ -3328,13 +3328,13 @@ QIcon QS60Style::standardIconImplementation(StandardPixmap standardIcon, part = QS60StyleEnums::SP_QgnNoteErased; break; case SP_ToolBarHorizontalExtensionButton: - part = QS60StyleEnums::SP_QgnIndiSubMenu; + part = QS60StyleEnums::SP_QgnIndiSubmenu; if (QApplication::layoutDirection() == Qt::RightToLeft) adjustedFlags |= QS60StylePrivate::SF_PointSouth; break; case SP_ToolBarVerticalExtensionButton: adjustedFlags |= QS60StylePrivate::SF_PointEast; - part = QS60StyleEnums::SP_QgnIndiSubMenu; + part = QS60StyleEnums::SP_QgnIndiSubmenu; break; default: diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index d8c31f8..836969a 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -154,7 +154,7 @@ public: SP_QgnIndiRadiobuttOn, SP_QgnGrafNsliderMarker, SP_QgnGrafNsliderMarkerSelected, - SP_QgnIndiSubMenu, + SP_QgnIndiSubmenu, SP_QgnNoteErased, SP_QgnNoteError, SP_QgnNoteInfo, @@ -166,6 +166,24 @@ public: SP_QgnPropFolderSmall, SP_QgnPropFolderSmallNew, SP_QgnPropPhoneMemcLarge, + SP_QgnFrSctrlButtonCornerTl, // Toolbar button + SP_QgnFrSctrlButtonCornerTr, + SP_QgnFrSctrlButtonCornerBl, + SP_QgnFrSctrlButtonCornerBr, + SP_QgnFrSctrlButtonSideT, + SP_QgnFrSctrlButtonSideB, + SP_QgnFrSctrlButtonSideL, + SP_QgnFrSctrlButtonSideR, + SP_QgnFrSctrlButtonCenter, + SP_QgnFrSctrlButtonCornerTlPressed, // Toolbar button, pressed + SP_QgnFrSctrlButtonCornerTrPressed, + SP_QgnFrSctrlButtonCornerBlPressed, + SP_QgnFrSctrlButtonCornerBrPressed, + SP_QgnFrSctrlButtonSideTPressed, + SP_QgnFrSctrlButtonSideBPressed, + SP_QgnFrSctrlButtonSideLPressed, + SP_QgnFrSctrlButtonSideRPressed, + SP_QgnFrSctrlButtonCenterPressed, SP_QsnCpScrollHandleBottomPressed, //ScrollBar handle, pressed state SP_QsnCpScrollHandleMiddlePressed, SP_QsnCpScrollHandleTopPressed, @@ -198,10 +216,10 @@ public: SP_QsnFrCaleCornerTr, SP_QsnFrCaleCornerBl, SP_QsnFrCaleCornerBr, - SP_QsnFrCaleGSideT, - SP_QsnFrCaleGSideB, - SP_QsnFrCaleGSideL, - SP_QsnFrCaleGSideR, + SP_QsnFrCaleSideT, + SP_QsnFrCaleSideB, + SP_QsnFrCaleSideL, + SP_QsnFrCaleSideR, SP_QsnFrCaleCenter, SP_QsnFrCaleHeadingCornerTl, // calendar grid header SP_QsnFrCaleHeadingCornerTr, @@ -266,24 +284,6 @@ public: SP_QsnFrPopupSubSideL, SP_QsnFrPopupSubSideR, SP_QsnFrPopupSubCenter, - SP_QsnFrSctrlButtonCornerTl, // Toolbar button - SP_QsnFrSctrlButtonCornerTr, - SP_QsnFrSctrlButtonCornerBl, - SP_QsnFrSctrlButtonCornerBr, - SP_QsnFrSctrlButtonSideT, - SP_QsnFrSctrlButtonSideB, - SP_QsnFrSctrlButtonSideL, - SP_QsnFrSctrlButtonSideR, - SP_QsnFrSctrlButtonCenter, - SP_QsnFrSctrlButtonCornerTlPressed, // Toolbar button, pressed - SP_QsnFrSctrlButtonCornerTrPressed, - SP_QsnFrSctrlButtonCornerBlPressed, - SP_QsnFrSctrlButtonCornerBrPressed, - SP_QsnFrSctrlButtonSideTPressed, - SP_QsnFrSctrlButtonSideBPressed, - SP_QsnFrSctrlButtonSideLPressed, - SP_QsnFrSctrlButtonSideRPressed, - SP_QsnFrSctrlButtonCenterPressed, SP_QsnFrButtonCornerTlInactive, // Inactive button SP_QsnFrButtonCornerTrInactive, SP_QsnFrButtonCornerBlInactive, @@ -310,7 +310,7 @@ public: SP_QsnFrListSideBPressed, SP_QsnFrListSideLPressed, SP_QsnFrListSideRPressed, - SP_QsnFrListPressed, + SP_QsnFrListCenterPressed, }; enum ColorLists { diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index c1223af..e5c74ad 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -179,7 +179,7 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QgnGrafBarFrameSideR */ {KAknsIIDQgnGrafBarFrameSideR, EDrawIcon, ES60_All, -1,-1}, /* SP_QgnGrafBarProgress */ {KAknsIIDQgnGrafBarProgress, EDrawIcon, ES60_All, -1,-1}, // No drop area for 3.x non-touch devices - /* SP_QgnGrafOrgBgGrid */ {KAknsIIDNone, EDrawIcon, ES60_3_X, EAknsMajorGeneric ,0x1eba}, //KAknsIIDQgnGrafOrgBgGrid + /* SP_QgnGrafOrgBgGrid */ {KAknsIIDNone, EDrawIcon, ES60_3_X, EAknsMajorGeneric ,0x1eba}, //KAknsIIDQgnGrafOrgBgGrid /* SP_QgnGrafScrollArrowDown */ {KAknsIIDQgnGrafScrollArrowDown, EDrawGulIcon, ES60_All, -1,-1}, /* SP_QgnGrafScrollArrowLeft */ {KAknsIIDQgnGrafScrollArrowLeft, EDrawGulIcon, ES60_All, -1,-1}, /* SP_QgnGrafScrollArrowRight */ {KAknsIIDQgnGrafScrollArrowRight, EDrawGulIcon, ES60_All, -1,-1}, @@ -214,7 +214,7 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { // In 3.1 there different slider graphic and no pressed state. /* SP_QgnGrafNsliderMarker */ {KAknsIIDQgnIndiSliderEdit, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x19d1 /* KAknsIIDQgnGrafNsliderMarker */}, /* SP_QgnGrafNsliderMarkerSelected */ {KAknsIIDQgnIndiSliderEdit, EDrawIcon, ES60_3_1, EAknsMajorGeneric, 0x1a4a /* KAknsIIDQgnGrafNsliderMarkerSelected */}, - /* SP_QgnIndiSubMenu */ {KAknsIIDQgnIndiSubmenu, EDrawIcon, ES60_All, -1,-1}, + /* SP_QgnIndiSubmenu */ {KAknsIIDQgnIndiSubmenu, EDrawIcon, ES60_All, -1,-1}, /* SP_QgnNoteErased */ {KAknsIIDQgnNoteErased, EDrawIcon, ES60_All, -1,-1}, /* SP_QgnNoteError */ {KAknsIIDQgnNoteError, EDrawIcon, ES60_All, -1,-1}, /* SP_QgnNoteInfo */ {KAknsIIDQgnNoteInfo, EDrawIcon, ES60_All, -1,-1}, @@ -227,6 +227,28 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QgnPropFolderSmallNew */ {KAknsIIDQgnPropFolderSmallNew, EDrawIcon, ES60_All, -1,-1}, /* SP_QgnPropPhoneMemcLarge */ {KAknsIIDQgnPropPhoneMemcLarge, EDrawIcon, ES60_All, -1,-1}, + // Toolbar graphics is different in 3.1/3.2 vs. 5.0 + /* SP_QgnFrSctrlButtonCornerTl */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2301}, /* KAknsIIDQgnFrSctrlButtonCornerTl*/ + /* SP_QgnFrSctrlButtonCornerTr */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2302}, + /* SP_QgnFrSctrlButtonCornerBl */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2303}, + /* SP_QgnFrSctrlButtonCornerBr */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2304}, + /* SP_QgnFrSctrlButtonSideT */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2305}, + /* SP_QgnFrSctrlButtonSideB */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2306}, + /* SP_QgnFrSctrlButtonSideL */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2307}, + /* SP_QgnFrSctrlButtonSideR */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2308}, + /* SP_QgnFrSctrlButtonCenter */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2309}, /*KAknsIIDQgnFrSctrlButtonCenter*/ + + // No pressed state for toolbar button in 3.1/3.2. + /* SP_QgnFrSctrlButtonCornerTlPressed */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2621}, /*KAknsIIDQgnFrSctrlButtonCornerTlPressed*/ + /* SP_QgnFrSctrlButtonCornerTrPressed */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2622}, + /* SP_QgnFrSctrlButtonCornerBlPressed */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2623}, + /* SP_QgnFrSctrlButtonCornerBrPressed */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2624}, + /* SP_QgnFrSctrlButtonSideTPressed */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2625}, + /* SP_QgnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2626}, + /* SP_QgnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2627}, + /* SP_QgnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2628}, + /* SP_QgnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2629}, + // 3.1 & 3.2 do not have pressed state for scrollbar, so use normal scrollbar graphics instead. /* SP_QsnCpScrollHandleBottomPressed*/ {KAknsIIDQsnCpScrollHandleBottom, EDrawIcon, ES60_3_X, EAknsMajorGeneric, 0x20f8}, /*KAknsIIDQsnCpScrollHandleBottomPressed*/ /* SP_QsnCpScrollHandleMiddlePressed*/ {KAknsIIDQsnCpScrollHandleMiddle, EDrawIcon, ES60_3_X, EAknsMajorGeneric, 0x20f9}, /*KAknsIIDQsnCpScrollHandleMiddlePressed*/ @@ -266,10 +288,10 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QsnFrCaleCornerTr */ {KAknsIIDQsnFrCaleCornerTr, ENoDraw, ES60_All, -1,-1}, /* SP_QsnFrCaleCornerBl */ {KAknsIIDQsnFrCaleCornerBl, ENoDraw, ES60_All, -1,-1}, /* SP_QsnFrCaleCornerBr */ {KAknsIIDQsnFrCaleCornerBr, ENoDraw, ES60_All, -1,-1}, - /* SP_QsnFrCaleGSideT */ {KAknsIIDQsnFrCaleSideT, ENoDraw, ES60_All, -1,-1}, - /* SP_QsnFrCaleGSideB */ {KAknsIIDQsnFrCaleSideB, ENoDraw, ES60_All, -1,-1}, - /* SP_QsnFrCaleGSideL */ {KAknsIIDQsnFrCaleSideL, ENoDraw, ES60_All, -1,-1}, - /* SP_QsnFrCaleGSideR */ {KAknsIIDQsnFrCaleSideR, ENoDraw, ES60_All, -1,-1}, + /* SP_QsnFrCaleSideT */ {KAknsIIDQsnFrCaleSideT, ENoDraw, ES60_All, -1,-1}, + /* SP_QsnFrCaleSideB */ {KAknsIIDQsnFrCaleSideB, ENoDraw, ES60_All, -1,-1}, + /* SP_QsnFrCaleSideL */ {KAknsIIDQsnFrCaleSideL, ENoDraw, ES60_All, -1,-1}, + /* SP_QsnFrCaleSideR */ {KAknsIIDQsnFrCaleSideR, ENoDraw, ES60_All, -1,-1}, /* SP_QsnFrCaleCenter */ {KAknsIIDQsnFrCaleCenter, ENoDraw, ES60_All, -1,-1}, /* SP_QsnFrCaleHeadingCornerTl */ {KAknsIIDQsnFrCaleHeadingCornerTl, ENoDraw, ES60_All, -1,-1}, @@ -344,28 +366,6 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QsnFrPopupSubSideR */ {KAknsIIDQsnFrPopupSubSideR, ENoDraw, ES60_3_X, -1,-1}, /* SP_QsnFrPopupSubCenter */ {KAknsIIDQsnFrPopupCenterSubmenu, ENoDraw, ES60_3_X, -1,-1}, - // Toolbar graphics is different in 3.1/3.2 vs. 5.0 - /* SP_QsnFrSctrlButtonCornerTl */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2301}, /* KAknsIIDQgnFrSctrlButtonCornerTl*/ - /* SP_QsnFrSctrlButtonCornerTr */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2302}, - /* SP_QsnFrSctrlButtonCornerBl */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2303}, - /* SP_QsnFrSctrlButtonCornerBr */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2304}, - /* SP_QsnFrSctrlButtonSideT */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2305}, - /* SP_QsnFrSctrlButtonSideB */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2306}, - /* SP_QsnFrSctrlButtonSideL */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2307}, - /* SP_QsnFrSctrlButtonSideR */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2308}, - /* SP_QsnFrSctrlButtonCenter */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2309}, /*KAknsIIDQgnFrSctrlButtonCenter*/ - - // No pressed state for toolbar button in 3.1/3.2. - /* SP_QsnFrSctrlButtonCornerTlPressed */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2621}, /*KAknsIIDQsnFrSctrlButtonCornerTlPressed*/ - /* SP_QsnFrSctrlButtonCornerTrPressed */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2622}, - /* SP_QsnFrSctrlButtonCornerBlPressed */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2623}, - /* SP_QsnFrSctrlButtonCornerBrPressed */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2624}, - /* SP_QsnFrSctrlButtonSideTPressed */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2625}, - /* SP_QsnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2626}, - /* SP_QsnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2627}, - /* SP_QsnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2628}, - /* SP_QsnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2629}, - // No inactive button graphics in 3.1/3.2 /* SP_QsnFrButtonCornerTlInactive */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b1}, /*KAknsIIDQsnFrButtonCornerTlInactive*/ /* SP_QsnFrButtonCornerTrInactive */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x21b2}, @@ -397,7 +397,7 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = { /* SP_QsnFrListSideBPressed */ {KAknsIIDQsnFrListSideB, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2690}, /* SP_QsnFrListSideLPressed */ {KAknsIIDQsnFrListSideL, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2691}, /* SP_QsnFrListSideRPressed */ {KAknsIIDQsnFrListSideR, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2692}, - /* SP_QsnFrListPressed */ {KAknsIIDQsnFrList, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2693}, + /* SP_QsnFrListCenterPressed */ {KAknsIIDQsnFrListCenter, ENoDraw, ES60_3_X, EAknsMajorSkin, 0x2693}, }; QPixmap QS60StyleModeSpecifics::skinnedGraphics( @@ -514,7 +514,7 @@ void QS60StyleModeSpecifics::fallbackInfo(const QS60StyleEnums::SkinParts &style case QS60StyleEnums::SP_QgnGrafNsliderMarkerSelected: fallbackIndex = 17574; /* EMbmAvkonQgn_graf_nslider_marker_selected */ break; - case QS60StyleEnums::SP_QgnIndiSubMenu: + case QS60StyleEnums::SP_QgnIndiSubmenu: fallbackIndex = EMbmAvkonQgn_indi_submenu; break; case QS60StyleEnums::SP_QgnNoteErased: -- cgit v0.12 From d7810cb2630be0af69284d2cf26f861e0cda52e6 Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 10 Jun 2010 13:38:39 +0200 Subject: Moved runonphone target to prf files for all build systems. This reduces code duplication. RevBy: Miikka Heikkinen --- mkspecs/common/symbian/symbian-makefile.conf | 1 - mkspecs/common/symbian/symbian.conf | 2 +- mkspecs/features/symbian/run_on_phone.prf | 29 ++++++++++++++++++++++------ qmake/generators/symbian/symmake.cpp | 14 -------------- qmake/generators/symbian/symmake.h | 1 - qmake/generators/symbian/symmake_abld.cpp | 2 -- qmake/generators/symbian/symmake_sbsv2.cpp | 2 -- 7 files changed, 24 insertions(+), 27 deletions(-) diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index a3aade7..ab0c5b9 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -26,7 +26,6 @@ include(../../common/unix.conf) QMAKE_PREFIX_SHLIB = QMAKE_EXTENSION_SHLIB = dll CONFIG *= no_plugin_name_prefix -CONFIG += run_on_phone QMAKE_EXTENSION_PLUGIN = dll QMAKE_PREFIX_STATICLIB = QMAKE_EXTENSION_STATICLIB = lib diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index b8bfd7c..b037d3c 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -3,7 +3,7 @@ # TEMPLATE = app -CONFIG += qt warn_on release incremental link_prl sis_targets +CONFIG += qt warn_on release incremental link_prl sis_targets run_on_phone QT += core gui QMAKE_INCREMENTAL_STYLE = sublib diff --git a/mkspecs/features/symbian/run_on_phone.prf b/mkspecs/features/symbian/run_on_phone.prf index d3d2cfb..6948a48 100644 --- a/mkspecs/features/symbian/run_on_phone.prf +++ b/mkspecs/features/symbian/run_on_phone.prf @@ -1,14 +1,31 @@ # make sure we have a sis file and then call 'runonphone' to execute it on the phone -contains(TEMPLATE, app)|!equals(DEPLOYMENT, default_deployment) { +GENERATE_RUN_TARGETS = false + +contains(TEMPLATE, app): GENERATE_RUN_TARGETS = true +else:!equals(DEPLOYMENT, default_deployment) { + for(dep_item, $$list($$DEPLOYMENT)) { + dep_item_sources = $$eval($${dep_item}.sources) + !isEmpty(dep_item_sources): GENERATE_RUN_TARGETS = true + } +} + +equals(GENERATE_RUN_TARGETS, true) { sis_destdir = $$DESTDIR !isEmpty(sis_destdir):!contains(sis_destdir, "[/\\\\]$"):sis_destdir = $${sis_destdir}/ contains(QMAKE_HOST.os, "Windows"):sis_destdir = $$replace(sis_destdir, "/", "\\") - run_target.target = runonphone - run_target.depends = sis - run_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" - contains(TEMPLATE, "app"):run_target.commands += "$${TARGET}.exe" $(QT_RUN_OPTIONS) + contains(SYMBIAN_PLATFORMS, "WINSCW"):contains(TEMPLATE, "app") { + run_target.target = run + run_target.commands = call "$${EPOCROOT}epoc32/release/winscw/udeb/$${TARGET}.exe" $(QT_RUN_OPTIONS) + + QMAKE_EXTRA_TARGETS += run_target + } + + runonphone_target.target = runonphone + runonphone_target.depends = sis + runonphone_target.commands = runonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis "$${sis_destdir}$${TARGET}.sis" + contains(TEMPLATE, "app"):runonphone_target.commands += "$${TARGET}.exe" $(QT_RUN_OPTIONS) - QMAKE_EXTRA_TARGETS += run_target + QMAKE_EXTRA_TARGETS += runonphone_target } diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp index 6082aeb..ff58270 100644 --- a/qmake/generators/symbian/symmake.cpp +++ b/qmake/generators/symbian/symmake.cpp @@ -1112,17 +1112,3 @@ void SymbianMakefileGenerator::generateDistcleanTargets(QTextStream& t) t << "distclean: clean dodistclean" << endl; t << endl; } - -void SymbianMakefileGenerator::generateExecutionTargets(QTextStream& t, const QStringList& platforms) -{ - // create execution targets - if (targetType == TypeExe) { - if (platforms.contains("winscw")) { - t << "run:" << endl; - t << "\t-call " << epocRoot() << "epoc32/release/winscw/udeb/" << fixedTarget << ".exe " << "$(QT_RUN_OPTIONS)" << endl; - } - t << "runonphone: sis" << endl; - t << "\trunonphone $(QT_RUN_ON_PHONE_OPTIONS) --sis " << fixedTarget << ".sis " << fixedTarget << ".exe " << "$(QT_RUN_OPTIONS)" << endl; - t << endl; - } -} diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h index c5b6907..9853790 100644 --- a/qmake/generators/symbian/symmake.h +++ b/qmake/generators/symbian/symmake.h @@ -129,7 +129,6 @@ protected: const QString& itemSuffix); void generateDistcleanTargets(QTextStream& t); - void generateExecutionTargets(QTextStream& t, const QStringList& platforms); // Subclass implements virtual void writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) = 0; diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index 7e3fb45..d60528b 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -409,8 +409,6 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool t << "\t$(ABLD)" << testClause << " reallyclean " << item << " urel" << endl; } t << endl; - - generateExecutionTargets(t, debugPlatforms); } void SymbianAbldMakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index feacbef..c2f1d1a 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -282,8 +282,6 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "\t$(SBS) reallyclean -c " << item << "_urel" << testClause << endl; } t << endl; - - generateExecutionTargets(t, debugPlatforms); } void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) -- cgit v0.12 From 24bcac9de46c89f4d8b533946e7b0feeacca1b0d Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Fri, 11 Jun 2010 13:26:05 +0200 Subject: Fixed a broken merge. Reviewed-by: trustme --- src/gui/kernel/qapplication_win.cpp | 1 - .../kernel/qwinnativepangesturerecognizer_win_p.h | 65 ---------------------- 2 files changed, 66 deletions(-) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 622d4e4..0edb8fb 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -4067,7 +4067,6 @@ void QApplicationPrivate::initializeMultitouch_sys() if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { static const int QT_SM_DIGITIZER = 94; QApplicationPrivate::HasTouchSupport = GetSystemMetrics(QT_SM_DIGITIZER); - qDebug() << "QApplicationPrivate::HasTouchSupport " << QApplicationPrivate::HasTouchSupport; } QLibrary library(QLatin1String("user32")); diff --git a/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h b/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h index eb99b74..9d0e6f7 100644 --- a/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h +++ b/src/gui/kernel/qwinnativepangesturerecognizer_win_p.h @@ -54,71 +54,6 @@ // #include -#include - -class IInkRectangle; -class TabletHardwareCapabilities; -class TabletPropertyMetricUnit; -DECLARE_INTERFACE_(IInkTablet, IDispatch) -{ - STDMETHOD(get_Name)(THIS_ BSTR *Name) PURE; - STDMETHOD(get_PlugAndPlayId)(THIS_ BSTR *Id) PURE; - STDMETHOD(get_MaximumInputRectangle)(THIS_ IInkRectangle **Rectangle) PURE; - STDMETHOD(get_HardwareCapabilities)(THIS_ TabletHardwareCapabilities *Capabilities) PURE; - STDMETHOD(IsPacketPropertySupported)(THIS_ BSTR packetPropertyName) PURE; - STDMETHOD(GetPropertyMetrics)(THIS_ BSTR propertyName, long *Minimum, long *Maximum, TabletPropertyMetricUnit *Units, float *Resolution) PURE; -}; -enum TabletDeviceKind -{ - TDK_Mouse = 0, - TDK_Pen = 1, - TDK_Touch = 2 -}; -DECLARE_INTERFACE_(IInkTablet2, IDispatch) -{ - STDMETHOD(get_DeviceKind)(THIS_ TabletDeviceKind *Kind) PURE; -}; -DECLARE_INTERFACE_(IInkTablets, IDispatch) -{ - STDMETHOD(get_Count)(THIS_ long *Count) PURE; - STDMETHOD(get__NewEnum)(THIS_ IUnknown **_NewEnum) PURE; - STDMETHOD(get_DefaultTablet)(THIS_ IInkTablet **DefaultTablet) PURE; - STDMETHOD(Item)(THIS_ long Index, IInkTablet **Tablet) PURE; - STDMETHOD(IsPacketPropertySupported)(THIS_ BSTR packetPropertyName, VARIANT_BOOL *Supported) PURE; -}; - -#include - -class IInkRectangle; -class TabletHardwareCapabilities; -class TabletPropertyMetricUnit; -DECLARE_INTERFACE_(IInkTablet, IDispatch) -{ - STDMETHOD(get_Name)(THIS_ BSTR *Name) PURE; - STDMETHOD(get_PlugAndPlayId)(THIS_ BSTR *Id) PURE; - STDMETHOD(get_MaximumInputRectangle)(THIS_ IInkRectangle **Rectangle) PURE; - STDMETHOD(get_HardwareCapabilities)(THIS_ TabletHardwareCapabilities *Capabilities) PURE; - STDMETHOD(IsPacketPropertySupported)(THIS_ BSTR packetPropertyName) PURE; - STDMETHOD(GetPropertyMetrics)(THIS_ BSTR propertyName, long *Minimum, long *Maximum, TabletPropertyMetricUnit *Units, float *Resolution) PURE; -}; -enum TabletDeviceKind -{ - TDK_Mouse = 0, - TDK_Pen = 1, - TDK_Touch = 2 -}; -DECLARE_INTERFACE_(IInkTablet2, IDispatch) -{ - STDMETHOD(get_DeviceKind)(THIS_ TabletDeviceKind *Kind) PURE; -}; -DECLARE_INTERFACE_(IInkTablets, IDispatch) -{ - STDMETHOD(get_Count)(THIS_ long *Count) PURE; - STDMETHOD(get__NewEnum)(THIS_ IUnknown **_NewEnum) PURE; - STDMETHOD(get_DefaultTablet)(THIS_ IInkTablet **DefaultTablet) PURE; - STDMETHOD(Item)(THIS_ long Index, IInkTablet **Tablet) PURE; - STDMETHOD(IsPacketPropertySupported)(THIS_ BSTR packetPropertyName, VARIANT_BOOL *Supported) PURE; -}; #ifndef QT_NO_GESTURES -- cgit v0.12 From 787b56fbcad2eda8ababc919a535fb2f9ef48fb5 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 11 Jun 2010 14:35:18 +0300 Subject: Show EditorDateEdit before changing selection in qdatetimeedit test In Symbian plaform showing a widget automatically focuses it by design, which breaks this test case. Changed the selection change to happen after widget show, as this test case doesn't require it to happen before show. Task-number: QTBUG-11046 Reviewed-by: axis --- tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp index 558d4de..3125258 100644 --- a/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/qdatetimeedit/tst_qdatetimeedit.cpp @@ -3148,8 +3148,8 @@ void tst_QDateTimeEdit::nextPrevSection() EditorDateEdit edit; edit.setDisplayFormat("hh/mm/bc9ss"); edit.setTime(QTime(12, 34, 56)); - edit.setSelectedSection(QDateTimeEdit::MinuteSection); edit.show(); + edit.setSelectedSection(QDateTimeEdit::MinuteSection); QCOMPARE(edit.lineEdit()->selectedText(), QString("34")); // selftest QTest::keyClick(&edit, key, modifiers); QCOMPARE(edit.lineEdit()->selectedText(), selectedText); -- cgit v0.12 From a295a69e76ff330a2716c97b70723f0bd408f197 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 11 Jun 2010 14:05:43 +0200 Subject: doc: Added DITA XML generator Task-number: QTBUG-11391 --- src/gui/kernel/qwidget.cpp | 1 - tools/qdoc3/ditaxmlgenerator.cpp | 1479 +++++++++++++++++----------------- tools/qdoc3/ditaxmlgenerator.h | 25 +- tools/qdoc3/main.cpp | 2 + tools/qdoc3/pagegenerator.cpp | 4 +- tools/qdoc3/test/qt-ditaxml.qdocconf | 11 + 6 files changed, 772 insertions(+), 750 deletions(-) create mode 100644 tools/qdoc3/test/qt-ditaxml.qdocconf diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index b5879ae..0fddbf8 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1019,7 +1019,6 @@ struct QWidgetExceptionCleaner \sa windowFlags */ - QWidget::QWidget(QWidget *parent, Qt::WindowFlags f) : QObject(*new QWidgetPrivate, 0), QPaintDevice() { diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index a64e8e7..2c578f0 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -45,23 +45,295 @@ #include "codemarker.h" #include "codeparser.h" -#include "helpprojectwriter.h" #include "ditaxmlgenerator.h" #include "node.h" #include "separator.h" #include "tree.h" #include - #include #include #include #include +#include QT_BEGIN_NAMESPACE -#define COMMAND_VERSION Doc::alias("version") +#define COMMAND_VERSION Doc::alias("version") int DitaXmlGenerator::id = 0; +#define cxxapi_d_xref Doc::alias("cxxapi-d-xref") +#define cxxclass Doc::alias("cxxclass") +#define cxxdefine Doc::alias("cxxdefine") +#define cxxenumeration Doc::alias("cxxenumeration") +#define cxxfile Doc::alias("cxxfile") +#define cxxfunction Doc::alias("cxxfunction") +#define cxxstruct Doc::alias("cxxstruct") +#define cxxtypedef Doc::alias("cxxtypedef") +#define cxxunion Doc::alias("cxxunion") +#define cxxvariable Doc::alias("cxxvariable") + +#define CXXAPIMAP Doc::alias("cxxAPIMap") +#define CXXCLASSREF Doc::alias("cxxClassRef") +#define CXXDEFINEREF Doc::alias("cxxDefineRef") +#define CXXENUMERATIONREF Doc::alias("cxxEnumerationRef") +#define CXXFILEREF Doc::alias("cxxFileRef") +#define CXXFUNCTIONREF Doc::alias("cxxFunctionRef") +#define CXXSTRUCTREF Doc::alias("cxxStructRef") +#define CXXTYPDEFREF Doc::alias("cxxTypedefRef") +#define CXXUNIONREF Doc::alias("cxxUnionRef") +#define CXXVARIABLEREF Doc::alias("cxxVariableRef") + +#define CXXCLASS Doc::alias("cxxClass") +#define CXXCLASSABSTRACT Doc::alias("cxxClassAbstract") +#define CXXCLASSACCESSSPECIFIER Doc::alias("cxxClassAccessSpecifier") +#define CXXCLASSAPIITEMLOCATION Doc::alias("cxxClassAPIItemLocation") +#define CXXCLASSBASECLASS Doc::alias("cxxClassBaseClass") +#define CXXCLASSBASECLASSSTRUCT Doc::alias("cxxClassBaseStruct") +#define CXXCLASSBASEUNION Doc::alias("cxxClassBaseUnion") +#define CXXCLASSDECLARATIONFILE Doc::alias("cxxClassDeclarationFile") +#define CXXCLASSDECLARATIONFILELINE Doc::alias("cxxClassDeclarationFileLine") +#define CXXCLASSDEFINITION Doc::alias("cxxClassDefinition") +#define CXXCLASSDEFINITIONFILE Doc::alias("cxxClassDefinitionFile") +#define CXXCLASSDEFINITIONFILEEND Doc::alias("cxxClassDefinitionFileLineEnd") +#define CXXCLASSDEFINITIONFILESTART Doc::alias("cxxClassDefinitionFileLineStart") +#define CXXCLASSDERIVATION Doc::alias("cxxClassDerivation") +#define CXXCLASSDERIVATIONACCESSSPECIFIER Doc::alias("cxxClassDerivationAccessSpecifier") +#define CXXCLASSDERIVATIONS Doc::alias("cxxClassDerivations") +#define CXXCLASSDERIVATIONVIRTUAL Doc::alias("cxxClassDerivationVirtual") +#define CXXCLASSDETAIL Doc::alias("cxxClassDetail") +#define CXXCLASSENUMERATIONINHERITED Doc::alias("cxxClassEnumerationInherited") +#define CXXCLASSENUMERATORINHERITED Doc::alias("cxxClassEnumeratorInherited") +#define CXXCLASSFUNCTIONINHERITED Doc::alias("cxxClassFunctionInherited") +#define CXXCLASSINHERITS Doc::alias("cxxClassInherits") +#define CXXCLASSINHERITSDETAIL Doc::alias("cxxClassInheritsDetail") +#define CXXCLASSNESTED Doc::alias("cxxClassNested") +#define CXXCLASSNESTEDCLASS Doc::alias("cxxClassNestedClass") +#define CXXCLASSNESTEDDETAIL Doc::alias("cxxClassNestedDetail") +#define CXXCLASSNESTEDSTRUCT Doc::alias("cxxClassNestedStruct") +#define CXXCLASSNESTEDUNION Doc::alias("cxxClassNestedUnion") +#define CXXCLASSTEMPLATEPARAMETER Doc::alias("cxxClassTemplateParameter") +#define CXXCLASSTEMPLATEPARAMETERS Doc::alias("cxxClassTemplateParameters") +#define CXXCLASSTEMPLATEPARAMETERTYPE Doc::alias("cxxClassTemplateParameterType") +#define CXXCLASSVARIABLEINHERITED Doc::alias("cxxClassVariableInherited") + +#define CXXDEFINE Doc::alias("cxxDefine") +#define CXXDEFINEACCESSSPECIFIER Doc::alias("cxxDefineAccessSpecifier") +#define CXXDEFINEAPIITEMLOCATION Doc::alias("cxxDefineAPIItemLocation") +#define CXXDEFINEDECLARATIONFILE Doc::alias("cxxDefineDeclarationFile") +#define CXXDEFINEDECLARATIONFILELINE Doc::alias("cxxDefineDeclarationFileLine") +#define CXXDEFINEDEFINITION Doc::alias("cxxDefineDefinition") +#define CXXDEFINEDETAIL Doc::alias("cxxDefineDetail") +#define CXXDEFINENAMELOOKUP Doc::alias("cxxDefineNameLookup") +#define CXXDEFINEPARAMETER Doc::alias("cxxDefineParameter") +#define CXXDEFINEPARAMETERDECLARATIONNAME Doc::alias("cxxDefineParameterDeclarationName") +#define CXXDEFINEPARAMETERS Doc::alias("cxxDefineParameters") +#define CXXDEFINEPROTOTYPE Doc::alias("cxxDefinePrototype") +#define CXXDEFINEREIMPLEMENTED Doc::alias("cxxDefineReimplemented") + +#define CXXENUMERATION Doc::alias("cxxEnumeration") +#define CXXENUMERATIONACCESSSPECIFIER Doc::alias("cxxEnumerationAccessSpecifier") +#define CXXENUMERATIONAPIITEMLOCATION Doc::alias("cxxEnumerationAPIItemLocation") +#define CXXENUMERATIONDECLARATIONFILE Doc::alias("cxxEnumerationDeclarationFile") +#define CXXENUMERATIONDECLARATIONFILELINE Doc::alias("cxxEnumerationDeclarationFileLine") +#define CXXENUMERATIONDEFINITION Doc::alias("cxxEnumerationDefinition") +#define CXXENUMERATIONDEFINITIONFILE Doc::alias("cxxEnumerationDefinitionFile") +#define CXXENUMERATIONDEFINITIONFILELINEEND Doc::alias("cxxEnumerationDefinitionFileLineEnd") +#define CXXENUMERATIONDEFINITIONFILELINESTART Doc::alias("cxxEnumerationDefinitionFileLineStart") +#define CXXENUMERATIONDETAIL Doc::alias("cxxEnumerationDetail") +#define CXXENUMERATIONNAMELOOKUP Doc::alias("cxxEnumerationNameLookup") +#define CXXENUMERATIONPROTOTYPE Doc::alias("cxxEnumerationPrototype") +#define CXXENUMERATIONREIMPLEMENTED Doc::alias("cxxEnumerationReimplemented") +#define CXXENUMERATIONSCOPEDNAME Doc::alias("cxxEnumerationScopedName") +#define CXXENUMERATOR Doc::alias("cxxEnumerator") +#define CXXENUMERATORAPIITEMLOCATION Doc::alias("cxxEnumeratorAPIItemLocation") +#define CXXENUMERATORDECLARATIONFILE Doc::alias("cxxEnumeratorDeclarationFile") +#define CXXENUMERATORDECLARATIONFILELINE Doc::alias("cxxEnumeratorDeclarationFileLine") +#define CXXENUMERATORINITIALISER Doc::alias("cxxEnumeratorInitialiser") +#define CXXENUMERATORNAMELOOKUP Doc::alias("cxxEnumeratorNameLookup") +#define CXXENUMERATORPROTOTYPE Doc::alias("cxxEnumeratorPrototype") +#define CXXENUMERATORS Doc::alias("cxxEnumerators") +#define CXXENUMERATORSCOPEDNAME Doc::alias("cxxEnumeratorScopedName") + +#define CXXFILE_INFO_TYPES Doc::alias("cxxFile-info-types") +#define CXXFILE_TYPES_DEFAULT Doc::alias("cxxFile-types-default") +#define CXXFILE Doc::alias("cxxFile") +#define CXXFILEAPIITMELOCATION Doc::alias("cxxFileAPIItemLocation") +#define CXXFILEDECLARATIONFILE Doc::alias("cxxFileDeclarationFile") + +#define CXXFUNCTION Doc::alias("cxxFunction") +#define CXXFUNCTIONACCESSSPECIFIER Doc::alias("cxxFunctionAccessSpecifier") +#define CXXFUNCTIONAPIITEMLOCATION Doc::alias("cxxFunctionAPIItemLocation") +#define CXXFUNCTIONCONST Doc::alias("cxxFunctionConst") +#define CXXFUNCTIONCONSTRUCTOR Doc::alias("cxxFunctionConstructor") +#define CXXFUNCTIONDECLARATIONFILE Doc::alias("cxxFunctionDeclarationFile") +#define CXXFUNCTIONDECLARATIONFILELINE Doc::alias("cxxFunctionDeclarationFileLine") +#define CXXFUNCTIONDECLAREDTYPE Doc::alias("cxxFunctionDeclaredType") +#define CXXFUNCTIONDEFINITION Doc::alias("cxxFunctionDefinition") +#define CXXFUNCTIONDEFINITIONFILE Doc::alias("cxxFunctionDefinitionFile") +#define CXXFUNCTIONDEFINITIONFILELINEEND Doc::alias("cxxFunctionDefinitionFileLineEnd") +#define CXXFUNCTIONDEFINITIONFILELINESTART Doc::alias("cxxFunctionDefinitionFileLineStart") +#define CXXFUNCTIONDESTRUCTOR Doc::alias("cxxFunctionDestructor") +#define CXXFUNCTIONDETAIL Doc::alias("cxxFunctionDetail") +#define CXXFUNCTIONEXPLICIT Doc::alias("cxxFunctionExplicit") +#define CXXFUNCTIONINLINE Doc::alias("cxxFunctionInline") +#define CXXFUNCTIONNAMELOOKUP Doc::alias("cxxFunctionNameLookup") +#define CXXFUNCTIONPARAMETER Doc::alias("cxxFunctionParameter") +#define CXXFUNCTIONPARAMETERDECLARATIONNAME Doc::alias("cxxFunctionParameterDeclarationName") +#define CXXFUNCTIONPARAMETERDECLAREDTYPE Doc::alias("cxxFunctionParameterDeclaredType") +#define CXXFUNCTIONPARAMETERDEFAULTVALUE Doc::alias("cxxFunctionParameterDefaultValue") +#define CXXFUNCTIONPARAMETERDEFINITIONNAME Doc::alias("cxxFunctionParameterDefinitionName") +#define CXXFUNCTIONPARAMETERS Doc::alias("cxxFunctionParameters") +#define CXXFUNCTIONPROTOTYPE Doc::alias("cxxFunctionPrototype") +#define CXXFUNCTIONPUREVIRTUAL Doc::alias("cxxFunctionPureVirtual") +#define CXXFUNCTIONREIMPLEMENTED Doc::alias("cxxFunctionReimplemented") +#define CXXFUNCTIONRETURNTYPE Doc::alias("cxxFunctionReturnType") +#define CXXFUNCTIONSCOPEDNAME Doc::alias("cxxFunctionScopedName") +#define CXXFUNCTIONSTORAGECLASSSPECIFIEREXTERN Doc::alias("cxxFunctionStorageClassSpecifierExtern") +#define CXXFUNCTIONSTORAGECLASSSPECIFIERMUTABLE Doc::alias("cxxFunctionStorageClassSpecifierMutable") +#define CXXFUNCTIONSTORAGECLASSSPECIFIERSTATIC Doc::alias("cxxFunctionStorageClassSpecifierStatic") +#define CXXFUNCTIONTEMPLATEPARAMETER Doc::alias("cxxFunctionTemplateParameter") +#define CXXFUNCTIONTEMPLATEPARAMETERS Doc::alias("cxxFunctionTemplateParameters") +#define CXXFUNCTIONTEMPLATEPARAMETERTYPE Doc::alias("cxxFunctionTemplateParameterType") +#define CXXFUNCTIONVIRTUAL Doc::alias("cxxFunctionVirtual") +#define CXXFUNCTIONVOLATILE Doc::alias("cxxFunctionVolatile") + +#define CXXSTRUCT Doc::alias("cxxStruct") +#define CXXSTRUCTABSTRACT Doc::alias("cxxStructAbstract") +#define CXXSTRUCTACCESSSPECIFIER Doc::alias("cxxStructAccessSpecifier") +#define CXXSTRUCTAPIITEMLOCATION Doc::alias("cxxStructAPIItemLocation") +#define CXXSTRUCTBASECLASS Doc::alias("cxxStructBaseClass") +#define CXXSTRUCTBASESTRUCT Doc::alias("cxxStructBaseStruct") +#define CXXSTRUCTBASEUNION Doc::alias("cxxStructBaseUnion") +#define CXXSTRUCTDECLARATIONFILE Doc::alias("cxxStructDeclarationFile") +#define CXXSTRUCTDECLARATIONFILELINE Doc::alias("cxxStructDeclarationFileLine") +#define CXXSTRUCTDEFINITION Doc::alias("cxxStructDefinition") +#define CXXSTRUCTDEFINITIONFILE Doc::alias("cxxStructDefinitionFile") +#define CXXSTRUCTDEFINITIONFILELINEEND Doc::alias("cxxStructDefinitionFileLineEnd") +#define CXXSTRUCTDEFINITIONFILELINESTART Doc::alias("cxxStructDefinitionFileLineStart") +#define CXXSTRUCTDERIVATION Doc::alias("cxxStructDerivation") +#define CXXSTRUCTDERIVATIONACCESSSPECIFIER Doc::alias("cxxStructDerivationAccessSpecifier") +#define CXXSTRUCTDERIVATIONS Doc::alias("cxxStructDerivations") +#define CXXSTRUCTDERIVATIONVIRTUAL Doc::alias("cxxStructDerivationVirtual") +#define CXXSTRUCTDETAIL Doc::alias("cxxStructDetail") +#define CXXSTRUCTENUMERATIONINHERITED Doc::alias("cxxStructEnumerationInherited") +#define CXXSTRUCTENUMERATORINHERITED Doc::alias("cxxStructEnumeratorInherited") +#define CXXSTRUCTFUNCTIONINHERITED Doc::alias("cxxStructFunctionInherited") +#define CXXSTRUCTINHERITS Doc::alias("cxxStructInherits") +#define CXXSTRUCTINHERITSDETAIL Doc::alias("cxxStructInheritsDetail") +#define CXXSTRUCTNESTED Doc::alias("cxxStructNested") +#define CXXSTRUCTNESTEDCLASS Doc::alias("cxxStructNestedClass") +#define CXXSTRUCTNESTEDDETAIL Doc::alias("cxxStructNestedDetail") +#define CXXSTRUCTNESTEDSTRUCT Doc::alias("cxxStructNestedStruct") +#define CXXSTRUCTNESTEDUNION Doc::alias("cxxStructNestedUnion") +#define CXXSTRUCTTEMPLATEPARAMETER Doc::alias("cxxStructTemplateParameter") +#define CXXSTRUCTTEMPLATEPARAMETERS Doc::alias("cxxStructTemplateParameters") +#define CXXSTRUCTTEMPLATEPARAMETERTYPE Doc::alias("cxxStructTemplateParameterType") +#define CXXSTRUCTVARIABLEINHERITED Doc::alias("cxxStructVariableInherited") + +#define CXXTYPEDEF Doc::alias("cxxTypedef") +#define CXXTYPEDEFACCESSSPECIFIER Doc::alias("cxxTypedefAccessSpecifier") +#define CXXTYPEDEFAPIITEMLOCATION Doc::alias("cxxTypedefAPIItemLocation") +#define CXXTYPEDEFDECLARATIONFILE Doc::alias("cxxTypedefDeclarationFile") +#define CXXTYPEDEFDECLARATIONFILELINE Doc::alias("cxxTypedefDeclarationFileLine") +#define CXXTYPEDEFDECLAREDTYPE Doc::alias("cxxTypedefDeclaredType") +#define CXXTYPEDEFDEFINITION Doc::alias("cxxTypedefDefinition") +#define CXXTYPEDEFDETAIL Doc::alias("cxxTypedefDetail") +#define CXXTYPEDEFNAMELOOKUP Doc::alias("cxxTypedefNameLookup") +#define CXXTYPEDEFPROTOTYPE Doc::alias("cxxTypedefPrototype") +#define CXXTYPEDEFREIMPLEMENTED Doc::alias("cxxTypedefReimplemented") +#define CXXTYPEDEFSCOPEDNAME Doc::alias("cxxTypedefScopedName") + +#define CXXUNION Doc::alias("cxxUnion") +#define CXXUNIONABSTRACT Doc::alias("cxxUnionAbstract") +#define CXXUNIONACCESSSPECIFIER Doc::alias("cxxUnionAccessSpecifier") +#define CXXUNIONAPIITEMLOCATION Doc::alias("cxxUnionAPIItemLocation") +#define CXXUNIONDECLARATIONFILE Doc::alias("cxxUnionDeclarationFile") +#define CXXUNIONDECLARATIONFILELINE Doc::alias("cxxUnionDeclarationFileLine") +#define CXXUNIONDEFINITION Doc::alias("cxxUnionDefinition") +#define CXXUNIONDEFINITIONFILE Doc::alias("cxxUnionDefinitionFile") +#define CXXUNIONDEFINITIONFILELINEEND Doc::alias("cxxUnionDefinitionFileLineEnd") +#define CXXUNIONDEFINITIONFILELINESTART Doc::alias("cxxUnionDefinitionFileLineStart") +#define CXXUNIONDETAIL Doc::alias("cxxUnionDetail") +#define CXXUNIONNESTED Doc::alias("cxxUnionNested") +#define CXXUNIONNESTEDCLASS Doc::alias("cxxUnionNestedClass") +#define CXXUNIONNESTEDDETAIL Doc::alias("cxxUnionNestedDetail") +#define CXXUNIONNESTEDSTRUCT Doc::alias("cxxUnionNestedStruct") +#define CXXUNIONNESTEDUNION Doc::alias("cxxUnionNestedUnion") +#define CXXUNIONTEMPLATEPARAMETER Doc::alias("cxxUnionTemplateParameter") +#define CXXUNIONTEMPLATEPARAMETERS Doc::alias("cxxUnionTemplateParameters") +#define CXXUNIONTEMPLATEPARAMETERTYPE Doc::alias("cxxUnionTemplateParameterType") + +#define CXXVARIABLE Doc::alias("cxxVariable") +#define CXXVARIABLEACCESSSPECIFIER Doc::alias("cxxVariableAccessSpecifier") +#define CXXVARIABLEAPIITEMLOCATION Doc::alias("cxxVariableAPIItemLocation") +#define CXXVARIABLECONST Doc::alias("cxxVariableConst") +#define CXXVARIABLEDECLARATIONFILE Doc::alias("cxxVariableDeclarationFile") +#define CXXVARIABLEDECLARATIONFILELINE Doc::alias("cxxVariableDeclarationFileLine") +#define CXXVARIABLEDECLAREDTYPE Doc::alias("cxxVariableDeclaredType") +#define CXXVARIABLEDEFINITION Doc::alias("cxxVariableDefinition") +#define CXXVARIABLEDETAIL Doc::alias("cxxVariableDetail") +#define CXXVARIABLENAMELOOKUP Doc::alias("cxxVariableNameLookup") +#define CXXVARIABLEPROTOTYPE Doc::alias("cxxVariablePrototype") +#define CXXVARIABLEREIMPLEMENTED Doc::alias("cxxVariableReimplemented") +#define CXXVARIABLESCOPEDNAME Doc::alias("cxxVariableScopedName") +#define CXXVARIABLESTORAGECLASSSPECIFIEREXTERN Doc::alias("cxxVariableStorageClassSpecifierExtern") +#define CXXVARIABLESTORAGECLASSSPECIFIERMUTABLE Doc::alias("cxxVariableStorageClassSpecifierMutable") +#define CXXVARIABLESTORAGECLASSSPECIFIERSTATIC Doc::alias("cxxVariableStorageClassSpecifierStatic") +#define CXXVARIABLEVOLATILE Doc::alias("cxxVariableVolatile") + +#define APIREF Doc::alias("apiRef") +#define APINAME Doc::alias("apiName") +#define APIDETAIL Doc::alias("apiDetail") +#define APISYNTAX Doc::alias("apiSyntax") +#define APISYNTAXTEXT Doc::alias("apiSyntaxText") +#define APISYNTAXITEM Doc::alias("apiSyntaxItem") +#define APIDEF Doc::alias("apiDef") +#define APIQUALIFIER Doc::alias("apiQualifier") +#define APIRELATION Doc::alias("apiRelation") +#define APITYPE Doc::alias("apiType") +#define APIARRAY Doc::alias("apiArray") +#define APIDATA Doc::alias("apiData") +#define APIDEFNOTE Doc::alias("apiDefNote") +#define APIDEFITEM Doc::alias("apiDefItem") +#define APIITEMNAME Doc::alias("apiItemName") +#define APIDESC Doc::alias("apiDesc") +#define APIIMPL Doc::alias("apiImpl") + +#define APIPACKAGE Doc::alias("apiPackage") + +#define APICLASSIFIER Doc::alias("apiClassifier") +#define APICLASSIFIERDETAIL Doc::alias("apiClassifierDetail") +#define APICLASSIFIERDEF Doc::alias("apiClassifierDef") +#define APICLASSIFIERMEMBER Doc::alias("apiClassifierMember") +#define APIOTHERCLASSIFIER Doc::alias("apiOtherClassifier") +#define APIBASECLASSIFIER Doc::alias("apiBaseClassifier") + +#define APIOPERATION Doc::alias("apiOperation") +#define APIOPERATIONDETAIL Doc::alias("apiOperationDetail") +#define APIOPERATIONDEF Doc::alias("apiOperationDef") +#define APIRETURN Doc::alias("apiReturn") +#define APIPARAM Doc::alias("apiParam") +#define APIEVENT Doc::alias("apiEvent") +#define APIOPERATIONDEFITEM Doc::alias("apiOperationDefItem") +#define APIOPERATIONCLASSIFIER Doc::alias("apiOperationClassifier") +#define APICONSTRUCTORDEF Doc::alias("apiConstructorDef") + +#define APIVALUE Doc::alias("apiValue") +#define APIVALUEDETAIL Doc::alias("apiValueDetail") +#define APIVALUEDEF Doc::alias("apiValueDef") +#define APIVALUEMEMBER Doc::alias("apiValueMember") +#define APIVALUECLASSIFIER Doc::alias("apiValueClassifier") + +#define APIclassifier Doc::alias("apiclassifier") +#define APIoperation Doc::alias("apioperation") +#define APIpackage Doc::alias("apipackage") +#define APIvalue Doc::alias("apivalue") + +#define APIMAP Doc::alias("apiMap") +#define APIITEMREF Doc::alias("apiItemRef") + +#define SHORTDESC Doc::alias("shortdesc") + QString DitaXmlGenerator::sinceTitles[] = { " New Namespaces", @@ -88,11 +360,11 @@ static void addLink(const QString &linkTarget, QString *res) { if (!linkTarget.isEmpty()) { - *res += ""; *res += nestedStuff; - *res += ""; + *res += ""; } else { *res += nestedStuff; @@ -101,8 +373,7 @@ static void addLink(const QString &linkTarget, DitaXmlGenerator::DitaXmlGenerator() - : helpProjectWriter(0), - inLink(false), + : inLink(false), inContents(false), inSectionHeading(false), inTableHeader(false), @@ -112,32 +383,31 @@ DitaXmlGenerator::DitaXmlGenerator() funcLeftParen("\\S(\\()"), myTree(0), slow(false), - obsoleteLinks(false) + obsoleteLinks(false), + noLinks(0) { } DitaXmlGenerator::~DitaXmlGenerator() { - if (helpProjectWriter) - delete helpProjectWriter; + // nothing yet. } void DitaXmlGenerator::initializeGenerator(const Config &config) { static const struct { const char *key; - const char *left; - const char *right; + const char *tag; } defaults[] = { - { ATOM_FORMATTING_BOLD, "", "" }, - { ATOM_FORMATTING_INDEX, "" }, - { ATOM_FORMATTING_ITALIC, "", "" }, - { ATOM_FORMATTING_PARAMETER, "", "" }, - { ATOM_FORMATTING_SUBSCRIPT, "", "" }, - { ATOM_FORMATTING_SUPERSCRIPT, "", "" }, - { ATOM_FORMATTING_TELETYPE, "", "" }, - { ATOM_FORMATTING_UNDERLINE, "", "" }, - { 0, 0, 0 } + { ATOM_FORMATTING_BOLD, "b" }, + { ATOM_FORMATTING_INDEX, ""; + writer.writeCharacters("-->"); break; case Atom::FormatElse: case Atom::FormatEndif: case Atom::FormatIf: break; case Atom::FormattingLeft: - out() << formattingLeftMap()[atom->string()]; + writer.writeStartElement(formattingLeftMap()[atom->string()]); if (atom->string() == ATOM_FORMATTING_PARAMETER) { if (atom->next() != 0 && atom->next()->type() == Atom::String) { QRegExp subscriptRegExp("([a-z]+)_([0-9n])"); if (subscriptRegExp.exactMatch(atom->next()->string())) { - out() << subscriptRegExp.cap(1) << "" - << subscriptRegExp.cap(2) << ""; + writer.writeCharacters(subscriptRegExp.cap(1)); + writer.writeStartElement("sub"); + writer.writeCharacters(subscriptRegExp.cap(2)); + writer.writeEndElement(); // skipAhead = 1; } } @@ -477,7 +703,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, endLink(); } else { - out() << formattingRightMap()[atom->string()]; + writer.writeEndElement(); // ? } break; case Atom::AnnotatedList: @@ -676,30 +902,33 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, /* First generate the table of contents. */ - out() << "
    \n"; + writer.writeStartElement("ul"); s = sections.constBegin(); while (s != sections.constEnd()) { if (!(*s).members.isEmpty()) { - out() << "
  • " - << "" - << (*s).name - << "
  • \n"; + writer.writeStartElement("li"); + writer.writeStartElement("xref"); + writer.writeAttribute("href",QString("#" + Doc::canonicalTitle((*s).name))); + writer.writeCharacters((*s).name); + writer.writeEndElement(); // + writer.writeEndElement(); // } ++s; } - out() << "
\n"; + writer.writeEndElement(); // int idx = 0; s = sections.constBegin(); while (s != sections.constEnd()) { if (!(*s).members.isEmpty()) { - out() << "\n"; - out() << "

" << protectEnc((*s).name) << "

\n"; + QString guid = QUuid::createUuid().toString(); + guidMap.insert(Doc::canonicalTitle((*s).name),guid); + writer.writeStartElement("p"); + writer.writeAttribute("id",guid); + writer.writeAttribute("outputclass","h3"); + writer.writeCharacters(protectEnc((*s).name)); + writer.writeEndElement(); //

if (idx == Class) generateCompactList(0, marker, ncmap.value(), false, QString("Q")); else if (idx == QmlClass) @@ -719,17 +948,18 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, pmap = parentmaps.begin(); while (pmap != parentmaps.end()) { NodeList nlist = pmap->values(); - out() << "

Class "; - - out() << ""; + writer.writeStartElement("p"); + writer.writeCharacters("Class "); + writer.writeStartElement("xref"); + writer.writeAttribute("href",linkForNode(pmap.key(), 0)); QStringList pieces = fullName(pmap.key(), 0, marker).split("::"); - out() << protectEnc(pieces.last()); - out() << "" << ":

\n"; + writer.writeCharacters(protectEnc(pieces.last())); + writer.writeEndElement(); // + writer.writeCharacters(":"); + writer.writeEndElement(); //

generateSection(nlist, 0, marker, CodeMarker::Summary); - out() << "
"; + writer.writeEmptyElement("br"); ++pmap; } } @@ -749,33 +979,40 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, QString text; if (atom->next() != 0) text = atom->next()->string(); - if (atom->type() == Atom::Image) - out() << "

"; + if (atom->type() == Atom::Image) { + writer.writeStartElement("p"); + writer.writeAttribute("outputclass","centerAlign"); + } if (fileName.isEmpty()) { - out() << "[Missing image " - << protectEnc(atom->string()) << "]"; + writer.writeStartElement("font"); + writer.writeAttribute("color","red"); + writer.writeCharacters("[Missing image: "); + writer.writeCharacters(protectEnc(atom->string())); + writer.writeEndElement(); // } else { - out() << "\"""; - helpProjectWriter->addExtraFile(fileName); + writer.writeAttribute("alt",protectEnc(text)); + writer.writeEndElement(); // } if (atom->type() == Atom::Image) - out() << "

"; + writer.writeEndElement(); //

} break; case Atom::ImageText: + // nothing break; case Atom::LegaleseLeft: - out() << "
"; + writer.writeStartElement("p"); + writer.writeAttribute("outputclass","legalese"); break; case Atom::LegaleseRight: - out() << "
"; + writer.writeEndElement(); //

break; case Atom::LineBreak: - out() << "
"; + writer.writeEmptyElement("br"); break; case Atom::Link: { @@ -799,69 +1036,83 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::ListLeft: if (in_para) { - out() << "

\n"; + writer.writeEndElement(); //

in_para = false; } if (atom->string() == ATOM_LIST_BULLET) { - out() << "
    \n"; + writer.writeStartElement("ul"); } else if (atom->string() == ATOM_LIST_TAG) { - out() << "
    \n"; + writer.writeStartElement("dl"); } else if (atom->string() == ATOM_LIST_VALUE) { threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom); if (threeColumnEnumValueTable) { - out() << ""; - // << "" - if (++numTableRows % 2 == 1) - out() << ""; - else - out() << ""; - - out() << "" - << "" - << "\n"; + writer.writeStartElement("table"); + writer.writeAttribute("outputclass","valuelist"); + writer.writeStartElement("tr"); + if (++numTableRows % 2 == 1) + writer.writeAttribute("outputclass","odd"); + else + writer.writeAttribute("outputclass","even"); + writer.writeStartElement("th"); + writer.writeCharacters("Constant"); + writer.writeEndElement(); // + writer.writeStartElement("th"); + writer.writeCharacters("Value"); + writer.writeEndElement(); // + writer.writeStartElement("th"); + writer.writeCharacters("Description"); + writer.writeEndElement(); // + writer.writeEndElement(); // } else { - out() << "
    ConstantValueDescription
    " - << "\n"; + writer.writeStartElement("table"); + writer.writeAttribute("outputclass","valuelist"); + writer.writeStartElement("tr"); + writer.writeStartElement("th"); + writer.writeCharacters("Constant"); + writer.writeEndElement(); // + writer.writeStartElement("th"); + writer.writeCharacters("Value"); + writer.writeEndElement(); // + writer.writeEndElement(); // } } else { - out() << "
      string() == ATOM_LIST_LOWERALPHA) { - out() << "\"a\""; - } - else if (atom->string() == ATOM_LIST_UPPERROMAN) { - out() << "\"I\""; - } - else if (atom->string() == ATOM_LIST_LOWERROMAN) { - out() << "\"i\""; - } - else { // (atom->string() == ATOM_LIST_NUMERIC) - out() << "\"1\""; - } + writer.writeStartElement("ol"); + if (atom->string() == ATOM_LIST_UPPERALPHA) + writer.writeAttribute("type","A"); + else if (atom->string() == ATOM_LIST_LOWERALPHA) + writer.writeAttribute("type","a"); + else if (atom->string() == ATOM_LIST_UPPERROMAN) + writer.writeAttribute("type","I"); + else if (atom->string() == ATOM_LIST_LOWERROMAN) + writer.writeAttribute("type","i"); + else // (atom->string() == ATOM_LIST_NUMERIC) + writer.writeAttribute("type","1"); if (atom->next() != 0 && atom->next()->string().toInt() != 1) - out() << " start=\"" << atom->next()->string() << "\""; - out() << ">\n"; + writer.writeAttribute("start",atom->next()->string()); } break; case Atom::ListItemNumber: + // nothing break; case Atom::ListTagLeft: if (atom->string() == ATOM_LIST_TAG) { - out() << "
      "; + writer.writeStartElement("dt"); } else { // (atom->string() == ATOM_LIST_VALUE) - // ### Trenton - - out() << "
    + writer.writeStartElement("td"); + writer.writeAttribute("outputclass","topAlign"); QString itemValue; if (relative->type() == Node::Enum) { @@ -870,188 +1121,178 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } if (itemValue.isEmpty()) - out() << "?"; - else - out() << "" << protectEnc(itemValue) << ""; - + writer.writeCharacters("?"); + else { + writer.writeStartElement("tt"); + writer.writeCharacters(protectEnc(itemValue)); + writer.writeEndElement(); // + } skipAhead = 1; } break; case Atom::ListTagRight: if (atom->string() == ATOM_LIST_TAG) - out() << "\n"; + writer.writeEndElement(); // break; case Atom::ListItemLeft: if (atom->string() == ATOM_LIST_TAG) { - out() << "
    "; + writer.writeStartElement("dd"); } else if (atom->string() == ATOM_LIST_VALUE) { if (threeColumnEnumValueTable) { - out() << "
    + writer.writeStartElement("td"); + writer.writeAttribute("outputclass","topAlign"); if (matchAhead(atom, Atom::ListItemRight)) - out() << " "; + writer.writeCharacters(" "); } } else { - out() << "
  • "; + writer.writeStartElement("li"); } if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; break; case Atom::ListItemRight: if (atom->string() == ATOM_LIST_TAG) { - out() << "\n"; + writer.writeEndElement(); // } else if (atom->string() == ATOM_LIST_VALUE) { - out() << "
  • \n"; + writer.writeEndElement(); // + writer.writeEndElement(); // } else { - out() << "\n"; + writer.writeEndElement(); // } break; case Atom::ListRight: if (atom->string() == ATOM_LIST_BULLET) { - out() << "\n"; + writer.writeEndElement(); // } else if (atom->string() == ATOM_LIST_TAG) { - out() << "\n"; + writer.writeEndElement(); // } else if (atom->string() == ATOM_LIST_VALUE) { - out() << "
    ConstantValue
    " - << protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(), - relative))) - << ""; + writer.writeStartElement("tr"); + writer.writeStartElement("td"); + writer.writeAttribute("outputclass","topAlign"); + writer.writeStartElement("tt"); + writer.writeCharacters(protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(), + relative)))); + writer.writeEndElement(); // + writer.writeEndElement(); // "; + writer.writeEndElement(); //
    \n"; + writer.writeEndElement(); // } else { - out() << "\n"; + writer.writeEndElement(); // } break; case Atom::Nop: + // nothing break; case Atom::ParaLeft: - out() << "

    "; + writer.writeStartElement("p"); in_para = true; break; case Atom::ParaRight: endLink(); if (in_para) { - out() << "

    \n"; + writer.writeEndElement(); // \n"; break; case Atom::QuotationLeft: - out() << "
    "; + writer.writeStartElement("blockquote"); break; case Atom::QuotationRight: - out() << "
    \n"; + writer.writeEndElement(); // break; case Atom::RawString: - out() << atom->string(); + writer.writeCharacters(atom->string()); break; case Atom::SectionLeft: -#if 0 - { - int nextLevel = atom->string().toInt(); - if (sectionNumber.size() < nextLevel) { - do { - sectionNumber.append("1"); - } while (sectionNumber.size() < nextLevel); - } - else { - while (sectionNumber.size() > nextLevel) { - sectionNumber.removeLast(); - } - sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1); - } - out() << "\n"; - } -#else +#if zzz out() << "\n"; -#endif +#endif break; case Atom::SectionRight: + // nothing break; case Atom::SectionHeadingLeft: - out() << "string().toInt() + hOffset(relative)) + ">"; + writer.writeStartElement("p"); + hx = "h" + QString::number(atom->string().toInt() + hOffset(relative)); + writer.writeAttribute("outputclass",hx); inSectionHeading = true; break; case Atom::SectionHeadingRight: - out() << "string().toInt() + hOffset(relative)) + ">\n"; + writer.writeEndElement(); //

    (see case Atom::SectionHeadingLeft) inSectionHeading = false; break; case Atom::SidebarLeft: + // nothing break; case Atom::SidebarRight: + // nothing break; case Atom::String: if (inLink && !inContents && !inSectionHeading) { generateLink(atom, relative, marker); } else { - out() << protectEnc(atom->string()); + writer.writeCharacters(protectEnc(atom->string())); } break; case Atom::TableLeft: if (in_para) { - out() << "

    \n"; + writer.writeEndElement(); //

    in_para = false; } - if (!atom->string().isEmpty()) { - if (atom->string().contains("%")) - out() << "\n "; // width=\"" << atom->string() << "\">\n "; - else { - out() << "
    \n"; - } - } - else { - out() << "
    \n"; - } + writer.writeStartElement("table"); + writer.writeAttribute("outputclass","generic"); numTableRows = 0; break; case Atom::TableRight: - out() << "
    \n"; + writer.writeEndElement(); // break; case Atom::TableHeaderLeft: - out() << ""; + writer.writeStartElement("thead"); + writer.writeStartElement("tr"); + writer.writeAttribute("outputclass","qt-style topAlign"); inTableHeader = true; break; case Atom::TableHeaderRight: - out() << ""; + writer.writeEndElement(); // if (matchAhead(atom, Atom::TableHeaderLeft)) { skipAhead = 1; - out() << "\n"; + writer.writeStartElement("tr"); + writer.writeAttribute("outputclass","qt-style topAlign"); } - else { - out() << "\n"; + else { + writer.writeEndElement(); // inTableHeader = false; } break; case Atom::TableRowLeft: + writer.writeStartElement("tr"); if (++numTableRows % 2 == 1) - out() << ""; + writer.writeAttribute("outputclass","odd topAlign"); else - out() << ""; + writer.writeAttribute("outputclass","even topAlign"); break; case Atom::TableRowRight: - out() << "\n"; + writer.writeEndElement(); // \n"; break; case Atom::TableItemLeft: { if (inTableHeader) - out() << "string().split(","); if (spans.size() == 2) { +#if zzz + if (spans.at(0) != "1") out() << " colspan=\"" << spans.at(0) << "\""; if (spans.at(1) != "1") out() << " rowspan=\"" << spans.at(1) << "\""; - if (inTableHeader) - out() << ">"; - else - out() << ">

    "; +#endif + if (!inTableHeader) + writer.writeStartElement("p"); } if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; @@ -1059,9 +1300,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::TableItemRight: if (inTableHeader) - out() << ""; - else - out() << "

    "; + writer.writeEndElement(); // + else { + writer.writeEndElement(); //

    + writer.writeEndElement(); // + } if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; break; @@ -1095,14 +1338,20 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } break; case Atom::Target: +#if zzz out() << "string()) << "\">"; +#endif break; case Atom::UnhandledFormat: +#if zzz out() << "<Missing DITAXML>"; +#endif break; case Atom::UnknownCommand: +#if zzz out() << "\\" << protectEnc(atom->string()) << ""; +#endif break; #ifdef QDOC_QML case Atom::QmlText: @@ -1111,7 +1360,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; #endif default: - unknownAtom(atom); + // unknownAtom(atom); + break; } return skipAhead; } @@ -1119,8 +1369,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, /*! Generate a reference page for a C++ class. */ -void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner, - CodeMarker *marker) +void +DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* marker) { QList
    sections; QList
    ::ConstIterator s; @@ -1144,41 +1394,57 @@ void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner, title = rawTitle + " Class Reference"; } - DcfSection classSection; - classSection.title = title; - classSection.ref = linkForNode(inner, 0); - classSection.keywords += qMakePair(inner->name(), classSection.ref); - Text subtitleText; if (rawTitle != fullTitle) subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" << Atom(Atom::LineBreak); -#if 0 - // No longer used because the modeule name is a breadcrumb. - QString fixedModule = inner->moduleName(); - if (fixedModule == "Qt3SupportLight") - fixedModule = "Qt3Support"; - if (!fixedModule.isEmpty()) - subtitleText << "[" << Atom(Atom::AutoLink, fixedModule) << " module]"; - - if (fixedModule.isEmpty()) { - QMultiMap publicGroups = myTree->publicGroups(); - QList groupNames = publicGroups.values(inner->name()); - if (!groupNames.isEmpty()) { - qSort(groupNames.begin(), groupNames.end()); - subtitleText << "["; - for (int j=0; jdoc().isEmpty()) { + writer.writeStartElement("p"); + writer.writeAttribute("outputclass","h2"); + writer.writeCharacters("Detailed Description"); + writer.writeEndElement(); // p + generateBody(inner, marker); + // generateAlsoList(inner, marker); + } + + writer.writeEndElement(); // apiDesc + writer.writeEndElement(); // cxxClassDetail + writer.writeEndElement(); // cxxClass + +#ifdef WRITE_HTML + QString shortVersion; + shortVersion = project + " " + shortVersion + ": "; + shortVersion = myTree->version(); + if (shortVersion.count(QChar('.')) == 2) + shortVersion.truncate(shortVersion.lastIndexOf(QChar('.'))); + if (!shortVersion.isEmpty()) { + if (project == "QSA") + shortVersion = "QSA " + shortVersion + ": "; + else + shortVersion = "Qt " + shortVersion + ": "; } -#endif - generateHeader(title, inner, marker); + out() << " " << shortVersion << protectEnc(title) << "\n"; + +#if 0 + out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version()); + generateBreadCrumbs(title,node,marker); + out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); +#endif + sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); generateTableOfContents(inner,marker,§ions); generateTitle(title, subtitleText, SmallSubTitle, inner, marker); @@ -1203,22 +1469,22 @@ void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner, QString membersLink = generateListOfAllMemberFile(inner, marker); if (!membersLink.isEmpty()) - out() << "
  • " - << "List of all members, including inherited members
  • \n"; + out() << "
  • " + << "List of all members, including inherited members
  • \n"; QString obsoleteLink = generateLowStatusMemberFile(inner, marker, CodeMarker::Obsolete); if (!obsoleteLink.isEmpty()) - out() << "
  • " - << "Obsolete members
  • \n"; + out() << "
  • " + << "Obsolete members
  • \n"; QString compatLink = generateLowStatusMemberFile(inner, marker, CodeMarker::Compat); if (!compatLink.isEmpty()) - out() << "
  • " - << "Qt 3 support members
  • \n"; + out() << "
  • " + << "Qt 3 support members
  • \n"; out() << "
\n"; @@ -1335,8 +1601,6 @@ void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner, names << plainCode(marker->markedUpEnumValue(enumName, enume)); } - foreach (const QString &name, names) - classSection.keywords += qMakePair(name,linkForNode(*m,0)); } ++m; } @@ -1344,28 +1608,7 @@ void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner, out() << "
\n"; // QTBUG-9504 ++s; } - generateFooter(inner); - - if (!membersLink.isEmpty()) { - DcfSection membersSection; - membersSection.title = "List of all members"; - membersSection.ref = membersLink; - appendDcfSubSection(&classSection, membersSection); - } - if (!obsoleteLink.isEmpty()) { - DcfSection obsoleteSection; - obsoleteSection.title = "Obsolete members"; - obsoleteSection.ref = obsoleteLink; - appendDcfSubSection(&classSection, obsoleteSection); - } - if (!compatLink.isEmpty()) { - DcfSection compatSection; - compatSection.title = "Qt 3 support members"; - compatSection.ref = compatLink; - appendDcfSubSection(&classSection, compatSection); - } - - appendDcfSubSection(&dcfClassesRoot, classSection); +#endif } /*! @@ -1374,16 +1617,14 @@ void DitaXmlGenerator::generateClassLikeNode(const InnerNode *inner, */ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) { + return; // zzz + SubTitleSize subTitleSize = LargeSubTitle; - DcfSection fakeSection; - fakeSection.title = fake->fullTitle(); - fakeSection.ref = linkForNode(fake, 0); - QList
sections; QList
::const_iterator s; - QString fullTitle = fake->fullTitle(); QString htmlTitle = fullTitle; + if (fake->subType() == Node::File && !fake->subTitle().isEmpty()) { subTitleSize = SmallSubTitle; htmlTitle += " (" + fake->subTitle() + ")"; @@ -1393,7 +1634,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker htmlTitle = fullTitle; } - generateHeader(htmlTitle, fake, marker); + generateHeader(fake); /* Generate the TOC for the new doc format. @@ -1433,43 +1674,24 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker QString membersLink = generateListOfAllMemberFile(fake, marker); if (!membersLink.isEmpty()) - out() << "
  • " - << "List of all members, including inherited members
  • \n"; + out() << "
  • " + << "List of all members, including inherited members
  • \n"; QString obsoleteLink = generateLowStatusMemberFile(fake, marker, CodeMarker::Obsolete); if (!obsoleteLink.isEmpty()) - out() << "
  • " - << "Obsolete members
  • \n"; + out() << "
  • " + << "Obsolete members
  • \n"; QString compatLink = generateLowStatusMemberFile(fake, marker, CodeMarker::Compat); if (!compatLink.isEmpty()) - out() << "
  • " - << "Qt 3 support members
  • \n"; + out() << "
  • " + << "Qt 3 support members
  • \n"; out() << "\n"; - - if (!membersLink.isEmpty()) { - DcfSection membersSection; - membersSection.title = "List of all members"; - membersSection.ref = membersLink; - appendDcfSubSection(&fakeSection, membersSection); - } - if (!obsoleteLink.isEmpty()) { - DcfSection obsoleteSection; - obsoleteSection.title = "Obsolete members"; - obsoleteSection.ref = obsoleteLink; - appendDcfSubSection(&fakeSection, obsoleteSection); - } - if (!compatLink.isEmpty()) { - DcfSection compatSection; - compatSection.title = "Qt 3 support members"; - compatSection.ref = compatLink; - appendDcfSubSection(&fakeSection, compatSection); - } } #ifdef QDOC_QML else if (fake->subType() == Node::QmlClass) { @@ -1504,13 +1726,10 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker while (m != (*s).members.end()) { generateDetailedQmlMember(*m, fake, marker); out() << "
    \n"; - fakeSection.keywords += qMakePair((*m)->name(), - linkForNode(*m,0)); ++m; } ++s; } - generateFooter(fake); return; } #endif @@ -1546,8 +1765,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker generateAnnotatedList(fake, marker, groupMembersMap); } - fakeSection.keywords += qMakePair(fakeSection.title, fakeSection.ref); - sections = marker->sections(fake, CodeMarker::Detailed, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { @@ -1557,57 +1774,32 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker NodeList::ConstIterator m = (*s).members.begin(); while (m != (*s).members.end()) { generateDetailedMember(*m, fake, marker); - fakeSection.keywords += qMakePair((*m)->name(), linkForNode(*m, 0)); ++m; } ++s; } - generateFooter(fake); - - if (fake->subType() == Node::Example) { - appendDcfSubSection(&dcfExamplesRoot, fakeSection); - } - else if (fake->subType() != Node::File) { - QString contentsPage = fake->links().value(Node::ContentsLink).first; - - if (contentsPage == "Qt Designer Manual") { - appendDcfSubSection(&dcfDesignerRoot, fakeSection); - } - else if (contentsPage == "Qt Linguist Manual") { - appendDcfSubSection(&dcfLinguistRoot, fakeSection); - } - else if (contentsPage == "Qt Assistant Manual") { - appendDcfSubSection(&dcfAssistantRoot, fakeSection); - } - else if (contentsPage == "qmake Manual") { - appendDcfSubSection(&dcfQmakeRoot, fakeSection); - } - else { - appendDcfSubSection(&dcfOverviewsRoot, fakeSection); - } - } } /*! - Returns "html" for this subclass of Generator. + Returns "xml" for this subclass of Generator. */ QString DitaXmlGenerator::fileExtension(const Node * /* node */) const { - return "html"; + return "xml"; } /*! Output breadcrumb list in the html file. */ void DitaXmlGenerator::generateBreadCrumbs(const QString& title, - const Node *node, - CodeMarker *marker) + const Node *node, + CodeMarker *marker) { Text breadcrumb; if (node->type() == Node::Class) { const ClassNode* cn = static_cast(node); QString name = node->moduleName(); - out() << "
  • All Modules
  • "; + out() << "
  • All Modules
  • "; if (!name.isEmpty()) { out() << "
  • "; breadcrumb << Atom(Atom::AutoLink,name); @@ -1625,7 +1817,7 @@ void DitaXmlGenerator::generateBreadCrumbs(const QString& title, else if (node->type() == Node::Fake) { const FakeNode* fn = static_cast(node); if (node->subType() == Node::Module) { - out() << "
  • All Modules
  • "; + out() << "
  • All Modules
  • "; QString name = node->name(); if (!name.isEmpty()) { out() << "
  • "; @@ -1636,125 +1828,111 @@ void DitaXmlGenerator::generateBreadCrumbs(const QString& title, } else if (node->subType() == Node::Group) { if (fn->name() == QString("modules")) - out() << "
  • All Modules
  • "; + out() << "
  • All Modules
  • "; else { - out() << "
  • name() << "\">" << title - << "
  • "; + out() << "
  • name() << "\">" << title + << "
  • "; } } else if (node->subType() == Node::Page) { if (fn->name() == QString("examples.html")) { - out() << "
  • Examples
  • "; + out() << "
  • Examples
  • "; } else if (fn->name().startsWith("examples-")) { - out() << "
  • Examples
  • "; - out() << "
  • name() << "\">" << title - << "
  • "; + out() << "
  • Examples
  • "; + out() << "
  • name() << "\">" << title + << "
  • "; } else if (fn->name() == QString("namespaces.html")) { - out() << "
  • All Namespaces
  • "; + out() << "
  • All Namespaces
  • "; } else { - out() << "
  • name() << "\">" << title - << "
  • "; + out() << "
  • name() << "\">" << title + << "
  • "; } } else if (node->subType() == Node::QmlClass) { - out() << "
  • QML Elements
  • "; - out() << "
  • name() << "\">" << title - << "
  • "; + out() << "
  • QML Elements
  • "; + out() << "
  • name() << "\">" << title + << "
  • "; } else if (node->subType() == Node::Example) { - out() << "
  • Examples
  • "; + out() << "
  • Examples
  • "; QStringList sl = fn->name().split('/'); QString name = "examples-" + sl.at(0) + ".html"; QString t = CodeParser::titleFromName(name); - out() << "
  • " - << t << "
  • "; - out() << "
  • " + << t << "
  • "; + out() << "
  • " - << title << "
  • "; + << title << ""; } } else if (node->type() == Node::Namespace) { const NamespaceNode* nsn = static_cast(node); - out() << "
  • All Namespaces
  • "; - out() << "
  • " << title - << "
  • "; + out() << "
  • All Namespaces
  • "; + out() << "
  • " << title + << "
  • "; } } -void DitaXmlGenerator::generateHeader(const QString& title, - const Node *node, - CodeMarker *marker) +void DitaXmlGenerator::generateHeader(const Node* node) { - out() << QString("\n").arg(outputEncoding); - out() << "\n"; - out() << QString("\n").arg(naturalLanguage); - out() << "\n"; - out() << " \n"; - QString shortVersion; - shortVersion = project + " " + shortVersion + ": "; - if (node && !node->doc().location().isEmpty()) - out() << "\n"; + writer.setDevice(out().device()); + writer.setAutoFormatting(true); + writer.setAutoFormattingIndent(4); + writer.writeStartDocument(); + + if (!node) + return; - shortVersion = myTree->version(); - if (shortVersion.count(QChar('.')) == 2) - shortVersion.truncate(shortVersion.lastIndexOf(QChar('.'))); - if (!shortVersion.isEmpty()) { - if (project == "QSA") - shortVersion = "QSA " + shortVersion + ": "; - else - shortVersion = "Qt " + shortVersion + ": "; + QString docType; + QString dtd; + QString version; + if (node->type() == Node::Class) { + docType = "cxxClass"; + dtd = "dtd/cxxClass.dtd"; + version = "0.6.0"; } - out() << " " << shortVersion << protectEnc(title) << "\n"; - - out() << " "; - out() << ""; - out() << ""; - out() << ""; - - - //out() << " Qt Reference Documentation"; - out() << " \n"; - out() << " \n"; - out() << " \n"; - out() << "\n"; - - if (offlineDocs) - out() << "\n"; - else - out() << "\n"; +#if 0 + writer.writeCharacters("\n\n"); + + if (node && !node->doc().location().isEmpty()) { + writer.writeCharacters("\n"); + } +#endif -#ifdef GENERATE_MAC_REFS - if (mainPage) - generateMacRef(node, marker); -#endif - out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - generateBreadCrumbs(title,node,marker); - out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); + QString doctype = ""; + writer.writeDTD(doctype); + writer.writeComment(node->doc().location().fileName()); + +#if 0 + out() << "\n\n"; -#if 0 // Removed for new docf format. MWS - if (node && !node->links().empty()) - out() << "

    \n" << navigationLinks << "

    \n"; + if (node && !node->doc().location().isEmpty()) + out() << "\n"; + out().flush(); #endif } void DitaXmlGenerator::generateTitle(const QString& title, - const Text &subTitle, - SubTitleSize subTitleSize, - const Node *relative, - CodeMarker *marker) + const Text &subTitle, + SubTitleSize subTitleSize, + const Node *relative, + CodeMarker *marker) { if (!title.isEmpty()) out() << "

    " << protectEnc(title) << "

    \n"; @@ -1769,30 +1947,18 @@ void DitaXmlGenerator::generateTitle(const QString& title, } } -void DitaXmlGenerator::generateFooter(const Node *node) -{ - if (node && !node->links().empty()) - out() << "

    \n" << navigationLinks << "

    \n"; - - out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version()) - << QString(address).replace("\\" + COMMAND_VERSION, myTree->version()); - out() << " \n"; - out() << "\n"; - out() << "\n"; -} - -void DitaXmlGenerator::generateBrief(const Node *node, CodeMarker *marker, - const Node *relative) +/*! + Outputs the brief command as a doc().briefText(); if (!brief.isEmpty()) { - out() << "

    "; + ++noLinks; + writer.writeStartElement(SHORTDESC); generateText(brief, node, marker); - if (!relative || node == relative) - out() << " More...

    \n"; + writer.writeEndElement(); // shortdesc + --noLinks; } } @@ -1870,13 +2036,13 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node, columnSize = 0; } out() << "
  • "; - out() << ""; generateAtomList(headingText.firstAtom(), node, marker, true, numAtoms); - out() << "
  • \n"; + out() << "\n"; ++columnSize; } @@ -1922,22 +2088,22 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node, if (moduleNamespaceMap.contains(node->name())) { out() << "
  • Namespaces
  • \n"; + << "\">Namespaces\n"; } if (moduleClassMap.contains(node->name())) { out() << "
  • Classes
  • \n"; + << "\">Classes\n"; } out() << "
  • Detailed Description
  • \n"; + << "\">Detailed Description\n"; for (int i = 0; i < toc.size(); ++i) { if (toc.at(i)->string().toInt() == 1) { detailsBase = 1; @@ -1951,18 +2117,18 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node, if (!s->members.isEmpty() || !s->reimpMembers.isEmpty()) { out() << "
  • " << (*s).name - << "
  • \n"; + << "\n"; } ++s; } out() << "
  • Detailed Description
  • \n"; + << "\">Detailed Description\n"; for (int i = 0; i < toc.size(); ++i) { if (toc.at(i)->string().toInt() == 1) { detailsBase = 1; @@ -1991,12 +2157,12 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node, out() << "
  • "; - out() << ""; generateAtomList(headingText.firstAtom(), node, marker, true, numAtoms); - out() << "
  • \n"; + out() << "\n"; } while (!sectionNumber.isEmpty()) { sectionNumber.removeLast(); @@ -2017,21 +2183,21 @@ void DitaXmlGenerator::generateNavigationBar(const NavigationBar& bar, out() << "

    "; if (bar.prev.begin() != 0) { #if 0 - out() << "[Prev: "; generateText(section.previousHeading(), node, marker); - out() << "]\n"; + out() << "]\n"; #endif } if (bar.current.begin() != 0) { - out() << "[Home]\n"; + out() << "[Home]\n"; } if (bar.next.begin() != 0) { - out() << "[Next: "; generateText(Text::sectionHeading(bar.next.begin()), node, marker); - out() << "]\n"; + out() << "]\n"; } out() << "

    \n"; } @@ -2053,7 +2219,7 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode *inner, QString fileName = fileBase(inner) + "-members." + fileExtension(inner); beginSubPage(inner->location(), fileName); QString title = "List of All Members for " + inner->name(); - generateHeader(title, inner, marker); + generateHeader(inner); generateTitle(title, Text(), SmallSubTitle, inner, marker); out() << "

    This is the complete list of members for "; generateFullName(inner, 0, marker); @@ -2062,7 +2228,6 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode *inner, Section section = sections.first(); generateSectionList(section, 0, marker, CodeMarker::SeparateList); - generateFooter(); endSubPage(); return fileName; } @@ -2097,12 +2262,12 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode *inner, } beginSubPage(inner->location(), fileName); - generateHeader(title, inner, marker); + generateHeader(inner); generateTitle(title, Text(), SmallSubTitle, inner, marker); if (status == CodeMarker::Compat) { out() << "

    The following class members are part of the " - "Qt 3 support layer. " + "Qt 3 support layer. " "They are provided to help you port old code to Qt 4. We advise against " "using them in new code.

    \n"; } @@ -2112,10 +2277,10 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode *inner, << "We strongly advise against using them in new code.

    \n"; } - out() << "

    \n"; for (i = 0; i < sections.size(); ++i) { out() << "

    " << protectEnc(sections.at(i).name) << "

    \n"; @@ -2135,7 +2300,6 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode *inner, } } - generateFooter(); endSubPage(); return fileName; } @@ -2362,7 +2526,7 @@ void DitaXmlGenerator::generateCompactList(const Node *relative, for (int i = 0; i < 26; i++) { QChar ch('a' + i); if (usedParagraphNames.contains(char('a' + i))) - out() << QString("%2 ").arg(ch).arg(ch.toUpper()); + out() << QString("%2 ").arg(ch).arg(ch.toUpper()); } out() << "

    \n"; } @@ -2415,7 +2579,7 @@ void DitaXmlGenerator::generateCompactList(const Node *relative, Previously, we used generateFullName() for this, but we require some special formatting. */ - out() << ""; + out() << ""; QStringList pieces; if (it.value()->subType() == Node::QmlClass) @@ -2423,7 +2587,7 @@ void DitaXmlGenerator::generateCompactList(const Node *relative, else pieces = fullName(it.value(), relative, marker).split("::"); out() << protectEnc(pieces.last()); - out() << ""; + out() << ""; if (pieces.size() > 1) { out() << " ("; generateFullName(it.value()->parent(), relative, marker); @@ -2443,7 +2607,7 @@ void DitaXmlGenerator::generateFunctionIndex(const Node *relative, out() << "

    "; for (int i = 0; i < 26; i++) { QChar ch('a' + i); - out() << QString("%2 ").arg(ch).arg(ch.toUpper()); + out() << QString("%2 ").arg(ch).arg(ch.toUpper()); } out() << "

    \n"; @@ -2657,7 +2821,7 @@ void DitaXmlGenerator::generateOverviewList(const Node *relative, CodeMarker * / if (!fakeNodeMap.isEmpty()) { foreach (const QString &groupTitle, groupTitlesMap.keys()) { const FakeNode *groupNode = groupTitlesMap[groupTitle]; - out() << QString("

    %2

    \n").arg( + out() << QString("

    %2

    \n").arg( linkForNode(groupNode, relative)).arg( protectEnc(groupNode->fullTitle())); @@ -2670,8 +2834,8 @@ void DitaXmlGenerator::generateOverviewList(const Node *relative, CodeMarker * / QString title = fakeNode->fullTitle(); if (title.startsWith("The ")) title.remove(0, 4); - out() << "
  • " - << protectEnc(title) << "
  • \n"; + out() << "
  • " + << protectEnc(title) << "
  • \n"; } out() << "\n"; } @@ -2684,8 +2848,8 @@ void DitaXmlGenerator::generateOverviewList(const Node *relative, CodeMarker * / QString title = fakeNode->fullTitle(); if (title.startsWith("The ")) title.remove(0, 4); - out() << "
  • " - << protectEnc(title) << "
  • \n"; + out() << "
  • " + << protectEnc(title) << "
  • \n"; } out() << "\n"; } @@ -2838,10 +3002,10 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section, else { out() << section.pluralMember; } - out() << " inherited from " << protectEnc(marker->plainFullName((*p).first, relative)) - << "\n"; + << "\n"; ++p; } } @@ -3126,10 +3290,10 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section, } else { out() << section.pluralMember; } - out() << " inherited from " << protectEnc(marker->plainFullName((*p).first, relative)) - << "\n"; + << "\n"; ++p; } } @@ -3340,29 +3504,32 @@ void DitaXmlGenerator::generateLink(const Atom* atom, if (funcLeftParen.indexIn(atom->string()) != -1 && marker->recognizeLanguage("Cpp")) { // hack for C++: move () outside of link int k = funcLeftParen.pos(1); - out() << protectEnc(atom->string().left(k)); + writer.writeCharacters(protectEnc(atom->string().left(k))); if (link.isEmpty()) { if (showBrokenLinks) - out() << "
    "; - } else { - out() << ""; + writer.writeEndElement(); //
    + } + else { + writer.writeEndElement(); // } inLink = false; - out() << protectEnc(atom->string().mid(k)); + writer.writeCharacters(protectEnc(atom->string().mid(k))); } else if (marker->recognizeLanguage("Java")) { // hack for Java: remove () and use when appropriate bool func = atom->string().endsWith("()"); bool tt = (func || atom->string().contains(camelCase)); if (tt) - out() << ""; + writer.writeStartElement("tt"); if (func) { - out() << protectEnc(atom->string().left(atom->string().length() - 2)); - } else { - out() << protectEnc(atom->string()); + writer.writeCharacters(protectEnc(atom->string().left(atom->string().length() - 2))); } - out() << ""; - } else { - out() << protectEnc(atom->string()); + else { + writer.writeCharacters(protectEnc(atom->string())); + } + writer.writeEndElement(); // + } + else { + writer.writeCharacters(protectEnc(atom->string())); } } @@ -3444,13 +3611,13 @@ QString DitaXmlGenerator::protectEnc(const QString &string) QString DitaXmlGenerator::protect(const QString &string, const QString &outputEncoding) { #define APPEND(x) \ - if (html.isEmpty()) { \ - html = string; \ - html.truncate(i); \ + if (xml.isEmpty()) { \ + xml = string; \ + xml.truncate(i); \ } \ - html += (x); + xml += (x); - QString html; + QString xml; int n = string.length(); for (int i = 0; i < n; ++i) { @@ -3469,16 +3636,16 @@ QString DitaXmlGenerator::protect(const QString &string, const QString &outputEn || (ch == QLatin1Char('.') && i > 2 && string.at(i - 2) == QLatin1Char('.'))) { // we escape '*/' and the last dot in 'e.g.' and 'i.e.' for the Javadoc generator APPEND("&#x"); - html += QString::number(ch.unicode(), 16); - html += QLatin1Char(';'); + xml += QString::number(ch.unicode(), 16); + xml += QLatin1Char(';'); } else { - if (!html.isEmpty()) - html += ch; + if (!xml.isEmpty()) + xml += ch; } } - if (!html.isEmpty()) - return html; + if (!xml.isEmpty()) + return xml; return string; #undef APPEND @@ -3615,12 +3782,6 @@ QString DitaXmlGenerator::linkForNode(const Node *node, const Node *relative) return QString(); fn = fileName(node); -/* if (!node->url().isEmpty()) - return fn;*/ -#if 0 - // ### reintroduce this test, without breaking .dcf files - if (fn != outFileName()) -#endif link += fn; if (!node->isInnerNode() || node->subType() == Node::QmlPropertyGroup) { @@ -3654,7 +3815,7 @@ void DitaXmlGenerator::generateFullName(const Node *apparentNode, { if (actualNode == 0) actualNode = apparentNode; - out() << "status() != actualNode->status()) { switch (actualNode->status()) { case Node::Obsolete: @@ -3669,7 +3830,7 @@ void DitaXmlGenerator::generateFullName(const Node *apparentNode, } out() << "\">"; out() << protectEnc(fullName(apparentNode, relative, marker)); - out() << ""; + out() << ""; } void DitaXmlGenerator::generateDetailedMember(const Node *node, @@ -3735,7 +3896,7 @@ void DitaXmlGenerator::generateDetailedMember(const Node *node, if (enume->flagsType()) { out() << "

    The " << protectEnc(enume->flagsType()->name()) << " type is a typedef for " - << "QFlags<" + << "QFlags<" << protectEnc(enume->name()) << ">. It stores an OR combination of " << protectEnc(enume->name()) @@ -4136,16 +4297,6 @@ QString DitaXmlGenerator::getLink(const Atom *atom, return link; } -void DitaXmlGenerator::generateDcf(const QString &fileBase, - const QString &startPage, - const QString &title, - DcfSection &dcfRoot) -{ - dcfRoot.ref = startPage; - dcfRoot.title = title; - generateDcfSections(dcfRoot, outputDir() + "/" + fileBase + ".dcf", fileBase + "/reference"); -} - void DitaXmlGenerator::generateIndex(const QString &fileBase, const QString &url, const QString &title) @@ -4228,22 +4379,28 @@ void DitaXmlGenerator::beginLink(const QString &link, this->link = link; if (link.isEmpty()) { if (showBrokenLinks) - out() << ""; + writer.writeStartElement("i"); } else if (node == 0 || (relative != 0 && node->status() == relative->status())) { - out() << ""; + writer.writeStartElement("xref"); + writer.writeAttribute("href",link); } else { switch (node->status()) { case Node::Obsolete: - out() << ""; + writer.writeStartElement("xref"); + writer.writeAttribute("href",link); + writer.writeAttribute("outputclass","obsolete"); break; case Node::Compat: - out() << ""; + writer.writeStartElement("xref"); + writer.writeAttribute("href",link); + writer.writeAttribute("outputclass","compat"); break; default: - out() << ""; + writer.writeStartElement("xref"); + writer.writeAttribute("href",link); } } inLink = true; @@ -4254,13 +4411,15 @@ void DitaXmlGenerator::endLink() if (inLink) { if (link.isEmpty()) { if (showBrokenLinks) - out() << ""; + writer.writeEndElement(); // i } else { if (inObsoleteLink) { - out() << "(obsolete)"; + writer.writeStartElement("sup"); + writer.writeCharacters("(obsolete)"); + writer.writeEndElement(); // sup } - out() << ""; + writer.writeEndElement(); // xref } } inLink = false; @@ -4636,138 +4795,4 @@ void DitaXmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* ma #endif -#if 0 // fossil removed for new doc format MWS 19/04/2010 - out() << "\n"; - out() << QString("\n").arg(naturalLanguage); - - QString shortVersion; - if ((project != "Qtopia") && (project != "Qt Extended")) { - shortVersion = project + " " + shortVersion + ": "; - if (node && !node->doc().location().isEmpty()) - out() << "\n"; - - shortVersion = myTree->version(); - if (shortVersion.count(QChar('.')) == 2) - shortVersion.truncate(shortVersion.lastIndexOf(QChar('.'))); - if (!shortVersion.isEmpty()) { - if (project == "QSA") - shortVersion = "QSA " + shortVersion + ": "; - else - shortVersion = "Qt " + shortVersion + ": "; - } - } - - out() << "\n" - " " << shortVersion << protectEnc(title) << "\n"; - out() << QString("").arg(outputEncoding); - - if (!style.isEmpty()) - out() << " \n"; - - const QMap &metaMap = node->doc().metaTagMap(); - if (!metaMap.isEmpty()) { - QMapIterator i(metaMap); - while (i.hasNext()) { - i.next(); - out() << " \n"; - } - } - - navigationLinks.clear(); - - if (node && !node->links().empty()) { - QPair linkPair; - QPair anchorPair; - const Node *linkNode; - - if (node->links().contains(Node::PreviousLink)) { - linkPair = node->links()[Node::PreviousLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " \n"; - - navigationLinks += "[Previous: "; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "]\n"; - } - if (node->links().contains(Node::ContentsLink)) { - linkPair = node->links()[Node::ContentsLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " \n"; - - navigationLinks += "["; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "]\n"; - } - if (node->links().contains(Node::NextLink)) { - linkPair = node->links()[Node::NextLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - out() << " \n"; - - navigationLinks += "[Next: "; - if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty()) - navigationLinks += protectEnc(anchorPair.second); - else - navigationLinks += protectEnc(linkPair.second); - navigationLinks += "]\n"; - } - if (node->links().contains(Node::IndexLink)) { - linkPair = node->links()[Node::IndexLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - out() << " \n"; - } - if (node->links().contains(Node::StartLink)) { - linkPair = node->links()[Node::StartLink]; - linkNode = findNodeForTarget(linkPair.first, node, marker); - if (!linkNode || linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - out() << " \n"; - } - } - - foreach (const QString &stylesheet, stylesheets) { - out() << " \n"; - } - - foreach (const QString &customHeadElement, customHeadElements) { - out() << " " << customHeadElement << "\n"; - } - - out() << "\n" - #endif - - QT_END_NAMESPACE +QT_END_NAMESPACE diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 4de578d..1a5eca0 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -51,10 +51,8 @@ #include #include #include - #include "codemarker.h" #include "config.h" -#include "dcfsection.h" #include "pagegenerator.h" QT_BEGIN_NAMESPACE @@ -134,18 +132,13 @@ class DitaXmlGenerator : public PageGenerator void generateBreadCrumbs(const QString& title, const Node *node, CodeMarker *marker); - void generateHeader(const QString& title, - const Node *node = 0, - CodeMarker *marker = 0); + void generateHeader(const Node* node); void generateTitle(const QString& title, const Text &subTitle, SubTitleSize subTitleSize, const Node *relative, CodeMarker *marker); - void generateFooter(const Node *node = 0); - void generateBrief(const Node *node, - CodeMarker *marker, - const Node *relative = 0); + void generateBrief(const Node* node, CodeMarker* marker); void generateIncludes(const InnerNode *inner, CodeMarker *marker); #if 0 void generateNavigationBar(const NavigationBar& bar, @@ -261,9 +254,6 @@ class DitaXmlGenerator : public PageGenerator const Node *relative, CodeMarker *marker, const Node** node); - virtual void generateDcf(const QString &fileBase, - const QString &startPage, - const QString &title, DcfSection &dcfRoot); virtual void generateIndex(const QString &fileBase, const QString &url, const QString &title); @@ -288,15 +278,8 @@ class DitaXmlGenerator : public PageGenerator NavigationBar currentNavigationBar; #endif QMap refMap; + QMap guidMap; int codeIndent; - DcfSection dcfClassesRoot; - DcfSection dcfOverviewsRoot; - DcfSection dcfExamplesRoot; - DcfSection dcfDesignerRoot; - DcfSection dcfLinguistRoot; - DcfSection dcfAssistantRoot; - DcfSection dcfQmakeRoot; - HelpProjectWriter *helpProjectWriter; bool inLink; bool inObsoleteLink; bool inContents; @@ -323,6 +306,7 @@ class DitaXmlGenerator : public PageGenerator const Tree *myTree; bool slow; bool obsoleteLinks; + int noLinks; QMap moduleClassMap; QMap moduleNamespaceMap; NodeMap nonCompatClasses; @@ -341,6 +325,7 @@ class DitaXmlGenerator : public PageGenerator NewClassMaps newClassMaps; NewClassMaps newQmlClassMaps; static int id; + QXmlStreamWriter writer; }; #define DITAXMLGENERATOR_ADDRESS "address" diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index fe4ad86..616ae2f 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -68,6 +68,7 @@ #include "qscodeparser.h" #include "sgmlgenerator.h" #include "webxmlgenerator.h" +#include "ditaxmlgenerator.h" #include "tokenizer.h" #include "tree.h" #include @@ -427,6 +428,7 @@ int main(int argc, char **argv) ManGenerator manGenerator; SgmlGenerator smglGenerator; WebXMLGenerator webxmlGenerator; + DitaXmlGenerator ditaxmlGenerator; QStringList qdocFiles; QString opt; diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index 13c83a8..cd364ef 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -299,8 +299,8 @@ QTextStream &PageGenerator::out() /*! Recursive writing of html files from the root \a node. */ -void PageGenerator::generateInnerNode(const InnerNode *node, - CodeMarker *marker) +void +PageGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker) { if (!node->url().isNull()) return; diff --git a/tools/qdoc3/test/qt-ditaxml.qdocconf b/tools/qdoc3/test/qt-ditaxml.qdocconf new file mode 100644 index 0000000..66f30e3 --- /dev/null +++ b/tools/qdoc3/test/qt-ditaxml.qdocconf @@ -0,0 +1,11 @@ +include(qt.qdocconf) + +imagedirs = $QTDIR/doc/src/images \ + $QTDIR/examples \ + $QTDIR/doc/src/template/images + +outputdir = $QTDIR/doc/ditaxml +outputformats = DITAXML + +generateindex = true +url = . -- cgit v0.12 From f96d6a5d7d422847d302f4ed1180b66436683191 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 11 Jun 2010 15:21:14 +0300 Subject: Stylus menu for Share (QT app) is different from native S60 apps First part of corrections to make menu items more native like. This fixes: - In Sym^3 "separator items" are drawn automatically between items, using a simple line graphic with theme color and alpha values - highlight for menu item is positioned better - menu items themselves are better positioned - the corners of highlight are now more rounded for Sym^3 devices Task-number: QT-3295 Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 76 +++++++++++++++++++++++++++++++--------- src/gui/styles/qs60style_s60.cpp | 10 ++++-- 2 files changed, 67 insertions(+), 19 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 91d3fa6..9745d9c 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1762,40 +1762,64 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, if (!styleHint(SH_UnderlineShortcut, menuItem, widget)) text_flags |= Qt::TextHideMnemonic; - const bool selected = (option->state & State_Selected) && (option->state & State_Enabled); - if (selected) - QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, option->rect, flags); - QRect iconRect = subElementRect(SE_ItemViewItemDecoration, &optionMenuItem, widget); QRect textRect = subElementRect(SE_ItemViewItemText, &optionMenuItem, widget); //todo: move the vertical spacing stuff into subElementRect const int vSpacing = QS60StylePrivate::pixelMetric(PM_LayoutVerticalSpacing); + QStyleOptionMenuItem optionCheckBox; if (checkable){ const int hSpacing = QS60StylePrivate::pixelMetric(PM_LayoutHorizontalSpacing); - QStyleOptionMenuItem optionCheckBox; optionCheckBox.QStyleOptionMenuItem::operator=(*menuItem); optionCheckBox.rect.setWidth(pixelMetric(PM_IndicatorWidth)); optionCheckBox.rect.setHeight(pixelMetric(PM_IndicatorHeight)); optionCheckBox.rect.moveCenter(QPoint( optionCheckBox.rect.center().x(), menuItem->rect.center().y())); - const int moveByX = optionCheckBox.rect.width() + vSpacing; + const int moveByX = optionCheckBox.rect.width() + vSpacing + + pixelMetric(PM_DefaultFrameWidth) + 1; if (optionMenuItem.direction == Qt::LeftToRight) { - textRect.translate(moveByX, 0); - iconRect.translate(moveByX, 0); - iconRect.setWidth(iconRect.width() + vSpacing); - textRect.setWidth(textRect.width() - moveByX - vSpacing); + if (iconRect.isValid()) { + iconRect.translate(moveByX, 0); + iconRect.setWidth(iconRect.width() + vSpacing); + } + if (textRect.isValid()) { + textRect.translate(moveByX, 0); + textRect.setWidth(textRect.width() - moveByX - vSpacing); + } optionCheckBox.rect.translate(vSpacing >> 1, hSpacing >> 1); } else { - textRect.setWidth(textRect.width() - moveByX); - iconRect.setWidth(iconRect.width() + vSpacing); - iconRect.translate(-optionCheckBox.rect.width() - vSpacing, 0); + if (textRect.isValid()) + textRect.setWidth(textRect.width() - moveByX); + if (iconRect.isValid()) { + iconRect.setWidth(iconRect.width() + vSpacing); + iconRect.translate(-optionCheckBox.rect.width() - vSpacing, 0); + } optionCheckBox.rect.translate(textRect.width() + iconRect.width(), 0); } - if (!ignoreCheckMark) - drawPrimitive(PE_IndicatorMenuCheckMark, &optionCheckBox, painter, widget); } + + const bool selected = (option->state & State_Selected) && (option->state & State_Enabled); + const int spacing = pixelMetric(PM_DefaultFrameWidth) * 2; + if (selected) { + int start; int end; + if (QApplication::layoutDirection() == Qt::LeftToRight) { + start = optionMenuItem.rect.left() + spacing; + end = qMax(textRect.right(), iconRect.right() + spacing); + } else { + start = qMax(spacing, qMin(textRect.left(), iconRect.left() - spacing)); + end = optionMenuItem.rect.right() - spacing; + } + //-1 adjustment to avoid highlight being on top of possible separator item + const QRect highlightRect = QRect( + QPoint(start, option->rect.top()), + QPoint(end, option->rect.bottom() - 1)); + QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_ListHighlight, painter, highlightRect, flags); + } + + if (checkable && !ignoreCheckMark) + drawPrimitive(PE_IndicatorMenuCheckMark, &optionCheckBox, painter, widget); + //draw icon and/or checkState QPixmap pix = menuItem->icon.pixmap(pixelMetric(PM_SmallIconSize), enabled ? QIcon::Normal : QIcon::Disabled); @@ -1806,7 +1830,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, textRect.translate(vSpacing, 0); else textRect.translate(-vSpacing, 0); - textRect.setWidth(textRect.width()-vSpacing); + textRect.setWidth(textRect.width() - vSpacing); } //draw indicators @@ -1844,6 +1868,23 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, QCommonStyle::drawItemText(painter, textRect, text_flags, optionMenuItem.palette, enabled, optionMenuItem.text, QPalette::Text); + + //In Sym^3, native menu items have "lines" between them + if (QS60StylePrivate::isSingleClickUi()) { + const QColor lineColorAlpha = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 15, 0); + //native platform sets each color byte to same value for "line 16" which just defines alpha for + //menuitem lines; lets use first byte "red". + QColor lineColor = optionMenuItem.palette.text().color(); + if (lineColorAlpha.isValid()) + lineColor.setAlpha(lineColorAlpha.red()); + painter->save(); + painter->setPen(lineColor); + + const int lineStartX = optionMenuItem.rect.left() + (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) + spacing; + const int lineEndX = optionMenuItem.rect.right() - (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) - spacing; + painter->drawLine(QPoint(lineStartX, optionMenuItem.rect.bottom()), QPoint(lineEndX, optionMenuItem.rect.bottom())); + painter->restore(); + } if (!enabled) painter->restore(); } @@ -2555,6 +2596,8 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, } } sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget); + //native items have small empty areas at the beginning and end of menu item + sz.setWidth(sz.width() + 2 * pixelMetric(PM_MenuHMargin)); if (QS60StylePrivate::isTouchSupported()) //Make itemview easier to use in touch devices //QCommonStyle does not adjust height with horizontal margin, it only adjusts width @@ -2996,7 +3039,6 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con ret.setWidth(indicatorWidth); } } else { - ret = menuItem->rect; if (!menuItem->icon.isNull()) if (menuItem->direction == Qt::LeftToRight) ret.adjust(indicatorWidth, 0, 0, 0); diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index e5c74ad..4bb2ea8 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -1023,8 +1023,14 @@ TRect QS60StyleModeSpecifics::innerRectFromElement(QS60StylePrivate::SkinFrameEl heightShrink = heightShrink >> 1; break; case QS60StylePrivate::SF_ListHighlight: - widthShrink = widthShrink - 2; - heightShrink = heightShrink - 2; + //In Sym^3 devices highlights are less blocky + if (QSysInfo::s60Version() > QSysInfo::SV_S60_5_0) { + widthShrink += 2; + heightShrink += 2; + } else { + widthShrink -= 2; + heightShrink -= 2; + } break; case QS60StylePrivate::SF_PopupBackground: widthShrink = widthShrink + 5; -- cgit v0.12 From 9a16161889c7f6c15c4d5679148a28fe51f95abb Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 9 Jun 2010 10:04:50 +0200 Subject: QMetaType: do not crash when registering builtin stream operator It is not required to register builtin operator, but old code might do so if a type was not builtin before. This is the case of QVariant which became builtin only in Qt 4.7 Task-number: QTBUG-11316 Reviewed-by: Gabriel --- src/corelib/kernel/qmetatype.cpp | 2 ++ tests/auto/qmetatype/tst_qmetatype.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index ce9ed58..6ebaaa3 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -378,6 +378,8 @@ void QMetaType::registerStreamOperators(const char *typeName, SaveOperator saveO void QMetaType::registerStreamOperators(int idx, SaveOperator saveOp, LoadOperator loadOp) { + if (idx < User) + return; //builtin types should not be registered; QVector *ct = customTypes(); if (!ct) return; diff --git a/tests/auto/qmetatype/tst_qmetatype.cpp b/tests/auto/qmetatype/tst_qmetatype.cpp index f4e122f..8558e06 100644 --- a/tests/auto/qmetatype/tst_qmetatype.cpp +++ b/tests/auto/qmetatype/tst_qmetatype.cpp @@ -77,6 +77,7 @@ private slots: void isRegistered_data(); void isRegistered(); void unregisterType(); + void QTBUG11316_registerStreamBuiltin(); }; @@ -318,5 +319,12 @@ void tst_QMetaType::unregisterType() QCOMPARE(QMetaType::isRegistered(typeId), false); } +void tst_QMetaType::QTBUG11316_registerStreamBuiltin() +{ + //should not crash; + qRegisterMetaTypeStreamOperators("QString"); + qRegisterMetaTypeStreamOperators("QVariant"); +} + QTEST_MAIN(tst_QMetaType) #include "tst_qmetatype.moc" -- cgit v0.12 From 4d5525d0209ba6d0ed0db734fedc1ce67ee14a62 Mon Sep 17 00:00:00 2001 From: miniak Date: Fri, 11 Jun 2010 14:54:16 +0200 Subject: Cleanup obsolete stuff Merge-request: 2355 Reviewed-by: Denis Dzyubenko --- src/gui/util/qsystemtrayicon_win.cpp | 52 ++-------------------------------- src/gui/util/qsystemtrayicon_wince.cpp | 10 +------ 2 files changed, 4 insertions(+), 58 deletions(-) diff --git a/src/gui/util/qsystemtrayicon_win.cpp b/src/gui/util/qsystemtrayicon_win.cpp index c89fbae..370a0ff 100644 --- a/src/gui/util/qsystemtrayicon_win.cpp +++ b/src/gui/util/qsystemtrayicon_win.cpp @@ -53,11 +53,8 @@ #include #include -#include #include #include -#include -#include #include QT_BEGIN_NAMESPACE @@ -87,7 +84,6 @@ public: ~QSystemTrayIconSys(); bool winEvent( MSG *m, long *result ); bool trayMessage(DWORD msg); - bool iconDrawItem(LPDRAWITEMSTRUCT lpdi); void setIconContents(NOTIFYICONDATA &data); bool showMessage(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, uint uSecs); bool allowsMessages(); @@ -170,7 +166,6 @@ void QSystemTrayIconSys::setIconContents(NOTIFYICONDATA &tnd) static int iconFlag( QSystemTrayIcon::MessageIcon icon ) { -#if NOTIFYICON_VERSION >= 3 switch (icon) { case QSystemTrayIcon::Information: return NIIF_INFO; @@ -184,15 +179,10 @@ static int iconFlag( QSystemTrayIcon::MessageIcon icon ) Q_ASSERT_X(false, "QSystemTrayIconSys::showMessage", "Invalid QSystemTrayIcon::MessageIcon value"); return NIIF_NONE; } -#else - Q_UNUSED(icon); - return 0; -#endif } bool QSystemTrayIconSys::showMessage(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, uint uSecs) { -#if NOTIFYICON_VERSION >= 3 NOTIFYICONDATA tnd; memset(&tnd, 0, notifyIconSize); Q_ASSERT(testAttribute(Qt::WA_WState_Created)); @@ -209,13 +199,6 @@ bool QSystemTrayIconSys::showMessage(const QString &title, const QString &messag tnd.uFlags = NIF_INFO; return Shell_NotifyIcon(NIM_MODIFY, &tnd); -#else - Q_UNUSED(title); - Q_UNUSED(message); - Q_UNUSED(type); - Q_UNUSED(uSecs); - return false; -#endif } bool QSystemTrayIconSys::trayMessage(DWORD msg) @@ -235,15 +218,6 @@ bool QSystemTrayIconSys::trayMessage(DWORD msg) return Shell_NotifyIcon(msg, &tnd); } -bool QSystemTrayIconSys::iconDrawItem(LPDRAWITEMSTRUCT lpdi) -{ - if (!hIcon) - return false; - - DrawIconEx(lpdi->hDC, lpdi->rcItem.left, lpdi->rcItem.top, hIcon, 0, 0, 0, 0, DI_NORMAL); - return true; -} - void QSystemTrayIconSys::createIcon() { hIcon = 0; @@ -264,25 +238,8 @@ void QSystemTrayIconSys::createIcon() bool QSystemTrayIconSys::winEvent( MSG *m, long *result ) { switch(m->message) { - case WM_CREATE: -#ifdef GWLP_USERDATA - SetWindowLongPtr(winId(), GWLP_USERDATA, (LONG_PTR)((CREATESTRUCTW*)m->lParam)->lpCreateParams); -#else - SetWindowLong(winId(), GWL_USERDATA, (LONG)((CREATESTRUCTW*)m->lParam)->lpCreateParams); -#endif - break; - - case WM_DRAWITEM: - return iconDrawItem((LPDRAWITEMSTRUCT)m->lParam); - case MYWM_NOTIFYICON: { - RECT r; - GetWindowRect(winId(), &r); - QEvent *e = 0; - Qt::KeyboardModifiers keys = QApplication::keyboardModifiers(); - QPoint gpos = QCursor::pos(); - switch (m->lParam) { case WM_LBUTTONUP: if (ignoreNextMouseRelease) @@ -311,13 +268,9 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result ) case WM_MBUTTONUP: emit q->activated(QSystemTrayIcon::MiddleClick); break; + default: - break; - } - if (e) { - bool res = QApplication::sendEvent(q, e); - delete e; - return res; + break; } break; } @@ -474,6 +427,7 @@ QRect QSystemTrayIconPrivate::geometry_sys() const { if (!sys) return QRect(); + return sys->findIconGeometry(q_uNOTIFYICONID); } diff --git a/src/gui/util/qsystemtrayicon_wince.cpp b/src/gui/util/qsystemtrayicon_wince.cpp index 0a0d340..6ff5c58 100644 --- a/src/gui/util/qsystemtrayicon_wince.cpp +++ b/src/gui/util/qsystemtrayicon_wince.cpp @@ -155,10 +155,6 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result ) case MYWM_NOTIFYICON: { - RECT r; - GetWindowRect(winId(), &r); - QEvent *e = 0; - Qt::KeyboardModifiers keys = QApplication::keyboardModifiers(); QPoint gpos = QCursor::pos(); switch (m->lParam) { @@ -193,14 +189,10 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result ) case WM_MBUTTONUP: emit q->activated(QSystemTrayIcon::MiddleClick); break; + default: break; } - if (e) { - bool res = QApplication::sendEvent(q, e); - delete e; - return res; - } break; } default: -- cgit v0.12 From d36e728d35f9b83710b4d88c719fbe64bbe58c1b Mon Sep 17 00:00:00 2001 From: miniak Date: Fri, 11 Jun 2010 14:54:17 +0200 Subject: Use NIM_SETVERSION to get the latest behavior Merge-request: 2355 Reviewed-by: Denis Dzyubenko --- src/gui/util/qsystemtrayicon_win.cpp | 87 +++++++++++++++++++++++++++++------- 1 file changed, 71 insertions(+), 16 deletions(-) diff --git a/src/gui/util/qsystemtrayicon_win.cpp b/src/gui/util/qsystemtrayicon_win.cpp index 370a0ff..aee2027 100644 --- a/src/gui/util/qsystemtrayicon_win.cpp +++ b/src/gui/util/qsystemtrayicon_win.cpp @@ -41,18 +41,19 @@ #include "qsystemtrayicon_p.h" #ifndef QT_NO_SYSTEMTRAYICON -#define _WIN32_IE 0x0600 //required for NOTIFYICONDATA_V2_SIZE -//missing defines for MINGW : -#ifndef NIN_BALLOONTIMEOUT -#define NIN_BALLOONTIMEOUT (WM_USER + 4) +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0600 #endif -#ifndef NIN_BALLOONUSERCLICK -#define NIN_BALLOONUSERCLICK (WM_USER + 5) + +#ifndef _WIN32_IE +#define _WIN32_IE 0x600 #endif #include +#include #include + #include #include #include @@ -71,6 +72,30 @@ struct Q_NOTIFYICONIDENTIFIER { GUID guidItem; }; +#ifndef NOTIFYICON_VERSION_4 +#define NOTIFYICON_VERSION_4 4 +#endif + +#ifndef NIN_SELECT +#define NIN_SELECT (WM_USER + 0) +#endif + +#ifndef NIN_KEYSELECT +#define NIN_KEYSELECT (WM_USER + 1) +#endif + +#ifndef NIN_BALLOONTIMEOUT +#define NIN_BALLOONTIMEOUT (WM_USER + 4) +#endif + +#ifndef NIN_BALLOONUSERCLICK +#define NIN_BALLOONUSERCLICK (WM_USER + 5) +#endif + +#ifndef NIF_SHOWTIP +#define NIF_SHOWTIP 0x00000080 +#endif + #define Q_MSGFLT_ALLOW 1 typedef HRESULT (WINAPI *PtrShell_NotifyIconGetRect)(const Q_NOTIFYICONIDENTIFIER* identifier, RECT* iconLocation); @@ -96,6 +121,7 @@ public: private: uint notifyIconSize; int maxTipLength; + int version; bool ignoreNextMouseRelease; }; @@ -119,7 +145,14 @@ QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *object) : hIcon(0), q(object), ignoreNextMouseRelease(false) { - notifyIconSize = FIELD_OFFSET(NOTIFYICONDATA, guidItem); // NOTIFYICONDATAW_V2_SIZE; + if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA) { + notifyIconSize = sizeof(NOTIFYICONDATA); + version = NOTIFYICON_VERSION_4; + } else { + notifyIconSize = NOTIFYICONDATA_V2_SIZE; + version = NOTIFYICON_VERSION; + } + maxTipLength = 128; // For restoring the tray icon after explorer crashes @@ -153,7 +186,7 @@ QSystemTrayIconSys::~QSystemTrayIconSys() void QSystemTrayIconSys::setIconContents(NOTIFYICONDATA &tnd) { - tnd.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP; + tnd.uFlags |= NIF_MESSAGE | NIF_ICON | NIF_TIP; tnd.uCallbackMessage = MYWM_NOTIFYICON; tnd.hIcon = hIcon; QString tip = q->toolTip(); @@ -185,9 +218,7 @@ bool QSystemTrayIconSys::showMessage(const QString &title, const QString &messag { NOTIFYICONDATA tnd; memset(&tnd, 0, notifyIconSize); - Q_ASSERT(testAttribute(Qt::WA_WState_Created)); - setIconContents(tnd); memcpy(tnd.szInfo, message.utf16(), qMin(message.length() + 1, 256) * sizeof(wchar_t)); memcpy(tnd.szInfoTitle, title.utf16(), qMin(title.length() + 1, 64) * sizeof(wchar_t)); @@ -196,7 +227,9 @@ bool QSystemTrayIconSys::showMessage(const QString &title, const QString &messag tnd.cbSize = notifyIconSize; tnd.hWnd = winId(); tnd.uTimeout = uSecs; - tnd.uFlags = NIF_INFO; + tnd.uFlags = NIF_INFO | NIF_SHOWTIP; + + Q_ASSERT(testAttribute(Qt::WA_WState_Created)); return Shell_NotifyIcon(NIM_MODIFY, &tnd); } @@ -205,17 +238,25 @@ bool QSystemTrayIconSys::trayMessage(DWORD msg) { NOTIFYICONDATA tnd; memset(&tnd, 0, notifyIconSize); + tnd.uID = q_uNOTIFYICONID; tnd.cbSize = notifyIconSize; tnd.hWnd = winId(); + tnd.uFlags = NIF_SHOWTIP; + tnd.uVersion = version; Q_ASSERT(testAttribute(Qt::WA_WState_Created)); - if (msg != NIM_DELETE) { + if (msg == NIM_ADD || msg == NIM_MODIFY) { setIconContents(tnd); } - return Shell_NotifyIcon(msg, &tnd); + bool success = Shell_NotifyIcon(msg, &tnd); + + if (msg == NIM_ADD) + return success && Shell_NotifyIcon(NIM_SETVERSION, &tnd); + else + return success; } void QSystemTrayIconSys::createIcon() @@ -240,8 +281,22 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result ) switch(m->message) { case MYWM_NOTIFYICON: { - switch (m->lParam) { - case WM_LBUTTONUP: + int message = 0; + QPoint gpos; + + if (version == NOTIFYICON_VERSION_4) { + Q_ASSERT(q_uNOTIFYICONID == HIWORD(m->lParam)); + message = LOWORD(m->lParam); + gpos = QPoint(GET_X_LPARAM(m->wParam), GET_Y_LPARAM(m->wParam)); + } else { + Q_ASSERT(q_uNOTIFYICONID == m->wParam); + message = m->lParam; + gpos = QCursor::pos(); + } + + switch (message) { + case NIN_SELECT: + case NIN_KEYSELECT: if (ignoreNextMouseRelease) ignoreNextMouseRelease = false; else @@ -254,7 +309,7 @@ bool QSystemTrayIconSys::winEvent( MSG *m, long *result ) emit q->activated(QSystemTrayIcon::DoubleClick); break; - case WM_RBUTTONUP: + case WM_CONTEXTMENU: if (q->contextMenu()) { q->contextMenu()->popup(gpos); } -- cgit v0.12 From 936fc54e313cfe8923ba94738e52a92adcf6ccf0 Mon Sep 17 00:00:00 2001 From: miniak Date: Fri, 11 Jun 2010 14:54:19 +0200 Subject: Fix QSystemTrayIcon::supportsMessages() on Windows Add QSystemTrayIconPrivate::supportsMessages_sys() method Report support for balloon messages only when they are actually allowed ("EnableBalloonTips" registry value) Merge-request: 2355 Reviewed-by: Denis Dzyubenko --- src/gui/util/qsystemtrayicon.cpp | 5 +---- src/gui/util/qsystemtrayicon_mac.mm | 5 +++++ src/gui/util/qsystemtrayicon_p.h | 2 ++ src/gui/util/qsystemtrayicon_qws.cpp | 5 +++++ src/gui/util/qsystemtrayicon_win.cpp | 26 ++++++++------------------ src/gui/util/qsystemtrayicon_wince.cpp | 5 +++++ src/gui/util/qsystemtrayicon_x11.cpp | 5 +++++ 7 files changed, 31 insertions(+), 22 deletions(-) diff --git a/src/gui/util/qsystemtrayicon.cpp b/src/gui/util/qsystemtrayicon.cpp index d7dde87..941961b 100644 --- a/src/gui/util/qsystemtrayicon.cpp +++ b/src/gui/util/qsystemtrayicon.cpp @@ -356,10 +356,7 @@ bool QSystemTrayIcon::isSystemTrayAvailable() */ bool QSystemTrayIcon::supportsMessages() { -#if defined(Q_WS_QWS) - return false; -#endif - return true; + return QSystemTrayIconPrivate::supportsMessages_sys(); } /*! diff --git a/src/gui/util/qsystemtrayicon_mac.mm b/src/gui/util/qsystemtrayicon_mac.mm index 8aaaa0f..22134cb 100644 --- a/src/gui/util/qsystemtrayicon_mac.mm +++ b/src/gui/util/qsystemtrayicon_mac.mm @@ -226,6 +226,11 @@ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys() return true; } +bool QSystemTrayIconPrivate::supportsMessages_sys() +{ + return true; +} + void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon icon, int) { diff --git a/src/gui/util/qsystemtrayicon_p.h b/src/gui/util/qsystemtrayicon_p.h index e8bf197..4592e43 100644 --- a/src/gui/util/qsystemtrayicon_p.h +++ b/src/gui/util/qsystemtrayicon_p.h @@ -83,7 +83,9 @@ public: void updateMenu_sys(); QRect geometry_sys() const; void showMessage_sys(const QString &msg, const QString &title, QSystemTrayIcon::MessageIcon icon, int secs); + static bool isSystemTrayAvailable_sys(); + static bool supportsMessages_sys(); QPointer menu; QIcon icon; diff --git a/src/gui/util/qsystemtrayicon_qws.cpp b/src/gui/util/qsystemtrayicon_qws.cpp index b1b895b..cda47aa 100644 --- a/src/gui/util/qsystemtrayicon_qws.cpp +++ b/src/gui/util/qsystemtrayicon_qws.cpp @@ -75,6 +75,11 @@ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys() return false; } +bool QSystemTrayIconPrivate::supportsMessages_sys() +{ + return false; +} + void QSystemTrayIconPrivate::showMessage_sys(const QString &message, const QString &title, QSystemTrayIcon::MessageIcon icon, diff --git a/src/gui/util/qsystemtrayicon_win.cpp b/src/gui/util/qsystemtrayicon_win.cpp index aee2027..a9585b9 100644 --- a/src/gui/util/qsystemtrayicon_win.cpp +++ b/src/gui/util/qsystemtrayicon_win.cpp @@ -111,8 +111,6 @@ public: bool trayMessage(DWORD msg); void setIconContents(NOTIFYICONDATA &data); bool showMessage(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, uint uSecs); - bool allowsMessages(); - bool supportsMessages(); QRect findIconGeometry(const int a_iButtonID); void createIcon(); HICON hIcon; @@ -125,7 +123,7 @@ private: bool ignoreNextMouseRelease; }; -bool QSystemTrayIconSys::allowsMessages() +static bool allowsMessages() { #ifndef QT_NO_SETTINGS QSettings settings(QLatin1String("HKEY_CURRENT_USER\\Software\\Microsoft" @@ -136,11 +134,6 @@ bool QSystemTrayIconSys::allowsMessages() #endif } -bool QSystemTrayIconSys::supportsMessages() -{ - return allowsMessages(); -} - QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *object) : hIcon(0), q(object), ignoreNextMouseRelease(false) @@ -449,7 +442,7 @@ QRect QSystemTrayIconSys::findIconGeometry(const int iconId) void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString &message, QSystemTrayIcon::MessageIcon type, int timeOut) { - if (!sys || !sys->allowsMessages()) + if (!sys || !allowsMessages()) return; uint uSecs = 0; @@ -467,15 +460,7 @@ void QSystemTrayIconPrivate::showMessage_sys(const QString &title, const QString //title is limited to 63 chars + NULL QString titleString = title.left(63) + QChar(); - if (sys->supportsMessages()) { - sys->showMessage(titleString, messageString, type, (unsigned int)uSecs); - } else { - //use fallback - QRect iconPos = sys->findIconGeometry(q_uNOTIFYICONID); - if (iconPos.isValid()) { - QBalloonTip::showBalloon(type, title, message, sys->q, iconPos.center(), uSecs, true); - } - } + sys->showMessage(titleString, messageString, type, uSecs); } QRect QSystemTrayIconPrivate::geometry_sys() const @@ -528,6 +513,11 @@ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys() return true; } +bool QSystemTrayIconPrivate::supportsMessages_sys() +{ + return allowsMessages(); +} + QT_END_NAMESPACE #endif diff --git a/src/gui/util/qsystemtrayicon_wince.cpp b/src/gui/util/qsystemtrayicon_wince.cpp index 6ff5c58..e5cf0fd 100644 --- a/src/gui/util/qsystemtrayicon_wince.cpp +++ b/src/gui/util/qsystemtrayicon_wince.cpp @@ -283,6 +283,11 @@ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys() return true; } +bool QSystemTrayIconPrivate::supportsMessages_sys() +{ + return true; +} + QT_END_NAMESPACE #endif diff --git a/src/gui/util/qsystemtrayicon_x11.cpp b/src/gui/util/qsystemtrayicon_x11.cpp index 82b4325..59fdc07 100644 --- a/src/gui/util/qsystemtrayicon_x11.cpp +++ b/src/gui/util/qsystemtrayicon_x11.cpp @@ -381,6 +381,11 @@ bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys() return QSystemTrayIconSys::locateSystemTray() != XNone; } +bool QSystemTrayIconPrivate::supportsMessages_sys() +{ + return true; +} + void QSystemTrayIconPrivate::showMessage_sys(const QString &message, const QString &title, QSystemTrayIcon::MessageIcon icon, int msecs) { -- cgit v0.12 From cde3f39cb75ba69185cca8176ea7126f8441f042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Fri, 11 Jun 2010 14:47:21 +0200 Subject: Fixed an on-exit crash for apps using GL. If a QGLWidget is left on the heap when the QApplication destructor is called, it will leave the QGLWidget in a broken state. The widget itself is released and set to a non-created state, which the associated QGLContext doesn't get notified about. With this patch the QGLWidget knows when QWidget::destroy() is called and can act acordingly. Task-number: QT-3498, QTBUG-10995 Reviewed-by: Paul --- src/gui/kernel/qwidget_mac.mm | 9 +++++---- src/gui/kernel/qwidget_p.h | 5 +++++ src/gui/kernel/qwidget_qws.cpp | 2 +- src/gui/kernel/qwidget_s60.cpp | 1 + src/gui/kernel/qwidget_win.cpp | 1 + src/gui/kernel/qwidget_x11.cpp | 1 + src/opengl/qgl.cpp | 2 ++ src/opengl/qgl_p.h | 4 ++++ src/opengl/qgl_x11.cpp | 2 +- 9 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 1928599..280712a 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -2688,6 +2688,7 @@ QWidget::macCGHandle() const void QWidget::destroy(bool destroyWindow, bool destroySubWindows) { Q_D(QWidget); + d->aboutToDestroy(); if (!isWindow() && parentWidget()) parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); d->deactivateWidgetCleanup(); @@ -3994,10 +3995,10 @@ static void qt_mac_update_widget_position(QWidget *q, QRect oldRect, QRect newRe (oldRect.isValid() == false || newRect.isValid() == false) || // the position update is a part of a drag-and-drop operation - QDragManager::self()->object || - - // we are on Panther (no HIViewSetNeedsDisplayInRect) - QSysInfo::MacintoshVersion < QSysInfo::MV_10_4 + QDragManager::self()->object || + + // we are on Panther (no HIViewSetNeedsDisplayInRect) + QSysInfo::MacintoshVersion < QSysInfo::MV_10_4 ){ HIViewSetFrame(view, &bounds); return; diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index 4247c3a..587d7fb 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -551,6 +551,11 @@ public: void setLayoutItemMargins(int left, int top, int right, int bottom); void setLayoutItemMargins(QStyle::SubElement element, const QStyleOption *opt = 0); + // aboutToDestroy() is called just before the contents of + // QWidget::destroy() is executed. It's used to signal QWidget + // sub-classes that their internals are about to be released. + virtual void aboutToDestroy() {} + QInputContext *inputContext() const; inline QWidget *effectiveFocusWidget() { QWidget *w = q_func(); diff --git a/src/gui/kernel/qwidget_qws.cpp b/src/gui/kernel/qwidget_qws.cpp index b827e8b..3145136 100644 --- a/src/gui/kernel/qwidget_qws.cpp +++ b/src/gui/kernel/qwidget_qws.cpp @@ -256,7 +256,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool /*destro void QWidget::destroy(bool destroyWindow, bool destroySubWindows) { Q_D(QWidget); - + d->aboutToDestroy(); if (!isWindow() && parentWidget()) parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 86b858d..68f9470 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -1177,6 +1177,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate) void QWidget::destroy(bool destroyWindow, bool destroySubWindows) { Q_D(QWidget); + d->aboutToDestroy(); if (!isWindow() && parentWidget()) parentWidget()->d_func()->invalidateBuffer(geometry()); d->deactivateWidgetCleanup(); diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp index a7e66bf..9c65aa0 100644 --- a/src/gui/kernel/qwidget_win.cpp +++ b/src/gui/kernel/qwidget_win.cpp @@ -544,6 +544,7 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO void QWidget::destroy(bool destroyWindow, bool destroySubWindows) { Q_D(QWidget); + d->aboutToDestroy(); if (!isWindow() && parentWidget()) parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); d->deactivateWidgetCleanup(); diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 43f510c..e01489f 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -1023,6 +1023,7 @@ bool QWidgetPrivate::isBackgroundInherited() const void QWidget::destroy(bool destroyWindow, bool destroySubWindows) { Q_D(QWidget); + d->aboutToDestroy(); if (!isWindow() && parentWidget()) parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); d->deactivateWidgetCleanup(); diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 5c5d3d1..b4c85ac 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -3674,8 +3674,10 @@ QGLWidget::~QGLWidget() bool doRelease = (glcx && glcx->windowCreated()); #endif delete d->glcx; + d->glcx = 0; #if defined(Q_WGL) delete d->olcx; + d->olcx = 0; #endif #if defined(GLX_MESA_release_buffers) && defined(QGL_USE_MESA_EXT) if (doRelease) diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 16c225f..1727a41 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -177,6 +177,10 @@ public: void initContext(QGLContext *context, const QGLWidget* shareWidget); bool renderCxPm(QPixmap *pixmap); void cleanupColormaps(); + void aboutToDestroy() { + if (glcx) + glcx->reset(); + } QGLContext *glcx; QGLWidgetGLPaintDevice glDevice; diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index da072c7..bfb232d 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -928,7 +928,7 @@ void QGLContext::makeCurrent() } else if (d->paintDevice->devType() == QInternal::Pbuffer) { ok = glXMakeCurrent(xinfo->display(), (GLXPbuffer)d->pbuf, (GLXContext)d->cx); } else if (d->paintDevice->devType() == QInternal::Widget) { - ok = glXMakeCurrent(xinfo->display(), ((QWidget *)d->paintDevice)->winId(), (GLXContext)d->cx); + ok = glXMakeCurrent(xinfo->display(), ((QWidget *)d->paintDevice)->internalWinId(), (GLXContext)d->cx); } if (!ok) qWarning("QGLContext::makeCurrent(): Failed."); -- cgit v0.12 From 164f347aba7287407615223dc2219a016ebc8248 Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Wed, 26 May 2010 09:55:07 +0200 Subject: Adjusted RegExp in QSslCertificate::fromPath() Reviewed-by: Thiago Task-number: QTBUG-2706 --- src/network/ssl/qsslcertificate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 31c5ed1..ed12e00 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -537,7 +537,7 @@ QList QSslCertificate::fromPath(const QString &path, // $, (,), *, +, ., ?, [, ,], ^, {, | and }. int pos = -1; if (syntax == QRegExp::Wildcard) - pos = path.indexOf(QRegExp(QLatin1String("[^\\][\\*\\?\\[\\]]"))); + pos = path.indexOf(QRegExp(QLatin1String("[\\*\\?\\[]"))); else if (syntax != QRegExp::FixedString) pos = path.indexOf(QRegExp(QLatin1String("[^\\][\\$\\(\\)\\*\\+\\.\\?\\[\\]\\^\\{\\}\\|]"))); QString pathPrefix = path.left(pos); // == path if pos < 0 -- cgit v0.12 From 9a982779eabc4fafafe18dc9ad1b44fb2425563c Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Wed, 19 May 2010 18:47:42 +0200 Subject: make QSslSocket::systemCaCertificates() use system certs before, we were shipping our own bundle of CA certificates. Now we read the certificates from the system CA store. Patch-by: Zeno Albisser and Peter Hartmann Reviewed-by: Thiago Task-number: QTBUG-8833 Task-number: QT-3361 --- src/network/ssl/qsslsocket.cpp | 8 +-- src/network/ssl/qsslsocket_openssl.cpp | 126 ++++++++++++++++++++++++++++----- src/network/ssl/qsslsocket_p.h | 24 +++++++ 3 files changed, 138 insertions(+), 20 deletions(-) diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index 0918539..a8c602a 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -1329,8 +1329,8 @@ void QSslSocket::setDefaultCaCertificates(const QList &certific /*! Returns the current default CA certificate database. This database is originally set to your system's default CA certificate database. - If no system default database is found, Qt will provide its own - default database. You can override the default CA certificate database + If no system default database is found, an empty database will be + returned. You can override the default CA certificate database with your own CA certificate database using setDefaultCaCertificates(). Each SSL socket's CA certificate database is initialized to the @@ -1344,8 +1344,8 @@ QList QSslSocket::defaultCaCertificates() } /*! - This function provides a default CA certificate database - shipped together with Qt. The CA certificate database + This function provides the CA certificate database + provided by the operating system. The CA certificate database returned by this function is used to initialize the database returned by defaultCaCertificates(). You can replace that database with your own with setDefaultCaCertificates(). diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 050fb1b..36a0cc7 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -57,12 +57,18 @@ #include #include #include - -static void initNetworkResources() -{ - // Initialize resources - Q_INIT_RESOURCE(network); -} +#include // for loading the security lib for the CA store + +#if defined(Q_OS_MAC) +#define kSecTrustSettingsDomainSystem 2 // so we do not need to include the header file + PtrSecCertificateGetData QSslSocketPrivate::ptrSecCertificateGetData = 0; + PtrSecTrustSettingsCopyCertificates QSslSocketPrivate::ptrSecTrustSettingsCopyCertificates = 0; + PtrSecTrustCopyAnchorCertificates QSslSocketPrivate::ptrSecTrustCopyAnchorCertificates = 0; +#elif defined(Q_OS_WIN) + PtrCertOpenSystemStoreW QSslSocketPrivate::ptrCertOpenSystemStoreW = 0; + PtrCertFindCertificateInStore QSslSocketPrivate::ptrCertFindCertificateInStore = 0; + PtrCertCloseStore QSslSocketPrivate::ptrCertCloseStore = 0; +#endif QT_BEGIN_NAMESPACE @@ -406,9 +412,6 @@ bool QSslSocketPrivate::ensureInitialized() if (!q_initialized) { q_initialized = true; - // Initialize resources - initNetworkResources(); - // Initialize OpenSSL. q_CRYPTO_set_id_callback(id_function); q_CRYPTO_set_locking_callback(locking_function); @@ -448,6 +451,36 @@ bool QSslSocketPrivate::ensureInitialized() resetDefaultCiphers(); setDefaultCaCertificates(systemCaCertificates()); } + + //load symbols needed to receive certificates from system store +#if defined(Q_OS_MAC) + QLibrary securityLib("/System/Library/Frameworks/Security.framework/Versions/Current/Security"); + if (securityLib.load()) { + ptrSecCertificateGetData = (PtrSecCertificateGetData) securityLib.resolve("SecCertificateGetData"); + if (!ptrSecCertificateGetData) + qWarning("could not resolve symbols in security library"); // should never happen + + ptrSecTrustSettingsCopyCertificates = (PtrSecTrustSettingsCopyCertificates) securityLib.resolve("SecTrustSettingsCopyCertificates"); + if (!ptrSecTrustSettingsCopyCertificates) { // method was introduced in Leopard, use legacy method if it's not there + ptrSecTrustCopyAnchorCertificates = (PtrSecTrustCopyAnchorCertificates) securityLib.resolve("SecTrustCopyAnchorCertificates"); + if (!ptrSecTrustCopyAnchorCertificates) + qWarning("could not resolve symbols in security library"); // should never happen + } + } else { + qWarning("could not load security library"); + } +#elif defined(Q_OS_WIN) + HINSTANCE hLib = LoadLibraryW(L"Crypt32"); + if (hLib) { + ptrCertOpenSystemStoreW = (PtrCertOpenSystemStoreW)GetProcAddress(hLib, "CertOpenSystemStoreW"); + ptrCertFindCertificateInStore = (PtrCertFindCertificateInStore)GetProcAddress(hLib, "CertFindCertificateInStore"); + ptrCertCloseStore = (PtrCertCloseStore)GetProcAddress(hLib, "CertCloseStore"); + if (!ptrCertOpenSystemStoreW || !ptrCertFindCertificateInStore || !ptrCertCloseStore) + qWarning("could not resolve symbols in crypt32 library"); // should never happen + } else { + qWarning("could not load crypt32 library"); // should never happen + } +#endif return true; } @@ -486,13 +519,74 @@ void QSslSocketPrivate::resetDefaultCiphers() QList QSslSocketPrivate::systemCaCertificates() { - // Qt provides a default bundle of certificates - QFile caBundle(QLatin1String(":/trolltech/network/ssl/qt-ca-bundle.crt")); - if (caBundle.open(QIODevice::ReadOnly | QIODevice::Text)) - return QSslCertificate::fromDevice(&caBundle); - - // Unreachable; return no bundle. - return QList(); + ensureInitialized(); + QList systemCerts; +#if defined(Q_OS_MAC) + CFArrayRef cfCerts; + OSStatus status = 1; + + OSStatus SecCertificateGetData ( + SecCertificateRef certificate, + CSSM_DATA_PTR data + ); + + if (ptrSecCertificateGetData) { + if (ptrSecTrustSettingsCopyCertificates) + status = ptrSecTrustSettingsCopyCertificates(kSecTrustSettingsDomainSystem, &cfCerts); + else if (ptrSecTrustCopyAnchorCertificates) + status = ptrSecTrustCopyAnchorCertificates(&cfCerts); + if (!status) { + CFIndex size = CFArrayGetCount(cfCerts); + for (CFIndex i = 0; i < size; ++i) { + SecCertificateRef cfCert = (SecCertificateRef)CFArrayGetValueAtIndex(cfCerts, i); + CSSM_DATA data; + CSSM_DATA_PTR dataPtr = &data; + if (ptrSecCertificateGetData(cfCert, dataPtr)) { + qWarning("error retrieving a CA certificate from the system store"); + } else { + int len = data.Length; + char *rawData = reinterpret_cast(data.Data); + QByteArray rawCert(rawData, len); + systemCerts.append(QSslCertificate::fromData(rawCert, QSsl::Der)); + } + } + } + else { + // no detailed error handling here + qWarning("could not retrieve system CA certificates"); + } + } +#elif defined(Q_OS_WIN) + if (ptrCertOpenSystemStoreW && ptrCertFindCertificateInStore && ptrCertCloseStore) { + HCERTSTORE hSystemStore; + hSystemStore = ptrCertOpenSystemStoreW(0, L"ROOT"); + if(hSystemStore) { + PCCERT_CONTEXT pc = NULL; + while(1) { + pc = ptrCertFindCertificateInStore( hSystemStore, X509_ASN_ENCODING, 0, CERT_FIND_ANY, NULL, pc); + if(!pc) + break; + QByteArray der((const char *)(pc->pbCertEncoded), static_cast(pc->cbCertEncoded)); + QSslCertificate cert(der,QSsl::Der); + systemCerts.append(cert); + } + ptrCertCloseStore(hSystemStore, 0); + } + } +#elif defined(Q_OS_AIX) + systemCerts.append(QSslCertificate::fromPath("/var/ssl/certs/*.pem", QSsl::Pem, QRegExp::Wildcard)); +#elif defined(Q_OS_SOLARIS) + systemCerts.append(QSslCertificate::fromPath("/usr/local/ssl/certs/*.pem", QSsl::Pem, QRegExp::Wildcard)); +#elif defined(Q_OS_HPUX) + systemCerts.append(QSslCertificate::fromPath("/opt/openssl/certs/*.pem", QSsl::Pem, QRegExp::Wildcard)); +#elif defined(Q_OS_LINUX) + systemCerts.append(QSslCertificate::fromPath("/etc/ssl/certs/*.pem", QSsl::Pem, QRegExp::Wildcard)); // (K)ubuntu, OpenSUSE, Mandriva, ... + systemCerts.append(QSslCertificate::fromPath("/etc/pki/tls/certs/ca-bundle.crt", QSsl::Pem)); // Fedora + systemCerts.append(QSslCertificate::fromPath("/usr/lib/ssl/certs/*.pem", QSsl::Pem, QRegExp::Wildcard)); // Gentoo, Mandrake + systemCerts.append(QSslCertificate::fromPath("/usr/share/ssl/*.pem", QSsl::Pem, QRegExp::Wildcard)); // Centos, Redhat, SuSE + systemCerts.append(QSslCertificate::fromPath("/usr/local/ssl/*.pem", QSsl::Pem, QRegExp::Wildcard)); // Normal OpenSSL Tarball +#endif + return systemCerts; } void QSslSocketBackendPrivate::startClientEncryption() diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h index 8e22664..cf1786c 100644 --- a/src/network/ssl/qsslsocket_p.h +++ b/src/network/ssl/qsslsocket_p.h @@ -66,6 +66,20 @@ QT_BEGIN_NAMESPACE +#if defined(Q_OS_MAC) +#include +#include + typedef OSStatus (*PtrSecCertificateGetData)(SecCertificateRef, CSSM_DATA_PTR); + typedef OSStatus (*PtrSecTrustSettingsCopyCertificates)(int, CFArrayRef*); + typedef OSStatus (*PtrSecTrustCopyAnchorCertificates)(CFArrayRef*); +#elif defined(Q_OS_WIN) + typedef HCERTSTORE (WINAPI *PtrCertOpenSystemStoreW)(HCRYPTPROV_LEGACY, LPCWSTR); + typedef PCCERT_CONTEXT (WINAPI *PtrCertFindCertificateInStore)(HCERTSTORE, DWORD, DWORD, DWORD, const void*, PCCERT_CONTEXT); + typedef BOOL (WINAPI *PtrCertCloseStore)(HCERTSTORE, DWORD); +#endif + + + class QSslSocketPrivate : public QTcpSocketPrivate { Q_DECLARE_PUBLIC(QSslSocket) @@ -106,6 +120,16 @@ public: static void addDefaultCaCertificate(const QSslCertificate &cert); static void addDefaultCaCertificates(const QList &certs); +#if defined(Q_OS_MAC) + static PtrSecCertificateGetData ptrSecCertificateGetData; + static PtrSecTrustSettingsCopyCertificates ptrSecTrustSettingsCopyCertificates; + static PtrSecTrustCopyAnchorCertificates ptrSecTrustCopyAnchorCertificates; +#elif defined(Q_OS_WIN) + static PtrCertOpenSystemStoreW ptrCertOpenSystemStoreW; + static PtrCertFindCertificateInStore ptrCertFindCertificateInStore; + static PtrCertCloseStore ptrCertCloseStore; +#endif + // The socket itself, including private slots. QTcpSocket *plainSocket; void createPlainSocket(QIODevice::OpenMode openMode); -- cgit v0.12 From d28c9e9105f4b3f638bfa7492af10ce7d4f1c644 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 3 Jun 2010 15:13:14 +0200 Subject: remove certificate bundle since we now use the system certificates we should not provide our own certificate bundle anymore. Patch-by: Zeno Albisser and Peter Hartmann Reviewed-by: Thiago Task-number: QTBUG-8833 Task-number: QT-3361 --- src/network/network.qrc | 5 - src/network/ssl/qt-ca-bundle.crt | 1984 -------------------------------------- src/network/ssl/ssl.pri | 3 - 3 files changed, 1992 deletions(-) delete mode 100644 src/network/network.qrc delete mode 100644 src/network/ssl/qt-ca-bundle.crt diff --git a/src/network/network.qrc b/src/network/network.qrc deleted file mode 100644 index 06f98cb..0000000 --- a/src/network/network.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - -ssl/qt-ca-bundle.crt - - diff --git a/src/network/ssl/qt-ca-bundle.crt b/src/network/ssl/qt-ca-bundle.crt deleted file mode 100644 index 7755ca0..0000000 --- a/src/network/ssl/qt-ca-bundle.crt +++ /dev/null @@ -1,1984 +0,0 @@ -## -## ca-bundle.crt -- Bundle of CA Certificates -## -## This is a bundle of X.509 certificates of public -## Certificate Authorities (CA). -## - ------BEGIN CERTIFICATE----- -MIICfTCCAeagAwIBAgIEAgAAuDANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQGEwJJ -RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSkwJwYD -VQQDEyBCYWx0aW1vcmUgQ3liZXJUcnVzdCBNb2JpbGUgUm9vdDAeFw0wMDA1MTIx -ODIwMDBaFw0yMDA1MTIyM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------END CERTIFICATE----- - ------BEGIN CERTIFICATE----- -MIICjzCCAXegAwIBAgIDAQAjMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBD -QTAeFw0wMjA3MTIxNjMyMTdaFw0xMjA3MTIxNjMyMTdaMEUxCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4xGTAXBgNVBAMTEENlcnR1bSBM -ZXZlbCBJSUkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALZjBbfGFmlsLjPe -pWaDwG0LqhF11lWKabaHi1sQhK3qomHY7Em7qpL11dUQ1vsMcnnpzz/J0AEH6KDh -+yAyXV1SE/tVToLYYByZK+JGacLYIYF9aCwV8AhqyzOGurO5QX6vLboXB2WNnwmX -hyNVKUgnUVy4ktAR2qZJIw5Bjsn/AgMBAAGjEzARMA8GA1UdEwEB/wQFMAMBAf8w -DQYJKoZIhvcNAQEFBQADggEBAIsLt3vKCZqd/gui45ovm3FSO6FLjzzq4pagPvbN -nZ39HrhRaCpqkHDAj71L5L27U3eW2D4ILL0iUmZadbC4i3at/PUL9mjhGlajcCN8 -EF6IXGT87Tbcii735jRaaXSbEY4YhNOg9DPBoD4uJMkA8Z0Y/6lYmk4S6KUMCzzt -t5zZBiWjdd08yFi5VGMvpE74KVOMdMa3JNVaR0XvT0Q8yXo1XKCrY9OFIxnhVgDb -hzr9fwjKWDwu8kxhT9khAETm0BU2Buu+CTasaJdT/bBR2YEx9qcN7XyXTeDtkOO5 -QeGSqFgzquwjWEbKhf7l/e+efdRCg+ikH3O5snHB6iS+dgg= ------END CERTIFICATE----- - ------BEGIN CERTIFICATE----- -MIICjjCCAXagAwIBAgIDAQAkMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBM -MRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8uby4x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XJJLXVggKtI3lpjbi2Tc7P -TMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ -HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mER -dEr/VxqHD3VILs9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5Cuf -ReYNnyicsbkqWletNw+vHX/bvZ8= ------END CERTIFICATE----- - ------BEGIN CERTIFICATE----- -MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzEl -MCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMp -U3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQw -NjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBoMQswCQYDVQQGEwJVUzElMCMGA1UE -ChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZp -ZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqGSIb3 -DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf -8MOh2tTYbitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN -+lq2cwQlZut3f+dZxkqZJRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0 -X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVmepsZGD3/cVE8MC5fvj13c7JdBmzDI1aa -K4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSNF4Azbl5KXZnJHoe0nRrA -1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HFMIHCMB0G -A1UdDgQWBBS/X7fRzt0fhvRbV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WgBSb4gdXZxwewGoG -3lm0mi3f3BmGLjANBgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4Gs -J0/WwbgcQ3izDJr86iw8bmEbTUsp9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO -291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu01yiPqFbQfXf5WRDLenVOavS -ot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG79G+dwfCMNYxd -AfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7 -TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== ------END CERTIFICATE----- diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri index 72ea80f..8b2e2c1 100644 --- a/src/network/ssl/ssl.pri +++ b/src/network/ssl/ssl.pri @@ -31,9 +31,6 @@ symbian { ssl/qsslsocket_openssl.cpp \ ssl/qsslsocket_openssl_symbols.cpp - # Include Qt's default CA bundle - RESOURCES += network.qrc - # Add optional SSL libs LIBS_PRIVATE += $$OPENSSL_LIBS } -- cgit v0.12 From e6ac173991223dbf3b1b6f7213550ebca4608cb6 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Tue, 27 Apr 2010 17:21:25 +0200 Subject: Fix incorrect line breaking in QtWebKit. QTextBoundaryFinder was not consistent with ICU. See also: https://bugs.webkit.org/show_bug.cgi?id=31076 The previous definition of a line break was that the index in the string after which the line break should occur. Now it is the index of the boundary at which the break should occur (hence one more). Task-number: QT-3495 Reviewed-by: Simon Hausmann Reviewed-by: Lars Knoll --- src/corelib/tools/qtextboundaryfinder.cpp | 12 ++- .../tst_qtextboundaryfinder.cpp | 111 +++++++++++++++++++-- 2 files changed, 114 insertions(+), 9 deletions(-) diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp index 7c40e35..ca4d3c3 100644 --- a/src/corelib/tools/qtextboundaryfinder.cpp +++ b/src/corelib/tools/qtextboundaryfinder.cpp @@ -130,6 +130,11 @@ static void init(QTextBoundaryFinder::BoundaryType type, const QChar *chars, int Line break boundaries give possible places where a line break might happen and sentence boundaries will show the beginning and end of whole sentences. + + The first position in a string is always a valid boundary and + refers to the position before the first character. The last + position at the length of the string is also valid and refers + to the position after the last character. */ /*! @@ -362,7 +367,8 @@ int QTextBoundaryFinder::toNextBoundary() ++pos; break; case Line: - while (pos < length && d->attributes[pos].lineBreakType < HB_Break) + Q_ASSERT(pos); + while (pos < length && d->attributes[pos-1].lineBreakType < HB_Break) ++pos; break; } @@ -404,7 +410,7 @@ int QTextBoundaryFinder::toPreviousBoundary() --pos; break; case Line: - while (pos > 0 && d->attributes[pos].lineBreakType < HB_Break) + while (pos > 0 && d->attributes[pos-1].lineBreakType < HB_Break) --pos; break; } @@ -429,7 +435,7 @@ bool QTextBoundaryFinder::isAtBoundary() const case Word: return d->attributes[pos].wordBoundary; case Line: - return d->attributes[pos].lineBreakType >= HB_Break; + return (pos > 0) ? d->attributes[pos-1].lineBreakType >= HB_Break : true; case Sentence: return d->attributes[pos].sentenceBoundary; } diff --git a/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp index c60af5e..a562fbe 100644 --- a/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp +++ b/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp @@ -71,6 +71,10 @@ private slots: void isAtWordStart(); void fastConstructor(); void isAtBoundaryLine(); + void toNextBoundary_data(); + void toNextBoundary(); + void toPreviousBoundary_data(); + void toPreviousBoundary(); }; tst_QTextBoundaryFinder::tst_QTextBoundaryFinder() @@ -292,25 +296,120 @@ void tst_QTextBoundaryFinder::fastConstructor() void tst_QTextBoundaryFinder::isAtBoundaryLine() { - // idx 0 1 2 3 4 5 - // break? - - - + - + + // idx 0 1 2 3 4 5 6 + // break? - - - - + - + QChar s[] = { 0x0061, 0x00AD, 0x0062, 0x0009, 0x0063, 0x0064 }; QString text(s, sizeof(s)/sizeof(s[0])); - qDebug() << "text = " << text << ", length = " << text.length(); +// qDebug() << "text = " << text << ", length = " << text.length(); QTextBoundaryFinder finder(QTextBoundaryFinder::Line, text.constData(), text.length(), /*buffer*/0, /*buffer size*/0); finder.setPosition(0); - QVERIFY(!finder.isAtBoundary()); + QVERIFY(finder.isAtBoundary()); finder.setPosition(1); QVERIFY(!finder.isAtBoundary()); finder.setPosition(2); QVERIFY(!finder.isAtBoundary()); finder.setPosition(3); - QVERIFY(finder.isAtBoundary()); - finder.setPosition(4); QVERIFY(!finder.isAtBoundary()); + finder.setPosition(4); + QVERIFY(finder.isAtBoundary()); finder.setPosition(5); + QVERIFY(!finder.isAtBoundary()); + finder.setPosition(6); QVERIFY(finder.isAtBoundary()); } +Q_DECLARE_METATYPE(QList) + +void tst_QTextBoundaryFinder::toNextBoundary_data() +{ + QTest::addColumn("text"); + QTest::addColumn("type"); + QTest::addColumn< QList >("boundaries"); + + QList boundaries; + boundaries << 0 << 3 << 4 << 7 << 8 << 11 << 12 << 13 << 16 << 17 << 20 << 21 << 24 << 25; + QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) \ + << boundaries; + + boundaries.clear(); + boundaries << 0 << 13 << 25; + QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) \ + << boundaries; + + boundaries.clear(); + boundaries << 0 << 4 << 8 << 13 << 17 << 21 << 25; + QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) \ + << boundaries; + + boundaries.clear(); + boundaries << 0 << 5 << 9 << 15 << 17 << 21 << 28; + QTest::newRow("Line") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line) + << boundaries; + +} + +void tst_QTextBoundaryFinder::toNextBoundary() +{ + QFETCH(QString, text); + QFETCH(int, type); + QFETCH(QList, boundaries); + + QList foundBoundaries; + QTextBoundaryFinder boundaryFinder(QTextBoundaryFinder::BoundaryType(type), text); + boundaryFinder.toStart(); + for(int next = 0; next != -1; next = boundaryFinder.toNextBoundary()) + foundBoundaries << next; + QCOMPARE(boundaries, foundBoundaries); +} + +void tst_QTextBoundaryFinder::toPreviousBoundary_data() +{ + QTest::addColumn("text"); + QTest::addColumn("type"); + QTest::addColumn< QList >("boundaries"); + + QList boundaries; + boundaries << 25 << 24 << 21 << 20 << 17 << 16 << 13 << 12 << 11 << 8 << 7 << 4 << 3 << 0; + QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) + << boundaries; + + boundaries.clear(); + boundaries << 25 << 13 << 0; + QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) + << boundaries; + + boundaries.clear(); + boundaries << 25 << 21 << 17 << 13 << 8 << 4 << 0; + QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) + << boundaries; + + boundaries.clear(); + boundaries << 28 << 21 << 17 << 15 << 9 << 5 << 0; + QTest::newRow("Line") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line) + << boundaries; + +} + +void tst_QTextBoundaryFinder::toPreviousBoundary() +{ + QFETCH(QString, text); + QFETCH(int, type); + QFETCH(QList, boundaries); + + QList foundBoundaries; + QTextBoundaryFinder boundaryFinder(QTextBoundaryFinder::BoundaryType(type), text); + boundaryFinder.toEnd(); + for (int previous = boundaryFinder.position(); + previous != -1; + previous = boundaryFinder.toPreviousBoundary()) + { + foundBoundaries << previous; + } + QCOMPARE(boundaries, foundBoundaries); +} + + + + QTEST_MAIN(tst_QTextBoundaryFinder) #include "tst_qtextboundaryfinder.moc" -- cgit v0.12 From 91b3cea424e08e7480fb32987f757206d885504c Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 11 Jun 2010 16:51:18 +0300 Subject: Fix symbian-abld build failure with bearer plugins All different Symbian bearer plugins had same UID which caused duplicate extension makefiles. Assigned each dll different UID. Reviewed-by: Jason Barron --- src/plugins/bearer/symbian/3_1/3_1.pro | 1 + src/plugins/bearer/symbian/3_2/3_2.pro | 1 + src/plugins/bearer/symbian/symbian.pri | 2 -- src/plugins/bearer/symbian/symbian_3/symbian_3.pro | 2 ++ 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/bearer/symbian/3_1/3_1.pro b/src/plugins/bearer/symbian/3_1/3_1.pro index a60d18b..2d721a8 100644 --- a/src/plugins/bearer/symbian/3_1/3_1.pro +++ b/src/plugins/bearer/symbian/3_1/3_1.pro @@ -2,3 +2,4 @@ include(../symbian.pri) LIBS += -lapengine TARGET = $${TARGET}_3_1 +TARGET.UID3 = 0x2002131C diff --git a/src/plugins/bearer/symbian/3_2/3_2.pro b/src/plugins/bearer/symbian/3_2/3_2.pro index 4e5b416..3404dde 100644 --- a/src/plugins/bearer/symbian/3_2/3_2.pro +++ b/src/plugins/bearer/symbian/3_2/3_2.pro @@ -10,3 +10,4 @@ exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) { } TARGET = $${TARGET}_3_2 +TARGET.UID3 = 0x2002131D diff --git a/src/plugins/bearer/symbian/symbian.pri b/src/plugins/bearer/symbian/symbian.pri index bfcd9ed..afe84dc 100644 --- a/src/plugins/bearer/symbian/symbian.pri +++ b/src/plugins/bearer/symbian/symbian.pri @@ -10,8 +10,6 @@ SOURCES += ../symbianengine.cpp \ ../qnetworksession_impl.cpp \ ../main.cpp -TARGET.UID3=0x20021319 - INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE symbian-abld:INCLUDEPATH += $$QT_BUILD_TREE/include/QtNetwork/private diff --git a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro index 455aa67..f9d486e 100644 --- a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro +++ b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro @@ -12,3 +12,5 @@ exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) { # Fall back to 3_1 implementation on platforms that do not have cmmanager LIBS += -lapengine } + +TARGET.UID3 = 0x20021319 -- cgit v0.12 From e311bd0b23cf8696f284b8da3dcc5a591c7b689e Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Fri, 11 Jun 2010 14:21:15 +0200 Subject: Allow to build Qt in static with mingw Some functions were marked with Q_DECL_IMPORT where they should just be Q_CORE_EXPORT. The reason is that this macro is expanded to nothing in case of static builds whereas Q_DECL_IMPORT isn't (it is a dllimport). That leads the linker to try to import it and it shouldn't. Task-number: QTBUG-10791 Reviewed-by: gabi --- src/gui/kernel/qapplication.cpp | 2 +- src/gui/kernel/qwhatsthis.cpp | 2 +- src/script/api/qscriptengine.cpp | 2 +- src/script/parser/qscriptlexer.cpp | 2 +- src/xmlpatterns/data/qdecimal_p.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index de74f53..33b96e4 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -138,7 +138,7 @@ static void initResources() QT_BEGIN_NAMESPACE -Q_DECL_IMPORT extern void qt_call_post_routines(); +Q_CORE_EXPORT void qt_call_post_routines(); int QApplicationPrivate::app_compile_version = 0x040000; //we don't know exactly, but it's at least 4.0.0 diff --git a/src/gui/kernel/qwhatsthis.cpp b/src/gui/kernel/qwhatsthis.cpp index 6181b62..ff4641e 100644 --- a/src/gui/kernel/qwhatsthis.cpp +++ b/src/gui/kernel/qwhatsthis.cpp @@ -143,7 +143,7 @@ QT_BEGIN_NAMESPACE \sa QToolTip */ -Q_DECL_IMPORT extern void qDeleteInEventHandler(QObject *o); +Q_CORE_EXPORT void qDeleteInEventHandler(QObject *o); class QWhatsThat : public QWidget { diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index f44f33d..fe12fc8 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -1603,7 +1603,7 @@ QScriptValue QScriptEngine::newFunction(QScriptEngine::FunctionSignature fun, #ifndef QT_NO_REGEXP -Q_DECL_IMPORT extern QString qt_regexp_toCanonical(const QString &, QRegExp::PatternSyntax); +Q_CORE_EXPORT QString qt_regexp_toCanonical(const QString &, QRegExp::PatternSyntax); /*! Creates a QtScript object of class RegExp with the given diff --git a/src/script/parser/qscriptlexer.cpp b/src/script/parser/qscriptlexer.cpp index ca64776..3ddc3aa 100644 --- a/src/script/parser/qscriptlexer.cpp +++ b/src/script/parser/qscriptlexer.cpp @@ -31,7 +31,7 @@ QT_BEGIN_NAMESPACE -Q_DECL_IMPORT extern double qstrtod(const char *s00, char const **se, bool *ok); +Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok); #define shiftWindowsLineBreak() \ do { \ diff --git a/src/xmlpatterns/data/qdecimal_p.h b/src/xmlpatterns/data/qdecimal_p.h index d17b647..2a5e0b3 100644 --- a/src/xmlpatterns/data/qdecimal_p.h +++ b/src/xmlpatterns/data/qdecimal_p.h @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE /** * Defined in QtCore's qlocale.cpp. */ -Q_DECL_IMPORT extern char *qdtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp); +Q_CORE_EXPORT char *qdtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp); namespace QPatternist { -- cgit v0.12 From 5471f3cc5f3b1ec9fbe15ba35ab23dfd9fcc42c9 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 11 Jun 2010 12:11:05 +0100 Subject: Thread safety for QFontEngineS60 On symbian, creating fonts requires a connection to the window server. Window server sessions are not sharable across threads. To avoid QFont crashing when used outside the GUI thread, we construct a private session to the window server when the shared CONE session is not available. (CCoeEnv::Static() uses TLS, so it returns null outside of GUI thread) The private session and screen device are stored in QThreadStorage, so they are automatically deleted when the QThread exits. Task-number: QTBUG-8874 Reviewed-by: mread --- src/gui/kernel/qapplication_s60.cpp | 25 +++++++++++++++++++++++++ src/gui/kernel/qt_s60_p.h | 26 ++++++++++++++++++++++---- src/gui/text/qfontdatabase_s60.cpp | 18 ++++++++++-------- 3 files changed, 57 insertions(+), 12 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 78027b2..f39b462 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -2046,4 +2046,29 @@ void QApplication::restoreOverrideCursor() #endif // QT_NO_CURSOR +QS60ThreadLocalData::QS60ThreadLocalData() +{ + CCoeEnv *env = CCoeEnv::Static(); + if (env) { + //if this is the UI thread, share objects owned by CONE + usingCONEinstances = true; + wsSession = env->WsSession(); + screenDevice = env->ScreenDevice(); + } + else { + usingCONEinstances = false; + qt_symbian_throwIfError(wsSession.Connect(qt_s60GetRFs())); + screenDevice = new CWsScreenDevice(wsSession); + screenDevice->Construct(); + } +} + +QS60ThreadLocalData::~QS60ThreadLocalData() +{ + if (!usingCONEinstances) { + delete screenDevice; + wsSession.Close(); + } +} + QT_END_NAMESPACE diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 58da302..bec51b8 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -62,6 +62,7 @@ #include "QtGui/qevent.h" #include "qpointer.h" #include "qapplication.h" +#include "QtCore/qthreadstorage.h" #include #include #include @@ -85,10 +86,21 @@ const TInt KInternalStatusPaneChange = 0x50000000; //this macro exists because EColor16MAP enum value doesn't exist in Symbian OS 9.2 #define Q_SYMBIAN_ECOLOR16MAP TDisplayMode(13) +class QS60ThreadLocalData +{ +public: + QS60ThreadLocalData(); + ~QS60ThreadLocalData(); + bool usingCONEinstances; + RWsSession wsSession; + CWsScreenDevice *screenDevice; +}; + class QS60Data { public: QS60Data(); + QThreadStorage tls; TUid uid; int screenDepth; QPoint lastCursorPos; @@ -125,9 +137,9 @@ public: int menuBeingConstructed : 1; QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type static inline void updateScreenSize(); - static inline RWsSession& wsSession(); + inline RWsSession& wsSession(); static inline RWindowGroup& windowGroup(); - static inline CWsScreenDevice* screenDevice(); + inline CWsScreenDevice* screenDevice(); static inline CCoeAppUi* appUi(); static inline CEikMenuBar* menuBar(); #ifdef Q_WS_S60 @@ -256,7 +268,10 @@ inline void QS60Data::updateScreenSize() inline RWsSession& QS60Data::wsSession() { - return CCoeEnv::Static()->WsSession(); + if(!tls.hasLocalData()) { + tls.setLocalData(new QS60ThreadLocalData); + } + return tls.localData()->wsSession; } inline RWindowGroup& QS60Data::windowGroup() @@ -266,7 +281,10 @@ inline RWindowGroup& QS60Data::windowGroup() inline CWsScreenDevice* QS60Data::screenDevice() { - return CCoeEnv::Static()->ScreenDevice(); + if(!tls.hasLocalData()) { + tls.setLocalData(new QS60ThreadLocalData); + } + return tls.localData()->screenDevice; } inline CCoeAppUi* QS60Data::appUi() diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 40fe3b7..61c5271 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -218,17 +218,19 @@ QFontEngineFTS60::QFontEngineFTS60(const QFontDef &fd) */ qreal QFontEngineS60::pixelsToPoints(qreal pixels, Qt::Orientation orientation) { + CWsScreenDevice* device = S60->screenDevice(); return (orientation == Qt::Horizontal? - S60->screenDevice()->HorizontalPixelsToTwips(pixels) - :S60->screenDevice()->VerticalPixelsToTwips(pixels)) / KTwipsPerPoint; + device->HorizontalPixelsToTwips(pixels) + :device->VerticalPixelsToTwips(pixels)) / KTwipsPerPoint; } qreal QFontEngineS60::pointsToPixels(qreal points, Qt::Orientation orientation) { + CWsScreenDevice* device = S60->screenDevice(); const int twips = points * KTwipsPerPoint; return orientation == Qt::Horizontal? - S60->screenDevice()->HorizontalTwipsToPixels(twips) - :S60->screenDevice()->VerticalTwipsToPixels(twips); + device->HorizontalTwipsToPixels(twips) + :device->VerticalTwipsToPixels(twips); } QFontEngineMultiS60::QFontEngineMultiS60(QFontEngine *first, int script, const QStringList &fallbackFamilies) @@ -267,16 +269,16 @@ static void initializeDb() QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); - const int numTypeFaces = QS60Data::screenDevice()->NumTypefaces(); + const int numTypeFaces = S60->screenDevice()->NumTypefaces(); const QSymbianFontDatabaseExtrasImplementation *dbExtras = static_cast(db->symbianExtras); bool fontAdded = false; for (int i = 0; i < numTypeFaces; i++) { TTypefaceSupport typefaceSupport; - QS60Data::screenDevice()->TypefaceSupport(typefaceSupport, i); + S60->screenDevice()->TypefaceSupport(typefaceSupport, i); CFont *font; // We have to get a font instance in order to know all the details TFontSpec fontSpec(typefaceSupport.iTypeface.iName, 11); - if (QS60Data::screenDevice()->GetNearestFontInPixels(font, fontSpec) != KErrNone) + if (S60->screenDevice()->GetNearestFontInPixels(font, fontSpec) != KErrNone) continue; if (font->TypeUid() == KCFbsFontUid) { TOpenFontFaceAttrib faceAttrib; @@ -318,7 +320,7 @@ static void initializeDb() fontAdded = true; } - QS60Data::screenDevice()->ReleaseFont(font); + S60->screenDevice()->ReleaseFont(font); } Q_ASSERT(fontAdded); -- cgit v0.12 From a82ac93ee26a2d74264578304aa4cd01aad2ccaa Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Sun, 13 Jun 2010 22:42:10 +0200 Subject: Prospective S60 build fix QS60Data::screenDevice() has moved from being process global to being thread local, therefore it must be accessed through the S60 macro that returns the thread-local data. --- src/gui/text/qfontdatabase_s60.cpp | 6 +++--- src/gui/text/qfontengine_s60.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 9999159..cdfba3d 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -118,7 +118,7 @@ public: { if (!font) return; - QS60Data::screenDevice()->ReleaseFont(font); + S60->screenDevice()->ReleaseFont(font); } }; @@ -205,7 +205,7 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c CFont* font = NULL; #ifdef Q_SYMBIAN_HAS_FONTTABLE_API - const TInt err = QS60Data::screenDevice()->GetNearestFontToDesignHeightInPixels(font, searchSpec); + const TInt err = S60->screenDevice()->GetNearestFontToDesignHeightInPixels(font, searchSpec); Q_ASSERT(err == KErrNone && font); QScopedPointer sFont(font); QSymbianTypeFaceExtras *extras = new QSymbianTypeFaceExtras(font); @@ -311,7 +311,7 @@ static void initializeDb() QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); - const int numTypeFaces = QS60Data::screenDevice()->NumTypefaces(); + const int numTypeFaces = S60->screenDevice()->NumTypefaces(); const QSymbianFontDatabaseExtrasImplementation *dbExtras = static_cast(db->symbianExtras); bool fontAdded = false; diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp index 925b3bf..f691413 100644 --- a/src/gui/text/qfontengine_s60.cpp +++ b/src/gui/text/qfontengine_s60.cpp @@ -66,7 +66,7 @@ QSymbianTypeFaceExtras::QSymbianTypeFaceExtras(CFont* cFont, COpenFont *openFont QSymbianTypeFaceExtras::~QSymbianTypeFaceExtras() { - QS60Data::screenDevice()->ReleaseFont(m_cFont); + S60->screenDevice()->ReleaseFont(m_cFont); } QByteArray QSymbianTypeFaceExtras::getSfntTable(uint tag) const -- cgit v0.12 From 5a90ecfd34f8959e73cc711337529ce8bada7aa2 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Sun, 13 Jun 2010 23:21:06 +0200 Subject: Updated WebKit to f943ead2759537527faa7f3cb057d995291663b9 Integrated changes: || || QWebPage::findText() does not clear selection when passed empty string || || || [Qt] tests/hybridPixmap fails || || || [Qt] Imperfect dependency for generated SVGNames.cpp || || || [Qt] Typo error in QWebPluginFactory Documentation || || || REGRESSION: [Qt] When dragging onto a page that handles the drag in Javascript it will be a move and not a copy by default || || || [Qt] Add documentation to the QtWebkit bridge || || || [Qt] TextBreakIteratorQt performance || || || [Qt] GraphicsLayer: recaching images creates an unnecessary deep copy || || || SQLStatementErrorCallback's return value needs to be converted to a boolean || || || [QT] QT_BEARER flag is not enabled on S60 properly || --- src/3rdparty/webkit/.tag | 2 +- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 106 +++++++++++ src/3rdparty/webkit/WebCore/WebCore.pri | 16 +- .../js/JSCustomSQLStatementErrorCallback.cpp | 2 +- .../webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp | 11 +- .../webkit/WebCore/bridge/qt/qt_pixmapruntime.h | 3 +- .../webkit/WebCore/bridge/qt/qt_runtime.cpp | 2 +- .../platform/graphics/qt/GraphicsLayerQt.cpp | 1 + .../platform/text/qt/TextBreakIteratorQt.cpp | 64 ++++--- src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 20 +- .../webkit/WebKit/qt/Api/qwebpluginfactory.cpp | 4 +- src/3rdparty/webkit/WebKit/qt/ChangeLog | 50 +++++ .../webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc | 100 +++++----- .../webkitsnippets/qtwebkit_bridge_snippets.cpp | 204 +++++++++++++++------ .../WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 17 ++ 16 files changed, 450 insertions(+), 154 deletions(-) diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index 09a4fe2..125e175 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -f943ead2759537527faa7f3cb057d995291663b9 +0f8941d0dd5f947530e1dc55b859d810bba14764 diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index a19b85a..6aaae4f 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from and has the sha1 checksum - 6db5de6d18c3ab8b74809303e4d79abacfc570a8 + f943ead2759537527faa7f3cb057d995291663b9 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 1d9d739..e04729d 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,109 @@ +2010-06-13 Noam Rosenthal + + Reviewed by Eric Seidel. + + [Qt] GraphicsLayer: recaching images creates an unnecessary deep copy + https://bugs.webkit.org/show_bug.cgi?id=40535 + + Made sure the painter ends its operation before copying the pixmap. + + No new tests: this is an optimization. + + * platform/graphics/qt/GraphicsLayerQt.cpp: + (WebCore::GraphicsLayerQtImpl::recache): + +2010-03-24 Dumitru Daniliuc + + Reviewed by Dimitri Glazkov. + + Changing the V8 and JSC implementations of + SQLStatementErrorCallback to interpret as false all results that + could be converted to a false boolean. Pretty much a revert of + r54981. + + https://bugs.webkit.org/show_bug.cgi?id=36569 + + * bindings/js/JSCustomSQLStatementErrorCallback.cpp: + (WebCore::JSCustomSQLStatementErrorCallback::handleEvent): + * bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp: + (WebCore::V8CustomSQLStatementErrorCallback::handleEvent): + * bindings/v8/custom/V8CustomVoidCallback.cpp: + (WebCore::invokeCallback): + * bindings/v8/custom/V8CustomVoidCallback.h: + +2010-06-13 Noam Rosenthal + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] tests/hybridPixmap fails + https://bugs.webkit.org/show_bug.cgi?id=37316 + + The problem was that JSC::Instance::createRuntimeObject was never called. + This is fixed by overloading newRuntimeObject and calling Instance::createRuntimeObject + in between, instead of creating the runtime object directly inside the static function + QtPixmapInstance::createRuntimeObject, which had to be renamed as to not overshadow the virtual function. + + This fixes an existing test, tests/hybridPixmap + + * bridge/qt/qt_pixmapruntime.cpp: + (JSC::Bindings::QtPixmapInstance::newRuntimeObject): + (JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject): + * bridge/qt/qt_pixmapruntime.h: + * bridge/qt/qt_runtime.cpp: + (JSC::Bindings::convertQVariantToValue): + +2010-06-07 Mahesh Kulakrni + + Reviewed by Simon Hausmann. + + [QT] QT_BEARER flag is not enabled on S60 properly + https://bugs.webkit.org/show_bug.cgi?id=39357 + + enable QT_BEARER for all platform based on qtmobility + + bearer module availability or for qt 4.7+ + + * WebCore.pri: + +2010-06-09 Csaba Osztrogonác + + Reviewed by Dirk Schulze. + + [Qt] Imperfect dependency for generated SVGNames.cpp + https://bugs.webkit.org/show_bug.cgi?id=40359 + + * WebCore.pri: Missing dependency added. + +2010-06-08 Kenneth Rohde Christiansen + + Unreviewed Buildbot fix. + + Reset the Qt TextBreakIterator when reusing it. + + * platform/text/qt/TextBreakIteratorQt.cpp: + (WebCore::setUpIterator): + +2010-06-08 Kenneth Rohde Christiansen + + Reviewed by Antti Koivisto. + + [Qt] TextBreakIterator Qt performance + https://bugs.webkit.org/show_bug.cgi?id=39958 + + Rework TextBreakIteratorQt to be more in line with the ICU version. + + We now reuse iterators where ever possible. The string data is compared + with memcmp, which should be faster than using a hash, as you need + to traverse the full buffer in the case the strings don't match, + where as the compare would fail quickly. + + * platform/text/qt/TextBreakIteratorQt.cpp: + (WebCore::TextBreakIterator::TextBreakIterator): + (WebCore::setUpIterator): + (WebCore::wordBreakIterator): + (WebCore::characterBreakIterator): + (WebCore::lineBreakIterator): + (WebCore::sentenceBreakIterator): + 2010-06-07 Jocelyn Turcotte Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pri b/src/3rdparty/webkit/WebCore/WebCore.pri index 5f5987f..9debd6a 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pri +++ b/src/3rdparty/webkit/WebCore/WebCore.pri @@ -101,18 +101,19 @@ greaterThan(QT_MINOR_VERSION, 5) { DEFINES += ENABLE_XSLT=0 } -!CONFIG(QTDIR_build):!contains(DEFINES, ENABLE_QT_BEARER=.) { - symbian: { - exists($${EPOCROOT}epoc32/release/winscw/udeb/QtBearer.lib)| \ - exists($${EPOCROOT}epoc32/release/armv5/lib/QtBearer.lib) { +# Bearer management is part of Qt 4.7 +# for older version, check for mobility with bearer +!contains(DEFINES, ENABLE_QT_BEARER=.) { + !lessThan(QT_MINOR_VERSION, 7) { + DEFINES += ENABLE_QT_BEARER=1 + } else { + load(mobilityconfig) + contains(MOBILITY_CONFIG, bearer) { DEFINES += ENABLE_QT_BEARER=1 } } } -# Bearer management is part of Qt 4.7 -!lessThan(QT_MINOR_VERSION, 7):!contains(DEFINES, ENABLE_QT_BEARER=.):DEFINES += ENABLE_QT_BEARER=1 - # Enable touch event support with Qt 4.6 !lessThan(QT_MINOR_VERSION, 6): DEFINES += ENABLE_TOUCH_EVENTS=1 @@ -593,6 +594,7 @@ contains(DEFINES, ENABLE_SVG=1) { # GENERATOR 5-C: svgnames.output = $${WC_GENERATED_SOURCES_DIR}/SVGNames.cpp svgnames.input = SVG_NAMES + svgnames.depends = $$PWD/svg/svgattrs.in svgnames.wkScript = $$PWD/dom/make_names.pl svgnames.commands = perl -I$$PWD/bindings/scripts $$svgnames.wkScript --tags $$PWD/svg/svgtags.in --attrs $$PWD/svg/svgattrs.in --extraDefines \"$${DEFINES}\" --preprocessor \"$${QMAKE_MOC} -E\" --factory --wrapperFactory --outputDir $$WC_GENERATED_SOURCES_DIR svgnames.wkExtraSources = $${WC_GENERATED_SOURCES_DIR}/SVGElementFactory.cpp $${WC_GENERATED_SOURCES_DIR}/JSSVGElementWrapperFactory.cpp diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp index 4d5de79..6178509 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp @@ -77,7 +77,7 @@ bool JSCustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, // Therefore an exception and returning true are the same thing - so, return true on an exception return true; } - return !result.isFalse(); + return result.toBoolean(exec); } } diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp index 803316d..3e6197f 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.cpp @@ -346,10 +346,17 @@ returnEmptyVariant: return QVariant::fromValue(QImage()); return QVariant(); } -JSObject* QtPixmapInstance::createRuntimeObject(ExecState* exec, PassRefPtr root, const QVariant& data) + +RuntimeObject* QtPixmapInstance::newRuntimeObject(ExecState* exec) +{ + return new(exec) QtPixmapRuntimeObject(exec, this); +} + +JSObject* QtPixmapInstance::createPixmapRuntimeObject(ExecState* exec, PassRefPtr root, const QVariant& data) { JSLock lock(SilenceAssertionsOnly); - return new(exec) QtPixmapRuntimeObject(exec, new QtPixmapInstance(root, data)); + QtPixmapInstance* instance = new QtPixmapInstance(root, data); + return instance->createRuntimeObject(exec); } bool QtPixmapInstance::canHandle(QMetaType::Type hint) diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h index a0e0e26..de1bcee 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_pixmapruntime.h @@ -42,7 +42,8 @@ public: int height() const; QPixmap toPixmap(); QImage toImage(); - static JSObject* createRuntimeObject(ExecState*, PassRefPtr, const QVariant&); + RuntimeObject* newRuntimeObject(ExecState* exec); + static JSObject* createPixmapRuntimeObject(ExecState*, PassRefPtr, const QVariant&); static QVariant variantFromObject(JSObject*, QMetaType::Type hint); static bool canHandle(QMetaType::Type hint); }; diff --git a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp index 4524d97..a39dc7a 100644 --- a/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp +++ b/src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.cpp @@ -877,7 +877,7 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr root, con } if (QtPixmapInstance::canHandle(static_cast(variant.type()))) - return QtPixmapInstance::createRuntimeObject(exec, root, variant); + return QtPixmapInstance::createPixmapRuntimeObject(exec, root, variant); if (type == qMetaTypeId()) { if (!root->globalObject()->inherits(&JSDOMWindow::s_info)) diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp index be44fca..ad2ec9c 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsLayerQt.cpp @@ -330,6 +330,7 @@ QPixmap GraphicsLayerQtImpl::recache(const QRegion& regionToUpdate) // Render the actual contents into the cache painter.setCompositionMode(QPainter::CompositionMode_SourceOver); m_layer->paintGraphicsLayerContents(gc, region.boundingRect()); + painter.end(); m_backingStoreKey = QPixmapCache::insert(pixmap); return pixmap; diff --git a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp index 5a8a812..dda443f 100644 --- a/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/text/qt/TextBreakIteratorQt.cpp @@ -33,31 +33,49 @@ namespace WebCore { + static unsigned char buffer[1024]; + class TextBreakIterator : public QTextBoundaryFinder { + public: + TextBreakIterator(QTextBoundaryFinder::BoundaryType type, const UChar* string, int length) + : QTextBoundaryFinder(type, (const QChar*)string, length, buffer, sizeof(buffer)) + , length(length) + , string(string) {} + TextBreakIterator() + : QTextBoundaryFinder() + , length(0) + , string(0) {} + + int length; + const UChar* string; }; - static QTextBoundaryFinder* iterator = 0; - static unsigned char buffer[1024]; - TextBreakIterator* wordBreakIterator(const UChar* string, int length) + TextBreakIterator* setUpIterator(TextBreakIterator& iterator, QTextBoundaryFinder::BoundaryType type, const UChar* string, int length) { if (!string || !length) return 0; - if (!iterator) - iterator = new QTextBoundaryFinder; - *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Word, (const QChar *)string, length, buffer, sizeof(buffer)); - return static_cast(iterator); + if (iterator.isValid() && type == iterator.type() && length == iterator.length + && memcmp(string, iterator.string, length) == 0) { + iterator.toStart(); + return &iterator; + } + + iterator = TextBreakIterator(type, string, length); + + return &iterator; } - TextBreakIterator* characterBreakIterator(const UChar* string, int length) + TextBreakIterator* wordBreakIterator(const UChar* string, int length) { - if (!string || !length) - return 0; - if (!iterator) - iterator = new QTextBoundaryFinder; + static TextBreakIterator staticWordBreakIterator; + return setUpIterator(staticWordBreakIterator, QTextBoundaryFinder::Word, string, length); + } - *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Grapheme, (const QChar *)string, length, buffer, sizeof(buffer)); - return static_cast(iterator); + TextBreakIterator* characterBreakIterator(const UChar* string, int length) + { + static TextBreakIterator staticCharacterBreakIterator; + return setUpIterator(staticCharacterBreakIterator, QTextBoundaryFinder::Grapheme, string, length); } TextBreakIterator* cursorMovementIterator(const UChar* string, int length) @@ -67,25 +85,15 @@ namespace WebCore { TextBreakIterator* lineBreakIterator(const UChar* string, int length) { - static QTextBoundaryFinder *iterator = 0; - if (!string || !length) - return 0; - if (!iterator) - iterator = new QTextBoundaryFinder; - - *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Line, (const QChar *)string, length, buffer, sizeof(buffer)); - return static_cast(iterator); + static TextBreakIterator staticLineBreakIterator; + return setUpIterator(staticLineBreakIterator, QTextBoundaryFinder::Line, string, length); } TextBreakIterator* sentenceBreakIterator(const UChar* string, int length) { - if (!string || !length) - return 0; - if (!iterator) - iterator = new QTextBoundaryFinder; + static TextBreakIterator staticSentenceBreakIterator; + return setUpIterator(staticSentenceBreakIterator, QTextBoundaryFinder::Sentence, string, length); - *iterator = QTextBoundaryFinder(QTextBoundaryFinder::Sentence, (const QChar *)string, length, buffer, sizeof(buffer)); - return static_cast(iterator); } int textBreakFirst(TextBreakIterator* bi) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index 2788085..8c7b93d 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -1175,7 +1175,7 @@ void QWebPagePrivate::dragEnterEvent(QGraphicsSceneDragDropEvent* ev) Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData)); ev->setDropAction(action); if (action != Qt::IgnoreAction) - ev->accept(); + ev->acceptProposedAction(); #endif } @@ -1188,7 +1188,7 @@ void QWebPagePrivate::dragEnterEvent(QDragEnterEvent* ev) ev->setDropAction(action); // We must accept this event in order to receive the drag move events that are sent // while the drag and drop action is in progress. - ev->accept(); + ev->acceptProposedAction(); #endif } @@ -1218,7 +1218,7 @@ void QWebPagePrivate::dragMoveEvent(QGraphicsSceneDragDropEvent* ev) Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData)); ev->setDropAction(action); if (action != Qt::IgnoreAction) - ev->accept(); + ev->acceptProposedAction(); #endif } @@ -1232,7 +1232,7 @@ void QWebPagePrivate::dragMoveEvent(QDragMoveEvent* ev) ev->setDropAction(action); // We must accept this event in order to receive the drag move events that are sent // while the drag and drop action is in progress. - ev->accept(); + ev->acceptProposedAction(); #endif } @@ -1242,7 +1242,7 @@ void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev) DragData dragData(ev->mimeData(), ev->pos().toPoint(), QCursor::pos(), dropActionToDragOp(ev->possibleActions())); if (page->dragController()->performDrag(&dragData)) - ev->accept(); + ev->acceptProposedAction(); #endif } @@ -1254,7 +1254,7 @@ void QWebPagePrivate::dropEvent(QDropEvent* ev) DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(), dropActionToDragOp(Qt::DropAction(ev->dropAction()))); if (page->dragController()->performDrag(&dragData)) - ev->accept(); + ev->acceptProposedAction(); #endif } @@ -3267,6 +3267,14 @@ bool QWebPage::findText(const QString &subString, FindFlags options) } else return d->page->markAllMatchesForText(subString, caseSensitivity, true, 0); } else { + if (subString.isEmpty()) { + d->page->mainFrame()->selection()->clear(); + Frame* frame = d->page->mainFrame()->tree()->firstChild(); + while (frame) { + frame->selection()->clear(); + frame = frame->tree()->traverseNextWithWrap(false); + } + } ::FindDirection direction = ::FindDirectionForward; if (options & FindBackward) direction = ::FindDirectionBackward; diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp index f715430..b9180be 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpluginfactory.cpp @@ -63,7 +63,7 @@ /*! \class QWebPluginFactory::Plugin \since 4.4 - \brief the QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create. + \brief The QWebPluginFactory::Plugin structure describes the properties of a plugin a QWebPluginFactory can create. \inmodule QtWebKit */ @@ -147,7 +147,7 @@ QWebPluginFactory::~QWebPluginFactory() supported plugins the factory can create. \note Currently, this function is only called when JavaScript programs - access the global \c plugins or \c mimetypes objects. + access the global \c plugins or \c mimetypes objects. */ /*! diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index 3deb9ac..671acec 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,53 @@ +2010-06-09 Pierre Rossi + + Reviewed by Kenneth Rohde Christiansen. + + QWebPage::findText() does not clear selection when passed empty string + https://bugs.webkit.org/show_bug.cgi?id=31779 + + * Api/qwebpage.cpp: + (QWebPage::findText): + * tests/qwebpage/tst_qwebpage.cpp: + (tst_QWebPage::findText): + +2010-06-12 No'am Rosenthal + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Add documentation to the QtWebkit bridge + https://bugs.webkit.org/show_bug.cgi?id=35861 + + The previous accepted patch was actually a faulty one; It was hard to trace since it's just a documentation + change. The new patch amends that, with the correct snippets and grammar fixes. + + * docs/qtwebkit-bridge.qdoc: + * docs/webkitsnippets/qtwebkit_bridge_snippets.cpp: + (wrapInFunction): + +2010-06-11 Jesus Sanchez-Palencia + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Typo error in QWebPluginFactory Documentation + https://bugs.webkit.org/show_bug.cgi?id=40490 + + * Api/qwebpluginfactory.cpp: + +2010-06-10 Andy Shaw + + Reviewed by Simon Hausmann. + + REGRESSION: [Qt] When dragging onto a page that handles the drag in Javascript it will be a move and not a copy by default + https://bugs.webkit.org/show_bug.cgi?id=40401 + + The correct pattern in Qt for Dnd events is to use acceptProposedAction() instead + of accept(). + + * Api/qwebpage.cpp: + (QWebPagePrivate::dragEnterEvent): + (QWebPagePrivate::dragMoveEvent): + (QWebPagePrivate::dropEvent): + 2010-06-02 Tasuku Suzuki Reviewed by Shinichiro Hamaji. diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc index 4f41d29..fa93293 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc +++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc @@ -7,25 +7,26 @@ \section2 The technology The QtWebKit bridge is a mechanism that extends WebKit's JavaScript environment to access native - objects that are represented as QObjects. It takes advantage of the inherent introspection of the - \l{Qt Object Model}, which has a natural alignment to the way JavaScript worked. + objects that are represented as \l{QObject}s. It takes advantage of the \l{QObject} introspection, + a part of the \l{Qt Object Model}, which makes it easy to integrate with the dynamic JavaScript environment, + for example \l{QObject} properties map directly to JavaScript properties. For example, both JavaScript and QObjects have properties: a construct that represent a getter/setter pair under one name. \section2 Use Cases - There are two main use cases for the QtWebKit bridge. Web content in a native application, and Thin Client. + There are two main use cases for the QtWebKit bridge. Web content in a native application, and Thin Clients. \section3 Web Content in a Native Application This is a common use case in classic Qt application, and a design pattern used by several modern - applications. For example, an application that contains both a media-player, playlist manager, and - a music store. The playlist manager is usually best authored as a classic desktop application, + applications. For example, an application that contains a media-player, playlist manager, and music store. + The playlist manager is usually best authored as a classic desktop application, with the native-looking robust \l{QWidget}s helping with producing that application. The media-player control, which usually looks custom, can be written using \l{The Graphics View framework} or with in a declarative way with \l{QtDeclarative}. The music store, which shows dynamic content - from the internet, and gets modified rapidly, is best authored in HTML and maintained on the server. + from the internet and gets modified rapidly, is best authored in HTML and maintained on the server. With the QtWebKit bridge, that music store component can interact with native parts of the application, for example, if a file needs to be saved to a specific location. @@ -38,7 +39,7 @@ access to native features not usually exposed to the web, or to enable helper components that are best written with C++. - An example for such client is a UI for a video-on-demand service on a TV. The entire content and + An example for such a client is a UI for a video-on-demand service on a TV. The entire content and UI can be kept on the server, served dynamically through HTTP and rendered with WebKit, with additional native components for accessing hardware-specific features like extracting the list of images out of the video. @@ -67,7 +68,7 @@ \section2 Creating the link via QWebFrame By default, no QObjects are accessible through the web environment, for security reasons. - To enable web content access to a native QObject, the application has to explicitly grant it access, + To enable web content access for a native QObject, the application must explicitly grant it access, using the following call: \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 0 @@ -76,13 +77,13 @@ \section2 Using Signals and Slots - Qt Script adapts Qt's central \l{Signals and Slots} feature for + The QtWebKit bridge adapts Qt's central \l{Signals and Slots} feature for scripting. There are three principal ways to use signals and slots - with Qt Script: + with the QtWebKit bridge: \list \i \bold{Hybrid C++/script}: C++ application code connects a - signal to a script function. The script function can, for example, be + signal to a script function. For example, the script function can be a function that the user has typed in, or one that you have read from a file. This approach is useful if you have a QObject but don't want to expose the object itself to the scripting environment; you just @@ -97,7 +98,7 @@ the connections is fully dynamic (script-defined). \i \bold{Purely script-defined}: A script can both define signal - handler functions (effectively "slots written in Qt Script"), + handler functions (effectively "slots written in JavaScript"), \e{and} set up the connections that utilize those handlers. For example, a script can define a function that will handle the QLineEdit::returnPressed() signal, and then connect that signal to the @@ -108,36 +109,36 @@ \section3 Signal to Function Connections - \c{connect(function)} + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 6 In this form of connection, the argument to \c{connect()} is the function to connect to the signal. - \snippet webkitsnippets/doc_src_qtscript.qdoc 2 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 7 - The argument can be a Qt Script function, as in the above + The argument can be a JavaScript function, as in the above example, or it can be a QObject slot, as in the following example: - \snippet webkitsnippets/doc_src_qtscript.qdoc 3 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 8 When the argument is a QObject slot, the argument types of the signal and slot do not necessarily have to be compatible; - the QtWebKit bridge will, if necessary, perform conversion of the signal + If necessary, the QtWebKit bridge will, perform conversion of the signal arguments to match the argument types of the slot. To disconnect from a signal, you invoke the signal's \c{disconnect()} function, passing the function to disconnect as argument: - \snippet webkitsnippets/doc_src_qtscript.qdoc 4 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 9 When a script function is invoked in response to a signal, the \c this object will be the Global Object. \section3 Signal to Member Function Connections - \c{connect(thisObject, function)} + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 10 In this form of the \c{connect()} function, the first argument is the object that will be bound to the variable, \c this, when @@ -148,31 +149,31 @@ \c{clicked} signal; passing the form as the \c this object makes sense in such a case. - \snippet webkitsnippets/doc_src_qtscript.qdoc 5 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 11 To disconnect from the signal, pass the same arguments to \c{disconnect()}: - \snippet webkitsnippets/doc_src_qtscript.qdoc 6 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 12 \section3 Signal to Named Member Function Connections - \c{connect(thisObject, functionName)} + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 14 - In this form of the \c{connect()} function, the first argument is - the object that will be bound to the variable, \c this, when - a function is invoked in response to the signal. The second argument - specifies the name of a function that is connected to the signal, - and this refers to a member function of the object passed as the - first argument (\c thisObject in the above scheme). + This form of the \c{connect()} function requires that the first argument is + the object that will be bound to the variable \c{this} when a function is + invoked in response to the signal. The second argument specifies the + name of a function that is connected to the signal, and this refers to a + member function of the object passed as the first argument (thisObject + in the above scheme). Note that the function is resolved when the connection is made, not when the signal is emitted. - \snippet webkitsnippets/doc_src_qtscript.qdoc 7 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 15 To disconnect from the signal, pass the same arguments to \c{disconnect()}: - \snippet webkitsnippets/doc_src_qtscript.qdoc 8 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 17 \section3 Error Handling @@ -181,14 +182,14 @@ You can obtain an error message from the resulting \c{Error} object. Example: - \snippet webkitsnippets/doc_src_qtscript.qdoc 9 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 18 \section3 Emitting Signals from Scripts To emit a signal from script code, you simply invoke the signal function, passing the relevant arguments: - \snippet webkitsnippets/doc_src_qtscript.qdoc 10 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 19 It is currently not possible to define a new signal in a script; i.e., all signals must be defined by C++ classes. @@ -201,13 +202,13 @@ \c{myOverloadedSlot(int)} and \c{myOverloadedSlot(QString)}, the following script code will behave reasonably: - \snippet webkitsnippets/doc_src_qtscript.qdoc 11 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 20 You can specify a particular overload by using array-style property access with the \l{QMetaObject::normalizedSignature()}{normalized signature} of the C++ function as the property name: - \snippet webkitsnippets/doc_src_qtscript.qdoc 12 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 21 If the overloads have different number of arguments, the QtWebKit bridge will pick the overload with the argument count that best matches the @@ -225,7 +226,7 @@ (it would be meaningless to return values from a slot, as the connected signals don't handle the returned data). To make a non-slot method invokable, simply add the Q_INVOKABLE macro before its definition: - \snippet webkitsnippets/doc_src_qtscript.qdoc 20 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 22 \section2 Accessing Properties @@ -235,11 +236,11 @@ property will automatically be invoked. For example, if your C++ class has a property declared as follows: - \snippet webkitsnippets/doc_src_qtscript.qdoc 13 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 23 then script code can do things like the following: - \snippet webkitsnippets/doc_src_qtscript.qdoc 14 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 24 \section2 Accessing Child QObjects @@ -250,12 +251,12 @@ \c{"okButton"}, you can access this object in script code through the expression - \snippet webkitsnippets/doc_src_qtscript.qdoc 15 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 25 Since \c{objectName} is itself a Q_PROPERTY, you can manipulate the name in script code to, for example, rename an object: - \snippet webkitsnippets/doc_src_qtscript.qdoc 16 + \snippet webkitsnippets/qtwebkit_bridge_snippets.cpp 26 \section2 Data types @@ -283,7 +284,7 @@ \section3 Strings When JavaScript accesses methods or properties that expect a \l{QString}, the QtWebKit bridge - will automatically convert the value to a string (if it's not already a string), using the + will automatically convert the value to a string (if it is not already a string), using the built-in JavaScript toString method. When a QString is passed to JavaScript from a signal or a property, The QtWebKit bridge will @@ -292,7 +293,7 @@ \section3 Date & Time Both \l{QDate}, \l{QTime} and \l{QDateTime} are automatically translated to or from the JavaScript - Date object. If a number is passed as an argument to a method that expects one of the date/time + Date object. If a number were passed as an argument to a method that expects one of the date/time types, the QtWebKit bridge would treat it as a timestamp. If a sting is passed, QtWebKit would try different Qt date parsing functions to find the right one. @@ -314,7 +315,7 @@ \section3 Compound (JSON) objects - JavaScript compound objects, also known as JSON objects, are variables which hold a list + JavaScript compound objects, also known as JSON objects, are variables that hold a list of key-value pairs, where all the keys are strings and the values can have any type. This translates very well to \l{QVariantMap}, which is nothing more than a \l{QMap} of \l{QString} to \l{QVariant}. @@ -334,7 +335,7 @@ a normal JSON object would become a \l{QVariantMap}, and a JavaScript array would become a \l{QVariantList}. Using \l{QVariant}s generously in C++ in that way makes C++ programming feel a bit more like JavaScript programming, - as it adds another level of indirection - passing \l{QVariant}s around is very flexible, as the program can figure out + as it adds another level of indirection. Passing \l{QVariant}s around like this q is very flexible, as the program can figure out the type of argument in runtime just like JavaScript would do, but it also takes away from the type-safety and robust nature of C++. It's recommended to use \l{QVariant}s only for convenience high-level functions, and to keep most of your \l{QObject}s somewhat type-safe. @@ -348,7 +349,7 @@ a \l{QObject}. In general its advised to use care when passing \l{QObject}s as arguments, as those objects don't become owned by - the Javascipt engine; That means that the application developer has to be extra careful not to try to access + the JavaScript engine; That means that the application developer has to be extra careful not to try to access \l{QObject}s that have already been deleted by the native environment. \section3 Pixmaps and Images @@ -401,25 +402,26 @@ \section2 Limiting the Scope of the Hybrid Layer - When using QtWebKit's hybrid features, it's a common pitfall to make the API exposed to JavaScript very rich and + When using QtWebKit's hybrid features, it is a common pitfall to make the API exposed to JavaScript very rich and use all its features. This, however, leads to complexity and can create bugs that are hard to trace. - Instead, it's advisable to keep the hybrid layer small and manageable: create a gate only when + Instead, it is advisable to keep the hybrid layer small and manageable: create a gate only when there's an actual need for it, i.e. there's a new native enabler that requires a direct interface to the application layer. Sometimes new functionality is better handled internally in the native layer or in the web layer; simplicity is your friend. This usually becomes more apparent when the hybrid layer can create or destroy objects, or uses - signals slots or properties with a \l{QObject}* argument. It's advised to be very careful and to treat + signals slots or properties with a \l{QObject}* argument. It is advised to be very careful and to treat an exposed \l{QObject} as a system - with careful attention to memory management and object ownership. \section2 Internet Security - When exposing native object to an open web environment, it's important to understand the security + When exposing native object to an open web environment, it is importwhichant to understand the security implications. Think whether the exposed object enables the web environment access to things that shouldn't be open, and whether the web content loaded by that web page comes from a trusted. In general, when exposing native QObjects that give the web environment access to private information or to functionality that's potentially harmful to the client, such exposure should be balanced by limiting the web page's - access to trusted URLs only with HTTPS and other security measures. + access to trusted URLs only with HTTPS, and by utilizing other measures as part of a security strategy. + */ diff --git a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp index d83ab3f..62eeeca 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp +++ b/src/3rdparty/webkit/WebKit/qt/docs/webkitsnippets/qtwebkit_bridge_snippets.cpp @@ -2,82 +2,176 @@ void wrapInFunction() { -//! [0] + //! [0] // ... QWebFrame *frame = myWebPage->mainFrame(); frame->addToJavaScriptWindowObject("someNameForMyObject", myObject); // ... -//! [0] + //! [0] #if 0 //! [1] - { - width: ..., - height: ..., - toDataURL: function() { ... }, - assignToHTMLImageElement: function(element) { ... } - } - //! [1] + { + width: ..., + height: ..., + toDataURL: function() { ... }, + assignToHTMLImageElement: function(element) { ... } + } + //! [1] #endif //! [2] - class MyObject : QObject { - Q_OBJECT - Q_PROPERTY(QPixmap myPixmap READ getPixmap) + class MyObject : QObject { + Q_OBJECT + Q_PROPERTY(QPixmap myPixmap READ getPixmap) - public: - QPixmap getPixmap() const; - }; + public: + QPixmap getPixmap() const; + }; - /* ... */ + /* ... */ - MyObject myObject; - myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject); + MyObject myObject; + myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject); //! [2] - #if 0 - //! [3] - - - - - - - - +#if 0 //! [3] - #endif - //! [4] - class MyObject : QObject { - Q_OBJECT + + + + + + + + + //! [3] +#endif + //! [4] + class MyObject : QObject { + Q_OBJECT - public slots: - void doSomethingWithWebElement(const QWebElement&); - }; + public slots: + void doSomethingWithWebElement(const QWebElement&); + }; - /* ... */ + /* ... */ - MyObject myObject; - myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject); + MyObject myObject; + myWebPage.mainFrame()->addToJavaScriptWindowObject("myObject", &myObject); - //! [4] - #if 0 - //! [5] - + //! [4] +#if 0 + //! [5] + - + - Text + Text - - //! [5] - #endif + + //! [5] + //! [6] + connect(function); + //! [6] + //! [7] + function myInterestingScriptFunction() { ... } + ... + myQObject.somethingChanged.connect(myInterestingScriptFunction); + //! [7] + //! [8] + myQObject.somethingChanged.connect(myOtherQObject.doSomething); + //! [8] + //! [9] + myQObject.somethingChanged.disconnect(myInterestingFunction); + myQObject.somethingChanged.disconnect(myOtherQObject.doSomething); + //! [9] + //! [10] + connect(thisObject, function) + //! [10] + //! [11] + var obj = { x: 123 }; + var fun = function() { print(this.x); }; + myQObject.somethingChanged.connect(obj, fun); + //! [11] + //! [12] + myQObject.somethingChanged.disconnect(obj, fun); + //! [12] + //! [13] + connect(function); + //! [13] + //! [14] + connect(thisObject, functionName) + //! [14] + //! [15] + var obj = { x: 123, fun: function() { print(this.x); } }; + myQObject.somethingChanged.connect(obj, "fun"); + //! [15] + //! [16] + connect(function); + //! [16] + //! [17] + myQObject.somethingChanged.disconnect(obj, "fun"); + //! [17] + //! [18] + try { + myQObject.somethingChanged.connect(myQObject, "slotThatDoesntExist"); + } catch (e) { + print(e); + } + //! [18] + //! [19] + myQObject.somethingChanged("hello"); + //! [19] + //! [20] + myQObject.myOverloadedSlot(10); // will call the int overload + myQObject.myOverloadedSlot("10"); // will call the QString overload + //! [20] + //! [21] + myQObject['myOverloadedSlot(int)']("10"); // call int overload; the argument is converted to an int + myQObject['myOverloadedSlot(QString)'](10); // call QString overload; the argument is converted to a string + //! [21] + //! [22] + class MyObject : public QObject + { + Q_OBJECT + + public: + Q_INVOKABLE void thisMethodIsInvokableInQtScript(); + void thisMethodIsNotInvokableInQtScript(); + + ... + }; + //! [22] + //! [23] + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled) + //! [23] + //! [24] + myQObject.enabled = true; + + ... + + myQObject.enabled = !myQObject.enabled; + //! [24] + //! [25] + myQObject.enabled = true; + + ... + + myQObject.enabled = !myQObject.enabled; + //! [25] + //! [26] + myDialog.okButton + myDialog.okButton.objectName = "cancelButton"; + // from now on, myDialog.cancelButton references the button + //! [26] +#endif } diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 27f4b27..0f2ca22 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -122,6 +122,7 @@ private slots: void testJSPrompt(); void showModalDialog(); void testStopScheduledPageRefresh(); + void findText(); private: QWebView* m_view; @@ -2121,5 +2122,21 @@ void tst_QWebPage::testStopScheduledPageRefresh() QCOMPARE(page2.mainFrame()->url().toString(), QString("about:blank")); } +void tst_QWebPage::findText() +{ + m_view->setHtml(QString("

    foo bar
    ")); + m_page->triggerAction(QWebPage::SelectAll); + QVERIFY(!m_page->selectedText().isEmpty()); + m_page->findText(""); + QVERIFY(m_page->selectedText().isEmpty()); + QStringList words = (QStringList() << "foo" << "bar"); + foreach (QString subString, words) { + m_page->findText(subString, QWebPage::FindWrapsAroundDocument); + QCOMPARE(m_page->selectedText(), subString); + m_page->findText(""); + QVERIFY(m_page->selectedText().isEmpty()); + } +} + QTEST_MAIN(tst_QWebPage) #include "tst_qwebpage.moc" -- cgit v0.12 From 104fac002e228fb17304ec76d57febe33f8e8e7f Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 14 Jun 2010 12:45:10 +0200 Subject: Add QTextOption API to QStaticText To allow more control over the layout process for a QStaticText, introduce a QTextOption API. This will allow you to, e.g., set an alignment for the text layout. Patch also contains a couple of bug fixes to make right alignment work correctly when you set a text width on the QStaticText. Task-number: QTBUG-9031 Reviewed-by: Samuel --- src/gui/text/qstatictext.cpp | 34 ++++++++++++++++++++++++++++++---- src/gui/text/qstatictext.h | 5 ++++- src/gui/text/qstatictext_p.h | 6 +++++- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index 10870aa..c742455 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -324,6 +324,26 @@ QStaticText::PerformanceHint QStaticText::performanceHint() const } /*! + Sets the text option structure that controls the layout process to the given \a textOption. + + \sa textOption() +*/ +void QStaticText::setTextOption(const QTextOption &textOption) +{ + detach(); + data->textOption = textOption; + data->invalidate(); +} + +/*! + Returns the current text option used to control the layout process. +*/ +QTextOption QStaticText::textOption() const +{ + return data->textOption; +} + +/*! Sets the preferred width for this QStaticText. If the text is wider than the specified width, it will be broken into multiple lines and grow vertically. If the text cannot be split into multiple lines, it will be larger than the specified \a textWidth. @@ -580,6 +600,7 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p) QTextLayout textLayout; textLayout.setText(text); textLayout.setFont(font); + textLayout.setTextOption(textOption); qreal leading = QFontMetricsF(font).leading(); qreal height = -leading; @@ -610,21 +631,26 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p) .arg(QString::number(color.blue(), 16), 2, QLatin1Char('0'))); #endif document.setDefaultFont(font); - document.setDocumentMargin(0.0); - if (textWidth >= 0.0) - document.setTextWidth(textWidth); + document.setDocumentMargin(0.0); #ifndef QT_NO_TEXTHTMLPARSER document.setHtml(text); #else document.setPlainText(text); #endif + if (textWidth >= 0.0) + document.setTextWidth(textWidth); + else + document.adjustSize(); + document.setDefaultTextOption(textOption); - document.adjustSize(); p->save(); p->translate(topLeftPosition); document.drawContents(p); p->restore(); + if (textWidth >= 0.0) + document.adjustSize(); // Find optimal size + actualSize = document.size(); } } diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h index f3bef93..4febde2 100644 --- a/src/gui/text/qstatictext.h +++ b/src/gui/text/qstatictext.h @@ -48,7 +48,7 @@ #include #include - +#include QT_BEGIN_HEADER @@ -79,6 +79,9 @@ public: void setTextWidth(qreal textWidth); qreal textWidth() const; + void setTextOption(const QTextOption &textOption); + QTextOption textOption() const; + QSizeF size() const; void prepare(const QTransform &matrix = QTransform(), const QFont &font = QFont()); diff --git a/src/gui/text/qstatictext_p.h b/src/gui/text/qstatictext_p.h index 1a96291..cb60626 100644 --- a/src/gui/text/qstatictext_p.h +++ b/src/gui/text/qstatictext_p.h @@ -53,6 +53,8 @@ // We mean it. // +#include "qstatictext.h" + #include #include @@ -148,12 +150,14 @@ public: QFixedPoint *positionPool; // 4 bytes per text QChar *charPool; // 4 bytes per text + QTextOption textOption; // 28 bytes per text + unsigned char needsRelayout : 1; // 1 byte per text unsigned char useBackendOptimizations : 1; unsigned char textFormat : 2; unsigned char untransformedCoordinates : 1; // ================ - // 167 bytes per text + // 195 bytes per text static QStaticTextPrivate *get(const QStaticText *q); }; -- cgit v0.12 From a75945a402eb2bee7bfa633f3cced735601ad727 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 14 Jun 2010 13:44:43 +0300 Subject: Added prependEpocroot replacement function to platform_paths.prf This function can be used to do smart prepending of epocroot to paths defined by platform_paths.prf, though it'll work for any string. This is useful because paths defined in platform_paths.prf can start either with full epocroot or just slash depending on environment. E.g. exists($$prependEpocroot($$MW_LAYER_PUBLIC_EXPORT_PATH(foobar.h))) { ... } Reviewed-by: Janne Koskinen --- mkspecs/features/symbian/platform_paths.prf | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/symbian/platform_paths.prf b/mkspecs/features/symbian/platform_paths.prf index 0e8770d..5c190c8 100644 --- a/mkspecs/features/symbian/platform_paths.prf +++ b/mkspecs/features/symbian/platform_paths.prf @@ -45,8 +45,17 @@ # INCLUDEPATH += $$OS_LAYER_DBUS_SYSTEMINCLUDE # INCLUDEPATH += $$OS_LAYER_LIBUTILITY_SYSTEMINCLUDE # +# These paths are primarily meant to be used as is in bld.inf and .mmp +# files, so they do not contain epocroot when using official symbian +# toolchains (symbian-abld or symbian-sbsv2). +# For makefile based mkspecs, epocroot is prepended to all paths for +# convenience. # -# +# To use paths defined here in other contexts that require epocroot to be +# prepended always, such as exists checks, please use prependEpocroot +# replacement function: +# +# exists($$prependEpocroot($$MW_LAYER_PUBLIC_EXPORT_PATH(foobar.h))) # # ============================================================================== @@ -472,4 +481,13 @@ exists($${EPOCROOT}epoc32/include/platform_paths.prf) { STLLIB_USAGE_CW_FLAGS = "-wchar_t on" STLLIB_USAGE_DEFINES = _WCHAR_T_DECLARED + # Smart prepend of EPOCROOT to a string + defineReplace(prependEpocroot) { + contains(1, ^$${EPOCROOT}) { + return($$1) + } else { + return($${EPOCROOT}$$replace(1,"^/",)) + } + } + } -- cgit v0.12 From 44af23156fac578543e6d17c67d739e75e51c972 Mon Sep 17 00:00:00 2001 From: Carolina Gomes Date: Mon, 14 Jun 2010 13:23:48 +0200 Subject: Fixed error reporting in grayraster and reduced default pool size. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-10471 Merge-request: 642 Reviewed-by: Samuel Rødal --- src/gui/painting/qgrayraster.c | 35 +++++++++++++++++++------------- src/gui/painting/qgrayraster_p.h | 4 ++++ src/gui/painting/qpaintengine_raster.cpp | 12 +++++++---- src/gui/painting/qrasterdefs_p.h | 6 ++---- 4 files changed, 35 insertions(+), 22 deletions(-) diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c index ff2469c..5e7c67a 100644 --- a/src/gui/painting/qgrayraster.c +++ b/src/gui/painting/qgrayraster.c @@ -156,6 +156,7 @@ #define ErrRaster_Invalid_Outline -1 #define ErrRaster_Invalid_Argument -3 #define ErrRaster_Memory_Overflow -4 +#define ErrRaster_OutOfMemory -6 #define QT_FT_BEGIN_HEADER #define QT_FT_END_HEADER @@ -222,7 +223,6 @@ #define DOWNSCALE( x ) ( (x) << ( 6 - PIXEL_BITS ) ) #endif - /*************************************************************************/ /* */ /* TYPE DEFINITIONS */ @@ -1757,8 +1757,7 @@ #ifdef DEBUG_GRAYS fprintf( stderr, "Rotten glyph!\n" ); #endif - /* == Raster_Err_OutOfMemory in qblackraster.c */ - return -6; + return ErrRaster_OutOfMemory; } if ( bottom-top >= ras.band_size ) @@ -1784,7 +1783,7 @@ static int - gray_raster_render( PRaster raster, + gray_raster_render( QT_FT_Raster raster, const QT_FT_Raster_Params* params ) { const QT_FT_Outline* outline = (const QT_FT_Outline*)params->source; @@ -1795,6 +1794,12 @@ if ( !raster || !raster->buffer || !raster->buffer_size ) return ErrRaster_Invalid_Argument; + // If raster object and raster buffer are allocated, but + // raster size isn't of the minimum size, indicate out of + // memory. + if (raster && raster->buffer && raster->buffer_size < MINIMUM_POOL_SIZE ) + return ErrRaster_OutOfMemory; + /* return immediately if the outline is empty */ if ( outline->n_points == 0 || outline->n_contours <= 0 ) return 0; @@ -1874,19 +1879,15 @@ /**** a static object. *****/ static int - gray_raster_new( void * memory, - QT_FT_Raster* araster ) + gray_raster_new( QT_FT_Raster* araster ) { - if (memory) - fprintf(stderr, "gray_raster_new(), memory ignored"); - memory = malloc(sizeof(TRaster)); - if (!memory) { + *araster = malloc(sizeof(TRaster)); + if (!*araster) { *araster = 0; return ErrRaster_Memory_Overflow; } - QT_FT_MEM_ZERO(memory, sizeof(TRaster)); + QT_FT_MEM_ZERO(*araster, sizeof(TRaster)); - *araster = (QT_FT_Raster) memory; return 0; } @@ -1905,10 +1906,9 @@ { PRaster rast = (PRaster)raster; - if ( raster ) { - if ( pool_base && pool_size >= (long)sizeof ( TWorker ) + 2048 ) + if ( pool_base && ( pool_size >= MINIMUM_POOL_SIZE ) ) { PWorker worker = (PWorker)pool_base; @@ -1923,6 +1923,13 @@ rast->band_size = (int)( rast->buffer_size / ( sizeof ( TCell ) * 8 ) ); } + else if ( pool_base) + { // Case when there is a raster pool allocated, but it + // doesn't have the minimum size (and so memory will be reallocated) + rast->buffer = pool_base; + rast->worker = NULL; + rast->buffer_size = pool_size; + } else { rast->buffer = NULL; diff --git a/src/gui/painting/qgrayraster_p.h b/src/gui/painting/qgrayraster_p.h index 4463fc9..ad595b8 100644 --- a/src/gui/painting/qgrayraster_p.h +++ b/src/gui/painting/qgrayraster_p.h @@ -89,6 +89,10 @@ #define QT_FT_EXPORT_VAR( x ) extern x #endif +/* Minimum buffer size for raster object, that accounts + for TWorker and TCell sizes.*/ +#define MINIMUM_POOL_SIZE 4096 + QT_FT_EXPORT_VAR( const QT_FT_Raster_Funcs ) qt_ft_grays_raster; diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 08e14fb..9f1128b 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -345,7 +345,7 @@ void QRasterPaintEngine::init() // The antialiasing raster. d->grayRaster.reset(new QT_FT_Raster); Q_CHECK_PTR(d->grayRaster.data()); - if (qt_ft_grays_raster.raster_new(0, d->grayRaster.data())) + if (qt_ft_grays_raster.raster_new(d->grayRaster.data())) QT_THROW(std::bad_alloc()); // an error creating the raster is caused by a bad malloc @@ -4185,7 +4185,11 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline, return; } - const int rasterPoolInitialSize = 8192; + // Initial size for raster pool is MINIMUM_POOL_SIZE so as to + // minimize memory reallocations. However if initial size for + // raster pool is changed for lower value, reallocations will + // occur normally. + const int rasterPoolInitialSize = MINIMUM_POOL_SIZE; int rasterPoolSize = rasterPoolInitialSize; unsigned char *rasterPoolBase; #if defined(Q_WS_WIN64) @@ -4229,7 +4233,7 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline, error = qt_ft_grays_raster.raster_render(*grayRaster.data(), &rasterParams); // Out of memory, reallocate some more and try again... - if (error == -6) { // -6 is Result_err_OutOfMemory + if (error == -6) { // ErrRaster_OutOfMemory from qgrayraster.c int new_size = rasterPoolSize * 2; if (new_size > 1024 * 1024) { qWarning("QPainter: Rasterization of primitive failed"); @@ -4255,7 +4259,7 @@ void QRasterPaintEnginePrivate::rasterize(QT_FT_Outline *outline, Q_CHECK_PTR(rasterPoolBase); // note: we just freed the old rasterPoolBase. I hope it's not fatal. qt_ft_grays_raster.raster_done(*grayRaster.data()); - qt_ft_grays_raster.raster_new(0, grayRaster.data()); + qt_ft_grays_raster.raster_new(grayRaster.data()); qt_ft_grays_raster.raster_reset(*grayRaster.data(), rasterPoolBase, rasterPoolSize); } else { done = true; diff --git a/src/gui/painting/qrasterdefs_p.h b/src/gui/painting/qrasterdefs_p.h index c33fa57..19a0b16 100644 --- a/src/gui/painting/qrasterdefs_p.h +++ b/src/gui/painting/qrasterdefs_p.h @@ -81,7 +81,6 @@ QT_FT_BEGIN_HEADER - /*************************************************************************/ /* */ /*
    */ @@ -837,7 +836,7 @@ QT_FT_BEGIN_HEADER /* A handle (pointer) to a raster object. Each object can be used */ /* independently to convert an outline into a bitmap or pixmap. */ /* */ - typedef struct QT_FT_RasterRec_* QT_FT_Raster; + typedef struct TRaster_ *QT_FT_Raster; /*************************************************************************/ @@ -1118,8 +1117,7 @@ QT_FT_BEGIN_HEADER /* ignored by a given raster implementation. */ /* */ typedef int - (*QT_FT_Raster_NewFunc)( void* memory, - QT_FT_Raster* raster ); + (*QT_FT_Raster_NewFunc)( QT_FT_Raster* raster ); #define QT_FT_Raster_New_Func QT_FT_Raster_NewFunc -- cgit v0.12 From 78e74249014b152b93dae07bf194b16769016ad0 Mon Sep 17 00:00:00 2001 From: David Fries Date: Mon, 14 Jun 2010 13:57:46 +0200 Subject: fix detection of header files Disable the include generation iff a dot which is not followed by [hH] is found after the last path separator. This implies that dots in directory names are now ignored, and that files without an extension are always considered headers (e.g., STL headers and Qt forwarding headers). Task-number: QTBUG-11369 Merge-request: 686 Reviewed-by: Oswald Buddenhagen --- src/tools/moc/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp index ebe1834..4997690 100644 --- a/src/tools/moc/main.cpp +++ b/src/tools/moc/main.cpp @@ -359,11 +359,10 @@ int runMoc(int _argc, char **_argv) if (autoInclude) { + int spos = filename.lastIndexOf(QDir::separator().toLatin1()); int ppos = filename.lastIndexOf('.'); - moc.noInclude = (ppos >= 0 - && tolower(filename[ppos + 1]) != 'h' - && tolower(filename[ppos + 1]) != QDir::separator().toLatin1() - ); + // spos >= -1 && ppos > spos => ppos >= 0 + moc.noInclude = (ppos > spos && tolower(filename[ppos + 1]) != 'h'); } if (moc.includeFiles.isEmpty()) { if (moc.includePath.isEmpty()) { -- cgit v0.12 From 249442f44ac5ffabc91276307f8ae7a749f74eb1 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 14 Jun 2010 14:45:01 +0200 Subject: Fix issues with thai line breaking Merge latest harfbuzz: commit cce760d41f115fecd5b9b6b20b62883b10a9c204 Author: Lars Knoll Date: Mon Jun 14 14:14:59 2010 +0200 Fixes for thai linebreaking * Load libthai.so.0 since libthai.so is not there on all systems * Remove dependency on codecs. Unicode->TIS620 is so simple we can simply hardcode it in harbuzz-thai.c * Speed up detection of word boundaries * Falback when libthai is not found is now to not break instead of breaking after every character (in line with recommendations from unicode.org linebreaking algorithm) Reviewed-by: Simon Hausmann Adapt qharfbuzz.cpp to the changes in harfbuzz. Reviewed-by: Simon Hausmann --- src/3rdparty/harfbuzz/src/harfbuzz-external.h | 6 +- src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp | 13 ++--- src/3rdparty/harfbuzz/src/harfbuzz-thai.c | 64 +++++++++++++++------- .../harfbuzz/tests/linebreaking/harfbuzz-qt.cpp | 25 +-------- src/corelib/tools/qharfbuzz.cpp | 34 +----------- 5 files changed, 53 insertions(+), 89 deletions(-) diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-external.h b/src/3rdparty/harfbuzz/src/harfbuzz-external.h index 760749b..7644f0d 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-external.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-external.h @@ -146,11 +146,7 @@ HB_CharCategory HB_GetUnicodeCharCategory(HB_UChar32 ch); int HB_GetUnicodeCharCombiningClass(HB_UChar32 ch); HB_UChar16 HB_GetMirroredChar(HB_UChar16 ch); -void *HB_Library_Resolve(const char *library, const char *symbol); - -void *HB_TextCodecForMib(int mib); -char *HB_TextCodec_ConvertFromUnicode(void *codec, const HB_UChar16 *unicode, hb_uint32 length, hb_uint32 *outputLength); -void HB_TextCodec_FreeResult(char *); +void *HB_Library_Resolve(const char *library, int version, const char *symbol); HB_END_HEADER diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp index bfc7bd4..ff69304 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp @@ -183,18 +183,15 @@ static void calcLineBreaks(const HB_UChar16 *uc, hb_uint32 len, HB_CharAttribute if (ncls >= HB_LineBreak_CR) goto next; - // two complex chars (thai or lao), thai_attributes might override, but here we do a best guess - if (cls == HB_LineBreak_SA && ncls == HB_LineBreak_SA) { - lineBreakType = HB_Break; - goto next; - } - { int tcls = ncls; + // for south east asian chars that require a complex (dictionary analysis), the unicode + // standard recommends to treat them as AL. thai_attributes and other attribute methods that + // do dictionary analysis can override if (tcls >= HB_LineBreak_SA) - tcls = HB_LineBreak_ID; + tcls = HB_LineBreak_AL; if (cls >= HB_LineBreak_SA) - cls = HB_LineBreak_ID; + cls = HB_LineBreak_AL; int brk = breakTable[cls][tcls]; switch (brk) { diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c index 1d1aa2f..fc2bdbf 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c @@ -27,57 +27,79 @@ #include "harfbuzz-external.h" #include +#include + +typedef int (*th_brk_def)(const char*, int[], int); +static th_brk_def th_brk = 0; +static int libthai_resolved = 0; + +static void resolve_libthai() +{ + if (!th_brk) + th_brk = (th_brk_def)HB_Library_Resolve("thai", 0, "th_brk"); + libthai_resolved = 1; +} + +static void to_tis620(const HB_UChar16 *string, hb_uint32 len, const char *cstr) +{ + hb_uint32 i; + unsigned char *result = (unsigned char *)cstr; + + for (i = 0; i < len; ++i) { + if (string[i] <= 0xa0) + result[i] = (unsigned char)string[i]; + if (string[i] >= 0xe01 && string[i] <= 0xe5b) + result[i] = (unsigned char)(string[i] - 0xe00 + 0xa0); + else + result[i] = '?'; + } +} static void thaiWordBreaks(const HB_UChar16 *string, hb_uint32 len, HB_CharAttributes *attributes) { - typedef int (*th_brk_def)(const char*, int[], int); - static void *thaiCodec = 0; - static th_brk_def th_brk = 0; - char *cstr = 0; + char s[128]; + char *cstr = s; int brp[128]; int *break_positions = brp; hb_uint32 numbreaks; hb_uint32 i; - if (!thaiCodec) - thaiCodec = HB_TextCodecForMib(2259); - - /* load libthai dynamically */ - if (!th_brk && thaiCodec) { - th_brk = (th_brk_def)HB_Library_Resolve("thai", "th_brk"); - if (!th_brk) - thaiCodec = 0; - } + if (!libthai_resolved) + resolve_libthai(); if (!th_brk) return; - cstr = HB_TextCodec_ConvertFromUnicode(thaiCodec, string, len, 0); - if (!cstr) - return; + if (len > 128) + cstr = (char *)malloc(len*sizeof(char)); + + to_tis620(string, len, cstr); - break_positions = brp; numbreaks = th_brk(cstr, break_positions, 128); if (numbreaks > 128) { break_positions = (int *)malloc(numbreaks * sizeof(int)); numbreaks = th_brk(cstr, break_positions, numbreaks); } - for (i = 0; i < len; ++i) + for (i = 0; i < len; ++i) { attributes[i].lineBreakType = HB_NoBreak; + attributes[i].wordBoundary = FALSE; + } for (i = 0; i < numbreaks; ++i) { - if (break_positions[i] > 0) + if (break_positions[i] > 0) { attributes[break_positions[i]-1].lineBreakType = HB_Break; + attributes[i].wordBoundary = TRUE; + } } if (break_positions != brp) free(break_positions); - HB_TextCodec_FreeResult(cstr); + if (len > 128) + free(cstr); } - void HB_ThaiAttributes(HB_Script script, const HB_UChar16 *text, hb_uint32 from, hb_uint32 len, HB_CharAttributes *attributes) { assert(script == HB_Script_Thai); diff --git a/src/3rdparty/harfbuzz/tests/linebreaking/harfbuzz-qt.cpp b/src/3rdparty/harfbuzz/tests/linebreaking/harfbuzz-qt.cpp index ea03052..f0048b7 100644 --- a/src/3rdparty/harfbuzz/tests/linebreaking/harfbuzz-qt.cpp +++ b/src/3rdparty/harfbuzz/tests/linebreaking/harfbuzz-qt.cpp @@ -79,30 +79,9 @@ void HB_GetGraphemeAndLineBreakClass(HB_UChar32 ch, HB_GraphemeClass *grapheme, *lineBreak = (HB_LineBreakClass) prop->line_break_class; } -void *HB_Library_Resolve(const char *library, const char *symbol) +void *HB_Library_Resolve(const char *library, int version, const char *symbol) { - return QLibrary::resolve(library, symbol); -} - -void *HB_TextCodecForMib(int mib) -{ - return QTextCodec::codecForMib(mib); -} - -char *HB_TextCodec_ConvertFromUnicode(void *codec, const HB_UChar16 *unicode, hb_uint32 length, hb_uint32 *outputLength) -{ - QByteArray data = reinterpret_cast(codec)->fromUnicode((const QChar *)unicode, length); - // ### suboptimal - char *output = (char *)malloc(data.length() + 1); - memcpy(output, data.constData(), data.length() + 1); - if (outputLength) - *outputLength = data.length(); - return output; -} - -void HB_TextCodec_FreeResult(char *string) -{ - free(string); + return QLibrary::resolve(library, version, symbol); } } diff --git a/src/corelib/tools/qharfbuzz.cpp b/src/corelib/tools/qharfbuzz.cpp index 1b6d334..9166a14 100644 --- a/src/corelib/tools/qharfbuzz.cpp +++ b/src/corelib/tools/qharfbuzz.cpp @@ -102,45 +102,15 @@ HB_UChar16 HB_GetMirroredChar(HB_UChar16 ch) return QChar::mirroredChar(ch); } -void *HB_Library_Resolve(const char *library, const char *symbol) +void *HB_Library_Resolve(const char *library, int version, const char *symbol) { #ifdef QT_NO_LIBRARY return 0; #else - return QLibrary::resolve(QLatin1String(library), symbol); + return QLibrary::resolve(QLatin1String(library), version, symbol); #endif } -void *HB_TextCodecForMib(int mib) -{ -#ifndef QT_NO_TEXTCODEC - return QTextCodec::codecForMib(mib); -#else - return 0; -#endif -} - -char *HB_TextCodec_ConvertFromUnicode(void *codec, const HB_UChar16 *unicode, hb_uint32 length, hb_uint32 *outputLength) -{ -#ifndef QT_NO_TEXTCODEC - QByteArray data = reinterpret_cast(codec)->fromUnicode((const QChar *)unicode, length); - // ### suboptimal - char *output = (char *)malloc(data.length() + 1); - Q_CHECK_PTR(output); - memcpy(output, data.constData(), data.length() + 1); - if (outputLength) - *outputLength = data.length(); - return output; -#else - return 0; -#endif -} - -void HB_TextCodec_FreeResult(char *string) -{ - free(string); -} - } // extern "C" QT_BEGIN_NAMESPACE -- cgit v0.12 From ea8817a59e92e40927ae4cecd301771eb115fb6f Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Mon, 14 Jun 2010 14:19:56 +0200 Subject: QSslSocket: fix build for MinGW and VS 2005 Reviewed-by: Zeno Albisser --- src/network/ssl/qsslsocket_p.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/network/ssl/qsslsocket_p.h b/src/network/ssl/qsslsocket_p.h index cf1786c..42ae98f 100644 --- a/src/network/ssl/qsslsocket_p.h +++ b/src/network/ssl/qsslsocket_p.h @@ -73,6 +73,10 @@ QT_BEGIN_NAMESPACE typedef OSStatus (*PtrSecTrustSettingsCopyCertificates)(int, CFArrayRef*); typedef OSStatus (*PtrSecTrustCopyAnchorCertificates)(CFArrayRef*); #elif defined(Q_OS_WIN) +#include +#ifndef HCRYPTPROV_LEGACY +#define HCRYPTPROV_LEGACY HCRYPTPROV +#endif typedef HCERTSTORE (WINAPI *PtrCertOpenSystemStoreW)(HCRYPTPROV_LEGACY, LPCWSTR); typedef PCCERT_CONTEXT (WINAPI *PtrCertFindCertificateInStore)(HCERTSTORE, DWORD, DWORD, DWORD, const void*, PCCERT_CONTEXT); typedef BOOL (WINAPI *PtrCertCloseStore)(HCERTSTORE, DWORD); -- cgit v0.12 From b00cd9859d8b666b851953ee3b37def0ab078a54 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Tue, 8 Dec 2009 19:15:58 +0100 Subject: QXmlSchema: allow usage of xsd:all previously, loading schemas that contained xsd:all elements was not possible because the algorithm used did not scale in that case. This patch introduces a special checking for those elements which removes the performance downside. Reviewed-by: Tobias Koenig Task-number: QTBUG-6485 --- src/xmlpatterns/schema/qxsdparticlechecker.cpp | 30 ++++++++++++++++++++++++++ src/xmlpatterns/schema/qxsdparticlechecker_p.h | 7 ++++++ 2 files changed, 37 insertions(+) diff --git a/src/xmlpatterns/schema/qxsdparticlechecker.cpp b/src/xmlpatterns/schema/qxsdparticlechecker.cpp index ef1d135..15c2afe 100644 --- a/src/xmlpatterns/schema/qxsdparticlechecker.cpp +++ b/src/xmlpatterns/schema/qxsdparticlechecker.cpp @@ -344,6 +344,19 @@ bool XsdParticleChecker::hasDuplicatedElements(const XsdParticle::Ptr &particle, bool XsdParticleChecker::isUPAConform(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool) { + + /** + * In case we encounter an element, don't construct a state machine, but use the approach + * described at http://www.w3.org/TR/xmlschema-1/#non-ambig + * Reason: For n elements inside the , represented in the NDA, the state machine + * constructs n! states in the DFA, which does not scale. + */ + if (particle->term()->isModelGroup()) { + const XsdModelGroup::Ptr group(particle->term()); + if (group->compositor() == XsdModelGroup::AllCompositor) + return isUPAConformXsdAll(particle, namePool); + } + /** * The algorithm is implemented like described in http://www.ltg.ed.ac.uk/~ht/XML_Europe_2003.html#S2.2 */ @@ -414,6 +427,23 @@ bool XsdParticleChecker::isUPAConform(const XsdParticle::Ptr &particle, const Na return true; } +bool XsdParticleChecker::isUPAConformXsdAll(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool) +{ + /** + * see http://www.w3.org/TR/xmlschema-1/#non-ambig + */ + const XsdModelGroup::Ptr group(particle->term()); + const XsdParticle::List particles = group->particles(); + const int count = particles.count(); + for (int left = 0; left < count; ++left) { + for (int right = left+1; right < count; ++right) { + if (termMatches(particles.at(left)->term(), particles.at(right)->term(), namePool)) + return false; + } + } + return true; +} + bool XsdParticleChecker::subsumes(const XsdParticle::Ptr &particle, const XsdParticle::Ptr &derivedParticle, const XsdSchemaContext::Ptr &context, QString &errorMsg) { /** diff --git a/src/xmlpatterns/schema/qxsdparticlechecker_p.h b/src/xmlpatterns/schema/qxsdparticlechecker_p.h index 742f0d0..40c525a 100644 --- a/src/xmlpatterns/schema/qxsdparticlechecker_p.h +++ b/src/xmlpatterns/schema/qxsdparticlechecker_p.h @@ -85,6 +85,13 @@ namespace QPatternist static bool isUPAConform(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool); /** + * Checks whether the given @p particle, which must be an xsd:all element, + * is valid according the UPA (http://www.w3.org/TR/xmlschema-1/#cos-nonambig) constraint. + * For xsd:all elements, we do not want to construct a state machine. + */ + static bool isUPAConformXsdAll(const XsdParticle::Ptr &particle, const NamePool::Ptr &namePool); + + /** * Checks whether the given @p particle subsumes the given @p derivedParticle. * (http://www.w3.org/TR/xmlschema-1/#cos-particle-restrict) */ -- cgit v0.12 From fd96a8180a5ccfeaea5b081c42137d18d640c25e Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 14 Jun 2010 19:15:21 +0200 Subject: QLocalSocket/Win: call close on async connection loss If we notice a broken pipe via _q_notified, we should call close in case the internal read buffer is empty. Auto test added: tst_QLocalSocket::asyncDisconnectNotify Reviewed-by: ossi --- src/network/socket/qlocalsocket_win.cpp | 2 ++ tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 21 ++++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index 2223ebe..01cbd4b 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -485,6 +485,8 @@ void QLocalSocketPrivate::_q_notified() if (!completeAsyncRead()) { pipeClosed = true; emit q->readChannelFinished(); + if (actualReadBufferSize == 0) + QTimer::singleShot(0, q, SLOT(_q_pipeClosed())); return; } startAsyncRead(); diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index d2cba6e..1acd669 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -115,7 +115,7 @@ private slots: void writeToClientAndDisconnect(); void debug(); void bytesWrittenSignal(); - + void asyncDisconnectNotify(); #ifdef Q_OS_SYMBIAN private: @@ -1061,6 +1061,25 @@ void tst_QLocalSocket::bytesWrittenSignal() QVERIFY(writeThread.wait(2000)); } + +void tst_QLocalSocket::asyncDisconnectNotify() +{ +#ifdef Q_OS_SYMBIAN + unlink("asyncDisconnectNotify"); +#endif + + QLocalServer server; + QVERIFY(server.listen("asyncDisconnectNotify")); + QLocalSocket client; + QSignalSpy disconnectedSpy(&client, SIGNAL(disconnected())); + client.connectToServer("asyncDisconnectNotify"); + QVERIFY(server.waitForNewConnection()); + QLocalSocket* serverSocket = server.nextPendingConnection(); + QVERIFY(serverSocket); + delete serverSocket; + QTRY_VERIFY(!disconnectedSpy.isEmpty()); +} + #ifdef Q_OS_SYMBIAN void tst_QLocalSocket::unlink(QString name) { -- cgit v0.12 From 1d307402d03dea32b6e95a1eec6a79448fbe892a Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 14 Jun 2010 19:16:13 +0200 Subject: QLocalSocket/Win: check for broken pipe in waitForReadyRead In waitForReadyRead we didn't check for synchronous connection loss. Autotest added: tst_QLocalSocket::syncDisconnectNotify Reviewed-by: ossi --- src/network/socket/qlocalsocket_win.cpp | 11 +++++++++++ tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 17 +++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index 01cbd4b..5486f47 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -570,11 +570,22 @@ bool QLocalSocket::waitForReadyRead(int msecs) if (d->state != QLocalSocket::ConnectedState) return false; + // We already know that the pipe is gone, but did not enter the event loop yet. + if (d->pipeClosed) { + close(); + return false; + } + Q_ASSERT(d->readSequenceStarted); DWORD result = WaitForSingleObject(d->overlapped.hEvent, msecs == -1 ? INFINITE : msecs); switch (result) { case WAIT_OBJECT_0: d->_q_notified(); + // We just noticed that the pipe is gone. + if (d->pipeClosed) { + close(); + return false; + } return true; case WAIT_TIMEOUT: return false; diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index 1acd669..4cbb156 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -115,6 +115,7 @@ private slots: void writeToClientAndDisconnect(); void debug(); void bytesWrittenSignal(); + void syncDisconnectNotify(); void asyncDisconnectNotify(); #ifdef Q_OS_SYMBIAN @@ -1061,6 +1062,22 @@ void tst_QLocalSocket::bytesWrittenSignal() QVERIFY(writeThread.wait(2000)); } +void tst_QLocalSocket::syncDisconnectNotify() +{ +#ifdef Q_OS_SYMBIAN + unlink("syncDisconnectNotify"); +#endif + + QLocalServer server; + QVERIFY(server.listen("syncDisconnectNotify")); + QLocalSocket client; + client.connectToServer("syncDisconnectNotify"); + QVERIFY(server.waitForNewConnection()); + QLocalSocket* serverSocket = server.nextPendingConnection(); + QVERIFY(serverSocket); + delete serverSocket; + QCOMPARE(client.waitForReadyRead(), false); +} void tst_QLocalSocket::asyncDisconnectNotify() { -- cgit v0.12 From d61a1fecde3d4a5b34a849ae852a498e6bb1c2de Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Mon, 14 Jun 2010 19:17:55 +0200 Subject: beautify tst_QLocalSocket::writeToClientAndDisconnect Reviewed-by: ossi --- tests/auto/qlocalsocket/tst_qlocalsocket.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp index 4cbb156..9c09917 100644 --- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp +++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp @@ -997,16 +997,9 @@ void tst_QLocalSocket::writeToClientAndDisconnect() clientSocket->close(); server.close(); - // Wait for the client to notice the broken connection. - int timeout = 5000; - do { - const int timestep = 100; - QTest::qWait(timestep); - timeout -= timestep; - } while (!readChannelFinishedSpy.count() && timeout > 0); - - QCOMPARE(readChannelFinishedSpy.count(), 1); + QTRY_COMPARE(readChannelFinishedSpy.count(), 1); QCOMPARE(client.read(buffer, sizeof(buffer)), (qint64)sizeof(buffer)); + client.waitForDisconnected(); QCOMPARE(client.state(), QLocalSocket::UnconnectedState); } -- cgit v0.12 From 3e72884174b2894b6007f90b6c1298f1ba4da4a9 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Tue, 15 Jun 2010 01:51:31 +0200 Subject: Fix a minor typo in QAbstractItemModel's documentation. Merge-request: 687 Reviewed-by: Andreas Kling --- src/corelib/kernel/qabstractitemmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index b0e2f48..8415259 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -2854,7 +2854,7 @@ void QAbstractItemModel::endMoveColumns() \note Use beginResetModel() and endResetModel() instead whenever possible. Use this method only if there is no way to call beginResetModel() before invalidating the model. - Otherwise it could lead to unexcpected behaviour, especially when used with proxy models. + Otherwise it could lead to unexpected behaviour, especially when used with proxy models. */ void QAbstractItemModel::reset() { -- cgit v0.12 From aa97c7b7a71ddaf3f01f312658b9a43428846aee Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Tue, 15 Jun 2010 10:00:46 +1000 Subject: Fixed unit test failure in qimagereader. This bug was introduced with bug fix 558089fb21e7f388f9810c51abbd9bf3872b2178 --- src/plugins/imageformats/gif/qgifhandler.cpp | 2 +- tests/auto/qimagereader/tst_qimagereader.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 56dac52..cba3ff6 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -1061,7 +1061,7 @@ bool QGifHandler::imageIsComing() const bool QGifHandler::canRead() const { - if (!nextDelay && canRead(device())) { + if (canRead(device())) { setFormat("gif"); return true; } diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index 99244c2..fc2582f 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -1763,14 +1763,14 @@ void tst_QImageReader::testIgnoresFormatAndExtension() QFETCH(QString, expected); QList formats = QImageReader::supportedImageFormats(); - QString fileNameBase = "images/" + name + "."; + QString fileNameBase = prefix + name + "."; foreach (const QByteArray &f, formats) { if (f == extension) continue; QFile tmp(QDir::tempPath() + "/" + name + "_" + expected + "." + f); - QFile::copy(fileNameBase + extension, QFileInfo(tmp).absoluteFilePath()); + QVERIFY(QFile::copy(fileNameBase + extension, QFileInfo(tmp).absoluteFilePath())); QString format; QImage image; -- cgit v0.12 From d3cd976b8eb3de15a07b0ca9280731958a0147d8 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 15 Jun 2010 14:44:51 +1000 Subject: Bump version number after 4.6.3 release. Reviewed-by: Trust Me --- src/corelib/global/qglobal.h | 4 ++-- src/plugins/qpluginbase.pri | 2 +- src/qbase.pri | 2 +- tests/auto/mediaobject/dummy/dummy.pro | 2 +- tests/auto/selftests/expected_badxml.txt | 2 +- tests/auto/selftests/expected_cmptest.txt | 2 +- tests/auto/selftests/expected_crashes_3.txt | 2 +- tests/auto/selftests/expected_longstring.txt | 2 +- tests/auto/selftests/expected_maxwarnings.txt | 2 +- tests/auto/selftests/expected_skip.txt | 2 +- tests/auto/selftests/expected_xunit.txt | 2 +- tests/auto/uic/baseline/config_fromuic3.ui.h | 2 +- tools/assistant/tools/assistant/doc/assistant.qdocconf | 2 +- tools/qdoc3/test/assistant.qdocconf | 2 +- tools/qdoc3/test/designer.qdocconf | 2 +- tools/qdoc3/test/linguist.qdocconf | 2 +- tools/qdoc3/test/qmake.qdocconf | 2 +- tools/qdoc3/test/qt-build-docs.qdocconf | 6 +++--- tools/qdoc3/test/qt.qdocconf | 6 +++--- 19 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 7825f82..ef82b3f 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -44,11 +44,11 @@ #include -#define QT_VERSION_STR "4.6.3" +#define QT_VERSION_STR "4.6.4" /* QT_VERSION is (major << 16) + (minor << 8) + patch. */ -#define QT_VERSION 0x040603 +#define QT_VERSION 0x040604 /* can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) */ diff --git a/src/plugins/qpluginbase.pri b/src/plugins/qpluginbase.pri index f6a8f87..7eecf03 100644 --- a/src/plugins/qpluginbase.pri +++ b/src/plugins/qpluginbase.pri @@ -1,6 +1,6 @@ TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { - VERSION=4.6.3 + VERSION=4.6.4 } else { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} } diff --git a/src/qbase.pri b/src/qbase.pri index 59beaab..0452dc9 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -4,7 +4,7 @@ INCLUDEPATH *= $$QMAKE_INCDIR_QT/$$TARGET #just for today to have some compat isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700 TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { - VERSION=4.6.3 + VERSION=4.6.4 } else { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} } diff --git a/tests/auto/mediaobject/dummy/dummy.pro b/tests/auto/mediaobject/dummy/dummy.pro index cf1010e..88b864b 100644 --- a/tests/auto/mediaobject/dummy/dummy.pro +++ b/tests/auto/mediaobject/dummy/dummy.pro @@ -1,7 +1,7 @@ TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { - VERSION=4.6.3 + VERSION=4.6.4 } else { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} } diff --git a/tests/auto/selftests/expected_badxml.txt b/tests/auto/selftests/expected_badxml.txt index 046f1b2..bc9d203 100644 --- a/tests/auto/selftests/expected_badxml.txt +++ b/tests/auto/selftests/expected_badxml.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_BadXml ********* -Config: Using QTest library 4.6.3, Qt 4.6.3 +Config: Using QTest library 4.6.4, Qt 4.6.4 PASS : tst_BadXml::initTestCase() QDEBUG : tst_BadXml::badDataTag(end cdata ]]> text ]]> more text) a message FAIL! : tst_BadXml::badDataTag(end cdata ]]> text ]]> more text) a failure diff --git a/tests/auto/selftests/expected_cmptest.txt b/tests/auto/selftests/expected_cmptest.txt index 18d4cce..2ee3005 100644 --- a/tests/auto/selftests/expected_cmptest.txt +++ b/tests/auto/selftests/expected_cmptest.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Cmptest ********* -Config: Using QTest library 4.6.3, Qt 4.6.3 +Config: Using QTest library 4.6.4, Qt 4.6.4 PASS : tst_Cmptest::initTestCase() PASS : tst_Cmptest::compare_boolfuncs() PASS : tst_Cmptest::compare_pointerfuncs() diff --git a/tests/auto/selftests/expected_crashes_3.txt b/tests/auto/selftests/expected_crashes_3.txt index 71d79ca..60914f8 100644 --- a/tests/auto/selftests/expected_crashes_3.txt +++ b/tests/auto/selftests/expected_crashes_3.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Crashes ********* -Config: Using QTest library 4.6.3, Qt 4.6.3 +Config: Using QTest library 4.6.4, Qt 4.6.4 PASS : tst_Crashes::initTestCase() QFATAL : tst_Crashes::crash() Received signal 11 FAIL! : tst_Crashes::crash() Received a fatal error. diff --git a/tests/auto/selftests/expected_longstring.txt b/tests/auto/selftests/expected_longstring.txt index c451daf..566e43f 100644 --- a/tests/auto/selftests/expected_longstring.txt +++ b/tests/auto/selftests/expected_longstring.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_LongString ********* -Config: Using QTest library 4.6.3, Qt 4.6.3 +Config: Using QTest library 4.6.4, Qt 4.6.4 PASS : tst_LongString::initTestCase() FAIL! : tst_LongString::failWithLongString() Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. diff --git a/tests/auto/selftests/expected_maxwarnings.txt b/tests/auto/selftests/expected_maxwarnings.txt index 0da1799..5fb7f58 100644 --- a/tests/auto/selftests/expected_maxwarnings.txt +++ b/tests/auto/selftests/expected_maxwarnings.txt @@ -1,5 +1,5 @@ ********* Start testing of MaxWarnings ********* -Config: Using QTest library 4.6.3, Qt 4.6.3 +Config: Using QTest library 4.6.4, Qt 4.6.4 PASS : MaxWarnings::initTestCase() QWARN : MaxWarnings::warn() 0 QWARN : MaxWarnings::warn() 1 diff --git a/tests/auto/selftests/expected_skip.txt b/tests/auto/selftests/expected_skip.txt index 32247e6..650d816 100644 --- a/tests/auto/selftests/expected_skip.txt +++ b/tests/auto/selftests/expected_skip.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Skip ********* -Config: Using QTest library 4.6.3, Qt 4.6.3 +Config: Using QTest library 4.6.4, Qt 4.6.4 PASS : tst_Skip::initTestCase() SKIP : tst_Skip::test() skipping all Loc: [/home/user/depot/qt-git/mainline/tests/auto/selftests/skip/tst_skip.cpp(68)] diff --git a/tests/auto/selftests/expected_xunit.txt b/tests/auto/selftests/expected_xunit.txt index 02cfa6f..ac8c0db 100644 --- a/tests/auto/selftests/expected_xunit.txt +++ b/tests/auto/selftests/expected_xunit.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Xunit ********* -Config: Using QTest library 4.6.3, Qt 4.6.3 +Config: Using QTest library 4.6.4, Qt 4.6.4 PASS : tst_Xunit::initTestCase() WARNING: tst_Xunit::testFunc1() just a QWARN() ! PASS : tst_Xunit::testFunc1() diff --git a/tests/auto/uic/baseline/config_fromuic3.ui.h b/tests/auto/uic/baseline/config_fromuic3.ui.h index c77b303..5df45e6 100644 --- a/tests/auto/uic/baseline/config_fromuic3.ui.h +++ b/tests/auto/uic/baseline/config_fromuic3.ui.h @@ -45,7 +45,7 @@ ** Form generated from reading UI file 'config_fromuic3.ui' ** ** Created: Thu Dec 17 12:48:42 2009 -** by: Qt User Interface Compiler version 4.6.3 +** by: Qt User Interface Compiler version 4.6.4 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ diff --git a/tools/assistant/tools/assistant/doc/assistant.qdocconf b/tools/assistant/tools/assistant/doc/assistant.qdocconf index 365613b..3f192c0 100644 --- a/tools/assistant/tools/assistant/doc/assistant.qdocconf +++ b/tools/assistant/tools/assistant/doc/assistant.qdocconf @@ -12,5 +12,5 @@ HTML.footer = "


    \n" \ "\n" \ "\n" \ "\n" \ - "\n" \ + "\n" \ "
    Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
    Qt 4.6.3
    Qt 4.6.4
    " diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf index f03d970..91c7cd4 100644 --- a/tools/qdoc3/test/assistant.qdocconf +++ b/tools/qdoc3/test/assistant.qdocconf @@ -17,7 +17,7 @@ qhp.Assistant.namespace = com.trolltech.assistant.460 qhp.Assistant.virtualFolder = qdoc qhp.Assistant.indexTitle = Qt Assistant Manual qhp.Assistant.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png -qhp.Assistant.filterAttributes = qt 4.6.3 tools assistant +qhp.Assistant.filterAttributes = qt 4.6.4 tools assistant qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual qhp.Assistant.customFilters.Assistant.filterAttributes = qt tools assistant qhp.Assistant.subprojects = manual examples diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf index 0c3e05b..69024d1 100644 --- a/tools/qdoc3/test/designer.qdocconf +++ b/tools/qdoc3/test/designer.qdocconf @@ -17,7 +17,7 @@ qhp.Designer.namespace = com.trolltech.designer.460 qhp.Designer.virtualFolder = qdoc qhp.Designer.indexTitle = Qt Designer Manual qhp.Designer.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png -qhp.Designer.filterAttributes = qt 4.6.3 tools designer +qhp.Designer.filterAttributes = qt 4.6.4 tools designer qhp.Designer.customFilters.Designer.name = Qt Designer Manual qhp.Designer.customFilters.Designer.filterAttributes = qt tools designer qhp.Designer.subprojects = manual examples diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf index 739f4af..d8b90a7 100644 --- a/tools/qdoc3/test/linguist.qdocconf +++ b/tools/qdoc3/test/linguist.qdocconf @@ -17,7 +17,7 @@ qhp.Linguist.namespace = com.trolltech.linguist.460 qhp.Linguist.virtualFolder = qdoc qhp.Linguist.indexTitle = Qt Linguist Manual qhp.Linguist.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png -qhp.Linguist.filterAttributes = qt 4.6.3 tools linguist +qhp.Linguist.filterAttributes = qt 4.6.4 tools linguist qhp.Linguist.customFilters.Linguist.name = Qt Linguist Manual qhp.Linguist.customFilters.Linguist.filterAttributes = qt tools linguist qhp.Linguist.subprojects = manual examples diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf index 696949e..28fc49a 100644 --- a/tools/qdoc3/test/qmake.qdocconf +++ b/tools/qdoc3/test/qmake.qdocconf @@ -17,7 +17,7 @@ qhp.qmake.namespace = com.trolltech.qmake.460 qhp.qmake.virtualFolder = qdoc qhp.qmake.indexTitle = QMake Manual qhp.qmake.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png -qhp.qmake.filterAttributes = qt 4.6.3 tools qmake +qhp.qmake.filterAttributes = qt 4.6.4 tools qmake qhp.qmake.customFilters.qmake.name = qmake Manual qhp.qmake.customFilters.qmake.filterAttributes = qt tools qmake qhp.qmake.subprojects = manual diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index d7a06b8..3570816 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -32,9 +32,9 @@ qhp.Qt.extraFiles = classic.css \ images/dynamiclayouts-example.png \ images/stylesheet-coffee-plastique.png -qhp.Qt.filterAttributes = qt 4.6.3 qtrefdoc -qhp.Qt.customFilters.Qt.name = Qt 4.6.3 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.6.3 +qhp.Qt.filterAttributes = qt 4.6.4 qtrefdoc +qhp.Qt.customFilters.Qt.name = Qt 4.6.4 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.6.4 qhp.Qt.subprojects = classes overviews examples qhp.Qt.subprojects.classes.title = Classes qhp.Qt.subprojects.classes.indexTitle = Qt's Classes diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index d5a2995..b8dbcd1 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -34,9 +34,9 @@ qhp.Qt.extraFiles = classic.css \ images/dynamiclayouts-example.png \ images/stylesheet-coffee-plastique.png -qhp.Qt.filterAttributes = qt 4.6.3 qtrefdoc -qhp.Qt.customFilters.Qt.name = Qt 4.6.3 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.6.3 +qhp.Qt.filterAttributes = qt 4.6.4 qtrefdoc +qhp.Qt.customFilters.Qt.name = Qt 4.6.4 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.6.4 qhp.Qt.subprojects = classes overviews examples qhp.Qt.subprojects.classes.title = Classes qhp.Qt.subprojects.classes.indexTitle = Qt's Classes -- cgit v0.12 From b18a343cc63f93a8e97a8c6c623e56a666775b57 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 15 Jun 2010 15:23:28 +1000 Subject: Fix bug with childrenRect resizing on startup. This also optimizes the implementation. Task-number: QTBUG-11383 --- src/declarative/graphicsitems/qdeclarativeitem.cpp | 28 ++++++++++------------ src/declarative/graphicsitems/qdeclarativeitem_p.h | 7 +++--- .../qdeclarativeitem/data/childrenRectBug.qml | 23 ++++++++++++++++++ .../qdeclarativeitem/tst_qdeclarativeitem.cpp | 17 +++++++++++++ 4 files changed, 56 insertions(+), 19 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 18806e7..42b370b 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -231,9 +231,10 @@ QT_BEGIN_NAMESPACE \brief The QDeclarativeContents class gives access to the height and width of an item's contents. */ - -QDeclarativeContents::QDeclarativeContents() : m_x(0), m_y(0), m_width(0), m_height(0) +QDeclarativeContents::QDeclarativeContents(QDeclarativeItem *item) : m_item(item), m_x(0), m_y(0), m_width(0), m_height(0) { + //### optimize + connect(this, SIGNAL(rectChanged(QRectF)), m_item, SIGNAL(childrenRectChanged(QRectF))); } QDeclarativeContents::~QDeclarativeContents() @@ -328,12 +329,8 @@ void QDeclarativeContents::calcWidth(QDeclarativeItem *changed) emit rectChanged(rectF()); } -void QDeclarativeContents::setItem(QDeclarativeItem *item) +void QDeclarativeContents::complete() { - m_item = item; - //### optimize - connect(this, SIGNAL(rectChanged(QRectF)), m_item, SIGNAL(childrenRectChanged(QRectF))); - QList children = m_item->childItems(); for (int i = 0; i < children.count(); ++i) { QDeclarativeItem *child = qobject_cast(children.at(i)); @@ -343,9 +340,7 @@ void QDeclarativeContents::setItem(QDeclarativeItem *item) //###what about changes to visibility? } - //### defer until componentComplete - calcHeight(); - calcWidth(); + calcGeometry(); } void QDeclarativeContents::itemGeometryChanged(QDeclarativeItem *changed, const QRectF &newGeometry, const QRectF &oldGeometry) @@ -360,16 +355,14 @@ void QDeclarativeContents::itemDestroyed(QDeclarativeItem *item) { if (item) QDeclarativeItemPrivate::get(item)->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry | QDeclarativeItemPrivate::Destroyed); - calcWidth(); - calcHeight(); + calcGeometry(); } void QDeclarativeContents::childRemoved(QDeclarativeItem *item) { if (item) QDeclarativeItemPrivate::get(item)->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry | QDeclarativeItemPrivate::Destroyed); - calcWidth(); - calcHeight(); + calcGeometry(); } void QDeclarativeContents::childAdded(QDeclarativeItem *item) @@ -1752,8 +1745,9 @@ QRectF QDeclarativeItem::childrenRect() { Q_D(QDeclarativeItem); if (!d->_contents) { - d->_contents = new QDeclarativeContents; - d->_contents->setItem(this); + d->_contents = new QDeclarativeContents(this); + if (d->_componentComplete) + d->_contents->complete(); } return d->_contents->rectF(); } @@ -2619,6 +2613,8 @@ void QDeclarativeItem::componentComplete() } if (d->keyHandler) d->keyHandler->componentComplete(); + if (d->_contents) + d->_contents->complete(); } QDeclarativeStateGroup *QDeclarativeItemPrivate::_states() diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h index 184d6f1..fb416c2 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem_p.h +++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h @@ -83,16 +83,17 @@ class QDeclarativeContents : public QObject, public QDeclarativeItemChangeListen { Q_OBJECT public: - QDeclarativeContents(); + QDeclarativeContents(QDeclarativeItem *item); ~QDeclarativeContents(); QRectF rectF() const; - void setItem(QDeclarativeItem *item); - void childRemoved(QDeclarativeItem *item); void childAdded(QDeclarativeItem *item); + void calcGeometry() { calcWidth(); calcHeight(); } + void complete(); + Q_SIGNALS: void rectChanged(QRectF); diff --git a/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml new file mode 100644 index 0000000..4a2f056 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeitem/data/childrenRectBug.qml @@ -0,0 +1,23 @@ +import Qt 4.7 + +Rectangle { + width: 400 + height: 200 + + Item { + objectName: "theItem" + anchors.centerIn: parent + width: childrenRect.width + height: childrenRect.height + Rectangle { + id: text1 + anchors.verticalCenter: parent.verticalCenter + width: 100; height: 100; color: "green" + } + Rectangle { + anchors.left: text1.right + anchors.verticalCenter: parent.verticalCenter + width: 100; height: 100; color: "green" + } + } +} diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp index c2d3660..0a66245 100644 --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp @@ -72,6 +72,7 @@ private slots: void transforms(); void transforms_data(); void childrenRect(); + void childrenRectBug(); void childrenProperty(); void resourcesProperty(); @@ -736,6 +737,22 @@ void tst_QDeclarativeItem::childrenRect() delete o; } +// QTBUG-11383 +void tst_QDeclarativeItem::childrenRectBug() +{ + QDeclarativeView *canvas = new QDeclarativeView(0); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/childrenRectBug.qml")); + canvas->show(); + + QGraphicsObject *o = canvas->rootObject(); + QDeclarativeItem *item = o->findChild("theItem"); + QCOMPARE(item->width(), qreal(200)); + QCOMPARE(item->height(), qreal(100)); + QCOMPARE(item->x(), qreal(100)); + + delete canvas; +} + template T *tst_QDeclarativeItem::findItem(QGraphicsObject *parent, const QString &objectName) { -- cgit v0.12 From c1e6d97b9476c859abc3927046144b4006fcf735 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 15 Jun 2010 15:49:08 +1000 Subject: Remove duplicated code. --- src/declarative/graphicsitems/qdeclarativetextedit.cpp | 8 +------- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 3b4f2a7..3106daf 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1113,13 +1113,7 @@ void QDeclarativeTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event) Q_D(QDeclarativeTextEdit); if (d->focusOnPress){ bool hadFocus = hasFocus(); - QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope? - while(p) { - if (p->flags() & QGraphicsItem::ItemIsFocusScope) - p->setFocus(); - p = p->parentItem(); - } - setFocus(true); + forceFocus(); if (d->showInputPanelOnFocus) { if (hasFocus() && hadFocus && !isReadOnly()) { // re-open input panel on press if already focused diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 633c01e..cba01ef 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -924,13 +924,7 @@ void QDeclarativeTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event) Q_D(QDeclarativeTextInput); if(d->focusOnPress){ bool hadFocus = hasFocus(); - QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope? - while(p) { - if (p->flags() & QGraphicsItem::ItemIsFocusScope) - p->setFocus(); - p = p->parentItem(); - } - setFocus(true); + forceFocus(); if (d->showInputPanelOnFocus) { if (hasFocus() && hadFocus && !isReadOnly()) { // re-open input panel on press if already focused -- cgit v0.12 From a8e6efd6086e3c7f2d88d22c9e4b1cd7e02a8d8f Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 15 Jun 2010 16:42:26 +1000 Subject: Add skeleton changes files for 4.6.4. Reviewed-by: Trust Me --- dist/changes-4.6.4 | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 dist/changes-4.6.4 diff --git a/dist/changes-4.6.4 b/dist/changes-4.6.4 new file mode 100644 index 0000000..381023f --- /dev/null +++ b/dist/changes-4.6.4 @@ -0,0 +1,158 @@ +Qt 4.6.4 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 4.6.0. For more details, +refer to the online documentation included in this distribution. The +documentation is also available online: + + http://qt.nokia.com/doc/4.6 + +The Qt version 4.6 series is binary compatible with the 4.5.x series. +Applications compiled for 4.5 will continue to run with 4.6. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker or the Merge Request queue +of the public source repository. + +Qt Bug Tracker: http://bugreports.qt.nokia.com +Merge Request: http://qt.gitorious.org + +**************************************************************************** +* General * +**************************************************************************** + +New features +------------ + + - SomeClass, SomeOtherClass + * New classes for foo, bar and baz + +Optimizations +------------- + + - Optimized foo in QSomeClass + * See list of Important Behavior Changes below + + +**************************************************************************** +* Library * +**************************************************************************** + +QtCore +------ + + - foo + * bar + +QtGui +----- + + - foo + * bar + +QtDBus +------ + + - foo + * bar + +QtNetwork +--------- + + - foo + * bar + +QtOpenGL +-------- + + - foo + * bar + +QtScript +-------- + + - foo + * bar + +QtSql +----- + + - foo + * bar + +QtXml +----- + + - foo + * bar + +Qt Plugins +---------- + + - foo + * bar + +Third party components +---------------------- + + - Updated foo to version 2.3.9. + + - Updated bar to the latest version from baz.org. + + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + +Qt for Unix (X11 and Mac OS X) +------------------------------ + + - + +Qt for Linux/X11 +---------------- + + - + +Qt for Windows +-------------- + + - + +Qt for Mac OS X +--------------- + + - + +Qt for Embedded Linux +--------------------- + + - + +DirectFB +-------- + + - + +Qt for Windows CE +----------------- + + - + +**************************************************************************** +* Tools * +**************************************************************************** + + - Designer + * foo + + - qdoc3 + * bar + + - Linguist + * baz + +**************************************************************************** +* Important Behavior Changes * +**************************************************************************** + + - + -- cgit v0.12 From 37ed99a30839696a95c498f7d99a3505936ac29c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 15 Jun 2010 10:25:24 +0200 Subject: Updated WebKit to 40c2d6907ef75288b4f15e7fad334b9138acdbbf Integrated fix: || || [Qt] The qt_webkit_version.pri file gets overwritten on install || --- mkspecs/modules/qt_webkit_version.pri | 6 ++++-- src/3rdparty/webkit/.tag | 2 +- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 13 +++++++++++++ src/3rdparty/webkit/WebCore/WebCore.pri | 2 +- src/3rdparty/webkit/WebCore/WebCore.pro | 7 +------ 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/mkspecs/modules/qt_webkit_version.pri b/mkspecs/modules/qt_webkit_version.pri index 0370720..ffd192c 100644 --- a/mkspecs/modules/qt_webkit_version.pri +++ b/mkspecs/modules/qt_webkit_version.pri @@ -1,2 +1,4 @@ -# The version information comes from our copy of -include($$PWD/../../src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri) +QT_WEBKIT_VERSION = 4.7.0 +QT_WEBKIT_MAJOR_VERSION = 4 +QT_WEBKIT_MINOR_VERSION = 7 +QT_WEBKIT_PATCH_VERSION = 0 diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index 125e175..07a02d7 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -0f8941d0dd5f947530e1dc55b859d810bba14764 +40c2d6907ef75288b4f15e7fad334b9138acdbbf diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 6aaae4f..b648b94 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from and has the sha1 checksum - f943ead2759537527faa7f3cb057d995291663b9 + 40c2d6907ef75288b4f15e7fad334b9138acdbbf diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index e04729d..6a7da30 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2010-06-15 Jocelyn Turcotte + + Reviewed by Simon Hausmann. + + [Qt] The qt_webkit_version.pri file gets overwritten on install + https://bugs.webkit.org/show_bug.cgi?id=40487 + + Don't install qt_webkit_version.pri when building WebKit inside of Qt. + The import of WebKit into Qt will take care of providing the file + in mkspecs/modules and it'll be installed through projects.pro. + + * WebCore.pro: + 2010-06-13 Noam Rosenthal Reviewed by Eric Seidel. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pri b/src/3rdparty/webkit/WebCore/WebCore.pri index 9debd6a..97ae526 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pri +++ b/src/3rdparty/webkit/WebCore/WebCore.pri @@ -107,7 +107,7 @@ greaterThan(QT_MINOR_VERSION, 5) { !lessThan(QT_MINOR_VERSION, 7) { DEFINES += ENABLE_QT_BEARER=1 } else { - load(mobilityconfig) + load(mobilityconfig, true) contains(MOBILITY_CONFIG, bearer) { DEFINES += ENABLE_QT_BEARER=1 } diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 048fc93..07ef474 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -2845,12 +2845,7 @@ contains(DEFINES, ENABLE_SYMBIAN_DIALOG_PROVIDERS) { include($$PWD/../WebKit/qt/Api/headers.pri) HEADERS += $$WEBKIT_API_HEADERS -CONFIG(QTDIR_build) { - modfile.files = $$moduleFile - modfile.path = $$[QMAKE_MKSPECS]/modules - - INSTALLS += modfile -} else { +!CONFIG(QTDIR_build) { exists($$OUTPUT_DIR/include/QtWebKit/classheaders.pri): include($$OUTPUT_DIR/include/QtWebKit/classheaders.pri) WEBKIT_INSTALL_HEADERS = $$WEBKIT_API_HEADERS $$WEBKIT_CLASS_HEADERS -- cgit v0.12 From d6bcab9e1cfb3a3b91b45269d68a594f6f079914 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 15 Jun 2010 10:14:18 +0200 Subject: Fix regression, remove artificial emboldening of monospaced fonts In change 889e13652e00ba64060e7b62ed3377ea04d44faa we employed usage of artificial emboldening of fonts with FreeType when a bold variant of the font does not exist. This introduced a regression for monospaced fonts, where the contract says that all glyphs must be the same width. Since the artificial emboldening algorithm does not support this contract, it has been turned off for monospaced fonts, reverting to the old behavior for this particular class of fonts. Task-number: QTBUG-11353 Reviewed-by: Paul --- src/gui/text/qfontengine_ft.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 9056012..2c4fbab 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -690,7 +690,7 @@ bool QFontEngineFT::init(FaceId faceId, bool antialias, GlyphFormat format) if (fake_oblique) transform = true; // fake bold - if ((fontDef.weight == QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD)) + if ((fontDef.weight == QFont::Bold) && !(face->style_flags & FT_STYLE_FLAG_BOLD) && !FT_IS_FIXED_WIDTH(face)) embolden = true; // underline metrics line_thickness = QFixed::fromFixed(FT_MulFix(face->underline_thickness, face->size->metrics.y_scale)); -- cgit v0.12 From 11420641d9341af6615baa21453e08c092f7fb10 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 15 Jun 2010 10:42:42 +0200 Subject: Fix symbian building of TARGET with a slash In case there is a slash in the target (for example; ../foo) then we don't want to add a faulty cxxflags to the compile line. Reviewed-by: Axis --- mkspecs/features/symbian/symbian_building.prf | 4 ++-- tests/auto/qlocale/test/test.pro | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index 92988aa..9fc4d1e 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -1,7 +1,7 @@ # we have some module specific options (defined in qt.prf) lets add them -!contains(TARGET, ".*[ -].*"):eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS) +!contains(TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${TARGET}_CXXFLAGS) !isEmpty(TMPVAR):QMAKE_CXXFLAGS += $$TMPVAR -!contains(TARGET, ".*[ -].*"):eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS) +!contains(TARGET, ".*[ -/].*"):eval(TMPVAR = \$\$QMAKE_$${TARGET}_LFLAGS) !isEmpty(TMPVAR) { QMAKE_LFLAGS += $$TMPVAR } else :linux-gcce { # lets provide a simple default. Without elf2e32 complains diff --git a/tests/auto/qlocale/test/test.pro b/tests/auto/qlocale/test/test.pro index d57f2d1..e33d0fe 100644 --- a/tests/auto/qlocale/test/test.pro +++ b/tests/auto/qlocale/test/test.pro @@ -36,4 +36,4 @@ symbian:contains(S60_VERSION,3.2) { "PAGED" \ "$${LITERAL_HASH}endif" MMP_RULES += custom_paged_rule -} \ No newline at end of file +} -- cgit v0.12 From a041e4eca3467c1baa6245b6fb47def127f30f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 15 Jun 2010 10:45:23 +0200 Subject: Added missing sanity checks in qimage.cpp We should be consistent and do sanity checks whenever we allocate new images. Task-number: QTBUG-1985 Reviewed-by: Eskil --- src/gui/image/qimage.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index d89ffe6..adc2632 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4210,6 +4210,7 @@ QImage QImage::createHeuristicMask(bool clipTight) const int w = width(); int h = height(); QImage m(w, h, Format_MonoLSB); + QIMAGE_SANITYCHECK_MEMORY(m); m.setColorCount(2); m.setColor(0, QColor(Qt::color0).rgba()); m.setColor(1, QColor(Qt::color1).rgba()); @@ -4302,6 +4303,7 @@ QImage QImage::createMaskFromColor(QRgb color, Qt::MaskMode mode) const if (!d) return QImage(); QImage maskImage(size(), QImage::Format_MonoLSB); + QIMAGE_SANITYCHECK_MEMORY(maskImage); maskImage.fill(0); uchar *s = maskImage.bits(); @@ -4362,6 +4364,7 @@ QImage QImage::mirrored(bool horizontal, bool vertical) const int h = d->height; // Create result image, copy colormap QImage result(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(result); // check if we ran out of of memory.. if (!result.d) @@ -4499,6 +4502,7 @@ QImage QImage::rgbSwapped() const case Format_ARGB32: case Format_ARGB32_Premultiplied: res = QImage(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { uint *q = (uint*)res.scanLine(i); uint *p = (uint*)scanLine(i); @@ -4512,6 +4516,7 @@ QImage QImage::rgbSwapped() const break; case Format_RGB16: res = QImage(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { ushort *q = (ushort*)res.scanLine(i); const ushort *p = (const ushort*)scanLine(i); @@ -4525,6 +4530,7 @@ QImage QImage::rgbSwapped() const break; case Format_ARGB8565_Premultiplied: res = QImage(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { quint8 *p = (quint8*)scanLine(i); const quint8 *end = p + d->width * sizeof(qargb8565); @@ -4537,6 +4543,7 @@ QImage QImage::rgbSwapped() const break; case Format_RGB666: res = QImage(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { qrgb666 *q = reinterpret_cast(res.scanLine(i)); const qrgb666 *p = reinterpret_cast(scanLine(i)); @@ -4549,6 +4556,7 @@ QImage QImage::rgbSwapped() const break; case Format_ARGB6666_Premultiplied: res = QImage(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { qargb6666 *q = reinterpret_cast(res.scanLine(i)); const qargb6666 *p = reinterpret_cast(scanLine(i)); @@ -4561,6 +4569,7 @@ QImage QImage::rgbSwapped() const break; case Format_RGB555: res = QImage(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { ushort *q = (ushort*)res.scanLine(i); const ushort *p = (const ushort*)scanLine(i); @@ -4574,6 +4583,7 @@ QImage QImage::rgbSwapped() const break; case Format_ARGB8555_Premultiplied: res = QImage(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { quint8 *p = (quint8*)scanLine(i); const quint8 *end = p + d->width * sizeof(qargb8555); @@ -4586,6 +4596,7 @@ QImage QImage::rgbSwapped() const break; case Format_RGB888: res = QImage(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { quint8 *q = reinterpret_cast(res.scanLine(i)); const quint8 *p = reinterpret_cast(scanLine(i)); @@ -4601,6 +4612,7 @@ QImage QImage::rgbSwapped() const break; case Format_RGB444: res = QImage(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { quint8 *q = reinterpret_cast(res.scanLine(i)); const quint8 *p = reinterpret_cast(scanLine(i)); @@ -4615,6 +4627,7 @@ QImage QImage::rgbSwapped() const break; case Format_ARGB4444_Premultiplied: res = QImage(d->width, d->height, d->format); + QIMAGE_SANITYCHECK_MEMORY(res); for (int i = 0; i < d->height; i++) { quint8 *q = reinterpret_cast(res.scanLine(i)); const quint8 *p = reinterpret_cast(scanLine(i)); -- cgit v0.12 From 78560390b948127262a9ebb5f4dd355b6c517e94 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 15 Jun 2010 13:49:26 +0300 Subject: Change $${EPOCROOT} to also have drive if EPOCROOT env variable has it Since sbsv2 toolchain supports having sources and SDK on different drives, $${EPOCROOT} needs to contain drive letter to make it work. Reviewed-by: Jason Barron --- qmake/generators/symbian/symbiancommon.cpp | 3 --- qmake/generators/symbian/symmake_sbsv2.cpp | 4 +++- src/s60installs/s60installs.pro | 4 ++-- tools/shared/symbian/epocroot.cpp | 4 ---- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index 58729d2..3a4bdbc 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -433,9 +433,6 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile, bool epocB if (from.size() > 1 && from.at(1) == QLatin1Char(':')) from = from.mid(2); from.prepend(zDir); - } else { - if (from.size() > 1 && from.at(1) == QLatin1Char(':')) - from = from.mid(2); } } diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index c2f1d1a..78f6f85 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -99,7 +99,9 @@ void SymbianSbsv2MakefileGenerator::writeSbsDeploymentList(const DeploymentList& fromItem.replace("\\", "/"); toItem.replace("\\", "/"); #if defined(Q_OS_WIN) - toItem.prepend(QDir::current().absolutePath().left(2)); // add drive + // add drive if it doesn't have one yet + if (toItem.size() > 1 && toItem[1] != QLatin1Char(':')) + toItem.prepend(QDir::current().absolutePath().left(2)); #endif t << "OPTION DEPLOY_SOURCE " << fromItem << endl; t << "OPTION DEPLOY_TARGET " << toItem << endl; diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index d751134..ce0f4f1 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -16,8 +16,8 @@ symbian: { # It is also expected that devices newer than those based on S60 5.0 all have sqlite3.dll. contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { BLD_INF_RULES.prj_exports += \ - "sqlite3.sis $${EPOCROOT}epoc32/data/qt/sis/sqlite3.sis" \ - "sqlite3_selfsigned.sis $${EPOCROOT}epoc32/data/qt/sis/sqlite3_selfsigned.sis" + "sqlite3.sis /epoc32/data/qt/sis/sqlite3.sis" \ + "sqlite3_selfsigned.sis /epoc32/data/qt/sis/sqlite3_selfsigned.sis" symbian-abld|symbian-sbsv2 { sqlitedeployment = \ "; Deploy sqlite onto phone that does not have it already" \ diff --git a/tools/shared/symbian/epocroot.cpp b/tools/shared/symbian/epocroot.cpp index 064e056..ae1dcb1 100644 --- a/tools/shared/symbian/epocroot.cpp +++ b/tools/shared/symbian/epocroot.cpp @@ -105,10 +105,6 @@ static void fixEpocRoot(QString &path) { path.replace("\\", "/"); - if (path.size() > 1 && path[1] == QChar(':')) { - path = path.mid(2); - } - if (!path.size() || path[path.size()-1] != QChar('/')) { path += QChar('/'); } -- cgit v0.12 From c5b06919a8fb5d20aae41f0edf9e2ffa99eb1a8a Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Tue, 15 Jun 2010 13:59:41 +0200 Subject: Doc: Documented qputenv and qgetenv Task-number: QTBUG-4041 Reviewed-by: Morten Engvoldsen --- src/corelib/global/qglobal.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 373c0b4..b31c83b 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2503,6 +2503,19 @@ void qFatal(const char *msg, ...) // getenv is declared as deprecated in VS2005. This function // makes use of the new secure getenv function. +/*! + \relates + + Returns the value of the environment variable with name \a + varName. To get the variable string, use QByteArray::constData(). + + \note qgetenv() was introduced because getenv() from the standard + C library was deprecated in VC2005 (and later versions). qgetenv() + uses the new replacement function in VC, and calls the standard C + library's implementation on all other platforms. + + \sa qputenv() +*/ QByteArray qgetenv(const char *varName) { #if defined(_MSC_VER) && _MSC_VER >= 1400 @@ -2522,6 +2535,20 @@ QByteArray qgetenv(const char *varName) #endif } +/*! + \relates + + This function sets the \a value of the environment variable named + \a varName. It will create the variable if it does not exist. It + returns 0 if the variable could not be set. + + \note qputenv() was introduced because putenv() from the standard + C library was deprecated in VC2005 (and later versions). qputenv() + uses the replacement function in VC, and calls the standard C + library's implementation on all other platforms. + + \sa qgetenv() +*/ bool qputenv(const char *varName, const QByteArray& value) { #if defined(_MSC_VER) && _MSC_VER >= 1400 -- cgit v0.12 From c28efecdcfdd5fa0049bf482cb102814338c0d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 15 Jun 2010 12:33:39 +0200 Subject: Fixed missing stroke for flat ellipses. The behavior should be the same as for arcs and rects. Task-number: QTBUG-2743 Reviewed-by: Eskil --- src/gui/painting/qpaintengine_raster.cpp | 1 + src/gui/painting/qpaintengine_x11.cpp | 5 +++++ src/gui/painting/qpainter.cpp | 4 ---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 9f1128b..f10f12f 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3789,6 +3789,7 @@ void QRasterPaintEngine::drawEllipse(const QRectF &rect) if (((qpen_style(s->lastPen) == Qt::SolidLine && s->flags.fast_pen) || (qpen_style(s->lastPen) == Qt::NoPen && !s->flags.antialiased)) && qMax(rect.width(), rect.height()) < QT_RASTER_COORD_LIMIT + && !rect.isEmpty() && s->matrix.type() <= QTransform::TxScale) // no shear { ensureBrush(); diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp index b8ad9b3..910b2df 100644 --- a/src/gui/painting/qpaintengine_x11.cpp +++ b/src/gui/painting/qpaintengine_x11.cpp @@ -1453,6 +1453,11 @@ void QX11PaintEngine::drawEllipse(const QRectF &rect) void QX11PaintEngine::drawEllipse(const QRect &rect) { + if (rect.isEmpty()) { + drawRects(&rect, 1); + return; + } + Q_D(QX11PaintEngine); QRect devclip(SHRT_MIN, SHRT_MIN, SHRT_MAX*2 - 1, SHRT_MAX*2 - 1); QRect r(rect); diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index e8c4599..d17c711 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -4238,8 +4238,6 @@ void QPainter::drawEllipse(const QRectF &r) return; QRectF rect(r.normalized()); - if (rect.isEmpty()) - return; if (d->extended) { d->extended->drawEllipse(rect); @@ -4281,8 +4279,6 @@ void QPainter::drawEllipse(const QRect &r) return; QRect rect(r.normalized()); - if (rect.isEmpty()) - return; if (d->extended) { d->extended->drawEllipse(rect); -- cgit v0.12 From df55141aa260c8a10c06aa990b6f20d6fb4718f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 15 Jun 2010 13:06:19 +0200 Subject: Fixed QImageReader::format() inconsistency. If state is set to ReadHeader before canRead() then setFormat("png") never gets called. We should make sure that setFormat() gets set whenever canRead() returns true. Task-number: QTBUG-2263 Reviewed-by: Kent Hansen --- src/gui/image/qbmphandler.cpp | 10 +++++---- src/gui/image/qpnghandler.cpp | 10 +++++---- src/gui/image/qppmhandler.cpp | 10 +++++---- src/gui/image/qxbmhandler.cpp | 10 +++++---- src/gui/image/qxpmhandler.cpp | 8 ++++++-- src/plugins/imageformats/gif/qgifhandler.cpp | 4 ++-- src/plugins/imageformats/jpeg/qjpeghandler.cpp | 10 +++++---- src/plugins/imageformats/mng/qmnghandler.cpp | 8 ++++---- tests/auto/qimagereader/tst_qimagereader.cpp | 28 ++++++++++++++++++++++++++ 9 files changed, 70 insertions(+), 28 deletions(-) diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp index 42e19b8..074b8f0 100644 --- a/src/gui/image/qbmphandler.cpp +++ b/src/gui/image/qbmphandler.cpp @@ -674,13 +674,15 @@ bool QBmpHandler::readHeader() bool QBmpHandler::canRead() const { - if (state == Ready) { - if (!canRead(device())) - return false; + if (state == Ready && !canRead(device())) + return false; + + if (state != Error) { setFormat("bmp"); return true; } - return state != Error; + + return false; } bool QBmpHandler::canRead(QIODevice *device) diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp index dd31834..2cf8222 100644 --- a/src/gui/image/qpnghandler.cpp +++ b/src/gui/image/qpnghandler.cpp @@ -892,13 +892,15 @@ QPngHandler::~QPngHandler() bool QPngHandler::canRead() const { - if (d->state == QPngHandlerPrivate::Ready) { - if (!canRead(device())) - return false; + if (d->state == QPngHandlerPrivate::Ready && !canRead(device())) + return false; + + if (d->state != QPngHandlerPrivate::Error) { setFormat("png"); return true; } - return d->state != QPngHandlerPrivate::Error; + + return false; } bool QPngHandler::canRead(QIODevice *device) diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp index cbbbef4..a9e796c 100644 --- a/src/gui/image/qppmhandler.cpp +++ b/src/gui/image/qppmhandler.cpp @@ -409,13 +409,15 @@ bool QPpmHandler::readHeader() bool QPpmHandler::canRead() const { - if (state == Ready) { - if (!canRead(device(), &subType)) - return false; + if (state == Ready && !canRead(device(), &subType)) + return false; + + if (state != Error) { setFormat(subType); return true; } - return state != Error; + + return false; } bool QPpmHandler::canRead(QIODevice *device, QByteArray *subType) diff --git a/src/gui/image/qxbmhandler.cpp b/src/gui/image/qxbmhandler.cpp index 385340a..0dd4e99 100644 --- a/src/gui/image/qxbmhandler.cpp +++ b/src/gui/image/qxbmhandler.cpp @@ -261,13 +261,15 @@ bool QXbmHandler::readHeader() bool QXbmHandler::canRead() const { - if (state == Ready) { - if (!canRead(device())) - return false; + if (state == Ready && !canRead(device())) + return false; + + if (state != Error) { setFormat("xbm"); return true; } - return state != Error; + + return false; } bool QXbmHandler::canRead(QIODevice *device) diff --git a/src/gui/image/qxpmhandler.cpp b/src/gui/image/qxpmhandler.cpp index a475cd0..b97afd3 100644 --- a/src/gui/image/qxpmhandler.cpp +++ b/src/gui/image/qxpmhandler.cpp @@ -1225,11 +1225,15 @@ bool QXpmHandler::readImage(QImage *image) bool QXpmHandler::canRead() const { - if (state == Ready && canRead(device())) { + if (state == Ready && !canRead(device())) + return false; + + if (state != Error) { setFormat("xpm"); return true; } - return state != Error; + + return false; } bool QXpmHandler::canRead(QIODevice *device) diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 8abc2d1..5e2157e 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -1061,12 +1061,12 @@ bool QGifHandler::imageIsComing() const bool QGifHandler::canRead() const { - if (!nextDelay && canRead(device())) { + if (!nextDelay && canRead(device()) || imageIsComing()) { setFormat("gif"); return true; } - return imageIsComing(); + return false; } bool QGifHandler::canRead(QIODevice *device) diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp index 72dde15..60e7cce 100644 --- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp +++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp @@ -802,13 +802,15 @@ QJpegHandler::~QJpegHandler() bool QJpegHandler::canRead() const { - if(d->state == QJpegHandlerPrivate::Ready) { - if (!canRead(device())) - return false; + if(d->state == QJpegHandlerPrivate::Ready && !canRead(device())) + return false; + + if (d->state != QJpegHandlerPrivate::Error) { setFormat("jpeg"); return true; } - return d->state != QJpegHandlerPrivate::Error; + + return false; } bool QJpegHandler::canRead(QIODevice *device) diff --git a/src/plugins/imageformats/mng/qmnghandler.cpp b/src/plugins/imageformats/mng/qmnghandler.cpp index d408e6c..c134fd6 100644 --- a/src/plugins/imageformats/mng/qmnghandler.cpp +++ b/src/plugins/imageformats/mng/qmnghandler.cpp @@ -381,10 +381,10 @@ QMngHandler::~QMngHandler() bool QMngHandler::canRead() const { Q_D(const QMngHandler); - if (!d->haveReadNone) - return (!d->haveReadAll || (d->haveReadAll && (d->nextIndex < d->frameCount))); - - if (canRead(device())) { + if ((!d->haveReadNone + && (!d->haveReadAll || (d->haveReadAll && (d->nextIndex < d->frameCount)))) + || canRead(device())) + { setFormat("mng"); return true; } diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp index aadee5b..7e57973 100644 --- a/tests/auto/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/qimagereader/tst_qimagereader.cpp @@ -138,6 +138,9 @@ private slots: void sizeBeforeRead_data(); void sizeBeforeRead(); + void sizeBeforeFormat_data(); + void sizeBeforeFormat(); + void imageFormatBeforeRead_data(); void imageFormatBeforeRead(); @@ -706,6 +709,31 @@ void tst_QImageReader::sizeBeforeRead() QCOMPARE(size, image.size()); } +void tst_QImageReader::sizeBeforeFormat_data() +{ + imageFormat_data(); +} + +void tst_QImageReader::sizeBeforeFormat() +{ + QFETCH(QString, fileName); + + QByteArray formatA, formatB; + + { + QImageReader reader(prefix + fileName); + formatA = reader.format(); + } + + { + QImageReader reader(prefix + fileName); + QSize size = reader.size(); + formatB = reader.format(); + } + + QCOMPARE(formatA, formatB); +} + void tst_QImageReader::imageFormatBeforeRead_data() { imageFormat_data(); -- cgit v0.12 From 86b13101afe31934eddb0c904ac6d2815cd39e5e Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Tue, 15 Jun 2010 15:34:01 +0300 Subject: Stylus menu for Share (QT app) is different from native S60 apps This is part two of the fix. This fix makes the menu item to be layoutted always with space reserved for checkbox indicator, even if the menu item is not having one (just like native side). Also, the right and left "gap areas" (between menu border and menu item highlight) match the native side more closely now. There is still some difference if using QMenu (instead of QComboBoxListView), since we can't just ignore margin set from widget. Also, the Sym^3 "separator lines" are now started from correct position. Finally, the menu item height now matches the native side. Task-number: QT-3295 Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 66 +++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 9745d9c..1a8dd78 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -1768,40 +1768,41 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, //todo: move the vertical spacing stuff into subElementRect const int vSpacing = QS60StylePrivate::pixelMetric(PM_LayoutVerticalSpacing); QStyleOptionMenuItem optionCheckBox; - if (checkable){ - const int hSpacing = QS60StylePrivate::pixelMetric(PM_LayoutHorizontalSpacing); - optionCheckBox.QStyleOptionMenuItem::operator=(*menuItem); - optionCheckBox.rect.setWidth(pixelMetric(PM_IndicatorWidth)); - optionCheckBox.rect.setHeight(pixelMetric(PM_IndicatorHeight)); - optionCheckBox.rect.moveCenter(QPoint( - optionCheckBox.rect.center().x(), - menuItem->rect.center().y())); - const int moveByX = optionCheckBox.rect.width() + vSpacing + - pixelMetric(PM_DefaultFrameWidth) + 1; - if (optionMenuItem.direction == Qt::LeftToRight) { - if (iconRect.isValid()) { - iconRect.translate(moveByX, 0); - iconRect.setWidth(iconRect.width() + vSpacing); - } - if (textRect.isValid()) { - textRect.translate(moveByX, 0); - textRect.setWidth(textRect.width() - moveByX - vSpacing); - } - optionCheckBox.rect.translate(vSpacing >> 1, hSpacing >> 1); - } else { - if (textRect.isValid()) - textRect.setWidth(textRect.width() - moveByX); - if (iconRect.isValid()) { - iconRect.setWidth(iconRect.width() + vSpacing); - iconRect.translate(-optionCheckBox.rect.width() - vSpacing, 0); - } - optionCheckBox.rect.translate(textRect.width() + iconRect.width(), 0); + + //Regardless of checkbox visibility, make room for it, this mirrors native implementation, + //where text and icon placement is static regardless of content of menu item. + const int hSpacing = QS60StylePrivate::pixelMetric(PM_LayoutHorizontalSpacing); + optionCheckBox.QStyleOptionMenuItem::operator=(*menuItem); + optionCheckBox.rect.setWidth(pixelMetric(PM_IndicatorWidth)); + optionCheckBox.rect.setHeight(pixelMetric(PM_IndicatorHeight)); + optionCheckBox.rect.moveCenter(QPoint( + optionCheckBox.rect.center().x(), + menuItem->rect.center().y())); + const int moveByX = optionCheckBox.rect.width() + vSpacing + + pixelMetric(PM_DefaultFrameWidth); + if (optionMenuItem.direction == Qt::LeftToRight) { + if (iconRect.isValid()) { + iconRect.translate(moveByX, 0); + iconRect.setWidth(iconRect.width() + vSpacing); + } + if (textRect.isValid()) { + textRect.translate(moveByX, 0); + textRect.setWidth(textRect.width() - moveByX - vSpacing); + } + optionCheckBox.rect.translate(vSpacing + pixelMetric(PM_DefaultFrameWidth), hSpacing >> 1); + } else { + if (textRect.isValid()) + textRect.setWidth(textRect.width() - moveByX); + if (iconRect.isValid()) { + iconRect.setWidth(iconRect.width() + vSpacing); + iconRect.translate(-optionCheckBox.rect.width() - vSpacing, 0); } + optionCheckBox.rect.translate(textRect.width() + iconRect.width(), 0); } const bool selected = (option->state & State_Selected) && (option->state & State_Enabled); - const int spacing = pixelMetric(PM_DefaultFrameWidth) * 2; if (selected) { + const int spacing = pixelMetric(PM_DefaultFrameWidth) * 2; int start; int end; if (QApplication::layoutDirection() == Qt::LeftToRight) { start = optionMenuItem.rect.left() + spacing; @@ -1872,6 +1873,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, //In Sym^3, native menu items have "lines" between them if (QS60StylePrivate::isSingleClickUi()) { const QColor lineColorAlpha = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 15, 0); + const int spacing = QS60StylePrivate::pixelMetric(PM_FrameCornerWidth); //native platform sets each color byte to same value for "line 16" which just defines alpha for //menuitem lines; lets use first byte "red". QColor lineColor = optionMenuItem.palette.text().color(); @@ -2281,6 +2283,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget) && option->palette.window().texture().cacheKey() == QS60StylePrivate::m_themePalette->window().texture().cacheKey()) + //todo: for combobox listviews, the background should include area for menu scrollers, + //but this produces drawing issues as we need to turn clipping off. QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, option->rect, flags); else commonStyleDraws = true; @@ -2597,11 +2601,11 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt, } sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget); //native items have small empty areas at the beginning and end of menu item - sz.setWidth(sz.width() + 2 * pixelMetric(PM_MenuHMargin)); + sz.setWidth(sz.width() + 2 * pixelMetric(PM_MenuHMargin) + 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth)); if (QS60StylePrivate::isTouchSupported()) //Make itemview easier to use in touch devices //QCommonStyle does not adjust height with horizontal margin, it only adjusts width - sz.setHeight(sz.height() + 2 * pixelMetric(PM_FocusFrameVMargin)); + sz.setHeight(sz.height() + 2 * pixelMetric(PM_FocusFrameVMargin) - 8); //QCommonstyle adds 8 to height that this style handles through PM values break; #ifndef QT_NO_COMBOBOX case CT_ComboBox: { -- cgit v0.12 From e9e93fe79d7451f05a714241f759c557a455de67 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 15 Jun 2010 14:54:37 +0200 Subject: doc: Added more DITA output to the XML generator Task-number: QTBUG-11391 --- tools/qdoc3/ditaxmlgenerator.cpp | 542 ++++++++++----------------------------- tools/qdoc3/ditaxmlgenerator.h | 45 +--- tools/qdoc3/node.cpp | 35 +++ tools/qdoc3/node.h | 2 + 4 files changed, 178 insertions(+), 446 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 2c578f0..197bc13 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -501,6 +501,34 @@ QString DitaXmlGenerator::format() } /*! + Create a new GUID, write it to the XML stream + as an "id" attribute, and return it. + */ +QString DitaXmlGenerator::writeGuidAttribute(QString text) +{ + QString guid = QUuid::createUuid().toString(); + name2guidMap.insert(text,guid); + writer.writeAttribute("id",guid); + return guid; +} + +/*! + Looks up \a text in the GUID map. It it finds \a text, + it returns the associated GUID. Otherwise it inserts + \a text into the map with a new GUID, and it returns + the new GUID. + */ +QString DitaXmlGenerator::lookupGuid(QString text) +{ + QMap::const_iterator i = name2guidMap.find(text); + if (i != name2guidMap.end()) + return i.value(); + QString guid = QUuid::createUuid().toString(); + name2guidMap.insert(text,guid); + return guid; +} + +/*! This is where the DITA XML files are written. \note The file generation is done in the base class, PageGenerator::generateTree(). @@ -521,9 +549,6 @@ void DitaXmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) findAllFunctions(tree->root()); findAllLegaleseTexts(tree->root()); findAllNamespaces(tree->root()); -#ifdef ZZZ_QDOC_QML - findAllQmlClasses(tree->root()); -#endif findAllSince(tree->root()); PageGenerator::generateTree(tree, marker); @@ -552,7 +577,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, int skipAhead = 0; QString hx; static bool in_para = false; - + QString guid; + switch (atom->type()) { case Atom::AbstractLeft: break; @@ -922,10 +948,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, s = sections.constBegin(); while (s != sections.constEnd()) { if (!(*s).members.isEmpty()) { - QString guid = QUuid::createUuid().toString(); - guidMap.insert(Doc::canonicalTitle((*s).name),guid); writer.writeStartElement("p"); - writer.writeAttribute("id",guid); + writeGuidAttribute(Doc::canonicalTitle((*s).name)); writer.writeAttribute("outputclass","h3"); writer.writeCharacters(protectEnc((*s).name)); writer.writeEndElement(); //

    @@ -1203,10 +1227,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, writer.writeCharacters(atom->string()); break; case Atom::SectionLeft: -#if zzz - out() << "\n"; -#endif + writer.writeStartElement("p"); + writeGuidAttribute(Doc::canonicalTitle(Text::sectionHeading(atom).toString())); + writer.writeAttribute("outputclass","target"); + writer.writeCharacters(protectEnc(Text::sectionHeading(atom).toString())); + writer.writeEndElement(); //

    break; case Atom::SectionRight: // nothing @@ -1338,20 +1363,23 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } break; case Atom::Target: -#if zzz - out() << "string()) << "\">"; -#endif + writer.writeStartElement("p"); + writeGuidAttribute(Doc::canonicalTitle(atom->string())); + writer.writeAttribute("outputclass","target"); + writer.writeCharacters(protectEnc(atom->string())); + writer.writeEndElement(); //

    break; case Atom::UnhandledFormat: -#if zzz - out() << "<Missing DITAXML>"; -#endif + writer.writeStartElement("b"); + writer.writeAttribute("outputclass","redFont"); + writer.writeCharacters("<Missing DITAXML>"); + writer.writeEndElement(); // break; case Atom::UnknownCommand: -#if zzz - out() << "\\" << protectEnc(atom->string()) - << ""; -#endif + writer.writeStartElement("b"); + writer.writeAttribute("outputclass","redFont code"); + writer.writeCharacters(protectEnc(atom->string())); + writer.writeEndElement(); // break; #ifdef QDOC_QML case Atom::QmlText: @@ -1375,7 +1403,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark QList
    sections; QList
    ::ConstIterator s; - const ClassNode *classe = 0; + const ClassNode* cn = 0; const NamespaceNode *namespasse = 0; QString title; @@ -1388,43 +1416,51 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark title = rawTitle + " Namespace"; } else if (inner->type() == Node::Class) { - classe = static_cast(inner); + cn = static_cast(inner); rawTitle = marker->plainName(inner); fullTitle = marker->plainFullName(inner); title = rawTitle + " Class Reference"; - } - - Text subtitleText; - if (rawTitle != fullTitle) - subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" - << Atom(Atom::LineBreak); - generateHeader(inner); + generateHeader(inner); - writer.writeStartElement(CXXCLASS); - writer.writeStartElement(APINAME); - writer.writeCharacters(fullTitle); - writer.writeEndElement(); // apiName + writer.writeStartElement(CXXCLASS); + writeGuidAttribute(fullTitle); + writer.writeStartElement(APINAME); + writer.writeCharacters(fullTitle); + writer.writeEndElement(); // - generateBrief(inner, marker); + generateBrief(inner, marker); - writer.writeStartElement(CXXCLASSDETAIL); - writer.writeStartElement(APIDESC); - - if (!inner->doc().isEmpty()) { - writer.writeStartElement("p"); - writer.writeAttribute("outputclass","h2"); - writer.writeCharacters("Detailed Description"); - writer.writeEndElement(); // p - generateBody(inner, marker); - // generateAlsoList(inner, marker); - } + writer.writeStartElement(CXXCLASSDETAIL); + writer.writeStartElement(CXXCLASSDEFINITION); + writer.writeStartElement(CXXCLASSACCESSSPECIFIER); + writer.writeAttribute("value",inner->accessString()); + writer.writeEndElement(); // + writeDerivations(cn, marker); + writeLocation(cn, marker); + writer.writeEndElement(); // + writer.writeStartElement(APIDESC); + + if (!inner->doc().isEmpty()) { + writer.writeStartElement("p"); + writer.writeAttribute("outputclass","h2"); + writer.writeCharacters("Detailed Description"); + writer.writeEndElement(); //

    + generateBody(inner, marker); + // generateAlsoList(inner, marker); + } - writer.writeEndElement(); // apiDesc - writer.writeEndElement(); // cxxClassDetail - writer.writeEndElement(); // cxxClass + writer.writeEndElement(); // + writer.writeEndElement(); // + writer.writeEndElement(); // + } #ifdef WRITE_HTML + Text subtitleText; + if (rawTitle != fullTitle) + subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" + << Atom(Atom::LineBreak); + QString shortVersion; shortVersion = project + " " + shortVersion + ": "; shortVersion = myTree->version(); @@ -1450,17 +1486,17 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark generateTitle(title, subtitleText, SmallSubTitle, inner, marker); #ifdef QDOC_QML - if (classe && !classe->qmlElement().isEmpty()) { - generateInstantiatedBy(classe,marker); + if (cn && !cn->qmlElement().isEmpty()) { + generateInstantiatedBy(cn,marker); } #endif generateBrief(inner, marker); generateIncludes(inner, marker); generateStatus(inner, marker); - if (classe) { - generateInherits(classe, marker); - generateInheritedBy(classe, marker); + if (cn) { + generateInherits(cn, marker); + generateInheritedBy(cn, marker); } generateThreadSafeness(inner, marker); generateSince(inner, marker); @@ -1895,37 +1931,11 @@ void DitaXmlGenerator::generateHeader(const Node* node) version = "0.6.0"; } -#if 0 - writer.writeCharacters("\n\n"); - - if (node && !node->doc().location().isEmpty()) { - writer.writeCharacters("\n"); - } -#endif - QString doctype = ""; writer.writeDTD(doctype); writer.writeComment(node->doc().location().fileName()); - -#if 0 - out() << "\n\n"; - - if (node && !node->doc().location().isEmpty()) - out() << "\n"; - out().flush(); -#endif } void DitaXmlGenerator::generateTitle(const QString& title, @@ -2173,37 +2183,6 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node, inLink = false; } -#if 0 -void DitaXmlGenerator::generateNavigationBar(const NavigationBar& bar, - const Node *node, - CodeMarker *marker) -{ - if (bar.prev.begin() != 0 || bar.current.begin() != 0 || - bar.next.begin() != 0) { - out() << "

    "; - if (bar.prev.begin() != 0) { -#if 0 - out() << "[Prev: "; - generateText(section.previousHeading(), node, marker); - out() << "]\n"; -#endif - } - if (bar.current.begin() != 0) { - out() << "[Home]\n"; - } - if (bar.next.begin() != 0) { - out() << "[Next: "; - generateText(Text::sectionHeading(bar.next.begin()), node, marker); - out() << "]\n"; - } - out() << "

    \n"; - } -} -#endif - QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode *inner, CodeMarker *marker) { @@ -2855,7 +2834,6 @@ void DitaXmlGenerator::generateOverviewList(const Node *relative, CodeMarker * / } } -#ifdef QDOC_NAME_ALIGNMENT void DitaXmlGenerator::generateSection(const NodeList& nl, const Node *relative, CodeMarker *marker, @@ -3220,281 +3198,6 @@ QString DitaXmlGenerator::highlightedCode(const QString& markedCode, return html; } -#else -void DitaXmlGenerator::generateSectionList(const Section& section, - const Node *relative, - CodeMarker *marker, - CodeMarker::SynopsisStyle style) -{ - if (!section.members.isEmpty()) { - bool twoColumn = false; - if (style == CodeMarker::SeparateList) { - twoColumn = (section.members.count() >= 16); - } - else if (section.members.first()->type() == Node::Property) { - twoColumn = (section.members.count() >= 5); - } - if (twoColumn) - out() << "\n"; - if (++numTableRows % 2 == 1) - out() << ""; - else - out() << ""; - -// << "\n
    "; - out() << "
      \n"; - - int i = 0; - NodeList::ConstIterator m = section.members.begin(); - while (m != section.members.end()) { - if ((*m)->access() == Node::Private) { - ++m; - continue; - } - - if (twoColumn && i == (int) (section.members.count() + 1) / 2) - out() << "
      \n"; - - out() << "
    • "; - if (style == CodeMarker::Accessors) - out() << ""; - generateSynopsis(*m, relative, marker, style); - if (style == CodeMarker::Accessors) - out() << ""; - out() << "
    • \n"; - i++; - ++m; - } - out() << "
    \n"; - if (twoColumn) - out() << "
    \n"; - } - - if (style == CodeMarker::Summary && !section.inherited.isEmpty()) { - out() << "
      \n"; - generateSectionInheritedList(section, relative, marker); - out() << "
    \n"; - } -} - -void DitaXmlGenerator::generateSectionInheritedList(const Section& section, - const Node *relative, - CodeMarker *marker) -{ - QList >::ConstIterator p = section.inherited.begin(); - while (p != section.inherited.end()) { - out() << "
  • "; - out() << (*p).second << " "; - if ((*p).second == 1) { - out() << section.singularMember; - } else { - out() << section.pluralMember; - } - out() << " inherited from " - << protectEnc(marker->plainFullName((*p).first, relative)) - << "
  • \n"; - ++p; - } -} - -void DitaXmlGenerator::generateSynopsis(const Node *node, - const Node *relative, - CodeMarker *marker, - CodeMarker::SynopsisStyle style) -{ - QString marked = marker->markedUpSynopsis(node, relative, style); - QRegExp templateTag("(<[^@>]*>)"); - if (marked.indexOf(templateTag) != -1) { - QString contents = protectEnc(marked.mid(templateTag.pos(1), - templateTag.cap(1).length())); - marked.replace(templateTag.pos(1), templateTag.cap(1).length(), - contents); - } - marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])"), "\\1\\2"); - marked.replace("<@param>", ""); - marked.replace("", ""); - - if (style == CodeMarker::Summary) - marked.replace("@name>", "b>"); - - if (style == CodeMarker::SeparateList) { - QRegExp extraRegExp("<@extra>.*"); - extraRegExp.setMinimal(true); - marked.replace(extraRegExp, ""); - } else { - marked.replace("<@extra>", ""); - marked.replace("", ""); - } - - if (style != CodeMarker::Detailed) { - marked.replace("<@type>", ""); - marked.replace("", ""); - } - out() << highlightedCode(marked, marker, relative); -} - -QString DitaXmlGenerator::highlightedCode(const QString& markedCode, - CodeMarker *marker, - const Node *relative) -{ - QString src = markedCode; - QString html; - QStringRef arg; - QStringRef par1; - - const QChar charLangle = '<'; - const QChar charAt = '@'; - - // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*()" - static const QString linkTag("link"); - for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1) == charAt) { - i += 2; - if (parseArg(src, linkTag, &i, n, &arg, &par1)) { - const Node* node = CodeMarker::nodeForString(par1.toString()); - QString link = linkForNode(node, relative); - addLink(link, arg, &html); - } - else { - html += charLangle; - html += charAt; - } - } - else { - html += src.at(i++); - } - } - - if (slow) { - // is this block ever used at all? - // replace all <@func> tags: "(<@func target=\"([^\"]*)\">)(.*)()" - src = html; - html = QString(); - static const QString funcTag("func"); - for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1) == charAt) { - i += 2; - if (parseArg(src, funcTag, &i, n, &arg, &par1)) { - QString link = linkForNode( - marker->resolveTarget(par1.toString(), - myTree, - relative), - relative); - addLink(link, arg, &html); - par1 = QStringRef(); - } - else { - html += charLangle; - html += charAt; - } - } - else { - html += src.at(i++); - } - } - } - - // replace all "(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)()" tags - src = html; - html = QString(); - static const QString typeTags[] = { "type", "headerfile", "func" }; - for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1) == charAt) { - i += 2; - bool handled = false; - for (int k = 0; k != 3; ++k) { - if (parseArg(src, typeTags[k], &i, n, &arg, &par1)) { - par1 = QStringRef(); - QString link = linkForNode( - marker->resolveTarget(arg.toString(), myTree, relative), - relative); - addLink(link, arg, &html); - handled = true; - break; - } - } - if (!handled) { - html += charLangle; - html += charAt; - } - } - else { - html += src.at(i++); - } - } - - // replace all - // "<@comment>" -> ""; - // "<@preprocessor>" -> ""; - // "<@string>" -> ""; - // "<@char>" -> ""; - // "" -> "" - src = html; - html = QString(); - static const QString spanTags[] = { - "<@comment>", "", - "<@preprocessor>", "", - "<@string>", "", - "<@char>", "", - "", "", - "","", - "", "", - "", "" - // "<@char>", "", - // "", "", - // "<@func>", "", - // "", "", - // "<@id>", "", - // "", "", - // "<@keyword>", "", - // "", "", - // "<@number>", "", - // "", "", - // "<@op>", "", - // "", "", - // "<@param>", "", - // "", "", - // "<@string>", "", - // "", "", - }; - for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle) { - bool handled = false; - for (int k = 0; k != 8; ++k) { - const QString & tag = spanTags[2 * k]; - if (tag == QStringRef(&src, i, tag.length())) { - html += spanTags[2 * k + 1]; - i += tag.length(); - handled = true; - break; - } - } - if (!handled) { - ++i; - if (src.at(i) == charAt || - (src.at(i) == QLatin1Char('/') && src.at(i + 1) == charAt)) { - // drop 'our' unknown tags (the ones still containing '@') - while (i < n && src.at(i) != QLatin1Char('>')) - ++i; - ++i; - } - else { - // retain all others - html += charLangle; - } - } - } - else { - html += src.at(i); - ++i; - } - } - - return html; -} -#endif - void DitaXmlGenerator::generateLink(const Atom* atom, const Node* /* relative */, CodeMarker* marker) @@ -4087,29 +3790,6 @@ void DitaXmlGenerator::findAllNamespaces(const InnerNode *node) } } -#ifdef ZZZ_QDOC_QML -/*! - This function finds all the qml element nodes and - stores them in a map for later use. - */ -void DitaXmlGenerator::findAllQmlClasses(const InnerNode *node) -{ - NodeList::const_iterator c = node->childNodes().constBegin(); - while (c != node->childNodes().constEnd()) { - if ((*c)->type() == Node::Fake) { - const FakeNode* fakeNode = static_cast(*c); - if (fakeNode->subType() == Node::QmlClass) { - const QmlClassNode* qmlNode = - static_cast(fakeNode); - const Node* n = qmlNode->classNode(); - } - qmlClasses.insert(fakeNode->name(),*c); - } - ++c; - } -} -#endif - int DitaXmlGenerator::hOffset(const Node *node) { switch (node->type()) { @@ -4795,4 +4475,46 @@ void DitaXmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* ma #endif +void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker) +{ + QList::ConstIterator r; + int index; + + if (!cn->baseClasses().isEmpty()) { + writer.writeStartElement(CXXCLASSDERIVATIONS); + r = cn->baseClasses().begin(); + index = 0; + while (r != cn->baseClasses().end()) { + writer.writeStartElement(CXXCLASSDERIVATION); + writer.writeStartElement(CXXCLASSDERIVATIONACCESSSPECIFIER); + writer.writeAttribute("value",(*r).accessString()); + writer.writeEndElement(); // + writer.writeStartElement(CXXCLASSBASECLASS); + QString fullTitle = marker->plainFullName((*r).node); + QString guid = lookupGuid(fullTitle); + writer.writeAttribute("href",guid); + writer.writeCharacters(fullTitle); + writer.writeEndElement(); // + writer.writeEndElement(); // + ++r; + } + writer.writeEndElement(); // + } +} + +void DitaXmlGenerator::writeLocation(const ClassNode* cn, CodeMarker* marker) +{ + writer.writeStartElement(CXXCLASSAPIITEMLOCATION); + writer.writeStartElement(CXXCLASSDECLARATIONFILE); + writer.writeAttribute("name","filePath"); + writer.writeAttribute("value",cn->location().filePath()); + writer.writeEndElement(); // + writer.writeStartElement(CXXCLASSDECLARATIONFILELINE); + writer.writeAttribute("name","lineNumber"); + QString lineNr; + writer.writeAttribute("value",lineNr.setNum(cn->location().lineNo())); + writer.writeEndElement(); // + writer.writeEndElement(); // +} + QT_END_NAMESPACE diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 1a5eca0..070329b 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -46,8 +46,6 @@ #ifndef DITAXMLGENERATOR_H #define DITAXMLGENERATOR_H -#define QDOC_NAME_ALIGNMENT - #include #include #include @@ -57,15 +55,6 @@ QT_BEGIN_NAMESPACE -#if 0 -struct NavigationBar -{ - SectionIterator prev; - SectionIterator current; - SectionIterator next; -}; -#endif - typedef QMultiMap NodeMultiMap; typedef QMap NewSinceMaps; typedef QMap ParentMaps; @@ -120,6 +109,9 @@ class DitaXmlGenerator : public PageGenerator virtual QString refForNode(const Node *node); virtual QString linkForNode(const Node *node, const Node *relative); virtual QString refForAtom(Atom *atom, const Node *node); + + void writeDerivations(const ClassNode* cn, CodeMarker* marker); + void writeLocation(const ClassNode* cn, CodeMarker* marker); private: enum SubTitleSize { SmallSubTitle, LargeSubTitle }; @@ -140,11 +132,6 @@ class DitaXmlGenerator : public PageGenerator CodeMarker *marker); void generateBrief(const Node* node, CodeMarker* marker); void generateIncludes(const InnerNode *inner, CodeMarker *marker); -#if 0 - void generateNavigationBar(const NavigationBar& bar, - const Node *node, - CodeMarker *marker); -#endif void generateTableOfContents(const Node *node, CodeMarker *marker, Doc::SectioningUnit sectioningUnit, @@ -191,7 +178,7 @@ class DitaXmlGenerator : public PageGenerator void generateQmlInstantiates(const QmlClassNode* qcn, CodeMarker* marker); void generateInstantiatedBy(const ClassNode* cn, CodeMarker* marker); #endif -#ifdef QDOC_NAME_ALIGNMENT + void generateSection(const NodeList& nl, const Node *relative, CodeMarker *marker, @@ -210,18 +197,7 @@ class DitaXmlGenerator : public PageGenerator const Node *relative, CodeMarker::SynopsisStyle style = CodeMarker::Accessors, bool nameAlignment = false); -#else - void generateSynopsis(const Node *node, - const Node *relative, - CodeMarker *marker, - CodeMarker::SynopsisStyle style); - void generateSectionInheritedList(const Section& section, - const Node *relative, - CodeMarker *marker); - QString highlightedCode(const QString& markedCode, - CodeMarker *marker, - const Node *relative); -#endif + void generateFullName(const Node *apparentNode, const Node *relative, CodeMarker *marker, @@ -244,9 +220,6 @@ class DitaXmlGenerator : public PageGenerator void findAllFunctions(const InnerNode *node); void findAllLegaleseTexts(const InnerNode *node); void findAllNamespaces(const InnerNode *node); -#ifdef ZZZ_QDOC_QML - void findAllQmlClasses(const InnerNode *node); -#endif void findAllSince(const InnerNode *node); static int hOffset(const Node *node); static bool isThreeColumnEnumValueTable(const Atom *atom); @@ -273,12 +246,12 @@ class DitaXmlGenerator : public PageGenerator CodeMarker* marker) const; void generatePageIndex(const QString& fileName, CodeMarker* marker) const; + QString writeGuidAttribute(QString text); + QString lookupGuid(QString text); -#if 0 - NavigationBar currentNavigationBar; -#endif + private: QMap refMap; - QMap guidMap; + QMap name2guidMap; int codeIndent; bool inLink; bool inObsoleteLink; diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 3c7e9dc..4664e9d 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -154,6 +154,41 @@ void Node::setLink(LinkType linkType, const QString &link, const QString &desc) } /*! + Returns a string representing the access specifier. + */ +QString Node::accessString() const +{ + switch (acc) { + case Protected: + return "protected"; + case Private: + return "private"; + case Public: + default: + break; + } + return "public"; +} + + +/*! + Returns a string representing the access specifier. + */ +QString RelatedClass::accessString() const +{ + switch (access) { + case Node::Protected: + return "protected"; + case Node::Private: + return "private"; + case Node::Public: + default: + break; + } + return "public"; +} + +/*! */ Node::Status Node::inheritedStatus() const { diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 215a7ae..523394d 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -175,6 +175,7 @@ class Node virtual QString nameForLists() const { return nam; } Access access() const { return acc; } + QString accessString() const; const Location& location() const { return loc; } const Doc& doc() const { return d; } Status status() const { return sta; } @@ -312,6 +313,7 @@ struct RelatedClass : access(access0), node(node0), dataTypeWithTemplateArgs(dataTypeWithTemplateArgs0) { } + QString accessString() const; Node::Access access; ClassNode* node; -- cgit v0.12 From 20a39c16f236f999cd1694cdc47a3739efcbbfe4 Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Tue, 15 Jun 2010 13:39:25 +0200 Subject: Temporary fix for regression in QSslCertificate::fromPath() The regression was introduced with 164f347aba7287407615223dc2219a016ebc8248. As soon as possible we should probably rewrite the fromPath() function, to have a proper solution. Nevertheless this might be a bigger change and should not be done so late in release cycle. Reviewed-by: TrustMe --- src/network/ssl/qsslcertificate.cpp | 11 ++++++++--- tests/auto/qsslcertificate/tst_qsslcertificate.cpp | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index ed12e00..a3ea555 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -537,7 +537,7 @@ QList QSslCertificate::fromPath(const QString &path, // $, (,), *, +, ., ?, [, ,], ^, {, | and }. int pos = -1; if (syntax == QRegExp::Wildcard) - pos = path.indexOf(QRegExp(QLatin1String("[\\*\\?\\[]"))); + pos = path.indexOf(QRegExp(QLatin1String("[^\\][\\*\\?\\[\\]]"))); else if (syntax != QRegExp::FixedString) pos = path.indexOf(QRegExp(QLatin1String("[^\\][\\$\\(\\)\\*\\+\\.\\?\\[\\]\\^\\{\\}\\|]"))); QString pathPrefix = path.left(pos); // == path if pos < 0 @@ -548,8 +548,13 @@ QList QSslCertificate::fromPath(const QString &path, // chop off the first two characters from the glob'ed paths. int startIndex = 0; if (pathPrefix.trimmed().isEmpty()) { - startIndex = 2; - pathPrefix = QLatin1String("."); + if(path.startsWith(QLatin1Char('/'))) { + pathPrefix = path.left(path.indexOf(QRegExp(QLatin1String("[\\*\\?\\[]")))); + pathPrefix = path.left(path.lastIndexOf(QLatin1Char('/'))); + } else { + startIndex = 2; + pathPrefix = QLatin1String("."); + } } // The path is a file. diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp index 505b867..d0509bb 100644 --- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp @@ -542,6 +542,9 @@ void tst_QSslCertificate::fromPath_data() QTest::newRow("\"d.*/c.*.pem\" regexp der") << QString("d.*/c.*.pem") << int(QRegExp::RegExp) << false << 0; QTest::newRow("\"d.*/c.*.pem\" wildcard pem") << QString("d.*/c.*.pem") << int(QRegExp::Wildcard) << true << 0; QTest::newRow("\"d.*/c.*.pem\" wildcard der") << QString("d.*/c.*.pem") << int(QRegExp::Wildcard) << false << 0; +#ifdef Q_OS_LINUX + QTest::newRow("absolute path wildcard pem") << QString(QDir::currentPath() + "/certificates/*.pem") << int(QRegExp::Wildcard) << true << 4; +#endif QTest::newRow("trailing-whitespace") << QString("more-certificates/trailing-whitespace.pem") << int(QRegExp::FixedString) << true << 1; QTest::newRow("no-ending-newline") << QString("more-certificates/no-ending-newline.pem") << int(QRegExp::FixedString) << true << 1; -- cgit v0.12 From 28ce5c1f2c0dbbfe45b5c3744bf03a2548c12223 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Tue, 15 Jun 2010 16:09:41 +0300 Subject: ComboBox popuplist is not correctly layouted in fullscreen mode This is part two of the fix for issue QTBUG-9913. This corrects the left margin of the ComboBox menu to start from the left screen border (for LetToRight UI Layout), instead of having small margin. Task-number: QTBUG-9913 Reviewed-by: Alessandro Portale --- src/gui/styles/qs60style.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 1a8dd78..45bcc00 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2870,16 +2870,7 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple } break; case SC_ComboBoxListBoxPopup: { - const QRect desktopContent = QApplication::desktop()->availableGeometry(); - - // take the size of this and position bottom above available area - QRect popupRect; - const int width = desktopContent.width() - pixelMetric(PM_LayoutRightMargin) - pixelMetric(PM_LayoutLeftMargin); - popupRect.setWidth(width); - popupRect.setHeight(desktopContent.height()); //combobox resets height anyway based on content - popupRect.setBottom(desktopContent.bottom()); - popupRect.translate(pixelMetric(PM_LayoutLeftMargin), 0); - ret = popupRect; + ret = QApplication::desktop()->availableGeometry(); } break; default: -- cgit v0.12 From 0e0e74f23566de7ae408a2e7091001941508b694 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 14 Jun 2010 10:12:07 +0200 Subject: Use native locale aware string comparison on Symbian. Fix to use the native CompareC function instead. Task-number: QTBUG-11350 Reviewed-by: Miikka Heikkinen --- src/corelib/tools/qstring.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 1d5fab3..57f79a0 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -4768,6 +4768,10 @@ int QString::localeAwareCompare_helper(const QChar *data1, int length1, CFRelease(thisString); CFRelease(otherString); return result; +#elif defined(Q_OS_SYMBIAN) + TPtrC p1 = TPtrC16(reinterpret_cast(data1), length1); + TPtrC p2 = TPtrC16(reinterpret_cast(data2), length2); + return p1.CompareC(p2); #elif defined(Q_OS_UNIX) // declared in int delta = strcoll(toLocal8Bit_helper(data1, length1), toLocal8Bit_helper(data2, length2)); -- cgit v0.12 From 6d9374686d8c41b89ce74836b76e157629c2f531 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 15 Jun 2010 16:23:50 +0200 Subject: Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to 1313dc84678c74f1c24f910f702d7ed27a417607 This includes Andreas' changes to reduce the memory usage by packing and re-odering data structures as well as Lars' greek shaper. --- src/3rdparty/harfbuzz/src/Makefile.am | 3 +- src/3rdparty/harfbuzz/src/harfbuzz-buffer.h | 16 +- src/3rdparty/harfbuzz/src/harfbuzz-dump.c | 10 +- src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h | 25 +- src/3rdparty/harfbuzz/src/harfbuzz-gdef.c | 4 + src/3rdparty/harfbuzz/src/harfbuzz-gdef.h | 21 +- src/3rdparty/harfbuzz/src/harfbuzz-global.h | 4 + src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h | 35 +- src/3rdparty/harfbuzz/src/harfbuzz-gpos.c | 73 +++- src/3rdparty/harfbuzz/src/harfbuzz-gpos.h | 6 + src/3rdparty/harfbuzz/src/harfbuzz-greek.c | 447 +++++++++++++++++++++ src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h | 151 +++---- src/3rdparty/harfbuzz/src/harfbuzz-gsub.h | 23 +- src/3rdparty/harfbuzz/src/harfbuzz-hangul.c | 2 +- src/3rdparty/harfbuzz/src/harfbuzz-open-private.h | 6 +- src/3rdparty/harfbuzz/src/harfbuzz-open.c | 36 +- src/3rdparty/harfbuzz/src/harfbuzz-open.h | 48 ++- src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp | 1 + .../harfbuzz/src/harfbuzz-shaper-private.h | 1 + src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp | 2 +- src/3rdparty/harfbuzz/src/harfbuzz-shaper.h | 44 +- src/3rdparty/harfbuzz/src/harfbuzz-stream.h | 10 +- src/3rdparty/harfbuzz/tests/fuzzing/fuzz.cc | 124 ++++++ 23 files changed, 912 insertions(+), 180 deletions(-) create mode 100644 src/3rdparty/harfbuzz/src/harfbuzz-greek.c create mode 100644 src/3rdparty/harfbuzz/tests/fuzzing/fuzz.cc diff --git a/src/3rdparty/harfbuzz/src/Makefile.am b/src/3rdparty/harfbuzz/src/Makefile.am index 2b0fb1d..51d0652 100644 --- a/src/3rdparty/harfbuzz/src/Makefile.am +++ b/src/3rdparty/harfbuzz/src/Makefile.am @@ -12,7 +12,8 @@ MAINSOURCES = \ harfbuzz-impl.c \ harfbuzz-open.c \ harfbuzz-shaper.cpp \ - harfbuzz-tibetan.c \ + harfbuzz-greek.c \ + harfbuzz-tibetan.c \ harfbuzz-khmer.c \ harfbuzz-indic.cpp \ harfbuzz-hebrew.c \ diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h b/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h index b134407..0d7c2c2 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-buffer.h @@ -32,6 +32,10 @@ HB_BEGIN_HEADER +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(push, 1) +#endif + typedef struct HB_GlyphItemRec_ { HB_UInt gindex; HB_UInt properties; @@ -48,13 +52,13 @@ typedef struct HB_PositionRec_ { HB_Fixed y_advance; HB_UShort back; /* number of glyphs to go back for drawing current glyph */ + HB_Short cursive_chain; /* character to which this connects, + may be positive or negative; used + only internally */ HB_Bool new_advance; /* if set, the advance width values are absolute, i.e., they won't be added to the original glyph's value but rather replace them. */ - HB_Short cursive_chain; /* character to which this connects, - may be positive or negative; used - only internally */ } HB_PositionRec, *HB_Position; @@ -66,12 +70,12 @@ typedef struct HB_BufferRec_{ HB_UInt in_pos; HB_UInt out_pos; - HB_Bool separate_out; HB_GlyphItem in_string; HB_GlyphItem out_string; HB_GlyphItem alt_string; HB_Position positions; HB_UShort max_ligID; + HB_Bool separate_out; } HB_BufferRec, *HB_Buffer; HB_Error @@ -89,6 +93,10 @@ hb_buffer_add_glyph( HB_Buffer buffer, HB_UInt properties, HB_UInt cluster ); +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(pop) +#endif + HB_END_HEADER #endif /* HARFBUZZ_BUFFER_H */ diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-dump.c b/src/3rdparty/harfbuzz/src/harfbuzz-dump.c index 8c81da1..a1ef6b6 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-dump.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-dump.c @@ -519,13 +519,14 @@ Dump_ValueRecord (HB_ValueRecord *ValueRecord, FILE *stream, int indent, HB_Type if (value_format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE) DUMP_FINT (ValueRecord, XAdvance); if (value_format & HB_GPOS_FORMAT_HAVE_X_PLACEMENT_DEVICE) - RECURSE (Device, Device, &ValueRecord->XPlacementDevice); + RECURSE (Device, Device, &*ValueRecord->XPlacementDevice); if (value_format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE) - RECURSE (Device, Device, &ValueRecord->YPlacementDevice); + RECURSE (Device, Device, &*ValueRecord->YPlacementDevice); if (value_format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE) - RECURSE (Device, Device, &ValueRecord->XAdvanceDevice); + RECURSE (Device, Device, &*ValueRecord->XAdvanceDevice); if (value_format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE) - RECURSE (Device, Device, &ValueRecord->YAdvanceDevice); + RECURSE (Device, Device, &*ValueRecord->YAdvanceDevice); +#ifdef HB_SUPPORT_MULTIPLE_MASTER if (value_format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT) DUMP_FUINT (ValueRecord, XIdPlacement); if (value_format & HB_GPOS_FORMAT_HAVE_Y_ID_PLACEMENT) @@ -534,6 +535,7 @@ Dump_ValueRecord (HB_ValueRecord *ValueRecord, FILE *stream, int indent, HB_Type DUMP_FUINT (ValueRecord, XIdAdvance); if (value_format & HB_GPOS_FORMAT_HAVE_Y_ID_ADVANCE) DUMP_FUINT (ValueRecord, XIdAdvance); +#endif } static void diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h index da06b6f..2a6d958 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef-private.h @@ -34,12 +34,16 @@ HB_BEGIN_HEADER +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(push, 1) +#endif + /* Attachment related structures */ struct HB_AttachPoint_ { - HB_UShort PointCount; /* size of the PointIndex array */ HB_UShort* PointIndex; /* array of contour points */ + HB_UShort PointCount; /* size of the PointIndex array */ }; /* Ligature Caret related structures */ @@ -62,32 +66,36 @@ typedef struct HB_CaretValueFormat2_ HB_CaretValueFormat2; struct HB_CaretValueFormat3_ { + HB_Device* Device; /* Device table for x or y value */ HB_Short Coordinate; /* x or y value (in design units) */ - HB_Device Device; /* Device table for x or y value */ }; typedef struct HB_CaretValueFormat3_ HB_CaretValueFormat3; +#ifdef HB_SUPPORT_MULTIPLE_MASTER struct HB_CaretValueFormat4_ { HB_UShort IdCaretValue; /* metric ID */ }; typedef struct HB_CaretValueFormat4_ HB_CaretValueFormat4; +#endif struct HB_CaretValue_ { - HB_UShort CaretValueFormat; /* 1, 2, 3, or 4 */ - union { HB_CaretValueFormat1 cvf1; HB_CaretValueFormat2 cvf2; HB_CaretValueFormat3 cvf3; +#ifdef HB_SUPPORT_MULTIPLE_MASTER HB_CaretValueFormat4 cvf4; +#endif } cvf; + + HB_Byte CaretValueFormat; /* 1, 2, 3, or 4 */ }; typedef struct HB_CaretValue_ HB_CaretValue; @@ -95,10 +103,9 @@ typedef struct HB_CaretValue_ HB_CaretValue; struct HB_LigGlyph_ { - HB_Bool loaded; - - HB_UShort CaretCount; /* number of caret values */ HB_CaretValue* CaretValue; /* array of caret values */ + HB_UShort CaretCount; /* number of caret values */ + HB_Bool loaded; }; @@ -119,6 +126,10 @@ _HB_GDEF_LoadMarkAttachClassDef_From_LookupFlags( HB_GDEFHeader* gdef, HB_Lookup* lo, HB_UShort num_lookups ); +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(pop) +#endif + HB_END_HEADER #endif /* HARFBUZZ_GDEF_PRIVATE_H */ diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.c b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.c index ff3a1f4..c0c6f2c 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.c @@ -442,7 +442,11 @@ static HB_Error Load_CaretValue( HB_CaretValue* cv, if ( ACCESS_Frame( 2L ) ) return error; +#ifdef HB_SUPPORT_MULTIPLE_MASTER cv->cvf.cvf4.IdCaretValue = GET_UShort(); +#else + (void) GET_UShort(); +#endif FORGET_Frame(); break; diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h index b6dcadc..f9a03dd 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gdef.h @@ -31,6 +31,10 @@ HB_BEGIN_HEADER +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(push, 1) +#endif + /* GDEF glyph properties. Note that HB_GDEF_COMPONENT has no corresponding * flag in the LookupFlag field. */ #define HB_GDEF_BASE_GLYPH 0x0002 @@ -44,12 +48,11 @@ typedef struct HB_AttachPoint_ HB_AttachPoint; struct HB_AttachList_ { - HB_Bool loaded; - + HB_AttachPoint* AttachPoint; /* array of AttachPoint tables */ HB_Coverage Coverage; /* Coverage table */ HB_UShort GlyphCount; /* number of glyphs with attachments */ - HB_AttachPoint* AttachPoint; /* array of AttachPoint tables */ + HB_Bool loaded; }; typedef struct HB_AttachList_ HB_AttachList; @@ -58,11 +61,10 @@ typedef struct HB_LigGlyph_ HB_LigGlyph; struct HB_LigCaretList_ { - HB_Bool loaded; - + HB_LigGlyph* LigGlyph; /* array of LigGlyph tables */ HB_Coverage Coverage; /* Coverage table */ HB_UShort LigGlyphCount; /* number of ligature glyphs */ - HB_LigGlyph* LigGlyph; /* array of LigGlyph tables */ + HB_Bool loaded; }; typedef struct HB_LigCaretList_ HB_LigCaretList; @@ -91,18 +93,18 @@ typedef struct HB_LigCaretList_ HB_LigCaretList; struct HB_GDEFHeader_ { + HB_UShort** NewGlyphClasses; HB_UInt offset; + HB_UInt MarkAttachClassDef_offset; HB_16Dot16 Version; HB_ClassDefinition GlyphClassDef; HB_AttachList AttachList; HB_LigCaretList LigCaretList; - HB_UInt MarkAttachClassDef_offset; HB_ClassDefinition MarkAttachClassDef; /* new in OT 1.2 */ HB_UShort LastGlyph; - HB_UShort** NewGlyphClasses; }; typedef struct HB_GDEFHeader_ HB_GDEFHeader; @@ -129,6 +131,9 @@ HB_Error HB_GDEF_Build_ClassDefinition( HB_GDEFHeader* gdef, HB_UShort* glyph_array, HB_UShort* class_array ); +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(pop) +#endif HB_END_HEADER diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-global.h b/src/3rdparty/harfbuzz/src/harfbuzz-global.h index d4e6b46..5b2b679 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-global.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-global.h @@ -39,6 +39,10 @@ #define HB_END_HEADER /* nothing */ #endif +#if defined(__GNUC__) || defined(__ARMCC__) || defined(__CC_ARM) || defined(_MSC_VER) +#define HB_USE_PACKED_STRUCTS +#endif + HB_BEGIN_HEADER #ifndef FALSE diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h index 4110700..d513c27 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos-private.h @@ -32,6 +32,9 @@ HB_BEGIN_HEADER +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(push, 1) +#endif /* shared tables */ @@ -45,18 +48,20 @@ struct HB_ValueRecord_ advance */ HB_Short YAdvance; /* vertical adjustment for advance */ - HB_Device XPlacementDevice; /* device table for horizontal + HB_Device* XPlacementDevice; /* device table for horizontal placement */ - HB_Device YPlacementDevice; /* device table for vertical + HB_Device* YPlacementDevice; /* device table for vertical placement */ - HB_Device XAdvanceDevice; /* device table for horizontal + HB_Device* XAdvanceDevice; /* device table for horizontal advance */ - HB_Device YAdvanceDevice; /* device table for vertical + HB_Device* YAdvanceDevice; /* device table for vertical advance */ +#ifdef HB_SUPPORT_MULTIPLE_MASTER HB_UShort XIdPlacement; /* horizontal placement metric ID */ HB_UShort YIdPlacement; /* vertical placement metric ID */ HB_UShort XIdAdvance; /* horizontal advance metric ID */ HB_UShort YIdAdvance; /* vertical advance metric ID */ +#endif }; typedef struct HB_ValueRecord_ HB_ValueRecord; @@ -102,13 +107,14 @@ struct HB_AnchorFormat3_ { HB_Short XCoordinate; /* horizontal value */ HB_Short YCoordinate; /* vertical value */ - HB_Device XDeviceTable; /* device table for X coordinate */ - HB_Device YDeviceTable; /* device table for Y coordinate */ + HB_Device* XDeviceTable; /* device table for X coordinate */ + HB_Device* YDeviceTable; /* device table for Y coordinate */ }; typedef struct HB_AnchorFormat3_ HB_AnchorFormat3; +#ifdef HB_SUPPORT_MULTIPLE_MASTER struct HB_AnchorFormat4_ { HB_UShort XIdAnchor; /* horizontal metric ID */ @@ -116,11 +122,12 @@ struct HB_AnchorFormat4_ }; typedef struct HB_AnchorFormat4_ HB_AnchorFormat4; +#endif struct HB_Anchor_ { - HB_UShort PosFormat; /* 1, 2, 3, or 4 -- 0 indicates + HB_Byte PosFormat; /* 1, 2, 3, or 4 -- 0 indicates that there is no Anchor table */ union @@ -128,7 +135,9 @@ struct HB_Anchor_ HB_AnchorFormat1 af1; HB_AnchorFormat2 af2; HB_AnchorFormat3 af3; +#ifdef HB_SUPPORT_MULTIPLE_MASTER HB_AnchorFormat4 af4; +#endif } af; }; @@ -175,7 +184,7 @@ typedef struct HB_SinglePosFormat2_ HB_SinglePosFormat2; struct HB_SinglePos_ { - HB_UShort PosFormat; /* 1 or 2 */ + HB_Byte PosFormat; /* 1 or 2 */ HB_Coverage Coverage; /* Coverage table */ HB_UShort ValueFormat; /* format of ValueRecord table */ @@ -255,7 +264,7 @@ typedef struct HB_PairPosFormat2_ HB_PairPosFormat2; struct HB_PairPos_ { - HB_UShort PosFormat; /* 1 or 2 */ + HB_Byte PosFormat; /* 1 or 2 */ HB_Coverage Coverage; /* Coverage table */ HB_UShort ValueFormat1; /* format of ValueRecord table for first glyph */ @@ -507,7 +516,7 @@ typedef struct HB_ContextPosFormat3_ HB_ContextPosFormat3; struct HB_ContextPos_ { - HB_UShort PosFormat; /* 1, 2, or 3 */ + HB_Byte PosFormat; /* 1, 2, or 3 */ union { @@ -656,7 +665,7 @@ typedef struct HB_ChainContextPosFormat3_ HB_ChainContextPosFormat3; struct HB_ChainContextPos_ { - HB_UShort PosFormat; /* 1, 2, or 3 */ + HB_Byte PosFormat; /* 1, 2, or 3 */ union { @@ -707,6 +716,10 @@ HB_INTERNAL void _HB_GPOS_Free_SubTable( HB_GPOS_SubTable* st, HB_UShort lookup_type ); +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(pop) +#endif + HB_END_HEADER #endif /* HARFBUZZ_GPOS_PRIVATE_H */ diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c index 356dc01..61e42fd 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.c @@ -57,6 +57,7 @@ static HB_Error GPOS_Do_Glyph_Lookup( GPOS_Instance* gpi, +#ifdef HB_SUPPORT_MULTIPLE_MASTER /* the client application must replace this with something more meaningful if multiple master fonts are to be supported. */ @@ -71,6 +72,7 @@ static HB_Error default_mmfunc( HB_Font font, HB_UNUSED(data); return ERR(HB_Err_Not_Covered); /* ERR() call intended */ } +#endif @@ -97,7 +99,9 @@ HB_Error HB_Load_GPOS_Table( HB_Stream stream, if ( ALLOC ( gpos, sizeof( *gpos ) ) ) return error; +#ifdef HB_SUPPORT_MULTIPLE_MASTER gpos->mmfunc = default_mmfunc; +#endif /* skip version */ @@ -278,9 +282,7 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr, else { empty1: - vr->XPlacementDevice.StartSize = 0; - vr->XPlacementDevice.EndSize = 0; - vr->XPlacementDevice.DeltaValue = NULL; + vr->XPlacementDevice = 0; } if ( format & HB_GPOS_FORMAT_HAVE_Y_PLACEMENT_DEVICE ) @@ -309,9 +311,7 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr, else { empty2: - vr->YPlacementDevice.StartSize = 0; - vr->YPlacementDevice.EndSize = 0; - vr->YPlacementDevice.DeltaValue = NULL; + vr->YPlacementDevice = 0; } if ( format & HB_GPOS_FORMAT_HAVE_X_ADVANCE_DEVICE ) @@ -340,9 +340,7 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr, else { empty3: - vr->XAdvanceDevice.StartSize = 0; - vr->XAdvanceDevice.EndSize = 0; - vr->XAdvanceDevice.DeltaValue = NULL; + vr->XAdvanceDevice = 0; } if ( format & HB_GPOS_FORMAT_HAVE_Y_ADVANCE_DEVICE ) @@ -371,9 +369,7 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr, else { empty4: - vr->YAdvanceDevice.StartSize = 0; - vr->YAdvanceDevice.EndSize = 0; - vr->YAdvanceDevice.DeltaValue = NULL; + vr->YAdvanceDevice = 0; } if ( format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT ) @@ -381,48 +377,72 @@ static HB_Error Load_ValueRecord( HB_ValueRecord* vr, if ( ACCESS_Frame( 2L ) ) goto Fail1; +#ifdef HB_SUPPORT_MULTIPLE_MASTER vr->XIdPlacement = GET_UShort(); +#else + (void) GET_UShort(); +#endif FORGET_Frame(); } +#ifdef HB_SUPPORT_MULTIPLE_MASTER else vr->XIdPlacement = 0; +#endif if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_PLACEMENT ) { if ( ACCESS_Frame( 2L ) ) goto Fail1; +#ifdef HB_SUPPORT_MULTIPLE_MASTER vr->YIdPlacement = GET_UShort(); +#else + (void) GET_UShort(); +#endif FORGET_Frame(); } +#ifdef HB_SUPPORT_MULTIPLE_MASTER else vr->YIdPlacement = 0; +#endif if ( format & HB_GPOS_FORMAT_HAVE_X_ID_ADVANCE ) { if ( ACCESS_Frame( 2L ) ) goto Fail1; +#ifdef HB_SUPPORT_MULTIPLE_MASTER vr->XIdAdvance = GET_UShort(); +#else + (void) GET_UShort(); +#endif FORGET_Frame(); } +#ifdef HB_SUPPORT_MULTIPLE_MASTER else vr->XIdAdvance = 0; +#endif if ( format & HB_GPOS_FORMAT_HAVE_Y_ID_ADVANCE ) { if ( ACCESS_Frame( 2L ) ) goto Fail1; +#ifdef HB_SUPPORT_MULTIPLE_MASTER vr->YIdAdvance = GET_UShort(); +#else + (void) GET_UShort(); +#endif FORGET_Frame(); } +#ifdef HB_SUPPORT_MULTIPLE_MASTER else vr->YIdAdvance = 0; +#endif return HB_Err_Ok; @@ -457,10 +477,12 @@ static HB_Error Get_ValueRecord( GPOS_Instance* gpi, HB_UShort format, HB_Position gd ) { - HB_Fixed value; HB_Short pixel_value; HB_Error error = HB_Err_Ok; +#ifdef HB_SUPPORT_MULTIPLE_MASTER HB_GPOSHeader* gpos = gpi->gpos; + HB_Fixed value; +#endif HB_UShort x_ppem, y_ppem; HB_16Dot16 x_scale, y_scale; @@ -511,6 +533,7 @@ static HB_Error Get_ValueRecord( GPOS_Instance* gpi, } } +#ifdef HB_SUPPORT_MULTIPLE_MASTER /* values returned from mmfunc() are already in fractional pixels */ if ( format & HB_GPOS_FORMAT_HAVE_X_ID_PLACEMENT ) @@ -545,6 +568,7 @@ static HB_Error Get_ValueRecord( GPOS_Instance* gpi, return error; gd->y_advance += value; } +#endif return error; } @@ -619,9 +643,7 @@ static HB_Error Load_Anchor( HB_Anchor* an, } else { - an->af.af3.XDeviceTable.StartSize = 0; - an->af.af3.XDeviceTable.EndSize = 0; - an->af.af3.XDeviceTable.DeltaValue = NULL; + an->af.af3.XDeviceTable = 0; } if ( ACCESS_Frame( 2L ) ) @@ -644,9 +666,7 @@ static HB_Error Load_Anchor( HB_Anchor* an, } else { - an->af.af3.YDeviceTable.StartSize = 0; - an->af.af3.YDeviceTable.EndSize = 0; - an->af.af3.YDeviceTable.DeltaValue = NULL; + an->af.af3.YDeviceTable = 0; } break; @@ -654,8 +674,13 @@ static HB_Error Load_Anchor( HB_Anchor* an, if ( ACCESS_Frame( 4L ) ) return error; +#ifdef HB_SUPPORT_MULTIPLE_MASTER an->af.af4.XIdAnchor = GET_UShort(); an->af.af4.YIdAnchor = GET_UShort(); +#else + (void) GET_UShort(); + (void) GET_UShort(); +#endif FORGET_Frame(); break; @@ -690,7 +715,9 @@ static HB_Error Get_Anchor( GPOS_Instance* gpi, { HB_Error error = HB_Err_Ok; +#ifdef HB_SUPPORT_MULTIPLE_MASTER HB_GPOSHeader* gpos = gpi->gpos; +#endif HB_UShort ap; HB_Short pixel_value; @@ -756,6 +783,7 @@ static HB_Error Get_Anchor( GPOS_Instance* gpi, break; case 4: +#ifdef HB_SUPPORT_MULTIPLE_MASTER error = (gpos->mmfunc)( gpi->font, an->af.af4.XIdAnchor, x_value, gpos->data ); if ( error ) @@ -766,6 +794,9 @@ static HB_Error Get_Anchor( GPOS_Instance* gpi, if ( error ) return error; break; +#else + return ERR(HB_Err_Not_Covered); +#endif } return error; @@ -5966,8 +5997,7 @@ HB_Error HB_GPOS_Clear_Features( HB_GPOSHeader* gpos ) return HB_Err_Ok; } - - +#ifdef HB_SUPPORT_MULTIPLE_MASTER HB_Error HB_GPOS_Register_MM_Function( HB_GPOSHeader* gpos, HB_MMFunction mmfunc, void* data ) @@ -5980,6 +6010,7 @@ HB_Error HB_GPOS_Register_MM_Function( HB_GPOSHeader* gpos, return HB_Err_Ok; } +#endif /* If `dvi' is TRUE, glyph contour points for anchor points and device tables are ignored -- you will get device independent values. */ diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.h b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.h index 2840dae..92bff84 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gpos.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gpos.h @@ -44,6 +44,7 @@ HB_BEGIN_HEADER #define HB_GPOS_LOOKUP_CHAIN 8 #define HB_GPOS_LOOKUP_EXTENSION 9 +#ifdef HB_SUPPORT_MULTIPLE_MASTER /* A pointer to a function which accesses the PostScript interpreter. Multiple Master fonts need this interface to convert a metric ID (as stored in an OpenType font version 1.2 or higher) `metric_id' @@ -59,6 +60,7 @@ typedef HB_Error (*HB_MMFunction)(HB_Font font, HB_UShort metric_id, HB_Fixed* metric_value, void* data ); +#endif struct HB_GPOSHeader_ @@ -71,12 +73,14 @@ struct HB_GPOSHeader_ HB_GDEFHeader* gdef; +#ifdef HB_SUPPORT_MULTIPLE_MASTER /* this is OpenType 1.2 -- Multiple Master fonts need this callback function to get various metric values from the PostScript interpreter. */ HB_MMFunction mmfunc; void* data; +#endif }; typedef struct HB_GPOSHeader_ HB_GPOSHeader; @@ -129,9 +133,11 @@ HB_Error HB_GPOS_Add_Feature( HB_GPOSHeader* gpos, HB_Error HB_GPOS_Clear_Features( HB_GPOSHeader* gpos ); +#ifdef HB_SUPPORT_MULTIPLE_MASTER HB_Error HB_GPOS_Register_MM_Function( HB_GPOSHeader* gpos, HB_MMFunction mmfunc, void* data ); +#endif /* If `dvi' is TRUE, glyph contour points for anchor points and device tables are ignored -- you will get device independent values. */ diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-greek.c b/src/3rdparty/harfbuzz/src/harfbuzz-greek.c new file mode 100644 index 0000000..2e9b858 --- /dev/null +++ b/src/3rdparty/harfbuzz/src/harfbuzz-greek.c @@ -0,0 +1,447 @@ +/* + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) + * + * This is part of HarfBuzz, an OpenType Layout engine library. + * + * Permission is hereby granted, without written agreement and without + * license or royalty fees, to use, copy, modify, and distribute this + * software and its documentation for any purpose, provided that the + * above copyright notice and the following two paragraphs appear in + * all copies of this software. + * + * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS + * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + +#include "harfbuzz-shaper.h" +#include "harfbuzz-shaper-private.h" +#include + +#ifndef NO_OPENTYPE +static const HB_OpenTypeFeature greek_features[] = { + { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty }, + { HB_MAKE_TAG('l', 'i', 'g', 'a'), CcmpProperty }, + { HB_MAKE_TAG('c', 'l', 'i', 'g'), CcmpProperty }, + {0, 0} +}; +#endif + +/* + Greek decompositions +*/ + + +typedef struct _hb_greek_decomposition { + HB_UChar16 composed; + HB_UChar16 base; +} hb_greek_decomposition; + +static const hb_greek_decomposition decompose_0x300[] = { + { 0x1FBA, 0x0391 }, + { 0x1FC8, 0x0395 }, + { 0x1FCA, 0x0397 }, + { 0x1FDA, 0x0399 }, + { 0x1FF8, 0x039F }, + { 0x1FEA, 0x03A5 }, + { 0x1FFA, 0x03A9 }, + { 0x1F70, 0x03B1 }, + { 0x1F72, 0x03B5 }, + { 0x1F74, 0x03B7 }, + { 0x1F76, 0x03B9 }, + { 0x1F78, 0x03BF }, + { 0x1F7A, 0x03C5 }, + { 0x1F7C, 0x03C9 }, + { 0x1FD2, 0x03CA }, + { 0x1FE2, 0x03CB }, + { 0x1F02, 0x1F00 }, + { 0, 0 } +}; + +static HB_UChar16 compose_0x300(HB_UChar16 base) +{ + if ((base ^ 0x1f00) < 0x100) { + if (base <= 0x1f69 && !(base & 0x6)) + return base + 2; + if (base == 0x1fbf) + return 0x1fcd; + if (base == 0x1ffe) + return 0x1fdd; + return 0; + } + { + const hb_greek_decomposition *d = decompose_0x300; + while (d->base && d->base != base) + ++d; + return d->composed; + } +} + +static const hb_greek_decomposition decompose_0x301[] = { + { 0x0386, 0x0391 }, + { 0x0388, 0x0395 }, + { 0x0389, 0x0397 }, + { 0x038A, 0x0399 }, + { 0x038C, 0x039F }, + { 0x038E, 0x03A5 }, + { 0x038F, 0x03A9 }, + { 0x03AC, 0x03B1 }, + { 0x03AD, 0x03B5 }, + { 0x03AE, 0x03B7 }, + { 0x03AF, 0x03B9 }, + { 0x03CC, 0x03BF }, + { 0x03CD, 0x03C5 }, + { 0x03CE, 0x03C9 }, + { 0x0390, 0x03CA }, + { 0x03B0, 0x03CB }, + { 0x03D3, 0x03D2 }, + { 0, 0 } +}; + + +static HB_UChar16 compose_0x301(HB_UChar16 base) +{ + if ((base ^ 0x1f00) < 0x100) { + if (base <= 0x1f69 && !(base & 0x6)) + return base + 4; + if (base == 0x1fbf) + return 0x1fce; + if (base == 0x1ffe) + return 0x1fde; + } + { + const hb_greek_decomposition *d = decompose_0x301; + while (d->base && d->base != base) + ++d; + return d->composed; + } +} + +static const hb_greek_decomposition decompose_0x304[] = { + { 0x1FB9, 0x0391 }, + { 0x1FD9, 0x0399 }, + { 0x1FE9, 0x03A5 }, + { 0x1FB1, 0x03B1 }, + { 0x1FD1, 0x03B9 }, + { 0x1FE1, 0x03C5 }, + { 0, 0 } +}; + +static HB_UChar16 compose_0x304(HB_UChar16 base) +{ + const hb_greek_decomposition *d = decompose_0x304; + while (d->base && d->base != base) + ++d; + return d->composed; +} + +static const hb_greek_decomposition decompose_0x306[] = { + { 0x1FB8, 0x0391 }, + { 0x1FD8, 0x0399 }, + { 0x1FE8, 0x03A5 }, + { 0x1FB0, 0x03B1 }, + { 0x1FD0, 0x03B9 }, + { 0x1FE0, 0x03C5 }, + { 0, 0 } +}; + +static HB_UChar16 compose_0x306(HB_UChar16 base) +{ + const hb_greek_decomposition *d = decompose_0x306; + while (d->base && d->base != base) + ++d; + return d->composed; +} + +static const hb_greek_decomposition decompose_0x308[] = { + { 0x03AA, 0x0399 }, + { 0x03AB, 0x03A5 }, + { 0x03CA, 0x03B9 }, + { 0x03CB, 0x03C5 }, + { 0x03D4, 0x03D2 }, + { 0, 0 } +}; + +static HB_UChar16 compose_0x308(HB_UChar16 base) +{ + const hb_greek_decomposition *d = decompose_0x308; + while (d->base && d->base != base) + ++d; + return d->composed; +} + + +static const hb_greek_decomposition decompose_0x313[] = { + { 0x1F08, 0x0391 }, + { 0x1F18, 0x0395 }, + { 0x1F28, 0x0397 }, + { 0x1F38, 0x0399 }, + { 0x1F48, 0x039F }, + { 0x1F68, 0x03A9 }, + { 0x1F00, 0x03B1 }, + { 0x1F10, 0x03B5 }, + { 0x1F20, 0x03B7 }, + { 0x1F30, 0x03B9 }, + { 0x1F40, 0x03BF }, + { 0x1FE4, 0x03C1 }, + { 0x1F50, 0x03C5 }, + { 0x1F60, 0x03C9 }, + { 0, 0 } +}; + +static HB_UChar16 compose_0x313(HB_UChar16 base) +{ + const hb_greek_decomposition *d = decompose_0x313; + while (d->base && d->base != base) + ++d; + return d->composed; +} + +static const hb_greek_decomposition decompose_0x314[] = { + { 0x1F09, 0x0391 }, + { 0x1F19, 0x0395 }, + { 0x1F29, 0x0397 }, + { 0x1F39, 0x0399 }, + { 0x1F49, 0x039F }, + { 0x1FEC, 0x03A1 }, + { 0x1F59, 0x03A5 }, + { 0x1F69, 0x03A9 }, + { 0x1F01, 0x03B1 }, + { 0x1F11, 0x03B5 }, + { 0x1F21, 0x03B7 }, + { 0x1F31, 0x03B9 }, + { 0x1F41, 0x03BF }, + { 0x1FE5, 0x03C1 }, + { 0x1F51, 0x03C5 }, + { 0x1F61, 0x03C9 }, + { 0, 0 } +}; + +static HB_UChar16 compose_0x314(HB_UChar16 base) +{ + const hb_greek_decomposition *d = decompose_0x314; + while (d->base && d->base != base) + ++d; + return d->composed; +} + +static const hb_greek_decomposition decompose_0x342[] = { + { 0x1FB6, 0x03B1 }, + { 0x1FC6, 0x03B7 }, + { 0x1FD6, 0x03B9 }, + { 0x1FE6, 0x03C5 }, + { 0x1FF6, 0x03C9 }, + { 0x1FD7, 0x03CA }, + { 0x1FE7, 0x03CB }, + { 0x1F06, 0x1F00 }, + { 0x1F07, 0x1F01 }, + { 0x1F0E, 0x1F08 }, + { 0x1F0F, 0x1F09 }, + { 0x1F26, 0x1F20 }, + { 0x1F27, 0x1F21 }, + { 0x1F2E, 0x1F28 }, + { 0x1F2F, 0x1F29 }, + { 0x1F36, 0x1F30 }, + { 0x1F37, 0x1F31 }, + { 0x1F3E, 0x1F38 }, + { 0x1F3F, 0x1F39 }, + { 0x1F56, 0x1F50 }, + { 0x1F57, 0x1F51 }, + { 0x1F5F, 0x1F59 }, + { 0x1F66, 0x1F60 }, + { 0x1F67, 0x1F61 }, + { 0x1F6E, 0x1F68 }, + { 0x1F6F, 0x1F69 }, + { 0x1FCF, 0x1FBF }, + { 0x1FDF, 0x1FFE }, + { 0, 0 } +}; + +static HB_UChar16 compose_0x342(HB_UChar16 base) +{ + const hb_greek_decomposition *d = decompose_0x342; + while (d->base && d->base != base) + ++d; + return d->composed; +} + +static const hb_greek_decomposition decompose_0x345[] = { + { 0x1FBC, 0x0391 }, + { 0x1FCC, 0x0397 }, + { 0x1FFC, 0x03A9 }, + { 0x1FB4, 0x03AC }, + { 0x1FC4, 0x03AE }, + { 0x1FB3, 0x03B1 }, + { 0x1FC3, 0x03B7 }, + { 0x1FF3, 0x03C9 }, + { 0x1FF4, 0x03CE }, + { 0x1F80, 0x1F00 }, + { 0x1F81, 0x1F01 }, + { 0x1F82, 0x1F02 }, + { 0x1F83, 0x1F03 }, + { 0x1F84, 0x1F04 }, + { 0x1F85, 0x1F05 }, + { 0x1F86, 0x1F06 }, + { 0x1F87, 0x1F07 }, + { 0x1F88, 0x1F08 }, + { 0x1F89, 0x1F09 }, + { 0x1F8A, 0x1F0A }, + { 0x1F8B, 0x1F0B }, + { 0x1F8C, 0x1F0C }, + { 0x1F8D, 0x1F0D }, + { 0x1F8E, 0x1F0E }, + { 0x1F8F, 0x1F0F }, + { 0x1F90, 0x1F20 }, + { 0x1F91, 0x1F21 }, + { 0x1F92, 0x1F22 }, + { 0x1F93, 0x1F23 }, + { 0x1F94, 0x1F24 }, + { 0x1F95, 0x1F25 }, + { 0x1F96, 0x1F26 }, + { 0x1F97, 0x1F27 }, + { 0x1F98, 0x1F28 }, + { 0x1F99, 0x1F29 }, + { 0x1F9A, 0x1F2A }, + { 0x1F9B, 0x1F2B }, + { 0x1F9C, 0x1F2C }, + { 0x1F9D, 0x1F2D }, + { 0x1F9E, 0x1F2E }, + { 0x1F9F, 0x1F2F }, + { 0x1FA0, 0x1F60 }, + { 0x1FA1, 0x1F61 }, + { 0x1FA2, 0x1F62 }, + { 0x1FA3, 0x1F63 }, + { 0x1FA4, 0x1F64 }, + { 0x1FA5, 0x1F65 }, + { 0x1FA6, 0x1F66 }, + { 0x1FA7, 0x1F67 }, + { 0x1FA8, 0x1F68 }, + { 0x1FA9, 0x1F69 }, + { 0x1FAA, 0x1F6A }, + { 0x1FAB, 0x1F6B }, + { 0x1FAC, 0x1F6C }, + { 0x1FAD, 0x1F6D }, + { 0x1FAE, 0x1F6E }, + { 0x1FAF, 0x1F6F }, + { 0x1FB2, 0x1F70 }, + { 0x1FC2, 0x1F74 }, + { 0x1FF2, 0x1F7C }, + { 0x1FB7, 0x1FB6 }, + { 0x1FC7, 0x1FC6 }, + { 0x1FF7, 0x1FF6 }, + { 0, 0 } +}; + +static HB_UChar16 compose_0x345(HB_UChar16 base) +{ + const hb_greek_decomposition *d = decompose_0x345; + while (d->base && d->base != base) + ++d; + return d->composed; +} + +/* + Greek shaping. Heuristic positioning can't render polytonic greek correctly. We're a lot + better off mapping greek chars with diacritics to the characters in the extended greek + region in Unicode if possible. +*/ +HB_Bool HB_GreekShape(HB_ShaperItem *shaper_item) +{ + const int availableGlyphs = shaper_item->num_glyphs; + const HB_UChar16 *uc = shaper_item->string + shaper_item->item.pos; + unsigned short *logClusters = shaper_item->log_clusters; + HB_GlyphAttributes *attributes = shaper_item->attributes; + + HB_Bool haveGlyphs; + int slen = 1; + int cluster_start = 0; + hb_uint32 i; + + HB_STACKARRAY(HB_UChar16, shapedChars, 2 * shaper_item->item.length); + + assert(shaper_item->item.script == HB_Script_Greek); + + *shapedChars = *uc; + logClusters[0] = 0; + + for (i = 1; i < shaper_item->item.length; ++i) { + hb_uint16 base = shapedChars[slen-1]; + hb_uint16 shaped = 0; + if (uc[i] == 0x300) + shaped = compose_0x300(base); + else if (uc[i] == 0x301) + shaped = compose_0x301(base); + else if (uc[i] == 0x304) + shaped = compose_0x304(base); + else if (uc[i] == 0x306) + shaped = compose_0x306(base); + else if (uc[i] == 0x308) + shaped = compose_0x308(base); + else if (uc[i] == 0x313) + shaped = compose_0x313(base); + else if (uc[i] == 0x314) + shaped = compose_0x314(base); + else if (uc[i] == 0x342) + shaped = compose_0x342(base); + else if (uc[i] == 0x345) + shaped = compose_0x345(base); + + if (shaped) { + if (shaper_item->font->klass->canRender(shaper_item->font, (HB_UChar16 *)&shaped, 1)) { + shapedChars[slen-1] = shaped; + } else { + shaped = 0; + } + } + + if (!shaped) { + HB_CharCategory category; + int cmb; + shapedChars[slen] = uc[i]; + HB_GetUnicodeCharProperties(uc[i], &category, &cmb); + if (category != HB_Mark_NonSpacing) { + attributes[slen].clusterStart = TRUE; + attributes[slen].mark = FALSE; + attributes[slen].combiningClass = 0; + attributes[slen].dontPrint = HB_IsControlChar(uc[i]); + cluster_start = slen; + } else { + attributes[slen].clusterStart = FALSE; + attributes[slen].mark = TRUE; + attributes[slen].combiningClass = cmb; + } + ++slen; + } + logClusters[i] = cluster_start; + } + + haveGlyphs = shaper_item->font->klass + ->convertStringToGlyphIndices(shaper_item->font, + shapedChars, slen, + shaper_item->glyphs, &shaper_item->num_glyphs, + shaper_item->item.bidiLevel % 2); + + HB_FREE_STACKARRAY(shapedChars); + + if (!haveGlyphs) + return FALSE; + +#ifndef NO_OPENTYPE + if (HB_SelectScript(shaper_item, greek_features)) { + HB_OpenTypeShape(shaper_item, /*properties*/0); + return HB_OpenTypePosition(shaper_item, availableGlyphs, /*doLogClusters*/TRUE); + } +#endif + HB_HeuristicPosition(shaper_item); + + return TRUE; +} + diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h index dd5ffdf..7eb329e 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gsub-private.h @@ -32,6 +32,9 @@ HB_BEGIN_HEADER +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(push, 1) +#endif typedef union HB_GSUB_SubTable_ HB_GSUB_SubTable; @@ -48,9 +51,9 @@ typedef struct HB_SingleSubstFormat1_ HB_SingleSubstFormat1; struct HB_SingleSubstFormat2_ { + HB_UShort* Substitute; /* array of substitute glyph IDs */ HB_UShort GlyphCount; /* number of glyph IDs in Substitute array */ - HB_UShort* Substitute; /* array of substitute glyph IDs */ }; typedef struct HB_SingleSubstFormat2_ HB_SingleSubstFormat2; @@ -58,14 +61,14 @@ typedef struct HB_SingleSubstFormat2_ HB_SingleSubstFormat2; struct HB_SingleSubst_ { - HB_UShort SubstFormat; /* 1 or 2 */ - HB_Coverage Coverage; /* Coverage table */ - union { HB_SingleSubstFormat1 ssf1; HB_SingleSubstFormat2 ssf2; } ssf; + + HB_Coverage Coverage; /* Coverage table */ + HB_Byte SubstFormat; /* 1 or 2 */ }; typedef struct HB_SingleSubst_ HB_SingleSubst; @@ -75,10 +78,10 @@ typedef struct HB_SingleSubst_ HB_SingleSubst; struct HB_Sequence_ { - HB_UShort GlyphCount; /* number of glyph IDs in the - Substitute array */ HB_UShort* Substitute; /* string of glyph IDs to substitute */ + HB_UShort GlyphCount; /* number of glyph IDs in the + Substitute array */ }; typedef struct HB_Sequence_ HB_Sequence; @@ -86,10 +89,10 @@ typedef struct HB_Sequence_ HB_Sequence; struct HB_MultipleSubst_ { - HB_UShort SubstFormat; /* always 1 */ + HB_Sequence* Sequence; /* array of Sequence tables */ HB_Coverage Coverage; /* Coverage table */ + HB_UShort SubstFormat; /* always 1 */ HB_UShort SequenceCount; /* number of Sequence tables */ - HB_Sequence* Sequence; /* array of Sequence tables */ }; typedef struct HB_MultipleSubst_ HB_MultipleSubst; @@ -99,9 +102,9 @@ typedef struct HB_MultipleSubst_ HB_MultipleSubst; struct HB_AlternateSet_ { + HB_UShort* Alternate; /* array of alternate glyph IDs */ HB_UShort GlyphCount; /* number of glyph IDs in the Alternate array */ - HB_UShort* Alternate; /* array of alternate glyph IDs */ }; typedef struct HB_AlternateSet_ HB_AlternateSet; @@ -109,11 +112,11 @@ typedef struct HB_AlternateSet_ HB_AlternateSet; struct HB_AlternateSubst_ { - HB_UShort SubstFormat; /* always 1 */ + HB_AlternateSet* AlternateSet; /* array of AlternateSet tables */ HB_Coverage Coverage; /* Coverage table */ + HB_UShort SubstFormat; /* always 1 */ HB_UShort AlternateSetCount; /* number of AlternateSet tables */ - HB_AlternateSet* AlternateSet; /* array of AlternateSet tables */ }; typedef struct HB_AlternateSubst_ HB_AlternateSubst; @@ -123,10 +126,10 @@ typedef struct HB_AlternateSubst_ HB_AlternateSubst; struct HB_Ligature_ { + HB_UShort* Component; /* array of component glyph IDs */ HB_UShort LigGlyph; /* glyphID of ligature to substitute */ HB_UShort ComponentCount; /* number of components in ligature */ - HB_UShort* Component; /* array of component glyph IDs */ }; typedef struct HB_Ligature_ HB_Ligature; @@ -134,8 +137,8 @@ typedef struct HB_Ligature_ HB_Ligature; struct HB_LigatureSet_ { - HB_UShort LigatureCount; /* number of Ligature tables */ HB_Ligature* Ligature; /* array of Ligature tables */ + HB_UShort LigatureCount; /* number of Ligature tables */ }; typedef struct HB_LigatureSet_ HB_LigatureSet; @@ -143,10 +146,10 @@ typedef struct HB_LigatureSet_ HB_LigatureSet; struct HB_LigatureSubst_ { - HB_UShort SubstFormat; /* always 1 */ + HB_LigatureSet* LigatureSet; /* array of LigatureSet tables */ HB_Coverage Coverage; /* Coverage table */ + HB_UShort SubstFormat; /* always 1 */ HB_UShort LigatureSetCount; /* number of LigatureSet tables */ - HB_LigatureSet* LigatureSet; /* array of LigatureSet tables */ }; typedef struct HB_LigatureSubst_ HB_LigatureSubst; @@ -168,13 +171,13 @@ typedef struct HB_SubstLookupRecord_ HB_SubstLookupRecord; struct HB_SubRule_ { - HB_UShort GlyphCount; /* total number of input glyphs */ - HB_UShort SubstCount; /* number of SubstLookupRecord - tables */ HB_UShort* Input; /* array of input glyph IDs */ HB_SubstLookupRecord* SubstLookupRecord; /* array of SubstLookupRecord tables */ + HB_UShort GlyphCount; /* total number of input glyphs */ + HB_UShort SubstCount; /* number of SubstLookupRecord + tables */ }; typedef struct HB_SubRule_ HB_SubRule; @@ -182,8 +185,8 @@ typedef struct HB_SubRule_ HB_SubRule; struct HB_SubRuleSet_ { - HB_UShort SubRuleCount; /* number of SubRule tables */ HB_SubRule* SubRule; /* array of SubRule tables */ + HB_UShort SubRuleCount; /* number of SubRule tables */ }; typedef struct HB_SubRuleSet_ HB_SubRuleSet; @@ -191,9 +194,9 @@ typedef struct HB_SubRuleSet_ HB_SubRuleSet; struct HB_ContextSubstFormat1_ { + HB_SubRuleSet* SubRuleSet; /* array of SubRuleSet tables */ HB_Coverage Coverage; /* Coverage table */ HB_UShort SubRuleSetCount; /* number of SubRuleSet tables */ - HB_SubRuleSet* SubRuleSet; /* array of SubRuleSet tables */ }; typedef struct HB_ContextSubstFormat1_ HB_ContextSubstFormat1; @@ -201,13 +204,13 @@ typedef struct HB_ContextSubstFormat1_ HB_ContextSubstFormat1; struct HB_SubClassRule_ { - HB_UShort GlyphCount; /* total number of context classes */ - HB_UShort SubstCount; /* number of SubstLookupRecord - tables */ HB_UShort* Class; /* array of classes */ HB_SubstLookupRecord* SubstLookupRecord; /* array of SubstLookupRecord tables */ + HB_UShort GlyphCount; /* total number of context classes */ + HB_UShort SubstCount; /* number of SubstLookupRecord + tables */ }; typedef struct HB_SubClassRule_ HB_SubClassRule; @@ -215,9 +218,9 @@ typedef struct HB_SubClassRule_ HB_SubClassRule; struct HB_SubClassSet_ { + HB_SubClassRule* SubClassRule; /* array of SubClassRule tables */ HB_UShort SubClassRuleCount; /* number of SubClassRule tables */ - HB_SubClassRule* SubClassRule; /* array of SubClassRule tables */ }; typedef struct HB_SubClassSet_ HB_SubClassSet; @@ -229,13 +232,13 @@ typedef struct HB_SubClassSet_ HB_SubClassSet; struct HB_ContextSubstFormat2_ { - HB_UShort MaxContextLength; - /* maximal context length */ + HB_SubClassSet* SubClassSet; /* array of SubClassSet tables */ HB_Coverage Coverage; /* Coverage table */ HB_ClassDefinition ClassDef; /* ClassDef table */ HB_UShort SubClassSetCount; /* number of SubClassSet tables */ - HB_SubClassSet* SubClassSet; /* array of SubClassSet tables */ + HB_UShort MaxContextLength; + /* maximal context length */ }; typedef struct HB_ContextSubstFormat2_ HB_ContextSubstFormat2; @@ -243,11 +246,11 @@ typedef struct HB_ContextSubstFormat2_ HB_ContextSubstFormat2; struct HB_ContextSubstFormat3_ { - HB_UShort GlyphCount; /* number of input glyphs */ - HB_UShort SubstCount; /* number of SubstLookupRecords */ HB_Coverage* Coverage; /* array of Coverage tables */ HB_SubstLookupRecord* SubstLookupRecord; /* array of substitution lookups */ + HB_UShort GlyphCount; /* number of input glyphs */ + HB_UShort SubstCount; /* number of SubstLookupRecords */ }; typedef struct HB_ContextSubstFormat3_ HB_ContextSubstFormat3; @@ -255,14 +258,14 @@ typedef struct HB_ContextSubstFormat3_ HB_ContextSubstFormat3; struct HB_ContextSubst_ { - HB_UShort SubstFormat; /* 1, 2, or 3 */ - union { HB_ContextSubstFormat1 csf1; HB_ContextSubstFormat2 csf2; HB_ContextSubstFormat3 csf3; } csf; + + HB_Byte SubstFormat; /* 1, 2, or 3 */ }; typedef struct HB_ContextSubst_ HB_ContextSubst; @@ -272,18 +275,18 @@ typedef struct HB_ContextSubst_ HB_ContextSubst; struct HB_ChainSubRule_ { + HB_UShort* Backtrack; /* array of backtrack glyph IDs */ + HB_UShort* Input; /* array of input glyph IDs */ + HB_UShort* Lookahead; /* array of lookahead glyph IDs */ + HB_SubstLookupRecord* SubstLookupRecord; + /* array of SubstLookupRecords */ HB_UShort BacktrackGlyphCount; /* total number of backtrack glyphs */ - HB_UShort* Backtrack; /* array of backtrack glyph IDs */ HB_UShort InputGlyphCount; /* total number of input glyphs */ - HB_UShort* Input; /* array of input glyph IDs */ HB_UShort LookaheadGlyphCount; /* total number of lookahead glyphs */ - HB_UShort* Lookahead; /* array of lookahead glyph IDs */ HB_UShort SubstCount; /* number of SubstLookupRecords */ - HB_SubstLookupRecord* SubstLookupRecord; - /* array of SubstLookupRecords */ }; typedef struct HB_ChainSubRule_ HB_ChainSubRule; @@ -291,9 +294,9 @@ typedef struct HB_ChainSubRule_ HB_ChainSubRule; struct HB_ChainSubRuleSet_ { + HB_ChainSubRule* ChainSubRule; /* array of ChainSubRule tables */ HB_UShort ChainSubRuleCount; /* number of ChainSubRule tables */ - HB_ChainSubRule* ChainSubRule; /* array of ChainSubRule tables */ }; typedef struct HB_ChainSubRuleSet_ HB_ChainSubRuleSet; @@ -301,11 +304,11 @@ typedef struct HB_ChainSubRuleSet_ HB_ChainSubRuleSet; struct HB_ChainContextSubstFormat1_ { + HB_ChainSubRuleSet* ChainSubRuleSet; + /* array of ChainSubRuleSet tables */ HB_Coverage Coverage; /* Coverage table */ HB_UShort ChainSubRuleSetCount; /* number of ChainSubRuleSet tables */ - HB_ChainSubRuleSet* ChainSubRuleSet; - /* array of ChainSubRuleSet tables */ }; typedef struct HB_ChainContextSubstFormat1_ HB_ChainContextSubstFormat1; @@ -313,20 +316,20 @@ typedef struct HB_ChainContextSubstFormat1_ HB_ChainContextSubstFormat1; struct HB_ChainSubClassRule_ { + HB_UShort* Backtrack; /* array of backtrack classes */ + HB_UShort* Input; /* array of context classes */ + HB_UShort* Lookahead; /* array of lookahead classes */ + HB_SubstLookupRecord* SubstLookupRecord; + /* array of substitution lookups */ HB_UShort BacktrackGlyphCount; /* total number of backtrack classes */ - HB_UShort* Backtrack; /* array of backtrack classes */ HB_UShort InputGlyphCount; /* total number of context classes */ - HB_UShort* Input; /* array of context classes */ HB_UShort LookaheadGlyphCount; /* total number of lookahead classes */ - HB_UShort* Lookahead; /* array of lookahead classes */ HB_UShort SubstCount; /* number of SubstLookupRecords */ - HB_SubstLookupRecord* SubstLookupRecord; - /* array of substitution lookups */ }; typedef struct HB_ChainSubClassRule_ HB_ChainSubClassRule; @@ -334,12 +337,12 @@ typedef struct HB_ChainSubClassRule_ HB_ChainSubClassRule; struct HB_ChainSubClassSet_ { - HB_UShort ChainSubClassRuleCount; - /* number of ChainSubClassRule - tables */ HB_ChainSubClassRule* ChainSubClassRule; /* array of ChainSubClassRule tables */ + HB_UShort ChainSubClassRuleCount; + /* number of ChainSubClassRule + tables */ }; typedef struct HB_ChainSubClassSet_ HB_ChainSubClassSet; @@ -351,27 +354,27 @@ typedef struct HB_ChainSubClassSet_ HB_ChainSubClassSet; struct HB_ChainContextSubstFormat2_ { + HB_ChainSubClassSet* ChainSubClassSet; + /* array of ChainSubClassSet + tables */ HB_Coverage Coverage; /* Coverage table */ - HB_UShort MaxBacktrackLength; - /* maximal backtrack length */ HB_ClassDefinition BacktrackClassDef; /* BacktrackClassDef table */ - HB_UShort MaxInputLength; - /* maximal input length */ HB_ClassDefinition InputClassDef; /* InputClassDef table */ - HB_UShort MaxLookaheadLength; - /* maximal lookahead length */ HB_ClassDefinition LookaheadClassDef; /* LookaheadClassDef table */ HB_UShort ChainSubClassSetCount; /* number of ChainSubClassSet tables */ - HB_ChainSubClassSet* ChainSubClassSet; - /* array of ChainSubClassSet - tables */ + HB_UShort MaxBacktrackLength; + /* maximal backtrack length */ + HB_UShort MaxLookaheadLength; + /* maximal lookahead length */ + HB_UShort MaxInputLength; + /* maximal input length */ }; typedef struct HB_ChainContextSubstFormat2_ HB_ChainContextSubstFormat2; @@ -379,24 +382,24 @@ typedef struct HB_ChainContextSubstFormat2_ HB_ChainContextSubstFormat2; struct HB_ChainContextSubstFormat3_ { - HB_UShort BacktrackGlyphCount; - /* number of backtrack glyphs */ HB_Coverage* BacktrackCoverage; /* array of backtrack Coverage tables */ - HB_UShort InputGlyphCount; - /* number of input glyphs */ HB_Coverage* InputCoverage; /* array of input coverage tables */ - HB_UShort LookaheadGlyphCount; - /* number of lookahead glyphs */ HB_Coverage* LookaheadCoverage; /* array of lookahead coverage tables */ - HB_UShort SubstCount; /* number of SubstLookupRecords */ HB_SubstLookupRecord* SubstLookupRecord; /* array of substitution lookups */ + HB_UShort BacktrackGlyphCount; + /* number of backtrack glyphs */ + HB_UShort InputGlyphCount; + /* number of input glyphs */ + HB_UShort LookaheadGlyphCount; + /* number of lookahead glyphs */ + HB_UShort SubstCount; /* number of SubstLookupRecords */ }; typedef struct HB_ChainContextSubstFormat3_ HB_ChainContextSubstFormat3; @@ -404,14 +407,14 @@ typedef struct HB_ChainContextSubstFormat3_ HB_ChainContextSubstFormat3; struct HB_ChainContextSubst_ { - HB_UShort SubstFormat; /* 1, 2, or 3 */ - union { HB_ChainContextSubstFormat1 ccsf1; HB_ChainContextSubstFormat2 ccsf2; HB_ChainContextSubstFormat3 ccsf3; } ccsf; + + HB_Byte SubstFormat; /* 1, 2, or 3 */ }; typedef struct HB_ChainContextSubst_ HB_ChainContextSubst; @@ -421,9 +424,9 @@ typedef struct HB_ChainContextSubst_ HB_ChainContextSubst; /* LookupType 7 */ struct HB_ExtensionSubst_ { + HB_GSUB_SubTable *subtable; /* referenced subtable */ HB_UShort SubstFormat; /* always 1 */ HB_UShort LookuptType; /* lookup-type of referenced subtable */ - HB_GSUB_SubTable *subtable; /* referenced subtable */ }; typedef struct HB_ExtensionSubst_ HB_ExtensionSubst; @@ -433,16 +436,16 @@ typedef struct HB_ExtensionSubst_ HB_ExtensionSubst; /* LookupType 8 */ struct HB_ReverseChainContextSubst_ { - HB_UShort SubstFormat; /* always 1 */ - HB_Coverage Coverage; /* coverage table for input glyphs */ - HB_UShort BacktrackGlyphCount; /* number of backtrack glyphs */ + HB_Coverage* LookaheadCoverage; /* array of lookahead Coverage + tables */ + HB_UShort* Substitute; /* array of substitute Glyph ID */ HB_Coverage* BacktrackCoverage; /* array of backtrack Coverage tables */ + HB_Coverage Coverage; /* coverage table for input glyphs */ + HB_UShort SubstFormat; /* always 1 */ + HB_UShort BacktrackGlyphCount; /* number of backtrack glyphs */ HB_UShort LookaheadGlyphCount; /* number of lookahead glyphs */ - HB_Coverage* LookaheadCoverage; /* array of lookahead Coverage - tables */ HB_UShort GlyphCount; /* number of Glyph IDs */ - HB_UShort* Substitute; /* array of substitute Glyph ID */ }; typedef struct HB_ReverseChainContextSubst_ HB_ReverseChainContextSubst; @@ -471,6 +474,10 @@ HB_INTERNAL void _HB_GSUB_Free_SubTable( HB_GSUB_SubTable* st, HB_UShort lookup_type ); +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(pop) +#endif + HB_END_HEADER #endif /* HARFBUZZ_GSUB_PRIVATE_H */ diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h b/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h index 1ca3f0c..b00df44 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-gsub.h @@ -32,6 +32,10 @@ HB_BEGIN_HEADER +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(push, 1) +#endif + /* Lookup types for glyph substitution */ #define HB_GSUB_LOOKUP_SINGLE 1 @@ -60,6 +64,14 @@ typedef HB_UShort (*HB_AltFunction)(HB_UInt pos, struct HB_GSUBHeader_ { + HB_GDEFHeader* gdef; + + /* the next two fields are used for an alternate substitution callback + function to select the proper alternate glyph. */ + + void* data; + HB_AltFunction altfunc; + HB_UInt offset; HB_16Dot16 Version; @@ -67,14 +79,6 @@ struct HB_GSUBHeader_ HB_ScriptList ScriptList; HB_FeatureList FeatureList; HB_LookupList LookupList; - - HB_GDEFHeader* gdef; - - /* the next two fields are used for an alternate substitution callback - function to select the proper alternate glyph. */ - - HB_AltFunction altfunc; - void* data; }; typedef struct HB_GSUBHeader_ HB_GSUBHeader; @@ -135,6 +139,9 @@ HB_Error HB_GSUB_Register_Alternate_Function( HB_GSUBHeader* gsub, HB_Error HB_GSUB_Apply_String( HB_GSUBHeader* gsub, HB_Buffer buffer ); +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(pop) +#endif HB_END_HEADER diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c b/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c index a819dac..6f89ed6 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c @@ -130,7 +130,7 @@ static int hangul_nextSyllableBoundary(const HB_UChar16 *s, int start, int end) static const HB_OpenTypeFeature hangul_features [] = { { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty }, { HB_MAKE_TAG('l', 'j', 'm', 'o'), CcmpProperty }, - { HB_MAKE_TAG('j', 'j', 'm', 'o'), CcmpProperty }, + { HB_MAKE_TAG('v', 'j', 'm', 'o'), CcmpProperty }, { HB_MAKE_TAG('t', 'j', 'm', 'o'), CcmpProperty }, { 0, 0 } }; diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h index 73dd383..1f7b353 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-open-private.h @@ -69,7 +69,7 @@ _HB_OPEN_Load_EmptyOrClassDefinition( HB_ClassDefinition* cd, HB_UInt base_offset, HB_Stream input ); HB_INTERNAL HB_Error -_HB_OPEN_Load_Device( HB_Device* d, +_HB_OPEN_Load_Device( HB_Device** d, HB_Stream input ); HB_INTERNAL void _HB_OPEN_Free_ScriptList( HB_ScriptList* sl ); @@ -79,7 +79,7 @@ HB_INTERNAL void _HB_OPEN_Free_LookupList( HB_LookupList* ll, HB_INTERNAL void _HB_OPEN_Free_Coverage( HB_Coverage* c ); HB_INTERNAL void _HB_OPEN_Free_ClassDefinition( HB_ClassDefinition* cd ); -HB_INTERNAL void _HB_OPEN_Free_Device( HB_Device* d ); +HB_INTERNAL void _HB_OPEN_Free_Device( HB_Device** d ); @@ -93,7 +93,7 @@ _HB_OPEN_Get_Class( HB_ClassDefinition* cd, HB_UShort* klass, HB_UShort* index ); HB_INTERNAL HB_Error -_HB_OPEN_Get_Device( HB_Device* d, +_HB_OPEN_Get_Device( HB_Device** d, HB_UShort size, HB_Short* value ); diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open.c b/src/3rdparty/harfbuzz/src/harfbuzz-open.c index 0fe1e4d..4fc6ed1 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-open.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-open.c @@ -1282,7 +1282,7 @@ _HB_OPEN_Get_Class( HB_ClassDefinition* cd, HB_INTERNAL HB_Error -_HB_OPEN_Load_Device( HB_Device* d, +_HB_OPEN_Load_Device( HB_Device** device, HB_Stream stream ) { HB_Error error; @@ -1295,6 +1295,14 @@ _HB_OPEN_Load_Device( HB_Device* d, if ( ACCESS_Frame( 6L ) ) return error; + if ( ALLOC( *device, sizeof(HB_Device)) ) + { + *device = 0; + return error; + } + + HB_Device* d = *device; + d->StartSize = GET_UShort(); d->EndSize = GET_UShort(); d->DeltaFormat = GET_UShort(); @@ -1318,11 +1326,17 @@ _HB_OPEN_Load_Device( HB_Device* d, ( 4 - d->DeltaFormat ) ) + 1; if ( ALLOC_ARRAY( d->DeltaValue, count, HB_UShort ) ) + { + FREE( *device ); + *device = 0; return error; + } if ( ACCESS_Frame( count * 2L ) ) { FREE( d->DeltaValue ); + FREE( *device ); + *device = 0; return error; } @@ -1338,9 +1352,13 @@ _HB_OPEN_Load_Device( HB_Device* d, HB_INTERNAL void -_HB_OPEN_Free_Device( HB_Device* d ) +_HB_OPEN_Free_Device( HB_Device** d ) { - FREE( d->DeltaValue ); + if ( *d ) + { + FREE( (*d)->DeltaValue ); + FREE( *d ); + } } @@ -1380,12 +1398,20 @@ _HB_OPEN_Free_Device( HB_Device* d ) mask = 0x00FF */ HB_INTERNAL HB_Error -_HB_OPEN_Get_Device( HB_Device* d, +_HB_OPEN_Get_Device( HB_Device** device, HB_UShort size, HB_Short* value ) { HB_UShort byte, bits, mask, f, s; + HB_Error error; + + if ( ALLOC( *device, sizeof(HB_Device)) ) + { + *device = 0; + return error; + } + HB_Device* d = *device; f = d->DeltaFormat; @@ -1408,6 +1434,8 @@ _HB_OPEN_Get_Device( HB_Device* d, else { *value = 0; + FREE( *device ); + *device = 0; return HB_Err_Not_Covered; } } diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open.h b/src/3rdparty/harfbuzz/src/harfbuzz-open.h index bdc6358..4ba6cf5 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-open.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-open.h @@ -30,6 +30,10 @@ HB_BEGIN_HEADER +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(push, 1) +#endif + /* Use this if a feature applies to all glyphs */ #define HB_ALL_GLYPHS 0xFFFF @@ -42,10 +46,10 @@ HB_BEGIN_HEADER struct HB_LangSys_ { + HB_UShort* FeatureIndex; /* array of Feature indices */ HB_UShort LookupOrderOffset; /* always 0 for TT Open 1.0 */ HB_UShort ReqFeatureIndex; /* required FeatureIndex */ HB_UShort FeatureCount; /* number of Feature indices */ - HB_UShort* FeatureIndex; /* array of Feature indices */ }; typedef struct HB_LangSys_ HB_LangSys; @@ -53,8 +57,8 @@ typedef struct HB_LangSys_ HB_LangSys; struct HB_LangSysRecord_ { - HB_UInt LangSysTag; /* LangSysTag identifier */ HB_LangSys LangSys; /* LangSys table */ + HB_UInt LangSysTag; /* LangSysTag identifier */ }; typedef struct HB_LangSysRecord_ HB_LangSysRecord; @@ -62,9 +66,9 @@ typedef struct HB_LangSysRecord_ HB_LangSysRecord; struct HB_ScriptTable_ { + HB_LangSysRecord* LangSysRecord; /* array of LangSysRecords */ HB_LangSys DefaultLangSys; /* DefaultLangSys table */ HB_UShort LangSysCount; /* number of LangSysRecords */ - HB_LangSysRecord* LangSysRecord; /* array of LangSysRecords */ }; typedef struct HB_ScriptTable_ HB_ScriptTable; @@ -81,8 +85,8 @@ typedef struct HB_ScriptRecord_ HB_ScriptRecord; struct HB_ScriptList_ { - HB_UShort ScriptCount; /* number of ScriptRecords */ HB_ScriptRecord* ScriptRecord; /* array of ScriptRecords */ + HB_UShort ScriptCount; /* number of ScriptRecords */ }; typedef struct HB_ScriptList_ HB_ScriptList; @@ -92,9 +96,9 @@ typedef struct HB_ScriptList_ HB_ScriptList; struct HB_Feature_ { + HB_UShort* LookupListIndex; /* array of LookupList indices */ HB_UShort FeatureParams; /* always 0 for TT Open 1.0 */ HB_UShort LookupListCount; /* number of LookupList indices */ - HB_UShort* LookupListIndex; /* array of LookupList indices */ }; typedef struct HB_Feature_ HB_Feature; @@ -111,9 +115,9 @@ typedef struct HB_FeatureRecord_ HB_FeatureRecord; struct HB_FeatureList_ { - HB_UShort FeatureCount; /* number of FeatureRecords */ - HB_FeatureRecord* FeatureRecord; /* array of FeatureRecords */ HB_UShort* ApplyOrder; /* order to apply features */ + HB_FeatureRecord* FeatureRecord; /* array of FeatureRecords */ + HB_UShort FeatureCount; /* number of FeatureRecords */ HB_UShort ApplyCount; /* number of elements in ApplyOrder */ }; @@ -127,10 +131,10 @@ typedef struct HB_SubTable_ HB_SubTable; struct HB_Lookup_ { + HB_SubTable* SubTable; /* array of SubTables */ HB_UShort LookupType; /* Lookup type */ HB_UShort LookupFlag; /* Lookup qualifiers */ HB_UShort SubTableCount; /* number of SubTables */ - HB_SubTable* SubTable; /* array of SubTables */ }; typedef struct HB_Lookup_ HB_Lookup; @@ -144,9 +148,9 @@ typedef struct HB_Lookup_ HB_Lookup; struct HB_LookupList_ { - HB_UShort LookupCount; /* number of Lookups */ HB_Lookup* Lookup; /* array of Lookup records */ HB_UInt* Properties; /* array of flags */ + HB_UShort LookupCount; /* number of Lookups */ }; typedef struct HB_LookupList_ HB_LookupList; @@ -167,8 +171,8 @@ typedef struct HB_LookupList_ HB_LookupList; struct HB_CoverageFormat1_ { - HB_UShort GlyphCount; /* number of glyphs in GlyphArray */ HB_UShort* GlyphArray; /* array of glyph IDs */ + HB_UShort GlyphCount; /* number of glyphs in GlyphArray */ }; typedef struct HB_CoverageFormat1_ HB_CoverageFormat1; @@ -187,8 +191,8 @@ typedef struct HB_RangeRecord_ HB_RangeRecord; struct HB_CoverageFormat2_ { - HB_UShort RangeCount; /* number of RangeRecords */ HB_RangeRecord* RangeRecord; /* array of RangeRecords */ + HB_UShort RangeCount; /* number of RangeRecords */ }; typedef struct HB_CoverageFormat2_ HB_CoverageFormat2; @@ -196,7 +200,7 @@ typedef struct HB_CoverageFormat2_ HB_CoverageFormat2; struct HB_Coverage_ { - HB_UShort CoverageFormat; /* 1 or 2 */ + HB_Byte CoverageFormat; /* 1 or 2 */ union { @@ -210,10 +214,10 @@ typedef struct HB_Coverage_ HB_Coverage; struct HB_ClassDefFormat1_ { + HB_UShort* ClassValueArray; /* array of class values */ HB_UShort StartGlyph; /* first glyph ID of the ClassValueArray */ HB_UShort GlyphCount; /* size of the ClassValueArray */ - HB_UShort* ClassValueArray; /* array of class values */ }; typedef struct HB_ClassDefFormat1_ HB_ClassDefFormat1; @@ -231,10 +235,10 @@ typedef struct HB_ClassRangeRecord_ HB_ClassRangeRecord; struct HB_ClassDefFormat2_ { - HB_UShort ClassRangeCount; - /* number of ClassRangeRecords */ HB_ClassRangeRecord* ClassRangeRecord; /* array of ClassRangeRecords */ + HB_UShort ClassRangeCount; + /* number of ClassRangeRecords */ }; typedef struct HB_ClassDefFormat2_ HB_ClassDefFormat2; @@ -242,15 +246,14 @@ typedef struct HB_ClassDefFormat2_ HB_ClassDefFormat2; struct HB_ClassDefinition_ { - HB_Bool loaded; - - HB_UShort ClassFormat; /* 1 or 2 */ - union { HB_ClassDefFormat1 cd1; HB_ClassDefFormat2 cd2; } cd; + + HB_Byte ClassFormat; /* 1 or 2 */ + HB_Bool loaded; }; typedef struct HB_ClassDefinition_ HB_ClassDefinition; @@ -258,11 +261,11 @@ typedef struct HB_ClassDefinition_ HB_ClassDefinition; struct HB_Device_ { + HB_UShort* DeltaValue; /* array of compressed data */ HB_UShort StartSize; /* smallest size to correct */ HB_UShort EndSize; /* largest size to correct */ - HB_UShort DeltaFormat; /* DeltaValue array data format: + HB_Byte DeltaFormat; /* DeltaValue array data format: 1, 2, or 3 */ - HB_UShort* DeltaValue; /* array of compressed data */ }; typedef struct HB_Device_ HB_Device; @@ -276,6 +279,9 @@ enum HB_Type_ typedef enum HB_Type_ HB_Type; +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(pop) +#endif HB_END_HEADER diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp index d2f902f..2dae501 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp @@ -25,6 +25,7 @@ #include "harfbuzz-shaper.cpp" #include "harfbuzz-indic.cpp" extern "C" { +#include "harfbuzz-greek.c" #include "harfbuzz-tibetan.c" #include "harfbuzz-khmer.c" #include "harfbuzz-hebrew.c" diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h index 2fce7df..e1360c7 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h @@ -103,6 +103,7 @@ typedef struct { extern const HB_ScriptEngine hb_scriptEngines[]; extern HB_Bool HB_BasicShape(HB_ShaperItem *shaper_item); +extern HB_Bool HB_GreekShape(HB_ShaperItem *shaper_item); extern HB_Bool HB_TibetanShape(HB_ShaperItem *shaper_item); extern HB_Bool HB_HebrewShape(HB_ShaperItem *shaper_item); extern HB_Bool HB_ArabicShape(HB_ShaperItem *shaper_item); diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp index ff69304..ce4d4ac 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp @@ -584,7 +584,7 @@ const HB_ScriptEngine HB_ScriptEngines[] = { // Common { HB_BasicShape, 0}, // Greek - { HB_BasicShape, 0}, + { HB_GreekShape, 0}, // Cyrillic { HB_BasicShape, 0}, // Armenian diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h index f7c7714..32f5781 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h @@ -34,6 +34,22 @@ HB_BEGIN_HEADER +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(push, 1) +#endif + +/* + using anything else than signed or unsigned for bitfields in C is non standard, + but accepted by almost all compilers. And it gives a significant reduction in + memory consumption as HB_CharAttributes and HB_GlyphAttributes will not have + a 4 byte alignment +*/ +#ifdef __xlC__ +typedef unsigned hb_bitfield; +#else +typedef hb_uint8 hb_bitfield; +#endif + typedef enum { HB_Script_Common, HB_Script_Greek, @@ -123,12 +139,12 @@ typedef enum { typedef struct { - /*HB_LineBreakType*/ unsigned lineBreakType :2; - /*HB_Bool*/ unsigned whiteSpace :1; /* A unicode whitespace character, except NBSP, ZWNBSP */ - /*HB_Bool*/ unsigned charStop :1; /* Valid cursor position (for left/right arrow) */ - /*HB_Bool*/ unsigned wordBoundary :1; - /*HB_Bool*/ unsigned sentenceBoundary :1; - unsigned unused :2; + /*HB_LineBreakType*/ hb_bitfield lineBreakType :2; + /*HB_Bool*/ hb_bitfield whiteSpace :1; /* A unicode whitespace character, except NBSP, ZWNBSP */ + /*HB_Bool*/ hb_bitfield charStop :1; /* Valid cursor position (for left/right arrow) */ + /*HB_Bool*/ hb_bitfield wordBoundary :1; + /*HB_Bool*/ hb_bitfield sentenceBoundary :1; + hb_bitfield unused :2; } HB_CharAttributes; void HB_GetCharAttributes(const HB_UChar16 *string, hb_uint32 stringLength, @@ -181,12 +197,12 @@ typedef enum { * it like that. If this is a problem please tell Trolltech :) */ typedef struct { - unsigned justification :4; /* Justification class */ - unsigned clusterStart :1; /* First glyph of representation of cluster */ - unsigned mark :1; /* needs to be positioned around base char */ - unsigned zeroWidth :1; /* ZWJ, ZWNJ etc, with no width */ - unsigned dontPrint :1; - unsigned combiningClass :8; + hb_bitfield justification :4; /* Justification class */ + hb_bitfield clusterStart :1; /* First glyph of representation of cluster */ + hb_bitfield mark :1; /* needs to be positioned around base char */ + hb_bitfield zeroWidth :1; /* ZWJ, ZWNJ etc, with no width */ + hb_bitfield dontPrint :1; + hb_bitfield combiningClass :8; } HB_GlyphAttributes; typedef struct HB_FaceRec_ { @@ -269,6 +285,10 @@ struct HB_ShaperItem_ { HB_Bool HB_ShapeItem(HB_ShaperItem *item); +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(pop) +#endif + HB_END_HEADER #endif diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h index 9991936..a155cc2 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-stream.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-stream.h @@ -30,15 +30,21 @@ HB_BEGIN_HEADER +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(push, 1) +#endif + typedef struct HB_StreamRec_ { HB_Byte* base; + HB_Byte* cursor; HB_UInt size; HB_UInt pos; - - HB_Byte* cursor; } HB_StreamRec; +#ifdef HB_USE_PACKED_STRUCTS +#pragma pack(pop) +#endif HB_END_HEADER diff --git a/src/3rdparty/harfbuzz/tests/fuzzing/fuzz.cc b/src/3rdparty/harfbuzz/tests/fuzzing/fuzz.cc new file mode 100644 index 0000000..133577a --- /dev/null +++ b/src/3rdparty/harfbuzz/tests/fuzzing/fuzz.cc @@ -0,0 +1,124 @@ +// This is a fuzzing harness for Harfbuzz. Since Harfbuzz's input is generally +// expected to be controlled by a remote party it's a possible vector for +// security issues. +// +// Fuzzing is a black-box testing scheme where the black-box (Harfbuzz's shaping +// engine in this case) is fed random input to see if it will misbehave. +// Misbehaviours can often be turned into security or crash issues. +// +// It's expected that one will generally run this under valgrind in order to get +// better detection of problems. + +#include +#include + +#include +#include FT_FREETYPE_H + +#include "../../src/harfbuzz-shaper.h" +#include "../../src/harfbuzz-global.h" +#include "../../src/harfbuzz-gpos.h" + +extern "C" { +#include "../../contrib/harfbuzz-unicode.h" +#include "../../contrib/harfbuzz-freetype.h" +} + +static FT_Library freetype; + +static FT_Face loadFace(const char *path) +{ + FT_Face face; + + if (FT_New_Face(freetype, path, /* index */ 0, &face)) + return 0; + return face; +} + +static const int kWidth = 100; +static const int kHeight = 100; + +static int +usage(const char *argv0) { + fprintf(stderr, "Usage: %s \n", argv0); + return 1; +} + +int +main(int argc, char **argv) { + FT_Init_FreeType(&freetype); + + if (argc != 2) + return usage(argv[0]); + + FT_Face face; + if (FT_New_Face(freetype, argv[1], 0 /* face index */, &face)) { + fprintf(stderr, "Failed to load font file\n"); + return 1; + } + + HB_Face hbFace = HB_NewFace(face, hb_freetype_table_sfnt_get); + + HB_FontRec hbFont; + hbFont.klass = &hb_freetype_class; + hbFont.userData = face; + hbFont.x_ppem = face->size->metrics.x_ppem; + hbFont.y_ppem = face->size->metrics.y_ppem; + hbFont.x_scale = face->size->metrics.x_scale; + hbFont.y_scale = face->size->metrics.y_scale; + + // This is the maximum number of bytes of input which we'll feed to Harfbuzz + // in one shot. We also overload it and make it the size of the output arrays + // as well. (Must be a power of two.) + static const unsigned kMaxInputBytes = 1024; + uint8_t str[kMaxInputBytes]; + + HB_ShaperItem shaper_item; + shaper_item.kerning_applied = false; + shaper_item.string = (HB_UChar16 *) str; + shaper_item.stringLength = 0; + shaper_item.item.bidiLevel = 0; + shaper_item.shaperFlags = 0; + shaper_item.font = &hbFont; + shaper_item.face = hbFace; + shaper_item.glyphIndicesPresent = false; + shaper_item.initialGlyphCount = 0; + + HB_Glyph out_glyphs[kMaxInputBytes]; + HB_GlyphAttributes out_attrs[kMaxInputBytes]; + HB_Fixed out_advs[kMaxInputBytes]; + HB_FixedPoint out_offsets[kMaxInputBytes]; + unsigned short out_logClusters[kMaxInputBytes]; + + shaper_item.glyphs = out_glyphs; + shaper_item.attributes = out_attrs; + shaper_item.advances = out_advs; + shaper_item.offsets = out_offsets; + shaper_item.log_clusters = out_logClusters; + shaper_item.num_glyphs = kMaxInputBytes; + + FILE *urandom = fopen("/dev/urandom", "rb"); + if (!urandom) { + fprintf(stderr, "Cannot open /dev/urandom\n"); + return 1; + } + + for (;;) { + uint16_t len; + fread(&len, sizeof(len), 1, urandom); + len &= (kMaxInputBytes - 1); + len &= ~1; + fread(str, len, 1, urandom); + + ssize_t iterator = 0; + + for (;;) { + if (!hb_utf16_script_run_next(NULL, &shaper_item.item, (uint16_t *) str, len >> 1, &iterator)) + break; + + HB_ShapeItem(&shaper_item); + } + } + + HB_FreeFace(hbFace); +} -- cgit v0.12 From 277339cdcb5e0adac6ff669745a5390f2bf089b2 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 16 Jun 2010 00:05:29 +0200 Subject: Buildfix for MSVC2008 (C90 violation) --- src/3rdparty/harfbuzz/src/harfbuzz-open.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-open.c b/src/3rdparty/harfbuzz/src/harfbuzz-open.c index 4fc6ed1..255b7e6 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-open.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-open.c @@ -1285,6 +1285,7 @@ HB_INTERNAL HB_Error _HB_OPEN_Load_Device( HB_Device** device, HB_Stream stream ) { + HB_Device* d; HB_Error error; HB_UShort n, count; @@ -1301,7 +1302,7 @@ _HB_OPEN_Load_Device( HB_Device** device, return error; } - HB_Device* d = *device; + d = *device; d->StartSize = GET_UShort(); d->EndSize = GET_UShort(); @@ -1402,6 +1403,7 @@ _HB_OPEN_Get_Device( HB_Device** device, HB_UShort size, HB_Short* value ) { + HB_Device* d; HB_UShort byte, bits, mask, f, s; HB_Error error; @@ -1411,7 +1413,7 @@ _HB_OPEN_Get_Device( HB_Device** device, return error; } - HB_Device* d = *device; + d = *device; f = d->DeltaFormat; -- cgit v0.12 From 0ee0c77738faaeced93980dab33867d42efcf2cc Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 15 Jun 2010 10:57:28 +1000 Subject: Document section.delegate --- src/declarative/graphicsitems/qdeclarativelistview.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index dcf18af..48ac4a4 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1936,6 +1936,8 @@ void QDeclarativeListView::setCacheBuffer(int b) /*! \qmlproperty string ListView::section.property \qmlproperty enumeration ListView::section.criteria + \qmlproperty Component ListView::section.delegate + These properties hold the expression to be evaluated for the \l section attached property. \c section.property hold the name of the property to use to determine @@ -1949,6 +1951,8 @@ void QDeclarativeListView::setCacheBuffer(int b) \o ViewSection.FirstCharacter - section is the first character of the property value. \endlist + \c section.delegate holds the delegate component for each section. + Each item in the list has attached properties named \c ListView.section and \c ListView.prevSection. These may be used to place a section header for related items. The example below assumes that the model is sorted by size of @@ -1985,7 +1989,7 @@ QString QDeclarativeListView::currentSection() const These properties hold the move and resize animation speed of the highlight delegate. - \c highlightFollowsCurrentItem must be true for these properties + \l highlightFollowsCurrentItem must be true for these properties to have effect. The default value for the speed properties is 400 pixels/second. -- cgit v0.12 From cbc1541ecf32ef0c52086b0fc83e1bca70a668ba Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 15 Jun 2010 14:46:37 +1000 Subject: Document QML_IMPORT_TRACE --- doc/src/declarative/qdeclarativedebugging.qdoc | 31 ++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/doc/src/declarative/qdeclarativedebugging.qdoc b/doc/src/declarative/qdeclarativedebugging.qdoc index 4ff7fde..99dd2d2 100644 --- a/doc/src/declarative/qdeclarativedebugging.qdoc +++ b/doc/src/declarative/qdeclarativedebugging.qdoc @@ -60,8 +60,35 @@ Rectangle { \section1 Debugging Transitions When a transition doesn't look quite right, it can be helpful to view it in slow -motion to see what is happening more clearly. The \l {Qt Declarative UI Runtime}{qml} tool provides a -"Slow Down Animations" menu option to facilitate this. +motion to see what is happening more clearly. This functionality is supported +in the \l {Qt Declarative UI Runtime}{qmlviewer} tool: to enable this, +click on the "Debugging" menu, then "Slow Down Animations". + + +\section1 Debugging module imports + +The \c QML_IMPORT_TRACE environment variable can be set to enable debug output +from QML's import loading mechanisms. + +For example, for a simple QML file like this: + +\qml +import Qt 4.7 + +Rectangle { width: 100; height: 100 } +\endqml + +If you set \c {QML_IMPORT_TRACE=1} before running the \l {Qt Declarative UI Runtime}{qmlviewer} +(or your QML C++ application), you will see output similar to this: + +\code +QDeclarativeImportDatabase::addImportPath "/qt-sdk/imports" +QDeclarativeImportDatabase::addImportPath "/qt-sdk/bin/QMLViewer.app/Contents/MacOS" +QDeclarativeImportDatabase::addToImport 0x106237370 "." -1.-1 File as "" +QDeclarativeImportDatabase::addToImport 0x106237370 "Qt" 4.7 Library as "" +QDeclarativeImportDatabase::resolveType "Rectangle" = "QDeclarativeRectangle" +\endcode + \section1 Debugging with Qt Creator -- cgit v0.12 From eb05fde709f958a0a67f83455c02dcde3dfc1493 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 15 Jun 2010 15:55:58 +1000 Subject: Clean up list examples --- .../declarative/modelviews/listview/PetsModel.qml | 101 +++++++++ .../modelviews/listview/RecipesModel.qml | 130 +++++++++++ .../listview/content/ClickAutoRepeating.qml | 71 ------ .../modelviews/listview/content/MediaButton.qml | 75 ------- .../listview/content/PressAndHoldButton.qml | 79 +++++++ .../modelviews/listview/content/TextButton.qml | 78 +++++++ .../modelviews/listview/dummydata/MyPetsModel.qml | 101 --------- .../modelviews/listview/dummydata/Recipes.qml | 130 ----------- .../modelviews/listview/dynamiclist.qml | 244 +++++++-------------- .../modelviews/listview/expandingdelegates.qml | 74 ++++--- .../declarative/modelviews/listview/highlight.qml | 34 ++- .../modelviews/listview/highlightranges.qml | 70 +++--- .../declarative/modelviews/listview/sections.qml | 77 +++---- 13 files changed, 578 insertions(+), 686 deletions(-) create mode 100644 examples/declarative/modelviews/listview/PetsModel.qml create mode 100644 examples/declarative/modelviews/listview/RecipesModel.qml delete mode 100644 examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml delete mode 100644 examples/declarative/modelviews/listview/content/MediaButton.qml create mode 100644 examples/declarative/modelviews/listview/content/PressAndHoldButton.qml create mode 100644 examples/declarative/modelviews/listview/content/TextButton.qml delete mode 100644 examples/declarative/modelviews/listview/dummydata/MyPetsModel.qml delete mode 100644 examples/declarative/modelviews/listview/dummydata/Recipes.qml diff --git a/examples/declarative/modelviews/listview/PetsModel.qml b/examples/declarative/modelviews/listview/PetsModel.qml new file mode 100644 index 0000000..70cdcdd --- /dev/null +++ b/examples/declarative/modelviews/listview/PetsModel.qml @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +// ListModel allows free form list models to be defined and populated. + +ListModel { + id: petsModel + ListElement { + name: "Polly" + type: "Parrot" + age: 12 + size: "Small" + } + ListElement { + name: "Penny" + type: "Turtle" + age: 4 + size: "Small" + } + ListElement { + name: "Warren" + type: "Rabbit" + age: 2 + size: "Small" + } + ListElement { + name: "Spot" + type: "Dog" + age: 9 + size: "Medium" + } + ListElement { + name: "Schrödinger" + type: "Cat" + age: 2 + size: "Medium" + } + ListElement { + name: "Joey" + type: "Kangaroo" + age: 1 + size: "Medium" + } + ListElement { + name: "Kimba" + type: "Bunny" + age: 65 + size: "Large" + } + ListElement { + name: "Rover" + type: "Dog" + age: 5 + size: "Large" + } + ListElement { + name: "Tiny" + type: "Elephant" + age: 15 + size: "Large" + } +} diff --git a/examples/declarative/modelviews/listview/RecipesModel.qml b/examples/declarative/modelviews/listview/RecipesModel.qml new file mode 100644 index 0000000..03ab961 --- /dev/null +++ b/examples/declarative/modelviews/listview/RecipesModel.qml @@ -0,0 +1,130 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +ListModel { + id: recipesModel + ListElement { + title: "Pancakes" + picture: "content/pics/pancakes.jpg" + ingredients: " +
      +
    • 1 cup (150g) self-raising flour +
    • 1 tbs caster sugar +
    • 3/4 cup (185ml) milk +
    • 1 egg +
    + " + method: " +
      +
    1. Sift flour and sugar together into a bowl. Add a pinch of salt. +
    2. Beat milk and egg together, then add to dry ingredients. Beat until smooth. +
    3. Pour mixture into a pan on medium heat and cook until bubbles appear on the surface. +
    4. Turn over and cook other side until golden. +
    + " + } + ListElement { + title: "Fruit Salad" + picture: "content/pics/fruit-salad.jpg" + ingredients: "* Seasonal Fruit" + method: "* Chop fruit and place in a bowl." + } + ListElement { + title: "Vegetable Soup" + picture: "content/pics/vegetable-soup.jpg" + ingredients: " +
      +
    • 1 onion +
    • 1 turnip +
    • 1 potato +
    • 1 carrot +
    • 1 head of celery +
    • 1 1/2 litres of water +
    + " + method: " +
      +
    1. Chop vegetables. +
    2. Boil in water until vegetables soften. +
    3. Season with salt and pepper to taste. +
    + " + } + ListElement { + title: "Hamburger" + picture: "content/pics/hamburger.jpg" + ingredients: " +
      +
    • 500g minced beef +
    • Seasoning +
    • lettuce, tomato, onion, cheese +
    • 1 hamburger bun for each burger +
    + " + method: " +
      +
    1. Mix the beef, together with seasoning, in a food processor. +
    2. Shape the beef into burgers. +
    3. Grill the burgers for about 5 mins on each side (until cooked through) +
    4. Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion. +
    + " + } + ListElement { + title: "Lemonade" + picture: "content/pics/lemonade.jpg" + ingredients: " +
      +
    • 1 cup Lemon Juice +
    • 1 cup Sugar +
    • 6 Cups of Water (2 cups warm water, 4 cups cold water) +
    + " + method: " +
      +
    1. Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves. +
    2. Pour in lemon juice, stir again, and add 4 cups of cold water. +
    3. Chill or serve over ice cubes. +
    + " + } +} diff --git a/examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml b/examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml deleted file mode 100644 index dc23b78..0000000 --- a/examples/declarative/modelviews/listview/content/ClickAutoRepeating.qml +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 - -Item { - id: page - property int repeatdelay: 300 - property int repeatperiod: 75 - property bool isPressed: false - - signal pressed - signal released - signal clicked - - SequentialAnimation on isPressed { - running: false - id: autoRepeat - PropertyAction { target: page; property: "isPressed"; value: true } - ScriptAction { script: page.pressed() } - ScriptAction { script: page.clicked() } - PauseAnimation { duration: repeatdelay } - SequentialAnimation { - loops: Animation.Infinite - ScriptAction { script: page.clicked() } - PauseAnimation { duration: repeatperiod } - } - } - MouseArea { - anchors.fill: parent - onPressed: autoRepeat.start() - onReleased: { autoRepeat.stop(); parent.isPressed = false; page.released() } - } -} diff --git a/examples/declarative/modelviews/listview/content/MediaButton.qml b/examples/declarative/modelviews/listview/content/MediaButton.qml deleted file mode 100644 index 2aed6e0..0000000 --- a/examples/declarative/modelviews/listview/content/MediaButton.qml +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 - -Item { - property variant text - signal clicked - - id: container - Image { - id: normal - source: "pics/button.png" - } - Image { - id: pressed - source: "pics/button-pressed.png" - opacity: 0 - } - MouseArea { - id: clickRegion - anchors.fill: normal - onClicked: { container.clicked(); } - } - Text { - font.bold: true - color: "white" - anchors.centerIn: normal - text: container.text - } - width: normal.width - - states: State { - name: "Pressed" - when: clickRegion.pressed == true - PropertyChanges { target: pressed; opacity: 1 } - } -} diff --git a/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml b/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml new file mode 100644 index 0000000..7c174e3 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Image { + id: container + + property int repeatDelay: 300 + property int repeatDuration: 75 + property bool pressed: false + + signal clicked + + scale: pressed ? 0.9 : 1 + + SequentialAnimation on pressed { + id: autoRepeatClicks + running: false + + PropertyAction { target: container; property: "pressed"; value: true } + ScriptAction { script: container.clicked() } + PauseAnimation { duration: repeatDelay } + + SequentialAnimation { + loops: Animation.Infinite + ScriptAction { script: container.clicked() } + PauseAnimation { duration: repeatDuration } + } + } + + MouseArea { + anchors.fill: parent + + onPressed: autoRepeatClicks.start() + onReleased: { + autoRepeatClicks.stop() + container.pressed = false + } + } +} + diff --git a/examples/declarative/modelviews/listview/content/TextButton.qml b/examples/declarative/modelviews/listview/content/TextButton.qml new file mode 100644 index 0000000..ded7a11 --- /dev/null +++ b/examples/declarative/modelviews/listview/content/TextButton.qml @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + id: container + + property alias text: label.text + + signal clicked + + width: label.width + 20; height: label.height + 6 + smooth: true + radius: 10 + + gradient: Gradient { + GradientStop { id: gradientStop; position: 0.0; color: palette.light } + GradientStop { position: 1.0; color: palette.button } + } + + SystemPalette { id: palette } + + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: { container.clicked() } + } + + Text { + id: label + anchors.centerIn: parent + } + + states: State { + name: "pressed" + when: mouseArea.pressed + PropertyChanges { target: gradientStop; color: palette.dark } + } +} + diff --git a/examples/declarative/modelviews/listview/dummydata/MyPetsModel.qml b/examples/declarative/modelviews/listview/dummydata/MyPetsModel.qml deleted file mode 100644 index 70cdcdd..0000000 --- a/examples/declarative/modelviews/listview/dummydata/MyPetsModel.qml +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 - -// ListModel allows free form list models to be defined and populated. - -ListModel { - id: petsModel - ListElement { - name: "Polly" - type: "Parrot" - age: 12 - size: "Small" - } - ListElement { - name: "Penny" - type: "Turtle" - age: 4 - size: "Small" - } - ListElement { - name: "Warren" - type: "Rabbit" - age: 2 - size: "Small" - } - ListElement { - name: "Spot" - type: "Dog" - age: 9 - size: "Medium" - } - ListElement { - name: "Schrödinger" - type: "Cat" - age: 2 - size: "Medium" - } - ListElement { - name: "Joey" - type: "Kangaroo" - age: 1 - size: "Medium" - } - ListElement { - name: "Kimba" - type: "Bunny" - age: 65 - size: "Large" - } - ListElement { - name: "Rover" - type: "Dog" - age: 5 - size: "Large" - } - ListElement { - name: "Tiny" - type: "Elephant" - age: 15 - size: "Large" - } -} diff --git a/examples/declarative/modelviews/listview/dummydata/Recipes.qml b/examples/declarative/modelviews/listview/dummydata/Recipes.qml deleted file mode 100644 index 03ab961..0000000 --- a/examples/declarative/modelviews/listview/dummydata/Recipes.qml +++ /dev/null @@ -1,130 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import Qt 4.7 - -ListModel { - id: recipesModel - ListElement { - title: "Pancakes" - picture: "content/pics/pancakes.jpg" - ingredients: " -
      -
    • 1 cup (150g) self-raising flour -
    • 1 tbs caster sugar -
    • 3/4 cup (185ml) milk -
    • 1 egg -
    - " - method: " -
      -
    1. Sift flour and sugar together into a bowl. Add a pinch of salt. -
    2. Beat milk and egg together, then add to dry ingredients. Beat until smooth. -
    3. Pour mixture into a pan on medium heat and cook until bubbles appear on the surface. -
    4. Turn over and cook other side until golden. -
    - " - } - ListElement { - title: "Fruit Salad" - picture: "content/pics/fruit-salad.jpg" - ingredients: "* Seasonal Fruit" - method: "* Chop fruit and place in a bowl." - } - ListElement { - title: "Vegetable Soup" - picture: "content/pics/vegetable-soup.jpg" - ingredients: " -
      -
    • 1 onion -
    • 1 turnip -
    • 1 potato -
    • 1 carrot -
    • 1 head of celery -
    • 1 1/2 litres of water -
    - " - method: " -
      -
    1. Chop vegetables. -
    2. Boil in water until vegetables soften. -
    3. Season with salt and pepper to taste. -
    - " - } - ListElement { - title: "Hamburger" - picture: "content/pics/hamburger.jpg" - ingredients: " -
      -
    • 500g minced beef -
    • Seasoning -
    • lettuce, tomato, onion, cheese -
    • 1 hamburger bun for each burger -
    - " - method: " -
      -
    1. Mix the beef, together with seasoning, in a food processor. -
    2. Shape the beef into burgers. -
    3. Grill the burgers for about 5 mins on each side (until cooked through) -
    4. Serve each burger on a bun with ketchup, cheese, lettuce, tomato and onion. -
    - " - } - ListElement { - title: "Lemonade" - picture: "content/pics/lemonade.jpg" - ingredients: " -
      -
    • 1 cup Lemon Juice -
    • 1 cup Sugar -
    • 6 Cups of Water (2 cups warm water, 4 cups cold water) -
    - " - method: " -
      -
    1. Pour 2 cups of warm water into a pitcher and stir in sugar until it dissolves. -
    2. Pour in lemon juice, stir again, and add 4 cups of cold water. -
    3. Chill or serve over ice cubes. -
    - " - } -} diff --git a/examples/declarative/modelviews/listview/dynamiclist.qml b/examples/declarative/modelviews/listview/dynamiclist.qml index df2e094..0e290f5 100644 --- a/examples/declarative/modelviews/listview/dynamiclist.qml +++ b/examples/declarative/modelviews/listview/dynamiclist.qml @@ -37,16 +37,18 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ - import Qt 4.7 import "content" -import "../../ui-components/scrollbar" + +// This example shows how items can be dynamically added to and removed from +// a ListModel, and how these list modifications can be animated. Rectangle { id: container width: 640; height: 480 color: "#343434" + // The model: ListModel { id: fruitModel @@ -77,55 +79,43 @@ Rectangle { ListElement { description: "Smelly" } ] } - ListElement { - name: "Elderberry"; cost: 0.05 - attributes: [ - ListElement { description: "Berry" } - ] - } - ListElement { - name: "Fig"; cost: 0.25 - attributes: [ - ListElement { description: "Flower" } - ] - } } + // The delegate for each fruit in the model: Component { - id: fruitDelegate - + id: listDelegate + Item { - id: wrapper - width: container.width; height: 55 + id: delegateItem + width: listView.width; height: 55 + clip: true - Column { - id: moveButtons - x: 5; width: childrenRect.width; anchors.verticalCenter: parent.verticalCenter + Row { + anchors.verticalCenter: parent.verticalCenter + spacing: 10 - Image { - source: "content/pics/go-up.png" - MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index-1,1) } - } - Image { source: "content/pics/go-down.png" - MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index+1,1) } + Column { + Image { + source: "content/pics/go-up.png" + MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index-1,1) } + } + Image { source: "content/pics/go-down.png" + MouseArea { anchors.fill: parent; onClicked: fruitModel.move(index,index+1,1) } + } } - } - Column { - anchors { right: itemButtons.left; verticalCenter: parent.verticalCenter; left: moveButtons.right; leftMargin: 10 } + Column { + anchors.verticalCenter: parent.verticalCenter - Text { - id: label - width: parent.width - color: "White" - font.bold: true; font.pixelSize: 15 - text: name; elide: Text.ElideRight - } - Row { - spacing: 5 - Repeater { - model: attributes - Component { + Text { + text: name + font.pixelSize: 15 + color: "white" + } + Row { + spacing: 5 + Repeater { + model: attributes Text { text: description; color: "White" } } } @@ -133,149 +123,81 @@ Rectangle { } Row { - id: itemButtons - - anchors { right: removeButton.left; rightMargin: 35; verticalCenter: parent.verticalCenter } - width: childrenRect.width + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right spacing: 10 - Image { + PressAndHoldButton { + anchors.verticalCenter: parent.verticalCenter source: "content/pics/list-add.png" - scale: clickUp.isPressed ? 0.9 : 1 - - ClickAutoRepeating { - id: clickUp - anchors.fill: parent - onClicked: fruitModel.setProperty(index, "cost", cost+0.25) - } + onClicked: fruitModel.setProperty(index, "cost", cost + 0.25) } - Text { id: costText; text: '$'+Number(cost).toFixed(2); font.pixelSize: 15; color: "White"; font.bold: true; } + Text { + id: costText + anchors.verticalCenter: parent.verticalCenter + text: '$' + Number(cost).toFixed(2) + font.pixelSize: 15 + color: "white" + font.bold: true + } - Image { + PressAndHoldButton { + anchors.verticalCenter: parent.verticalCenter source: "content/pics/list-remove.png" - scale: clickDown.isPressed ? 0.9 : 1 + onClicked: fruitModel.setProperty(index, "cost", Math.max(0,cost-0.25)) + } - ClickAutoRepeating { - id: clickDown - anchors.fill: parent - onClicked: fruitModel.setProperty(index, "cost", Math.max(0,cost-0.25)) - } + Image { + source: "content/pics/archive-remove.png" + MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) } } } - Image { - id: removeButton - anchors { verticalCenter: parent.verticalCenter; right: parent.right; rightMargin: 10 } - source: "content/pics/archive-remove.png" - MouseArea { anchors.fill:parent; onClicked: fruitModel.remove(index) } + // Animate adding and removing of items: + + ListView.onAdd: SequentialAnimation { + PropertyAction { target: delegateItem; property: "height"; value: 0 } + NumberAnimation { target: delegateItem; property: "height"; to: 55; duration: 250; easing.type: Easing.InOutQuad } } - // Animate adding and removing items - ListView.delayRemove: true // so that the item is not destroyed immediately - ListView.onAdd: state = "add" - ListView.onRemove: state = "remove" - states: [ - State { - name: "add" - PropertyChanges { target: wrapper; height: 55; clip: true } - }, - State { - name: "remove" - PropertyChanges { target: wrapper; height: 0; clip: true } - } - ] - transitions: [ - Transition { - to: "add" - SequentialAnimation { - NumberAnimation { properties: "height"; from: 0; to: 55 } - PropertyAction { target: wrapper; property: "state"; value: "" } - } - }, - Transition { - to: "remove" - SequentialAnimation { - NumberAnimation { properties: "height" } - // Make sure delayRemove is set back to false so that the item can be destroyed - PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false } - } - } - ] + ListView.onRemove: SequentialAnimation { + PropertyAction { target: delegateItem; property: "ListView.delayRemove"; value: true } + NumberAnimation { target: delegateItem; property: "height"; to: 0; duration: 250; easing.type: Easing.InOutQuad } + + // Make sure delayRemove is set back to false so that the item can be destroyed + PropertyAction { target: delegateItem; property: "ListView.delayRemove"; value: false } + } } } + // The view: ListView { - id: view - anchors { top: parent.top; left: parent.left; right: parent.right; bottom: buttons.top } + id: listView + anchors.fill: parent; anchors.margins: 20 model: fruitModel - delegate: fruitDelegate - } - - // Attach scrollbar to the right edge of the view. - ScrollBar { - id: verticalScrollBar - - width: 8; height: view.height; anchors.right: view.right - opacity: 0 - orientation: Qt.Vertical - position: view.visibleArea.yPosition - pageSize: view.visibleArea.heightRatio - - // Only show the scrollbar when the view is moving. - states: State { - name: "ShowBars"; when: view.movingVertically - PropertyChanges { target: verticalScrollBar; opacity: 1 } - } - transitions: Transition { - NumberAnimation { properties: "opacity"; duration: 400 } - } + delegate: listDelegate } Row { - id: buttons - - x: 8; width: childrenRect.width; height: childrenRect.height - anchors { bottom: parent.bottom; bottomMargin: 8 } - spacing: 8 - - Image { - source: "content/pics/archive-insert.png" - - MouseArea { - anchors.fill: parent - onClicked: { - fruitModel.append({ - "name": "Pizza Margarita", - "cost": 5.95, - "attributes": [{"description": "Cheese"},{"description": "Tomato"}] - }) - } - } - } - - Image { - source: "content/pics/archive-insert.png" - - MouseArea { - anchors.fill: parent; - onClicked: { - fruitModel.insert(0, { - "name": "Pizza Supreme", - "cost": 9.95, - "attributes": [{"description": "Cheese"},{"description": "Tomato"},{"description": "The Works"}] - }) - } + anchors { left: parent.left; bottom: parent.bottom; margins: 20 } + spacing: 10 + + TextButton { + text: "Add an item" + onClicked: { + fruitModel.append({ + "name": "Pizza Margarita", + "cost": 5.95, + "attributes": [{"description": "Cheese"}, {"description": "Tomato"}] + }) } } - Image { - source: "content/pics/archive-remove.png" - - MouseArea { - anchors.fill: parent - onClicked: fruitModel.clear() - } + TextButton { + text: "Remove all items" + onClicked: fruitModel.clear() } } } + diff --git a/examples/declarative/modelviews/listview/expandingdelegates.qml b/examples/declarative/modelviews/listview/expandingdelegates.qml index f4b97ea..94ea48f 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates.qml +++ b/examples/declarative/modelviews/listview/expandingdelegates.qml @@ -41,7 +41,7 @@ import Qt 4.7 import "content" -// This example illustrates expanding a list item to show a more detailed view +// This example illustrates expanding a list item to show a more detailed view. Rectangle { id: page @@ -49,13 +49,13 @@ Rectangle { color: "black" // Delegate for the recipes. This delegate has two modes: - // 1. the list mode (default), which just shows the picture and title of the recipe. - // 2. the details mode, which also shows the ingredients and method. + // 1. List mode (default), which just shows the picture and title of the recipe. + // 2. Details mode, which also shows the ingredients and method. Component { id: recipeDelegate Item { - id: wrapper + id: recipe // Create a property to contain the visibility of the details. // We can bind multiple element's opacity to this one property, @@ -63,14 +63,15 @@ Rectangle { // want to fade. property real detailsOpacity : 0 - width: list.width + width: listView.width + height: 70 // A simple rounded rectangle for the background Rectangle { id: background - x: 1; y: 2; width: parent.width - 2; height: parent.height - 4 - color: "#FEFFEE" - border.color: "#FFBE4F" + x: 2; y: 2; width: parent.width - x*2; height: parent.height - y*2 + color: "ivory" + border.color: "orange" radius: 5 } @@ -78,50 +79,53 @@ Rectangle { // When clicked it changes mode to 'Details'. If we are already // in Details mode, then no change will happen. MouseArea { - id: pageMouse anchors.fill: parent - onClicked: wrapper.state = 'Details'; + onClicked: recipe.state = 'Details'; } - // Layout the page. Picture, title and ingredients at the top, method at the + // Lay out the page: picture, title and ingredients at the top, and method at the // bottom. Note that elements that should not be visible in the list - // mode have their opacity set to wrapper.detailsOpacity. + // mode have their opacity set to recipe.detailsOpacity. Row { id: topLayout - x: 10; y: 10; height: recipePic.height; width: parent.width + x: 10; y: 10; height: recipeImage.height; width: parent.width spacing: 10 Image { - id: recipePic - source: picture; width: 48; height: 48 + id: recipeImage + width: 50; height: 50 + source: picture } Column { - width: background.width-recipePic.width-20; height: recipePic.height; + width: background.width - recipeImage.width - 20; height: recipeImage.height spacing: 5 - Text { id: name; text: title; font.bold: true; font.pointSize: 16 } + Text { + text: title + font.bold: true; font.pointSize: 16 + } Text { text: "Ingredients" font.pointSize: 12; font.bold: true - opacity: wrapper.detailsOpacity + opacity: recipe.detailsOpacity } Text { text: ingredients wrapMode: Text.WordWrap width: parent.width - opacity: wrapper.detailsOpacity + opacity: recipe.detailsOpacity } } } Item { id: details - x: 10; width: parent.width-20 + x: 10; width: parent.width - 20 anchors { top: topLayout.bottom; topMargin: 10; bottom: parent.bottom; bottomMargin: 10 } - opacity: wrapper.detailsOpacity + opacity: recipe.detailsOpacity Text { id: methodTitle @@ -153,30 +157,28 @@ Rectangle { } // A button to close the detailed view, i.e. set the state back to default (''). - MediaButton { - y: 10; anchors { right: background.right; rightMargin: 5 } - opacity: wrapper.detailsOpacity + TextButton { + y: 10 + anchors { right: background.right; rightMargin: 10 } + opacity: recipe.detailsOpacity text: "Close" - onClicked: wrapper.state = ''; + onClicked: recipe.state = ''; } - // Set the default height to the height of the picture, plus margin. - height: 68 - states: State { name: "Details" PropertyChanges { target: background; color: "white" } - PropertyChanges { target: recipePic; width: 128; height: 128 } // Make picture bigger - PropertyChanges { target: wrapper; detailsOpacity: 1; x: 0 } // Make details visible - PropertyChanges { target: wrapper; height: list.height } // Fill the entire list area with the detailed view + PropertyChanges { target: recipeImage; width: 130; height: 130 } // Make picture bigger + PropertyChanges { target: recipe; detailsOpacity: 1; x: 0 } // Make details visible + PropertyChanges { target: recipe; height: listView.height } // Fill the entire list area with the detailed view // Move the list so that this item is at the top. - PropertyChanges { target: wrapper.ListView.view; explicit: true; contentY: wrapper.y } + PropertyChanges { target: recipe.ListView.view; explicit: true; contentY: recipe.y } // Disallow flicking while we're in detailed view - PropertyChanges { target: wrapper.ListView.view; interactive: false } + PropertyChanges { target: recipe.ListView.view; interactive: false } } transitions: Transition { @@ -191,10 +193,10 @@ Rectangle { // The actual list ListView { - id: list + id: listView anchors.fill: parent - clip: true - model: Recipes + model: RecipesModel {} delegate: recipeDelegate + clip: true } } diff --git a/examples/declarative/modelviews/listview/highlight.qml b/examples/declarative/modelviews/listview/highlight.qml index 239272a..5748974 100644 --- a/examples/declarative/modelviews/listview/highlight.qml +++ b/examples/declarative/modelviews/listview/highlight.qml @@ -41,12 +41,7 @@ import Qt 4.7 Rectangle { - width: 400; height: 300 - - // MyPets model is defined in dummydata/MyPetsModel.qml - // The launcher automatically loads files in dummydata/* to assist - // development without a real data source. - // This one contains my pets. + width: 200; height: 300 // Define a delegate component. A component will be // instantiated for each visible item in the list. @@ -54,42 +49,45 @@ Rectangle { id: petDelegate Item { id: wrapper - width: 200; height: 50 + width: 200; height: 55 Column { Text { text: 'Name: ' + name } Text { text: 'Type: ' + type } Text { text: 'Age: ' + age } } - // Use the ListView.isCurrentItem attached property to - // indent the item if it is the current item. + // indent the item if it is the current item states: State { name: "Current" when: wrapper.ListView.isCurrentItem - PropertyChanges { target: wrapper; x: 10 } + PropertyChanges { target: wrapper; x: 20 } } transitions: Transition { NumberAnimation { properties: "x"; duration: 200 } } } } - // Specify a highlight with custom movement. Note that highlightFollowsCurrentItem - // is set to false in the ListView so that we can control how the - // highlight moves to the current item. + + // Define a highlight with customised movement between items. Component { - id: petHighlight + id: highlightBar Rectangle { width: 200; height: 50 color: "#FFFF88" - SpringFollow on y { to: list1.currentItem.y; spring: 3; damping: 0.1 } + SpringFollow on y { to: listView.currentItem.y; spring: 3; damping: 0.1 } } } ListView { - id: list1 + id: listView width: 200; height: parent.height - model: MyPetsModel + + model: PetsModel {} delegate: petDelegate - highlight: petHighlight; highlightFollowsCurrentItem: false focus: true + + // Set the highlight delegate. Note we must also set highlightFollowsCurrentItem + // to false so the highlight delegate can control how the highlight is moved. + highlight: highlightBar + highlightFollowsCurrentItem: false } } diff --git a/examples/declarative/modelviews/listview/highlightranges.qml b/examples/declarative/modelviews/listview/highlightranges.qml index a8a95c4..162d8b7 100644 --- a/examples/declarative/modelviews/listview/highlightranges.qml +++ b/examples/declarative/modelviews/listview/highlightranges.qml @@ -43,46 +43,20 @@ import Qt 4.7 Rectangle { width: 600; height: 300 - // MyPets model is defined in dummydata/MyPetsModel.qml - // The viewer automatically loads files in dummydata/* to assist - // development without a real data source. - // This one contains my pets. - - // Define a delegate component. A component will be - // instantiated for each visible item in the list. - Component { - id: petDelegate - Item { - width: 200; height: 50 - Column { - Text { text: 'Name: ' + name } - Text { text: 'Type: ' + type } - Text { text: 'Age: ' + age } - } - } - } - - // Define a highlight component. Just one of these will be instantiated - // by each ListView and placed behind the current item. - Component { - id: petHighlight - Rectangle { color: "#FFFF88" } - } - // Show the model in three lists, with different highlight ranges. // preferredHighlightBegin and preferredHighlightEnd set the // range in which to attempt to maintain the highlight. // - // Note that the second and third ListView - // set their currentIndex to be the same as the first, and that - // the first ListView is given keyboard focus. + // The second and third ListView set their currentIndex to be the + // same as the first, and the first ListView is given keyboard focus. // - // The default mode allows the currentItem to move freely - // within the visible area. If it would move outside the visible - // area, the view is scrolled to keep it visible. + // The first list does not set a highlight range, so its currentItem + // can move freely within the visible area. If it moves outside the + // visible area, the view is automatically scrolled to keep the current + // item visible. // // The second list sets a highlight range which attempts to keep the - // current item within the the bounds of the range, however + // current item within the the bounds of the range. However, // items will not scroll beyond the beginning or end of the view, // forcing the highlight to move outside the range at the ends. // @@ -98,21 +72,22 @@ Rectangle { ListView { id: list1 width: 200; height: parent.height - model: MyPetsModel + model: PetsModel {} delegate: petDelegate - highlight: petHighlight + highlight: Rectangle { color: "lightsteelblue" } currentIndex: list3.currentIndex focus: true } ListView { id: list2 - x: 200; width: 200; height: parent.height - model: MyPetsModel + x: list1.width + width: 200; height: parent.height + model: PetsModel {} delegate: petDelegate - highlight: petHighlight + highlight: Rectangle { color: "yellow" } currentIndex: list1.currentIndex preferredHighlightBegin: 80; preferredHighlightEnd: 220 highlightRangeMode: ListView.ApplyRange @@ -120,14 +95,25 @@ Rectangle { ListView { id: list3 - x: 400; width: 200; height: parent.height - model: MyPetsModel + x: list1.width + list2.width + width: 200; height: parent.height + model: PetsModel {} delegate: petDelegate - highlight: Rectangle { color: "lightsteelblue" } + highlight: Rectangle { color: "yellow" } currentIndex: list1.currentIndex preferredHighlightBegin: 125; preferredHighlightEnd: 125 highlightRangeMode: ListView.StrictlyEnforceRange - flickDeceleration: 1000 + } + + // The delegate for each list + Component { + id: petDelegate + Column { + width: 200 + Text { text: 'Name: ' + name } + Text { text: 'Type: ' + type } + Text { text: 'Age: ' + age } + } } } diff --git a/examples/declarative/modelviews/listview/sections.qml b/examples/declarative/modelviews/listview/sections.qml index d2f9aba..8c038a0 100644 --- a/examples/declarative/modelviews/listview/sections.qml +++ b/examples/declarative/modelviews/listview/sections.qml @@ -42,70 +42,43 @@ import Qt 4.7 //! [0] Rectangle { + id: container width: 200 - height: 240 + height: 250 - // MyPets model is defined in dummydata/MyPetsModel.qml - // The viewer automatically loads files in dummydata/* to assist - // development without a real data source. - // This one contains my pets. - - // Define a delegate component that includes a separator for sections. - Component { - id: petDelegate - - Item { - id: wrapper - width: 200 - height: desc.height // height is the combined height of the description and the section separator + ListModel { + id: animalsModel + ListElement { name: "Parrot"; size: "Small" } + ListElement { name: "Guinea pig"; size: "Small" } + ListElement { name: "Dog"; size: "Medium" } + ListElement { name: "Cat"; size: "Medium" } + ListElement { name: "Elephant"; size: "Large" } + } - Item { - id: desc - x: 5; height: layout.height + 4 + // The delegate for each section header + Component { + id: sectionHeading + Rectangle { + width: container.width + height: childrenRect.height + color: "lightsteelblue" - Column { - id: layout - y: 2 - Text { text: 'Name: ' + name } - Text { text: 'Type: ' + type } - Text { text: 'Age: ' + age } - } + Text { + text: section + font.bold: true } } } - // Define a highlight component. Just one of these will be instantiated - // by each ListView and placed behind the current item. - Component { - id: petHighlight - Rectangle { color: "#FFFF88" } - } - - // The list ListView { - id: myList + anchors.fill: parent + model: animalsModel + delegate: Text { text: name } - width: 200; height: parent.height - model: MyPetsModel - delegate: petDelegate - highlight: petHighlight - focus: true - - // The sectionExpression is simply the size of the pet. - // We use this to determine which section we are in above. section.property: "size" section.criteria: ViewSection.FullString - section.delegate: Rectangle { - color: "lightsteelblue" - width: 200 - height: 20 - Text { - x: 2; height: parent.height - verticalAlignment: Text.AlignVCenter - text: section - font.bold: true - } - } + section.delegate: sectionHeading } } //! [0] + -- cgit v0.12 From 11e4f7f57879b4615b8ce31f6539d30433f7a506 Mon Sep 17 00:00:00 2001 From: Toby Tomkins Date: Wed, 16 Jun 2010 12:56:45 +1000 Subject: Attribute change to allow inclusion of image files. --- examples/declarative/toys/clocks/content/center.png | Bin examples/declarative/toys/clocks/content/clock-night.png | Bin examples/declarative/toys/clocks/content/clock.png | Bin examples/declarative/toys/clocks/content/hour.png | Bin examples/declarative/toys/clocks/content/minute.png | Bin examples/declarative/toys/clocks/content/second.png | Bin 6 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 examples/declarative/toys/clocks/content/center.png mode change 100755 => 100644 examples/declarative/toys/clocks/content/clock-night.png mode change 100755 => 100644 examples/declarative/toys/clocks/content/clock.png mode change 100755 => 100644 examples/declarative/toys/clocks/content/hour.png mode change 100755 => 100644 examples/declarative/toys/clocks/content/minute.png mode change 100755 => 100644 examples/declarative/toys/clocks/content/second.png diff --git a/examples/declarative/toys/clocks/content/center.png b/examples/declarative/toys/clocks/content/center.png old mode 100755 new mode 100644 diff --git a/examples/declarative/toys/clocks/content/clock-night.png b/examples/declarative/toys/clocks/content/clock-night.png old mode 100755 new mode 100644 diff --git a/examples/declarative/toys/clocks/content/clock.png b/examples/declarative/toys/clocks/content/clock.png old mode 100755 new mode 100644 diff --git a/examples/declarative/toys/clocks/content/hour.png b/examples/declarative/toys/clocks/content/hour.png old mode 100755 new mode 100644 diff --git a/examples/declarative/toys/clocks/content/minute.png b/examples/declarative/toys/clocks/content/minute.png old mode 100755 new mode 100644 diff --git a/examples/declarative/toys/clocks/content/second.png b/examples/declarative/toys/clocks/content/second.png old mode 100755 new mode 100644 -- cgit v0.12 From f2e1860147eaf42f82feeb4316f083ca0de879c9 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Wed, 16 Jun 2010 15:08:43 +1000 Subject: VideoWidget example Added file filters to videowidget and videographicsitem examples to only allow supported file formats to be opened. Task-number:QTBUG-702 Reviewed-by:Andrew den Exter --- examples/multimedia/videographicsitem/videoplayer.cpp | 15 ++++++++++++++- examples/multimedia/videowidget/videoplayer.cpp | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/examples/multimedia/videographicsitem/videoplayer.cpp b/examples/multimedia/videographicsitem/videoplayer.cpp index 4e1f5ca..a08cc57 100644 --- a/examples/multimedia/videographicsitem/videoplayer.cpp +++ b/examples/multimedia/videographicsitem/videoplayer.cpp @@ -116,7 +116,20 @@ VideoPlayer::~VideoPlayer() void VideoPlayer::openFile() { - QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); + QStringList supportedFormats; + foreach (QString fmt, QMovie::supportedFormats()) + supportedFormats << fmt; + foreach (QString fmt, QImageReader::supportedImageFormats()) + supportedFormats << fmt; + + QString filter = "Images ("; + foreach ( QString fmt, supportedFormats) { + filter.append(QString("*.%1 ").arg(fmt)); + } + filter.append(")"); + + QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"), + QDir::homePath(), filter); if (!fileName.isEmpty()) { videoItem->stop(); diff --git a/examples/multimedia/videowidget/videoplayer.cpp b/examples/multimedia/videowidget/videoplayer.cpp index 12d17cf..9d79b70 100644 --- a/examples/multimedia/videowidget/videoplayer.cpp +++ b/examples/multimedia/videowidget/videoplayer.cpp @@ -97,7 +97,20 @@ VideoPlayer::~VideoPlayer() void VideoPlayer::openFile() { - QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); + QStringList supportedFormats; + foreach (QString fmt, QMovie::supportedFormats()) + supportedFormats << fmt; + foreach (QString fmt, QImageReader::supportedImageFormats()) + supportedFormats << fmt; + + QString filter = "Images ("; + foreach ( QString fmt, supportedFormats) { + filter.append(QString("*.%1 ").arg(fmt)); + } + filter.append(")"); + + QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"), + QDir::homePath(), filter); if (!fileName.isEmpty()) { surface->stop(); -- cgit v0.12 From cfbca0bd925b76fff533dc093c67ad72dbd73de5 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 16 Jun 2010 16:33:19 +1000 Subject: Stopping a flick resulted in the next click being consumed. Task-number: QTBUG-11390 --- src/declarative/graphicsitems/qdeclarativeflickable.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index fdc1444..6dfd4d9 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -1214,6 +1214,7 @@ bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event) default: break; } + stealThisEvent = d->stealMouse; // Update stealThisEvent and grabber in case changed by function calls above grabber = qobject_cast(s->mouseGrabberItem()); if (grabber && stealThisEvent && !grabber->keepMouseGrab() && grabber != this) { d->clearDelayedPress(); -- cgit v0.12 From 1937adaab5861ced44813c6a4b0bff1c3750ecd3 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 16 Jun 2010 17:25:13 +1000 Subject: Move knowledge of QGraphicsObject out of qml engine --- demos/declarative/snake/content/Link.qml | 2 ++ .../graphicsitems/qdeclarativeitemsmodule.cpp | 16 ++++++++++++++ src/declarative/qml/qdeclarativecomponent.cpp | 25 +++++++++++++--------- src/declarative/qml/qdeclarativeengine.cpp | 11 +++++----- src/declarative/qml/qdeclarativemetatype.cpp | 19 ++++++++++++++++ src/declarative/qml/qdeclarativemetatype_p.h | 2 ++ src/declarative/qml/qdeclarativeprivate.h | 4 ++++ 7 files changed, 64 insertions(+), 15 deletions(-) diff --git a/demos/declarative/snake/content/Link.qml b/demos/declarative/snake/content/Link.qml index 9aa6006..f4d7165 100644 --- a/demos/declarative/snake/content/Link.qml +++ b/demos/declarative/snake/content/Link.qml @@ -73,12 +73,14 @@ Item { id:link } } + /* transform: Rotation { id: actualImageRotation origin.x: width/2; origin.y: height/2; angle: rotation * 90 Behavior on angle { NumberAnimation { duration: spawned ? 200 : 0} } } + */ } Image { diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 0be8dac..b198077 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -79,8 +79,24 @@ #endif #include "private/qdeclarativeanchors_p.h" +static QDeclarativePrivate::AutoParentResult qgraphicsobject_autoParent(QObject *obj, QObject *parent) +{ + QGraphicsObject* gobj = qobject_cast(obj); + if (!gobj) + return QDeclarativePrivate::IncompatibleObject; + + QGraphicsObject* gparent = qobject_cast(parent); + if (!gparent) + return QDeclarativePrivate::IncompatibleParent; + + gobj->setParentItem(gparent); + return QDeclarativePrivate::Parented; +} + void QDeclarativeItemModule::defineModule() { + QDeclarativePrivate::registerAutoParentFunction(qgraphicsobject_autoParent); + #ifdef QT_NO_MOVIE qmlRegisterTypeNotAvailable("Qt",4,7,"AnimatedImage", qApp->translate("QDeclarativeAnimatedImage","Qt was built without support for QMovie")); diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 55ee783..b4919ff 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -60,7 +60,6 @@ #include #include #include -#include QT_BEGIN_NAMESPACE @@ -579,20 +578,26 @@ QScriptValue QDeclarativeComponent::createObject(QObject* parent) if (!ret) return QScriptValue(QScriptValue::NullValue); - QGraphicsObject* gobj = qobject_cast(ret); - bool needParent = (gobj != 0); - if(parent){ + + if (parent) { ret->setParent(parent); - if (gobj) { - QGraphicsObject* gparent = qobject_cast(parent); - if(gparent){ - gobj->setParentItem(gparent); + QList functions = QDeclarativeMetaType::parentFunctions(); + + bool needParent = false; + + for (int ii = 0; ii < functions.count(); ++ii) { + QDeclarativePrivate::AutoParentResult res = functions.at(ii)(ret, parent); + if (res == QDeclarativePrivate::Parented) { needParent = false; + break; + } else if (res == QDeclarativePrivate::IncompatibleParent) { + needParent = true; } } + + if (needParent) + qWarning("QDeclarativeComponent: Created graphical object was not placed in the graphics scene."); } - if(needParent) - qWarning("QDeclarativeComponent: Created graphical object was not placed in the graphics scene."); QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(d->engine); QDeclarativeData::get(ret, true)->setImplicitDestructible(); diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 0715624..5c4d229 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -93,7 +93,6 @@ #include #include #include -#include #include #include @@ -1195,10 +1194,12 @@ QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QS Q_ASSERT(obj); obj->setParent(parentArg); - QGraphicsObject* gobj = qobject_cast(obj); - QGraphicsObject* gparent = qobject_cast(parentArg); - if(gobj && gparent) - gobj->setParentItem(gparent); + + QList functions = QDeclarativeMetaType::parentFunctions(); + for (int ii = 0; ii < functions.count(); ++ii) { + if (QDeclarativePrivate::Parented == functions.at(ii)(obj, parentArg)) + break; + } QDeclarativeData::get(obj, true)->setImplicitDestructible(); return activeEnginePriv->objectClass->newQObject(obj, QMetaType::QObjectStar); diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp index 5fcb7ee..c32cab6 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/declarative/qml/qdeclarativemetatype.cpp @@ -112,6 +112,8 @@ struct QDeclarativeMetaTypeData QBitArray objects; QBitArray interfaces; QBitArray lists; + + QList parentFunctions; }; Q_GLOBAL_STATIC(QDeclarativeMetaTypeData, metaTypeData) Q_GLOBAL_STATIC(QReadWriteLock, metaTypeDataLock) @@ -483,6 +485,16 @@ int QDeclarativeType::index() const return d->m_index; } +int QDeclarativePrivate::registerAutoParentFunction(AutoParentFunction function) +{ + QWriteLocker lock(metaTypeDataLock()); + QDeclarativeMetaTypeData *data = metaTypeData(); + + data->parentFunctions.append(function); + + return data->parentFunctions.count() - 1; +} + int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterInterface &interface) { if (interface.version > 0) @@ -583,6 +595,13 @@ bool QDeclarativeMetaType::isModule(const QByteArray &module, int versionMajor, ((*it).vmajor_min == versionMajor && (*it).vminor_min <= versionMinor)))); } +QList QDeclarativeMetaType::parentFunctions() +{ + QReadLocker lock(metaTypeDataLock()); + QDeclarativeMetaTypeData *data = metaTypeData(); + return data->parentFunctions; +} + QObject *QDeclarativeMetaType::toQObject(const QVariant &v, bool *ok) { if (!isQObject(v.userType())) { diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h index bf6a700..4c98b6f 100644 --- a/src/declarative/qml/qdeclarativemetatype_p.h +++ b/src/declarative/qml/qdeclarativemetatype_p.h @@ -99,6 +99,8 @@ public: static StringConverter customStringConverter(int); static bool isModule(const QByteArray &module, int versionMajor, int versionMinor); + + static QList parentFunctions(); }; class QDeclarativeTypePrivate; diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h index e657dd5..cd859fe 100644 --- a/src/declarative/qml/qdeclarativeprivate.h +++ b/src/declarative/qml/qdeclarativeprivate.h @@ -214,6 +214,10 @@ namespace QDeclarativePrivate const char *iid; }; + enum AutoParentResult { Parented, IncompatibleObject, IncompatibleParent }; + typedef AutoParentResult (*AutoParentFunction)(QObject *object, QObject *parent); + + int Q_DECLARATIVE_EXPORT registerAutoParentFunction(AutoParentFunction); int Q_DECLARATIVE_EXPORT registerType(const RegisterType &); int Q_DECLARATIVE_EXPORT registerType(const RegisterInterface &); -- cgit v0.12 From 07a902000950a4aa6eebf2072afb83eee3eb3d5f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 16 Jun 2010 09:57:24 +0200 Subject: Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to 5e9b2a88688f6e360d7db00bc86a45bf2cf86e52 Includes Andreas' MSVC fix and fixes the RVCT build by temporarily disabling the structure packing. --- src/3rdparty/harfbuzz/src/harfbuzz-global.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-global.h b/src/3rdparty/harfbuzz/src/harfbuzz-global.h index 5b2b679..bccd6a2 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-global.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-global.h @@ -39,7 +39,7 @@ #define HB_END_HEADER /* nothing */ #endif -#if defined(__GNUC__) || defined(__ARMCC__) || defined(__CC_ARM) || defined(_MSC_VER) +#if defined(__GNUC__) || defined(_MSC_VER) #define HB_USE_PACKED_STRUCTS #endif -- cgit v0.12 From e32635b46b2f2b78eb18c5b195e0bdaf8c7f9b71 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 16 Jun 2010 10:22:47 +0200 Subject: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 7932e8da6bfdeff653c572c22aed879c8c308829 ) Changes in WebKit/qt since the last update: * https://bugs.webkit.org/show_bug.cgi?id=39857 -- GIFs loop one time too few --- src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 31 ++++++++++++++++++++++ .../WebCore/platform/graphics/BitmapImage.cpp | 4 ++- .../webkit/WebCore/platform/graphics/ImageSource.h | 17 +++++++++++- .../platform/graphics/qt/ImageDecoderQt.cpp | 18 +------------ 5 files changed, 52 insertions(+), 20 deletions(-) diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index b92486d..4c895fb 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - d8a9d09376a47b92ea49f1a078c392cbfdbc0ed6 + 7932e8da6bfdeff653c572c22aed879c8c308829 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index bf8b745..09b8598 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,34 @@ +2010-05-28 Peter Kasting + + Reviewed by Darin Adler. + + https://bugs.webkit.org/show_bug.cgi?id=39857 + Make GIFs loop the correct number of times. Previously, everyone looped + one time too few for non-infinitely-looping GIFs. + + Modified a Qt manual test to be correct and moved it to the general + manual test directory. + + * manual-tests/animated-gif-looping.html: Copied from WebCore/manual-tests/qt/qt-gif-test.html. + * manual-tests/qt/qt-10loop-anim.gif: Removed. + * manual-tests/qt/qt-anim.gif: Removed. + * manual-tests/qt/qt-gif-test.html: Removed. + * manual-tests/qt/qt-noanim.gif: Removed. + * manual-tests/resources/animated-10x.gif: Copied from WebCore/manual-tests/qt/qt-10loop-anim.gif and modified. + * manual-tests/resources/animated-infinite.gif: Copied from WebCore/manual-tests/qt/qt-anim.gif. + * manual-tests/resources/non-animated.gif: Copied from WebCore/manual-tests/qt/qt-noanim.gif. + * platform/graphics/BitmapImage.cpp: + (WebCore::BitmapImage::internalAdvanceAnimation): For a loop count of n, show a total of n + 1 animation cycles. + * platform/graphics/ImageSource.h: + * platform/graphics/cg/ImageSourceCG.cpp: + (WebCore::ImageSource::repetitionCount): + * platform/graphics/qt/ImageDecoderQt.cpp: + (WebCore::ImageDecoderQt::repetitionCount): Remove translation code now that WebCore matches Qt's internal handling of the loop count. Qt itself may still have a bug here. + * platform/image-decoders/gif/GIFImageDecoder.cpp: + (WebCore::GIFImageDecoder::repetitionCount): + * platform/image-decoders/gif/GIFImageReader.cpp: + (GIFImageReader::read): Translate loop count 0 to "loop infinitely" (by restoring one piece of the Mozilla code we'd removed). + 2010-06-08 Kenneth Rohde Christiansen Unreviewed Buildbot fix. diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp index 32aefc9..4faf19d 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp @@ -404,7 +404,9 @@ bool BitmapImage::internalAdvanceAnimation(bool skippingFrames) // Get the repetition count again. If we weren't able to get a // repetition count before, we should have decoded the whole image by // now, so it should now be available. - if (repetitionCount(true) && m_repetitionsComplete >= m_repetitionCount) { + // Note that we don't need to special-case cAnimationLoopOnce here + // because it is 0 (see comments on its declaration in ImageSource.h). + if (repetitionCount(true) != cAnimationLoopInfinite && m_repetitionsComplete > m_repetitionCount) { m_animationFinished = true; m_desiredFrameStartTime = 0; --m_currentFrame; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h b/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h index 3559abe..d7b8a64 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h @@ -86,7 +86,22 @@ typedef RefPtr NativeImagePtr; #endif #endif -const int cAnimationLoopOnce = -1; +// Right now GIFs are the only recognized image format that supports animation. +// The animation system and the constants below are designed with this in mind. +// GIFs have an optional 16-bit unsigned loop count that describes how an +// animated GIF should be cycled. If the loop count is absent, the animation +// cycles once; if it is 0, the animation cycles infinitely; otherwise the +// animation plays n + 1 cycles (where n is the specified loop count). If the +// GIF decoder defaults to cAnimationLoopOnce in the absence of any loop count +// and translates an explicit "0" loop count to cAnimationLoopInfinite, then we +// get a couple of nice side effects: +// * By making cAnimationLoopOnce be 0, we allow the animation cycling code in +// BitmapImage.cpp to avoid special-casing it, and simply treat all +// non-negative loop counts identically. +// * By making the other two constants negative, we avoid conflicts with any +// real loop count values. +const int cAnimationLoopOnce = 0; +const int cAnimationLoopInfinite = -1; const int cAnimationNone = -2; class ImageSource : public Noncopyable { diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp index 764b240..53f0c6b 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp @@ -114,24 +114,8 @@ size_t ImageDecoderQt::frameCount() int ImageDecoderQt::repetitionCount() const { - if (m_reader && m_reader->supportsAnimation()) { + if (m_reader && m_reader->supportsAnimation()) m_repetitionCount = m_reader->loopCount(); - - // Qt and WebCore have a incompatible understanding of - // the loop count and we can not completely map everything. - // Qt | WebCore | description - // -1 | 0 | infinite animation - // 0 | cAnimationLoopOnce | show every frame once - // n | n+1 | Qt returns the # of iterations - 1 - // n/a | cAnimationNone | show only the first frame - if (m_repetitionCount == -1) - m_repetitionCount = 0; - else if (m_repetitionCount == 0) - m_repetitionCount = cAnimationLoopOnce; - else - ++m_repetitionCount; - } - return m_repetitionCount; } -- cgit v0.12 From 183abff6ffcb020b8f0c4041cc82bba0d3b03863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Wed, 16 Jun 2010 10:05:44 +0200 Subject: Fixed problem with wrong size hints when items were removed. The reason was that the row/column count was not updated after an item was removed. (Note that qgraphicslinearlayout already did this, so we just follow the same pattern, except that the code for QGraphicsGridLayout is a bit more complex... Task-number: QTBUG-10314 Reviewed-by: Alexis Menard --- src/gui/graphicsview/qgraphicsgridlayout.cpp | 12 +++ src/gui/graphicsview/qgraphicslinearlayout.cpp | 2 +- src/gui/graphicsview/qgridlayoutengine_p.h | 4 +- .../tst_qgraphicsgridlayout.cpp | 86 ++++++++++++++++------ 4 files changed, 79 insertions(+), 25 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsgridlayout.cpp b/src/gui/graphicsview/qgraphicsgridlayout.cpp index 6ca799d..83db3ec 100644 --- a/src/gui/graphicsview/qgraphicsgridlayout.cpp +++ b/src/gui/graphicsview/qgraphicsgridlayout.cpp @@ -572,6 +572,18 @@ void QGraphicsGridLayout::removeAt(int index) if (QGraphicsLayoutItem *layoutItem = gridItem->layoutItem()) layoutItem->setParentLayoutItem(0); d->engine.removeItem(gridItem); + + // recalculate rowInfo.count if we remove an item that is on the right/bottommost row + for (int j = 0; j < NOrientations; ++j) { + // 0: Hor, 1: Ver + const Qt::Orientation orient = (j == 0 ? Qt::Horizontal : Qt::Vertical); + const int oldCount = d->engine.rowCount(orient); + if (gridItem->lastRow(orient) == oldCount - 1) { + const int newCount = d->engine.effectiveLastRow(orient) + 1; + d->engine.removeRows(newCount, oldCount - newCount, orient); + } + } + delete gridItem; invalidate(); } diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp index 9722683..b828722 100644 --- a/src/gui/graphicsview/qgraphicslinearlayout.cpp +++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp @@ -147,7 +147,7 @@ void QGraphicsLinearLayoutPrivate::removeGridItem(QGridLayoutItem *gridItem) { int index = gridItem->firstRow(orientation); engine.removeItem(gridItem); - engine.removeRow(index, orientation); + engine.removeRows(index, 1, orientation); } void QGraphicsLinearLayoutPrivate::fixIndex(int *index) const diff --git a/src/gui/graphicsview/qgridlayoutengine_p.h b/src/gui/graphicsview/qgridlayoutengine_p.h index cbf704e..9ac9a8e 100644 --- a/src/gui/graphicsview/qgridlayoutengine_p.h +++ b/src/gui/graphicsview/qgridlayoutengine_p.h @@ -363,8 +363,8 @@ public: QGridLayoutItem *itemAt(int row, int column, Qt::Orientation orientation = Qt::Vertical) const; inline void insertRow(int row, Qt::Orientation orientation = Qt::Vertical) { insertOrRemoveRows(row, +1, orientation); } - inline void removeRow(int row, Qt::Orientation orientation = Qt::Vertical) - { insertOrRemoveRows(row, -1, orientation); } + inline void removeRows(int row, int count, Qt::Orientation orientation) + { insertOrRemoveRows(row, -count, orientation); } void invalidate(); void setGeometries(const QLayoutStyleInfo &styleInfo, const QRectF &contentsGeometry); diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index 8127f84..b9a5c66 100644 --- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -741,31 +741,73 @@ void tst_QGraphicsGridLayout::setColumnFixedWidth() // public qreal columnSpacing(int column) const void tst_QGraphicsGridLayout::columnSpacing() { - QGraphicsScene scene; - QGraphicsView view(&scene); - QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); - QGraphicsGridLayout *layout = new QGraphicsGridLayout(); - scene.addItem(widget); - widget->setLayout(layout); - populateLayout(layout, 3, 2); - layout->setContentsMargins(0, 0, 0, 0); - layout->setSpacing(0); - QCOMPARE(layout->columnSpacing(0), 0.0); + { + QGraphicsScene scene; + QGraphicsView view(&scene); + QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); + QGraphicsGridLayout *layout = new QGraphicsGridLayout(); + scene.addItem(widget); + widget->setLayout(layout); + populateLayout(layout, 3, 2); + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(0); + QCOMPARE(layout->columnSpacing(0), 0.0); + + layout->setColumnSpacing(0, 20); + view.show(); + widget->show(); + widget->resize(widget->effectiveSizeHint(Qt::PreferredSize)); + QApplication::processEvents(); - layout->setColumnSpacing(0, 20); - view.show(); - widget->show(); - widget->resize(widget->effectiveSizeHint(Qt::PreferredSize)); - QApplication::processEvents(); + QCOMPARE(layout->itemAt(0,0)->geometry().left(), 0.0); + QCOMPARE(layout->itemAt(0,0)->geometry().right(), 25.0); + QCOMPARE(layout->itemAt(0,1)->geometry().left(), 45.0); + QCOMPARE(layout->itemAt(0,1)->geometry().right(), 70.0); + QCOMPARE(layout->itemAt(0,2)->geometry().left(), 70.0); + QCOMPARE(layout->itemAt(0,2)->geometry().right(), 95.0); - QCOMPARE(layout->itemAt(0,0)->geometry().left(), 0.0); - QCOMPARE(layout->itemAt(0,0)->geometry().right(), 25.0); - QCOMPARE(layout->itemAt(0,1)->geometry().left(), 45.0); - QCOMPARE(layout->itemAt(0,1)->geometry().right(), 70.0); - QCOMPARE(layout->itemAt(0,2)->geometry().left(), 70.0); - QCOMPARE(layout->itemAt(0,2)->geometry().right(), 95.0); + delete widget; + } + + { + // don't include items and spacings that was previously part of the layout + // (horizontal) + QGraphicsGridLayout *layout = new QGraphicsGridLayout; + populateLayout(layout, 3, 1); + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(0); + layout->setColumnSpacing(0, 10); + layout->setColumnSpacing(1, 10); + layout->setColumnSpacing(2, 10); + layout->setColumnSpacing(3, 10); + QCOMPARE(layout->preferredSize(), QSizeF(95, 25)); + layout->removeAt(2); + QCOMPARE(layout->preferredSize(), QSizeF(60, 25)); + layout->removeAt(1); + QCOMPARE(layout->preferredSize(), QSizeF(25, 25)); + delete layout; + } + { + // don't include items and spacings that was previously part of the layout + // (vertical) + QGraphicsGridLayout *layout = new QGraphicsGridLayout; + populateLayout(layout, 2, 2); + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(0); + layout->setColumnSpacing(0, 10); + layout->setColumnSpacing(1, 10); + layout->setRowSpacing(0, 10); + layout->setRowSpacing(1, 10); + QCOMPARE(layout->preferredSize(), QSizeF(60, 60)); + layout->removeAt(3); + QCOMPARE(layout->preferredSize(), QSizeF(60, 60)); + layout->removeAt(2); + QCOMPARE(layout->preferredSize(), QSizeF(60, 25)); + layout->removeAt(1); + QCOMPARE(layout->preferredSize(), QSizeF(25, 25)); + delete layout; + } - delete widget; } // public int columnStretchFactor(int column) const -- cgit v0.12 From 71ba2b0973d291e991e1498c266e69d6640c8531 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Wed, 16 Jun 2010 10:01:42 +0200 Subject: Reduce the memory consumption of QtFontStyle QtFontSize::pixelSize() was allocating 8 slots for QtFontSize while most fonts only require one. This patch add a special case for the first QtFontSize in order to reduce memory consumption. The size of QtFontSize in memory has also been reduced. Overall, the memory consumtion of QtFontStyle instances go down from 100kb to 10kb. Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfontdatabase.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index ff29462..4c058ce 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -145,18 +145,18 @@ struct QtFontEncoding struct QtFontSize { - unsigned short pixelSize; - #ifdef Q_WS_X11 - int count; QtFontEncoding *encodings; QtFontEncoding *encodingID(int id, uint xpoint = 0, uint xres = 0, uint yres = 0, uint avgwidth = 0, bool add = false); + unsigned short count : 16; #endif // Q_WS_X11 #if defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) QByteArray fileName; int fileIndex; #endif // defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN) + + unsigned short pixelSize : 16; }; @@ -284,7 +284,12 @@ QtFontSize *QtFontStyle::pixelSize(unsigned short size, bool add) if (!add) return 0; - if (!(count % 8)) { + if (!pixelSizes) { + // Most style have only one font size, we avoid waisting memory + QtFontSize *newPixelSizes = (QtFontSize *)malloc(sizeof(QtFontSize)); + Q_CHECK_PTR(newPixelSizes); + pixelSizes = newPixelSizes; + } else if (!(count % 8)) { QtFontSize *newPixelSizes = (QtFontSize *) realloc(pixelSizes, (((count+8) >> 3) << 3) * sizeof(QtFontSize)); -- cgit v0.12 From 7b0f85f91c7bf51b98e96621312a0f5e86349461 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 29 May 2010 20:34:46 +0200 Subject: Work around ICE in Intel C++ Compiler 11.1.072 qml/qdeclarativecompiledbindings.cpp(1141) (col. 11): internal error: 0_1855 Intel reports that this bug has been fixed with release 12 of ICC Reviewed-By: Alan Alpert --- src/declarative/qml/qdeclarativecompiledbindings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp index ad05e80..507e47b 100644 --- a/src/declarative/qml/qdeclarativecompiledbindings.cpp +++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp @@ -64,7 +64,7 @@ DEFINE_BOOL_CONFIG_OPTION(bindingsDump, QML_BINDINGS_DUMP); Q_GLOBAL_STATIC(QDeclarativeFastProperties, fastProperties); -#ifdef __GNUC__ +#if defined(Q_CC_GNU) && (!defined(Q_CC_INTEL) || __INTEL_COMPILER >= 1200) # define QML_THREADED_INTERPRETER #endif -- cgit v0.12 From bc4c5a2d9c5d3841948bc4443f2229d8d6ec0e95 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 16 Jun 2010 12:18:40 +0200 Subject: Fix autoScroll implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The scrolling should not be calculated inside the paint event, this leads to some incorrect behaviour. It is now calculated separately when needed. Patch actually written by Alexis, and I reviewed it. Task-number: QTBUG-11127 Reviewed-by: Alexis Ménard --- .../graphicsitems/qdeclarativetextinput.cpp | 88 +++++++++++++--------- .../graphicsitems/qdeclarativetextinput_p_p.h | 1 + .../tst_qdeclarativetextinput.cpp | 1 - 3 files changed, 54 insertions(+), 36 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index cba01ef..033e12c 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -100,6 +100,7 @@ void QDeclarativeTextInput::setText(const QString &s) if(s == text()) return; d->control->setText(s); + d->updateHorizontalScroll(); //emit textChanged(); } @@ -337,6 +338,7 @@ void QDeclarativeTextInput::setHAlign(HAlignment align) return; d->hAlign = align; updateRect(); + d->updateHorizontalScroll(); emit horizontalAlignmentChanged(d->hAlign); } @@ -554,7 +556,9 @@ void QDeclarativeTextInput::setAutoScroll(bool b) return; d->autoScroll = b; - + d->updateHorizontalScroll(); + //We need to repaint so that the scrolling is taking into account. + updateSize(true); emit autoScrollChanged(d->autoScroll); } @@ -836,6 +840,7 @@ void QDeclarativeTextInput::moveCursor() Q_D(QDeclarativeTextInput); if(!d->cursorItem) return; + d->updateHorizontalScroll(); d->cursorItem->setX(d->control->cursorToX() - d->hscroll); } @@ -845,7 +850,6 @@ void QDeclarativeTextInput::moveCursor() QRectF QDeclarativeTextInput::positionToRectangle(int x) const { Q_D(const QDeclarativeTextInput); - QFontMetrics fm = QFontMetrics(d->font); return QRectF(d->control->cursorToX(x)-d->hscroll, 0.0, d->control->cursorWidth(), @@ -1006,61 +1010,73 @@ void QDeclarativeTextInput::geometryChanged(const QRectF &newGeometry, QDeclarativePaintedItem::geometryChanged(newGeometry, oldGeometry); } -void QDeclarativeTextInput::drawContents(QPainter *p, const QRect &r) +void QDeclarativeTextInputPrivate::updateHorizontalScroll() { - Q_D(QDeclarativeTextInput); - p->setRenderHint(QPainter::TextAntialiasing, true); - p->save(); - p->setPen(QPen(d->color)); - int flags = QLineControl::DrawText; - if(!isReadOnly() && d->cursorVisible && !d->cursorItem) - flags |= QLineControl::DrawCursor; - if (d->control->hasSelectedText()) - flags |= QLineControl::DrawSelections; - QPoint offset = QPoint(0,0); - QFontMetrics fm = QFontMetrics(d->font); - int cix = qRound(d->control->cursorToX()); - QRect br(boundingRect().toRect()); + Q_Q(QDeclarativeTextInput); + QFontMetrics fm = QFontMetrics(font); + int cix = qRound(control->cursorToX()); + QRect br(q->boundingRect().toRect()); //###Is this using bearing appropriately? int minLB = qMax(0, -fm.minLeftBearing()); int minRB = qMax(0, -fm.minRightBearing()); - int widthUsed = qRound(d->control->naturalTextWidth()) + 1 + minRB; - if (d->autoScroll) { + int widthUsed = qRound(control->naturalTextWidth()) + 1 + minRB; + if (autoScroll) { if ((minLB + widthUsed) <= br.width()) { // text fits in br; use hscroll for alignment - switch (d->hAlign & ~(Qt::AlignAbsolute|Qt::AlignVertical_Mask)) { + switch (hAlign & ~(Qt::AlignAbsolute|Qt::AlignVertical_Mask)) { case Qt::AlignRight: - d->hscroll = widthUsed - br.width() + 1; + hscroll = widthUsed - br.width() + 1; break; case Qt::AlignHCenter: - d->hscroll = (widthUsed - br.width()) / 2; + hscroll = (widthUsed - br.width()) / 2; break; default: // Left - d->hscroll = 0; + hscroll = 0; break; } - d->hscroll -= minLB; - } else if (cix - d->hscroll >= br.width()) { + hscroll -= minLB; + } else if (cix - hscroll >= br.width()) { // text doesn't fit, cursor is to the right of br (scroll right) - d->hscroll = cix - br.width() + 1; - } else if (cix - d->hscroll < 0 && d->hscroll < widthUsed) { + hscroll = cix - br.width() + 1; + } else if (cix - hscroll < 0 && hscroll < widthUsed) { // text doesn't fit, cursor is to the left of br (scroll left) - d->hscroll = cix; - } else if (widthUsed - d->hscroll < br.width()) { + hscroll = cix; + } else if (widthUsed - hscroll < br.width()) { // text doesn't fit, text document is to the left of br; align // right - d->hscroll = widthUsed - br.width() + 1; + hscroll = widthUsed - br.width() + 1; + } + } else { + if(hAlign == QDeclarativeTextInput::AlignRight){ + hscroll = q->width() - widthUsed; + }else if(hAlign == QDeclarativeTextInput::AlignHCenter){ + hscroll = (q->width() - widthUsed) / 2; + } else { + hscroll = 0; } + hscroll -= minLB; + } +} + +void QDeclarativeTextInput::drawContents(QPainter *p, const QRect &r) +{ + Q_D(QDeclarativeTextInput); + p->setRenderHint(QPainter::TextAntialiasing, true); + p->save(); + p->setPen(QPen(d->color)); + int flags = QLineControl::DrawText; + if(!isReadOnly() && d->cursorVisible && !d->cursorItem) + flags |= QLineControl::DrawCursor; + if (d->control->hasSelectedText()) + flags |= QLineControl::DrawSelections; + QPoint offset = QPoint(0,0); + QFontMetrics fm = QFontMetrics(d->font); + QRect br(boundingRect().toRect()); + if (d->autoScroll) { // the y offset is there to keep the baseline constant in case we have script changes in the text. offset = br.topLeft() - QPoint(d->hscroll, d->control->ascent() - fm.ascent()); } else { - if(d->hAlign == AlignRight){ - d->hscroll = width() - widthUsed; - }else if(d->hAlign == AlignHCenter){ - d->hscroll = (width() - widthUsed) / 2; - } - d->hscroll -= minLB; offset = QPoint(d->hscroll, 0); } d->control->draw(p, offset, r, flags); @@ -1230,6 +1246,7 @@ void QDeclarativeTextInput::moveCursorSelection(int position) { Q_D(QDeclarativeTextInput); d->control->moveCursor(position, true); + d->updateHorizontalScroll(); } /*! @@ -1420,6 +1437,7 @@ void QDeclarativeTextInput::selectionChanged() void QDeclarativeTextInput::q_textChanged() { Q_D(QDeclarativeTextInput); + d->updateHorizontalScroll(); updateSize(); emit textChanged(); if(hasAcceptableInput() != d->oldValidity){ diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h index 6865147..8b74bcc 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h @@ -99,6 +99,7 @@ public: void init(); void startCreatingCursor(); void focusChanged(bool hasFocus); + void updateHorizontalScroll(); QLineControl* control; diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 3143580..a55b42e 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -396,7 +396,6 @@ void tst_qdeclarativetextinput::positionAt() #endif // Check without autoscroll... - QEXPECT_FAIL("", "QTBUG-11127", Abort); textinputObject->setAutoScroll(false); pos = textinputObject->positionAt(textinputObject->width()/2); diff = abs(fm.width(textinputObject->text().left(pos))-textinputObject->width()/2); -- cgit v0.12 From 50f4129a2664ed72de899f4477b47f91488c04d9 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 16 Jun 2010 12:20:41 +0200 Subject: Minor demo fixes Found some minor demo issues while testing a TextInput change. --- demos/declarative/samegame/samegame.qml | 2 ++ .../declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index 9a721da..9c4bfa8 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -115,6 +115,8 @@ Rectangle { id: nameInputText anchors { verticalCenter: parent.verticalCenter; left: dialogText.right } focus: false + autoScroll: false + maximumLength: 24 onTextChanged: { var newWidth = nameInputText.width + dialogText.width + 40; if ( (newWidth > nameInputDialog.width && newWidth < screen.width) diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml index 69f57c6..e863262 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/LineEdit.qml @@ -30,13 +30,14 @@ Item { y: 5 //Below function implements all scrolling logic onCursorPositionChanged: { - if(cursorRect.x < leftMargin - textInp.x){//Cursor went off the front - textInp.x = leftMargin - Math.max(0, cursorRect.x); - }else if(cursorRect.x > parent.width - leftMargin - rightMargin - textInp.x){//Cusor went off the end - textInp.x = leftMargin - Math.max(0, cursorRect.x - (parent.width - leftMargin - rightMargin)); + if(cursorRectangle.x < leftMargin - textInp.x){//Cursor went off the front + textInp.x = leftMargin - Math.max(0, cursorRectangle.x); + }else if(cursorRectangle.x > parent.width - leftMargin - rightMargin - textInp.x){//Cusor went off the end + textInp.x = leftMargin - Math.max(0, cursorRectangle.x - (parent.width - leftMargin - rightMargin)); } } + autoScroll: false //It is preferable to implement your own scrolling text:"" horizontalAlignment: TextInput.AlignLeft font.pixelSize:15 -- cgit v0.12 From 28e23016eca537beae2da833603f3063b3bc5bcd Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Wed, 16 Jun 2010 11:59:34 +0200 Subject: Removed unnecessary lines of code. Reviewed-by: Gunnar --- src/gui/painting/qpaintengineex.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index ff82d59..e0746fb 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -494,11 +494,9 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) } else { d->activeStroker->moveTo(points[0], points[1]); points += 2; - ++types; while (points < lastPoint) { d->activeStroker->lineTo(points[0], points[1]); points += 2; - ++types; } if (path.hasImplicitClose()) d->activeStroker->lineTo(path.points()[0], path.points()[1]); @@ -561,12 +559,10 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) QPointF p = ((QPointF *)points)[0] * state()->matrix; d->activeStroker->moveTo(p.x(), p.y()); points += 2; - ++types; while (points < lastPoint) { QPointF p = ((QPointF *)points)[0] * state()->matrix; d->activeStroker->lineTo(p.x(), p.y()); points += 2; - ++types; } if (path.hasImplicitClose()) d->activeStroker->lineTo(p.x(), p.y()); -- cgit v0.12 From 64e60dab167afc68cfb94a8eb0b7469eea9a4291 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Wed, 16 Jun 2010 12:03:02 +0200 Subject: Fixed full-rule on clipped painter paths. The fill-rule of the original path was not copied into the clipped path. Reviewed-by: Gunnar --- src/gui/painting/qoutlinemapper.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp index 1b01960..962f34c 100644 --- a/src/gui/painting/qoutlinemapper.cpp +++ b/src/gui/painting/qoutlinemapper.cpp @@ -354,6 +354,10 @@ void QOutlineMapper::clipElements(const QPointF *elements, // this part of code hardly every used, it shouldn't matter. QPainterPath path; + + if (!(m_outline.flags & QT_FT_OUTLINE_EVEN_ODD_FILL)) + path.setFillRule(Qt::WindingFill); + if (types) { for (int i=0; i Date: Wed, 16 Jun 2010 12:10:03 +0200 Subject: Fixed infinite recursion when drawing very large painter paths. Task-number: QTBUG-11291 Reviewed-by: Gunnar --- src/gui/painting/qoutlinemapper.cpp | 8 ++++++-- src/gui/painting/qoutlinemapper_p.h | 4 +++- src/gui/painting/qpaintengine_raster.cpp | 11 +++++------ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/gui/painting/qoutlinemapper.cpp b/src/gui/painting/qoutlinemapper.cpp index 962f34c..bf03545 100644 --- a/src/gui/painting/qoutlinemapper.cpp +++ b/src/gui/painting/qoutlinemapper.cpp @@ -234,12 +234,12 @@ void QOutlineMapper::endOutline() // Check for out of dev bounds... - const bool do_clip = (controlPointRect.left() < -QT_RASTER_COORD_LIMIT + const bool do_clip = !m_in_clip_elements && ((controlPointRect.left() < -QT_RASTER_COORD_LIMIT || controlPointRect.right() > QT_RASTER_COORD_LIMIT || controlPointRect.top() < -QT_RASTER_COORD_LIMIT || controlPointRect.bottom() > QT_RASTER_COORD_LIMIT || controlPointRect.width() > QT_RASTER_COORD_LIMIT - || controlPointRect.height() > QT_RASTER_COORD_LIMIT); + || controlPointRect.height() > QT_RASTER_COORD_LIMIT)); if (do_clip) { clipElements(elements, elementTypes(), element_count); @@ -353,6 +353,8 @@ void QOutlineMapper::clipElements(const QPointF *elements, // instead of going through convenience functionallity, but since // this part of code hardly every used, it shouldn't matter. + m_in_clip_elements = true; + QPainterPath path; if (!(m_outline.flags & QT_FT_OUTLINE_EVEN_ODD_FILL)) @@ -393,6 +395,8 @@ void QOutlineMapper::clipElements(const QPointF *elements, else convertPath(clippedPath); m_txop = old_txop; + + m_in_clip_elements = false; } QT_END_NAMESPACE diff --git a/src/gui/painting/qoutlinemapper_p.h b/src/gui/painting/qoutlinemapper_p.h index 39b7593..f64d03b 100644 --- a/src/gui/painting/qoutlinemapper_p.h +++ b/src/gui/painting/qoutlinemapper_p.h @@ -95,7 +95,8 @@ public: m_tags(0), m_contours(0), m_polygon_dev(0), - m_round_coords(false) + m_round_coords(false), + m_in_clip_elements(false) { } @@ -235,6 +236,7 @@ public: qreal m_dy; bool m_valid; + bool m_in_clip_elements; private: bool m_round_coords; diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index f10f12f..a212718 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -459,13 +459,12 @@ bool QRasterPaintEngine::begin(QPaintDevice *device) QRasterPaintEngineState *s = state(); ensureOutlineMapper(); - d->outlineMapper->m_clip_rect = d->deviceRect.adjusted(-10, -10, 10, 10); - - // This is the upp - QRect bounds(-QT_RASTER_COORD_LIMIT, -QT_RASTER_COORD_LIMIT, - QT_RASTER_COORD_LIMIT*2 - 1, QT_RASTER_COORD_LIMIT * 2 - 1); - d->outlineMapper->m_clip_rect = bounds.intersected(d->outlineMapper->m_clip_rect); + d->outlineMapper->m_clip_rect = d->deviceRect; + if (d->outlineMapper->m_clip_rect.width() > QT_RASTER_COORD_LIMIT) + d->outlineMapper->m_clip_rect.setWidth(QT_RASTER_COORD_LIMIT); + if (d->outlineMapper->m_clip_rect.height() > QT_RASTER_COORD_LIMIT) + d->outlineMapper->m_clip_rect.setHeight(QT_RASTER_COORD_LIMIT); d->rasterizer->setClipRect(d->deviceRect); -- cgit v0.12 From 59ec66675b725f56111e4b133e79828bc6d5d95a Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 16 Jun 2010 12:27:53 +0200 Subject: Write TextInput.positionToRectangle docs. Also renamed the argument to be more accurate. Task-number: QTBUG-11168 --- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 12 +++++++++--- src/declarative/graphicsitems/qdeclarativetextinput_p.h | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 033e12c..9e5dfb5 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -845,12 +845,18 @@ void QDeclarativeTextInput::moveCursor() } /*! - \qmlmethod rect TextInput::positionToRectangle(int x) + \qmlmethod rect TextInput::positionToRectangle(int pos) + + This function takes a character position and returns the rectangle that the + cursor would occupy, if it was placed at that character position. + + This is similar to setting the cursorPosition, and then querying the cursor + rectangle, but the cursorPosition is not changed. */ -QRectF QDeclarativeTextInput::positionToRectangle(int x) const +QRectF QDeclarativeTextInput::positionToRectangle(int pos) const { Q_D(const QDeclarativeTextInput); - return QRectF(d->control->cursorToX(x)-d->hscroll, + return QRectF(d->control->cursorToX(pos)-d->hscroll, 0.0, d->control->cursorWidth(), cursorRectangle().height()); diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index c539bd3..03f55ae 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -112,7 +112,7 @@ public: //Auxilliary functions needed to control the TextInput from QML Q_INVOKABLE int positionAt(int x) const; - Q_INVOKABLE QRectF positionToRectangle(int x) const; + Q_INVOKABLE QRectF positionToRectangle(int pos) const; Q_INVOKABLE void moveCursorSelection(int pos); Q_INVOKABLE void openSoftwareInputPanel(); -- cgit v0.12 From 5b5785bc564ccea9f6868d02be3d1080cb5039b9 Mon Sep 17 00:00:00 2001 From: kh1 Date: Wed, 16 Jun 2010 12:24:12 +0200 Subject: Fix some kind of race condition while using remote commands. Please do not merge to master, we had to fix it different there. Because of async content loading, we have to cache the url to load. A combination of SetSource and SyncContents would have lead to sync to the old url till loading was finished. So return the cached during loading. Task-number: QTBUG-11342 Reviewed-by: ck --- tools/assistant/tools/assistant/helpviewer_qwv.cpp | 23 +++++++++++++++++++++- tools/assistant/tools/assistant/helpviewer_qwv.h | 3 ++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.cpp b/tools/assistant/tools/assistant/helpviewer_qwv.cpp index 244d091..dcbbf2c 100644 --- a/tools/assistant/tools/assistant/helpviewer_qwv.cpp +++ b/tools/assistant/tools/assistant/helpviewer_qwv.cpp @@ -172,6 +172,7 @@ private: bool closeNewTabIfNeeded; friend class HelpViewer; + QUrl m_loadingUrl; Qt::MouseButtons m_pressedButtons; Qt::KeyboardModifiers m_keyboardModifiers; }; @@ -232,6 +233,11 @@ bool HelpPage::acceptNavigationRequest(QWebFrame *, return false; } + m_loadingUrl = url; // because of async page loading, we will hit some kind + // of race condition while using a remote command, like a combination of + // SetSource; SyncContent. SetSource would be called and SyncContents shortly + // afterwards, but the page might not have finished loading and the old url + // would be returned. return true; } @@ -268,6 +274,7 @@ HelpViewer::HelpViewer(CentralWidget *parent, qreal zoom) connect(page(), SIGNAL(linkHovered(QString,QString,QString)), this, SIGNAL(highlighted(QString))); connect(this, SIGNAL(urlChanged(QUrl)), this, SIGNAL(sourceChanged(QUrl))); + connect(this, SIGNAL(loadStarted()), this, SLOT(setLoadStarted())); connect(this, SIGNAL(loadFinished(bool)), this, SLOT(setLoadFinished(bool))); connect(page(), SIGNAL(printRequested(QWebFrame*)), this, SIGNAL(printRequested())); @@ -333,10 +340,19 @@ bool HelpViewer::handleForwardBackwardMouseButtons(QMouseEvent *e) return false; } +QUrl HelpViewer::source() const +{ + HelpPage *currentPage = static_cast (page()); + if (currentPage && !hasLoadFinished()) { + // see HelpPage::acceptNavigationRequest(...) + return currentPage->m_loadingUrl; + } + return url(); +} + void HelpViewer::setSource(const QUrl &url) { TRACE_OBJ - loadFinished = false; load(url.toString() == QLatin1String("help") ? LocalHelpFile : url); } @@ -396,6 +412,11 @@ void HelpViewer::mousePressEvent(QMouseEvent *event) QWebView::mousePressEvent(event); } +void HelpViewer::setLoadStarted() +{ + loadFinished = false; +} + void HelpViewer::setLoadFinished(bool ok) { TRACE_OBJ diff --git a/tools/assistant/tools/assistant/helpviewer_qwv.h b/tools/assistant/tools/assistant/helpviewer_qwv.h index 2577828..1897e3e 100644 --- a/tools/assistant/tools/assistant/helpviewer_qwv.h +++ b/tools/assistant/tools/assistant/helpviewer_qwv.h @@ -71,8 +71,8 @@ public: bool handleForwardBackwardMouseButtons(QMouseEvent *e); + QUrl source() const; void setSource(const QUrl &url); - inline QUrl source() const { return url(); } inline QString documentTitle() const { return title(); } @@ -109,6 +109,7 @@ protected: private Q_SLOTS: void actionChanged(); + void setLoadStarted(); void setLoadFinished(bool ok); private: -- cgit v0.12 From 73fa311f67b21c9b897de0196d3b8227f27d828f Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Tue, 15 Jun 2010 14:44:17 +0200 Subject: qmake: Fix CONFIG += exceptions_off with the MSVC project generator. cl.exe default exception handling (when not specified on the command line) is to disable exceptions. In vcproj files however, if the ExceptionHandling option is not specified, the default behavior is to enable exceptions without SEH (/EHsh). This patch makes sure that ExceptionHandling is disabled when /EHsc is not fed to parseOption (which happens when the exceptions_off config is encountered). For VS2003 the values are a bit different where "false"==ehNone, "true"==ehNoSEH and ehSEH is not available. The default is "true" if not specified thus why we set it to "false" when exceptions_off is given. Reviewed-by: Oswald Buddenhagen --- qmake/generators/win32/msbuild_objectmodel.cpp | 1 + qmake/generators/win32/msvc_objectmodel.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 75fc910..bf874b2 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -385,6 +385,7 @@ VCXCLCompilerTool::VCXCLCompilerTool() DisableLanguageExtensions(unset), EnableFiberSafeOptimizations(unset), EnablePREfast(unset), + ExceptionHandling("false"), ExpandAttributedSource(unset), FloatingPointExceptions(unset), ForceConformanceInForLoopScope(unset), diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 1e060a0..e23e119 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -360,8 +360,11 @@ inline XmlOutput::xml_output xformUsePrecompiledHeaderForNET2005(pchOption whatP inline XmlOutput::xml_output xformExceptionHandlingNET2005(exceptionHandling eh, DotNET compilerVersion) { - if (eh == ehDefault) - return noxml(); + if (eh == ehDefault) { + if (compilerVersion >= NET2005) + return attrE(_ExceptionHandling, ehNone); + return attrS(_ExceptionHandling, "false"); + } if (compilerVersion >= NET2005) return attrE(_ExceptionHandling, eh); -- cgit v0.12 From 0842309e6e04d34c027374d0793dc60d3ec6e28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 16 Jun 2010 13:41:46 +0200 Subject: Fix crash on Mac OS X when drawing text with Qt::TextBypassShaping set On Mac we end up in a code path where logClusters is 0, and the fallback path for when CoreText fails to shape text didn't take this into account. Reviewed-by: Simon Hausmann --- src/gui/text/qfontengine_mac.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm index 3be6d28..7ceed61 100644 --- a/src/gui/text/qfontengine_mac.mm +++ b/src/gui/text/qfontengine_mac.mm @@ -237,7 +237,8 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay *nglyphs = len; for (int i = 0; i < len; ++i) { outGlyphs[i] = 0; - logClusters[i] = i; + if (logClusters) + logClusters[i] = i; outAdvances_x[i] = QFixed(); outAdvances_y[i] = QFixed(); outAttributes[i].clusterStart = true; -- cgit v0.12 From 7e08ce215763475c5933d2f035687e5db3d5295d Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 16 Jun 2010 14:14:06 +0200 Subject: Updated JavaScriptCore from /home/khansen/dev/qtwebkit-qtscript-integration to javascriptcore-snapshot-16062010 ( 8b2d3443afca194f8ac50a63151dc9d19a150582 ) Integrated changes: || || JSC's currentThreadStackBase is not reentrant on some platforms --- src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog | 17 +++++++++++++++++ .../JavaScriptCore/runtime/Collector.cpp | 18 ++++++++++-------- src/3rdparty/javascriptcore/VERSION | 4 ++-- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog index fd6125f..b0873ab 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog +++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog @@ -12,6 +12,23 @@ * wtf/Platform.h: +2010-04-28 Simon Hausmann , Kent Hansen + + Reviewed by Darin Adler. + + JSC's currentThreadStackBase is not reentrant on some platforms + https://bugs.webkit.org/show_bug.cgi?id=37195 + + This function needs to be reentrant to avoid memory corruption on platforms where + the implementation uses global variables. + + This patch adds a mutex lock where necessary and makes the Symbian implementation + reentrant. + + * runtime/Collector.cpp: + (JSC::currentThreadStackBaseMutex): + (JSC::currentThreadStackBase): + 2010-04-14 Kent Hansen Reviewed by Maciej Stachowiak. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp index 57f2a92..eafcc23 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp @@ -637,6 +637,8 @@ static inline void* currentThreadStackBase() #elif OS(HPUX) return hpux_get_stack_base(); #elif OS(QNX) + AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); + MutexLocker locker(mutex); return currentThreadStackBaseQNX(); #elif OS(SOLARIS) stack_t s; @@ -660,19 +662,17 @@ static inline void* currentThreadStackBase() pthread_stackseg_np(thread, &stack); return stack.ss_sp; #elif OS(SYMBIAN) - static void* stackBase = 0; - if (stackBase == 0) { - TThreadStackInfo info; - RThread thread; - thread.StackInfo(info); - stackBase = (void*)info.iBase; - } - return (void*)stackBase; + TThreadStackInfo info; + RThread thread; + thread.StackInfo(info); + return (void*)info.iBase; #elif OS(HAIKU) thread_info threadInfo; get_thread_info(find_thread(NULL), &threadInfo); return threadInfo.stack_end; #elif OS(UNIX) + AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); + MutexLocker locker(mutex); static void* stackBase = 0; static size_t stackSize = 0; static pthread_t stackThread; @@ -695,6 +695,8 @@ static inline void* currentThreadStackBase() } return static_cast(stackBase) + stackSize; #elif OS(WINCE) + AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); + MutexLocker locker(mutex); if (g_stackBase) return g_stackBase; else { diff --git a/src/3rdparty/javascriptcore/VERSION b/src/3rdparty/javascriptcore/VERSION index 1b5109a..daecc37 100644 --- a/src/3rdparty/javascriptcore/VERSION +++ b/src/3rdparty/javascriptcore/VERSION @@ -4,8 +4,8 @@ This is a snapshot of JavaScriptCore from The commit imported was from the - javascriptcore-snapshot-19052010 branch/tag + javascriptcore-snapshot-16062010 branch/tag and has the sha1 checksum - 8039ba79702d6516cf6841c9f15b324ec499bbf3 + 8b2d3443afca194f8ac50a63151dc9d19a150582 -- cgit v0.12 From 47d3d5569e25d0e88259e1f0448d87325da0ab6a Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Wed, 16 Jun 2010 13:54:56 +0200 Subject: Make sure only started gestures can cause cancellations The design is that calling setGestureCancelPolicy on the gesture that is in starting state, and is accepted can cause other gestures to be cancelled. So change the logic to follow this, which means we won't try to execute the cancel strategy if the gesture was never accepted and avoid the crash detailed in the task. Reviewed-by: Denis Task-number: QTBUG-9771 --- src/gui/graphicsview/qgraphicsscene.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 6c5623e..ca3b56f 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -6277,7 +6277,8 @@ void QGraphicsScenePrivate::cancelGesturesForChildren(QGesture *original) { Q_ASSERT(original); QGraphicsItem *originalItem = gestureTargets.value(original); - Q_ASSERT(originalItem); + if (originalItem == 0) // we only act on accepted gestures, which implies it has a target. + return; // iterate over all active gestures and for each find the owner // if the owner is part of our sub-hierarchy, cancel it. -- cgit v0.12 From 3d03e0a1fdd04e1ab97ba0f95a3a934c879d047e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 16 Jun 2010 05:00:47 +0200 Subject: Defer allocation of GIF decoding tables/stack. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WebKit creates many image readers but will only retrieve the dimensions until the image itself is actually needed (i.e appears in the viewport.) This avoids allocating 16kB per GIF image until it's time to actually decode it. Reviewed-by: Samuel Rødal --- src/plugins/imageformats/gif/qgifhandler.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/plugins/imageformats/gif/qgifhandler.cpp b/src/plugins/imageformats/gif/qgifhandler.cpp index 5e2157e..58093aa 100644 --- a/src/plugins/imageformats/gif/qgifhandler.cpp +++ b/src/plugins/imageformats/gif/qgifhandler.cpp @@ -132,8 +132,8 @@ private: int code_size, clear_code, end_code, max_code_size, max_code; int firstcode, oldcode, incode; - short table[2][1<< max_lzw_bits]; - short stack[(1<<(max_lzw_bits))*2]; + short* table[2]; + short* stack; short *sp; bool needfirst; int x, y; @@ -162,6 +162,9 @@ QGIFFormat::QGIFFormat() lcmap = false; newFrame = false; partialNewFrame = false; + table[0] = 0; + table[1] = 0; + stack = 0; } /*! @@ -171,6 +174,7 @@ QGIFFormat::~QGIFFormat() { if (globalcmap) delete[] globalcmap; if (localcmap) delete[] localcmap; + delete [] stack; } void QGIFFormat::disposePrevious(QImage *image) @@ -237,6 +241,12 @@ int QGIFFormat::decode(QImage *image, const uchar *buffer, int length, // CompuServe Incorporated. GIF(sm) is a Service Mark property of // CompuServe Incorporated." + if (!stack) { + stack = new short[(1 << max_lzw_bits) * 4]; + table[0] = &stack[(1 << max_lzw_bits) * 2]; + table[1] = &stack[(1 << max_lzw_bits) * 3]; + } + image->detach(); int bpl = image->bytesPerLine(); unsigned char *bits = image->bits(); -- cgit v0.12 From 00e3c4d7dcb5f14e9d13200a1e5d041d266f6610 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 16 Jun 2010 14:49:07 +0200 Subject: doc: Added more DITA output to the XML generator Some of the cxxFunction stuff for member functions. Task-number: QTBUG-11391 --- tools/qdoc3/ditaxmlgenerator.cpp | 135 +++++++++++++++++++++++++++++++++++---- tools/qdoc3/ditaxmlgenerator.h | 20 +++++- tools/qdoc3/node.cpp | 14 ++++ tools/qdoc3/node.h | 7 +- 4 files changed, 160 insertions(+), 16 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 197bc13..ebca881 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -501,19 +501,18 @@ QString DitaXmlGenerator::format() } /*! - Create a new GUID, write it to the XML stream - as an "id" attribute, and return it. + Calls lookupGuid() to get a GUID for \a text, then writes + it to the XML stream as an "id" attribute, and returns it. */ QString DitaXmlGenerator::writeGuidAttribute(QString text) { - QString guid = QUuid::createUuid().toString(); - name2guidMap.insert(text,guid); + QString guid = lookupGuid(text); writer.writeAttribute("id",guid); return guid; } /*! - Looks up \a text in the GUID map. It it finds \a text, + Looks up \a text in the GUID map. If it finds \a text, it returns the associated GUID. Otherwise it inserts \a text into the map with a new GUID, and it returns the new GUID. @@ -1436,6 +1435,12 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark writer.writeStartElement(CXXCLASSACCESSSPECIFIER); writer.writeAttribute("value",inner->accessString()); writer.writeEndElement(); // + if (cn->isAbstract()) { + writer.writeStartElement(CXXCLASSABSTRACT); + writer.writeAttribute("name","abstract"); + writer.writeAttribute("value","abstract"); + writer.writeEndElement(); // + } writeDerivations(cn, marker); writeLocation(cn, marker); writer.writeEndElement(); // @@ -1452,6 +1457,26 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark writer.writeEndElement(); // writer.writeEndElement(); // + + sections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); + s = sections.begin(); + while (s != sections.end()) { + if ((*s).name == "Member Function Documentation") { + writeFunctions((*s),cn,marker); + } + else if ((*s).name == "Member Type Documentation") { + writeNestedClasses((*s),cn,marker); + writeEnumerations((*s),cn,marker); + writeTypedefs((*s),cn,marker); + } + else if ((*s).name == "Member Variable Documentation") { + writeDataMembers((*s),cn,marker); + } + else if ((*s).name == "Property Documentation") { + writeProperties((*s),cn,marker); + } + ++s; + } writer.writeEndElement(); // } @@ -4502,19 +4527,101 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker) } } -void DitaXmlGenerator::writeLocation(const ClassNode* cn, CodeMarker* marker) +void DitaXmlGenerator::writeLocation(const Node* n, CodeMarker* marker) { - writer.writeStartElement(CXXCLASSAPIITEMLOCATION); - writer.writeStartElement(CXXCLASSDECLARATIONFILE); + QString s1, s2, s3; + if (n->type() == Node::Class) { + s1 = CXXCLASSAPIITEMLOCATION; + s2 = CXXCLASSDECLARATIONFILE; + s3 = CXXCLASSDECLARATIONFILELINE; + } + else if (n->type() == Node::Function) { + s1 = CXXFUNCTIONAPIITEMLOCATION; + s2 = CXXFUNCTIONDECLARATIONFILE; + s3 = CXXFUNCTIONDECLARATIONFILELINE; + } + writer.writeStartElement(s1); + writer.writeStartElement(s2); writer.writeAttribute("name","filePath"); - writer.writeAttribute("value",cn->location().filePath()); - writer.writeEndElement(); // - writer.writeStartElement(CXXCLASSDECLARATIONFILELINE); + writer.writeAttribute("value",n->location().filePath()); + writer.writeEndElement(); // DeclarationFile> + writer.writeStartElement(s3); writer.writeAttribute("name","lineNumber"); QString lineNr; - writer.writeAttribute("value",lineNr.setNum(cn->location().lineNo())); - writer.writeEndElement(); // - writer.writeEndElement(); // + writer.writeAttribute("value",lineNr.setNum(n->location().lineNo())); + writer.writeEndElement(); // DeclarationFileLine> + writer.writeEndElement(); // ApiItemLocation> +} + +void DitaXmlGenerator::writeFunctions(const Section& s, + const ClassNode* cn, + CodeMarker* marker) { + NodeList::ConstIterator m = s.members.begin(); + while (m != s.members.end()) { + if ((*m)->type() == Node::Function) { + const FunctionNode* fn = reinterpret_cast(*m); + QString name = fn->name(); + writer.writeStartElement(CXXFUNCTION); + writeGuidAttribute(name); + writer.writeStartElement(APINAME); + writer.writeCharacters(name); + writer.writeEndElement(); // + generateBrief(fn,marker); + writer.writeStartElement(CXXFUNCTIONDETAIL); + writer.writeStartElement(CXXFUNCTIONDEFINITION); + writer.writeStartElement(CXXFUNCTIONACCESSSPECIFIER); + writer.writeAttribute("value",fn->accessString()); + writer.writeEndElement(); // + + writeLocation(fn, marker); + writer.writeEndElement(); // + writer.writeStartElement(APIDESC); + + if (!fn->doc().isEmpty()) { + writer.writeStartElement("p"); + writer.writeAttribute("outputclass","h2"); + writer.writeCharacters("Function Description"); + writer.writeEndElement(); //

    + generateBody(fn, marker); + // generateAlsoList(inner, marker); + } + + writer.writeEndElement(); // + writer.writeEndElement(); // + writer.writeEndElement(); // + + if (fn->metaness() == FunctionNode::Ctor || + fn->metaness() == FunctionNode::Dtor || + fn->overloadNumber() != 1) { + } + } + ++m; + } +} + +void DitaXmlGenerator::writeNestedClasses(const Section& s, + const ClassNode* cn, + CodeMarker* marker) { +} + +void DitaXmlGenerator::writeEnumerations(const Section& s, + const ClassNode* cn, + CodeMarker* marker) { +} + +void DitaXmlGenerator::writeTypedefs(const Section& s, + const ClassNode* cn, + CodeMarker* marker) { +} + +void DitaXmlGenerator::writeDataMembers(const Section& s, + const ClassNode* cn, + CodeMarker* marker) { +} + +void DitaXmlGenerator::writeProperties(const Section& s, + const ClassNode* cn, + CodeMarker* marker) { } QT_END_NAMESPACE diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 070329b..5afd82a 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -111,7 +111,25 @@ class DitaXmlGenerator : public PageGenerator virtual QString refForAtom(Atom *atom, const Node *node); void writeDerivations(const ClassNode* cn, CodeMarker* marker); - void writeLocation(const ClassNode* cn, CodeMarker* marker); + void writeLocation(const Node* n, CodeMarker* marker); + void writeFunctions(const Section& s, + const ClassNode* cn, + CodeMarker* marker); + void writeNestedClasses(const Section& s, + const ClassNode* cn, + CodeMarker* marker); + void writeEnumerations(const Section& s, + const ClassNode* cn, + CodeMarker* marker); + void writeTypedefs(const Section& s, + const ClassNode* cn, + CodeMarker* marker); + void writeDataMembers(const Section& s, + const ClassNode* cn, + CodeMarker* marker); + void writeProperties(const Section& s, + const ClassNode* cn, + CodeMarker* marker); private: enum SubTitleSize { SmallSubTitle, LargeSubTitle }; diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 4664e9d..b71a43e 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -789,6 +789,7 @@ ClassNode::ClassNode(InnerNode *parent, const QString& name) : InnerNode(Class, parent, name) { hidden = false; + abstract = false; setPageType(ApiPage); } @@ -1078,6 +1079,19 @@ FunctionNode::FunctionNode(Type type, InnerNode *parent, const QString& name, bo } /*! + Sets the \a virtualness of this function. If the \a virtualness + is PureVirtual, and if the parent() is a ClassNode, set the parent's + \e abstract flag to true. + */ +void FunctionNode::setVirtualness(Virtualness virtualness) +{ + vir = virtualness; + if ((virtualness == PureVirtual) && parent() && + (parent()->type() == Node::Class)) + parent()->setAbstract(true); +} + +/*! */ void FunctionNode::setOverload(bool overlode) { diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 523394d..ccfd9b6 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -261,6 +261,8 @@ class InnerNode : public Node QStringList secondaryKeys(); const QStringList& pageKeywords() const { return pageKeywds; } virtual void addPageKeywords(const QString& t) { pageKeywds << t; } + virtual bool isAbstract() const { return false; } + virtual void setAbstract(bool ) { } protected: InnerNode(Type type, InnerNode *parent, const QString& name); @@ -341,11 +343,14 @@ class ClassNode : public InnerNode void setServiceName(const QString& value) { sname = value; } QString qmlElement() const { return qmlelement; } void setQmlElement(const QString& value) { qmlelement = value; } + virtual bool isAbstract() const { return abstract; } + virtual void setAbstract(bool b) { abstract = b; } private: QList bas; QList der; bool hidden; + bool abstract; QString sname; QString qmlelement; }; @@ -582,7 +587,7 @@ class FunctionNode : public LeafNode void setReturnType(const QString& returnType) { rt = returnType; } void setParentPath(const QStringList& parentPath) { pp = parentPath; } void setMetaness(Metaness metaness) { met = metaness; } - void setVirtualness(Virtualness virtualness) { vir = virtualness; } + void setVirtualness(Virtualness virtualness); void setConst(bool conste) { con = conste; } void setStatic(bool statique) { sta = statique; } void setOverload(bool overlode); -- cgit v0.12 From 6d4e14ef0437ce8f73bddbcb267cf5ef708fbdec Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Wed, 16 Jun 2010 15:16:16 +0200 Subject: Micro cleanup Use Qt::WA_DeleteOnClose to clean up the top-level window Reviewed-by: Alan Alpert --- tools/qml/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 0cce1cc..a75023b 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -347,8 +347,9 @@ int main(int argc, char ** argv) wflags |= Qt::WindowStaysOnTopHint; QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags); + viewer->setAttribute(Qt::WA_DeleteOnClose, true); if (!scriptopts.isEmpty()) { - QStringList options = + QStringList options = scriptopts.split(QLatin1Char(','), QString::SkipEmptyParts); QDeclarativeViewer::ScriptOptions scriptOptions = 0; @@ -451,7 +452,5 @@ int main(int argc, char ** argv) viewer->setUseGL(useGL); viewer->raise(); - int rv = app.exec(); - delete viewer; - exit(rv); + return app.exec(); } -- cgit v0.12 From 6d178306f71564471cc08eb7dc98743c3752cac4 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Wed, 16 Jun 2010 15:17:33 +0200 Subject: Fix the N900 device orientation backend Use D-Bus calls instead of polling Reviewed-by: Alan Alpert --- tools/qml/deviceorientation_maemo.cpp | 123 +++++++++++++++------------------- tools/qml/qml.pri | 1 + 2 files changed, 56 insertions(+), 68 deletions(-) diff --git a/tools/qml/deviceorientation_maemo.cpp b/tools/qml/deviceorientation_maemo.cpp index 7948e2a..443edc8 100644 --- a/tools/qml/deviceorientation_maemo.cpp +++ b/tools/qml/deviceorientation_maemo.cpp @@ -40,100 +40,87 @@ ****************************************************************************/ #include "deviceorientation.h" -#include -#include +#include + +#include +#include class MaemoOrientation : public DeviceOrientation { Q_OBJECT public: MaemoOrientation() - : DeviceOrientation(),m_current(Portrait), m_lastSeen(Portrait), m_lastSeenCount(0) + : o(UnknownOrientation) { - m_current = get(); - if (m_current == UnknownOrientation) - m_current = Portrait; + // enable the orientation sensor + QDBusConnection::systemBus().call( + QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH, + MCE_REQUEST_IF, MCE_ACCELEROMETER_ENABLE_REQ)); + + // query the initial orientation + QDBusMessage reply = QDBusConnection::systemBus().call( + QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH, + MCE_REQUEST_IF, MCE_DEVICE_ORIENTATION_GET)); + if (reply.type() == QDBusMessage::ErrorMessage) { + qWarning("Unable to retrieve device orientation: %s", qPrintable(reply.errorMessage())); + } else { + o = toOrientation(reply.arguments().value(0).toString()); + } - startTimer(100); + // connect to the orientation change signal + QDBusConnection::systemBus().connect(QString(), MCE_SIGNAL_PATH, MCE_SIGNAL_IF, + MCE_DEVICE_ORIENTATION_SIG, + this, + SLOT(deviceOrientationChanged(QString))); } - Orientation orientation() const { - return m_current; + ~MaemoOrientation() + { + // disable the orientation sensor + QDBusConnection::systemBus().call( + QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH, + MCE_REQUEST_IF, MCE_ACCELEROMETER_DISABLE_REQ)); } - void setOrientation(Orientation) { } - -protected: - virtual void timerEvent(QTimerEvent *) + inline Orientation orientation() const { - Orientation c = get(); - - if (c == m_lastSeen) { - m_lastSeenCount++; - } else { - m_lastSeenCount = 0; - m_lastSeen = c; - } - - if (m_lastSeen != UnknownOrientation && m_lastSeen != m_current && m_lastSeenCount > 4) { - m_current = m_lastSeen; - emit orientationChanged(); - printf("%d\n", m_current); - } + return o; } -signals: - void changed(); - -private: - Orientation m_current; - Orientation m_lastSeen; - int m_lastSeenCount; - - Orientation get() + void setOrientation(Orientation o) { - Orientation o = UnknownOrientation; - - int ax, ay, az; - - read(&ax, &ay, &az); + } - if (abs(az) > 850) { - o = UnknownOrientation; - } else if (ax < -750) { - o = Portrait; - } else if (ax > 750) { - o = PortraitInverted; - } else if (ay < -750) { - o = Landscape; - } else if (ay > 750) { - o = LandscapeInverted; - } +private Q_SLOTS: + void deviceOrientationChanged(const QString &newOrientation) + { + o = toOrientation(newOrientation); - return o; + emit orientationChanged(); +// printf("%d\n", o); } - int read(int *ax,int *ay,int *az) +private: + static Orientation toOrientation(const QString &nativeOrientation) { - static const char *accel_filename = "/sys/class/i2c-adapter/i2c-3/3-001d/coord"; - - FILE *fd; - int rs; - fd = fopen(accel_filename, "r"); - if(fd==NULL){ printf("liqaccel, cannot open for reading\n"); return -1;} - rs=fscanf((FILE*) fd,"%i %i %i",ax,ay,az); - fclose(fd); - if(rs != 3){ printf("liqaccel, cannot read information\n"); return -2;} - return 0; + if (nativeOrientation == MCE_ORIENTATION_LANDSCAPE) + return Landscape; + else if (nativeOrientation == MCE_ORIENTATION_LANDSCAPE_INVERTED) + return LandscapeInverted; + else if (nativeOrientation == MCE_ORIENTATION_PORTRAIT) + return Portrait; + else if (nativeOrientation == MCE_ORIENTATION_PORTRAIT_INVERTED) + return PortraitInverted; + return UnknownOrientation; } -}; +private: + Orientation o; +}; DeviceOrientation* DeviceOrientation::instance() { - static MaemoOrientation *o = 0; - if (!o) - o = new MaemoOrientation; + static MaemoOrientation *o = new MaemoOrientation; return o; } diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri index cff65be..58d8cc1 100644 --- a/tools/qml/qml.pri +++ b/tools/qml/qml.pri @@ -18,6 +18,7 @@ SOURCES += $$PWD/qmlruntime.cpp \ RESOURCES = $$PWD/qmlruntime.qrc maemo5 { + QT += dbus SOURCES += $$PWD/deviceorientation_maemo.cpp } else { SOURCES += $$PWD/deviceorientation.cpp -- cgit v0.12 From 3addea6e74a1f02b6e0a416bdb98b06c00e98e62 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 16 Jun 2010 15:54:18 +0300 Subject: Provide 'make unsigned_sis' target for Symbian mkspecs Rationale for this is that currently there is no simple way to create a sis package that can be properly signed via Symbian open signed mechanism, as 'make sis' will by default use self-signed certificates and automatically patch capabilities of binaries to remove non-self-signable ones. Task-number: QTBUG-11455 Reviewed-by: Janne Koskinen --- bin/createpackage.pl | 33 +++++++++++++++++++++++------ bin/patch_capabilities.pl | 3 ++- doc/src/platforms/symbian-introduction.qdoc | 2 ++ mkspecs/features/sis_targets.prf | 25 ++++++++++++++++++++++ 4 files changed, 56 insertions(+), 7 deletions(-) diff --git a/bin/createpackage.pl b/bin/createpackage.pl index 939c38e..8b787cb 100755 --- a/bin/createpackage.pl +++ b/bin/createpackage.pl @@ -78,6 +78,7 @@ Where supported options are as follows: as a comments. Also empty lines are ignored. The paths in can be absolute or relative to . [-u|unsigned] = Preserves the unsigned package. + [-o|only-unsigned] = Creates only unsigned package. [-s|stub] = Generates stub sis for ROM. [-n|sisname ] = Specifies the final sis name. Where parameters are as follows: @@ -121,11 +122,13 @@ my $certfile = ""; my $preserveUnsigned = ""; my $stub = ""; my $signed_sis_name = ""; +my $onlyUnsigned = ""; unless (GetOptions('i|install' => \$install, 'p|preprocess' => \$preprocessonly, 'c|certfile=s' => \$certfile, 'u|unsigned' => \$preserveUnsigned, + 'o|only-unsigned' => \$onlyUnsigned, 's|stub' => \$stub, 'n|sisname=s' => \$signed_sis_name,)) { Usage(); @@ -292,7 +295,10 @@ if($stub) { # Create stub SIS. system ("makesis -s $pkgoutput $stub_sis_name"); } else { - if ($certtext eq "Self Signed" && !@certificates && $templatepkg !~ m/_installer\.pkg$/i) { + if ($certtext eq "Self Signed" + && !@certificates + && $templatepkg !~ m/_installer\.pkg$/i + && !$onlyUnsigned) { print("Auto-patching capabilities for self signed package.\n"); system ("patch_capabilities $pkgoutput"); } @@ -302,6 +308,25 @@ if($stub) { system ("makesis $pkgoutput $unsigned_sis_name") and die ("makesis failed"); print("\n"); + my $targetInsert = ""; + if ($targetplatform ne "-") { + $targetInsert = " for $targetplatform"; + } + + if ($onlyUnsigned) { + stat($unsigned_sis_name); + if( -e _ ) { + print ("Successfully created unsigned package ${unsigned_sis_name}${targetInsert}!\n"); + } else { + print ("\nUnsigned package creation failed!\n"); + } + + if (!$preservePkgOutput) { + unlink $pkgoutput; + } + exit; + } + # Sign SIS with certificate info given as an argument. my $relcert = File::Spec->abs2rel($certificate); my $relkey = File::Spec->abs2rel($key); @@ -311,11 +336,7 @@ if($stub) { # Check if creating signed SIS Succeeded stat($signed_sis_name); if( -e _ ) { - my $targetInsert = ""; - if ($targetplatform ne "-") { - $targetInsert = "for $targetplatform "; - } - print ("Successfully created $signed_sis_name ${targetInsert}using certificate: $certtext!\n"); + print ("Successfully created signed package ${signed_sis_name}${targetInsert} using certificate: $certtext!\n"); # Sign with additional certificates & keys for my $row ( @certificates ) { diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl index 9741bc3..501939a 100755 --- a/bin/patch_capabilities.pl +++ b/bin/patch_capabilities.pl @@ -269,7 +269,8 @@ if (@ARGV) } print ("\n"); - print ("NOTE: A patched package should not be used for distribution!\n"); + print ("NOTE: A patched package may not work as expected due to reduced capabilities.\n"); + print (" Therefore it should not be used for any kind of Symbian signing or distribution!\n"); print ("\n"); } } diff --git a/doc/src/platforms/symbian-introduction.qdoc b/doc/src/platforms/symbian-introduction.qdoc index 6ffc568..316764b 100644 --- a/doc/src/platforms/symbian-introduction.qdoc +++ b/doc/src/platforms/symbian-introduction.qdoc @@ -127,6 +127,7 @@ \row \o \c run \o Run the application on the emulator. \row \o \c runonphone \o Run the application on a device. \row \o \c sis \o Create signed \c .sis file for project. + \row \o \c unsigned_sis \o Create unsigned \c .sis file for project. \row \o \c installer_sis \o Create signed \l{Smart Installer}{smart installer} \c .sis file for project. Smart installer will attempt to download @@ -193,6 +194,7 @@ \row \o -p \o Only preprocess the template \c .pkg file. \row \o -c \o Read certificate information from a file. \row \o -u \o Preserves unsigned package. + \row \o -o \o Creates only unsigned package. \row \o -s \o Generates stub sis for ROM. \row \o -n \o Specifies the final sis name. \endtable diff --git a/mkspecs/features/sis_targets.prf b/mkspecs/features/sis_targets.prf index b149a22..37b758b 100644 --- a/mkspecs/features/sis_targets.prf +++ b/mkspecs/features/sis_targets.prf @@ -32,6 +32,24 @@ equals(GENERATE_SIS_TARGETS, true) { ok_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) $$basename(TARGET)_template.pkg \ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) + unsigned_sis_target.target = unsigned_sis + unsigned_sis_target.commands = $(if $(wildcard $$basename(TARGET)_template.pkg), \ + $(if $(wildcard $$make_cache_name), \ + $(MAKE) -f $(MAKEFILE) ok_unsigned_sis MAKEFILES=$$make_cache_name \ + , \ + $(if $(QT_SIS_TARGET), \ + $(MAKE) -f $(MAKEFILE) ok_unsigned_sis \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nocache \ + ) \ + ) \ + , \ + $(MAKE) -f $(MAKEFILE) fail_sis_nopkg \ + ) + + ok_unsigned_sis_target.target = ok_unsigned_sis + ok_unsigned_sis_target.commands = createpackage.bat $(QT_SIS_OPTIONS) -o $$basename(TARGET)_template.pkg $(QT_SIS_TARGET) + target_sis_target.target = $${sis_destdir}$${TARGET}.sis target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis @@ -74,6 +92,8 @@ equals(GENERATE_SIS_TARGETS, true) { QMAKE_EXTRA_TARGETS += sis_target \ ok_sis_target \ + unsigned_sis_target \ + ok_unsigned_sis_target \ target_sis_target \ installer_sis_target \ ok_installer_sis_target \ @@ -114,6 +134,10 @@ equals(GENERATE_SIS_TARGETS, true) { - $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) sis_target.depends = first + unsigned_sis_target.target = unsigned_sis + unsigned_sis_target.commands = createpackage $(QT_SIS_OPTIONS) -o $$basename(TARGET)_template.pkg + unsigned_sis_target.depends = first + target_sis_target.target = $${sis_destdir}$${TARGET}.sis target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis @@ -128,6 +152,7 @@ equals(GENERATE_SIS_TARGETS, true) { } QMAKE_EXTRA_TARGETS += sis_target \ + unsigned_sis_target \ target_sis_target \ installer_sis_target } -- cgit v0.12 From 6dffaee6ab0bbeddd9e0cb16ff4545c3cb09bfe9 Mon Sep 17 00:00:00 2001 From: Benjamin Poulain Date: Thu, 17 Jun 2010 01:17:55 +0200 Subject: Allocate the memory for QtFontSize when count > 1 This fix a regression introduced by 71ba2b0973d291e991e1498c266e69d6640c8531. In the case count >= 1 && count < 8, no memory is allocated. Reviewed-by: Andreas Kling --- src/gui/text/qfontdatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 4c058ce..139139f 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -289,7 +289,7 @@ QtFontSize *QtFontStyle::pixelSize(unsigned short size, bool add) QtFontSize *newPixelSizes = (QtFontSize *)malloc(sizeof(QtFontSize)); Q_CHECK_PTR(newPixelSizes); pixelSizes = newPixelSizes; - } else if (!(count % 8)) { + } else if (!(count % 8) || count == 1) { QtFontSize *newPixelSizes = (QtFontSize *) realloc(pixelSizes, (((count+8) >> 3) << 3) * sizeof(QtFontSize)); -- cgit v0.12 From b768d155c5b40c66f7b83ca5e52ad6dda78c2fe8 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 17 Jun 2010 00:17:32 +0200 Subject: Implement QIODevice::peek() using read() + ungetBlock(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous implementation was doing ungetChar() in a loop. Task-number: QTBUG-9654 Reviewed-by: João Abecasis Reviewed-by: mread --- src/corelib/io/qiodevice.cpp | 21 ++++++++++++++------- src/corelib/io/qiodevice_p.h | 9 +++++++++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index 223df9b..d2e4f75 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -1476,10 +1476,13 @@ bool QIODevice::getChar(char *c) */ qint64 QIODevice::peek(char *data, qint64 maxSize) { + Q_D(QIODevice); qint64 readBytes = read(data, maxSize); - int i = readBytes; - while (i > 0) - ungetChar(data[i-- - 1]); + if (readBytes <= 0) + return readBytes; + + d->buffer.ungetBlock(data, readBytes); + d->pos -= readBytes; return readBytes; } @@ -1502,11 +1505,15 @@ qint64 QIODevice::peek(char *data, qint64 maxSize) */ QByteArray QIODevice::peek(qint64 maxSize) { + Q_D(QIODevice); QByteArray result = read(maxSize); - int i = result.size(); - const char *data = result.constData(); - while (i > 0) - ungetChar(data[i-- - 1]); + + if (result.isEmpty()) + return result; + + d->buffer.ungetBlock(result.constData(), result.size()); + d->pos -= result.size(); + return result; } diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h index 94dadca..225a0b9 100644 --- a/src/corelib/io/qiodevice_p.h +++ b/src/corelib/io/qiodevice_p.h @@ -151,6 +151,15 @@ public: len++; *first = c; } + void ungetBlock(const char* block, int size) { + if ((first - buf) < size) { + // underflow, the existing valid data needs to move to the end of the (potentially bigger) buffer + makeSpace(len + size, freeSpaceAtStart); + memcpy(first - size, block, size); + } + first -= size; + len += size; + } private: enum FreeSpacePos {freeSpaceAtStart, freeSpaceAtEnd}; -- cgit v0.12 From 7a577ff67388413a882435c5cbd1ad6d1fa8393d Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 17 Jun 2010 10:26:13 +1000 Subject: clearFocus() shouldn't mess with focus if it doesn't have focus removing an item from the view caused the focus to change even if the removed item didn't have focus. Task-number: QTBUG-11341 Reviewed-by: Yoann Lopes --- src/gui/graphicsview/qgraphicsitem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 8042c46..c9176d1 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -3277,7 +3277,8 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim */ void QGraphicsItem::clearFocus() { - d_ptr->clearFocusHelper(/* giveFocusToParent = */ true); + if (hasFocus()) + d_ptr->clearFocusHelper(/* giveFocusToParent = */ true); } /*! -- cgit v0.12 From b294bedf9d6fdabca9fd384f1b2d910c02ec1c50 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 17 Jun 2010 13:51:26 +1000 Subject: Add test for model data changes. --- .../qdeclarativerepeater/data/repeater2.qml | 5 ++- .../tst_qdeclarativerepeater.cpp | 44 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml b/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml index c8b863c..7f2f85a 100644 --- a/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml +++ b/tests/auto/declarative/qdeclarativerepeater/data/repeater2.qml @@ -9,12 +9,13 @@ Rectangle { Item { objectName: "myDelegate" height: 20 + width: 240 Text { - y: index*20 + objectName: "myName" text: name } Text { - y: index*20 + objectName: "myNumber" x: 100 text: number } diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp index 3cc68f4..7299a43 100644 --- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp +++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -75,6 +76,8 @@ private slots: private: QDeclarativeView *createView(); template + T *findItem(QGraphicsObject *parent, const QString &objectName, int index); + template T *findItem(QGraphicsObject *parent, const QString &id); }; @@ -312,6 +315,20 @@ void tst_QDeclarativeRepeater::dataModel() testModel.removeItem(2); QCOMPARE(container->childItems().count(), 4); + // Check that model changes are propagated + QDeclarativeText *text = findItem(canvas->rootObject(), "myName", 1); + QVERIFY(text); + QCOMPARE(text->text(), QString("two")); + + testModel.modifyItem(1, "Item two", "_2"); + text = findItem(canvas->rootObject(), "myName", 1); + QVERIFY(text); + QCOMPARE(text->text(), QString("Item two")); + + text = findItem(canvas->rootObject(), "myNumber", 1); + QVERIFY(text); + QCOMPARE(text->text(), QString("_2")); + delete testObject; delete canvas; } @@ -387,6 +404,33 @@ QDeclarativeView *tst_QDeclarativeRepeater::createView() } template +T *tst_QDeclarativeRepeater::findItem(QGraphicsObject *parent, const QString &objectName, int index) +{ + const QMetaObject &mo = T::staticMetaObject; + //qDebug() << parent->childItems().count() << "children"; + for (int i = 0; i < parent->childItems().count(); ++i) { + QDeclarativeItem *item = qobject_cast(parent->childItems().at(i)); + if(!item) + continue; + //qDebug() << "try" << item; + if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) { + if (index != -1) { + QDeclarativeExpression e(qmlContext(item), item, "index"); + if (e.evaluate().toInt() == index) + return static_cast(item); + } else { + return static_cast(item); + } + } + item = findItem(item, objectName, index); + if (item) + return static_cast(item); + } + + return 0; +} + +template T *tst_QDeclarativeRepeater::findItem(QGraphicsObject *parent, const QString &objectName) { const QMetaObject &mo = T::staticMetaObject; -- cgit v0.12 From a6b0458c5ab5bc8ad6c868425820e0bf0e932336 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 17 Jun 2010 13:57:15 +1000 Subject: doc: add note that items with width or height of 0 are not positioned. --- src/declarative/graphicsitems/qdeclarativepositioners.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index ad61bab..b9231a1 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -358,6 +358,8 @@ Column { positioner may exhibit strange behaviour. If you need to perform any of these actions, consider positioning the items without the use of a Column. + Items with a width or height of 0 will not be positioned. + \sa Row, {declarative/positioners}{Positioners example} */ /*! @@ -502,6 +504,8 @@ Row { positioner may exhibit strange behaviour. If you need to perform any of these actions, consider positioning the items without the use of a Row. + Items with a width or height of 0 will not be positioned. + \sa Column, {declarative/positioners}{Positioners example} */ /*! @@ -657,6 +661,8 @@ Grid { positioner may exhibit strange behaviour. If you need to perform any of these actions, consider positioning the items without the use of a Grid. + Items with a width or height of 0 will not be positioned. + \sa Flow, {declarative/positioners}{Positioners example} */ /*! @@ -913,6 +919,8 @@ void QDeclarativeGrid::reportConflictingAnchors() positioner may exhibit strange behaviour. If you need to perform any of these actions, consider positioning the items without the use of a Flow. + Items with a width or height of 0 will not be positioned. + \sa Grid, {declarative/positioners}{Positioners example} */ /*! -- cgit v0.12 From fac227f609e544f8f55aca8447b4328d6534407a Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 17 Jun 2010 07:43:41 +0200 Subject: Speed up calls to QPainter::setCompositionMode when the mode is unchanged Avoid marking the composition mode as dirty and calling into the extended engine if the composition mode that the application wants to set is the same that's currently used. Reviewed-by: Gunnar --- src/gui/painting/qpainter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index d17c711..71bc990 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -2391,6 +2391,8 @@ void QPainter::setCompositionMode(CompositionMode mode) qWarning("QPainter::setCompositionMode: Painter not active"); return; } + if (d->state->composition_mode == mode) + return; if (d->extended) { d->state->composition_mode = mode; d->extended->compositionModeChanged(); -- cgit v0.12 From 594900e68f8e264facbe8c75eaf2b857240bc072 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Thu, 17 Jun 2010 09:11:18 +0200 Subject: Doc: Specified QAbstractEventDispatcher::filterEvent()'s argument types. Task-number: QTBUG-10904 Reviewed-by: Morten Engvoldsen --- src/corelib/kernel/qabstracteventdispatcher.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp index ee3c4f2..bcf4477 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.cpp +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp @@ -393,6 +393,27 @@ void QAbstractEventDispatcher::closingDown() \snippet doc/src/snippets/code/src_corelib_kernel_qabstracteventdispatcher.cpp 0 + Note that the type of the \a message is platform dependent. The + following table shows the \a {message}'s type on Windows, Mac, and + X11. You can do a static cast to these types. + + \table + \header + \o Platform + \o type + \row + \o Windows + \o MSG + \row + \o X11 + \o XEvent + \row + \o Mac + \o NSEvent + \endtable + + + \sa setEventFilter(), filterEvent() */ @@ -434,6 +455,9 @@ QAbstractEventDispatcher::EventFilter QAbstractEventDispatcher::setEventFilter(E compatibility with any extensions that may be used in the application. + Note that the type of \a message is platform dependent. See + QAbstractEventDispatcher::EventFilter for details. + \sa setEventFilter() */ bool QAbstractEventDispatcher::filterEvent(void *message) -- cgit v0.12 From 458a18284406dedcf0628c651fb3511553dbcb58 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 17 Jun 2010 09:55:45 +0200 Subject: document QSslSocket::systemCaCertificates() change in changelog Reviewed-by: Zeno Albisser --- dist/changes-4.7.0 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0 index 95cff56..c19bf15 100644 --- a/dist/changes-4.7.0 +++ b/dist/changes-4.7.0 @@ -377,3 +377,9 @@ QtCore: ABIs, but it also allowed for unaligned access. Qt never generates or uses unaligned access and the new EABI aligns as expected, so the flag was removed. + +QtNetwork: + - Qt does no longer provide its own CA bundle, but uses system APIs for + retrieving the default system certificates. On Symbian, + QSslSocket::systemCaCertificates() provides an empty list of + certificates. -- cgit v0.12 From e4fbdd4fde9b8d2acc13268b44caa57405c3db1a Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 17 Jun 2010 10:24:49 +0200 Subject: Typo in qcleanlooksstyle.cpp Task-number: QTBUG-11506 --- src/gui/styles/qcleanlooksstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qcleanlooksstyle.cpp b/src/gui/styles/qcleanlooksstyle.cpp index 883f511..ada5293 100644 --- a/src/gui/styles/qcleanlooksstyle.cpp +++ b/src/gui/styles/qcleanlooksstyle.cpp @@ -884,7 +884,7 @@ void QCleanlooksStyle::drawPrimitive(PrimitiveElement elem, } painter->restore(); break; -#ifndef QT_NO_LINEDIT +#ifndef QT_NO_LINEEDIT case PE_FrameLineEdit: // fall through #endif // QT_NO_LINEEDIT -- cgit v0.12 From cf74e83d8b79c4840c073bb7dc387045b1210df8 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Thu, 17 Jun 2010 11:14:59 +0200 Subject: Doc: Small change to QAbstractItemDelegate::editorEvent() Task-number: QTBUG-2446 Reviewed-by: Marius Bugge Monsen --- src/gui/itemviews/qabstractitemdelegate.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gui/itemviews/qabstractitemdelegate.cpp b/src/gui/itemviews/qabstractitemdelegate.cpp index 775bf7d..0ea6d67 100644 --- a/src/gui/itemviews/qabstractitemdelegate.cpp +++ b/src/gui/itemviews/qabstractitemdelegate.cpp @@ -291,8 +291,14 @@ void QAbstractItemDelegate::updateEditorGeometry(QWidget *, } /*! - Whenever an event occurs, this function is called with the \a event - \a model \a option and the \a index that corresponds to the item being edited. + When editing of an item starts, this function is called with the + \a event that triggered the editing, the \a model, the \a index of + the item, and the \a option used for rendering the item. + + Mouse events are sent to editorEvent() even if they don't start + editing of the item. This can, for instance, be useful if you wish + to open a context menu when the right mouse button is pressed on + an item. The base implementation returns false (indicating that it has not handled the event). -- cgit v0.12 From 24605a8cd542b44e6ed2bb6dbb7fe12633015853 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Thu, 17 Jun 2010 12:26:02 +0200 Subject: Updated WebKit to 6623b5da196390748dc619461739f9cb84524736 Integrated changes: || || Make repaint throttling parameters configurable runtime. || || || [Qt] rendering error in mediawiki || || || Spatial Navigation: make it work with focusable elements in overflow content || || || GIFs loop one time too few || || || [Qt] Animated GIF images does not animate 10x as expected by default. || || || [Qt] Image::drawTiled animations does not work || || || [Qt] QtWebKit crashes while initializing flash plugin 10.1.53.64... || || || Spatial Navigation: using offset{Left,Top} is not enough to get the proper inner frames position || || || Spatial Navigation: refactor scrollInDirection to work with scrollable content || --- src/3rdparty/webkit/.tag | 2 +- src/3rdparty/webkit/ChangeLog | 13 ++ src/3rdparty/webkit/JavaScriptCore/ChangeLog | 13 ++ src/3rdparty/webkit/VERSION | 2 +- src/3rdparty/webkit/WebCore/ChangeLog | 201 +++++++++++++++++++++ .../webkit/WebCore/page/FocusController.cpp | 176 +++++++++++------- src/3rdparty/webkit/WebCore/page/FrameView.cpp | 54 ++++-- src/3rdparty/webkit/WebCore/page/FrameView.h | 14 ++ .../webkit/WebCore/page/SpatialNavigation.cpp | 25 ++- .../webkit/WebCore/page/SpatialNavigation.h | 7 +- .../platform/graphics/qt/ImageDecoderQt.cpp | 18 +- .../webkit/WebCore/plugins/qt/PluginPackageQt.cpp | 23 +++ src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 45 ++++- src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.cpp | 7 + src/3rdparty/webkit/WebKit/qt/Api/qwebsettings.h | 3 +- src/3rdparty/webkit/WebKit/qt/ChangeLog | 37 ++++ 16 files changed, 541 insertions(+), 99 deletions(-) diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index 07a02d7..f5b6af3 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -40c2d6907ef75288b4f15e7fad334b9138acdbbf +6623b5da196390748dc619461739f9cb84524736 diff --git a/src/3rdparty/webkit/ChangeLog b/src/3rdparty/webkit/ChangeLog index c2862fd..51d08a0 100644 --- a/src/3rdparty/webkit/ChangeLog +++ b/src/3rdparty/webkit/ChangeLog @@ -1,3 +1,16 @@ +2010-06-17 Mark Brand + + Reviewed by Simon Hausmann. + + [Qt] use "win32-g++*" scope to match all MinGW makespecs + + The scope "win32-g++" comes from the name of the makespec. However, it + is frequently used to check for MinGW. This works fine as long as + win32-g++ is the only makespec for MinGW. Now we need the wildcard + to cover "win32-g++-cross" as well. + + * WebKit.pri: + 2010-05-04 Laszlo Gombos Unreviewed, build fix for Symbian. diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index d9b2987..adaf390 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,16 @@ +2010-06-17 Mark Brand + + Reviewed by Simon Hausmann. + + [Qt] use "win32-g++*" scope to match all MinGW makespecs + + The scope "win32-g++" comes from the name of the makespec. However, it + is frequently used to check for MinGW. This works fine as long as + win32-g++ is the only makespec for MinGW. Now we need the wildcard + to cover "win32-g++-cross" as well. + + * JavaScriptCore.pro: + 2010-06-07 Benjamin Poulain Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index b648b94..1e7351f 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from and has the sha1 checksum - 40c2d6907ef75288b4f15e7fad334b9138acdbbf + 6623b5da196390748dc619461739f9cb84524736 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 6a7da30..c17a8aa 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,204 @@ +2010-06-17 Mark Brand + + Reviewed by Simon Hausmann. + + [Qt] use "win32-g++*" scope to match all MinGW makespecs + + The scope "win32-g++" comes from the name of the makespec. However, it + is frequently used to check for MinGW. This works fine as long as + win32-g++ is the only makespec for MinGW. Now we need the wildcard + to cover "win32-g++-cross" as well. + + * WebCore.pro: + +2010-06-16 Antonio Gomes + + Reviewed by Kenneth Christiansen. + + Spatial Navigation: using offset{Left,Top} is not enough to get the proper inner frames position + https://bugs.webkit.org/show_bug.cgi?id=39439 + + As pointed out by Darin Adler in https://bugs.webkit.org/show_bug.cgi?id=18662#c20, + "It's not correct to use the offsetLeft and offsetTop of the frame owner element's renderer because + that's just the distance from the offsetParent, not the absolute position". + + Patch fixes that behavior by now considering the offsetTop and offsetLeft the offsetParent recursively, + starting from the HtmlFrameOwnerElement. Previously, only calling offsetTop and offsetLeft works + because all tests were done in htmls where the {i}frame element was a directly a child of the body, + e.g. ...