[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/office/kraft
From:       Klaas Freitag <klaas () freisturz ! de>
Date:       2011-10-13 9:29:52
Message-ID: 20111013092952.1CF80AC887 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1258796 by freitag:

Correct formatting and precision of amounts

 M  +11 -1     Changes.txt  
 M  +7 -1      src/reportgenerator.cpp  
 M  +1 -1      src/version.h  


--- trunk/playground/office/kraft/Changes.txt #1258795:1258796
@@ -1,6 +1,16 @@
 Changes since version 0.43: #########################################
+- Completely reworked the addressbook widget in Kraft, used in new doc
+  assistant and in the "who am i" dialog: Fully Akonadi-based, works
+  with various addressbooks and loads addresses way more fast.
+- Completely reworked text template widget used in the document editor:
+  Less bugs, more obvious gui, help texts where needed
 - Fixed bug that crashed Kraft when clicking on empty catalog chapters.
-- Add ability to add language dependant report template files
+- Add ability to add localized report template files, added german
+  localization
+- Fixed bug that numbers in the doc are not localized correctly
+- Fixed bug that the doc type is not taken correctly from the new doc
+  wizard
+- Added a search line in the "who am i"-dialog
 
 Changes since version 0.41: #########################################
 - Added search box in digest lists again, for that enhanced the search
--- trunk/playground/office/kraft/src/reportgenerator.cpp #1258795:1258796
@@ -204,7 +204,13 @@
     tmpl.setValue( "POSITIONS", "POS_TEXT",
                    rmlString( pos.text(), QString( "%1text" ).arg( pos.kind().toLower() ) ) );
 
-    h.setNum( pos.amount(), 'f', 2 );
+    // format the amount value of the item, do not show the precision if there is no fraction
+    double amount = pos.amount();
+    if( amount - qRound(amount) > 0 ) // if there is no fraction
+      h = mArchDoc->locale()->formatNumber( amount, 2 );
+    else
+      h = mArchDoc->locale()->formatNumber( amount, 0 );
+
     tmpl.setValue( "POSITIONS", "POS_AMOUNT", h );
     tmpl.setValue( "POSITIONS", "POS_UNIT", pos.unit() );
     tmpl.setValue( "POSITIONS", "POS_UNITPRICE", pos.unitPrice().toString( mArchDoc->locale() ) );
--- trunk/playground/office/kraft/src/version.h #1258795:1258796
@@ -1,7 +1,7 @@
 #define KPLANT_VERSION "0.4"
 #define KRAFT_VERSION "0.44"
 
-#define KRAFT_CODENAME "Ticher"
+#define KRAFT_CODENAME "Dedicated to Seelchen."
 
 #define KRAFT_REQUIRED_SCHEMA_VERSION 18
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic