Commit 3e89701e authored by Laurent Montel's avatar Laurent Montel 😁

Consti'fy

parent c5044abc
......@@ -34,7 +34,7 @@ class ResultNode
ResultNode(const char *_name, const bool _dir = false) : ResultNode(QString::fromLatin1(_name), _dir) {}
ResultNode(const QString &_name, const bool _dir = false) : name(_name), dir(_dir), children() {}
ResultNode &operator<<(ResultNode node) { children << node; return *this; }
ResultNode &operator<<(const ResultNode &node) { children << node; return *this; }
bool operator!=(const ResultNode &other) const { return !(*this == other); }
bool operator==(const ResultNode &other) const
......
......@@ -66,7 +66,7 @@ Q_SIGNALS:
void closeDocument(KTextEditor::Document *);
void activateDocument(KTextEditor::Document *);
void openDocument(QUrl);
void openDocument(const QUrl&);
void viewModeChanged(bool treeMode);
void sortRoleChanged(int);
......
......@@ -83,7 +83,7 @@ QVariant ConnectionModel::data(const QModelIndex &index, int role) const
return QVariant();
}
int ConnectionModel::addConnection( Connection conn )
int ConnectionModel::addConnection( const Connection &conn )
{
/// FIXME
if (m_connections.contains(conn.name))
......
......@@ -37,7 +37,7 @@ class ConnectionModel : public QAbstractListModel
int rowCount ( const QModelIndex & parent = QModelIndex() ) const override;
QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const override;
virtual int addConnection(Connection conn);
virtual int addConnection(const Connection &conn);
virtual void removeConnection(const QString &name);
Connection::Status status(const QString &name) const;
......
......@@ -49,7 +49,7 @@ bool KateAppAdaptor::openUrl(const QString &url, const QString &encoding)
return m_app->openUrl(QUrl(url), encoding, false);
}
bool KateAppAdaptor::openUrl(QString url, QString encoding, bool isTempFile)
bool KateAppAdaptor::openUrl(const QString &url, const QString &encoding, bool isTempFile)
{
qCDebug(LOG_KATE) << "openURL";
......
......@@ -70,7 +70,7 @@ public Q_SLOTS:
* @p isTempFile should be set to true with the --tempfile option set ONLY,
* files opened with this set to true will be deleted when closed.
*/
bool openUrl(QString url, QString encoding, bool isTempFile);
bool openUrl(const QString &url, const QString &encoding, bool isTempFile);
QString tokenOpenUrl(const QString &url, const QString &encoding, bool isTempFile);
......
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