[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/sysadmin/libqapt/src
From: Jonathan Michael Thomas <echidnaman () kubuntu ! org>
Date: 2011-01-04 19:23:39
Message-ID: 20110104192339.0BAD7AC8B0 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1211740 by jmthomas:
Add a QString overload for Package::controlField(), and also give both apidox
M +5 -0 package.cpp
M +17 -0 package.h
--- trunk/extragear/sysadmin/libqapt/src/package.cpp #1211739:1211740
@@ -542,6 +542,11 @@
return field;
}
+QString Package::controlField(const QString &name) const
+{
+ return controlField(QLatin1String(name.toStdString().c_str()));
+}
+
qint64 Package::currentInstalledSize() const
{
pkgCache::VerIterator ver = d->packageIter->CurrentVer();
--- trunk/extragear/sysadmin/libqapt/src/package.h #1211739:1211740
@@ -256,8 +256,25 @@
*/
QString supportedUntil() const;
+ /**
+ * Returns the specified field of the package's debian/control file
+ *
+ * This function can be used to return data from custom control fields
+ * which do not have an official function inside APT to retrieve them.
+ *
+ * For example, the supportedUntil() function uses this function to
+ * retrieve the value of the "Supported" field, which is Ubuntu-specific
+ * and does not have an APT function with which to obtain it.
+ *
+ * Another usecase is the GStreamer metadata fields for GStreamer packages,
+ * which are used to give information on what mimetypes/GStreamer version
+ * the package supports.
+ */
QString controlField(const QLatin1String &name) const;
+ /** Overload for QString controlField(const QLatin1String &name) const; **/
+ QString controlField(const QString &name) const;
+
/**
* Returns the amount of hard drive space that the currently-installed
* version of this package takes up.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic