MCPcopy Create free account
hub / github.com/YACReader/yacreader / appendChild

Method appendChild

YACReaderLibrary/db/folder_item.cpp:18–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18void FolderItem::appendChild(FolderItem *item)
19{
20 item->parentItem = this;
21
22 if (childItems.isEmpty())
23 childItems.append(item);
24 else {
25 FolderItem *last = childItems.back();
26 QString nameLast = last->data(0).toString(); // TODO usar info name si est� disponible, sino el nombre del fichero.....
27 QString nameCurrent = item->data(0).toString();
28 QList<FolderItem *>::iterator i;
29 i = childItems.end();
30 i--;
31 while (naturalSortLessThanCI(nameCurrent, nameLast) && i != childItems.begin()) {
32 i--;
33 nameLast = (*i)->data(0).toString();
34 }
35 if (!naturalSortLessThanCI(nameCurrent, nameLast)) // si se ha encontrado un elemento menor que current, se inserta justo despu�s
36 childItems.insert(++i, item);
37 else
38 childItems.insert(i, item);
39 }
40
41 // childItems.append(item);
42}
43
44FolderItem *FolderItem::child(int row)
45{

Callers 15

renderBreadcrumbsFunction · 0.45
showLoadingFunction · 0.45
showErrorFunction · 0.45
folderPlaceholderFunction · 0.45
comicPlaceholderFunction · 0.45
folderCardFunction · 0.45
comicCardFunction · 0.45
showFolderFunction · 0.45
detailFieldFunction · 0.45
sanitizedHtmlFunction · 0.45
copyNodeFunction · 0.45
showComicFunction · 0.45

Calls 5

naturalSortLessThanCIFunction · 0.85
isEmptyMethod · 0.80
toStringMethod · 0.80
dataMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected