Merge pull request #10220 from thalieht/const

Add const to many vars and arguments
This commit is contained in:
Mike Tzou 2019-02-13 12:11:00 +08:00 committed by GitHub
commit 78ab0e4ba9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 299 additions and 301 deletions

View file

@ -850,7 +850,7 @@ void MainWindow::finishedTorrent(BitTorrent::TorrentHandle *const torrent) const
}
// Notification when disk is full
void MainWindow::fullDiskError(BitTorrent::TorrentHandle *const torrent, QString msg) const
void MainWindow::fullDiskError(BitTorrent::TorrentHandle *const torrent, const QString &msg) const
{
showNotificationBaloon(tr("I/O Error", "i.e: Input/Output Error")
, tr("An I/O error occurred for torrent '%1'.\n Reason: %2"
@ -964,7 +964,7 @@ void MainWindow::askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHand
confirmBox->show();
}
void MainWindow::handleDownloadFromUrlFailure(QString url, QString reason) const
void MainWindow::handleDownloadFromUrlFailure(const QString &url, const QString &reason) const
{
// Display a message box
showNotificationBaloon(tr("URL download error")
@ -1062,7 +1062,7 @@ bool MainWindow::unlockUI()
return true;
}
void MainWindow::notifyOfUpdate(QString)
void MainWindow::notifyOfUpdate(const QString &)
{
// Show restart message
m_statusBar->showRestartRequired();
@ -1569,7 +1569,7 @@ void MainWindow::updateGUI()
}
}
void MainWindow::showNotificationBaloon(QString title, QString msg) const
void MainWindow::showNotificationBaloon(const QString &title, const QString &msg) const
{
if (!isNotificationsEnabled()) return;
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) && defined(QT_DBUS_LIB)