Commit 1c47b15d authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

ProjectExplorer: Pass some values by reference



Change-Id: I628c317fc86f1f4b33ca453018d54fb86babc1e8
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent b9fedaa4
......@@ -176,7 +176,7 @@ QList<QWidget *> CompileOutputWindow::toolBarWidgets() const
return QList<QWidget *>() << m_cancelBuildButton;
}
static QColor mix_colors(QColor a, QColor b)
static QColor mix_colors(const QColor &a, const QColor &b)
{
return QColor((a.red() + 2 * b.red()) / 3, (a.green() + 2 * b.green()) / 3,
(a.blue() + 2* b.blue()) / 3, (a.alpha() + 2 * b.alpha()) / 3);
......
......@@ -62,7 +62,7 @@ DeviceManagerModel::~DeviceManagerModel()
delete d;
}
void DeviceManagerModel::setFilter(const QList<Core::Id> filter)
void DeviceManagerModel::setFilter(const QList<Core::Id> &filter)
{
d->filter = filter;
handleDeviceListChanged();
......
......@@ -46,7 +46,7 @@ public:
explicit DeviceManagerModel(const DeviceManager *deviceManager, QObject *parent = 0);
~DeviceManagerModel();
void setFilter(const QList<Core::Id> filter);
void setFilter(const QList<Core::Id> &filter);
void setTypeFilter(const Core::Id &type);
IDevice::ConstPtr device(int pos) const;
......
......@@ -89,8 +89,8 @@ void OutputParserTester::testParsing(const QString &lines,
}
}
void OutputParserTester::testTaskMangling(const Task input,
const Task output)
void OutputParserTester::testTaskMangling(const Task &input,
const Task &output)
{
reset();
childParser()->taskAdded(input);
......
......@@ -60,8 +60,8 @@ public:
const QString &childStdOutLines,
const QString &childStdErrLines,
const QString &outputLines);
void testTaskMangling(const Task input,
const Task output);
void testTaskMangling(const Task &input,
const Task &output);
void testOutputMangling(const QString &input,
const QString &output);
......
......@@ -529,7 +529,9 @@ Qt::CheckState SelectableFilesModel::applyFilter(const QModelIndex &index)
// SelectableFilesDialogs
//////////
SelectableFilesDialogEditFiles::SelectableFilesDialogEditFiles(const QString &path, const QStringList files, QWidget *parent)
SelectableFilesDialogEditFiles::SelectableFilesDialogEditFiles(const QString &path,
const QStringList &files,
QWidget *parent)
: QDialog(parent)
{
QVBoxLayout *layout = new QVBoxLayout();
......@@ -683,7 +685,7 @@ void SelectableFilesDialogEditFiles::applyFilter()
}
SelectableFilesDialogAddDirectory::SelectableFilesDialogAddDirectory(const QString &path,
const QStringList files, QWidget *parent) :
const QStringList &files, QWidget *parent) :
SelectableFilesDialogEditFiles(path, files, parent)
{
setWindowTitle(tr("Add Existing Directory"));
......
......@@ -150,7 +150,7 @@ class PROJECTEXPLORER_EXPORT SelectableFilesDialogEditFiles : public QDialog
Q_OBJECT
public:
SelectableFilesDialogEditFiles(const QString &path, const QStringList files, QWidget *parent);
SelectableFilesDialogEditFiles(const QString &path, const QStringList &files, QWidget *parent);
~SelectableFilesDialogEditFiles();
QStringList selectedFiles() const;
......@@ -185,7 +185,7 @@ class SelectableFilesDialogAddDirectory : public SelectableFilesDialogEditFiles
Q_OBJECT
public:
SelectableFilesDialogAddDirectory(const QString &path, const QStringList files, QWidget *parent);
SelectableFilesDialogAddDirectory(const QString &path, const QStringList &files, QWidget *parent);
private slots:
void validityOfDirectoryChanged(bool validState);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment