Use const references where possible

Good practice and a minor performance improvement.
This commit is contained in:
Luís Pereira
2020-10-23 12:21:53 +01:00
committed by Chih-Hsuan Yen
parent 6ed0118206
commit 4b32b62df3
6 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
#include "Emulation.h"
#include "HistorySearch.h"
HistorySearch::HistorySearch(EmulationPtr emulation, QRegExp regExp,
HistorySearch::HistorySearch(EmulationPtr emulation, const QRegExp& regExp,
bool forwards, int startColumn, int startLine,
QObject* parent) :
QObject(parent),
+1 -1
View File
@@ -38,7 +38,7 @@ class HistorySearch : public QObject
Q_OBJECT
public:
explicit HistorySearch(EmulationPtr emulation, QRegExp regExp, bool forwards,
explicit HistorySearch(EmulationPtr emulation, const QRegExp& regExp, bool forwards,
int startColumn, int startLine, QObject* parent);
~HistorySearch() override;
+1 -1
View File
@@ -711,7 +711,7 @@ void TerminalDisplay::setOpacity(qreal opacity)
_blendColor = color.rgba();
}
void TerminalDisplay::setBackgroundImage(QString backgroundImage)
void TerminalDisplay::setBackgroundImage(const QString& backgroundImage)
{
if (!backgroundImage.isEmpty())
{
+1 -1
View File
@@ -104,7 +104,7 @@ public:
void setOpacity(qreal opacity);
/** Sets the background image of the terminal display. */
void setBackgroundImage(QString backgroundImage);
void setBackgroundImage(const QString& backgroundImage);
/**
* Specifies whether the terminal display has a vertical scroll bar, and if so whether it
+1 -1
View File
@@ -369,7 +369,7 @@ void QTermWidget::setTerminalOpacity(qreal level)
m_impl->m_terminalDisplay->setOpacity(level);
}
void QTermWidget::setTerminalBackgroundImage(QString backgroundImage)
void QTermWidget::setTerminalBackgroundImage(const QString& backgroundImage)
{
m_impl->m_terminalDisplay->setBackgroundImage(backgroundImage);
}
+1 -1
View File
@@ -87,7 +87,7 @@ public:
void setTerminalFont(const QFont & font);
QFont getTerminalFont();
void setTerminalOpacity(qreal level);
void setTerminalBackgroundImage(QString backgroundImage);
void setTerminalBackgroundImage(const QString& backgroundImage);
//environment
void setEnvironment(const QStringList & environment);