Replace Utils::String::toStdString() by QString::toStdString()

This commit is contained in:
Chocobo1
2017-03-06 23:51:35 +08:00
parent 7539bee5c5
commit ffdcfe9686
9 changed files with 34 additions and 40 deletions

View File

@@ -64,7 +64,7 @@ TorrentInfo TorrentInfo::loadFromFile(const QString &path, QString &error)
{
error.clear();
libt::error_code ec;
TorrentInfo info(NativePtr(new libt::torrent_info(Utils::String::toStdString(Utils::Fs::toNativePath(path)), ec)));
TorrentInfo info(NativePtr(new libt::torrent_info(Utils::Fs::toNativePath(path).toStdString(), ec)));
if (ec) {
error = QString::fromUtf8(ec.message().c_str());
qDebug("Cannot load .torrent file: %s", qPrintable(error));
@@ -279,7 +279,7 @@ TorrentInfo::PieceRange TorrentInfo::filePieces(int fileIndex) const
void TorrentInfo::renameFile(uint index, const QString &newPath)
{
if (!isValid()) return;
nativeInfo()->rename_file(index, Utils::String::toStdString(newPath));
nativeInfo()->rename_file(index, newPath.toStdString());
}
int BitTorrent::TorrentInfo::fileIndex(const QString& fileName) const