{
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);
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");
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));
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)"
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();
{
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");
{
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
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)"
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;
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);
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();
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();
{
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);
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";
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)
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();
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());
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);
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);
}
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());
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());
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)
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);
};
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()
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);
}
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);
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);
}
*/
- 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);
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);
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)
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));
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)));
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);
}
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
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();
}
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)
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);
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);
}
edit.setFocus();
win.show();
- QSignalSpy spy(&list, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)));
+ QSignalSpy spy(&list, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)));
QVERIFY(QTest::qWaitForWindowExposed(&win));
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());
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());
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:
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) {
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) {
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();
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);
}
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();
//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()));
}
};
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());
}
// 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
tree.setSelectionBehavior(x ? QAbstractItemView::SelectItems
: QAbstractItemView::SelectRows);
QSignalSpy currentItemChangedSpy(
- &tree, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)));
+ &tree, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)));
QSignalSpy itemSelectionChangedSpy(
&tree, SIGNAL(itemSelectionChanged()));
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");
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);
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));
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);
{
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();
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();
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;
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()
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);
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;
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();
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);
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);
}
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);
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();
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:
// 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) {
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);
// 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();
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);
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);
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);
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)));
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()));
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);
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);
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);
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);
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);
{
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()));
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);
}
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);
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);
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);
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
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);
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) {
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.
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,
{
//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");
// 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();
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);
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);
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);
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);
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);
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)
{