1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 19:31:02 +01:00

const& and tweaks to Mac directory canonicalisation.

This commit is contained in:
John Maguire 2012-01-05 16:11:39 +00:00
parent 761737eb4d
commit 483c36748e
3 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ void MacFSListener::EventStreamCallback(
for (int i = 0; i < num_events; ++i) {
QString path = QString::fromUtf8(paths[i]);
qLog(Debug) << "Something changed at:" << path;
if (path.endsWith('/')) {
while (path.endsWith('/')) {
path.chop(1);
}
emit me->PathChanged(path);

View File

@ -546,7 +546,7 @@ uint LibraryWatcher::GetMtimeForCue(const QString& cue_path) {
: 0;
}
void LibraryWatcher::AddWatch(DirData dir, const QString& path) {
void LibraryWatcher::AddWatch(const DirData& dir, const QString& path) {
if (!QFile::exists(path))
return;

View File

@ -152,7 +152,7 @@ class LibraryWatcher : public QObject {
inline static QString DirectoryPart( const QString &fileName );
QString PickBestImage(const QStringList& images);
QString ImageForSong(const QString& path, QMap<QString, QStringList>& album_art);
void AddWatch(DirData dir, const QString& path);
void AddWatch(const DirData& dir, const QString& path);
uint GetMtimeForCue(const QString& cue_path);
void PerformScan(bool incremental, bool ignore_mtimes);