normalise signal/slot signatures [QtGui tests]
Change-Id: I42e11de9ef1d8a04b2a8e200afb84f2245f3361a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>bb10
parent
a89eae8cb4
commit
2ec2edc24d
|
|
@ -183,23 +183,23 @@ void tst_QStandardItemModel::init()
|
|||
qRegisterMetaType<Qt::Orientation>("Qt::Orientation");
|
||||
|
||||
m_model = new QStandardItemModel(defaultSize, defaultSize);
|
||||
connect(m_model, SIGNAL(rowsAboutToBeInserted(QModelIndex, int, int)),
|
||||
this, SLOT(rowsAboutToBeInserted(QModelIndex, int, int)));
|
||||
connect(m_model, SIGNAL(rowsInserted(QModelIndex, int, int)),
|
||||
this, SLOT(rowsInserted(QModelIndex, int, int)));
|
||||
connect(m_model, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(rowsAboutToBeRemoved(QModelIndex, int, int)));
|
||||
connect(m_model, SIGNAL(rowsRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(rowsRemoved(QModelIndex, int, int)));
|
||||
connect(m_model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
|
||||
this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)));
|
||||
connect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(rowsInserted(QModelIndex,int,int)));
|
||||
connect(m_model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
|
||||
connect(m_model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(rowsRemoved(QModelIndex,int,int)));
|
||||
|
||||
connect(m_model, SIGNAL(columnsAboutToBeInserted(QModelIndex, int, int)),
|
||||
this, SLOT(columnsAboutToBeInserted(QModelIndex, int, int)));
|
||||
connect(m_model, SIGNAL(columnsInserted(QModelIndex, int, int)),
|
||||
this, SLOT(columnsInserted(QModelIndex, int, int)));
|
||||
connect(m_model, SIGNAL(columnsAboutToBeRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(columnsAboutToBeRemoved(QModelIndex, int, int)));
|
||||
connect(m_model, SIGNAL(columnsRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(columnsRemoved(QModelIndex, int, int)));
|
||||
connect(m_model, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)),
|
||||
this, SLOT(columnsAboutToBeInserted(QModelIndex,int,int)));
|
||||
connect(m_model, SIGNAL(columnsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(columnsInserted(QModelIndex,int,int)));
|
||||
connect(m_model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(columnsAboutToBeRemoved(QModelIndex,int,int)));
|
||||
connect(m_model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(columnsRemoved(QModelIndex,int,int)));
|
||||
|
||||
rcFirst.fill(-1);
|
||||
rcLast.fill(-1);
|
||||
|
|
@ -207,23 +207,23 @@ void tst_QStandardItemModel::init()
|
|||
|
||||
void tst_QStandardItemModel::cleanup()
|
||||
{
|
||||
disconnect(m_model, SIGNAL(rowsAboutToBeInserted(QModelIndex, int, int)),
|
||||
this, SLOT(rowsAboutToBeInserted(QModelIndex, int, int)));
|
||||
disconnect(m_model, SIGNAL(rowsInserted(QModelIndex, int, int)),
|
||||
this, SLOT(rowsInserted(QModelIndex, int, int)));
|
||||
disconnect(m_model, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(rowsAboutToBeRemoved(QModelIndex, int, int)));
|
||||
disconnect(m_model, SIGNAL(rowsRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(rowsRemoved(QModelIndex, int, int)));
|
||||
disconnect(m_model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
|
||||
this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)));
|
||||
disconnect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(rowsInserted(QModelIndex,int,int)));
|
||||
disconnect(m_model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)));
|
||||
disconnect(m_model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(rowsRemoved(QModelIndex,int,int)));
|
||||
|
||||
disconnect(m_model, SIGNAL(columnsAboutToBeInserted(QModelIndex, int, int)),
|
||||
this, SLOT(columnsAboutToBeInserted(QModelIndex, int, int)));
|
||||
disconnect(m_model, SIGNAL(columnsInserted(QModelIndex, int, int)),
|
||||
this, SLOT(columnsInserted(QModelIndex, int, int)));
|
||||
disconnect(m_model, SIGNAL(columnsAboutToBeRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(columnsAboutToBeRemoved(QModelIndex, int, int)));
|
||||
disconnect(m_model, SIGNAL(columnsRemoved(QModelIndex, int, int)),
|
||||
this, SLOT(columnsRemoved(QModelIndex, int, int)));
|
||||
disconnect(m_model, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)),
|
||||
this, SLOT(columnsAboutToBeInserted(QModelIndex,int,int)));
|
||||
disconnect(m_model, SIGNAL(columnsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(columnsInserted(QModelIndex,int,int)));
|
||||
disconnect(m_model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(columnsAboutToBeRemoved(QModelIndex,int,int)));
|
||||
disconnect(m_model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
|
||||
this, SLOT(columnsRemoved(QModelIndex,int,int)));
|
||||
delete m_model;
|
||||
m_model = 0;
|
||||
}
|
||||
|
|
@ -470,9 +470,9 @@ void tst_QStandardItemModel::setHeaderData()
|
|||
QCOMPARE(m_model->headerData(i, orient).toString(), QString::number(i + 1));
|
||||
|
||||
QSignalSpy headerDataChangedSpy(
|
||||
m_model, SIGNAL(headerDataChanged(Qt::Orientation, int, int)));
|
||||
m_model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)));
|
||||
QSignalSpy dataChangedSpy(
|
||||
m_model, SIGNAL(dataChanged(QModelIndex, QModelIndex)));
|
||||
m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
|
||||
// insert custom values and check
|
||||
for (int i = 0; i < count; ++i) {
|
||||
QString customString = QString("custom") + QString::number(i);
|
||||
|
|
@ -752,7 +752,7 @@ void tst_QStandardItemModel::clear()
|
|||
|
||||
QSignalSpy modelResetSpy(&model, SIGNAL(modelReset()));
|
||||
QSignalSpy layoutChangedSpy(&model, SIGNAL(layoutChanged()));
|
||||
QSignalSpy rowsRemovedSpy(&model, SIGNAL(rowsRemoved(QModelIndex, int, int)));
|
||||
QSignalSpy rowsRemovedSpy(&model, SIGNAL(rowsRemoved(QModelIndex,int,int)));
|
||||
model.clear();
|
||||
|
||||
QCOMPARE(modelResetSpy.count(), 1);
|
||||
|
|
@ -1135,7 +1135,7 @@ void tst_QStandardItemModel::getSetItemData()
|
|||
QModelIndex idx = model.index(0, 0, QModelIndex());
|
||||
|
||||
QSignalSpy modelDataChangedSpy(
|
||||
&model, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)));
|
||||
&model, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
|
||||
QVERIFY(model.setItemData(idx, roles));
|
||||
QCOMPARE(modelDataChangedSpy.count(), 1);
|
||||
QVERIFY(model.setItemData(idx, roles));
|
||||
|
|
@ -1218,9 +1218,9 @@ void tst_QStandardItemModel::itemDataChanged()
|
|||
QStandardItemModel model(6, 4);
|
||||
QStandardItem item;
|
||||
QSignalSpy dataChangedSpy(
|
||||
&model, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)));
|
||||
&model, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
|
||||
QSignalSpy itemChangedSpy(
|
||||
&model, SIGNAL(itemChanged(QStandardItem *)));
|
||||
&model, SIGNAL(itemChanged(QStandardItem*)));
|
||||
|
||||
model.setItem(0, &item);
|
||||
QCOMPARE(dataChangedSpy.count(), 1);
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ void tst_QGuiApplication::focusObject()
|
|||
DummyWindow window2;
|
||||
window1.show();
|
||||
|
||||
QSignalSpy spy(&app, SIGNAL(focusObjectChanged(QObject *)));
|
||||
QSignalSpy spy(&app, SIGNAL(focusObjectChanged(QObject*)));
|
||||
|
||||
|
||||
// verify active window focus propagates to qguiapplication
|
||||
|
|
|
|||
|
|
@ -1927,8 +1927,8 @@ public:
|
|||
CursorPosSignalSpy(QTextDocument *doc)
|
||||
{
|
||||
calls = 0;
|
||||
connect(doc, SIGNAL(cursorPositionChanged(const QTextCursor &)),
|
||||
this, SLOT(cursorPositionChanged(const QTextCursor &)));
|
||||
connect(doc, SIGNAL(cursorPositionChanged(QTextCursor)),
|
||||
this, SLOT(cursorPositionChanged(QTextCursor)));
|
||||
}
|
||||
|
||||
int calls;
|
||||
|
|
@ -2054,17 +2054,17 @@ void tst_QTextDocument::markContentsDirty()
|
|||
QTestDocumentLayout *lout = new QTestDocumentLayout(doc);
|
||||
doc->setDocumentLayout(lout);
|
||||
TestSyntaxHighlighter *highlighter = new TestSyntaxHighlighter(doc);
|
||||
connect(doc, SIGNAL(contentsChange(int, int, int)),
|
||||
highlighter, SLOT(markBlockDirty(int, int, int)));
|
||||
connect(doc, SIGNAL(contentsChange(int,int,int)),
|
||||
highlighter, SLOT(markBlockDirty(int,int,int)));
|
||||
|
||||
highlighter->ok = false;
|
||||
cursor.insertText("Some dummy text blah blah");
|
||||
QVERIFY(highlighter->ok);
|
||||
|
||||
disconnect(doc, SIGNAL(contentsChange(int, int, int)),
|
||||
highlighter, SLOT(markBlockDirty(int, int, int)));
|
||||
connect(doc, SIGNAL(contentsChange(int, int, int)),
|
||||
highlighter, SLOT(modifyBlockAgain(int, int, int)));
|
||||
disconnect(doc, SIGNAL(contentsChange(int,int,int)),
|
||||
highlighter, SLOT(markBlockDirty(int,int,int)));
|
||||
connect(doc, SIGNAL(contentsChange(int,int,int)),
|
||||
highlighter, SLOT(modifyBlockAgain(int,int,int)));
|
||||
highlighter->ok = false;
|
||||
cursor.insertText("FooBar");
|
||||
QVERIFY(highlighter->ok);
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ void tst_QRegExpValidator::validate()
|
|||
QFETCH( int, state );
|
||||
|
||||
QRegExpValidator rv( 0 );
|
||||
QSignalSpy spy(&rv, SIGNAL(regExpChanged(const QRegExp&)));
|
||||
QSignalSpy spy(&rv, SIGNAL(regExpChanged(QRegExp)));
|
||||
QSignalSpy changedSpy(&rv, SIGNAL(changed()));
|
||||
|
||||
rv.setRegExp( QRegExp( rx ) );
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ void atWrapper::downloadBaseline()
|
|||
|
||||
QFtp ftp;
|
||||
|
||||
QObject::connect( &ftp, SIGNAL( listInfo( const QUrlInfo & ) ), this, SLOT( ftpMgetAddToList(const QUrlInfo & ) ) );
|
||||
QObject::connect( &ftp, SIGNAL(listInfo(QUrlInfo)), this, SLOT(ftpMgetAddToList(QUrlInfo)) );
|
||||
|
||||
//Making sure that the needed local directories exist.
|
||||
|
||||
|
|
@ -268,8 +268,8 @@ void atWrapper::ftpRmDir( QString dir )
|
|||
//Hack to remove a populated directory. (caveat: containing only files and empty dirs, not recursive!)
|
||||
qDebug() << "Now removing directory: " << dir;
|
||||
QFtp ftp;
|
||||
QObject::connect( &ftp, SIGNAL( listInfo( const QUrlInfo & ) ), this, SLOT( ftpRmDirAddToList(const QUrlInfo & ) ) );
|
||||
QObject::connect( &ftp, SIGNAL( done( bool ) ), this, SLOT( ftpRmDirDone( bool ) ) );
|
||||
QObject::connect( &ftp, SIGNAL(listInfo(QUrlInfo)), this, SLOT(ftpRmDirAddToList(QUrlInfo)) );
|
||||
QObject::connect( &ftp, SIGNAL(done(bool)), this, SLOT(ftpRmDirDone(bool)) );
|
||||
|
||||
ftp.connectToHost( ftpHost );
|
||||
ftp.login( ftpUser, ftpPass );
|
||||
|
|
@ -308,7 +308,7 @@ bool atWrapper::ftpMkDir( QString dir )
|
|||
// IE: conveniance.
|
||||
QFtp ftp;
|
||||
|
||||
QSignalSpy commandSpy(&ftp, SIGNAL(commandFinished(int, bool)));
|
||||
QSignalSpy commandSpy(&ftp, SIGNAL(commandFinished(int,bool)));
|
||||
|
||||
ftp.connectToHost( ftpHost );
|
||||
ftp.login( ftpUser, ftpPass );
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ void AbstractItemView::setModel(QAbstractItemModel *model, AbstractViewItem *pro
|
|||
disconnect(m_model, SIGNAL(destroyed()),
|
||||
this, SLOT(_q_modelDestroyed()));
|
||||
disconnect(m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
|
||||
this, SLOT( dataChanged(QModelIndex,QModelIndex)));
|
||||
this, SLOT(dataChanged(QModelIndex,QModelIndex)));
|
||||
disconnect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
this, SLOT(rowsInserted(QModelIndex,int,int)));
|
||||
disconnect(m_model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||
|
|
@ -112,7 +112,7 @@ void AbstractItemView::setModel(QAbstractItemModel *model, AbstractViewItem *pro
|
|||
|
||||
connect(m_model, SIGNAL(destroyed()), this, SLOT(modelDestroyed()));
|
||||
connect(m_model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
|
||||
this, SLOT( dataChanged(QModelIndex,QModelIndex)));
|
||||
this, SLOT(dataChanged(QModelIndex,QModelIndex)));
|
||||
connect(m_model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
|
||||
this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)));
|
||||
connect(m_model, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||
|
|
@ -205,11 +205,11 @@ void AbstractItemView::setSelectionModel(QItemSelectionModel *smodel)
|
|||
return;
|
||||
}
|
||||
if (m_selectionModel) {
|
||||
disconnect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
|
||||
this, SLOT(currentSelectionChanged(QItemSelection, QItemSelection)));
|
||||
disconnect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
||||
this, SLOT(currentSelectionChanged(QItemSelection,QItemSelection)));
|
||||
|
||||
disconnect(m_selectionModel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
|
||||
this, SLOT(currentIndexChanged(QModelIndex, QModelIndex)));
|
||||
disconnect(m_selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
|
||||
this, SLOT(currentIndexChanged(QModelIndex,QModelIndex)));
|
||||
|
||||
delete m_selectionModel;
|
||||
m_selectionModel = 0;
|
||||
|
|
@ -218,10 +218,10 @@ void AbstractItemView::setSelectionModel(QItemSelectionModel *smodel)
|
|||
m_selectionModel = smodel;
|
||||
|
||||
if (m_selectionModel) {
|
||||
connect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection, QItemSelection)),
|
||||
this, SLOT(currentSelectionChanged(QItemSelection, QItemSelection)));
|
||||
connect(m_selectionModel, SIGNAL(currentChanged(QModelIndex, QModelIndex)),
|
||||
this, SLOT(currentIndexChanged(QModelIndex, QModelIndex)));
|
||||
connect(m_selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
||||
this, SLOT(currentSelectionChanged(QItemSelection,QItemSelection)));
|
||||
connect(m_selectionModel, SIGNAL(currentChanged(QModelIndex,QModelIndex)),
|
||||
this, SLOT(currentIndexChanged(QModelIndex,QModelIndex)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue