mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 20:44:15 +00:00
Fix other unicode issues
This commit is contained in:
parent
ba4a0fac77
commit
656beed82b
@ -318,7 +318,7 @@ std::vector<int> QTorrentHandle::file_priorities() const {
|
|||||||
|
|
||||||
QString QTorrentHandle::creator() const {
|
QString QTorrentHandle::creator() const {
|
||||||
Q_ASSERT(h.is_valid());
|
Q_ASSERT(h.is_valid());
|
||||||
return misc::toQString(h.get_torrent_info().creator());
|
return misc::toQStringU(h.get_torrent_info().creator());
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QTorrentHandle::comment() const {
|
QString QTorrentHandle::comment() const {
|
||||||
@ -379,7 +379,7 @@ QStringList QTorrentHandle::files_path() const {
|
|||||||
QStringList res;
|
QStringList res;
|
||||||
torrent_info::file_iterator fi = h.get_torrent_info().begin_files();
|
torrent_info::file_iterator fi = h.get_torrent_info().begin_files();
|
||||||
while(fi != h.get_torrent_info().end_files()) {
|
while(fi != h.get_torrent_info().end_files()) {
|
||||||
res << QDir::cleanPath(saveDir.absoluteFilePath(misc::toQString(fi->path.string())));
|
res << QDir::cleanPath(saveDir.absoluteFilePath(misc::toQStringU(fi->path.string())));
|
||||||
fi++;
|
fi++;
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
@ -452,7 +452,7 @@ bool QTorrentHandle::priv() const {
|
|||||||
QString QTorrentHandle::root_path() const {
|
QString QTorrentHandle::root_path() const {
|
||||||
Q_ASSERT(h.is_valid());
|
Q_ASSERT(h.is_valid());
|
||||||
if(num_files() == 0) return "";
|
if(num_files() == 0) return "";
|
||||||
QStringList path_list = misc::toQString(h.get_torrent_info().file_at(0).path.string()).split("/");
|
QStringList path_list = misc::toQStringU(h.get_torrent_info().file_at(0).path.string()).split("/");
|
||||||
if(path_list.size() > 1)
|
if(path_list.size() > 1)
|
||||||
return save_path()+"/"+path_list.first();
|
return save_path()+"/"+path_list.first();
|
||||||
return save_path();
|
return save_path();
|
||||||
@ -703,7 +703,7 @@ void QTorrentHandle::prioritize_first_last_piece(bool b) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void QTorrentHandle::rename_file(int index, QString name) {
|
void QTorrentHandle::rename_file(int index, QString name) {
|
||||||
h.rename_file(index, std::string(name.toLocal8Bit().constData()));
|
h.rename_file(index, std::string(name.toUtf8().constData()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user