@ -688,7 +688,7 @@ QString Session::torrentTempPath(const TorrentInfo &torrentInfo) const
if ( ( torrentInfo . filesCount ( ) > 1 ) & & ! torrentInfo . hasRootFolder ( ) )
if ( ( torrentInfo . filesCount ( ) > 1 ) & & ! torrentInfo . hasRootFolder ( ) )
return tempPath ( )
return tempPath ( )
+ QString : : fromStdString ( torrentInfo . nativeInfo ( ) - > orig_files ( ) . name ( ) )
+ QString : : fromStdString ( torrentInfo . nativeInfo ( ) - > orig_files ( ) . name ( ) )
+ " / " ;
+ ' / ' ;
return tempPath ( ) ;
return tempPath ( ) ;
}
}
@ -793,7 +793,7 @@ bool Session::removeCategory(const QString &name)
bool result = false ;
bool result = false ;
if ( isSubcategoriesEnabled ( ) ) {
if ( isSubcategoriesEnabled ( ) ) {
// remove subcategories
// remove subcategories
const QString test = name + " / " ;
const QString test = name + ' / ' ;
Dict : : removeIf ( m_categories , [ this , & test , & result ] ( const QString & category , const QString & )
Dict : : removeIf ( m_categories , [ this , & test , & result ] ( const QString & category , const QString & )
{
{
if ( category . startsWith ( test ) ) {
if ( category . startsWith ( test ) ) {
@ -3664,7 +3664,7 @@ void Session::handleTorrentFinished(TorrentHandle *const torrent)
const QString torrentRelpath = torrent - > filePath ( i ) ;
const QString torrentRelpath = torrent - > filePath ( i ) ;
if ( torrentRelpath . endsWith ( " .torrent " , Qt : : CaseInsensitive ) ) {
if ( torrentRelpath . endsWith ( " .torrent " , Qt : : CaseInsensitive ) ) {
qDebug ( " Found possible recursive torrent download. " ) ;
qDebug ( " Found possible recursive torrent download. " ) ;
const QString torrentFullpath = torrent - > savePath ( true ) + " / " + torrentRelpath ;
const QString torrentFullpath = torrent - > savePath ( true ) + ' / ' + torrentRelpath ;
qDebug ( " Full subtorrent path is %s " , qUtf8Printable ( torrentFullpath ) ) ;
qDebug ( " Full subtorrent path is %s " , qUtf8Printable ( torrentFullpath ) ) ;
TorrentInfo torrentInfo = TorrentInfo : : loadFromFile ( torrentFullpath ) ;
TorrentInfo torrentInfo = TorrentInfo : : loadFromFile ( torrentFullpath ) ;
if ( torrentInfo . isValid ( ) ) {
if ( torrentInfo . isValid ( ) ) {
@ -3814,7 +3814,7 @@ void Session::recursiveTorrentDownload(const InfoHash &hash)
tr ( " Recursive download of file '%1' embedded in torrent '%2' "
tr ( " Recursive download of file '%1' embedded in torrent '%2' "
, " Recursive download of 'test.torrent' embedded in torrent 'test2' " )
, " Recursive download of 'test.torrent' embedded in torrent 'test2' " )
. arg ( Utils : : Fs : : toNativePath ( torrentRelpath ) , torrent - > name ( ) ) ) ;
. arg ( Utils : : Fs : : toNativePath ( torrentRelpath ) , torrent - > name ( ) ) ) ;
const QString torrentFullpath = torrent - > savePath ( ) + " / " + torrentRelpath ;
const QString torrentFullpath = torrent - > savePath ( ) + ' / ' + torrentRelpath ;
AddTorrentParams params ;
AddTorrentParams params ;
// Passing the save path along to the sub torrent file
// Passing the save path along to the sub torrent file
@ -4309,7 +4309,7 @@ void Session::handleListenSucceededAlert(libt::listen_succeeded_alert *p)
proto = " TCP " ;
proto = " TCP " ;
else if ( p - > sock_type = = libt : : listen_succeeded_alert : : tcp_ssl )
else if ( p - > sock_type = = libt : : listen_succeeded_alert : : tcp_ssl )
proto = " TCP_SSL " ;
proto = " TCP_SSL " ;
qDebug ( ) < < " Successfully listening on " < < proto < < p - > endpoint . address ( ) . to_string ( ec ) . c_str ( ) < < " / " < < p - > endpoint . port ( ) ;
qDebug ( ) < < " Successfully listening on " < < proto < < p - > endpoint . address ( ) . to_string ( ec ) . c_str ( ) < < ' / ' < < p - > endpoint . port ( ) ;
Logger : : instance ( ) - > addMessage (
Logger : : instance ( ) - > addMessage (
tr ( " qBittorrent is successfully listening on interface %1 port: %2/%3 " , " e.g: qBittorrent is successfully listening on interface 192.168.0.1 port: TCP/6881 " )
tr ( " qBittorrent is successfully listening on interface %1 port: %2/%3 " , " e.g: qBittorrent is successfully listening on interface 192.168.0.1 port: TCP/6881 " )
. arg ( p - > endpoint . address ( ) . to_string ( ec ) . c_str ( ) , proto , QString : : number ( p - > endpoint . port ( ) ) ) , Log : : INFO ) ;
. arg ( p - > endpoint . address ( ) . to_string ( ec ) . c_str ( ) , proto , QString : : number ( p - > endpoint . port ( ) ) ) , Log : : INFO ) ;
@ -4336,7 +4336,7 @@ void Session::handleListenFailedAlert(libt::listen_failed_alert *p)
proto = " I2P " ;
proto = " I2P " ;
else if ( p - > sock_type = = libt : : listen_failed_alert : : socks5 )
else if ( p - > sock_type = = libt : : listen_failed_alert : : socks5 )
proto = " SOCKS5 " ;
proto = " SOCKS5 " ;
qDebug ( ) < < " Failed listening on " < < proto < < p - > endpoint . address ( ) . to_string ( ec ) . c_str ( ) < < " / " < < p - > endpoint . port ( ) ;
qDebug ( ) < < " Failed listening on " < < proto < < p - > endpoint . address ( ) . to_string ( ec ) . c_str ( ) < < ' / ' < < p - > endpoint . port ( ) ;
Logger : : instance ( ) - > addMessage (
Logger : : instance ( ) - > addMessage (
tr ( " qBittorrent failed listening on interface %1 port: %2/%3. Reason: %4. " ,
tr ( " qBittorrent failed listening on interface %1 port: %2/%3. Reason: %4. " ,
" e.g: qBittorrent failed listening on interface 192.168.0.1 port: TCP/6881. Reason: already in use. " )
" e.g: qBittorrent failed listening on interface 192.168.0.1 port: TCP/6881. Reason: already in use. " )