Hacking:Tools

From Seamly
Revision as of 13:42, 26 May 2016 by Dismine (talk | contribs)

hg-git Extension

For export to github and launchpad we use hg-git extension. Please read these two articles for more details: the Hg-Git mercurial plugin and hg-git Extension.

Warning! Because service Launchpad doesn't use git repository directly and converts to Bazaar we can't use hg-git version higher than 0.6.1.

For our work we use code from repository http://bitbucket.org/durin42/hg-git/

Usage: For working extension need to create a bookmark. Command

hg bookmark -f master

will set a bookmark for current branch. Most actively we export 'develop' and 'default'.

Before pushing create path 'github' in .hgrc file.

[extensions]
hgext.bookmarks =
hggit = /home/dismine/hg-git/hggit

[paths]
github = git+ssh://git@github.com/<user_name>/<repository_name>.git

Run

hg push github

for pushing changes to github.

Note the command can hang. You can wait finish or close terminal without losing data.

Qt Creator

When you use Qt you have two IDE to choose: Qt Creator and Visual Studio. Yes, last information what i have says that Eclipse doesn't have support for Qt5.

First look better begin from the official website.

For effective using Qt Creator you will need know some stuff.

  • Qt Creator supports Mercurial, so creating and deleting files better to do from the IDE.
  • Keyboard Shortcuts.
  • Refactoring.
  • Specifying Code Style Settings. Valentina's code style file for Qt Creator you can find in <root>/share directory.
  • Set path to License template. Tools->Options->C++->File Naming. Example of license template for project you can find in <root>/share directory. Move it to another directory outside of the project directory and then change name of an author.
  • Set max length of source code line equal 120 characters. Tools->Options->Text Editor->Display.
  • Compile faster. For this use -j key for make. Projects->Build Steps->Make add -jX - where X number of cpu in your system.
  • Don't forget Qt Creator support two release mode: release and debug. Project will be compile with different keys in different modes. Qt team recommended developing to do in debug mode. Also debugging works only in debug mode. Plus Qt will show additional warning information if something happened.

Address Sanitizer