aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainwindow.cpp8
-rw-r--r--src/mainwindow.h6
2 files changed, 7 insertions, 7 deletions
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);
}
diff --git a/src/mainwindow.h b/src/mainwindow.h
index f5c51b2..98da302 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -50,7 +50,7 @@ public slots:
void handleWebViewTitleChanged(QString title);
void handleLoadFinished(bool loaded);
void handleDownloadRequested(QWebEngineDownloadItem *download);
- void loadAppWithArgument(const QString arg);
+ void loadAppWithArgument(const QString &arg);
protected slots:
@@ -109,7 +109,7 @@ private slots:
void handleCookieAdded(const QNetworkCookie &cookie);
QString getPageTheme();
- void toggleMute(const bool checked);
+ void toggleMute(const bool &checked);
void doAppReload();
void askToReloadPage();
void updateSettingsUserAgentWidget();
@@ -127,7 +127,7 @@ private slots:
void loadingQuirk(QString test);
void setNotificationPresenter(QWebEngineProfile *profile);
void newChat();
- bool isPhoneNumber(const QString phoneNumber);
+ bool isPhoneNumber(const QString &phoneNumber);
void quitApp();
};