Merge pull request #221664 from wegank/kitsas-bump

kitsas: 3.2.1 -> 4.0.3
This commit is contained in:
Weijia Wang 2023-03-17 17:20:18 +02:00 committed by GitHub
commit be0f4240cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 30 deletions

View File

@ -2,17 +2,19 @@
stdenv.mkDerivation rec {
pname = "kitsas";
version = "3.2.1";
version = "4.0.3";
src = fetchFromGitHub {
owner = "artoh";
repo = "kitupiikki";
rev = "v${version}";
sha256 = "sha256-1gp6CMoDTAp6ORnuk5wos67zygmE9s2pXwvwcR+Hwgg=";
hash = "sha256-7s21++sA4enZFuDVUEAbn7InpyLx6BOwrFdsUzHWK0M=";
};
# QList::swapItemsAt was introduced in Qt 5.13
patches = lib.optional (lib.versionOlder qtbase.version "5.13") ./qt-512.patch;
postPatch = ''
substituteInPlace kitsas/kitsas.pro \
--replace "LIBS += -L/usr/local/opt/poppler-qt5/lib -lpoppler-qt6" "LIBS += -lpoppler-qt5"
'';
nativeBuildInputs = [ pkg-config qmake wrapQtAppsHook ];
@ -26,10 +28,10 @@ stdenv.mkDerivation rec {
qmakeFlags = [ "../kitsas/kitsas.pro" ];
installPhase = if stdenv.isDarwin then ''
installPhase = lib.optionalString stdenv.isDarwin ''
mkdir -p $out/Applications
mv kitsas.app $out/Applications
'' else ''
'' + lib.optionalString (!stdenv.isDarwin) ''
install -Dm755 kitsas -t $out/bin
install -Dm644 ../kitsas.svg -t $out/share/icons/hicolor/scalable/apps
install -Dm644 ../kitsas.png -t $out/share/icons/hicolor/256x256/apps

View File

@ -1,24 +0,0 @@
diff --git i/kitsas/apuri/siirtoapuri.cpp w/kitsas/apuri/siirtoapuri.cpp
index 9a2c51f3..9565200f 100644
--- i/kitsas/apuri/siirtoapuri.cpp
+++ w/kitsas/apuri/siirtoapuri.cpp
@@ -25,6 +25,7 @@
#include "db/tositetyyppimodel.h"
#include "tiliote/tiliotekirjaaja.h"
+#include <QtAlgorithms>
#include <QDebug>
SiirtoApuri::SiirtoApuri(QWidget *parent, Tosite *tosite) :
@@ -361,8 +362,9 @@ void SiirtoApuri::laskunmaksu()
TositeVienti eka = lista.at(0).toMap();
tosite()->asetaPvm(eka.pvm());
tosite()->asetaOtsikko( eka.selite() );
- if( eka.kreditEuro() )
- lista.swapItemsAt(0,1);
+ if( eka.kreditEuro() ) {
+ qSwap(lista.begin()[0], lista.begin()[1]);
+ }
tosite()->viennit()->asetaViennit(lista);
reset();