diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-11-25 18:00:06 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2017-11-25 18:00:06 +0000 |
| commit | 8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a (patch) | |
| tree | 15d339b62e98d5858a57aa787334e14f0e2f0ad7 /src/plugins/General/converter/converter.cpp | |
| parent | 6fc05db7c6de9a51beba754f12ff4ac32859977d (diff) | |
| download | qmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.tar.gz qmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.tar.bz2 qmmp-8453224119a4c5ff7d47d9cd4924d0b1ccb99b3a.zip | |
copy 1.2 branch to trunk
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@7772 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/converter/converter.cpp')
| -rw-r--r-- | src/plugins/General/converter/converter.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/plugins/General/converter/converter.cpp b/src/plugins/General/converter/converter.cpp index 32a63ec53..f11a28ca5 100644 --- a/src/plugins/General/converter/converter.cpp +++ b/src/plugins/General/converter/converter.cpp @@ -20,7 +20,7 @@ #include <stdio.h> #include <QStringList> -#include <QDesktopServices> +#include <QStandardPaths> #include <qmmp/inputsourcefactory.h> #include <qmmp/decoderfactory.h> #include <qmmp/metadatamanager.h> @@ -33,8 +33,6 @@ #include <taglib/mpegfile.h> #include "converter.h" -#define QStringToTString_qt4(s) TagLib::String(s.toUtf8().constData(), TagLib::String::UTF8) - Converter::Converter(QObject *parent) : QObject(parent), QRunnable() { m_user_stop = false; @@ -170,7 +168,7 @@ void Converter::run() QString command = m_preset["command"].toString(); command.replace("%o", "\"" + full_path + "\""); - QString tmp_path = QDesktopServices::storageLocation(QDesktopServices::TempLocation) + "/tmp.wav"; + QString tmp_path = QStandardPaths::writableLocation(QStandardPaths::TempLocation) + "/tmp.wav"; bool use_file = command.contains("%i"); command.replace("%i", "\"" + tmp_path + "\""); @@ -258,11 +256,11 @@ void Converter::run() TagLib::FileRef file(qPrintable(full_path)); if(file.tag()) { - file.tag()->setTitle(QStringToTString_qt4(metadata[Qmmp::TITLE])); - file.tag()->setArtist(QStringToTString_qt4(metadata[Qmmp::ARTIST])); - file.tag()->setAlbum(QStringToTString_qt4(metadata[Qmmp::ALBUM])); - file.tag()->setGenre(QStringToTString_qt4(metadata[Qmmp::GENRE])); - file.tag()->setComment(QStringToTString_qt4(metadata[Qmmp::COMMENT])); + file.tag()->setTitle(QStringToTString(metadata[Qmmp::TITLE])); + file.tag()->setArtist(QStringToTString(metadata[Qmmp::ARTIST])); + file.tag()->setAlbum(QStringToTString(metadata[Qmmp::ALBUM])); + file.tag()->setGenre(QStringToTString(metadata[Qmmp::GENRE])); + file.tag()->setComment(QStringToTString(metadata[Qmmp::COMMENT])); file.tag()->setYear(metadata[Qmmp::YEAR].toUInt()); file.tag()->setTrack(metadata[Qmmp::TRACK].toUInt()); |
