diff options
Diffstat (limited to 'examples')
17 files changed, 27 insertions, 27 deletions
diff --git a/examples/animation/stickman/lifecycle.cpp b/examples/animation/stickman/lifecycle.cpp index 8778046..02cdb71 100644 --- a/examples/animation/stickman/lifecycle.cpp +++ b/examples/animation/stickman/lifecycle.cpp @@ -103,7 +103,7 @@ LifeCycle::LifeCycle(StickMan *stickMan, GraphicsView *keyReceiver) m_animationGroup->addAnimation(pa); } - // Set up intial state graph + // Set up initial state graph //! [3] m_machine = new QStateMachine(); m_machine->addDefaultAnimation(m_animationGroup); diff --git a/examples/declarative/cppextensions/referenceexamples/adding/main.cpp b/examples/declarative/cppextensions/referenceexamples/adding/main.cpp index f429b6e..391113c 100644 --- a/examples/declarative/cppextensions/referenceexamples/adding/main.cpp +++ b/examples/declarative/cppextensions/referenceexamples/adding/main.cpp @@ -57,7 +57,7 @@ int main(int argc, char ** argv) qWarning() << "The person's name is" << person->name(); qWarning() << "They wear a" << person->shoeSize() << "sized shoe"; } else { - qWarning() << "An error occured"; + qWarning() << "An error occurred"; } return 0; diff --git a/examples/declarative/cppextensions/referenceexamples/attached/main.cpp b/examples/declarative/cppextensions/referenceexamples/attached/main.cpp index 22e844f..5a39a98 100644 --- a/examples/declarative/cppextensions/referenceexamples/attached/main.cpp +++ b/examples/declarative/cppextensions/referenceexamples/attached/main.cpp @@ -83,7 +83,7 @@ int main(int argc, char ** argv) } } else { - qWarning() << "An error occured"; + qWarning() << "An error occurred"; } return 0; diff --git a/examples/declarative/cppextensions/referenceexamples/binding/main.cpp b/examples/declarative/cppextensions/referenceexamples/binding/main.cpp index 29da994..fe1bbc8 100644 --- a/examples/declarative/cppextensions/referenceexamples/binding/main.cpp +++ b/examples/declarative/cppextensions/referenceexamples/binding/main.cpp @@ -85,7 +85,7 @@ int main(int argc, char ** argv) party->startParty(); } else { - qWarning() << "An error occured"; + qWarning() << "An error occurred"; } return app.exec(); diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp b/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp index 9b32c8b..5c53368 100644 --- a/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp +++ b/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp @@ -70,7 +70,7 @@ int main(int argc, char ** argv) for (int ii = 0; ii < party->guestCount(); ++ii) qWarning() << " " << party->guest(ii)->name(); } else { - qWarning() << "An error occured"; + qWarning() << "An error occurred"; } return 0; diff --git a/examples/declarative/cppextensions/referenceexamples/default/main.cpp b/examples/declarative/cppextensions/referenceexamples/default/main.cpp index f3a7068..f611bc4 100644 --- a/examples/declarative/cppextensions/referenceexamples/default/main.cpp +++ b/examples/declarative/cppextensions/referenceexamples/default/main.cpp @@ -68,7 +68,7 @@ int main(int argc, char ** argv) for (int ii = 0; ii < party->guestCount(); ++ii) qWarning() << " " << party->guest(ii)->name(); } else { - qWarning() << "An error occured"; + qWarning() << "An error occurred"; } return 0; diff --git a/examples/declarative/cppextensions/referenceexamples/extended/main.cpp b/examples/declarative/cppextensions/referenceexamples/extended/main.cpp index fb7ce1a..65527c3 100644 --- a/examples/declarative/cppextensions/referenceexamples/extended/main.cpp +++ b/examples/declarative/cppextensions/referenceexamples/extended/main.cpp @@ -58,7 +58,7 @@ int main(int argc, char ** argv) edit->show(); return app.exec(); } else { - qWarning() << "An error occured"; + qWarning() << "An error occurred"; return 0; } } diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp b/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp index f2e0f55..e56a14d 100644 --- a/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp +++ b/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp @@ -78,7 +78,7 @@ int main(int argc, char ** argv) qWarning() << bestShoe->name() << "is wearing the best shoes!"; } else { - qWarning() << "An error occured"; + qWarning() << "An error occurred"; } return 0; diff --git a/examples/declarative/cppextensions/referenceexamples/properties/main.cpp b/examples/declarative/cppextensions/referenceexamples/properties/main.cpp index b5dafe2..80237ef 100644 --- a/examples/declarative/cppextensions/referenceexamples/properties/main.cpp +++ b/examples/declarative/cppextensions/referenceexamples/properties/main.cpp @@ -61,7 +61,7 @@ int main(int argc, char ** argv) for (int ii = 0; ii < party->guestCount(); ++ii) qWarning() << " " << party->guest(ii)->name(); } else { - qWarning() << "An error occured"; + qWarning() << "An error occurred"; } return 0; diff --git a/examples/declarative/cppextensions/referenceexamples/signal/main.cpp b/examples/declarative/cppextensions/referenceexamples/signal/main.cpp index 6add975..56c0809 100644 --- a/examples/declarative/cppextensions/referenceexamples/signal/main.cpp +++ b/examples/declarative/cppextensions/referenceexamples/signal/main.cpp @@ -84,7 +84,7 @@ int main(int argc, char ** argv) party->startParty(); } else { - qWarning() << "An error occured"; + qWarning() << "An error occurred"; } return 0; diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp b/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp index 5752af7..40dc3cb 100644 --- a/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp +++ b/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp @@ -86,7 +86,7 @@ int main(int argc, char ** argv) party->startParty(); } else { - qWarning() << "An error occured"; + qWarning() << "An error occurred"; } return app.exec(); diff --git a/examples/network/download/main.cpp b/examples/network/download/main.cpp index c322a44..0fb9137 100644 --- a/examples/network/download/main.cpp +++ b/examples/network/download/main.cpp @@ -150,7 +150,7 @@ void DownloadManager::downloadFinished(QNetworkReply *reply) } else { QString filename = saveFileName(url); if (saveToDisk(filename, reply)) - printf("Download of %s succeded (saved to %s)\n", + printf("Download of %s succeeded (saved to %s)\n", url.toEncoded().constData(), qPrintable(filename)); } diff --git a/examples/network/http/httpwindow.cpp b/examples/network/http/httpwindow.cpp index b1ea98c..ea48546 100644 --- a/examples/network/http/httpwindow.cpp +++ b/examples/network/http/httpwindow.cpp @@ -206,7 +206,7 @@ void HttpWindow::httpFinished() void HttpWindow::httpReadyRead() { - // this slot gets called everytime the QNetworkReply has new data. + // this slot gets called every time the QNetworkReply has new data. // We read all of its new data and write it into the file. // That way we use less RAM than when reading it at the finished() // signal of the QNetworkReply diff --git a/examples/network/torrent/torrentclient.cpp b/examples/network/torrent/torrentclient.cpp index 5e25b9a..b7607a6 100644 --- a/examples/network/torrent/torrentclient.cpp +++ b/examples/network/torrent/torrentclient.cpp @@ -1243,8 +1243,8 @@ void TorrentClient::schedulePieceForClient(PeerWireClient *client) // depending on the state we're in. int pieceIndex = 0; if (d->state == WarmingUp || (qrand() & 4) == 0) { - int *occurrances = new int[d->pieceCount]; - memset(occurrances, 0, d->pieceCount * sizeof(int)); + int *occurrences = new int[d->pieceCount]; + memset(occurrences, 0, d->pieceCount * sizeof(int)); // Count how many of each piece are available. foreach (PeerWireClient *peer, d->connections) { @@ -1252,38 +1252,38 @@ void TorrentClient::schedulePieceForClient(PeerWireClient *client) int peerPiecesSize = peerPieces.size(); for (int i = 0; i < peerPiecesSize; ++i) { if (peerPieces.testBit(i)) - ++occurrances[i]; + ++occurrences[i]; } } // Find the rarest or most common pieces. - int numOccurrances = d->state == WarmingUp ? 0 : 99999; + int numOccurrences = d->state == WarmingUp ? 0 : 99999; QList<int> piecesReadyForDownload; for (int i = 0; i < d->pieceCount; ++i) { if (d->state == WarmingUp) { // Add common pieces - if (occurrances[i] >= numOccurrances + if (occurrences[i] >= numOccurrences && incompletePiecesAvailableToClient.testBit(i)) { - if (occurrances[i] > numOccurrances) + if (occurrences[i] > numOccurrences) piecesReadyForDownload.clear(); piecesReadyForDownload.append(i); - numOccurrances = occurrances[i]; + numOccurrences = occurrences[i]; } } else { // Add rare pieces - if (occurrances[i] <= numOccurrances + if (occurrences[i] <= numOccurrences && incompletePiecesAvailableToClient.testBit(i)) { - if (occurrances[i] < numOccurrances) + if (occurrences[i] < numOccurrences) piecesReadyForDownload.clear(); piecesReadyForDownload.append(i); - numOccurrances = occurrances[i]; + numOccurrences = occurrences[i]; } } } // Select one piece randomly pieceIndex = piecesReadyForDownload.at(qrand() % piecesReadyForDownload.size()); - delete [] occurrances; + delete [] occurrences; } else { // Make up a list of available piece indices, and pick // a random one. diff --git a/examples/opengl/shared/qtlogo.cpp b/examples/opengl/shared/qtlogo.cpp index 0352d29..0165032 100644 --- a/examples/opengl/shared/qtlogo.cpp +++ b/examples/opengl/shared/qtlogo.cpp @@ -327,7 +327,7 @@ RectTorus::RectTorus(Geometry *g, qreal iRad, qreal oRad, qreal depth, int k) QVector<QVector3D> in_back = extrude(inside, depth); QVector<QVector3D> out_back = extrude(outside, depth); - // Create front, back and sides as seperate patches so that smooth normals + // Create front, back and sides as separate patches so that smooth normals // are generated for the curving sides, but a faceted edge is created between // sides and front/back Patch *front = new Patch(g); diff --git a/examples/tools/customcompleter/textedit.cpp b/examples/tools/customcompleter/textedit.cpp index 5467e53..77699e0 100644 --- a/examples/tools/customcompleter/textedit.cpp +++ b/examples/tools/customcompleter/textedit.cpp @@ -141,7 +141,7 @@ void TextEdit::keyPressEvent(QKeyEvent *e) } bool isShortcut = ((e->modifiers() & Qt::ControlModifier) && e->key() == Qt::Key_E); // CTRL+E - if (!c || !isShortcut) // dont process the shortcut when we have a completer + if (!c || !isShortcut) // do not process the shortcut when we have a completer QTextEdit::keyPressEvent(e); //! [7] diff --git a/examples/xml/htmlinfo/main.cpp b/examples/xml/htmlinfo/main.cpp index 066edb6..06fc33d 100644 --- a/examples/xml/htmlinfo/main.cpp +++ b/examples/xml/htmlinfo/main.cpp @@ -94,7 +94,7 @@ void parseHtmlFile(QTextStream &out, const QString &fileName) { int main(int argc, char **argv) { - // intialize QtCore application + // initialize QtCore application QCoreApplication app(argc, argv); // get a list of all html files in the current directory |