Merge lp://staging/~bijanbina/ginn/GIR into lp://staging/ginn
Status: | Rejected | ||||||||
---|---|---|---|---|---|---|---|---|---|
Rejected by: | Stephen M. Webb | ||||||||
Proposed branch: | lp://staging/~bijanbina/ginn/GIR | ||||||||
Merge into: | lp://staging/ginn | ||||||||
Diff against target: |
2447 lines (+1339/-977) 18 files modified
.directory (+6/-0) configure.ac (+1/-0) src/Makefile.am (+3/-2) src/README (+5/-0) src/bamf.c (+0/-48) src/bamf.cpp (+48/-0) src/config.c (+0/-200) src/config.cpp (+202/-0) src/config.h (+70/-27) src/ginn.c (+0/-592) src/ginn.cpp (+555/-0) src/ginn.h (+60/-0) src/gir.cpp (+47/-0) src/gir.h (+70/-0) src/header.h (+38/-0) src/main.cpp (+137/-0) src/xt.c (+0/-108) src/xt.cpp (+97/-0) |
||||||||
To merge this branch: | bzr merge lp://staging/~bijanbina/ginn/GIR | ||||||||
Related bugs: |
|
||||||||
Related blueprints: |
Sroll gesture with single touch
(Undefined)
GINN Reimplimention
(Undefined)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chase Douglas (community) | Disapprove | ||
Stephen M. Webb (community) | Needs Fixing | ||
Review via email: mp+72521@code.staging.launchpad.net |
Description of the change
1. port GINN to c++
2. use string instead of char *
3. fix all error with c++ compiler
4. create Gwish class instead of wish struct
5. add Gwish Type (geusture Type) instead of config_attr[0] to make code more readable and replace it in all part of code
6. add Gwish TouchNum (Number of finger for gesture) instead of config_attr[1] to make code more readable and replace it to all part of code
5. create GINN object and create a dynamic callback for GINN object
6. use "new" instead of memloc
7. remove all global variable and embed all of them in class
8. create qt project file for ginn
9. use cout and cerr instead of fprintf
10. abstract the main file and create the code more functionally
11. test all new changes and check are they stable or not
12. create constractor for apps and make Gapps object instead it
13. create callback for device add , remove and change with object oriented concept
14. create GD_att struct to save and access device attributes
15. create device list vector
16. find device attribute with just having device ID!(perfectly useful)
17. make code more readable
18. add comment to code and use simple name for variable
19. add some option to wish.xml to define some gesture for only touchscreen
20. add some option to wish.xml to define some gesture for only touchpad
21. compatible fully with last GINN branch
-------
#######
1. open wish.xml
2. find what gesture you want to classify for example you select some thing like this:
<wish gesture="Drag" fingers="2">
<action name="action5" when="update">
<trigger prop="delta y" min="20" max="80"/>
</action>
</wish>
3. change <wish gesture="Drag" fingers="2"> to
<wish gesture="Drag" fingers="2" screen="true">
4. if you want to your gesture run only on touchpad change screen prop to false else now your
gesture only run on touch screen
-------
Unmerged revisions
- 90. By Bijan Binaee
-
GIR
I have a number of issues with this proposal.
(1) You need to explicitly justify moving from C to C++. In particular, renaming all existing C sources to C++. What does the project gain from this? What are the possible repercussions (ie. what new problems are introduced and what new potential for error is obtained)? The renaming introduces a lot of noise that makes it difficult to evaluate the rest of the change.
(2) This merge marks most sources as executable. That is undesirable.
(3) What is the .directory file? It does not appear to be necessary to build the project.
(4) Please do not use ///-style or //!-style comments, use Javadoc-style (/**) comments for consistency with the style of other uTouch projects.
(5) The various classes implement their own containers. Is there a good reason not to use the (tested, dependable) standard library instead? One of the main advantages to porting to C++ is the ability to use the C++ library.
(6) None of this code is exception safe. When errors are encountered, resources are leaked or undefined behaviour is encountered.
(7) There is no cleanup: objects are created using new but never deleted.
(8) Class constructors are assigning initial values to members in the constructor body instead of using initializer lists. Most of the classes are C structs that rely on external code to maintain their invariants: what is the point of converting to C++ if the code is just non-OO style C? See http:// en.wikipedia. org/wiki/ Class_invariant.
(9) Why add a capital G or D to classes and function names? This does not contribute to readability in a positive way. If this is to represent words like "device" or "gesture", use those words. We are not experiencing a shortage of ASCII.
(10) Some variable names could reflect their purpose better: for example, what is "local" used for?
(11) "header.h" is not an acceptable header file name. Also, please do not create a single header file to include all other header files any source file might need. Headers should pull in only the minimal subset of headers they need to compile on their own. Never put a "using namespace" directive in a header file.
(12) GINN::Dadded catches an exception of type error_t, but there is no code inside the try-block that can throw such a type. The only exception possible from the try-block is std::bad_alloc.
(13) Please leave at least one blank line between function definitions for readability.