normalise signal/slot signatures [QtWidgets tests]
authorMarc Mutz <marc.mutz@kdab.com>
Tue, 16 Oct 2012 09:08:13 +0000 (11:08 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 18 Oct 2012 22:44:54 +0000 (00:44 +0200)
Change-Id: Iffab60f0911a55e4be09faeb29df0bae1ea2eb19
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
38 files changed:
tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp
tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp
tests/auto/widgets/graphicsview/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
tests/auto/widgets/graphicsview/qgraphicssceneindex/tst_qgraphicssceneindex.cpp
tests/auto/widgets/graphicsview/qgraphicsview/tst_qgraphicsview.cpp
tests/auto/widgets/itemviews/qcolumnview/tst_qcolumnview.cpp
tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
tests/auto/widgets/itemviews/qtablewidget/tst_qtablewidget.cpp
tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp
tests/auto/widgets/itemviews/qtreewidget/tst_qtreewidget.cpp
tests/auto/widgets/kernel/qaction/tst_qaction.cpp
tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp
tests/auto/widgets/kernel/qshortcut/tst_qshortcut.cpp
tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
tests/auto/widgets/widgets/qabstractslider/tst_qabstractslider.cpp
tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
tests/auto/widgets/widgets/qdialogbuttonbox/tst_qdialogbuttonbox.cpp
tests/auto/widgets/widgets/qdoublespinbox/tst_qdoublespinbox.cpp
tests/auto/widgets/widgets/qfontcombobox/tst_qfontcombobox.cpp
tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp
tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp
tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
tests/auto/widgets/widgets/qtextbrowser/tst_qtextbrowser.cpp
tests/auto/widgets/widgets/qtextedit/tst_qtextedit.cpp
tests/auto/widgets/widgets/qtoolbar/tst_qtoolbar.cpp
tests/manual/widgets/itemviews/qheaderview/qheaderviewtest1.cpp

index 8a2d6e3..32610fd 100644 (file)
@@ -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();
index e0256d2..46f0e5a 100644 (file)
@@ -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);
index 809627e..9752e16 100644 (file)
@@ -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());
index e9865f2..883c47b 100644 (file)
@@ -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());
index 2f09ca5..90d21d6 100644 (file)
@@ -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);
index c5cf8b0..70ebd3c 100644 (file)
@@ -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()
index 0ddae14..474ac47 100644 (file)
@@ -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);
     }
 
index 1857e18..60c0906 100644 (file)
@@ -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);
index c86eed1..844c664 100644 (file)
@@ -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));
index c6a3a69..bed1d52 100644 (file)
@@ -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)));
index d252d78..9f3cd0a 100644 (file)
@@ -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
index b882b56..7e246e5 100644 (file)
@@ -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(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(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)));
 
     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));
 
index dc4171e..2fbd90a 100644 (file)
@@ -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:
index c02479a..2c93492 100644 (file)
@@ -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) {
index b2a8716..314592b 100644 (file)
@@ -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
index fe5b5f4..fa57da0 100644 (file)
@@ -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();
index 8bcfe1f..b5e51d9 100644 (file)
@@ -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();
index abb979c..4ce2795 100644 (file)
@@ -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;
 
index 7fccc49..d65a98d 100644 (file)
@@ -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()
index b4f31ac..1052a91 100644 (file)
@@ -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;
index c341ab1..2fbe2a2 100644 (file)
@@ -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);
index a7bcdb1..548d5b7 100644 (file)
@@ -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);
index 5c1de27..772ba7e 100644 (file)
@@ -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:
index 116f3a9..bd16085 100644 (file)
@@ -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);
index 916b60a..b12708a 100644 (file)
@@ -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)));
index 61b57b0..8c8f5b5 100644 (file)
@@ -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()));
index b8af784..898f566 100644 (file)
@@ -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);
index faea7f4..58ef5f1 100644 (file)
@@ -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);
index 0891365..c971566 100644 (file)
@@ -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);
 }
index 259ec2e..6fa9c10 100644 (file)
@@ -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.
index 3807bad..caf030e 100644 (file)
@@ -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,
index b159d0e..4a53473 100644 (file)
@@ -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");
index c8b5d95..572f0a6 100644 (file)
@@ -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();
index 2e7f281..beea5f3 100644 (file)
@@ -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);
index 5bf2b02..6fef2d4 100644 (file)
@@ -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);
index ec656d3..d7a95a8 100644 (file)
@@ -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);
index da5b2a7..3ad9994 100644 (file)
@@ -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);
index 9226846..498042c 100644 (file)
@@ -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)
 {