Use const references where possible
Good practice and a minor performance improvement.
This commit is contained in:
committed by
Chih-Hsuan Yen
parent
6ed0118206
commit
4b32b62df3
@@ -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
@@ -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;
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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
@@ -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
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user