aboutsummaryrefslogtreecommitdiff
path: root/README
blob: fb519dfaa1f93a47193859cff22be5411cad890c (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
QMenuModel - a Qt/QML binding for GMenuModel
(see http://developer.gnome.org/gio/unstable/GMenuModel.html)


= Building =

The build system uses cmake.
To compile, simply invoke cmake and then make, e.g.:

    $ cmake .
    $ make


= Running unit tests =

To run the unit tests, you will need dbus-test-runner. If it wasn’t previously
installed, install it and then re-run cmake. Then run either of these commands:

    $ make test

      - or -

    $ ctest


= Getting code coverage information =

To run the unit tests and generate code coverage information, you need to re-run
cmake with ENABLE_COVERAGE set to ON and then invoke `make lcov`.
This requires lcov to be installed.

    $ cmake -DENABLE_COVERAGE=ON .
    $ make lcov

This will generate a report (coverage/index.html) which you can view in a
browser.


= API documentation =

To generate API documentation, you need to re-run cmake with GENERATE_DOC set to
ON and then invoke `make qdoc`. This requires qdoc3 to be installed.

    $ cmake -DGENERATE_DOC=ON .
    $ make qdoc

The documentation is generated in the HTML format under doc/html/.


= Examples =

There are examples of how to use QDBusMenuModel in QML, refer to the README file
under the examples/ directory for instructions.