kate: const-ify the argument of KateFileBrowser::setDir()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-07-03 18:48:14 +03:00
parent 0ccc580f03
commit f9dd7a42e8
2 changed files with 4 additions and 4 deletions

View file

@ -200,14 +200,14 @@ bool kateFileSelectorIsReadable (const KUrl& url)
return dir.exists ();
}
void KateFileBrowser::setDir(KUrl u)
void KateFileBrowser::setDir(const KUrl& url)
{
KUrl newurl;
if (!u.isValid())
if (!url.isValid())
newurl.setPath(QDir::homePath());
else
newurl = u;
newurl = url;
QString pathstr = newurl.path(KUrl::AddTrailingSlash);
newurl.setPath(pathstr);

View file

@ -68,7 +68,7 @@ class KateFileBrowser : public KVBox
public Q_SLOTS:
void slotFilterChange(const QString&);
void setDir(KUrl);
void setDir(const KUrl& url);
void setDir( const QString& url ) { setDir( KUrl( url ) ); }
void selectorViewChanged( QAbstractItemView * );