1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-25 22:14:32 +00:00

Save trimmed string in preference

This commit is contained in:
Chocobo1 2015-07-19 16:37:02 +08:00
parent 6721363f8c
commit ff8f37b262
2 changed files with 2 additions and 2 deletions

View File

@ -139,7 +139,7 @@ void Application::torrentFinished(BitTorrent::TorrentHandle *const torrent)
// AutoRun program // AutoRun program
if (pref->isAutoRunEnabled()) { if (pref->isAutoRunEnabled()) {
QString program = pref->getAutoRunProgram().trimmed(); QString program = pref->getAutoRunProgram();
// Replace %f by torrent path // Replace %f by torrent path
program.replace("%f", torrent->savePathParsed()); program.replace("%f", torrent->savePathParsed());
// Replace %n by torrent name // Replace %n by torrent name

View File

@ -411,7 +411,7 @@ void options_imp::saveOptions() {
pref->setMailNotificationSMTPUsername(mailNotifUsername->text()); pref->setMailNotificationSMTPUsername(mailNotifUsername->text());
pref->setMailNotificationSMTPPassword(mailNotifPassword->text()); pref->setMailNotificationSMTPPassword(mailNotifPassword->text());
pref->setAutoRunEnabled(autoRunBox->isChecked()); pref->setAutoRunEnabled(autoRunBox->isChecked());
pref->setAutoRunProgram(autoRun_txt->text()); pref->setAutoRunProgram(autoRun_txt->text().trimmed());
pref->setActionOnDblClOnTorrentDl(getActionOnDblClOnTorrentDl()); pref->setActionOnDblClOnTorrentDl(getActionOnDblClOnTorrentDl());
pref->setActionOnDblClOnTorrentFn(getActionOnDblClOnTorrentFn()); pref->setActionOnDblClOnTorrentFn(getActionOnDblClOnTorrentFn());
// End Downloads preferences // End Downloads preferences