Strip needless const& specifiers on SIGNAL and SLOT arguments (Qt client)

This commit is contained in:
Mike Gelfand 2014-12-13 09:04:10 +00:00
parent 2adbb42763
commit 365b28bc81
10 changed files with 54 additions and 54 deletions

View File

@ -1285,7 +1285,7 @@ Details::createTrackerTab ()
myTrackerView->setItemsExpandable (false);
myTrackerView->setAlternatingRowColors (true);
myTrackerView->setItemDelegate (myTrackerDelegate = new TrackerDelegate ());
connect (myTrackerView->selectionModel (), SIGNAL (selectionChanged (const QItemSelection&, const QItemSelection&)), this, SLOT (onTrackerSelectionChanged ()));
connect (myTrackerView->selectionModel (), SIGNAL (selectionChanged (QItemSelection, QItemSelection)), this, SLOT (onTrackerSelectionChanged ()));
h->addWidget (myTrackerView, 1);
p = new QPushButton ();
@ -1384,17 +1384,17 @@ Details::createFilesTab ()
{
myFileTreeView = new FileTreeView ();
connect (myFileTreeView, SIGNAL ( priorityChanged (const QSet<int>&, int)),
this, SLOT ( onFilePriorityChanged (const QSet<int>&, int)));
connect (myFileTreeView, SIGNAL ( priorityChanged (QSet<int>, int)),
this, SLOT ( onFilePriorityChanged (QSet<int>, int)));
connect (myFileTreeView, SIGNAL ( wantedChanged (const QSet<int>&, bool)),
this, SLOT ( onFileWantedChanged (const QSet<int>&, bool)));
connect (myFileTreeView, SIGNAL ( wantedChanged (QSet<int>, bool)),
this, SLOT ( onFileWantedChanged (QSet<int>, bool)));
connect (myFileTreeView, SIGNAL (pathEdited (const QString&, const QString&)),
this, SLOT (onPathEdited (const QString&, const QString&)));
connect (myFileTreeView, SIGNAL (pathEdited (QString, QString)),
this, SLOT (onPathEdited (QString, QString)));
connect (myFileTreeView, SIGNAL (openRequested (const QString&)),
this, SLOT (onOpenRequested (const QString&)));
connect (myFileTreeView, SIGNAL (openRequested (QString)),
this, SLOT (onOpenRequested (QString)));
return myFileTreeView;
}

View File

@ -892,23 +892,23 @@ FileTreeView::FileTreeView (QWidget * parent, bool isEditable):
#endif
}
connect (this, SIGNAL(clicked(const QModelIndex&)),
this, SLOT(onClicked(const QModelIndex&)));
connect (this, SIGNAL(clicked(QModelIndex)),
this, SLOT(onClicked(QModelIndex)));
connect (this, SIGNAL(doubleClicked(const QModelIndex&)),
this, SLOT(onDoubleClicked(const QModelIndex&)));
connect (this, SIGNAL(doubleClicked(QModelIndex)),
this, SLOT(onDoubleClicked(QModelIndex)));
connect (&myModel, SIGNAL(priorityChanged(const QSet<int>&, int)),
this, SIGNAL(priorityChanged(const QSet<int>&, int)));
connect (&myModel, SIGNAL(priorityChanged(QSet<int>, int)),
this, SIGNAL(priorityChanged(QSet<int>, int)));
connect (&myModel, SIGNAL(wantedChanged(const QSet<int>&, bool)),
this, SIGNAL(wantedChanged(const QSet<int>&, bool)));
connect (&myModel, SIGNAL(wantedChanged(QSet<int>, bool)),
this, SIGNAL(wantedChanged(QSet<int>, bool)));
connect (&myModel, SIGNAL(pathEdited(const QString&, const QString&)),
this, SIGNAL(pathEdited(const QString&, const QString&)));
connect (&myModel, SIGNAL(pathEdited(QString, QString)),
this, SIGNAL(pathEdited(QString, QString)));
connect (&myModel, SIGNAL (openRequested (const QString&)),
this, SLOT (onOpenRequested (const QString&)),
connect (&myModel, SIGNAL (openRequested (QString)),
this, SLOT (onOpenRequested (QString)),
Qt::QueuedConnection);
}

View File

@ -461,12 +461,12 @@ FilterBar::FilterBar (Prefs& prefs, TorrentModel& torrents, TorrentFilter& filte
connect (&myPrefs, SIGNAL (changed (int)), this, SLOT (refreshPref (int)));
connect (myActivityCombo, SIGNAL (currentIndexChanged (int)), this, SLOT (onActivityIndexChanged (int)));
connect (myTrackerCombo, SIGNAL (currentIndexChanged (int)), this, SLOT (onTrackerIndexChanged (int)));
connect (&myFilter, SIGNAL (rowsInserted (const QModelIndex&,int,int)), this, SLOT (refreshCountLabel ()));
connect (&myFilter, SIGNAL (rowsRemoved (const QModelIndex&,int,int)), this, SLOT (refreshCountLabel ()));
connect (&myFilter, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (refreshCountLabel ()));
connect (&myFilter, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (refreshCountLabel ()));
connect (&myTorrents, SIGNAL (modelReset ()), this, SLOT (onTorrentModelReset ()));
connect (&myTorrents, SIGNAL (rowsInserted (const QModelIndex&,int,int)), this, SLOT (onTorrentModelRowsInserted (const QModelIndex&,int,int)));
connect (&myTorrents, SIGNAL (rowsRemoved (const QModelIndex&,int,int)), this, SLOT (onTorrentModelRowsRemoved (const QModelIndex&,int,int)));
connect (&myTorrents, SIGNAL (dataChanged (const QModelIndex&,const QModelIndex&)), this, SLOT (onTorrentModelDataChanged (const QModelIndex&,const QModelIndex&)));
connect (&myTorrents, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (onTorrentModelRowsInserted (QModelIndex, int, int)));
connect (&myTorrents, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (onTorrentModelRowsRemoved (QModelIndex, int, int)));
connect (&myTorrents, SIGNAL (dataChanged (QModelIndex, QModelIndex)), this, SLOT (onTorrentModelDataChanged (QModelIndex, QModelIndex)));
connect (myRecountTimer, SIGNAL (timeout ()), this, SLOT (recount ()));
recountSoon ();

View File

@ -33,8 +33,8 @@ FreespaceLabel::FreespaceLabel (Session & session,
connect (&myTimer, SIGNAL(timeout()), this, SLOT(onTimer()));
connect (&mySession, SIGNAL(executed(int64_t, const QString&, tr_variant *)),
this, SLOT(onSessionExecuted(int64_t, const QString&, tr_variant *)));
connect (&mySession, SIGNAL(executed(int64_t, QString, tr_variant *)),
this, SLOT(onSessionExecuted(int64_t, QString, tr_variant *)));
setPath (path);
}

View File

@ -184,26 +184,26 @@ TrMainWindow::TrMainWindow (Session& session, Prefs& prefs, TorrentModel& model,
connect (ui.action_Properties, SIGNAL (triggered ()), this, SLOT (openProperties ()));
connect (ui.action_SessionDialog, SIGNAL (triggered ()), mySessionDialog, SLOT (show ()));
connect (ui.listView, SIGNAL (activated (const QModelIndex&)), ui.action_Properties, SLOT (trigger ()));
connect (ui.listView, SIGNAL (activated (QModelIndex)), ui.action_Properties, SLOT (trigger ()));
// signals
connect (ui.action_SelectAll, SIGNAL (triggered ()), ui.listView, SLOT (selectAll ()));
connect (ui.action_DeselectAll, SIGNAL (triggered ()), ui.listView, SLOT (clearSelection ()));
connect (&myFilterModel, SIGNAL (rowsInserted (const QModelIndex&,int,int)), this, SLOT (refreshActionSensitivitySoon ()));
connect (&myFilterModel, SIGNAL (rowsRemoved (const QModelIndex&,int,int)), this, SLOT (refreshActionSensitivitySoon ()));
connect (&myFilterModel, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (refreshActionSensitivitySoon ()));
connect (&myFilterModel, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (refreshActionSensitivitySoon ()));
connect (ui.action_Quit, SIGNAL (triggered ()), QCoreApplication::instance (), SLOT (quit ()));
// torrent view
myFilterModel.setSourceModel (&myModel);
connect (&myModel, SIGNAL (modelReset ()), this, SLOT (onModelReset ()));
connect (&myModel, SIGNAL (rowsRemoved (const QModelIndex&,int,int)), this, SLOT (onModelReset ()));
connect (&myModel, SIGNAL (rowsInserted (const QModelIndex&,int,int)), this, SLOT (onModelReset ()));
connect (&myModel, SIGNAL (dataChanged (const QModelIndex&,const QModelIndex&)), this, SLOT (refreshTrayIconSoon ()));
connect (&myModel, SIGNAL (rowsRemoved (QModelIndex, int, int)), this, SLOT (onModelReset ()));
connect (&myModel, SIGNAL (rowsInserted (QModelIndex, int, int)), this, SLOT (onModelReset ()));
connect (&myModel, SIGNAL (dataChanged (QModelIndex, QModelIndex)), this, SLOT (refreshTrayIconSoon ()));
ui.listView->setModel (&myFilterModel);
connect (ui.listView->selectionModel (), SIGNAL (selectionChanged (const QItemSelection&,const QItemSelection&)), this, SLOT (refreshActionSensitivitySoon ()));
connect (ui.listView->selectionModel (), SIGNAL (selectionChanged (QItemSelection, QItemSelection)), this, SLOT (refreshActionSensitivitySoon ()));
QActionGroup * actionGroup = new QActionGroup (this);
actionGroup->addAction (ui.action_SortByActivity);
@ -273,7 +273,7 @@ TrMainWindow::TrMainWindow (Session& session, Prefs& prefs, TorrentModel& model,
connect (&mySession, SIGNAL (dataSendProgress ()), this, SLOT (dataSendProgress ()));
connect (&mySession, SIGNAL (httpAuthenticationRequired ()), this, SLOT (wrongAuthentication ()));
connect (&mySession, SIGNAL (error (QNetworkReply::NetworkError)), this, SLOT (onError (QNetworkReply::NetworkError)));
connect (&mySession, SIGNAL (errorMessage (const QString)), this, SLOT (errorMessage(const QString)));
connect (&mySession, SIGNAL (errorMessage (QString)), this, SLOT (errorMessage(QString)));
if (mySession.isServer ())
{
@ -1174,8 +1174,8 @@ TrMainWindow::openTorrent ()
}
l->addWidget (b, l->rowCount(), 0, 1, -1, Qt::AlignLeft);
connect (d, SIGNAL (filesSelected (const QStringList&)),
this, SLOT (addTorrents (const QStringList&)));
connect (d, SIGNAL (filesSelected (QStringList)),
this, SLOT (addTorrents (QStringList)));
d->show ();
}

View File

@ -177,8 +177,8 @@ MakeDialog::onFileClicked ()
QFileDialog * d = new QFileDialog (this, tr ("Select File"));
d->setFileMode (QFileDialog::ExistingFile);
d->setAttribute (Qt::WA_DeleteOnClose);
connect (d, SIGNAL(filesSelected(const QStringList&)),
this, SLOT(onFileSelected(const QStringList&)));
connect (d, SIGNAL(filesSelected(QStringList)),
this, SLOT(onFileSelected(QStringList)));
d->show ();
}
void
@ -202,8 +202,8 @@ MakeDialog::onFolderClicked ()
d->setFileMode (QFileDialog::Directory);
d->setOption (QFileDialog::ShowDirsOnly);
d->setAttribute (Qt::WA_DeleteOnClose);
connect (d, SIGNAL(filesSelected(const QStringList&)),
this, SLOT(onFolderSelected(const QStringList&)));
connect (d, SIGNAL(filesSelected(QStringList)),
this, SLOT(onFolderSelected(QStringList)));
d->show ();
}
@ -229,8 +229,8 @@ MakeDialog::onDestinationClicked ()
d->setFileMode (QFileDialog::Directory);
d->setOption (QFileDialog::ShowDirsOnly);
d->setAttribute (Qt::WA_DeleteOnClose);
connect (d, SIGNAL(filesSelected(const QStringList&)),
this, SLOT(onDestinationSelected(const QStringList&)));
connect (d, SIGNAL(filesSelected(QStringList)),
this, SLOT(onDestinationSelected(QStringList)));
d->show ();
}
void

View File

@ -132,7 +132,7 @@ Options::Options (Session& session, const Prefs& prefs, const AddData& addme, QW
e->setText (downloadDir);
layout->addWidget (e, row, 1);
l->setBuddy (e);
connect (e, SIGNAL (textEdited (const QString&)), this, SLOT (onDestinationEdited (const QString&)));
connect (e, SIGNAL (textEdited (QString)), this, SLOT (onDestinationEdited (QString)));
}
l = myFreespaceLabel;
@ -179,8 +179,8 @@ Options::Options (Session& session, const Prefs& prefs, const AddData& addme, QW
layout->setColumnStretch (1, 2);
layout->setSpacing (HIG::PAD);
connect (myTree, SIGNAL (priorityChanged (const QSet<int>&,int)), this, SLOT (onPriorityChanged (const QSet<int>&,int)));
connect (myTree, SIGNAL (wantedChanged (const QSet<int>&,bool)), this, SLOT (onWantedChanged (const QSet<int>&,bool)));
connect (myTree, SIGNAL (priorityChanged (QSet<int>, int)), this, SLOT (onPriorityChanged (QSet<int>, int)));
connect (myTree, SIGNAL (wantedChanged (QSet<int>, bool)), this, SLOT (onWantedChanged (QSet<int>, bool)));
if (session.isLocal ())
connect (myVerifyButton, SIGNAL (clicked (bool)), this, SLOT (onVerify ()));
@ -405,7 +405,7 @@ Options::onFilenameClicked ()
tr ("Torrent Files (*.torrent);;All Files (*.*)"));
d->setFileMode (QFileDialog::ExistingFile);
d->setAttribute (Qt::WA_DeleteOnClose);
connect (d, SIGNAL (filesSelected (const QStringList&)), this, SLOT (onFilesSelected (const QStringList&)));
connect (d, SIGNAL (filesSelected (QStringList)), this, SLOT (onFilesSelected (QStringList)));
d->show ();
}
}
@ -433,7 +433,7 @@ Options::onDestinationClicked ()
QFileDialog * d = new QFileDialog (this, tr ("Select Destination"), myLocalDestination.absolutePath ());
d->setFileMode (QFileDialog::Directory);
d->setAttribute (Qt::WA_DeleteOnClose);
connect (d, SIGNAL (filesSelected (const QStringList&)), this, SLOT (onDestinationsSelected (const QStringList&)));
connect (d, SIGNAL (filesSelected (QStringList)), this, SLOT (onDestinationsSelected (QStringList)));
d->show ();
}

View File

@ -305,8 +305,8 @@ Session::Session (const char * configDir, Prefs& prefs):
connect (&myPrefs, SIGNAL (changed (int)), this, SLOT (updatePref (int)));
connect (this, SIGNAL (responseReceived (const QByteArray&)),
this, SLOT (onResponseReceived (const QByteArray&)));
connect (this, SIGNAL (responseReceived (QByteArray)),
this, SLOT (onResponseReceived (QByteArray)));
}
Session::~Session ()

View File

@ -162,7 +162,7 @@ class Session: public QObject
void dataReadProgress ();
void dataSendProgress ();
void error (QNetworkReply::NetworkError);
void errorMessage (const QString);
void errorMessage (const QString&);
void httpAuthenticationRequired ();
private:

View File

@ -89,8 +89,8 @@ WatchDir::setPath (const QString& path, bool isEnabled)
{
myWatcher = new QFileSystemWatcher ();
myWatcher->addPath( path );
connect (myWatcher, SIGNAL(directoryChanged(const QString&)),
this, SLOT(watcherActivated(const QString&)));
connect (myWatcher, SIGNAL(directoryChanged(QString)),
this, SLOT(watcherActivated(QString)));
//std::cerr << "watching " << qPrintable(path) << " for new .torrent files" << std::endl;
QTimer::singleShot (0, this, SLOT (rescanAllWatchedDirectories ())); // trigger the watchdir for .torrent files in there already
}