Hacking:Tools: Difference between revisions

(Changing valentina to seamly / seamly2D)
 
(6 intermediate revisions by 2 users not shown)
Line 1:
__TOC__
== hg-git ExtensionGit ==
For export to github and launchpad we use hg-git extension. Please read these two articles for more details: [https://hg-git.github.io/ the Hg-Git mercurial plugin] and [http://mercurial.selenic.com/wiki/HgGit hg-git Extension].<br />
 
The Seamly2D code repository is on Github: https://github.com/FashionFreedom/Seamly2D
'''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.''<br />
 
Please learn Git and workflow guidelines:
For our work we use code from repository http://bitbucket.org/durin42/hg-git/<br />
# Basic Git: https://zaiste.net/git_for_busy_people/
# The Git Flow method: https://datasift.github.io/gitflow/IntroducingGitFlow.html/
# Using semantic commit messages: https://seesparkbox.com/foundry/semantic_commit_messages/
 
== Canonical/Ubuntu Launchpad and Bazaar ==
Usage: For working extension need to create a bookmark. Command
<source lang="bash">
hg bookmark -f master
</source>
will set a bookmark for current branch. Most actively we export 'develop' and 'default'.
 
Launchpad automatically mirrors the Seamly2D git repo here: https://launchpad.net/~susan-spencer/+archive/ubuntu/seamly2d
Before pushing create path 'github' in .hgrc file.
<source lang="ini">
[extensions]
hgext.bookmarks =
hggit = /home/dismine/hg-git/hggit
 
[paths]
github = git+ssh://git@github.com/<user_name>/<repository_name>.git
</source>
 
Run
<source lang="bash">
hg push github
</source>
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 [https://www.qt.io/ide/ the official website].
 
For effective usinguse of Qt Creator you will need to know some stuff.
* Qt Creator supports Mercurial,Git so creating and deleting files better to do from the IDE. Be sure to to choose appropriate .pri file.
* Qt Creator's file wizard allow you to select correct file where it add files.
* [https://doc.qt.io/qtcreator/creator-keyboard-shortcuts.html Keyboard Shortcuts].
Line 45 ⟶ 27:
* 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 supportsupports two release modemodes: release'''Release''' and debug'''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.
 
See '''[[Hacking:Tools:QtCreator:Ubuntu]]''' for description of installing and configuring Qt on 64-bit Ubuntu 14.04.
 
Line 84 ⟶ 67:
==26506== ERROR: AddressSanitizer: heap-buffer-overflow on address 0xa9f5b808 at pc 0x80b94ff bp 0xbf9b0b38 sp 0xbf9b0b2c
READ of size 4 at 0xa9f5b808 thread T0
#0 0x80b94fe (/home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/bin/seamly2d+0x80b94fe)
#1 0x80af9d0 (/home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/bin/seamly2d+0x80af9d0)
#2 0xb4eefd0b (/usr/lib/i386-linux-gnu/libQt5Core.so.5.2.1+0x250d0b)
#3 0xb56a1e00 (/usr/lib/i386-linux-gnu/libQt5Widgets.so.5.2.1+0xd7e00)
#4 0xb56a7800 (/usr/lib/i386-linux-gnu/libQt5Widgets.so.5.2.1+0xdd800)
#5 0x8424abc (/home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/bin/seamly2d+0x8424abc)
#6 0xb4eefae9 (/usr/lib/i386-linux-gnu/libQt5Core.so.5.2.1+0x250ae9)
#7 0xb4ef1f7a (/usr/lib/i386-linux-gnu/libQt5Core.so.5.2.1+0x252f7a)
Line 104 ⟶ 87:
#18 0xb51e2db3 (/usr/lib/i386-linux-gnu/libQt5Gui.so.5.2.1+0xaddb3)
#19 0xb56a0613 (/usr/lib/i386-linux-gnu/libQt5Widgets.so.5.2.1+0xd6613)
#20 0x845578f (/home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/bin/seamly2d+0x845578f)
#21 0xb4979a82 (/lib/i386-linux-gnu/libc-2.19.so+0x19a82)
#22 0x806b8f0 (/home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/bin/valentinasealmy2d+0x806b8f0)
0xa9f5b808 is located 12 bytes to the right of 12-byte region [0xa9f5b7f0,0xa9f5b7fc)
allocated by thread T0 here:
Line 112 ⟶ 95:
#1 0xb56e6a31 (/usr/lib/i386-linux-gnu/libQt5Widgets.so.5.2.1+0x11ca31)
#2 0xb56e6df4 (/usr/lib/i386-linux-gnu/libQt5Widgets.so.5.2.1+0x11cdf4)
#3 0x814e382 (/home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/bin/seamly2d+0x814e382)
#4 0x84a6e10 (/home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/bin/seamly2d+0x84a6e10)
#5 0x84606bc (/home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/bin/seamly2d+0x84606bc)
#6 0x84d2372 (/home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/bin/seamly2d+0x84d2372)
#7 0x84d1925 (/home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/bin/seamly2d+0x84d1925)
#8 0x84d0364 (/home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/bin/seamly2d+0x84d0364)
#9 0xb4f1964d (/usr/lib/i386-linux-gnu/libQt5Core.so.5.2.1+0x27a64d)
#10 0xb4f1a0ea (/usr/lib/i386-linux-gnu/libQt5Core.so.5.2.1+0x27b0ea)
Line 166 ⟶ 149:
READ of size 4 at 0xa9f5b808 thread T0
#0 0x80b94fe in QKeyEvent::key() const /usr/include/qt5/QtGui/qevent.h:309
#1 0x80af9d0 in DialogTool::eventFilter(QObject*, QEvent*) /home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/../../../ValentinaSeamly2D/src/app/dialogs/tools/dialogtool.cpp:416
#2 0xb4eefd0b in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) ??:?
#3 0xb56a1e00 in QApplicationPrivate::notify_helper(QObject*, QEvent*) ??:?
#4 0xb56a7800 in QApplication::notify(QObject*, QEvent*) ??:?
#5 0x8424abc in VApplication::notify(QObject*, QEvent*) /home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/../../../ValentinaSeamly2D/src/app/core/vapplication.cpp:253
#6 0xb4eefae9 in QCoreApplication::notifyInternal(QObject*, QEvent*) ??:?
#7 0xb4ef1f7a in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ??:?
Line 185 ⟶ 168:
#18 0xb51e2db3 in QGuiApplication::exec() ??:?
#19 0xb56a0613 in QApplication::exec() ??:?
#20 0x845578f in main /home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/../../../Seamly2D/src/app/main.cpp:129
#21 0xb4979a82 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287
#22 0x806b8f0 in _start ??:?
Line 193 ⟶ 176:
#1 0xb56e6a31 in QWidgetPrivate::init(QWidget*, QFlags<Qt::WindowType>) ??:?
#2 0xb56e6df4 in QWidget::QWidget(QWidgetPrivate&, QWidget*, QFlags<Qt::WindowType>) ??:?
#3 0x814e382 in DialogEndLine::DialogEndLine(VContainer const*, unsigned int const&, QWidget*) /home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/../../../Seamly2D/src/app/dialogs/tools/dialogendline.cpp:50 (discriminator 1)
#4 0x84a6e10 in void MainWindow::SetToolButtonWithApply<DialogEndLine, void (MainWindow::*)(int), void (MainWindow::*)()>(bool, Tool, QString const&, QString const&, void (MainWindow::*)(int), void (MainWindow::*)()) /home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/../../../Seamly2D/src/app/mainwindow.cpp:346 (discriminator 1)
#5 0x84606bc in MainWindow::ToolEndLine(bool) /home/dismine''<you>''/CAD/build-Seamly2D-Desktop-Debug/src/app/../../../Seamly2D/src/app/mainwindow.cpp:446 (discriminator 1)
#6 0x84d2372 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<bool>, void, void (MainWindow::*)(bool)>::call(void (MainWindow::*)(bool), MainWindow*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:508 (discriminator 3)
#7 0x84d1925 in void QtPrivate::FunctionPointer<void (MainWindow::*)(bool)>::call<QtPrivate::List<bool>, void>(void (MainWindow::*)(bool), MainWindow*, void**) /usr/include/qt5/QtCore/qobjectdefs_impl.h:527
Line 236 ⟶ 219:
 
Have fun hunting down memory issues.
 
== Github ==
The use of Mercurial was changed with the use of github
 
https://github.com/FashionFreedom/Seamly2D