1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-20 07:52:30 +02:00

Fix scanning of files with non-latin chars in their names

This commit is contained in:
Dominik Schmidt 2014-10-17 19:14:38 +02:00
parent 63884bf74b
commit 223be945eb
2 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,8 @@
#include "SourceList.h"
#include "TomahawkSettings.h"
#include "config.h"
#include <QCoreApplication>
using namespace Tomahawk;
@ -405,7 +407,7 @@ MusicScanner::readTags( const QFileInfo& fi )
return QVariantMap(); // invalid extension
#ifdef COMPLEX_TAGLIB_FILENAME
const wchar_t *encodedName = reinterpret_cast< const wchar_t * >( fi.canonicalFilePath().utf16() );
const wchar_t *encodedName = fi.canonicalFilePath().toStdWString().c_str();
#else
QByteArray fileName = QFile::encodeName( fi.canonicalFilePath() );
const char *encodedName = fileName.constData();

View File

@ -23,5 +23,6 @@
#cmakedefine QCA2_FOUND
#cmakedefine TOMAHAWK_FINEGRAINED_MESSAGES
#cmakedefine COMPLEX_TAGLIB_FILENAME
#endif // CONFIG_H_IN