src/partDownloader.cc

changeset 840
d077dd19bf9a
parent 839
5f822ad61875
child 844
11587d419d2f
--- a/src/partDownloader.cc	Sun Jul 13 20:28:52 2014 +0300
+++ b/src/partDownloader.cc	Sun Jul 13 20:40:24 2014 +0300
@@ -42,7 +42,7 @@
 {
 	QString path = getDownloadPath();
 
-	if (path.isEmpty() || not QDir (path).exists())
+	if (path.isEmpty() or not QDir (path).exists())
 	{
 		critical (PartDownloader::tr ("You need to specify a valid path for "
 			"downloaded files in the configuration to download paths."));
@@ -133,7 +133,7 @@
 		// typo in the .dat extension.
 		const int dotpos = dest.lastIndexOf (".");
 
-		if (dotpos != -1 && dotpos >= dest.length() - 4)
+		if ((dotpos != -1) and (dotpos >= dest.length() - 4))
 			dest.chop (dest.length() - dotpos);
 
 		dest += ".dat";
@@ -175,7 +175,7 @@
 		dest.prepend ("parts/s/");
 	elif (QRegExp (partRegex).exactMatch (dest))
 		dest.prepend ("parts/");
-	elif (not dest.startsWith ("parts/") && not dest.startsWith ("p/"))
+	elif (not dest.startsWith ("parts/") and not dest.startsWith ("p/"))
 		dest.prepend ("p/");
 }
 
@@ -289,7 +289,7 @@
 		g_win->R()->resetAngles();
 	}
 
-	if (cfg::autoCloseDownloadDialog && not failed)
+	if (cfg::autoCloseDownloadDialog and not failed)
 	{
 		// Close automatically if desired.
 		accept();
@@ -419,7 +419,7 @@
 {
 	if (networkReply()->error() != QNetworkReply::NoError)
 	{
-		if (isPrimary() && not prompt()->isAborted())
+		if (isPrimary() and not prompt()->isAborted())
 			critical (networkReply()->errorString());
 
 		setState (DLRQ_Failed);
@@ -460,7 +460,7 @@
 	{
 		LDErrorPtr err = obj.dynamicCast<LDError>();
 
-		if (err == null || err->fileReferenced().isEmpty())
+		if ((err == null) or (err->fileReferenced().isEmpty()))
 			continue;
 
 		QString dest = err->fileReferenced();

mercurial