Commit 589535c1 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

CppTools: Pass some const variables by reference

Change-Id: I3e703c923f6e1a14a89c76f394a070184db0c7bf
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent 28f5c46c
......@@ -181,7 +181,7 @@ static const char pp_configuration[] =
"#define __inline inline\n"
"#define __forceinline inline\n";
QStringList CppModelManager::timeStampModifiedFiles(const QList<Document::Ptr> documentsToCheck)
QStringList CppModelManager::timeStampModifiedFiles(const QList<Document::Ptr> &documentsToCheck)
{
QStringList sourceFiles;
......
......@@ -154,7 +154,7 @@ public:
void enableGarbageCollector(bool enable);
static QStringList timeStampModifiedFiles(const QList<Document::Ptr> documentsToCheck);
static QStringList timeStampModifiedFiles(const QList<Document::Ptr> &documentsToCheck);
signals:
void gcFinished(); // Needed for tests.
......
......@@ -89,7 +89,7 @@ public:
{}
/// 'files' is expected to be a list of file names that reside in 'dir'.
void create(const QString &name, const QString &dir, const QStringList files)
void create(const QString &name, const QString &dir, const QStringList &files)
{
const MyTestDataDir projectDir(dir);
foreach (const QString &file, files)
......
......@@ -117,7 +117,7 @@ static unsigned firstTypeSpecifierWithoutFollowingAttribute(
}
PointerDeclarationFormatter::PointerDeclarationFormatter(
const CppRefactoringFilePtr refactoringFile,
const CppRefactoringFilePtr &refactoringFile,
Overview &overview,
CursorHandling cursorHandling)
: ASTVisitor(refactoringFile->cppDocument()->translationUnit())
......
......@@ -77,7 +77,7 @@ public:
*/
enum CursorHandling { RespectCursor, IgnoreCursor };
explicit PointerDeclarationFormatter(const CppRefactoringFilePtr refactoringFile,
explicit PointerDeclarationFormatter(const CppRefactoringFilePtr &refactoringFile,
Overview &overview,
CursorHandling cursorHandling = IgnoreCursor);
......
......@@ -47,7 +47,7 @@ SearchSymbols::SearchSymbols() :
{
}
void SearchSymbols::setSymbolsToSearchFor(SymbolTypes types)
void SearchSymbols::setSymbolsToSearchFor(const SymbolTypes &types)
{
symbolsToSearchFor = types;
}
......
......@@ -142,7 +142,7 @@ public:
SearchSymbols();
void setSymbolsToSearchFor(SymbolTypes types);
void setSymbolsToSearchFor(const SymbolTypes &types);
QList<ModelItemInfo> operator()(CPlusPlus::Document::Ptr doc, int sizeHint = 500)
{ return operator()(doc, sizeHint, QString()); }
......
......@@ -66,7 +66,7 @@ public:
void writeSettings(QSettings *settings);
void readSettings(QSettings *settings);
void setSymbolsToSearch(SearchSymbols::SymbolTypes types) { m_symbolsToSearch = types; }
void setSymbolsToSearch(const SearchSymbols::SymbolTypes &types) { m_symbolsToSearch = types; }
SearchSymbols::SymbolTypes symbolsToSearch() const { return m_symbolsToSearch; }
void setSearchScope(SearchScope scope) { m_scope = scope; }
......
Markdown is supported
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