MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / dumpNote

Method dumpNote

utilities/debugtool.cpp:72–118  ·  view source on GitHub ↗

Dump a note to the debug log

Source from the content-addressed store, hash-verified

70// Dump a note to the debug log
71//************************************
72void DebugTool::dumpNote(Note note) {
73 QLOG_DEBUG() << "*** Dumping Note ***";
74 dumpField(note.guid, "guid");
75 dumpField(note.active, "active");
76 dumpField(note.title, "title");
77 dumpField(note.content, "content");
78 dumpField(note.contentHash, "contentHash", true);
79 dumpField(note.contentLength, "contentLength");
80 dumpField(note.created, "created");
81 dumpField(note.updated, "updated");
82 dumpField(note.deleted, "deleted");
83 dumpField(note.updateSequenceNum, "USN");
84 dumpField(note.tagGuids, "tag guids");
85 dumpField(note.tagNames, "tag names");
86 if (!note.attributes.isSet()) {
87 QLOG_DEBUG() << "no note attributes found.";
88 } else {
89 NoteAttributes attributes = note.attributes;
90 dumpField(attributes.subjectDate, "subject date");
91 dumpField(attributes.latitude, "latitude");
92 dumpField(attributes.longitude, "longitude");
93 dumpField(attributes.altitude, "altitude");
94 dumpField(attributes.author, "author");
95 dumpField(attributes.source, "source");
96 dumpField(attributes.sourceURL, "sourceURL");
97 dumpField(attributes.sourceApplication, "sourceApplication");
98 dumpField(attributes.shareDate, "shareDate");
99 dumpField(attributes.reminderOrder, "reminderOrder");
100 dumpField(attributes.reminderDoneTime, "reminderDoneTime");
101 dumpField(attributes.reminderTime, "reminderTime");
102 dumpField(attributes.placeName, "placeName");
103 dumpField(attributes.contentClass, "contentClass");
104 dumpField(attributes.lastEditedBy, "lastEditedBy");
105 dumpField(attributes.creatorId, "creatorId");
106 dumpField(attributes.lastEditorId, "lastEditorId");
107 }
108
109 if (note.resources.isSet()) {
110 QList<Resource> resources = note.resources;
111 QLOG_DEBUG() << resources.size() << " resources found";
112 for (int i=0; i<resources.size(); i++) {
113 QLOG_DEBUG() << "resource #" << i;
114 dumpResource(resources[i]);
115 }
116 }
117 QLOG_DEBUG() << "*** Note Dump complete ***";
118}
119
120
121//************************************

Callers 1

uploadNoteMethod · 0.80

Calls 1

isSetMethod · 0.45

Tested by

no test coverage detected