Commit bc6c5b99 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Core: Pass const values by reference



Change-Id: I44f16528f2ee8fb41351153bab8dc340f4f2cca1
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent a77e75c3
......@@ -140,7 +140,7 @@ ReadOnlyFilesDialog::ReadOnlyFilesDialog(IDocument *document, QWidget *parent,
initDialog(QStringList() << document->filePath());
}
ReadOnlyFilesDialog::ReadOnlyFilesDialog(const QList<IDocument *> documents, QWidget *parent)
ReadOnlyFilesDialog::ReadOnlyFilesDialog(const QList<IDocument *> &documents, QWidget *parent)
: QDialog(parent)
, d(new ReadOnlyFilesDialogPrivate)
, ui(new Ui::ReadOnlyFilesDialog)
......
......@@ -78,7 +78,7 @@ public:
explicit ReadOnlyFilesDialog(IDocument *document,
QWidget * parent = 0,
bool displaySaveAs = false);
explicit ReadOnlyFilesDialog(const QList<IDocument *> documents,
explicit ReadOnlyFilesDialog(const QList<IDocument *> &documents,
QWidget * parent = 0);
~ReadOnlyFilesDialog();
......
......@@ -59,7 +59,7 @@ void SearchResultTreeModel::setShowReplaceUI(bool show)
m_showReplaceUI = show;
}
void SearchResultTreeModel::setTextEditorFont(const QFont &font, const SearchResultColor color)
void SearchResultTreeModel::setTextEditorFont(const QFont &font, const SearchResultColor &color)
{
layoutAboutToBeChanged();
m_textEditorFont = font;
......
......@@ -50,7 +50,7 @@ public:
~SearchResultTreeModel();
void setShowReplaceUI(bool show);
void setTextEditorFont(const QFont &font, const SearchResultColor color);
void setTextEditorFont(const QFont &font, const SearchResultColor &color);
Qt::ItemFlags flags(const QModelIndex &index) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
......
......@@ -58,7 +58,7 @@ void SearchResultTreeView::setAutoExpandResults(bool expand)
m_autoExpandResults = expand;
}
void SearchResultTreeView::setTextEditorFont(const QFont &font, const SearchResultColor color)
void SearchResultTreeView::setTextEditorFont(const QFont &font, const SearchResultColor &color)
{
m_model->setTextEditorFont(font, color);
......
......@@ -48,7 +48,7 @@ public:
explicit SearchResultTreeView(QWidget *parent = 0);
void setAutoExpandResults(bool expand);
void setTextEditorFont(const QFont &font, const SearchResultColor color);
void setTextEditorFont(const QFont &font, const SearchResultColor &color);
SearchResultTreeModel *model() const;
void addResults(const QList<SearchResultItem> &items, SearchResult::AddMode mode);
......
......@@ -341,7 +341,7 @@ void SearchResultWidget::notifyVisibilityChanged(bool visible)
emit visibilityChanged(visible);
}
void SearchResultWidget::setTextEditorFont(const QFont &font, const SearchResultColor color)
void SearchResultWidget::setTextEditorFont(const QFont &font, const SearchResultColor &color)
{
m_searchResultTreeView->setTextEditorFont(font, color);
}
......
......@@ -79,7 +79,7 @@ public:
void notifyVisibilityChanged(bool visible);
void setTextEditorFont(const QFont &font, const SearchResultColor color);
void setTextEditorFont(const QFont &font, const SearchResultColor &color);
void setAutoExpandResults(bool expand);
void expandAll();
......
......@@ -48,7 +48,7 @@ void Animation::paint(QPainter *painter, const QStyleOption *option)
Q_UNUSED(painter)
}
void Animation::drawBlendedImage(QPainter *painter, QRect rect, float alpha)
void Animation::drawBlendedImage(QPainter *painter, const QRect &rect, float alpha)
{
if (m_secondaryImage.isNull() || m_primaryImage.isNull())
return;
......
......@@ -58,7 +58,7 @@ public :
virtual void paint(QPainter *painter, const QStyleOption *option);
protected:
void drawBlendedImage(QPainter *painter, QRect rect, float value);
void drawBlendedImage(QPainter *painter, const QRect &rect, float value);
QTime m_startTime;
QPointer<QWidget> m_widget;
QImage m_primaryImage;
......
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