254.1.1
by Girish Rawat
Improved and extended READMEs. |
1 |
Dependencies
|
2 |
============
|
|
3 |
**DEPENDENCIES ARE NEEDED TO BE INSTALLED TO BUILD AND RUN THE APP**.
|
|
4 |
||
5 |
A complete list of dependencies for the project can be found in ubuntu-calculator-app/debian/control |
|
6 |
||
7 |
The following essential packages are also required to develop this app: |
|
8 |
* [ubuntu-sdk](http://developer.ubuntu.com/start) |
|
9 |
* intltool - run `sudo apt-get install intltool
|
|
10 |
||
11 |
Submitting a patch upstream
|
|
12 |
===========================
|
|
13 |
||
14 |
If you want to submit a bug fix you can do so by branching the code as shown |
|
15 |
above, implementing the fixes and running to see if it fixed the issue. We also |
|
16 |
request that you run the Autopilot nad unit tests to check if anything |
|
17 |
regressed due to the bug fix. |
|
18 |
||
19 |
If the tests fail, you will have to fix them before your bug fix can be |
|
20 |
approved and merged into trunk. If the tests pass then commit and push your |
|
21 |
code by, |
|
22 |
||
23 |
$ bzr commit -m "Implemented bug fix" --fixes lp:bug-number
|
|
24 |
$ bzr push lp:~launchpadid/ubuntu-calculator-app/branch-name
|
|
25 |
||
26 |
Running Tests
|
|
27 |
=============
|
|
28 |
||
254.1.2
by Girish Rawat
Fixed typos. |
29 |
Please check `README-Autopilot.md` and `README-Unittest.md` on how to run the tests. |
254.1.1
by Girish Rawat
Improved and extended READMEs. |
30 |
They are quite explanatory and will help you get started. |
31 |
||
32 |
Code Style
|
|
33 |
==========
|
|
34 |
||
35 |
We are trying to use a common code style throughout the code base to maintain |
|
36 |
uniformity and improve code clarity. Listed below are the code styles guides |
|
37 |
that will be followed based on the language used. |
|
38 |
||
39 |
* [QML](http://qt-project.org/doc/qt-5/qml-codingconventions.html) |
|
40 |
* [JS, C++](https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml) |
|
41 |
* Python - Code should follow PEP8 and Flake regulations
|
|
42 |
||
43 |
Note: In the QML code convention, ignore the Javascript code section guidelines. |
|
44 |
So the sections that should be taken into account in the QML conventions are QML |
|
45 |
Object Declarations, Grouped Properties and Lists. |
|
46 |
||
47 |
Debugging
|
|
48 |
=========
|
|
49 |
||
254.1.2
by Girish Rawat
Fixed typos. |
50 |
GDB allows one to see what is going on `inside` another program while it executes,
|
254.1.1
by Girish Rawat
Improved and extended READMEs. |
51 |
or what another program was doing at the moment it crashed. It is a pretty niffty tool which allows you |
52 |
to get the crash log that can help a developer pin point the cause of the crash. |
|
53 |
Before reproducing crash it is good to create symbols table for gdb, by using command: |
|
54 |
||
55 |
$ cd branch-name
|
|
56 |
||
57 |
To run GDB: |
|
58 |
||
59 |
$ gdb qmlscene
|
|
60 |
||
61 |
At this point, you are inside the gdb prompt. Run your application as you normally would. |
|
62 |
||
63 |
run app/ubuntu-calculator-app.qml
|
|
64 |
||
65 |
Your app is now running and monitored by GDB. Reproduce the steps in your app to make it crash. Once it does crash, |
|
66 |
||
67 |
bt
|
|
68 |
||
69 |
That's about it. To quit GDB, type quit to return back to the normal terminal console. |
|
70 |
||
71 |
quit
|