mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Several OS/2 fixes from Silvan Scherrer
This commit is contained in:
parent
8ee762695b
commit
778cfff4b3
9 changed files with 34 additions and 26 deletions
|
@ -53,7 +53,7 @@ torrentAdditionDialog::torrentAdditionDialog(GUI *parent, Bittorrent* _BTSession
|
|||
defaultSavePath = Preferences::getSavePath();
|
||||
appendLabelToSavePath = Preferences::appendTorrentLabel();
|
||||
QString display_path = defaultSavePath;
|
||||
#ifdef Q_WS_WIN
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
display_path = display_path.replace("/", "\\");
|
||||
#endif
|
||||
savePathTxt->setText(display_path);
|
||||
|
@ -196,7 +196,7 @@ void torrentAdditionDialog::showLoad(QString filePath, QString from_url) {
|
|||
}
|
||||
QString root_folder = misc::truncateRootFolder(t);
|
||||
QString save_path = savePathTxt->text();
|
||||
#ifdef Q_WS_WIN
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
save_path = save_path.replace("/", "\\");
|
||||
#endif
|
||||
if(!save_path.endsWith(QDir::separator()))
|
||||
|
@ -208,7 +208,7 @@ void torrentAdditionDialog::showLoad(QString filePath, QString from_url) {
|
|||
if(nbFiles == 1) {
|
||||
// single file torrent
|
||||
QString single_file_relpath = misc::toQStringU(t->file_at(0).path.string());
|
||||
#ifdef Q_WS_WIN
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
single_file_relpath = single_file_relpath.replace("/", "\\");
|
||||
#endif
|
||||
savePathTxt->setText(save_path+single_file_relpath);
|
||||
|
@ -425,7 +425,7 @@ void torrentAdditionDialog::renameSelectedFile() {
|
|||
void torrentAdditionDialog::on_browseButton_clicked(){
|
||||
QString new_path;
|
||||
QString save_path = savePathTxt->text();
|
||||
#ifdef Q_WS_WIN
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
save_path = save_path.replace("\\", "/");
|
||||
#endif
|
||||
save_path = misc::expandPath(save_path);
|
||||
|
@ -440,7 +440,7 @@ void torrentAdditionDialog::renameSelectedFile() {
|
|||
}
|
||||
}
|
||||
if(!new_path.isEmpty()){
|
||||
#ifdef Q_WS_WIN
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
new_path = new_path.replace("/", "\\");
|
||||
#endif
|
||||
savePathTxt->setText(new_path);
|
||||
|
@ -467,7 +467,7 @@ void torrentAdditionDialog::renameSelectedFile() {
|
|||
return;
|
||||
}
|
||||
QString save_path = savePathTxt->text();
|
||||
#ifdef Q_WS_WIN
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
save_path = save_path.replace("\\", "/");
|
||||
#endif
|
||||
save_path = misc::expandPath(save_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue