From 4deed2488131ffd8d2646c57eea8ab5b8c3bc334 Mon Sep 17 00:00:00 2001 From: Keshav Bhatt Date: Mon, 7 Jun 2021 12:24:32 +0530 Subject: code refactoring --- src/mainwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 93ba706..45a2262 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -74,7 +74,7 @@ MainWindow::MainWindow(QWidget *parent) }); } -void MainWindow::loadAppWithArgument(const QString arg) +void MainWindow::loadAppWithArgument(const QString &arg) { //https://faq.whatsapp.com/iphone/how-to-link-to-whatsapp-from-a-different-app/?lang=en @@ -367,7 +367,7 @@ void MainWindow::closeEvent(QCloseEvent *event) QMainWindow::closeEvent(event); } -void MainWindow::notify(QString title,QString message) +void MainWindow::notify(QString title, QString message) { if(settings.value("disableNotificationPopups",false).toBool() == true){ @@ -890,7 +890,7 @@ void MainWindow::newChat() } } -bool MainWindow::isPhoneNumber(const QString phoneNumber) +bool MainWindow::isPhoneNumber(const QString &phoneNumber) { const QString phone = "^\\+(((\\d{2}))\\s?)?((\\d{2})|(\\((\\d{2})\\))\\s?)?(\\d{3,15})(\\-(\\d{3,15}))?$"; QRegularExpression reg(phone); @@ -902,7 +902,7 @@ void MainWindow::doReload() this->webEngine->triggerPageAction(QWebEnginePage::ReloadAndBypassCache, false); } -void MainWindow::toggleMute(const bool checked) +void MainWindow::toggleMute(const bool &checked) { this->webEngine->page()->setAudioMuted(checked); } -- cgit v1.2.3