normalise signal/slot signatures [QtWidgets tests]
Change-Id: Iffab60f0911a55e4be09faeb29df0bae1ea2eb19 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
0783b1670d
commit
bb73c085a6
@ -196,7 +196,7 @@ void tst_QFiledialog::currentChangedSignal()
|
||||
{
|
||||
QNonNativeFileDialog fd;
|
||||
fd.setViewMode(QFileDialog::List);
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(const QString &)));
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(QString)));
|
||||
|
||||
QListView* listView = qFindChild<QListView*>(&fd, "listView");
|
||||
QVERIFY(listView);
|
||||
@ -224,7 +224,7 @@ void tst_QFiledialog::directoryEnteredSignal()
|
||||
fd.setOptions(QFileDialog::DontUseNativeDialog);
|
||||
fd.show();
|
||||
QTRY_COMPARE(fd.isVisible(), true);
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(const QString &)));
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(QString)));
|
||||
|
||||
// sidebar
|
||||
QSidebar *sidebar = qFindChild<QSidebar*>(&fd, "sidebar");
|
||||
@ -287,7 +287,7 @@ void tst_QFiledialog::filesSelectedSignal()
|
||||
fd.setDirectory(testDir);
|
||||
QFETCH(QFileDialog::FileMode, fileMode);
|
||||
fd.setFileMode(fileMode);
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(const QStringList &)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(QStringList)));
|
||||
|
||||
fd.show();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&fd));
|
||||
@ -327,7 +327,7 @@ void tst_QFiledialog::filterSelectedSignal()
|
||||
QNonNativeFileDialog fd;
|
||||
fd.setAcceptMode(QFileDialog::AcceptSave);
|
||||
fd.show();
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(const QString &)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(QString)));
|
||||
|
||||
QStringList filterChoices;
|
||||
filterChoices << "Image files (*.png *.xpm *.jpg)"
|
||||
@ -368,10 +368,10 @@ void tst_QFiledialog::directory()
|
||||
QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model");
|
||||
QVERIFY(model);
|
||||
fd.setDirectory(QDir::currentPath());
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(const QString &)));
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(const QString &)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(const QStringList &)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(const QString &)));
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(QString)));
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(QString)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(QStringList)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(QString)));
|
||||
|
||||
QCOMPARE(QDir::current().absolutePath(), fd.directory().absolutePath());
|
||||
QDir temp = QDir::temp();
|
||||
@ -559,10 +559,10 @@ void tst_QFiledialog::completer_up()
|
||||
{
|
||||
QNonNativeFileDialog fd;
|
||||
fd.setOptions(QFileDialog::DontUseNativeDialog);
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(const QString &)));
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(const QString &)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(const QStringList &)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(const QString &)));
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(QString)));
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(QString)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(QStringList)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(QString)));
|
||||
|
||||
fd.show();
|
||||
QLineEdit *lineEdit = qFindChild<QLineEdit*>(&fd, "fileNameEdit");
|
||||
@ -649,10 +649,10 @@ void tst_QFiledialog::filters()
|
||||
{
|
||||
QNonNativeFileDialog fd;
|
||||
fd.setOptions(QFileDialog::DontUseNativeDialog);
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(const QString &)));
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(const QString &)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(const QStringList &)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(const QString &)));
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(QString)));
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(QString)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(QStringList)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(QString)));
|
||||
QCOMPARE(fd.nameFilters(), QStringList("All Files (*)"));
|
||||
|
||||
// effects
|
||||
@ -702,7 +702,7 @@ void tst_QFiledialog::filters()
|
||||
void tst_QFiledialog::selectFilter()
|
||||
{
|
||||
QNonNativeFileDialog fd;
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(const QString &)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(QString)));
|
||||
QCOMPARE(fd.selectedNameFilter(), QString("All Files (*)"));
|
||||
QStringList filters;
|
||||
filters << "Image files (*.png *.xpm *.jpg)"
|
||||
@ -728,10 +728,10 @@ void tst_QFiledialog::history()
|
||||
fd.setViewMode(QFileDialog::List);
|
||||
QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model");
|
||||
QVERIFY(model);
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(const QString &)));
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(const QString &)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(const QStringList &)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(const QString &)));
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(QString)));
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(QString)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(QStringList)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(QString)));
|
||||
QCOMPARE(model->index(fd.history().first()), model->index(QDir::toNativeSeparators(fd.directory().absolutePath())));
|
||||
fd.setDirectory(QDir::current().absolutePath());
|
||||
QStringList history;
|
||||
@ -890,10 +890,10 @@ void tst_QFiledialog::selectFiles()
|
||||
QDir dir;
|
||||
QVERIFY(dir.mkpath(tempPath));
|
||||
fd.setDirectory(tempPath);
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(const QString &)));
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(const QString &)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(const QStringList &)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(const QString &)));
|
||||
QSignalSpy spyCurrentChanged(&fd, SIGNAL(currentChanged(QString)));
|
||||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(QString)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(QStringList)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(QString)));
|
||||
fd.show();
|
||||
fd.setFileMode(QFileDialog::ExistingFiles);
|
||||
|
||||
@ -1043,7 +1043,7 @@ void tst_QFiledialog::historyBack()
|
||||
QToolButton *forwardButton = qFindChild<QToolButton*>(&fd, "forwardButton");
|
||||
QVERIFY(forwardButton);
|
||||
|
||||
QSignalSpy spy(model, SIGNAL(rootPathChanged(const QString &)));
|
||||
QSignalSpy spy(model, SIGNAL(rootPathChanged(QString)));
|
||||
|
||||
QString home = fd.directory().absolutePath();
|
||||
QString desktop = QDir::homePath();
|
||||
@ -1091,7 +1091,7 @@ void tst_QFiledialog::historyForward()
|
||||
|
||||
QFileSystemModel *model = qFindChild<QFileSystemModel*>(&fd, "qt_filesystem_model");
|
||||
QVERIFY(model);
|
||||
QSignalSpy spy(model, SIGNAL(rootPathChanged(const QString &)));
|
||||
QSignalSpy spy(model, SIGNAL(rootPathChanged(QString)));
|
||||
|
||||
QString home = fd.directory().absolutePath();
|
||||
QString desktop = QDir::homePath();
|
||||
|
@ -202,7 +202,7 @@ void tst_QFileSystemModel::rootPath()
|
||||
{
|
||||
QCOMPARE(model->rootPath(), QString(QDir().path()));
|
||||
|
||||
QSignalSpy rootChanged(model, SIGNAL(rootPathChanged(const QString &)));
|
||||
QSignalSpy rootChanged(model, SIGNAL(rootPathChanged(QString)));
|
||||
QModelIndex root = model->setRootPath(model->rootPath());
|
||||
root = model->setRootPath("this directory shouldn't exist");
|
||||
QCOMPARE(rootChanged.count(), 0);
|
||||
@ -430,8 +430,8 @@ void tst_QFileSystemModel::rowCount()
|
||||
QString tmp = flatDirTestPath;
|
||||
QVERIFY(createFiles(tmp, QStringList()));
|
||||
|
||||
QSignalSpy spy2(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
|
||||
QSignalSpy spy3(model, SIGNAL(rowsAboutToBeInserted(const QModelIndex &, int, int)));
|
||||
QSignalSpy spy2(model, SIGNAL(rowsInserted(QModelIndex,int,int)));
|
||||
QSignalSpy spy3(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
|
||||
|
||||
#if !defined(Q_OS_WINCE)
|
||||
QStringList files = QStringList() << "b" << "d" << "f" << "h" << "j" << ".a" << ".c" << ".e" << ".g";
|
||||
@ -472,8 +472,8 @@ void tst_QFileSystemModel::rowsInserted()
|
||||
QFETCH(int, count);
|
||||
model->sort(0, (Qt::SortOrder)assending);
|
||||
|
||||
QSignalSpy spy0(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
|
||||
QSignalSpy spy1(model, SIGNAL(rowsAboutToBeInserted(const QModelIndex &, int, int)));
|
||||
QSignalSpy spy0(model, SIGNAL(rowsInserted(QModelIndex,int,int)));
|
||||
QSignalSpy spy1(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
|
||||
int oldCount = model->rowCount(root);
|
||||
QStringList files;
|
||||
for (int i = 0; i < count; ++i)
|
||||
@ -528,8 +528,8 @@ void tst_QFileSystemModel::rowsRemoved()
|
||||
model->sort(0, (Qt::SortOrder)assending);
|
||||
QTest::qWait(WAITTIME);
|
||||
|
||||
QSignalSpy spy0(model, SIGNAL(rowsRemoved(const QModelIndex &, int, int)));
|
||||
QSignalSpy spy1(model, SIGNAL(rowsAboutToBeRemoved(const QModelIndex &, int, int)));
|
||||
QSignalSpy spy0(model, SIGNAL(rowsRemoved(QModelIndex,int,int)));
|
||||
QSignalSpy spy1(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)));
|
||||
int oldCount = model->rowCount(root);
|
||||
for (int i = count - 1; i >= 0; --i) {
|
||||
//qDebug() << "removing" << model->index(i, 0, root).data().toString();
|
||||
@ -588,7 +588,7 @@ void tst_QFileSystemModel::dataChanged()
|
||||
QFETCH(int, assending);
|
||||
model->sort(0, (Qt::SortOrder)assending);
|
||||
|
||||
QSignalSpy spy(model, SIGNAL(dataChanged (const QModelIndex &, const QModelIndex &)));
|
||||
QSignalSpy spy(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
|
||||
QStringList files;
|
||||
for (int i = 0; i < count; ++i)
|
||||
files.append(model->index(i, 0, root).data().toString());
|
||||
@ -763,7 +763,7 @@ void tst_QFileSystemModel::setData_data()
|
||||
|
||||
void tst_QFileSystemModel::setData()
|
||||
{
|
||||
QSignalSpy spy(model, SIGNAL(fileRenamed(const QString&, const QString&, const QString&)));
|
||||
QSignalSpy spy(model, SIGNAL(fileRenamed(QString,QString,QString)));
|
||||
QString tmp = flatDirTestPath;
|
||||
QFETCH(QStringList, files);
|
||||
QFETCH(QString, oldFileName);
|
||||
|
@ -107,7 +107,7 @@ void tst_QSidebar::selectUrls()
|
||||
QSidebar qsidebar;
|
||||
qsidebar.setModelAndUrls(&fsmodel, urls);
|
||||
|
||||
QSignalSpy spy(&qsidebar, SIGNAL(goToUrl(const QUrl &)));
|
||||
QSignalSpy spy(&qsidebar, SIGNAL(goToUrl(QUrl)));
|
||||
qsidebar.selectUrl(urls.at(0));
|
||||
QCOMPARE(spy.count(), 0);
|
||||
}
|
||||
@ -214,7 +214,7 @@ void tst_QSidebar::goToUrl()
|
||||
qsidebar.setModelAndUrls(&fsmodel, urls);
|
||||
qsidebar.show();
|
||||
|
||||
QSignalSpy spy(&qsidebar, SIGNAL(goToUrl(const QUrl &)));
|
||||
QSignalSpy spy(&qsidebar, SIGNAL(goToUrl(QUrl)));
|
||||
QTest::mousePress(qsidebar.viewport(), Qt::LeftButton, 0, qsidebar.visualRect(qsidebar.model()->index(0, 0)).center());
|
||||
QCOMPARE(spy.count(), 1);
|
||||
QCOMPARE((spy.value(0)).at(0).toUrl(), urls.first());
|
||||
|
@ -2768,7 +2768,7 @@ void tst_QGraphicsProxyWidget::windowOpacity()
|
||||
QVERIFY(view.isActiveWindow());
|
||||
|
||||
qRegisterMetaType<QList<QRectF> >("QList<QRectF>");
|
||||
QSignalSpy signalSpy(&scene, SIGNAL(changed(const QList<QRectF> &)));
|
||||
QSignalSpy signalSpy(&scene, SIGNAL(changed(QList<QRectF>)));
|
||||
|
||||
EventSpy eventSpy(widget);
|
||||
QVERIFY(widget->isVisible());
|
||||
|
@ -3655,7 +3655,7 @@ void tst_QGraphicsScene::changedSignal()
|
||||
QFETCH(bool, withView);
|
||||
QGraphicsScene scene;
|
||||
ChangedListener cl;
|
||||
connect(&scene, SIGNAL(changed(const QList<QRectF> &)), &cl, SLOT(changed(const QList<QRectF> &)));
|
||||
connect(&scene, SIGNAL(changed(QList<QRectF>)), &cl, SLOT(changed(QList<QRectF>)));
|
||||
|
||||
QGraphicsView *view = 0;
|
||||
if (withView)
|
||||
@ -4533,7 +4533,7 @@ void tst_QGraphicsScene::zeroScale()
|
||||
QGraphicsView view(&scene);
|
||||
|
||||
ChangedListener cl;
|
||||
connect(&scene, SIGNAL(changed(const QList<QRectF> &)), &cl, SLOT(changed(const QList<QRectF> &)));
|
||||
connect(&scene, SIGNAL(changed(QList<QRectF>)), &cl, SLOT(changed(QList<QRectF>)));
|
||||
|
||||
QGraphicsRectItem *rect1 = new QGraphicsRectItem(0, 0, 0.0000001, 0.00000001);
|
||||
scene.addItem(rect1);
|
||||
|
@ -189,10 +189,10 @@ void tst_QGraphicsSceneIndex::connectedToSceneRectChanged()
|
||||
};
|
||||
|
||||
MyScene scene; // Uses QGraphicsSceneBspTreeIndex by default.
|
||||
QCOMPARE(scene.receivers(SIGNAL(sceneRectChanged(const QRectF&))), 1);
|
||||
QCOMPARE(scene.receivers(SIGNAL(sceneRectChanged(QRectF))), 1);
|
||||
|
||||
scene.setItemIndexMethod(QGraphicsScene::NoIndex); // QGraphicsSceneLinearIndex
|
||||
QCOMPARE(scene.receivers(SIGNAL(sceneRectChanged(const QRectF&))), 1);
|
||||
QCOMPARE(scene.receivers(SIGNAL(sceneRectChanged(QRectF))), 1);
|
||||
}
|
||||
|
||||
void tst_QGraphicsSceneIndex::items()
|
||||
|
@ -3157,9 +3157,9 @@ void tst_QGraphicsView::task239729_noViewUpdate()
|
||||
|
||||
if (a) {
|
||||
view = new QGraphicsView(&scene);
|
||||
connect(&scene, SIGNAL(changed(const QList<QRectF> &)), &cl, SLOT(changed(const QList<QRectF> &)));
|
||||
connect(&scene, SIGNAL(changed(QList<QRectF>)), &cl, SLOT(changed(QList<QRectF>)));
|
||||
} else {
|
||||
connect(&scene, SIGNAL(changed(const QList<QRectF> &)), &cl, SLOT(changed(const QList<QRectF> &)));
|
||||
connect(&scene, SIGNAL(changed(QList<QRectF>)), &cl, SLOT(changed(QList<QRectF>)));
|
||||
view = new QGraphicsView(&scene);
|
||||
}
|
||||
|
||||
|
@ -589,7 +589,7 @@ void tst_QColumnView::clicked()
|
||||
QVERIFY(parent.isValid());
|
||||
|
||||
qRegisterMetaType<QModelIndex>("QModelIndex");
|
||||
QSignalSpy clickedSpy(&view, SIGNAL(clicked(const QModelIndex &)));
|
||||
QSignalSpy clickedSpy(&view, SIGNAL(clicked(QModelIndex)));
|
||||
|
||||
QPoint localPoint = view.visualRect(home).center();
|
||||
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, localPoint);
|
||||
@ -829,7 +829,7 @@ void tst_QColumnView::swapPreview()
|
||||
QStringListModel model(sl);
|
||||
view.setModel(&model);
|
||||
view.setCurrentIndex(view.indexAt(QPoint(1, 1)));
|
||||
connect(&view, SIGNAL(updatePreviewWidget(const QModelIndex &)),
|
||||
connect(&view, SIGNAL(updatePreviewWidget(QModelIndex)),
|
||||
this, SLOT(setPreviewWidget()));
|
||||
view.setCurrentIndex(view.indexAt(QPoint(1, 1)));
|
||||
QTest::qWait(ANIMATION_DELAY);
|
||||
|
@ -416,7 +416,7 @@ void tst_QHeaderView::init()
|
||||
}
|
||||
*/
|
||||
|
||||
QSignalSpy spy(view, SIGNAL(sectionCountChanged(int, int)));
|
||||
QSignalSpy spy(view, SIGNAL(sectionCountChanged(int,int)));
|
||||
view->setModel(model);
|
||||
QCOMPARE(spy.count(), 1);
|
||||
view->resize(200,200);
|
||||
@ -846,7 +846,7 @@ void tst_QHeaderView::swapSections()
|
||||
|
||||
QVector<int> logical = (QVector<int>() << 0 << 1 << 2 << 3);
|
||||
|
||||
QSignalSpy spy1(view, SIGNAL(sectionMoved(int, int, int)));
|
||||
QSignalSpy spy1(view, SIGNAL(sectionMoved(int,int,int)));
|
||||
|
||||
QCOMPARE(view->sectionsMoved(), false);
|
||||
view->swapSections(1, 1);
|
||||
@ -914,7 +914,7 @@ void tst_QHeaderView::moveSection()
|
||||
QVERIFY(from.count() == moved.count());
|
||||
QVERIFY(view->count() == logical.count());
|
||||
|
||||
QSignalSpy spy1(view, SIGNAL(sectionMoved(int, int, int)));
|
||||
QSignalSpy spy1(view, SIGNAL(sectionMoved(int,int,int)));
|
||||
QCOMPARE(view->sectionsMoved(), false);
|
||||
|
||||
for (int h = 0; h < hidden.count(); ++h)
|
||||
@ -1227,7 +1227,7 @@ void tst_QHeaderView::resizeSection()
|
||||
for (int j = 0; j < logical.count(); ++j)
|
||||
view->resizeSection(logical.at(j), initial);
|
||||
|
||||
QSignalSpy spy(view, SIGNAL(sectionResized(int, int, int)));
|
||||
QSignalSpy spy(view, SIGNAL(sectionResized(int,int,int)));
|
||||
|
||||
for (int k = 0; k < logical.count(); ++k)
|
||||
view->resizeSection(logical.at(k), size.at(k));
|
||||
|
@ -702,7 +702,7 @@ void tst_QItemDelegate::eventFilter()
|
||||
|
||||
qRegisterMetaType<QAbstractItemDelegate::EndEditHint>("QAbstractItemDelegate::EndEditHint");
|
||||
|
||||
QSignalSpy commitDataSpy(&delegate, SIGNAL(commitData(QWidget *)));
|
||||
QSignalSpy commitDataSpy(&delegate, SIGNAL(commitData(QWidget*)));
|
||||
QSignalSpy closeEditorSpy(&delegate,
|
||||
SIGNAL(closeEditor(QWidget *,
|
||||
QAbstractItemDelegate::EndEditHint)));
|
||||
|
@ -657,7 +657,7 @@ void tst_QListView::clicked()
|
||||
QModelIndex index = view.indexAt(p);
|
||||
if (!index.isValid())
|
||||
continue;
|
||||
QSignalSpy spy(&view, SIGNAL(clicked(const QModelIndex&)));
|
||||
QSignalSpy spy(&view, SIGNAL(clicked(QModelIndex)));
|
||||
QTest::mouseClick(view.viewport(), Qt::LeftButton, Qt::NoModifier, p);
|
||||
QCOMPARE(spy.count(), 1);
|
||||
}
|
||||
@ -1568,7 +1568,7 @@ void tst_QListView::task228566_infiniteRelayout()
|
||||
view.show();
|
||||
QTest::qWait(100); //make sure the layout is done once
|
||||
|
||||
QSignalSpy spy(view.horizontalScrollBar(), SIGNAL(rangeChanged(int, int)));
|
||||
QSignalSpy spy(view.horizontalScrollBar(), SIGNAL(rangeChanged(int,int)));
|
||||
|
||||
QTest::qWait(200);
|
||||
//the layout should already have been done
|
||||
|
@ -182,23 +182,23 @@ void tst_QListWidget::initTestCase()
|
||||
testWidget = new QListWidget();
|
||||
testWidget->show();
|
||||
|
||||
connect(testWidget->model(), SIGNAL(rowsAboutToBeInserted(QModelIndex, int, int)),
|
||||
this, SLOT(rowsAboutToBeInserted(QModelIndex, int, int)));
|
||||
connect(testWidget->model(), SIGNAL(rowsInserted(QModelIndex, int, int)),
|
||||
this, SLOT(rowsInserted(QModelIndex, int, int)));
|
||||
connect(testWidget->model(), SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(rowsAboutToBeRemoved(QModelIndex, int, int)));
|
||||
connect(testWidget->model(), SIGNAL(rowsRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(rowsRemoved(QModelIndex, int, int)));
|
||||
connect(testWidget->model(), SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
|
||||
this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)));
|
||||
connect(testWidget->model(), SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(rowsInserted(QModelIndex,int,int)));
|
||||
connect(testWidget->model(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
|
||||
connect(testWidget->model(), SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(rowsRemoved(QModelIndex,int,int)));
|
||||
|
||||
connect(testWidget->model(), SIGNAL(columnsAboutToBeInserted(QModelIndex, int, int)),
|
||||
this, SLOT(columnsAboutToBeInserted(QModelIndex, int, int)));
|
||||
connect(testWidget->model(), SIGNAL(columnsInserted(QModelIndex, int, int)),
|
||||
this, SLOT(columnsInserted(QModelIndex, int, int)));
|
||||
connect(testWidget->model(), SIGNAL(columnsAboutToBeRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(columnsAboutToBeRemoved(QModelIndex, int, int)));
|
||||
connect(testWidget->model(), SIGNAL(columnsRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(columnsRemoved(QModelIndex, int, int)));
|
||||
connect(testWidget->model(), SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)),
|
||||
this, SLOT(columnsAboutToBeInserted(QModelIndex,int,int)));
|
||||
connect(testWidget->model(), SIGNAL(columnsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(columnsInserted(QModelIndex,int,int)));
|
||||
connect(testWidget->model(), SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(columnsAboutToBeRemoved(QModelIndex,int,int)));
|
||||
connect(testWidget->model(), SIGNAL(columnsRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(columnsRemoved(QModelIndex,int,int)));
|
||||
|
||||
checkDefaultValues();
|
||||
}
|
||||
@ -1187,8 +1187,8 @@ void tst_QListWidget::setData()
|
||||
testWidget->insertItems(0, initialItems);
|
||||
QCOMPARE(testWidget->count(), initialItems.count());
|
||||
|
||||
QSignalSpy itemChanged(testWidget, SIGNAL(itemChanged(QListWidgetItem *)));
|
||||
QSignalSpy dataChanged(testWidget->model(), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)));
|
||||
QSignalSpy itemChanged(testWidget, SIGNAL(itemChanged(QListWidgetItem*)));
|
||||
QSignalSpy dataChanged(testWidget->model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)));
|
||||
|
||||
for (int i=0; i < roles.count(); ++i) {
|
||||
if (manipulateModel)
|
||||
@ -1454,7 +1454,7 @@ void tst_QListWidget::changeDataWithSorting()
|
||||
for (int j = 0; j < model->rowCount(QModelIndex()); ++j)
|
||||
persistent << model->index(j, 0, QModelIndex());
|
||||
|
||||
QSignalSpy dataChangedSpy(model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)));
|
||||
QSignalSpy dataChangedSpy(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
|
||||
QSignalSpy layoutChangedSpy(model, SIGNAL(layoutChanged()));
|
||||
|
||||
QListWidgetItem *item = w.item(itemIndex);
|
||||
@ -1569,7 +1569,7 @@ void tst_QListWidget::task199503_crashWhenCleared()
|
||||
QListWidget w;
|
||||
w.addItems( QStringList() << "item1" << "item2" << "item3");
|
||||
w.setCurrentRow(0);
|
||||
w.connect(&w, SIGNAL(currentItemChanged(QListWidgetItem *,QListWidgetItem*)), SLOT(clear()));
|
||||
w.connect(&w, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), SLOT(clear()));
|
||||
w.setCurrentRow(1);
|
||||
}
|
||||
|
||||
@ -1630,7 +1630,7 @@ void tst_QListWidget::QTBUG8086_currentItemChangedOnClick()
|
||||
edit.setFocus();
|
||||
win.show();
|
||||
|
||||
QSignalSpy spy(&list, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)));
|
||||
QSignalSpy spy(&list, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)));
|
||||
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&win));
|
||||
|
||||
|
@ -2028,7 +2028,7 @@ void tst_QTableView::resizeRowsToContents()
|
||||
|
||||
delegate.hint = QSize(cellWidth, cellHeight);
|
||||
|
||||
QSignalSpy resizedSpy(view.verticalHeader(), SIGNAL(sectionResized(int, int, int)));
|
||||
QSignalSpy resizedSpy(view.verticalHeader(), SIGNAL(sectionResized(int,int,int)));
|
||||
view.resizeRowsToContents();
|
||||
|
||||
QCOMPARE(resizedSpy.count(), model.rowCount());
|
||||
@ -2075,7 +2075,7 @@ void tst_QTableView::resizeColumnsToContents()
|
||||
|
||||
delegate.hint = QSize(cellWidth, cellHeight);
|
||||
|
||||
QSignalSpy resizedSpy(view.horizontalHeader(), SIGNAL(sectionResized(int, int, int)));
|
||||
QSignalSpy resizedSpy(view.horizontalHeader(), SIGNAL(sectionResized(int,int,int)));
|
||||
view.resizeColumnsToContents();
|
||||
|
||||
QCOMPARE(resizedSpy.count(), model.columnCount());
|
||||
@ -3981,7 +3981,7 @@ Q_OBJECT
|
||||
public:
|
||||
TestTableView(QWidget *parent = 0) : QTableView(parent)
|
||||
{
|
||||
connect(this, SIGNAL(entered(const QModelIndex&)), this, SLOT(openEditor(const QModelIndex&)));
|
||||
connect(this, SIGNAL(entered(QModelIndex)), this, SLOT(openEditor(QModelIndex)));
|
||||
}
|
||||
~TestTableView(){}
|
||||
public slots:
|
||||
|
@ -1334,7 +1334,7 @@ void tst_QTableWidget::setItemWithSorting()
|
||||
w.sortItems(sortColumn, static_cast<Qt::SortOrder>(sortOrder));
|
||||
w.setSortingEnabled(true);
|
||||
|
||||
QSignalSpy dataChangedSpy(model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)));
|
||||
QSignalSpy dataChangedSpy(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
|
||||
QSignalSpy layoutChangedSpy(model, SIGNAL(layoutChanged()));
|
||||
|
||||
if (i == 0) {
|
||||
|
@ -1428,8 +1428,8 @@ void tst_QTreeView::expandAndCollapse()
|
||||
QModelIndex a = model.index(0, 0, QModelIndex());
|
||||
QModelIndex b = model.index(0, 0, a);
|
||||
|
||||
QSignalSpy expandedSpy(&view, SIGNAL(expanded(const QModelIndex&)));
|
||||
QSignalSpy collapsedSpy(&view, SIGNAL(collapsed(const QModelIndex&)));
|
||||
QSignalSpy expandedSpy(&view, SIGNAL(expanded(QModelIndex)));
|
||||
QSignalSpy collapsedSpy(&view, SIGNAL(collapsed(QModelIndex)));
|
||||
QVariantList args;
|
||||
|
||||
for (int y = 0; y < 2; ++y) {
|
||||
@ -1552,8 +1552,8 @@ void tst_QTreeView::expandAndCollapseAll()
|
||||
view.setUniformRowHeights(true);
|
||||
view.setModel(&model);
|
||||
|
||||
QSignalSpy expandedSpy(&view, SIGNAL(expanded(const QModelIndex&)));
|
||||
QSignalSpy collapsedSpy(&view, SIGNAL(collapsed(const QModelIndex&)));
|
||||
QSignalSpy expandedSpy(&view, SIGNAL(expanded(QModelIndex)));
|
||||
QSignalSpy collapsedSpy(&view, SIGNAL(collapsed(QModelIndex)));
|
||||
|
||||
view.expandAll();
|
||||
view.show();
|
||||
@ -1982,7 +1982,7 @@ void tst_QTreeView::clicked()
|
||||
QModelIndex index = view.indexAt(p);
|
||||
if (!index.isValid())
|
||||
continue;
|
||||
QSignalSpy spy(&view, SIGNAL(clicked(const QModelIndex&)));
|
||||
QSignalSpy spy(&view, SIGNAL(clicked(QModelIndex)));
|
||||
QTest::mouseClick(view.viewport(), Qt::LeftButton, Qt::NoModifier, p);
|
||||
QTRY_COMPARE(spy.count(), 1);
|
||||
}
|
||||
@ -2329,7 +2329,7 @@ void tst_QTreeView::selection()
|
||||
treeView.setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
treeView.setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
|
||||
connect(treeView.selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
|
||||
connect(treeView.selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
||||
this, SLOT(selectionOrderTest()));
|
||||
|
||||
treeView.show();
|
||||
@ -3756,7 +3756,7 @@ public slots:
|
||||
//let's select the last item
|
||||
QModelIndex idx = model()->index(0, 0);
|
||||
selectionModel()->select(QItemSelection(idx, idx), QItemSelectionModel::Select);
|
||||
disconnect(selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(handleSelectionChanged()));
|
||||
disconnect(selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SLOT(handleSelectionChanged()));
|
||||
}
|
||||
};
|
||||
|
||||
@ -3769,7 +3769,7 @@ void tst_QTreeView::task248022_changeSelection()
|
||||
QStringListModel model(list);
|
||||
view.setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
view.setModel(&model);
|
||||
view.connect(view.selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), SLOT(handleSelectionChanged()));
|
||||
view.connect(view.selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(handleSelectionChanged()));
|
||||
QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, view.visualRect(model.index(1)).center());
|
||||
QCOMPARE(view.selectionModel()->selectedIndexes().count(), list.count());
|
||||
}
|
||||
@ -3935,8 +3935,8 @@ public:
|
||||
// set up the model to have two top level items and a few others
|
||||
m_selectionModel = new QItemSelectionModel(this, this); // owned by this
|
||||
|
||||
connect(m_selectionModel, SIGNAL(currentChanged(const QModelIndex &,const QModelIndex &)),
|
||||
this, SLOT(slotCurrentChanged(const QModelIndex &,const QModelIndex &)));
|
||||
connect(m_selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
|
||||
this, SLOT(slotCurrentChanged(QModelIndex,QModelIndex)));
|
||||
};
|
||||
|
||||
int rowCount(const QModelIndex &parent) const
|
||||
|
@ -383,7 +383,7 @@ void tst_QTreeWidget::currentItem()
|
||||
tree.setSelectionBehavior(x ? QAbstractItemView::SelectItems
|
||||
: QAbstractItemView::SelectRows);
|
||||
QSignalSpy currentItemChangedSpy(
|
||||
&tree, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)));
|
||||
&tree, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)));
|
||||
QSignalSpy itemSelectionChangedSpy(
|
||||
&tree, SIGNAL(itemSelectionChanged()));
|
||||
|
||||
@ -1719,9 +1719,9 @@ void tst_QTreeWidget::setData()
|
||||
testWidget->setHeaderItem(headerItem);
|
||||
|
||||
QSignalSpy headerDataChangedSpy(
|
||||
testWidget->model(), SIGNAL(headerDataChanged(Qt::Orientation, int, int)));
|
||||
testWidget->model(), SIGNAL(headerDataChanged(Qt::Orientation,int,int)));
|
||||
QSignalSpy dataChangedSpy(
|
||||
testWidget->model(), SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)));
|
||||
testWidget->model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)));
|
||||
QSignalSpy itemChangedSpy(
|
||||
testWidget, SIGNAL(itemChanged(QTreeWidgetItem*,int)));
|
||||
headerItem->setText(0, "test");
|
||||
@ -2403,7 +2403,7 @@ void tst_QTreeWidget::changeDataWithSorting()
|
||||
for (int j = 0; j < model->rowCount(QModelIndex()); ++j)
|
||||
persistent << model->index(j, 0, QModelIndex());
|
||||
|
||||
QSignalSpy dataChangedSpy(model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)));
|
||||
QSignalSpy dataChangedSpy(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
|
||||
QSignalSpy layoutChangedSpy(model, SIGNAL(layoutChanged()));
|
||||
|
||||
QTreeWidgetItem *item = w.topLevelItem(itemIndex);
|
||||
@ -2579,7 +2579,7 @@ void tst_QTreeWidget::changeDataWithStableSorting()
|
||||
for (int j = 0; j < model->rowCount(QModelIndex()); ++j)
|
||||
persistent << model->index(j, 0, QModelIndex());
|
||||
|
||||
QSignalSpy dataChangedSpy(model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)));
|
||||
QSignalSpy dataChangedSpy(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
|
||||
QSignalSpy layoutChangedSpy(model, SIGNAL(layoutChanged()));
|
||||
|
||||
StableItem *item = static_cast<StableItem *>(w.topLevelItem(itemIndex));
|
||||
@ -2675,8 +2675,8 @@ void tst_QTreeWidget::expandAndCallapse()
|
||||
for (int j = 0; j < 10; ++j)
|
||||
new QTreeWidgetItem(p, QStringList() << QString("%1").arg(j));
|
||||
}
|
||||
QSignalSpy spy0(&tw, SIGNAL(itemExpanded(QTreeWidgetItem *)));
|
||||
QSignalSpy spy1(&tw, SIGNAL(itemCollapsed(QTreeWidgetItem *)));
|
||||
QSignalSpy spy0(&tw, SIGNAL(itemExpanded(QTreeWidgetItem*)));
|
||||
QSignalSpy spy1(&tw, SIGNAL(itemCollapsed(QTreeWidgetItem*)));
|
||||
|
||||
|
||||
tw.expandItem(p);
|
||||
@ -3183,7 +3183,7 @@ void tst_QTreeWidget::emitDataChanged()
|
||||
{
|
||||
|
||||
QTreeWidget *tree = new QTreeWidget;
|
||||
QSignalSpy spy(tree, SIGNAL(itemChanged(QTreeWidgetItem *, int)));
|
||||
QSignalSpy spy(tree, SIGNAL(itemChanged(QTreeWidgetItem*,int)));
|
||||
TreeWidgetItem *item = new TreeWidgetItem();
|
||||
tree->insertTopLevelItem(0, item);
|
||||
item->_emitDataChanged();
|
||||
|
@ -369,7 +369,7 @@ void tst_QAction::task229128TriggeredSignalWhenInActiongroup()
|
||||
checkedAction->setChecked(true);
|
||||
|
||||
QSignalSpy actionSpy(checkedAction, SIGNAL(triggered(bool)));
|
||||
QSignalSpy actionGroupSpy(&ag, SIGNAL(triggered(QAction *)));
|
||||
QSignalSpy actionGroupSpy(&ag, SIGNAL(triggered(QAction*)));
|
||||
QCOMPARE(actionGroupSpy.count(), 0);
|
||||
QCOMPARE(actionSpy.count(), 0);
|
||||
checkedAction->trigger();
|
||||
|
@ -1513,7 +1513,7 @@ void tst_QApplication::focusChanged()
|
||||
int argc = 0;
|
||||
QApplication app(argc, 0, QApplication::GuiServer);
|
||||
|
||||
QSignalSpy spy(&app, SIGNAL(focusChanged(QWidget *, QWidget *)));
|
||||
QSignalSpy spy(&app, SIGNAL(focusChanged(QWidget*,QWidget*)));
|
||||
QWidget *now = 0;
|
||||
QWidget *old = 0;
|
||||
|
||||
|
@ -218,8 +218,8 @@ void tst_QShortcut::initTestCase()
|
||||
mainW->show();
|
||||
mainW->activateWindow();
|
||||
QVERIFY(QTest::qWaitForWindowActive(mainW));
|
||||
connect( mainW->statusBar(), SIGNAL(messageChanged(const QString&)),
|
||||
this, SLOT(statusMessage(const QString&)) );
|
||||
connect( mainW->statusBar(), SIGNAL(messageChanged(QString)),
|
||||
this, SLOT(statusMessage(QString)) );
|
||||
}
|
||||
|
||||
void tst_QShortcut::cleanupTestCase()
|
||||
|
@ -4311,7 +4311,7 @@ void tst_QWidget::qobject_castInDestroyedSlot()
|
||||
|
||||
QWidget *widget = new QWidget();
|
||||
|
||||
QObject::connect(widget, SIGNAL(destroyed(QObject *)), &checker, SLOT(destroyedSlot(QObject *)));
|
||||
QObject::connect(widget, SIGNAL(destroyed(QObject*)), &checker, SLOT(destroyedSlot(QObject*)));
|
||||
delete widget;
|
||||
|
||||
QVERIFY(checker.wasQWidget == true);
|
||||
@ -8757,7 +8757,7 @@ class MyEvilObject : public QObject
|
||||
public:
|
||||
MyEvilObject(QWidget *widgetToCrash) : QObject(), widget(widgetToCrash)
|
||||
{
|
||||
connect(widget, SIGNAL(destroyed(QObject *)), this, SLOT(beEvil(QObject *)));
|
||||
connect(widget, SIGNAL(destroyed(QObject*)), this, SLOT(beEvil(QObject*)));
|
||||
delete widget;
|
||||
}
|
||||
QWidget *widget;
|
||||
|
@ -1184,7 +1184,7 @@ void tst_QCompleter::disabledItems()
|
||||
model->appendRow(suggestions);
|
||||
model->appendRow(new QStandardItem("suggestions Enabled"));
|
||||
QCompleter *completer = new QCompleter(model, &lineEdit);
|
||||
QSignalSpy spy(completer, SIGNAL(activated(const QString &)));
|
||||
QSignalSpy spy(completer, SIGNAL(activated(QString)));
|
||||
lineEdit.setCompleter(completer);
|
||||
lineEdit.show();
|
||||
|
||||
@ -1207,7 +1207,7 @@ void tst_QCompleter::task178797_activatedOnReturn()
|
||||
QLineEdit *ledit = new QLineEdit;
|
||||
QCompleter *completer = new QCompleter(words);
|
||||
ledit->setCompleter(completer);
|
||||
QSignalSpy spy(completer, SIGNAL(activated(const QString)));
|
||||
QSignalSpy spy(completer, SIGNAL(activated(QString)));
|
||||
QCOMPARE(spy.count(), 0);
|
||||
ledit->show();
|
||||
QTest::keyClick(ledit, Qt::Key_F);
|
||||
|
@ -1130,7 +1130,7 @@ void tst_QAbstractSlider::rangeChanged()
|
||||
QFETCH(int, expectedCount);
|
||||
QSlider slider;
|
||||
slider.setRange(minimum, maximum);
|
||||
QSignalSpy spy(&slider, SIGNAL(rangeChanged(int, int)));
|
||||
QSignalSpy spy(&slider, SIGNAL(rangeChanged(int,int)));
|
||||
slider.setRange(newMin, newMax);
|
||||
QCOMPARE(spy.count(), expectedCount);
|
||||
}
|
||||
@ -1263,7 +1263,7 @@ void tst_QAbstractSlider::setRepeatAction()
|
||||
void tst_QAbstractSlider::connectedSliders()
|
||||
{
|
||||
Slider *slider2 = new Slider(topLevel);
|
||||
connect(slider, SIGNAL(rangeChanged(int, int)), slider2, SLOT(setRange(int, int)));
|
||||
connect(slider, SIGNAL(rangeChanged(int,int)), slider2, SLOT(setRange(int,int)));
|
||||
const int sliderlow = 13;
|
||||
const int sliderhigh = 1017;
|
||||
slider->setRange(sliderlow, sliderhigh);
|
||||
|
@ -317,11 +317,11 @@ void tst_QButtonGroup::testSignals()
|
||||
buttons.addButton(&pb3);
|
||||
|
||||
qRegisterMetaType<QAbstractButton *>("QAbstractButton *");
|
||||
QSignalSpy clickedSpy(&buttons, SIGNAL(buttonClicked(QAbstractButton *)));
|
||||
QSignalSpy clickedSpy(&buttons, SIGNAL(buttonClicked(QAbstractButton*)));
|
||||
QSignalSpy clickedIdSpy(&buttons, SIGNAL(buttonClicked(int)));
|
||||
QSignalSpy pressedSpy(&buttons, SIGNAL(buttonPressed(QAbstractButton *)));
|
||||
QSignalSpy pressedSpy(&buttons, SIGNAL(buttonPressed(QAbstractButton*)));
|
||||
QSignalSpy pressedIdSpy(&buttons, SIGNAL(buttonPressed(int)));
|
||||
QSignalSpy releasedSpy(&buttons, SIGNAL(buttonReleased(QAbstractButton *)));
|
||||
QSignalSpy releasedSpy(&buttons, SIGNAL(buttonReleased(QAbstractButton*)));
|
||||
QSignalSpy releasedIdSpy(&buttons, SIGNAL(buttonReleased(int)));
|
||||
|
||||
pb1.animateClick();
|
||||
@ -480,7 +480,7 @@ void tst_QButtonGroup::task209485_removeFromGroupInEventHandler()
|
||||
|
||||
task209485_ButtonDeleter buttonDeleter(&group, deleteButton);
|
||||
|
||||
QSignalSpy spy1(&group, SIGNAL(buttonClicked(QAbstractButton *)));
|
||||
QSignalSpy spy1(&group, SIGNAL(buttonClicked(QAbstractButton*)));
|
||||
QSignalSpy spy2(&group, SIGNAL(buttonClicked(int)));
|
||||
|
||||
// NOTE: Reintroducing the bug of this task will cause the following line to crash:
|
||||
|
@ -1121,7 +1121,7 @@ void tst_QComboBox::currentIndex()
|
||||
|
||||
// spy on currentIndexChanged
|
||||
QSignalSpy indexChangedInt(testWidget, SIGNAL(currentIndexChanged(int)));
|
||||
QSignalSpy indexChangedString(testWidget, SIGNAL(currentIndexChanged(const QString&)));
|
||||
QSignalSpy indexChangedString(testWidget, SIGNAL(currentIndexChanged(QString)));
|
||||
|
||||
// stuff items into it
|
||||
foreach(QString text, initialItems) {
|
||||
@ -2120,7 +2120,7 @@ void tst_QComboBox::task247863_keyBoardSelection()
|
||||
QApplication::setActiveWindow(&combo);
|
||||
QTRY_COMPARE(QApplication::activeWindow(), static_cast<QWidget *>(&combo));
|
||||
|
||||
QSignalSpy spy(&combo, SIGNAL(activated(const QString &)));
|
||||
QSignalSpy spy(&combo, SIGNAL(activated(QString)));
|
||||
qApp->setEffectEnabled(Qt::UI_AnimateCombo, false);
|
||||
QTest::keyClick(&combo, Qt::Key_Space);
|
||||
qApp->setEffectEnabled(Qt::UI_AnimateCombo, true);
|
||||
|
@ -1068,7 +1068,7 @@ void tst_QDateTimeEdit::enterKey()
|
||||
// causes the dateChanged() signal to be emitted, even if the date
|
||||
// wasn't actually changed. While this behaviour is questionable,
|
||||
// we include this test so a change to the behaviour can't go unnoticed.
|
||||
QSignalSpy enterSpy(testWidget, SIGNAL(dateChanged(const QDate &)));
|
||||
QSignalSpy enterSpy(testWidget, SIGNAL(dateChanged(QDate)));
|
||||
QTest::keyClick(testWidget, Qt::Key_Enter);
|
||||
QCOMPARE(enterSpy.count(), 1);
|
||||
QVariantList list = enterSpy.takeFirst();
|
||||
@ -2028,9 +2028,9 @@ void tst_QDateTimeEdit::dateSignalChecking()
|
||||
|
||||
testWidget->setDate(originalDate);
|
||||
|
||||
QSignalSpy dateSpy(testWidget, SIGNAL(dateChanged(const QDate &)));
|
||||
QSignalSpy dateTimeSpy(testWidget, SIGNAL(dateTimeChanged(const QDateTime &)));
|
||||
QSignalSpy timeSpy(testWidget, SIGNAL(timeChanged(const QTime &)));
|
||||
QSignalSpy dateSpy(testWidget, SIGNAL(dateChanged(QDate)));
|
||||
QSignalSpy dateTimeSpy(testWidget, SIGNAL(dateTimeChanged(QDateTime)));
|
||||
QSignalSpy timeSpy(testWidget, SIGNAL(timeChanged(QTime)));
|
||||
|
||||
testWidget->setDate(newDate);
|
||||
QCOMPARE(dateSpy.count(), timesEmitted);
|
||||
@ -2064,9 +2064,9 @@ void tst_QDateTimeEdit::timeSignalChecking()
|
||||
testWidget->setTime(originalTime);
|
||||
|
||||
testWidget->setDisplayFormat("hh:mm:ss");
|
||||
QSignalSpy dateSpy(testWidget, SIGNAL(dateChanged(const QDate &)));
|
||||
QSignalSpy dateTimeSpy(testWidget, SIGNAL(dateTimeChanged(const QDateTime &)));
|
||||
QSignalSpy timeSpy(testWidget, SIGNAL(timeChanged(const QTime &)));
|
||||
QSignalSpy dateSpy(testWidget, SIGNAL(dateChanged(QDate)));
|
||||
QSignalSpy dateTimeSpy(testWidget, SIGNAL(dateTimeChanged(QDateTime)));
|
||||
QSignalSpy timeSpy(testWidget, SIGNAL(timeChanged(QTime)));
|
||||
|
||||
testWidget->setTime(newTime);
|
||||
QCOMPARE(timeSpy.count(), timesEmitted);
|
||||
@ -2114,9 +2114,9 @@ void tst_QDateTimeEdit::dateTimeSignalChecking()
|
||||
testWidget->setDisplayFormat("dd/MM/yyyy hh:mm:ss");
|
||||
testWidget->setDateTime(originalDateTime);
|
||||
|
||||
QSignalSpy dateSpy(testWidget, SIGNAL(dateChanged(const QDate &)));
|
||||
QSignalSpy timeSpy(testWidget, SIGNAL(timeChanged(const QTime &)));
|
||||
QSignalSpy dateTimeSpy(testWidget, SIGNAL(dateTimeChanged(const QDateTime &)));
|
||||
QSignalSpy dateSpy(testWidget, SIGNAL(dateChanged(QDate)));
|
||||
QSignalSpy timeSpy(testWidget, SIGNAL(timeChanged(QTime)));
|
||||
QSignalSpy dateTimeSpy(testWidget, SIGNAL(dateTimeChanged(QDateTime)));
|
||||
|
||||
testWidget->setDateTime(newDateTime);
|
||||
QCOMPARE(dateSpy.count(), timesDateEmitted);
|
||||
@ -2981,9 +2981,9 @@ void tst_QDateTimeEdit::task108572()
|
||||
|
||||
void tst_QDateTimeEdit::task149097()
|
||||
{
|
||||
QSignalSpy dtSpy(testWidget, SIGNAL(dateTimeChanged(const QDateTime &)));
|
||||
QSignalSpy dSpy(testWidget, SIGNAL(dateChanged(const QDate &)));
|
||||
QSignalSpy tSpy(testWidget, SIGNAL(timeChanged(const QTime &)));
|
||||
QSignalSpy dtSpy(testWidget, SIGNAL(dateTimeChanged(QDateTime)));
|
||||
QSignalSpy dSpy(testWidget, SIGNAL(dateChanged(QDate)));
|
||||
QSignalSpy tSpy(testWidget, SIGNAL(timeChanged(QTime)));
|
||||
|
||||
testWidget->setDisplayFormat("yyyy/MM/dd hh:mm:ss");
|
||||
testWidget->setDateTime(QDateTime(QDate(2001, 02, 03), QTime(5, 1, 2)));
|
||||
|
@ -547,8 +547,8 @@ void tst_QDialogButtonBox::testSignalOrder()
|
||||
buttonClicked1TimeStamp = acceptTimeStamp
|
||||
= rejectTimeStamp = helpRequestedTimeStamp = timeStamp = 0;
|
||||
QDialogButtonBox buttonBox;
|
||||
connect(&buttonBox, SIGNAL(clicked(QAbstractButton *)),
|
||||
this, SLOT(buttonClicked1(QAbstractButton *)));
|
||||
connect(&buttonBox, SIGNAL(clicked(QAbstractButton*)),
|
||||
this, SLOT(buttonClicked1(QAbstractButton*)));
|
||||
connect(&buttonBox, SIGNAL(accepted()), this, SLOT(acceptClicked()));
|
||||
connect(&buttonBox, SIGNAL(rejected()), this, SLOT(rejectClicked()));
|
||||
connect(&buttonBox, SIGNAL(helpRequested()), this, SLOT(helpRequestedClicked()));
|
||||
|
@ -311,7 +311,7 @@ void tst_QDoubleSpinBox::setTracking()
|
||||
spin.setDecimals(decimals);
|
||||
spin.show();
|
||||
|
||||
connect(&spin, SIGNAL(valueChanged(QString)), this, SLOT(valueChangedHelper(const QString &)));
|
||||
connect(&spin, SIGNAL(valueChanged(QString)), this, SLOT(valueChangedHelper(QString)));
|
||||
|
||||
keys.simulate(&spin);
|
||||
QCOMPARE(actualTexts, texts);
|
||||
|
@ -142,7 +142,7 @@ void tst_QFontComboBox::currentFont()
|
||||
QFETCH(QFont, currentFont);
|
||||
|
||||
SubQFontComboBox box;
|
||||
QSignalSpy spy0(&box, SIGNAL(currentFontChanged(QFont const&)));
|
||||
QSignalSpy spy0(&box, SIGNAL(currentFontChanged(QFont)));
|
||||
QFont oldCurrentFont = box.currentFont();
|
||||
|
||||
box.setCurrentFont(currentFont);
|
||||
@ -192,7 +192,7 @@ void tst_QFontComboBox::fontFilters()
|
||||
QFETCH(QFontComboBox::FontFilters, fontFilters);
|
||||
|
||||
SubQFontComboBox box;
|
||||
QSignalSpy spy0(&box, SIGNAL(currentFontChanged(QFont const&)));
|
||||
QSignalSpy spy0(&box, SIGNAL(currentFontChanged(QFont)));
|
||||
QFont currentFont = box.currentFont();
|
||||
|
||||
box.setFontFilters(fontFilters);
|
||||
@ -265,7 +265,7 @@ void tst_QFontComboBox::writingSystem()
|
||||
QFETCH(QFontDatabase::WritingSystem, writingSystem);
|
||||
|
||||
SubQFontComboBox box;
|
||||
QSignalSpy spy0(&box, SIGNAL(currentFontChanged(QFont const&)));
|
||||
QSignalSpy spy0(&box, SIGNAL(currentFontChanged(QFont)));
|
||||
QFont currentFont = box.currentFont();
|
||||
|
||||
box.setWritingSystem(writingSystem);
|
||||
@ -285,7 +285,7 @@ void tst_QFontComboBox::writingSystem()
|
||||
void tst_QFontComboBox::currentFontChanged()
|
||||
{
|
||||
SubQFontComboBox box;
|
||||
QSignalSpy spy0(&box, SIGNAL(currentFontChanged(QFont const&)));
|
||||
QSignalSpy spy0(&box, SIGNAL(currentFontChanged(QFont)));
|
||||
|
||||
if (box.model()->rowCount() > 2) {
|
||||
QTest::keyPress(&box, Qt::Key_Down);
|
||||
|
@ -360,9 +360,9 @@ void tst_QLineEdit::initTestCase()
|
||||
{
|
||||
testWidget = new QLineEdit(0);
|
||||
testWidget->setObjectName("testWidget");
|
||||
connect(testWidget, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(onCursorPositionChanged(int, int)));
|
||||
connect(testWidget, SIGNAL(textChanged(const QString&)), this, SLOT(onTextChanged(const QString&)));
|
||||
connect(testWidget, SIGNAL(textEdited(const QString&)), this, SLOT(onTextEdited(const QString&)));
|
||||
connect(testWidget, SIGNAL(cursorPositionChanged(int,int)), this, SLOT(onCursorPositionChanged(int,int)));
|
||||
connect(testWidget, SIGNAL(textChanged(QString)), this, SLOT(onTextChanged(QString)));
|
||||
connect(testWidget, SIGNAL(textEdited(QString)), this, SLOT(onTextEdited(QString)));
|
||||
connect(testWidget, SIGNAL(returnPressed()), this, SLOT(onReturnPressed()));
|
||||
connect(testWidget, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged()));
|
||||
connect(testWidget, SIGNAL(editingFinished()), this, SLOT(editingFinished()));
|
||||
@ -3183,7 +3183,7 @@ void tst_QLineEdit::inlineCompletion()
|
||||
void tst_QLineEdit::noTextEditedOnClear()
|
||||
{
|
||||
testWidget->setText("Test");
|
||||
QSignalSpy textEditedSpy(testWidget, SIGNAL(textEdited(const QString &)));
|
||||
QSignalSpy textEditedSpy(testWidget, SIGNAL(textEdited(QString)));
|
||||
testWidget->clear();
|
||||
QCOMPARE(textEditedSpy.count(), 0);
|
||||
}
|
||||
|
@ -333,8 +333,8 @@ void tst_QMdiArea::subWindowActivated()
|
||||
QMdiArea *workspace = new QMdiArea(&mw);
|
||||
workspace->setObjectName(QLatin1String("testWidget"));
|
||||
mw.setCentralWidget(workspace);
|
||||
QSignalSpy spy(workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)));
|
||||
connect( workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(activeChanged(QMdiSubWindow *)));
|
||||
QSignalSpy spy(workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)));
|
||||
connect( workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(activeChanged(QMdiSubWindow*)));
|
||||
mw.show();
|
||||
qApp->setActiveWindow(&mw);
|
||||
|
||||
@ -456,7 +456,7 @@ bool macHasAccessToWindowsServer()
|
||||
void tst_QMdiArea::subWindowActivated2()
|
||||
{
|
||||
QMdiArea mdiArea;
|
||||
QSignalSpy spy(&mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow *)));
|
||||
QSignalSpy spy(&mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)));
|
||||
for (int i = 0; i < 5; ++i)
|
||||
mdiArea.addSubWindow(new QWidget);
|
||||
QCOMPARE(spy.count(), 0);
|
||||
@ -540,8 +540,8 @@ void tst_QMdiArea::subWindowActivatedWithMinimize()
|
||||
QMdiArea *workspace = new QMdiArea(&mw);
|
||||
workspace->setObjectName(QLatin1String("testWidget"));
|
||||
mw.setCentralWidget(workspace);
|
||||
QSignalSpy spy(workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)));
|
||||
connect( workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(activeChanged(QMdiSubWindow *)) );
|
||||
QSignalSpy spy(workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)));
|
||||
connect( workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(activeChanged(QMdiSubWindow*)) );
|
||||
mw.show();
|
||||
qApp->setActiveWindow(&mw);
|
||||
QWidget *widget = new QWidget(workspace);
|
||||
@ -924,8 +924,8 @@ void tst_QMdiArea::setActiveSubWindow()
|
||||
QMdiArea workspace;
|
||||
workspace.show();
|
||||
|
||||
QSignalSpy spy(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)));
|
||||
connect(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(activeChanged(QMdiSubWindow *)));
|
||||
QSignalSpy spy(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)));
|
||||
connect(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(activeChanged(QMdiSubWindow*)));
|
||||
qApp->setActiveWindow(&workspace);
|
||||
|
||||
// Activate hidden windows
|
||||
@ -1321,8 +1321,8 @@ void tst_QMdiArea::closeWindows()
|
||||
workspace.addSubWindow(new QWidget)->show();
|
||||
qApp->processEvents();
|
||||
QCOMPARE(workspace.subWindowList().count(), windowCount);
|
||||
QSignalSpy spy(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)));
|
||||
connect(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(activeChanged(QMdiSubWindow *)));
|
||||
QSignalSpy spy(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)));
|
||||
connect(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(activeChanged(QMdiSubWindow*)));
|
||||
workspace.closeAllSubWindows();
|
||||
qApp->processEvents();
|
||||
QCOMPARE(workspace.subWindowList().count(), 0);
|
||||
@ -1344,8 +1344,8 @@ void tst_QMdiArea::activateNextAndPreviousWindow()
|
||||
qApp->processEvents();
|
||||
}
|
||||
|
||||
QSignalSpy spy(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)));
|
||||
connect(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(activeChanged(QMdiSubWindow *)));
|
||||
QSignalSpy spy(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)));
|
||||
connect(&workspace, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(activeChanged(QMdiSubWindow*)));
|
||||
|
||||
// activateNextSubWindow
|
||||
for (int i = 0; i < windowCount; ++i) {
|
||||
@ -2284,7 +2284,7 @@ void tst_QMdiArea::tabBetweenSubWindows()
|
||||
QWidget *focusWidget = subWindows.back()->widget();
|
||||
QCOMPARE(qApp->focusWidget(), focusWidget);
|
||||
|
||||
QSignalSpy spy(&mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow *)));
|
||||
QSignalSpy spy(&mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)));
|
||||
QCOMPARE(spy.count(), 0);
|
||||
|
||||
// Walk through the entire list of sub windows.
|
||||
|
@ -502,7 +502,7 @@ void tst_QMdiSubWindow::emittingOfSignals()
|
||||
|
||||
QSignalSpy spy(window, signal == SIGNAL(aboutToActivate())
|
||||
? signal.data()
|
||||
: SIGNAL(windowStateChanged(Qt::WindowStates, Qt::WindowStates)));
|
||||
: SIGNAL(windowStateChanged(Qt::WindowStates,Qt::WindowStates)));
|
||||
QVERIFY(spy.isEmpty());
|
||||
triggerSignal(window, &workspace, signal);
|
||||
// Unless the signal is windowRestored or windowDeactivated,
|
||||
|
@ -448,7 +448,7 @@ void tst_QMenu::statusTip()
|
||||
{
|
||||
//check that the statustip of actions inserted into the menu are displayed
|
||||
QMainWindow w;
|
||||
connect(w.statusBar(), SIGNAL(messageChanged(const QString &)), SLOT(onStatusMessageChanged(const QString &)));; //creates the status bar
|
||||
connect(w.statusBar(), SIGNAL(messageChanged(QString)), SLOT(onStatusMessageChanged(QString)));; //creates the status bar
|
||||
QToolBar tb;
|
||||
QAction a("main action", &tb);
|
||||
a.setStatusTip("main action");
|
||||
|
@ -245,7 +245,7 @@ void tst_QMenuBar::initTestCase()
|
||||
// widget under test
|
||||
mw = new QMainWindow(0, Qt::X11BypassWindowManagerHint);
|
||||
mb = new QMenuBar( mw );
|
||||
connect( mb, SIGNAL(triggered(QAction *)), this, SLOT(onActivated(QAction *)) );
|
||||
connect( mb, SIGNAL(triggered(QAction*)), this, SLOT(onActivated(QAction*)) );
|
||||
|
||||
initSimpleMenubar();
|
||||
mw->show();
|
||||
|
@ -377,7 +377,7 @@ void tst_QSpinBox::setTracking()
|
||||
QSpinBox spin(0);
|
||||
spin.setKeyboardTracking(tracking);
|
||||
spin.show();
|
||||
connect(&spin, SIGNAL(valueChanged(QString)), this, SLOT(valueChangedHelper(const QString &)));
|
||||
connect(&spin, SIGNAL(valueChanged(QString)), this, SLOT(valueChangedHelper(QString)));
|
||||
|
||||
keys.simulate(&spin);
|
||||
QCOMPARE(actualTexts, texts);
|
||||
|
@ -250,7 +250,7 @@ void tst_QTextBrowser::viewportPositionInHistory()
|
||||
void tst_QTextBrowser::relativeLinks()
|
||||
{
|
||||
qRegisterMetaType<QUrl>("QUrl");
|
||||
QSignalSpy sourceChangedSpy(browser, SIGNAL(sourceChanged(const QUrl &)));
|
||||
QSignalSpy sourceChangedSpy(browser, SIGNAL(sourceChanged(QUrl)));
|
||||
browser->setSource(QUrl("subdir/../qtextbrowser.html"));
|
||||
QVERIFY(!browser->document()->isEmpty());
|
||||
QVERIFY(sourceChangedSpy.count() == 1);
|
||||
@ -658,7 +658,7 @@ void tst_QTextBrowser::urlEncoding()
|
||||
browser->setHtml("<a href=\"http://www.google.com/q=%22\">link</a>");
|
||||
browser->focusTheNextChild();
|
||||
|
||||
QSignalSpy spy(browser, SIGNAL(anchorClicked(const QUrl &)));
|
||||
QSignalSpy spy(browser, SIGNAL(anchorClicked(QUrl)));
|
||||
|
||||
#ifdef QT_KEYPAD_NAVIGATION
|
||||
browser->setEditFocus(true);
|
||||
|
@ -1744,7 +1744,7 @@ void tst_QTextEdit::currentCharFormatChanged()
|
||||
ff.setPointSize(11);
|
||||
|
||||
SignalReceiver receiver;
|
||||
QObject::connect(ed, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)) , &receiver, SLOT(charFormatChanged(const QTextCharFormat &)));
|
||||
QObject::connect(ed, SIGNAL(currentCharFormatChanged(QTextCharFormat)) , &receiver, SLOT(charFormatChanged(QTextCharFormat)));
|
||||
|
||||
ed->show();
|
||||
ed->setCurrentFont(ff);
|
||||
|
@ -838,7 +838,7 @@ void tst_QToolBar::toolButtonStyle()
|
||||
void tst_QToolBar::actionTriggered()
|
||||
{
|
||||
QToolBar tb;
|
||||
connect(&tb, SIGNAL(actionTriggered(QAction *)), SLOT(slot(QAction *)));
|
||||
connect(&tb, SIGNAL(actionTriggered(QAction*)), SLOT(slot(QAction*)));
|
||||
|
||||
QAction action1(0);
|
||||
QAction action2(0);
|
||||
|
@ -57,7 +57,7 @@ SomeHandler::SomeHandler(QHeaderView *hv, QTableView *tv)
|
||||
m_hv = hv;
|
||||
m_tv = tv;
|
||||
m_tv->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
connect(hv, SIGNAL(sectionResized(int, int, int)), this, SLOT(slotSectionResized(int, int, int)));
|
||||
connect(hv, SIGNAL(sectionResized(int,int,int)), this, SLOT(slotSectionResized(int,int,int)));
|
||||
}
|
||||
void SomeHandler::slotSectionResized(int logsection, int oldsize, int newsize)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user