summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Hindenburg <[email protected]>2015-09-15 10:23:08 -0400
committerKurt Hindenburg <[email protected]>2015-09-15 10:23:08 -0400
commit917d932f46e12297dcc666d8daf2e5c53b331d76 (patch)
tree0092f54d20f1998abb12ed040f59e183f728274d
parent104f3dd1ef992818235adbb56675682f1ca1125f (diff)
Add const and &
-rw-r--r--src/CopyInputDialog.cpp2
-rw-r--r--src/CopyInputDialog.h2
-rw-r--r--src/ViewManager.cpp2
-rw-r--r--src/ViewManager.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/CopyInputDialog.cpp b/src/CopyInputDialog.cpp
index a5c535a..3e50f53 100644
--- a/src/CopyInputDialog.cpp
+++ b/src/CopyInputDialog.cpp
@@ -184,7 +184,7 @@ bool CheckableSessionModel::setData(const QModelIndex& index, const QVariant& va
return SessionListModel::setData(index, value, role);
}
}
-void CheckableSessionModel::setCheckedSessions(const QSet<Session*> sessions)
+void CheckableSessionModel::setCheckedSessions(const QSet<Session*>& sessions)
{
beginResetModel();
_checkedSessions = sessions;
diff --git a/src/CopyInputDialog.h b/src/CopyInputDialog.h
index ae22c85..3822b24 100644
--- a/src/CopyInputDialog.h
+++ b/src/CopyInputDialog.h
@@ -109,7 +109,7 @@ public:
void setCheckable(Session* session, bool checkable);
/** Sets the list of sessions which are currently checked. */
- void setCheckedSessions(const QSet<Session*> sessions);
+ void setCheckedSessions(const QSet<Session*>& sessions);
/** Returns the set of checked sessions. */
QSet<Session*> checkedSessions() const;
diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp
index c21f786..f9baaff 100644
--- a/src/ViewManager.cpp
+++ b/src/ViewManager.cpp
@@ -987,7 +987,7 @@ int ViewManager::newSession()
return session->sessionId();
}
-int ViewManager::newSession(QString profile, QString directory)
+int ViewManager::newSession(const QString& profile, const QString& directory)
{
const QList<Profile::Ptr> profilelist = ProfileManager::instance()->allProfiles();
Profile::Ptr profileptr = ProfileManager::instance()->defaultProfile();
diff --git a/src/ViewManager.h b/src/ViewManager.h
index ee86471..4f560f7 100644
--- a/src/ViewManager.h
+++ b/src/ViewManager.h
@@ -237,7 +237,7 @@ public slots:
* @param directory the working directory where the session is
* started.
*/
- Q_SCRIPTABLE int newSession(QString profile, QString directory);
+ Q_SCRIPTABLE int newSession(const QString& profile, const QString& directory);
// TODO: its semantic is application-wide. Move it to more appropriate place
// DBus slot that returns the name of default profile