aboutsummaryrefslogtreecommitdiff
blob: c745eaea7f77aaed0ec2f86e27edb76ef3467b48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "helper.h"

QStringList CListToQStringList(StringList *clist)
{
    QStringList list;
    
    for (int i=0; i<stringListCount(clist); i++) {
        list << stringListGetAt(clist, i);
    }
    
    return list;
}

StringList* QStringListToCList(const QStringList &list)
{
    StringList *clist;
    
    clist = stringListCreate(list.count());
    
    if (clist) { // Not null
        for (int i=0; i<list.count(); i++) {
            stringListInsertAt(clist, i, list.at(i).toUtf8().data());
        }
    }
    
    return clist;
}