[Bug 670194] extragear/sysadmin/libqapt/src
Jonathan Thomas
echidnaman at kubuntu.org
Wed Nov 3 21:50:06 UTC 2010
SVN commit 1192734 by jmthomas:
Document the current fields of the detail QVariantMaps for each ErrorCode, WarningCode and WorkerQuestion.
I've learned a bit from all this, and have several ideas how to do things like this better for QApt2, when the time comes.
CCMAIL:670194 at bugs.launchpad.net
M +46 -0 globals.h
--- trunk/extragear/sysadmin/libqapt/src/globals.h #1192733:1192734
@@ -23,6 +23,7 @@
#include <QtCore/QFlags>
#include <QtCore/QList>
+#include <QtCore/QVariantMap>
namespace QApt
{
@@ -49,6 +50,50 @@
typedef QStringList GroupList;
/**
+ * Defines the Error type, a QVariantMap with info about errors
+ *
+ * These are the fields that each ErrorCode can have:
+ * <"Key", ValueType> (Description of value)
+ * InitError: <"ErrorText", QString> (APT's error description)
+ * LockError: No fields
+ * DiskSpaceError: <"DirectoryString", QString>
+ * FetchError: No fields
+ * CommitError: <"FailedItem, QString> (Package that failed to commit)
+ * <"ErrorText", QString> (APT's error description)
+ * AuthError: No fields
+ * WorkerDisappeared: No fields
+ * UntrustedError: <"UntrustedItems", QStringList> (List of untrusted packages)
+ * UserCancelError: No fields, pseudo-error
+ * DownloadDisallowedError: No fields
+ * NotFoundError: <"NotFoundString", QString> (String of the nonexistant package)
+ * <"WarningText", QString> (APT's warning description)
+ */
+ typedef QVariantMap Error;
+
+ /**
+ * Defines the Warning type, a QVariantMap with info about warnings
+ *
+ * These are the fields that each WarningCode can have:
+ * <"Key", ValueType> (Description of value)
+ * SizeMismatchWarning: No fields
+ * FetchFailedWarning: <"FailedItem", QString> (Package that failed to download)
+ *
+ */
+ typedef QVariantMap Warning;
+
+ /**
+ * Defines the Warning type, a QVariantMap with info about worker questions
+ *
+ * These are the fields that each WorkerQuestion can have:
+ * <"Key", ValueType> (Description of value)
+ * ConfFilePrompt: <"OldConfFile", QString> (Old conf file)
+ * <"NewConfFile", QString> (New conf file)
+ * MediaChange: <"Media", QString> (Name of the CD needed)
+ * <"Drive", QString> (The drive to insert the CD into)
+ */
+ typedef QVariantMap Question;
+
+ /**
* An enumerator listing all the events that the QApt Worker can emit
*/
enum WorkerEvent {
@@ -75,6 +120,7 @@
/**
* An enumerator listing all the question types that the QApt Worker can ask
*/
+ // TODO QApt2: Rename to QuestionCode
enum WorkerQuestion {
/// An invalid question
InvalidQuestion = 0,
--
Pack Window keyboard shortcuts don't work
https://bugs.launchpad.net/bugs/670194
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to kdebase-workspace in ubuntu.
More information about the kubuntu-bugs
mailing list