summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@nokia.com>2010-07-29 14:59:55 +0200
committerToby Tomkins <toby.tomkins@nokia.com>2010-08-02 11:17:39 +1000
commit8340e96ee951efe9ef876ce134d9cdb6a521446f (patch)
tree48cc88d2f313650ef24b18d86588ccfdb2cc083b /examples
parent9710c075226aa441f108866521d095c740f2d298 (diff)
Fixed spelling mistakes in documented functions, classes, etc. Part of QTBUG-11938 and QTBUG-10801
(cherry picked from commit 5bdb85e3b21bcf624eb1830aa32d027e0c6870fe)
Diffstat (limited to 'examples')
-rw-r--r--examples/animation/stickman/lifecycle.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/adding/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/attached/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/binding/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/coercion/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/default/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/extended/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/grouped/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/properties/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/signal/main.cpp2
-rw-r--r--examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp2
-rw-r--r--examples/network/download/main.cpp2
-rw-r--r--examples/network/http/httpwindow.cpp2
-rw-r--r--examples/network/torrent/torrentclient.cpp22
-rw-r--r--examples/opengl/shared/qtlogo.cpp2
-rw-r--r--examples/tools/customcompleter/textedit.cpp2
-rw-r--r--examples/xml/htmlinfo/main.cpp2
17 files changed, 27 insertions, 27 deletions
diff --git a/examples/animation/stickman/lifecycle.cpp b/examples/animation/stickman/lifecycle.cpp
index 8778046302..02cdb71c77 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 f429b6e70c..391113c7dd 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 22e844fd63..5a39a9892c 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 29da9946e2..fe1bbc8223 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 9b32c8ba59..5c53368de6 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 f3a706810c..f611bc4cbe 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 fb7ce1a2a4..65527c3c63 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 f2e0f556f0..e56a14de50 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 b5dafe211b..80237ef5db 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 6add975518..56c08090ad 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 5752af7431..40dc3cbcf0 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 c322a448b9..0fb913746e 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 b1ea98ca7d..ea485463a3 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 5e25b9a3f9..b7607a6ffa 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 0352d29a40..0165032032 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 5467e53f27..77699e0c90 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 066edb6973..06fc33dd3c 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