aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/converter/converter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/General/converter/converter.cpp')
-rw-r--r--src/plugins/General/converter/converter.cpp16
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());