Compare commits

..

No commits in common. "master" and "v0.8" have entirely different histories.
master ... v0.8

4 changed files with 26 additions and 22 deletions

View File

@ -1,9 +1,3 @@
v0.9 (27/07/2019)
** User **
** Dev **
** Bugs **
Check index in ctrl+t, ctrl+r and suppr callback to avoid doing something on non existant operation
v0.8 (29/01/2019) v0.8 (29/01/2019)
** User ** ** User **
Add multi month operation support : Normal operation with description "... (XX/YY)" will be forwarded to next month Add multi month operation support : Normal operation with description "... (XX/YY)" will be forwarded to next month

View File

@ -11,10 +11,14 @@ KISSCOUNT=kc
QT_PACKAGES="Qt5Core Qt5Gui Qt5Sql Qt5Xml Qt5Widgets" QT_PACKAGES="Qt5Core Qt5Gui Qt5Sql Qt5Xml Qt5Widgets"
CXXFLAGS+=`pkg-config --cflags $(QT_PACKAGES)` CXXFLAGS+=`pkg-config --cflags $(QT_PACKAGES)`
CXXFLAGS+=-Wall -Isrc -Isrc/win32 -I${PWD}/lib/qt5charts/usr/include/x86_64-linux-gnu/qt5/ -L${PWD}/lib/qtcharts/lib/ -L${PWD}/lib/qt5charts/usr/lib/x86_64-linux-gnu/ CXXFLAGS+=-Wall -Isrc -Isrc/win32 -I${PWD}/lib/qt5charts/usr/include/x86_64-linux-gnu/qt5/ -L${PWD}/lib/qtcharts/lib/ -L${PWD}/lib/qt5charts/usr/lib/x86_64-linux-gnu/
CXXFLAGS+=-Wall
#-Dnullptr=0
ifdef WIN32 ifdef WIN32
CXXFLAGS+=-DRESOURCES_ROOT="\"./resources/\"" -static CXXFLAGS+=-DRESOURCES_ROOT="\"./resources/\"" -static
else else
CXXFLAGS+=-DRESOURCES_ROOT="\"$(SHARE_DIR)\"" -ggdb -fPIC -O0 CXXFLAGS+=-DRESOURCES_ROOT="\"$(SHARE_DIR)\"" -ggdb -fPIC -O0
# For developpers
#CXXFLAGS+=-DRESOURCES_ROOT="\"./resources/\""
endif endif
SOURCES=$(shell find src -name '*.cpp' -type f | tr '\n' ' ') SOURCES=$(shell find src -name '*.cpp' -type f | tr '\n' ' ')
@ -23,6 +27,16 @@ MOC_HEADERS=$(shell find src/view -name '*.hpp' -type f | tr '\n' ' ')
MOCS=$(MOC_HEADERS:.hpp=.objs) MOCS=$(MOC_HEADERS:.hpp=.objs)
MOCS_OBJS=$(MOC_HEADERS:.hpp=.moc) MOCS_OBJS=$(MOC_HEADERS:.hpp=.moc)
#CXXFLAGS+=-Ilib/libkdchart/include -Ilib/libkdchart/src -Ilib/libkdchart/kdablibfakes/include
#CXXFLAGS+=-DKDCHART_BUILD_KDCHART_LIB
#KDCHART_SOURCES=$(shell find lib/libkdchart/src -name '*.cpp' -type f | tr '\n' ' ')
#KDCHART_OBJS=$(KDCHART_SOURCES:.cpp=.o)
#UI_CHARTSELECTOR=lib/libkdchart/src/ui_KDChartDatasetSelector.h
#KDCHART_MOC_HEADERS=$(shell find lib/libkdchart/src -name '*.h' -type f | tr '\n' ' ')
#KDCHART_MOCS=$(KDCHART_MOC_HEADERS:.h=.objs)
#KDCHART_MOCS_OBJS=$(KDCHART_MOC_HEADERS:.h=.moc)
#LDFLAGS+=lib/libkdchart.a
ifndef WIN32 ifndef WIN32
LDFLAGS+=`pkg-config --libs $(QT_PACKAGES)` LDFLAGS+=`pkg-config --libs $(QT_PACKAGES)`
LDFLAGS+=-lofx -lQt5Charts LDFLAGS+=-lofx -lQt5Charts
@ -58,6 +72,13 @@ mojito : $(MOCS_OBJS)
$(KISSCOUNT): $(MOCS) $(OBJS) $(KISSCOUNT): $(MOCS) $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS)
# $(UI_CHARTSELECTOR): lib/libkdchart/src/KDChartDatasetSelector.ui
# uic $< > $(UI_CHARTSELECTOR)
# sed s/KDCHARTDATASETSELECTOR_H/UI_KDCHARTDATASETSELECTOR_H/g -i $(UI_CHARTSELECTOR)
# lib/libkdchart.a: $(UI_CHARTSELECTOR) $(KDCHART_MOCS) $(KDCHART_OBJS)
# $(HOST)ar rcu lib/libkdchart.a $(KDCHART_MOCS) $(KDCHART_OBJS)
clean_libkdchart: clean_libkdchart:
rm -rf lib/libkdchart.a rm -rf lib/libkdchart.a
find lib/libkdchart -name '*.o' -delete find lib/libkdchart -name '*.o' -delete

View File

@ -1670,7 +1670,7 @@ void GridAccount::OnCtrlT(void)
{ {
Operation op, op2; Operation op, op2;
QModelIndexList selected = selectedIndexes(); QModelIndexList selected = selectedIndexes();
int account, idx, row; int account, idx;
bool groupOperations; bool groupOperations;
User* user = _kiss->GetUser(); User* user = _kiss->GetUser();
std::vector<Operation>::iterator it; std::vector<Operation>::iterator it;
@ -1678,12 +1678,7 @@ void GridAccount::OnCtrlT(void)
if (selected.size() > 1 || !selected.size()) if (selected.size() > 1 || !selected.size())
return; return;
row = selected[0].row(); op = _displayedOperations[selected[0].row()] ;
if (row == _fixCosts || row == (int)_displayedOperations.size()-1)
return;
op = _displayedOperations[row] ;
if (op.parent || op.meta || op.transfert) if (op.parent || op.meta || op.transfert)
return; return;
@ -1729,9 +1724,6 @@ void GridAccount::OnCtrlR(void)
{ {
row = selected[i].row(); row = selected[i].row();
if (row == _fixCosts || row == (int)_displayedOperations.size()-1)
continue;
it = std::find(rows.begin(), rows.end(), row); it = std::find(rows.begin(), rows.end(), row);
if (it != rows.end()) if (it != rows.end())
@ -1754,9 +1746,6 @@ void GridAccount::OnSuppr(void)
{ {
row = selected[i].row(); row = selected[i].row();
if (row == _fixCosts || row == (int)_displayedOperations.size()-1)
continue;
it = std::find(rows.begin(), rows.end(), row); it = std::find(rows.begin(), rows.end(), row);
if (it != rows.end()) if (it != rows.end())

View File

@ -29,8 +29,6 @@ rm -rf "$DIR"
# Debian packaging # Debian packaging
if [ -d "debian" ] ; then if [ -d "debian" ] ; then
[ "${ARCH}" == "x86_64" ] && ARCH="amd64"
[ "${ARCH}" == "i686" ] && ARCH="i386"
DEB_FILE="kisscount_${VERSION}-1_${ARCH}.deb" DEB_FILE="kisscount_${VERSION}-1_${ARCH}.deb"
rm -rf "$DEB_DIR" "$DEB_FILE" rm -rf "$DEB_DIR" "$DEB_FILE"
mkdir "$DEB_DIR" mkdir "$DEB_DIR"
@ -44,6 +42,8 @@ mv debian/Makefile .
[ ! -d lib ] && ln -s ../lib [ ! -d lib ] && ln -s ../lib
#sed -i s/i686/$ARCH/g debian/control #sed -i s/i686/$ARCH/g debian/control
#dh_make -f "../$DEB_FILE" --copyright gpl3 --email $DEBEMAIL -s #dh_make -f "../$DEB_FILE" --copyright gpl3 --email $DEBEMAIL -s
[ "${ARCH}" == "x86_64" ] && ARCH="amd64"
[ "${ARCH}" == "i686" ] && ARCH="i386"
debuild -us -uc -b -i -a${ARCH} || (cd - ; exit 1) debuild -us -uc -b -i -a${ARCH} || (cd - ; exit 1)
cd - cd -
rm -rf "$DEB_DIR" "$DEB_FILE".changes "$DEB_FILE".build rm -rf "$DEB_DIR" "$DEB_FILE".changes "$DEB_FILE".build