diff --git a/other/create_deb.sh b/other/create_deb.sh new file mode 100755 index 0000000..7efbd9c --- /dev/null +++ b/other/create_deb.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +EXPECTED_ARGS=1 +E_BADARGS=65 + +if [ $# -ne $EXPECTED_ARGS ] +then + echo "Usage: `basename $0` " + exit $E_BADARGS +fi + +srcdir=$1 +packagedir="/tmp/qtmindmap-0.2" +tempdir="/tmp/qtmindmap-build" +currdir=`pwd` + + +# compile +rm -rf $tempdir +mkdir $tempdir +cd $tempdir +qmake $srcdir/qtmindmap.pro +make + +#copy +rm -rf $packagedir +mkdir -p $packagedir/usr/bin +mkdir -p $packagedir/usr/share/applications +mkdir -p $packagedir/usr/share/pixmaps +mkdir -p $packagedir/usr/share/qtmindmap/i18n + +cp $tempdir/qtmindmap $packagedir/usr/bin/ +cp $srcdir/other/qtmindmap.desktop $packagedir/usr/share/applications/ +cp $srcdir/images/qtmindmap.svg $packagedir/usr/share/pixmaps/ +cp $tempdir/.qm/i18n/*.qm $packagedir/usr/share/qtmindmap/i18n/ + +#package +mkdir $packagedir/DEBIAN/ + +echo "Package: qtmindmap +Version: 0.2 +Section: base +Priority: optional +Architecture: all +Depends: qt (>= 4.5) +Maintainer: Dénes Mátételki +Homepage: https://gitorious.org/qtmindmap +Description: Mindmap software in Qt." > $packagedir/DEBIAN/control + +cd $currdir +dpkg --build $packagedir diff --git a/src/commands.cpp b/src/commands.cpp index 9c50744..e268e93 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -4,6 +4,20 @@ #include + + +const char* NoActiveNodeException::what() const throw() +{ + return QObject::tr("No active node.").toStdString().c_str(); +} + +const char* CannotPlaceNewNodeException::what() const throw() +{ + return QObject::tr("New node would be placed outside of the scene."). + toStdString().c_str(); +} + + InsertNodeCommand::InsertNodeCommand(GraphLogic *graphLogic) : m_graphLogic(graphLogic) , m_node(0)