[rkward-cvs] SF.net SVN: rkward-code:[4549] trunk/rkward/rkward/plugin/rkcomponentmeta. cpp

tfry at users.sf.net tfry at users.sf.net
Thu Feb 21 12:14:26 UTC 2013


Revision: 4549
          http://sourceforge.net/p/rkward/code/4549
Author:   tfry
Date:     2013-02-21 12:14:21 +0000 (Thu, 21 Feb 2013)
Log Message:
-----------
Fix quirks in dependency parsing / printing

Modified Paths:
--------------
    trunk/rkward/rkward/plugin/rkcomponentmeta.cpp

Modified: trunk/rkward/rkward/plugin/rkcomponentmeta.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkcomponentmeta.cpp	2013-02-21 11:18:51 UTC (rev 4548)
+++ trunk/rkward/rkward/plugin/rkcomponentmeta.cpp	2013-02-21 12:14:21 UTC (rev 4549)
@@ -147,7 +147,7 @@
 			RK_DEBUG (PLUGIN, DL_ERROR, "Tag <%s> is not allowed, here.", qPrintable (dep_e.tagName ()));
 			continue;
 		}
-		dep.package = xml->getStringAttribute (e, "name", QString (), DL_ERROR);
+		dep.package = xml->getStringAttribute (dep_e, "name", QString (), DL_ERROR);
 
 		dep.min_version = 0;
 		dep.max_version = 0xFFFFFFFF;
@@ -178,6 +178,7 @@
 		ret.append (QString::number (ver_part));
 		if (i > 0) ret.append ('.');
 	}
+	if (ret.endsWith (".0")) ret.chop (2);	// HACK: Don't print more than three verison parts, unless the fourth is non-zero
 	return ret;
 }
 
@@ -198,7 +199,7 @@
 		} else {
 			if (dep.type == RKWardPluginmap) ret.append (i18n ("RKWard plugin map"));
 			else ret.append (i18n ("R package"));
-			ret.append ("\"" + dep.package + "\"");
+			ret.append (" \"" + dep.package + "\"");
 			if (!dep.source_info.isEmpty ()) ret.append (" (" + dep.source_info + ")");
 		}
 		if (dep.min_version > 0) ret.append (" >= " + numericVersionToString (dep.min_version));





More information about the rkward-tracker mailing list