MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / QListToQVariantList

Function QListToQVariantList

src/SessionManager.cpp:38–45  ·  view source on GitHub ↗

QList cannot be automatically serialized to/from QSettings (i.e. QVariant) so turn it to a QVariantList

Source from the content-addressed store, hash-verified

36
37// QList<int> cannot be automatically serialized to/from QSettings (i.e. QVariant) so turn it to a QVariantList
38static QVariantList QListToQVariantList(const QList<int> intList)
39{
40 QVariantList vl;
41 for (const int i : intList){
42 vl.append(i);
43 }
44 return vl;
45}
46
47// Do the opposite of the function above
48static QList<int> QVariantListToQList(const QVariantList &variantList) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected