1
0
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:
Christian Muehlhaeuser
2012-06-24 23:55:00 +02:00
parent 44cd64a8b6
commit f674b3b751
2 changed files with 31 additions and 22 deletions

View File

@@ -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;
}