From 75bd4d9b1f14b1aea085af3f6714c06ab6ae1cd2 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 9 Aug 2010 16:11:30 +1000 Subject: PathView required some diagonal movement before a drag was initiated. Any movement beyond the threshold is sufficient. Task-number: 12747 Reviewed-by: Joona Petrell --- src/declarative/graphicsitems/qdeclarativepathview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 06ac275..5771f84 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -1061,7 +1061,7 @@ void QDeclarativePathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event) if (!d->stealMouse) { QPointF delta = event->pos() - d->startPoint; - if (qAbs(delta.x()) > QApplication::startDragDistance() && qAbs(delta.y()) > QApplication::startDragDistance()) + if (qAbs(delta.x()) > QApplication::startDragDistance() || qAbs(delta.y()) > QApplication::startDragDistance()) d->stealMouse = true; } -- cgit v0.12 From 5f611f5a68a0994b46dbe696e5275c4fb40b7470 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 9 Aug 2010 10:58:23 +1000 Subject: Explain Flipable example further --- src/declarative/graphicsitems/qdeclarativeflipable.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp index 8c9d2dd..b266273 100644 --- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp @@ -83,10 +83,16 @@ public: \image flipable.gif - The \l Rotation element is used to specify the angle and axis of the flip, - and the \l State defines the changes in angle which produce the flipping - effect. Finally, the \l Transition creates the animation that changes the - angle over one second. + The \l Rotation element is used to specify the angle and axis of the flip. + When \c flipped is \c true, the item changes to the "back" state, where + the angle is changed to 180 degrees to produce the flipping effect. + Finally, the \l Transition creates the animation that changes the + angle over one second: when the item changes between its "back" and + default states, the NumberAnimation animates the angle between + its old and new values. + + See the \l {QML States} and \l {QML Animation} documentation for more + details on state changes and how animations work within transitions. \sa {declarative/ui-components/flipable}{Flipable example} */ -- cgit v0.12 From 7c05fdc74c6ad04c549bf367f68e3f9d8d2c438d Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 9 Aug 2010 10:58:43 +1000 Subject: Merge sections about when property and default state --- doc/src/declarative/qdeclarativestates.qdoc | 95 ++++++++++++++++++----------- 1 file changed, 59 insertions(+), 36 deletions(-) diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc index 0b91756..274040a 100644 --- a/doc/src/declarative/qdeclarativestates.qdoc +++ b/doc/src/declarative/qdeclarativestates.qdoc @@ -84,18 +84,34 @@ Rectangle. \snippet doc/src/snippets/declarative/states.qml 0 -A \l State item defines all the changes to be made in the new state. You +The \l State item defines all the changes to be made in the new state. It could specify additional properties to be changed, or create additional -PropertyChanges for other objects. (Note that a \l State can modify the -properties of other objects, not just the object that owns the state.) +PropertyChanges for other objects. It can also modify the properties of other +objects, not just the object that owns the state. For example: -For example: +\qml +Rectangle { + ... + states: [ + State { + name: "moved" + PropertyChanges { target: myRect; x: 50; y: 50; color: "blue" } + PropertyChanges { target: someOtherItem; width: 1000 } + } + ] +} +\endqml + +As a convenience, if an item only has one state, its \l {Item::}{states} +property can be defined as a single \l State, without the square-brace list +syntax: \qml -State { - name: "moved" - PropertyChanges { target: myRect; x: 50; y: 50; color: "blue" } - PropertyChanges { target: someOtherItem; width: 1000 } +Item { + ... + states: State { + ... + } } \endqml @@ -118,54 +134,61 @@ transitions between them. Of course, the \l Rectangle in the example above could have simply been moved by setting its position to (50, 50) in the mouse area's \c onClicked handler. -However, aside from enabling batched property changes, the use of states allows -an item to revert to its \e {default state}, which contains all of the items' -initial property values before they were modified in a state change. +However, aside from enabling batched property changes, one of the features of +QML states is the ability of an item to revert to its \e {default state}. +The default state contains all of an item's initial property values before +they were modified in a state change. -The default state is specified by an empty string. If the MouseArea in the -above example was changed to this: +For example, suppose the \l Rectangle should move to (50,50) when the mouse is +pressed, and then move back to its original position when the mouse is +released. This can be achieved by using the \l {State::}{when} property, +like this: -\qml -MouseArea { - anchors.fill: parent - onClicked: myRect.state == 'moved' ? myRect.state = "" : myRect.state = 'moved'; -} -\endqml - -This would toggle the \l Rectangle's state between the \e moved and \e default -states when clicked. The properties can be reverted to their initial -values without requiring the definition of another \l State that defines these -value changes. +\qml +Rectangle { + ... + MouseArea { + id: mouseArea + anchors.fill: parent + } + states: State { + name: "moved"; when: mouseArea.pressed + ... + } +} +\endqml -\section1 The "when" property +The \l {State::}{when} property is set to an expression that evaluates to +\c true when the item should be set to that state. When the mouse is pressed, +the state is changed to \e moved. When it is released, the item reverts to its +\e default state, which defines all of the item's original property values. -The \l {State::}{when} property is useful for specifying when a state should be -applied. This can be set to an expression that evaluates to \c true when an -item should change to a particular state. +Alternatively, an item can be explicitly set to its default state by setting its +\l {Item::}{state} property to an empty string (""). For example, instead of +using the \l {State::}{when} property, the above code could be changed to: -If the above example was changed to this: - \qml Rectangle { ... MouseArea { - id: mouseArea anchors.fill: parent + onPressed: myRect.state = 'moved'; + onReleased: myRect.state = ''; } states: State { - name: "moved"; when: mouseArea.pressed + name: "moved" ... } +} \endqml -The \l Rectangle would automatically change to the \e moved state when the -mouse is pressed, and revert to the default state when it is released. This is -simpler (and a better, more declarative method) than creating \c onPressed -and \c onReleased handlers in the MouseArea to set the current state. +Obviously it makes sense to use the \l {State::}{when} property when possible +as it provides a simpler (and a better, more declarative) solution than +assigning the state from signal handlers. \section1 Animating state changes -- cgit v0.12 From 380335c8b8afd302f2f3f783163b2563ee9a122a Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 9 Aug 2010 11:10:22 +1000 Subject: Mention QML_IMPORT_TRACE in Modules docs --- doc/src/declarative/modules.qdoc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc index 9e51a40..467b7d0 100644 --- a/doc/src/declarative/modules.qdoc +++ b/doc/src/declarative/modules.qdoc @@ -302,5 +302,13 @@ For examples of \c qmldir files for plugins, see the \l {declarative/cppextensions/plugins}{Plugins} example and \l {Tutorial: Writing QML extensions with C++}. + +\section1 Debugging + +The \c QML_IMPORT_TRACE environment variable can be useful for debugging +when there are problems with finding and loading modules. See +\l{Debugging module imports} for more information. + + */ / -- cgit v0.12 From 45f6c749ff5f1773a5a52f1b40278ad390f3ae59 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 9 Aug 2010 17:08:23 +1000 Subject: XmlListModel doc fixes Task-number: QTBUG-12749 --- src/declarative/util/qdeclarativexmllistmodel.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 7c1e1fd..8bd829e 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -560,7 +560,7 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListPropertyprogress; } +/*! + \qmlmethod void XmlListModel::errorString() + + Returns a string description of the last error that occurred + if \l status is XmlListModel::Error. +*/ QString QDeclarativeXmlListModel::errorString() const { Q_D(const QDeclarativeXmlListModel); -- cgit v0.12 From 7829343dc9e12befd6c471cc72d00139bad5d42b Mon Sep 17 00:00:00 2001 From: Carlos Manuel Duclos Vergara Date: Mon, 9 Aug 2010 13:42:26 +0200 Subject: CreateFileMapping returns NULL on error , only tested with INVALID_HANDLE_VALUE. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That code is deprecated for the most part, however under certain circumstances could be run. The fix is to check the value when using the deprecated code and change the return value to follow the logic of the new code. Task-number: QTBUG-12732 Reviewed-by: João Abecasis --- src/corelib/io/qfsfileengine_win.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 21930e1..35fa04b 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1958,6 +1958,10 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + // Since this is a special case, we check if the return value was NULL and if so + // we change it to INVALID_HANDLE_VALUE to follow the logic inside this function. + if(0 == handle) + handle = INVALID_HANDLE_VALUE; #endif if (handle == INVALID_HANDLE_VALUE) { -- cgit v0.12 From eea84818e98af917d3cf2bf04ea17a416ef9d55e Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Mon, 9 Aug 2010 13:55:23 +0200 Subject: Correcting spelling mistakes in documentation. Part of fix for QTBUG-11938. Reviewer: David Boddie Task number: QTBUG-11938 --- demos/books/bookwindow.cpp | 2 +- demos/browser/browsermainwindow.cpp | 2 +- demos/browser/webview.cpp | 2 +- demos/qtdemo/menumanager.cpp | 2 +- src/corelib/concurrent/qtconcurrentfilter.cpp | 2 +- src/corelib/concurrent/qtconcurrentmap.cpp | 2 +- src/corelib/concurrent/qtconcurrentresultstore.cpp | 2 +- src/corelib/io/qfileinfo.cpp | 4 ++-- src/corelib/thread/qmutexpool.cpp | 2 +- src/corelib/tools/qbytearraymatcher.h | 2 +- src/corelib/tools/qstringmatcher.h | 2 +- src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 2 +- src/declarative/qml/qdeclarativecompiledbindings.cpp | 2 +- src/declarative/qml/qdeclarativecomponent.cpp | 4 ++-- src/declarative/qml/qdeclarativeimageprovider.cpp | 2 +- src/declarative/qml/qdeclarativeinstruction.cpp | 2 +- src/declarative/qml/qdeclarativeproperty.cpp | 2 +- src/declarative/qml/qdeclarativescriptparser.cpp | 2 +- src/gui/embedded/qkbdlinuxinput_qws.cpp | 2 +- src/gui/embedded/qkbdqnx_qws.cpp | 2 +- src/gui/itemviews/qsortfilterproxymodel.cpp | 2 +- src/gui/kernel/qapplication_s60.cpp | 4 ++-- src/gui/kernel/qwidget_win.cpp | 4 ++-- src/gui/widgets/qcommandlinkbutton.cpp | 2 +- src/gui/widgets/qmainwindowlayout.cpp | 2 +- src/gui/widgets/qmenu.cpp | 4 ++-- src/gui/widgets/qmenubar.cpp | 2 +- src/gui/widgets/qprintpreviewwidget.cpp | 2 +- src/gui/widgets/qtoolbarextension.cpp | 2 +- src/network/kernel/qhostinfo.cpp | 2 +- src/network/socket/qabstractsocket.cpp | 2 +- src/network/socket/qlocalsocket_win.cpp | 2 +- src/network/socket/qnativesocketengine_unix.cpp | 2 +- src/network/ssl/qsslsocket.cpp | 2 +- src/opengl/qgl.cpp | 2 +- src/qt3support/widgets/q3gridview.cpp | 2 +- src/script/api/qscriptcontext.cpp | 2 +- src/tools/moc/moc.cpp | 2 +- tools/qdoc3/htmlgenerator.cpp | 4 ++-- 39 files changed, 45 insertions(+), 45 deletions(-) diff --git a/demos/books/bookwindow.cpp b/demos/books/bookwindow.cpp index 089d5e0..c801283 100644 --- a/demos/books/bookwindow.cpp +++ b/demos/books/bookwindow.cpp @@ -64,7 +64,7 @@ BookWindow::BookWindow() model->setEditStrategy(QSqlTableModel::OnManualSubmit); model->setTable("books"); - // Remeber the indexes of the columns + // Remember the indexes of the columns authorIdx = model->fieldIndex("author"); genreIdx = model->fieldIndex("genre"); diff --git a/demos/browser/browsermainwindow.cpp b/demos/browser/browsermainwindow.cpp index 8c2ed89..50c2cf8 100644 --- a/demos/browser/browsermainwindow.cpp +++ b/demos/browser/browsermainwindow.cpp @@ -670,7 +670,7 @@ void BrowserMainWindow::slotPrivateBrowsing() " items are automatically removed from the Downloads window," \ " new cookies are not stored, current cookies can't be accessed," \ " site icons wont be stored, session wont be saved, " \ - " and searches are not addded to the pop-up menu in the Google search box." \ + " and searches are not added to the pop-up menu in the Google search box." \ " Until you close the window, you can still click the Back and Forward buttons" \ " to return to the webpages you have opened.").arg(title); diff --git a/demos/browser/webview.cpp b/demos/browser/webview.cpp index 2f9b3e6..2cbd2f1 100644 --- a/demos/browser/webview.cpp +++ b/demos/browser/webview.cpp @@ -260,7 +260,7 @@ void WebView::setProgress(int progress) void WebView::loadFinished() { if (100 != m_progress) { - qWarning() << "Recieved finished signal while progress is still:" << progress() + qWarning() << "Received finished signal while progress is still:" << progress() << "Url:" << url(); } m_progress = 0; diff --git a/demos/qtdemo/menumanager.cpp b/demos/qtdemo/menumanager.cpp index c9ffecb..5b851b4 100644 --- a/demos/qtdemo/menumanager.cpp +++ b/demos/qtdemo/menumanager.cpp @@ -449,7 +449,7 @@ void MenuManager::init(MainWindow *window) window->scene->setStickyFocus(true); window->setFocus(); }else{ - qDebug() << "Error intializing QML subsystem, Declarative examples will not work"; + qDebug() << "Error initializing QML subsystem, Declarative examples will not work"; } } diff --git a/src/corelib/concurrent/qtconcurrentfilter.cpp b/src/corelib/concurrent/qtconcurrentfilter.cpp index 36febe7..29c3edb 100644 --- a/src/corelib/concurrent/qtconcurrentfilter.cpp +++ b/src/corelib/concurrent/qtconcurrentfilter.cpp @@ -117,7 +117,7 @@ function, and should merge the \e{intermediate} into the \e{result} variable. QtConcurrent::filteredReduced() guarantees that only one thread will call reduce at a time, so using a mutex to lock the result variable - is not neccesary. The QtConcurrent::ReduceOptions enum provides a way to + is not necessary. The QtConcurrent::ReduceOptions enum provides a way to control the order in which the reduction is done. \section1 Additional API Features diff --git a/src/corelib/concurrent/qtconcurrentmap.cpp b/src/corelib/concurrent/qtconcurrentmap.cpp index e74d69c..4303ff6 100644 --- a/src/corelib/concurrent/qtconcurrentmap.cpp +++ b/src/corelib/concurrent/qtconcurrentmap.cpp @@ -161,7 +161,7 @@ function, and should merge the \e{intermediate} into the \e{result} variable. QtConcurrent::mappedReduced() guarantees that only one thread will call reduce at a time, so using a mutex to lock the result variable - is not neccesary. The QtConcurrent::ReduceOptions enum provides a way to + is not necessary. The QtConcurrent::ReduceOptions enum provides a way to control the order in which the reduction is done. If QtConcurrent::UnorderedReduce is used (the default), the order is undefined, while QtConcurrent::OrderedReduce ensures that the reduction diff --git a/src/corelib/concurrent/qtconcurrentresultstore.cpp b/src/corelib/concurrent/qtconcurrentresultstore.cpp index ad4b2cf..65f3afa 100644 --- a/src/corelib/concurrent/qtconcurrentresultstore.cpp +++ b/src/corelib/concurrent/qtconcurrentresultstore.cpp @@ -236,7 +236,7 @@ int ResultStoreBase::count() const return resultCount; } -// returns the insert index, calling this funciton with +// returns the insert index, calling this function with // index equal to -1 returns the next available index. int ResultStoreBase::updateInsertIndex(int index, int _count) { diff --git a/src/corelib/io/qfileinfo.cpp b/src/corelib/io/qfileinfo.cpp index 37591c5..61f7180 100644 --- a/src/corelib/io/qfileinfo.cpp +++ b/src/corelib/io/qfileinfo.cpp @@ -797,12 +797,12 @@ QString QFileInfo::suffix() const \bold{Note:} The QDir returned always corresponds to the object's parent directory, even if the QFileInfo represents a directory. - For each of the follwing, dir() returns a QDir for + For each of the following, dir() returns a QDir for \c{"~/examples/191697"}. \snippet doc/src/snippets/fileinfo/main.cpp 0 - For each of the follwing, dir() returns a QDir for + For each of the following, dir() returns a QDir for \c{"."}. \snippet doc/src/snippets/fileinfo/main.cpp 1 diff --git a/src/corelib/thread/qmutexpool.cpp b/src/corelib/thread/qmutexpool.cpp index d9abdc5..59211fb 100644 --- a/src/corelib/thread/qmutexpool.cpp +++ b/src/corelib/thread/qmutexpool.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE -// qt_global_mutexpool is here for backwards compatability only, +// qt_global_mutexpool is here for backwards compatibility only, // use QMutexpool::instance() in new clode. Q_CORE_EXPORT QMutexPool *qt_global_mutexpool = 0; Q_GLOBAL_STATIC_WITH_ARGS(QMutexPool, globalMutexPool, (QMutex::Recursive)) diff --git a/src/corelib/tools/qbytearraymatcher.h b/src/corelib/tools/qbytearraymatcher.h index 8e7bc21..d3db4e9 100644 --- a/src/corelib/tools/qbytearraymatcher.h +++ b/src/corelib/tools/qbytearraymatcher.h @@ -78,7 +78,7 @@ private: QByteArrayMatcherPrivate *d; QByteArray q_pattern; #ifdef Q_CC_RVCT -// explicitely allow anonymous unions for RVCT to prevent compiler warnings +// explicitly allow anonymous unions for RVCT to prevent compiler warnings # pragma push # pragma anon_unions #endif diff --git a/src/corelib/tools/qstringmatcher.h b/src/corelib/tools/qstringmatcher.h index 1aafcb8..451aeb6 100644 --- a/src/corelib/tools/qstringmatcher.h +++ b/src/corelib/tools/qstringmatcher.h @@ -78,7 +78,7 @@ private: QString q_pattern; Qt::CaseSensitivity q_cs; #ifdef Q_CC_RVCT -// explicitely allow anonymous unions for RVCT to prevent compiler warnings +// explicitly allow anonymous unions for RVCT to prevent compiler warnings # pragma push # pragma anon_unions #endif diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index ceb1961..a489b5a 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -525,7 +525,7 @@ QVariant QDeclarativeVisualDataModelDataMetaObject::initialValue(int propId) QVariant value = model->m_listModelInterface->data(data->m_index, *it); return value; } else if (model->m_roles.count() == 1 && propName == "modelData") { - //for compatability with other lists, assign modelData if there is only a single role + //for compatibility with other lists, assign modelData if there is only a single role QVariant value = model->m_listModelInterface->data(data->m_index, model->m_roles.first()); return value; } diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp index 507e47b..723da94 100644 --- a/src/declarative/qml/qdeclarativecompiledbindings.cpp +++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp @@ -1628,7 +1628,7 @@ void QDeclarativeBindingCompiler::dump(const QByteArray &programData) /*! Clear the state associated with attempting to compile a specific binding. -This does not clear the global "commited binding" states. +This does not clear the global "committed binding" states. */ void QDeclarativeBindingCompilerPrivate::resetInstanceState() { diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 1d48b1a..5f4a063 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -192,7 +192,7 @@ class QByteArray; \value Null This QDeclarativeComponent has no data. Call loadUrl() or setData() to add QML content. \value Ready This QDeclarativeComponent is ready and create() may be called. \value Loading This QDeclarativeComponent is loading network data. - \value Error An error has occured. Call errors() to retrieve a list of \{QDeclarativeError}{errors}. + \value Error An error has occurred. Call errors() to retrieve a list of \{QDeclarativeError}{errors}. */ void QDeclarativeComponentPrivate::typeDataReady() @@ -518,7 +518,7 @@ void QDeclarativeComponent::loadUrl(const QUrl &url) } /*! - Return the list of errors that occured during the last compile or create + Return the list of errors that occurred during the last compile or create operation. An empty list is returned if isError() is not set. */ QList QDeclarativeComponent::errors() const diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp index 241df87..27269b7 100644 --- a/src/declarative/qml/qdeclarativeimageprovider.cpp +++ b/src/declarative/qml/qdeclarativeimageprovider.cpp @@ -112,7 +112,7 @@ public: } \endcode - Now the images can be succesfully loaded in QML: + Now the images can be successfully loaded in QML: \image imageprovider.png diff --git a/src/declarative/qml/qdeclarativeinstruction.cpp b/src/declarative/qml/qdeclarativeinstruction.cpp index 0f7b09d..1767d2f 100644 --- a/src/declarative/qml/qdeclarativeinstruction.cpp +++ b/src/declarative/qml/qdeclarativeinstruction.cpp @@ -218,7 +218,7 @@ void QDeclarativeCompiledData::dump(QDeclarativeInstruction *instr, int idx) qWarning().nospace() << idx << "\t\t" << line << "\t" << "DEFER" << "\t\t\t" << instr->defer.deferCount; break; default: - qWarning().nospace() << idx << "\t\t" << line << "\t" << "XXX UNKOWN INSTRUCTION" << "\t" << instr->type; + qWarning().nospace() << idx << "\t\t" << line << "\t" << "XXX UNKNOWN INSTRUCTION" << "\t" << instr->type; break; } #endif // QT_NO_DEBUG_STREAM diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index 071dd07..515c4d6 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -640,7 +640,7 @@ QDeclarativePropertyPrivate::binding(const QDeclarativeProperty &that) is assumed by the caller. \a flags is passed through to the binding and is used for the initial update (when - the binding sets the intial value, it will use these flags for the write). + the binding sets the initial value, it will use these flags for the write). */ QDeclarativeAbstractBinding * QDeclarativePropertyPrivate::setBinding(const QDeclarativeProperty &that, diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp index f703cf5..0657f49 100644 --- a/src/declarative/qml/qdeclarativescriptparser.cpp +++ b/src/declarative/qml/qdeclarativescriptparser.cpp @@ -760,7 +760,7 @@ bool ProcessAST::visit(AST::UiArrayBinding *node) prop->listValueRange.offset = node->lbracketToken.offset; prop->listValueRange.length = node->rbracketToken.offset + node->rbracketToken.length - node->lbracketToken.offset; - // Store the positions of the comma token too, again for the DOM to be able to retreive it. + // Store the positions of the comma token too, again for the DOM to be able to retrieve it. prop->listCommaPositions = collectCommas(node->members); while (propertyCount--) diff --git a/src/gui/embedded/qkbdlinuxinput_qws.cpp b/src/gui/embedded/qkbdlinuxinput_qws.cpp index 6c91a08..f53c444 100644 --- a/src/gui/embedded/qkbdlinuxinput_qws.cpp +++ b/src/gui/embedded/qkbdlinuxinput_qws.cpp @@ -138,7 +138,7 @@ QWSLinuxInputKbPrivate::QWSLinuxInputKbPrivate(QWSLinuxInputKeyboardHandler *h, // record the original mode so we can restore it again in the destructor. ::ioctl(m_tty_fd, KDGKBMODE, &m_orig_kbmode); - // setting this tranlation mode is even needed in INPUT mode to prevent + // setting this translation mode is even needed in INPUT mode to prevent // the shell from also interpreting codes, if the process has a tty // attached: e.g. Ctrl+C wouldn't copy, but kill the application. ::ioctl(m_tty_fd, KDSKBMODE, K_MEDIUMRAW); diff --git a/src/gui/embedded/qkbdqnx_qws.cpp b/src/gui/embedded/qkbdqnx_qws.cpp index fbc683e..72d1cb5 100644 --- a/src/gui/embedded/qkbdqnx_qws.cpp +++ b/src/gui/embedded/qkbdqnx_qws.cpp @@ -150,7 +150,7 @@ void QWSQnxKeyboardHandler::socketActivated() // figure out whether it's a press bool isPress = packet.data.key_cap & KEY_DOWN; - // figure out wheter the key is still pressed and the key event is repeated + // figure out whether the key is still pressed and the key event is repeated bool isRepeat = packet.data.key_cap & KEY_REPEAT; Qt::Key key = Qt::Key_unknown; diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp index f9b6b94..953a7f1 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.cpp +++ b/src/gui/itemviews/qsortfilterproxymodel.cpp @@ -774,7 +774,7 @@ void QSortFilterProxyModelPrivate::source_items_inserted( if (model->rowCount(source_parent) == delta_item_count) { // Items were inserted where there were none before. // If it was new rows make sure to create mappings for columns so that a - // valid mapping can be retreived later and vice-versa. + // valid mapping can be retrieved later and vice-versa. QVector &orthogonal_proxy_to_source = (orient == Qt::Horizontal) ? m->source_rows : m->source_columns; QVector &orthogonal_source_to_proxy = (orient == Qt::Horizontal) ? m->proxy_rows : m->proxy_columns; diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 1f6a4ae..e36ebb9 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1328,7 +1328,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) // framework destruction. TTrapHandler *origTrapHandler = User::TrapHandler(); - // The S60 framework has not been initalized. We need to do it. + // The S60 framework has not been initialized. We need to do it. TApaApplicationFactory factory(S60->s60ApplicationFactory ? S60->s60ApplicationFactory : newS60Application); CApaCommandLine* commandLine = 0; @@ -1506,7 +1506,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) */ // Register WId with the metatype system. This is to enable - // QWidgetPrivate::create_sys to used delayed slot invokation in order + // QWidgetPrivate::create_sys to used delayed slot invocation in order // to destroy WId objects during reparenting. qRegisterMetaType("WId"); } diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp index 23f57da..59035b1 100644 --- a/src/gui/kernel/qwidget_win.cpp +++ b/src/gui/kernel/qwidget_win.cpp @@ -166,7 +166,7 @@ static void qt_tablet_init() qt_tablet_widget = new QWidget(0); qt_tablet_widget->createWinId(); qt_tablet_widget->setObjectName(QLatin1String("Qt internal tablet widget")); - // We dont need this internal widget to appear in QApplication::topLevelWidgets() + // We don't need this internal widget to appear in QApplication::topLevelWidgets() if (QWidgetPrivate::allWidgets) QWidgetPrivate::allWidgets->remove(qt_tablet_widget); LOGCONTEXT lcMine; @@ -1547,7 +1547,7 @@ bool QWidgetPrivate::shouldShowMaximizeButton() { if (data.window_flags & Qt::MSWindowsFixedSizeDialogHint) return false; - // if the user explicitely asked for the maximize button, we try to add + // if the user explicitly asked for the maximize button, we try to add // it even if the window has fixed size. if (data.window_flags & Qt::CustomizeWindowHint && data.window_flags & Qt::WindowMaximizeButtonHint) diff --git a/src/gui/widgets/qcommandlinkbutton.cpp b/src/gui/widgets/qcommandlinkbutton.cpp index d3b5869..a6f5f7d 100644 --- a/src/gui/widgets/qcommandlinkbutton.cpp +++ b/src/gui/widgets/qcommandlinkbutton.cpp @@ -349,7 +349,7 @@ void QCommandLinkButton::paintEvent(QPaintEvent *) QStyleOptionButton option; initStyleOption(&option); - //Enable command link appearence on Vista + //Enable command link appearance on Vista option.features |= QStyleOptionButton::CommandLinkButton; option.text = QString(); option.icon = QIcon(); //we draw this ourselves diff --git a/src/gui/widgets/qmainwindowlayout.cpp b/src/gui/widgets/qmainwindowlayout.cpp index 593e391..62ee398 100644 --- a/src/gui/widgets/qmainwindowlayout.cpp +++ b/src/gui/widgets/qmainwindowlayout.cpp @@ -943,7 +943,7 @@ void QMainWindowLayout::toggleToolBarsVisible() #ifdef Q_WS_MAC if (layoutState.mainWindow->unifiedTitleAndToolBarOnMac()) { // If we hit this case, someone has pressed the "toolbar button" which will - // toggle the unified toolbar visiblity, because that's what the user wants. + // toggle the unified toolbar visibility, because that's what the user wants. // We might be in a situation where someone has hidden all the toolbars // beforehand (maybe in construction), but now they've hit this button and // and are expecting the items to show. What do we do? diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 7941c4e..4bea6de 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -262,7 +262,7 @@ void QMenuPrivate::updateActionRects() const const int deskFw = style->pixelMetric(QStyle::PM_MenuDesktopFrameWidth, &opt, q); const int tearoffHeight = tearoff ? style->pixelMetric(QStyle::PM_MenuTearoffHeight, &opt, q) : 0; - //for compatability now - will have to refactor this away.. + //for compatibility now - will have to refactor this away tabWidth = 0; maxIconWidth = 0; hasCheckableItems = false; @@ -1154,7 +1154,7 @@ void QMenuPrivate::_q_actionHovered() bool QMenuPrivate::hasMouseMoved(const QPoint &globalPos) { - //determines if the mouse has moved (ie its intial position has + //determines if the mouse has moved (ie its initial position has //changed by more than QApplication::startDragDistance() //or if there were at least 6 mouse motions) return motions > 6 || diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index e8e80b7..df16f7f 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -102,7 +102,7 @@ void QMenuBarExtension::paintEvent(QPaintEvent *) QStylePainter p(this); QStyleOptionToolButton opt; initStyleOption(&opt); - // We do not need to draw both extention arrows + // We do not need to draw both extension arrows opt.features &= ~QStyleOptionToolButton::HasMenu; p.drawComplexControl(QStyle::CC_ToolButton, opt); } diff --git a/src/gui/widgets/qprintpreviewwidget.cpp b/src/gui/widgets/qprintpreviewwidget.cpp index 45b15ef..ea311d3 100644 --- a/src/gui/widgets/qprintpreviewwidget.cpp +++ b/src/gui/widgets/qprintpreviewwidget.cpp @@ -469,7 +469,7 @@ void QPrintPreviewWidgetPrivate::setZoomFactor(qreal _zoomFactor) \o Create the QPrintPreviewWidget Construct the QPrintPreviewWidget either by passing in an - exisiting QPrinter object, or have QPrintPreviewWidget create a + existing QPrinter object, or have QPrintPreviewWidget create a default constructed QPrinter object for you. \o Connect the paintRequested() signal to a slot. diff --git a/src/gui/widgets/qtoolbarextension.cpp b/src/gui/widgets/qtoolbarextension.cpp index 032c6f0..574a775 100644 --- a/src/gui/widgets/qtoolbarextension.cpp +++ b/src/gui/widgets/qtoolbarextension.cpp @@ -75,7 +75,7 @@ void QToolBarExtension::paintEvent(QPaintEvent *) QStylePainter p(this); QStyleOptionToolButton opt; initStyleOption(&opt); - // We do not need to draw both extention arrows + // We do not need to draw both extension arrows opt.features &= ~QStyleOptionToolButton::HasMenu; p.drawComplexControl(QStyle::CC_ToolButton, opt); } diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index 8ae1305..348b0d2 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -647,7 +647,7 @@ void QHostInfoLookupManager::lookupFinished(QHostInfoRunnable *r) work(); } -// This function returns immediatly when we had a result in the cache, else it will later emit a signal +// This function returns immediately when we had a result in the cache, else it will later emit a signal QHostInfo qt_qhostinfo_lookup(const QString &name, QObject *receiver, const char *member, bool *valid, int *id) { *valid = false; diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index b604e89..505db71 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -1380,7 +1380,7 @@ void QAbstractSocket::connectToHostImplementation(const QString &hostName, quint #endif } else { if (d->threadData->eventDispatcher) { - // this internal API for QHostInfo either immediatly gives us the desired + // this internal API for QHostInfo either immediately gives us the desired // QHostInfo from cache or later calls the _q_startConnecting slot. bool immediateResultValid = false; QHostInfo hostInfo = qt_qhostinfo_lookup(hostName, diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index 4907f2c..1e0bced 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -306,7 +306,7 @@ void QLocalSocketPrivate::startAsyncRead() /*! \internal Sets the correct size of the read buffer after a read operation. - Returns false, if an error occured or the connection dropped. + Returns false, if an error occurred or the connection dropped. */ bool QLocalSocketPrivate::completeAsyncRead() { diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index f91ce5f..fe28863 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -562,7 +562,7 @@ int QNativeSocketEnginePrivate::nativeAccept() #else int acceptedDescriptor = qt_safe_accept(socketDescriptor, 0, 0); #endif - //check if we have vaild descriptor at all + //check if we have valid descriptor at all if(acceptedDescriptor > 0) { // Ensure that the socket is closed on exec*() ::fcntl(acceptedDescriptor, F_SETFD, FD_CLOEXEC); diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index f73068e..91265f3 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -210,7 +210,7 @@ valid. On failure, QSslSocket will emit the QSslSocket::sslErrors() signal. This mode is the default for clients. - \value AutoVerifyPeer QSslSocket will automaticaly use QueryPeer for + \value AutoVerifyPeer QSslSocket will automatically use QueryPeer for server sockets and VerifyPeer for client sockets. \sa QSslSocket::peerVerifyMode() diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 6120a85..4daa866 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1991,7 +1991,7 @@ struct DDSFormat { option helps preserve this default behavior. \omitvalue CanFlipNativePixmapBindOption Used by x11 from pixmap to choose - wether or not it can bind the pixmap upside down or not. + whether or not it can bind the pixmap upside down or not. \omitvalue MemoryManagedBindOption Used by paint engines to indicate that the pixmap should be memory managed along side with diff --git a/src/qt3support/widgets/q3gridview.cpp b/src/qt3support/widgets/q3gridview.cpp index 343b49f..b270a38 100644 --- a/src/qt3support/widgets/q3gridview.cpp +++ b/src/qt3support/widgets/q3gridview.cpp @@ -84,7 +84,7 @@ using namespace Qt; size in a potentially scrollable canvas. If you need rows and columns with different sizes, use a Q3Table instead. If you need a simple list of items, use a Q3ListBox. If you need to present - hierachical data use a Q3ListView, and if you need random objects + hierarichal data use a Q3ListView, and if you need random objects at random positions, consider using either a Q3IconView or a Q3Canvas. */ diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp index 1a11100..abaf5f9 100644 --- a/src/script/api/qscriptcontext.cpp +++ b/src/script/api/qscriptcontext.cpp @@ -324,7 +324,7 @@ QScriptValue QScriptContext::argumentsObject() const When a function is called as constructor, the thisObject() contains the newly constructed object to be initialized. - \note This function is only guarenteed to work for a context + \note This function is only guaranteed to work for a context corresponding to native functions. */ bool QScriptContext::isCalledAsConstructor() const diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 84d1567..ac49d65 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -1211,7 +1211,7 @@ bool Moc::until(Token target) { //when searching commas within the default argument, we should take care of template depth (anglecount) // unfortunatelly, we do not have enough semantic information to know if '<' is the operator< or - // the begining of a template type. so we just use heuristics. + // the beginning of a template type. so we just use heuristics. int possible = -1; while (index < symbols.size()) { diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index d23b41e..eb33ce9 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2027,7 +2027,7 @@ void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) } /*! - Generates a table of contents begining at \a node. + Generates a table of contents beginning at \a node. */ void HtmlGenerator::generateTableOfContents(const Node *node, CodeMarker *marker, @@ -2113,7 +2113,7 @@ void HtmlGenerator::generateTableOfContents(const Node *node, /*! Revised for the new doc format. - Generates a table of contents begining at \a node. + Generates a table of contents beginning at \a node. */ void HtmlGenerator::generateTableOfContents(const Node *node, CodeMarker *marker, -- cgit v0.12