mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-18 20:04:00 +02:00
* Style cleanup.
This commit is contained in:
@@ -369,13 +369,15 @@ NetworkProxyFactory::setNoProxyHosts( const QStringList& hosts )
|
||||
{
|
||||
QStringList newList;
|
||||
tDebug() << Q_FUNC_INFO << "No-proxy hosts:" << hosts;
|
||||
foreach( QString host, hosts )
|
||||
foreach ( const QString& host, hosts )
|
||||
{
|
||||
QString munge = host.simplified();
|
||||
newList << munge;
|
||||
//TODO: wildcard support
|
||||
}
|
||||
|
||||
tDebug() << Q_FUNC_INFO << "New no-proxy hosts:" << newList;
|
||||
|
||||
s_noProxyHostsMutex.lock();
|
||||
s_noProxyHosts = newList;
|
||||
s_noProxyHostsMutex.unlock();
|
||||
@@ -636,19 +638,26 @@ removeDirectory( const QString& dir )
|
||||
|
||||
tLog() << "Deleting DIR:" << dir;
|
||||
bool has_err = false;
|
||||
if (aDir.exists()) {
|
||||
foreach(const QFileInfo& entry, aDir.entryInfoList(QDir::NoDotAndDotDot | QDir::Dirs | QDir::Files | QDir::NoSymLinks)) {
|
||||
if ( aDir.exists() )
|
||||
{
|
||||
foreach ( const QFileInfo& entry, aDir.entryInfoList( QDir::NoDotAndDotDot | QDir::Dirs | QDir::Files | QDir::NoSymLinks ) )
|
||||
{
|
||||
QString path = entry.absoluteFilePath();
|
||||
if (entry.isDir()) {
|
||||
if ( entry.isDir() )
|
||||
{
|
||||
has_err = !removeDirectory( path ) || has_err;
|
||||
} else if (!QFile::remove(path)) {
|
||||
}
|
||||
else if ( !QFile::remove( path ) )
|
||||
{
|
||||
has_err = true;
|
||||
}
|
||||
}
|
||||
if (!aDir.rmdir(aDir.absolutePath())) {
|
||||
if ( !aDir.rmdir( aDir.absolutePath() ) )
|
||||
{
|
||||
has_err = true;
|
||||
}
|
||||
}
|
||||
|
||||
return !has_err;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user