MCPcopy Create free account
hub / github.com/IENT/YUView / writeNewItemList

Function writeNewItemList

YUViewLib/src/handler/ItemMemoryHandler.cpp:86–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void writeNewItemList(QList<ItemData> newItemList)
87{
88 QSettings settings;
89 settings.remove("itemMemory"); // Delete the old list
90
91 settings.beginWriteArray("itemMemory");
92 for (int i = 0; i < newItemList.size(); ++i)
93 {
94 const auto &item = newItemList[i];
95 settings.setArrayIndex(i);
96 settings.setValue("filePath", item.filePath);
97 settings.setValue("dateChanged", QVariant(item.itemChangedLast));
98 settings.setValue("format", item.format);
99 DEBUG_MEMORY("writeNewItemList Written item " << item.toString());
100 }
101 settings.endArray();
102}
103
104void itemMemoryAddFormat(QString filePath, QString format)
105{

Callers 1

itemMemoryAddFormatFunction · 0.85

Calls 3

removeMethod · 0.80
toStringMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected