[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [Amarok] 4ac9376: Fix CollectionScanner on Windows so that it proper
From:       Alejandro Wainzinger <aikawarazuni () gmail ! com>
Date:       2010-03-30 11:03:03
Message-ID: 201003301103.o2UB33vi029993 () kore ! kollide ! net
[Download RAW message or body]

commit 4ac9376e232253867c1a2655d4d44f977750cf02
Author: Alejandro Wainzinger <aikawarazuni@gmail.com>
Date:   Tue Mar 30 03:58:00 2010 -0800

    Fix CollectionScanner on Windows so that it properly reads filepaths with \
non-ascii characters in them. Windows users, please test, but it should just work.

diff --git a/utilities/collectionscanner/CollectionScanner.cpp \
b/utilities/collectionscanner/CollectionScanner.cpp index 30d9a27..86caf70 100644
--- a/utilities/collectionscanner/CollectionScanner.cpp
+++ b/utilities/collectionscanner/CollectionScanner.cpp
@@ -550,13 +550,16 @@ CollectionScanner::readTags( const QString &path, \
TagLib::AudioProperties::ReadS  //  Average                     Untested
     //  Accurate                    Untested
 
-
+#ifdef Q_OS_WIN32
+	const wchar_t * encodedName = reinterpret_cast<const wchar_t *>(path.utf16());
+#else
 #ifdef COMPLEX_TAGLIB_FILENAME
     const wchar_t * encodedName = reinterpret_cast<const wchar_t *>(path.utf16());
 #else
     QByteArray fileName = QFile::encodeName( path );
     const char * encodedName = fileName.constData(); // valid as long as fileName \
exists  #endif
+#endif
 
     TagLib::FileRef fileref;
     TagLib::Tag *tag = 0;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic