Doc: Fixing typo
(cherry picked from commit 0a9652c93170ab9520869e9e231eba1834b47abc) Conflicts: tests/auto/mediaobject/tst_mediaobject.cpp tests/auto/q3accel/tst_q3accel.cpp tests/auto/q3checklistitem/tst_q3checklistitem.cpp tests/auto/q3dns/tst_q3dns.cpp tests/auto/q3popupmenu/tst_q3popupmenu.cpp tools/linguist/tests/tst_lupdate.cpp Change-Id: I118829afb27ab082f9656139102f74f9ab5f7ac4 Reviewed-on: http://codereview.qt.nokia.com/1035 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com> Reviewed-by: David Boddie
This commit is contained in:
parent
8f222e2ad8
commit
1da4753bd9
@ -2735,7 +2735,7 @@ bool QObject::disconnect(const QObject *sender, const char *signal,
|
|||||||
\a receiver. Returns true if the connection is successfully broken;
|
\a receiver. Returns true if the connection is successfully broken;
|
||||||
otherwise returns false.
|
otherwise returns false.
|
||||||
|
|
||||||
This function provides the same posibilities like
|
This function provides the same possibilities like
|
||||||
disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
|
disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
|
||||||
but uses QMetaMethod to represent the signal and the method to be disconnected.
|
but uses QMetaMethod to represent the signal and the method to be disconnected.
|
||||||
|
|
||||||
@ -2753,7 +2753,7 @@ bool QObject::disconnect(const QObject *sender, const char *signal,
|
|||||||
|
|
||||||
QMetaMethod() may be used as wildcard in the meaning "any signal" or "any slot in receiving object".
|
QMetaMethod() may be used as wildcard in the meaning "any signal" or "any slot in receiving object".
|
||||||
In the same way 0 can be used for \a receiver in the meaning "any receiving object". In this case
|
In the same way 0 can be used for \a receiver in the meaning "any receiving object". In this case
|
||||||
method shoud also be QMetaMethod(). \a sender parameter should be never 0.
|
method should also be QMetaMethod(). \a sender parameter should be never 0.
|
||||||
|
|
||||||
\sa disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
|
\sa disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
|
||||||
*/
|
*/
|
||||||
|
@ -2728,7 +2728,7 @@ QRectF QPainter::clipBoundingRect() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Accumulate the bounding box in device space. This is not 100%
|
// Accumulate the bounding box in device space. This is not 100%
|
||||||
// precise, but it fits within the guarantee and it is resonably
|
// precise, but it fits within the guarantee and it is reasonably
|
||||||
// fast.
|
// fast.
|
||||||
QRectF bounds;
|
QRectF bounds;
|
||||||
for (int i=0; i<d->state->clipInfo.size(); ++i) {
|
for (int i=0; i<d->state->clipInfo.size(); ++i) {
|
||||||
|
@ -1515,7 +1515,7 @@ void tst_QApplication::testDeleteLaterProcessEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Test for crash whith QApplication::setDesktopSettingsAware(false).
|
Test for crash with QApplication::setDesktopSettingsAware(false).
|
||||||
*/
|
*/
|
||||||
void tst_QApplication::desktopSettingsAware()
|
void tst_QApplication::desktopSettingsAware()
|
||||||
{
|
{
|
||||||
|
@ -644,7 +644,7 @@ void tst_QByteArray::qstrncpy()
|
|||||||
QCOMPARE(QByteArray(::qstrncpy(dst.data(), src.data(), src.size())),
|
QCOMPARE(QByteArray(::qstrncpy(dst.data(), src.data(), src.size())),
|
||||||
QByteArray("Tumdelidu"));
|
QByteArray("Tumdelidu"));
|
||||||
|
|
||||||
// normal copy with length is longer than neccessary
|
// normal copy with length is longer than necessary
|
||||||
src = QByteArray( "Tumdelidum\0foo" );
|
src = QByteArray( "Tumdelidum\0foo" );
|
||||||
dst.resize(128*1024);
|
dst.resize(128*1024);
|
||||||
QCOMPARE(QByteArray(::qstrncpy(dst.data(), src.data(), dst.size())),
|
QCOMPARE(QByteArray(::qstrncpy(dst.data(), src.data(), dst.size())),
|
||||||
|
@ -140,8 +140,8 @@ void tst_QClipboard::modes()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Test that the apropriate signals are emitted when the cliboard
|
Test that the appropriate signals are emitted when the cliboard
|
||||||
contents is changed by calling the qt funcitons.
|
contents is changed by calling the qt functions.
|
||||||
*/
|
*/
|
||||||
void tst_QClipboard::testSignals()
|
void tst_QClipboard::testSignals()
|
||||||
{
|
{
|
||||||
@ -170,7 +170,7 @@ void tst_QClipboard::testSignals()
|
|||||||
|
|
||||||
changedSpy.clear();
|
changedSpy.clear();
|
||||||
|
|
||||||
// Test the selction mode signal.
|
// Test the selection mode signal.
|
||||||
if (clipboard->supportsSelection()) {
|
if (clipboard->supportsSelection()) {
|
||||||
clipboard->setText(text, QClipboard::Selection);
|
clipboard->setText(text, QClipboard::Selection);
|
||||||
QCOMPARE(selectionChangedSpy.count(), 1);
|
QCOMPARE(selectionChangedSpy.count(), 1);
|
||||||
|
@ -360,7 +360,7 @@ void tst_QCommandLinkButton::toggled()
|
|||||||
testWidget->toggle();
|
testWidget->toggle();
|
||||||
QVERIFY( toggle_count == 0 );
|
QVERIFY( toggle_count == 0 );
|
||||||
|
|
||||||
// do it again, just to be shure
|
// do it again, just to be sure
|
||||||
resetCounters();
|
resetCounters();
|
||||||
testWidget->toggle();
|
testWidget->toggle();
|
||||||
QVERIFY( toggle_count == 0 );
|
QVERIFY( toggle_count == 0 );
|
||||||
|
@ -287,7 +287,7 @@ void tst_QEventLoop::onlySymbianActiveScheduler() {
|
|||||||
// In here we try to use timers and sockets exclusively using the Symbian
|
// In here we try to use timers and sockets exclusively using the Symbian
|
||||||
// active scheduler and no processEvents().
|
// active scheduler and no processEvents().
|
||||||
// This test should therefore be run first, so that we can verify that
|
// This test should therefore be run first, so that we can verify that
|
||||||
// the first occurrence of processEvents does not do any initalization that
|
// the first occurrence of processEvents does not do any initialization that
|
||||||
// we depend on.
|
// we depend on.
|
||||||
|
|
||||||
// Open up a pipe so we can test socket notifiers.
|
// Open up a pipe so we can test socket notifiers.
|
||||||
|
@ -1416,7 +1416,7 @@ void tst_QFtp::abort()
|
|||||||
QVERIFY( bytesDone != bytesTotal );
|
QVERIFY( bytesDone != bytesTotal );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// this could be tested by verifying that no more progress signals are emited
|
// this could be tested by verifying that no more progress signals are emitted
|
||||||
QVERIFY(bytesDone <= bytesTotal);
|
QVERIFY(bytesDone <= bytesTotal);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -3054,7 +3054,7 @@ void tst_QGraphicsView::task210599_unsetDragWhileDragging()
|
|||||||
QApplication::sendEvent(view.viewport(), &move);
|
QApplication::sendEvent(view.viewport(), &move);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that no draggin has occured...
|
// Check that no draggin has occurred...
|
||||||
QCOMPARE(basePos, view.mapFromScene(0, 0));
|
QCOMPARE(basePos, view.mapFromScene(0, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2456,7 +2456,7 @@ void tst_QGraphicsWidget::popupMouseGrabber()
|
|||||||
QCOMPARE(widgetUngrabEventSpy.count(), 1);
|
QCOMPARE(widgetUngrabEventSpy.count(), 1);
|
||||||
QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)0);
|
QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)0);
|
||||||
|
|
||||||
// Showing it grabs the mosue again
|
// Showing it grabs the mouse again
|
||||||
widget->show();
|
widget->show();
|
||||||
QCOMPARE(widgetGrabEventSpy.count(), 2);
|
QCOMPARE(widgetGrabEventSpy.count(), 2);
|
||||||
QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)widget);
|
QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)widget);
|
||||||
@ -3175,7 +3175,7 @@ void tst_QGraphicsWidget::initialShow2()
|
|||||||
// Don't let paint events triggered by the windowing system
|
// Don't let paint events triggered by the windowing system
|
||||||
// influence our test case. We're only interested in knowing
|
// influence our test case. We're only interested in knowing
|
||||||
// whether a QGraphicsWidget generates an additional repaint
|
// whether a QGraphicsWidget generates an additional repaint
|
||||||
// on the inital show. Hence create a dummy scenario to find out
|
// on the initial show. Hence create a dummy scenario to find out
|
||||||
// how many repaints we should expect.
|
// how many repaints we should expect.
|
||||||
QGraphicsScene dummyScene(0, 0, 200, 200);
|
QGraphicsScene dummyScene(0, 0, 200, 200);
|
||||||
dummyScene.addItem(new QGraphicsRectItem(0, 0, 100, 100));
|
dummyScene.addItem(new QGraphicsRectItem(0, 0, 100, 100));
|
||||||
|
@ -250,7 +250,7 @@ void tst_QHostInfo::initTestCase()
|
|||||||
|
|
||||||
void tst_QHostInfo::init()
|
void tst_QHostInfo::init()
|
||||||
{
|
{
|
||||||
// delete the cache so inidividual testcase results are independant from each other
|
// delete the cache so inidividual testcase results are independent from each other
|
||||||
qt_qhostinfo_clear_cache();
|
qt_qhostinfo_clear_cache();
|
||||||
|
|
||||||
QFETCH_GLOBAL(bool, cache);
|
QFETCH_GLOBAL(bool, cache);
|
||||||
|
@ -67,7 +67,7 @@ Q_DECLARE_METATYPE(QModelIndex)
|
|||||||
See modelstotest.cpp for instructions on how to have your model tested with these tests.
|
See modelstotest.cpp for instructions on how to have your model tested with these tests.
|
||||||
|
|
||||||
Each test such as rowCount have a _data() function which populate the QTest data with
|
Each test such as rowCount have a _data() function which populate the QTest data with
|
||||||
the tests specified by modelstotest.cpp and any extra data needed for that perticular test.
|
the tests specified by modelstotest.cpp and any extra data needed for that particular test.
|
||||||
|
|
||||||
setupWithNoTestData() fills the QTest data with just the tests and is used by most tests.
|
setupWithNoTestData() fills the QTest data with just the tests and is used by most tests.
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ void tst_QItemModel::nonDestructiveBasicTest_data()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
nonDestructiveBasicTest trys to call a number of the basic functions (not all)
|
nonDestructiveBasicTest tries to call a number of the basic functions (not all)
|
||||||
to make sure the model doesn't segfault, testing the functions that makes sense.
|
to make sure the model doesn't segfault, testing the functions that makes sense.
|
||||||
*/
|
*/
|
||||||
void tst_QItemModel::nonDestructiveBasicTest()
|
void tst_QItemModel::nonDestructiveBasicTest()
|
||||||
@ -516,7 +516,7 @@ void tst_QItemModel::parent()
|
|||||||
QCOMPARE(currentModel->parent(childIndex), topIndex);
|
QCOMPARE(currentModel->parent(childIndex), topIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Common error test #3, the second colum has the same children
|
// Common error test #3, the second column has the same children
|
||||||
// as the first column in a row.
|
// as the first column in a row.
|
||||||
QModelIndex topIndex1 = currentModel->index(0, 1, QModelIndex());
|
QModelIndex topIndex1 = currentModel->index(0, 1, QModelIndex());
|
||||||
if (currentModel->rowCount(topIndex1) > 0) {
|
if (currentModel->rowCount(topIndex1) > 0) {
|
||||||
@ -817,7 +817,7 @@ void tst_QItemModel::remove_data()
|
|||||||
makeTestRow(":valid start, invalid count", MIDDLE, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL);
|
makeTestRow(":valid start, invalid count", MIDDLE, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL);
|
||||||
makeTestRow(":valid start, invalid count", END, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL);
|
makeTestRow(":valid start, invalid count", END, 9999, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL);
|
||||||
|
|
||||||
// Recursive remove's might assert, havn't decided yet...
|
// Recursive remove's might assert, haven't decided yet...
|
||||||
//makeTestRow(":one at the start recursivly", START, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, FAIL);
|
//makeTestRow(":one at the start recursivly", START, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, FAIL);
|
||||||
//makeTestRow(":one at the middle recursivly", MIDDLE, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS);
|
//makeTestRow(":one at the middle recursivly", MIDDLE, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS);
|
||||||
//makeTestRow(":one at the end recursivly", END, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS);
|
//makeTestRow(":one at the end recursivly", END, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS);
|
||||||
@ -849,7 +849,7 @@ void tst_QItemModel::remove()
|
|||||||
QFETCH(bool, shouldSucceed);
|
QFETCH(bool, shouldSucceed);
|
||||||
|
|
||||||
// Populate the test area so we can remove something. See: cleanup()
|
// Populate the test area so we can remove something. See: cleanup()
|
||||||
// parentOfRemoved is stored so that the slots can make sure parentOfRemoved is the index that is emited.
|
// parentOfRemoved is stored so that the slots can make sure parentOfRemoved is the index that is emitted.
|
||||||
parentOfRemoved = testModels->populateTestArea(currentModel);
|
parentOfRemoved = testModels->populateTestArea(currentModel);
|
||||||
|
|
||||||
if (count == -1)
|
if (count == -1)
|
||||||
@ -866,7 +866,7 @@ void tst_QItemModel::remove()
|
|||||||
//qDebug() << "remove start:" << start << "count:" << count << "rowCount:" << currentModel->rowCount(parentOfRemoved);
|
//qDebug() << "remove start:" << start << "count:" << count << "rowCount:" << currentModel->rowCount(parentOfRemoved);
|
||||||
|
|
||||||
// When a row or column is removed there should be two signals.
|
// When a row or column is removed there should be two signals.
|
||||||
// Watch to make sure they are emited and get the row/column count when they do get emited by connecting them to a slot
|
// Watch to make sure they are emitted and get the row/column count when they do get emitted by connecting them to a slot
|
||||||
qRegisterMetaType<QModelIndex>("QModelIndex");
|
qRegisterMetaType<QModelIndex>("QModelIndex");
|
||||||
QSignalSpy columnsAboutToBeRemovedSpy(currentModel, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int )));
|
QSignalSpy columnsAboutToBeRemovedSpy(currentModel, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int )));
|
||||||
QSignalSpy rowsAboutToBeRemovedSpy(currentModel, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int )));
|
QSignalSpy rowsAboutToBeRemovedSpy(currentModel, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int )));
|
||||||
@ -914,7 +914,7 @@ void tst_QItemModel::remove()
|
|||||||
QVERIFY(parentOfRemoved == parent);
|
QVERIFY(parentOfRemoved == parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only the row signals should have been emited
|
// Only the row signals should have been emitted
|
||||||
if (modelResetSpy.count() >= 1 || modelLayoutChangedSpy.count() >=1 ){
|
if (modelResetSpy.count() >= 1 || modelLayoutChangedSpy.count() >=1 ){
|
||||||
QCOMPARE(columnsAboutToBeRemovedSpy.count(), 0);
|
QCOMPARE(columnsAboutToBeRemovedSpy.count(), 0);
|
||||||
QCOMPARE(rowsAboutToBeRemovedSpy.count(), 0);
|
QCOMPARE(rowsAboutToBeRemovedSpy.count(), 0);
|
||||||
@ -928,7 +928,7 @@ void tst_QItemModel::remove()
|
|||||||
QCOMPARE(rowsRemovedSpy.count(), numberOfRowsRemovedSignals);
|
QCOMPARE(rowsRemovedSpy.count(), numberOfRowsRemovedSignals);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The row count should only change *after* rowsAboutToBeRemoved has been emited
|
// The row count should only change *after* rowsAboutToBeRemoved has been emitted
|
||||||
//qDebug() << beforeRemoveRowCount << afterAboutToRemoveRowCount << afterRemoveRowCount << currentModel->rowCount(parentOfRemoved);
|
//qDebug() << beforeRemoveRowCount << afterAboutToRemoveRowCount << afterRemoveRowCount << currentModel->rowCount(parentOfRemoved);
|
||||||
if (shouldSucceed) {
|
if (shouldSucceed) {
|
||||||
if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0){
|
if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0){
|
||||||
@ -978,7 +978,7 @@ void tst_QItemModel::remove()
|
|||||||
QCOMPARE(rowsRemovedSpy.count(), numberOfRowsRemovedSignals);
|
QCOMPARE(rowsRemovedSpy.count(), numberOfRowsRemovedSignals);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The column count should only change *after* rowsAboutToBeRemoved has been emited
|
// The column count should only change *after* rowsAboutToBeRemoved has been emitted
|
||||||
if (shouldSucceed) {
|
if (shouldSucceed) {
|
||||||
if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0){
|
if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0){
|
||||||
QCOMPARE(afterAboutToRemoveColumnCount, beforeRemoveColumnCount);
|
QCOMPARE(afterAboutToRemoveColumnCount, beforeRemoveColumnCount);
|
||||||
@ -1160,7 +1160,7 @@ void tst_QItemModel::insert_data()
|
|||||||
makeTestRow(":valid start, invalid count", MIDDLE, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL);
|
makeTestRow(":valid start, invalid count", MIDDLE, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL);
|
||||||
makeTestRow(":valid start, invalid count", END, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL);
|
makeTestRow(":valid start, invalid count", END, -2, NOSIGNALS, NOSIGNALS, NOSIGNALS, NOSIGNALS, !RECURSIVE, 0, 0, FAIL);
|
||||||
|
|
||||||
// Recursive insert's might assert, havn't decided yet...
|
// Recursive insert's might assert, haven't decided yet...
|
||||||
//makeTestRow(":one at the start recursivly", START, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, FAIL);
|
//makeTestRow(":one at the start recursivly", START, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, FAIL);
|
||||||
//makeTestRow(":one at the middle recursivly", MIDDLE, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS);
|
//makeTestRow(":one at the middle recursivly", MIDDLE, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS);
|
||||||
//makeTestRow(":one at the end recursivly", END, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS);
|
//makeTestRow(":one at the end recursivly", END, DEFAULTCOUNT, 2, DNS, 2, DNS, RECURSIVE, START, DEFAULTCOUNT, SUCCESS);
|
||||||
@ -1191,7 +1191,7 @@ void tst_QItemModel::insert()
|
|||||||
QFETCH(bool, shouldSucceed);
|
QFETCH(bool, shouldSucceed);
|
||||||
|
|
||||||
// Populate the test area so we can insert something. See: cleanup()
|
// Populate the test area so we can insert something. See: cleanup()
|
||||||
// parentOfInserted is stored so that the slots can make sure parentOfInserted is the index that is emited.
|
// parentOfInserted is stored so that the slots can make sure parentOfInserted is the index that is emitted.
|
||||||
parentOfInserted = testModels->populateTestArea(currentModel);
|
parentOfInserted = testModels->populateTestArea(currentModel);
|
||||||
|
|
||||||
if (count == -1)
|
if (count == -1)
|
||||||
@ -1208,7 +1208,7 @@ void tst_QItemModel::insert()
|
|||||||
//qDebug() << "insert start:" << start << "count:" << count << "rowCount:" << currentModel->rowCount(parentOfInserted);
|
//qDebug() << "insert start:" << start << "count:" << count << "rowCount:" << currentModel->rowCount(parentOfInserted);
|
||||||
|
|
||||||
// When a row or column is inserted there should be two signals.
|
// When a row or column is inserted there should be two signals.
|
||||||
// Watch to make sure they are emited and get the row/column count when they do get emited by connecting them to a slot
|
// Watch to make sure they are emitted and get the row/column count when they do get emitted by connecting them to a slot
|
||||||
qRegisterMetaType<QModelIndex>("QModelIndex");
|
qRegisterMetaType<QModelIndex>("QModelIndex");
|
||||||
QSignalSpy columnsAboutToBeInsertedSpy(currentModel, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int )));
|
QSignalSpy columnsAboutToBeInsertedSpy(currentModel, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int )));
|
||||||
QSignalSpy rowsAboutToBeInsertedSpy(currentModel, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int )));
|
QSignalSpy rowsAboutToBeInsertedSpy(currentModel, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int )));
|
||||||
@ -1253,7 +1253,7 @@ void tst_QItemModel::insert()
|
|||||||
QVERIFY(parentOfInserted == parent);
|
QVERIFY(parentOfInserted == parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only the row signals should have been emited
|
// Only the row signals should have been emitted
|
||||||
if (modelResetSpy.count() >= 1 || modelLayoutChangedSpy.count() >= 1) {
|
if (modelResetSpy.count() >= 1 || modelLayoutChangedSpy.count() >= 1) {
|
||||||
QCOMPARE(columnsAboutToBeInsertedSpy.count(), 0);
|
QCOMPARE(columnsAboutToBeInsertedSpy.count(), 0);
|
||||||
QCOMPARE(rowsAboutToBeInsertedSpy.count(), 0);
|
QCOMPARE(rowsAboutToBeInsertedSpy.count(), 0);
|
||||||
@ -1266,7 +1266,7 @@ void tst_QItemModel::insert()
|
|||||||
QCOMPARE(columnsInsertedSpy.count(), 0);
|
QCOMPARE(columnsInsertedSpy.count(), 0);
|
||||||
QCOMPARE(rowsInsertedSpy.count(), numberOfRowsInsertedSignals);
|
QCOMPARE(rowsInsertedSpy.count(), numberOfRowsInsertedSignals);
|
||||||
}
|
}
|
||||||
// The row count should only change *after* rowsAboutToBeInserted has been emited
|
// The row count should only change *after* rowsAboutToBeInserted has been emitted
|
||||||
//qDebug() << beforeInsertRowCount << afterAboutToInsertRowCount << afterInsertRowCount << currentModel->rowCount(parentOfInserted);
|
//qDebug() << beforeInsertRowCount << afterAboutToInsertRowCount << afterInsertRowCount << currentModel->rowCount(parentOfInserted);
|
||||||
if (shouldSucceed) {
|
if (shouldSucceed) {
|
||||||
if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0) {
|
if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0) {
|
||||||
@ -1315,7 +1315,7 @@ void tst_QItemModel::insert()
|
|||||||
QCOMPARE(columnsInsertedSpy.count(), numberOfColumnsInsertedSignals);
|
QCOMPARE(columnsInsertedSpy.count(), numberOfColumnsInsertedSignals);
|
||||||
QCOMPARE(rowsInsertedSpy.count(), numberOfRowsInsertedSignals);
|
QCOMPARE(rowsInsertedSpy.count(), numberOfRowsInsertedSignals);
|
||||||
}
|
}
|
||||||
// The column count should only change *after* rowsAboutToBeInserted has been emited
|
// The column count should only change *after* rowsAboutToBeInserted has been emitted
|
||||||
if (shouldSucceed) {
|
if (shouldSucceed) {
|
||||||
if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0) {
|
if (modelResetSpy.count() == 0 && modelLayoutChangedSpy.count() == 0) {
|
||||||
QCOMPARE(afterAboutToInsertColumnCount, beforeInsertColumnCount);
|
QCOMPARE(afterAboutToInsertColumnCount, beforeInsertColumnCount);
|
||||||
|
@ -86,7 +86,7 @@ bool qt_wince_is_mobile() {
|
|||||||
See viewstotest.cpp for instructions on how to have your view tested with these tests.
|
See viewstotest.cpp for instructions on how to have your view tested with these tests.
|
||||||
|
|
||||||
Each test such as visualRect have a _data() function which populate the QTest data with
|
Each test such as visualRect have a _data() function which populate the QTest data with
|
||||||
tests specified by viewstotest.cpp and any extra data needed for that perticular test.
|
tests specified by viewstotest.cpp and any extra data needed for that particular test.
|
||||||
|
|
||||||
setupWithNoTestData() fills QTest data with only the tests it is used by most tests.
|
setupWithNoTestData() fills QTest data with only the tests it is used by most tests.
|
||||||
|
|
||||||
@ -324,7 +324,7 @@ void tst_QItemView::nonDestructiveBasicTest_data()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
nonDestructiveBasicTest trys to call a number of the basic functions (not all)
|
nonDestructiveBasicTest tries to call a number of the basic functions (not all)
|
||||||
to make sure the view doesn't segfault, testing the functions that makes sense.
|
to make sure the view doesn't segfault, testing the functions that makes sense.
|
||||||
*/
|
*/
|
||||||
void tst_QItemView::nonDestructiveBasicTest()
|
void tst_QItemView::nonDestructiveBasicTest()
|
||||||
|
@ -291,7 +291,7 @@ void tst_QKeySequence::checkMultipleCodes()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We must ensure that the keyBindings data is allways sorted
|
* We must ensure that the keyBindings data is always sorted
|
||||||
* so that we can safely perform binary searches.
|
* so that we can safely perform binary searches.
|
||||||
*/
|
*/
|
||||||
void tst_QKeySequence::ensureSorted()
|
void tst_QKeySequence::ensureSorted()
|
||||||
|
@ -979,7 +979,7 @@ void tst_QListView::selection_data()
|
|||||||
<< IntList(); // expected items
|
<< IntList(); // expected items
|
||||||
|
|
||||||
#if defined(Q_OS_WINCE)
|
#if defined(Q_OS_WINCE)
|
||||||
// depending on wether the display is double-pixeld, we need
|
// depending on whether the display is double-pixeld, we need
|
||||||
// to click at a different position
|
// to click at a different position
|
||||||
bool doubledSize = false;
|
bool doubledSize = false;
|
||||||
int dpi = GetDeviceCaps(GetDC(0), LOGPIXELSX);
|
int dpi = GetDeviceCaps(GetDC(0), LOGPIXELSX);
|
||||||
|
@ -302,7 +302,7 @@ void tst_QMenu::mouseActivation()
|
|||||||
QTest::mouseClick(&menu, Qt::LeftButton, 0, menu.rect().center(), 300);
|
QTest::mouseClick(&menu, Qt::LeftButton, 0, menu.rect().center(), 300);
|
||||||
QVERIFY(!menu.isVisible());
|
QVERIFY(!menu.isVisible());
|
||||||
|
|
||||||
//context menus can allways be accessed with right click except on windows
|
//context menus can always be accessed with right click except on windows
|
||||||
menu.show();
|
menu.show();
|
||||||
QTest::mouseClick(&menu, Qt::RightButton, 0, menu.rect().center(), 300);
|
QTest::mouseClick(&menu, Qt::RightButton, 0, menu.rect().center(), 300);
|
||||||
QVERIFY(!menu.isVisible());
|
QVERIFY(!menu.isVisible());
|
||||||
|
@ -292,7 +292,7 @@ void tst_QPrinterInfo::testForPrinters()
|
|||||||
|
|
||||||
for (int i = 0; i < sysPrinters.size(); ++i) {
|
for (int i = 0; i < sysPrinters.size(); ++i) {
|
||||||
if (!qtPrinters.value(sysPrinters.at(i))) {
|
if (!qtPrinters.value(sysPrinters.at(i))) {
|
||||||
qDebug() << "Avaliable printers: " << qtPrinters;
|
qDebug() << "Available printers: " << qtPrinters;
|
||||||
QFAIL(qPrintable(QString("Printer '%1' reported by system, but not reported by Qt").arg(sysPrinters.at(i))));
|
QFAIL(qPrintable(QString("Printer '%1' reported by system, but not reported by Qt").arg(sysPrinters.at(i))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -382,7 +382,7 @@ void tst_QPushButton::toggled()
|
|||||||
testWidget->toggle();
|
testWidget->toggle();
|
||||||
QVERIFY( toggle_count == 0 );
|
QVERIFY( toggle_count == 0 );
|
||||||
|
|
||||||
// do it again, just to be shure
|
// do it again, just to be sure
|
||||||
resetCounters();
|
resetCounters();
|
||||||
testWidget->toggle();
|
testWidget->toggle();
|
||||||
QVERIFY( toggle_count == 0 );
|
QVERIFY( toggle_count == 0 );
|
||||||
|
@ -1030,7 +1030,7 @@ void tst_QShortcut::context()
|
|||||||
other1->clear();
|
other1->clear();
|
||||||
other2->clear();
|
other2->clear();
|
||||||
|
|
||||||
// edit doens't have focus, so ActiveWindow context should work
|
// edit doesn't have focus, so ActiveWindow context should work
|
||||||
// ..but Focus context shouldn't..
|
// ..but Focus context shouldn't..
|
||||||
// Changing focus to edit should make focus context work
|
// Changing focus to edit should make focus context work
|
||||||
// Application context should always work
|
// Application context should always work
|
||||||
|
@ -218,7 +218,7 @@ void tst_QSqlRelationalTableModel::data()
|
|||||||
QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
|
QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
|
||||||
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
|
QCOMPARE(model.data(model.index(0, 2)).toString(), QString("herr"));
|
||||||
|
|
||||||
//try a non-existant index
|
//try a non-existent index
|
||||||
QVERIFY2(model.data(model.index(0,4)).isValid() == false,"Invalid index returned valid QVariant");
|
QVERIFY2(model.data(model.index(0,4)).isValid() == false,"Invalid index returned valid QVariant");
|
||||||
|
|
||||||
//check data retrieval when relational key is a non-integer type
|
//check data retrieval when relational key is a non-integer type
|
||||||
|
@ -1293,7 +1293,7 @@ void tst_QSqlTableModel::tableModifyWithBlank()
|
|||||||
QCOMPARE(model.rowCount(), 1); //verify only one entry
|
QCOMPARE(model.rowCount(), 1); //verify only one entry
|
||||||
QCOMPARE(model.record(0).value(0).toString(), timeString); //verify correct record
|
QCOMPARE(model.record(0).value(0).toString(), timeString); //verify correct record
|
||||||
|
|
||||||
//At this point we know that the intial value (timestamp) was succsefully stored in the database
|
//At this point we know that the initial value (timestamp) was succsefully stored in the database
|
||||||
//Attempt to modify the data in the new record
|
//Attempt to modify the data in the new record
|
||||||
//equivalent to query.exec("update test set column3="... command in direct test
|
//equivalent to query.exec("update test set column3="... command in direct test
|
||||||
//set the data in the first column to "col1ModelData"
|
//set the data in the first column to "col1ModelData"
|
||||||
|
@ -1992,9 +1992,9 @@ void tst_QSslSocket::writeBigChunk()
|
|||||||
qWarning() << socket->error() << socket->errorString();
|
qWarning() << socket->error() << socket->errorString();
|
||||||
QFAIL("Error while writing! Check if the OpenSSL BIO size is limited?!");
|
QFAIL("Error while writing! Check if the OpenSSL BIO size is limited?!");
|
||||||
}
|
}
|
||||||
// also check the error string. If another error (than UnknownError) occured, it should be different than before
|
// also check the error string. If another error (than UnknownError) occurred, it should be different than before
|
||||||
QVERIFY(errorBefore == errorAfter);
|
QVERIFY(errorBefore == errorAfter);
|
||||||
|
|
||||||
// check that everything has been written to OpenSSL
|
// check that everything has been written to OpenSSL
|
||||||
QVERIFY(socket->bytesToWrite() == 0);
|
QVERIFY(socket->bytesToWrite() == 0);
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ void tst_QTextFormat::resolveFont()
|
|||||||
QVERIFY(fmt.font().underline());
|
QVERIFY(fmt.font().underline());
|
||||||
QVERIFY(!fmt.hasProperty(QTextFormat::FontUnderline));
|
QVERIFY(!fmt.hasProperty(QTextFormat::FontUnderline));
|
||||||
|
|
||||||
// verify that deleting a non-existant property does not affect the font resolving
|
// verify that deleting a non-existent property does not affect the font resolving
|
||||||
|
|
||||||
QVERIFY(!fmt.hasProperty(QTextFormat::BackgroundBrush));
|
QVERIFY(!fmt.hasProperty(QTextFormat::BackgroundBrush));
|
||||||
fmt.clearProperty(QTextFormat::BackgroundBrush);
|
fmt.clearProperty(QTextFormat::BackgroundBrush);
|
||||||
@ -235,7 +235,7 @@ void tst_QTextFormat::resolveFont()
|
|||||||
QVERIFY(!fmt.hasProperty(QTextFormat::FontUnderline));
|
QVERIFY(!fmt.hasProperty(QTextFormat::FontUnderline));
|
||||||
QVERIFY(fmt.font().underline());
|
QVERIFY(fmt.font().underline());
|
||||||
|
|
||||||
// verify that deleting an existant but font _unrelated_ property does not affect the font resolving
|
// verify that deleting an existent but font _unrelated_ property does not affect the font resolving
|
||||||
|
|
||||||
QVERIFY(fmt.hasProperty(QTextFormat::ForegroundBrush));
|
QVERIFY(fmt.hasProperty(QTextFormat::ForegroundBrush));
|
||||||
fmt.clearProperty(QTextFormat::ForegroundBrush);
|
fmt.clearProperty(QTextFormat::ForegroundBrush);
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
systemLock.unlock();
|
systemLock.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
If this is called from two seperate processes the resulting log file is
|
If this is called from two separate processes the resulting log file is
|
||||||
guaranteed to contain both lines.
|
guaranteed to contain both lines.
|
||||||
|
|
||||||
When you call lock(), other threads or processes that try to call lock()
|
When you call lock(), other threads or processes that try to call lock()
|
||||||
|
@ -757,7 +757,7 @@ void tst_QUdpSocket::bindMode()
|
|||||||
// Depending on the user's privileges, this or will succeed or
|
// Depending on the user's privileges, this or will succeed or
|
||||||
// fail. Admins are allowed to reuse the address, but nobody else.
|
// fail. Admins are allowed to reuse the address, but nobody else.
|
||||||
if (!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint), socket2.errorString().toLatin1().constData())
|
if (!socket2.bind(socket.localPort(), QUdpSocket::ReuseAddressHint), socket2.errorString().toLatin1().constData())
|
||||||
qWarning("Failed to bind with QUdpSocket::ReuseAddressHint, user isn't an adminstrator?");
|
qWarning("Failed to bind with QUdpSocket::ReuseAddressHint, user isn't an administrator?");
|
||||||
socket.close();
|
socket.close();
|
||||||
QVERIFY2(socket.bind(0, QUdpSocket::ShareAddress), socket.errorString().toLatin1().constData());
|
QVERIFY2(socket.bind(0, QUdpSocket::ShareAddress), socket.errorString().toLatin1().constData());
|
||||||
QVERIFY(!socket2.bind(socket.localPort()));
|
QVERIFY(!socket2.bind(socket.localPort()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user