summaryrefslogtreecommitdiff
path: root/src/test/test_xdg.cpp
blob: 27c02ede30692c075893be912ef3f35310d4d48e (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
28
29
30
31
#include <QCoreApplication>
#include <QDebug>
#include <QTimer>
#include "xdgdesktopentries.h"
#include "xdgentry.h"
#include "xdgentries.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    KaZoe::Entries entries;
    entries.addDirectory("/usr/share/applications");
/*
    QTimer t;
    QObject::connect(&t, &QTimer::timeout, [](){
        XdgDesktopEntries ent;
        for(int i = 0; i < ent.rowCount(); i++)
        {
            QVariant data = ent.data(ent.index(i), XdgDesktopEntries::DesktopFileRole);
            qDebug() << data.toString();
        }
        //QCoreApplication::exit(0);
    });

    t.setInterval(0);
    t.setSingleShot(true);
    t.start();
    */
    return a.exec();
}