mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 09:13:08 -07:00
Fix compilation on Windows
This commit is contained in:
parent
658d876ff7
commit
12195b186b
3 changed files with 6 additions and 5 deletions
|
@ -730,7 +730,7 @@ void PropertiesWidget::renameSelectedFile() {
|
||||||
// Rename the file
|
// Rename the file
|
||||||
Q_ASSERT(!new_file_name.isEmpty());
|
Q_ASSERT(!new_file_name.isEmpty());
|
||||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||||
if(h.file_at(0).compare(new_file_name, Qt::CaseInsensitive) != 0) {
|
if(h.filename_at(0).compare(new_file_name, Qt::CaseInsensitive) != 0) {
|
||||||
#else
|
#else
|
||||||
if(h.filename_at(0).compare(new_file_name, Qt::CaseSensitive) != 0) {
|
if(h.filename_at(0).compare(new_file_name, Qt::CaseSensitive) != 0) {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -93,7 +93,7 @@ void TorrentImportDlg::on_browseContentBtn_clicked()
|
||||||
}
|
}
|
||||||
// Update display
|
// Update display
|
||||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||||
ui->lineContent->setText(m_contentPath.replace("/", "\\");
|
ui->lineContent->setText(m_contentPath.replace("/", "\\"));
|
||||||
#else
|
#else
|
||||||
ui->lineContent->setText(m_contentPath);
|
ui->lineContent->setText(m_contentPath);
|
||||||
#endif
|
#endif
|
||||||
|
@ -131,7 +131,7 @@ void TorrentImportDlg::on_browseContentBtn_clicked()
|
||||||
}
|
}
|
||||||
// Update the display
|
// Update the display
|
||||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||||
ui->lineContent->setText(m_contentPath.replace("/", "\\");
|
ui->lineContent->setText(m_contentPath.replace("/", "\\"));
|
||||||
#else
|
#else
|
||||||
ui->lineContent->setText(m_contentPath);
|
ui->lineContent->setText(m_contentPath);
|
||||||
#endif
|
#endif
|
||||||
|
@ -222,7 +222,8 @@ void TorrentImportDlg::loadTorrent(const QString &torrent_path)
|
||||||
misc::truncateRootFolder(t);
|
misc::truncateRootFolder(t);
|
||||||
// Update display
|
// Update display
|
||||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||||
ui->lineTorrent->setText(torrent_path.replace("/", "\\"));
|
QString tmp = torrent_path;
|
||||||
|
ui->lineTorrent->setText(tmp.replace("/", "\\"));
|
||||||
#else
|
#else
|
||||||
ui->lineTorrent->setText(torrent_path);
|
ui->lineTorrent->setText(torrent_path);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -224,7 +224,7 @@ void QTracker::ReplyWithPeerList(QTcpSocket *socket, const TrackerAnnounceReques
|
||||||
// bencode
|
// bencode
|
||||||
std::vector<char> buf;
|
std::vector<char> buf;
|
||||||
bencode(std::back_inserter(buf), reply_entry);
|
bencode(std::back_inserter(buf), reply_entry);
|
||||||
QByteArray reply(buf.data(), buf.size());
|
QByteArray reply(&buf[0], buf.size());
|
||||||
qDebug("QTracker: reply with the following bencoded data:\n %s", reply.constData());
|
qDebug("QTracker: reply with the following bencoded data:\n %s", reply.constData());
|
||||||
// HTTP reply
|
// HTTP reply
|
||||||
QHttpResponseHeader response;
|
QHttpResponseHeader response;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue