|
|
@ -382,13 +382,13 @@ void options_imp::saveOptions(){ |
|
|
|
// Downloads preferences
|
|
|
|
// Downloads preferences
|
|
|
|
QString save_path = getSavePath(); |
|
|
|
QString save_path = getSavePath(); |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
save_path = save_path.replace("\\", "/"); |
|
|
|
save_path.replace("\\", "/"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
pref.setSavePath(save_path); |
|
|
|
pref.setSavePath(save_path); |
|
|
|
pref.setTempPathEnabled(isTempPathEnabled()); |
|
|
|
pref.setTempPathEnabled(isTempPathEnabled()); |
|
|
|
QString temp_path = getTempPath(); |
|
|
|
QString temp_path = getTempPath(); |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
temp_path = temp_path.replace("\\", "/"); |
|
|
|
temp_path.replace("\\", "/"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
pref.setTempPath(temp_path); |
|
|
|
pref.setTempPath(temp_path); |
|
|
|
pref.setAppendTorrentLabel(checkAppendLabel->isChecked()); |
|
|
|
pref.setAppendTorrentLabel(checkAppendLabel->isChecked()); |
|
|
@ -402,7 +402,7 @@ void options_imp::saveOptions(){ |
|
|
|
addedScanDirs.clear(); |
|
|
|
addedScanDirs.clear(); |
|
|
|
QString export_dir = getExportDir(); |
|
|
|
QString export_dir = getExportDir(); |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
export_dir = export_dir.replace("\\", "/"); |
|
|
|
export_dir.replace("\\", "/"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
pref.setExportDir(export_dir); |
|
|
|
pref.setExportDir(export_dir); |
|
|
|
pref.setMailNotificationEnabled(groupMailNotification->isChecked()); |
|
|
|
pref.setMailNotificationEnabled(groupMailNotification->isChecked()); |
|
|
@ -462,7 +462,7 @@ void options_imp::saveOptions(){ |
|
|
|
if(isFilteringEnabled()){ |
|
|
|
if(isFilteringEnabled()){ |
|
|
|
QString filter_path = textFilterPath->text(); |
|
|
|
QString filter_path = textFilterPath->text(); |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
filter_path = filter_path.replace("\\", "/"); |
|
|
|
filter_path.replace("\\", "/"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
pref.setFilter(filter_path); |
|
|
|
pref.setFilter(filter_path); |
|
|
|
} |
|
|
|
} |
|
|
@ -554,7 +554,7 @@ void options_imp::loadOptions(){ |
|
|
|
// Downloads preferences
|
|
|
|
// Downloads preferences
|
|
|
|
QString save_path = pref.getSavePath(); |
|
|
|
QString save_path = pref.getSavePath(); |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
save_path = save_path.replace("/", "\\"); |
|
|
|
save_path.replace("/", "\\"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
textSavePath->setText(save_path); |
|
|
|
textSavePath->setText(save_path); |
|
|
|
if(pref.isTempPathEnabled()) { |
|
|
|
if(pref.isTempPathEnabled()) { |
|
|
@ -565,7 +565,7 @@ void options_imp::loadOptions(){ |
|
|
|
} |
|
|
|
} |
|
|
|
QString temp_path = pref.getTempPath(); |
|
|
|
QString temp_path = pref.getTempPath(); |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
temp_path = temp_path.replace("/", "\\"); |
|
|
|
temp_path.replace("/", "\\"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
textTempPath->setText(temp_path); |
|
|
|
textTempPath->setText(temp_path); |
|
|
|
checkAppendLabel->setChecked(pref.appendTorrentLabel()); |
|
|
|
checkAppendLabel->setChecked(pref.appendTorrentLabel()); |
|
|
@ -584,7 +584,7 @@ void options_imp::loadOptions(){ |
|
|
|
// enable
|
|
|
|
// enable
|
|
|
|
checkExportDir->setChecked(true); |
|
|
|
checkExportDir->setChecked(true); |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
strValue = strValue.replace("/", "\\"); |
|
|
|
strValue.replace("/", "\\"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
textExportDir->setText(strValue); |
|
|
|
textExportDir->setText(strValue); |
|
|
|
} |
|
|
|
} |
|
|
@ -855,7 +855,7 @@ QString options_imp::getSavePath() const{ |
|
|
|
if(textSavePath->text().trimmed().isEmpty()){ |
|
|
|
if(textSavePath->text().trimmed().isEmpty()){ |
|
|
|
QString save_path = Preferences().getSavePath(); |
|
|
|
QString save_path = Preferences().getSavePath(); |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
save_path = save_path.replace("/", "\\"); |
|
|
|
save_path.replace("/", "\\"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
textSavePath->setText(save_path); |
|
|
|
textSavePath->setText(save_path); |
|
|
|
} |
|
|
|
} |
|
|
@ -1093,7 +1093,7 @@ void options_imp::on_browseExportDirButton_clicked() { |
|
|
|
} |
|
|
|
} |
|
|
|
if(!dir.isNull()){ |
|
|
|
if(!dir.isNull()){ |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
dir = dir.replace("/", "\\"); |
|
|
|
dir.replace("/", "\\"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
textExportDir->setText(dir); |
|
|
|
textExportDir->setText(dir); |
|
|
|
} |
|
|
|
} |
|
|
@ -1110,7 +1110,7 @@ void options_imp::on_browseFilterButton_clicked() { |
|
|
|
} |
|
|
|
} |
|
|
|
if(!ipfilter.isNull()){ |
|
|
|
if(!ipfilter.isNull()){ |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
ipfilter = ipfilter.replace("/", "\\"); |
|
|
|
ipfilter.replace("/", "\\"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
textFilterPath->setText(ipfilter); |
|
|
|
textFilterPath->setText(ipfilter); |
|
|
|
} |
|
|
|
} |
|
|
@ -1128,7 +1128,7 @@ void options_imp::on_browseSaveDirButton_clicked(){ |
|
|
|
} |
|
|
|
} |
|
|
|
if(!dir.isNull()){ |
|
|
|
if(!dir.isNull()){ |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
dir = dir.replace("/", "\\"); |
|
|
|
dir.replace("/", "\\"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
textSavePath->setText(dir); |
|
|
|
textSavePath->setText(dir); |
|
|
|
} |
|
|
|
} |
|
|
@ -1145,7 +1145,7 @@ void options_imp::on_browseTempDirButton_clicked(){ |
|
|
|
} |
|
|
|
} |
|
|
|
if(!dir.isNull()){ |
|
|
|
if(!dir.isNull()){ |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
#if defined(Q_WS_WIN) || defined(Q_OS_OS2) |
|
|
|
dir = dir.replace("/", "\\"); |
|
|
|
dir.replace("/", "\\"); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
textTempPath->setText(dir); |
|
|
|
textTempPath->setText(dir); |
|
|
|
} |
|
|
|
} |
|
|
|