[skrooge] /: Code and doc quality

Stephane MANKOWSKI null at kde.org
Sat Nov 9 10:07:19 GMT 2019


Git commit 133dd40a1dab19ddd38c6c3acde0f069b742b94a by Stephane MANKOWSKI.
Committed on 09/11/2019 at 10:07.
Pushed by smankowski into branch 'master'.

Code and doc quality

M  +10   -10   doc/index.docbook
M  +2    -2    plugins/import/skrooge_import_csv/skgimportplugincsv.cpp
M  +1    -1    plugins/import/skrooge_import_ofx/skgimportpluginofx.cpp
M  +3    -3    skgbasemodeler/skgdocument.h
M  +1    -1    skgbasemodeler/skgdocumentprivate.h
M  +2    -2    tests/skgbankmodelertest/skgtestimportcsv.cpp
M  +0    -1    tests/skgbankmodelertest/skgtestimportgnucash.cpp
M  +1    -1    tests/skgbankmodelertest/skgtestimportqif1.cpp

https://commits.kde.org/skrooge/133dd40a1dab19ddd38c6c3acde0f069b742b94a

diff --git a/doc/index.docbook b/doc/index.docbook
index 1751980a7..e81b98b15 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -52,7 +52,7 @@
     <legalnotice>&FDLNotice;</legalnotice>
     
     <date>2017-08-30</date>
-    <releaseinfo>Skrooge 2.9.0</releaseinfo>
+    <releaseinfo>&skrooge; 2.9.0</releaseinfo>
     
     <abstract>
       <para>
@@ -539,7 +539,7 @@
 	  </varlistentry>
 	  <varlistentry>
 	    <term><menuchoice><guimenu>Export</guimenu></menuchoice></term>
-	    <listitem><para><link linkend="export_table">Export the table</link> as a stand-alone file. Supported formats are pdf, csv, html, svg, odt or txt.</para></listitem>
+	    <listitem><para><link linkend="export_table">Export the table</link> as a stand-alone file. Supported formats are pdf, csv, html, &SVG;, odt or txt.</para></listitem>
 	  </varlistentry>
 	</variablelist>
 	
@@ -758,17 +758,17 @@
       
       <sect2 id="export_file">
 	<title>Export all your data in one file</title>
-	<para>Using the menu <menuchoice><guimenu>File</guimenu> <guimenuitem>Export</guimenuitem></menuchoice>, a CSV, QIF, JSON, Kmymoney, Ledger, IIF, Sqlite, Sqlcipher or XML file will be created, containing all operations in the current document. This is the option to choose if you need to export your data to another application.</para>
+	<para>Using the menu <menuchoice><guimenu>File</guimenu> <guimenuitem>Export</guimenuitem></menuchoice>, a CSV, QIF, &JSON;, Kmymoney, Ledger, IIF, Sqlite, Sqlcipher or <!---->&XML; file will be created, containing all operations in the current document. This is the option to choose if you need to export your data to another application.</para>
       </sect2>
       
       <sect2 id="export_partial_file">
 	<title>Export partially your data in one file</title>
-	<para>If you select some accounts or some operations before using the menu <menuchoice><guimenu>File</guimenu> <guimenuitem>Export</guimenuitem></menuchoice>, a CSV, QIF, JSON, Kmymoney, Ledger, IIF, Sqlite, Sqlcipher or XML file will be created, containing the selected accounts (with their operations) or the selected operation. This is the option to choose if you need to export your data to another application.</para>
+	<para>If you select some accounts or some operations before using the menu <menuchoice><guimenu>File</guimenu> <guimenuitem>Export</guimenuitem></menuchoice>, a CSV, QIF, &JSON;, Kmymoney, Ledger, IIF, Sqlite, Sqlcipher or &XML; file will be created, containing the selected accounts (with their operations) or the selected operation. This is the option to choose if you need to export your data to another application.</para>
       </sect2>
       
       <sect2 id="export_table">
 	<title>Export a specific table</title>
-	<para>All <link linkend="tables">tables</link> in &skrooge; can be exported, either in CSV, &HTML;, ODT, &PDF;, SVG or TXT format. </para>
+	<para>All <link linkend="tables">tables</link> in &skrooge; can be exported, either in CSV, &HTML;, ODT, &PDF;, &SVG; or TXT format. </para>
 	
 	<screenshot>
 	  <mediaobject>
@@ -781,7 +781,7 @@
       
       <sect2 id="export_graph">
 	<title>Export Graph</title>
-	<para>&skrooge; allows you exporting a <link linkend="reports">graph</link>, either in &PDF;, SVG or just any image format supported by &Qt; (PNG, JPG, &GIF;, TIFF...). You can do so by right-clicking on the graph, and choosing the <guimenu>Export</guimenu> option.</para>
+	<para>&skrooge; allows you exporting a <link linkend="reports">graph</link>, either in &PDF;, &SVG; or just any image format supported by &Qt; (PNG, JPG, &GIF;, TIFF...). You can do so by right-clicking on the graph, and choosing the <guimenu>Export</guimenu> option.</para>
 	
 	<screenshot>
 	  <mediaobject>
@@ -1550,7 +1550,7 @@ file is opened. It is also recommended to create a different account (⪚ "ETF"
       
       <sect2 id="templates">
 	<title>Template Operations</title>
-	<para>&skrooge; allows you creating template operations, &ie; operations that can be reused whenever you need it. For example, imagine are used to renting a DVD to watch at home. The operation is always the same :</para>
+	<para>&skrooge; allows you creating template operations, &ie; operations that can be reused whenever you need it. For example, imagine are used to renting a &DVD; to watch at home. The operation is always the same :</para>
 	
 	<itemizedlist>
 	  <listitem><para>Amount: -4.99</para></listitem>
@@ -1559,7 +1559,7 @@ file is opened. It is also recommended to create a different account (⪚ "ETF"
 	  <listitem><para>Category: Leisure > Video</para></listitem>
 	  </itemizedlist>
 	  
-	  <para>However, you cannot make it a recurrent operation, because you rent a DVD when you feel like it, not every week. The idea behind template operations is that it gives you a basic skeleton that can be quickly inserted in your operations list.</para>
+	  <para>However, you cannot make it a recurrent operation, because you rent a &DVD; when you feel like it, not every week. The idea behind template operations is that it gives you a basic skeleton that can be quickly inserted in your operations list.</para>
 	  
 	  <para>Since Template operations are just another kind of operations, you can access them through the operations tab, using the dedicated option in <guimenu>Show</guimenu> menu:</para>
 	  
@@ -1952,7 +1952,7 @@ file is opened. It is also recommended to create a different account (⪚ "ETF"
 	  </screenshot>	
 	  
 	  <para>You can choose the template you want. You can even create your own template by entering the name of the template you would like to create. Your default text editor will be launched with a sample for your template. You just have to follow the comments in this sample.</para>
-	  <para>Do not hesitate to distribute your templates in the category <literal>Skrooge report templates</literal> of the <ulink url="https://store.kde.org/browse/cat/338/">KDE Store</ulink>.</para>
+	  <para>Do not hesitate to distribute your templates in the category <literal>&skrooge; report templates</literal> of the <ulink url="https://store.kde.org/browse/cat/338/">KDE Store</ulink>.</para>
       </sect1>
       
       <sect1 id="units">
@@ -2549,7 +2549,7 @@ file is opened. It is also recommended to create a different account (⪚ "ETF"
 	</itemizedlist>
 	<para>dateformat is the format of the date extracted.</para>
 	</listitem>
-	<listitem><para>Put this file into the same directory as all other <filename class="extension">.extractor</filename> files</para></listitem>
+	<listitem><para>Put this file into the same folder as all other <filename class="extension">.extractor</filename> files</para></listitem>
 	</itemizedlist>
 	</answer>
 	</qandaentry>
diff --git a/plugins/import/skrooge_import_csv/skgimportplugincsv.cpp b/plugins/import/skrooge_import_csv/skgimportplugincsv.cpp
index e385c37e0..73048f4c9 100644
--- a/plugins/import/skrooge_import_csv/skgimportplugincsv.cpp
+++ b/plugins/import/skrooge_import_csv/skgimportplugincsv.cpp
@@ -478,7 +478,7 @@ SKGError SKGImportPluginCsv::importFile()
                         int nbcol = m_csvMapping.count();
                         if (atts.count() < nbcol) {
                             if (i == nb2 - 1) {
-                                //This is a footer (see 408284)
+                                // This is a footer (see 408284)
                                 break;
                             }
                             err = SKGError(ERR_INVALIDARG, i18nc("Error message", "Invalid number of columns in line %1. Expected %2. Found %3.",
@@ -630,7 +630,7 @@ SKGError SKGImportPluginCsv::importFile()
                                         if (i == 0) {
                                             emptyAccount = (defAccount.getNbOperation() == 0);
                                         }
-                                    } else if (val != defAccount.getName()) { // For performance
+                                    } else if (val != defAccount.getName()) {  // For performance
                                         SKGAccountObject account(m_importer->getDocument());
                                         account.setName(val);
                                         err = account.load();
diff --git a/plugins/import/skrooge_import_ofx/skgimportpluginofx.cpp b/plugins/import/skrooge_import_ofx/skgimportpluginofx.cpp
index 4f6ac4a80..ff9eadb73 100644
--- a/plugins/import/skrooge_import_ofx/skgimportpluginofx.cpp
+++ b/plugins/import/skrooge_import_ofx/skgimportpluginofx.cpp
@@ -80,7 +80,7 @@ SKGError SKGImportPluginOfx::importFile()
 
         try {
             // Check file type
-            //auto type = libofx_detect_file_type( m_importer->getLocalFileName().toUtf8().data());
+            // auto type = libofx_detect_file_type( m_importer->getLocalFileName().toUtf8().data());
 
             LibofxContextPtr ctx = libofx_get_new_context();
 
diff --git a/skgbasemodeler/skgdocument.h b/skgbasemodeler/skgdocument.h
index 3f8734e10..a77a1e767 100644
--- a/skgbasemodeler/skgdocument.h
+++ b/skgbasemodeler/skgdocument.h
@@ -41,9 +41,9 @@ class SKGPropertyObject;
 class SKGReport;
 class SKGDocumentPrivate;
 
-using FuncSelect = std::function<void (const SKGStringListList&)>;
-using FuncExist =  std::function<void (bool)>;
-using FuncProgress = std::function<int (int, qint64, const QString&, void*)>;
+using FuncSelect = std::function<void (const SKGStringListList&)>;  // NOLINT(whitespace/parens)
+using FuncExist =  std::function<void (bool)>;  // NOLINT(whitespace/parens)
+using FuncProgress = std::function<int (int, qint64, const QString&, void*)>;  // NOLINT(whitespace/parens)
 /**
 * This class manages skg documents
 */
diff --git a/skgbasemodeler/skgdocumentprivate.h b/skgbasemodeler/skgdocumentprivate.h
index df15ad94f..57a792a39 100644
--- a/skgbasemodeler/skgdocumentprivate.h
+++ b/skgbasemodeler/skgdocumentprivate.h
@@ -33,7 +33,7 @@
 #include "skgerror.h"
 #include "skgservices.h"
 
-using FuncProgress = std::function<int (int, qint64, const QString&, void*)>;
+using FuncProgress = std::function<int(int, qint64, const QString&, void*)>;
 using checksFunction = SKGError(*)(SKGDocument*);
 
 /**
diff --git a/tests/skgbankmodelertest/skgtestimportcsv.cpp b/tests/skgbankmodelertest/skgtestimportcsv.cpp
index 35ea153dc..2ad0fdf39 100644
--- a/tests/skgbankmodelertest/skgtestimportcsv.cpp
+++ b/tests/skgbankmodelertest/skgtestimportcsv.cpp
@@ -631,7 +631,7 @@ int main(int argc, char** argv)
     {
         // BUG 406488
         //
-        //"Date","Type","Number","Payee","Withdrawal (-)","Amount"
+        // "Date","Type","Number","Payee","Withdrawal (-)","Amount"
         SKGDocumentBank document1;
         SKGTESTERROR(QStringLiteral("document1.initialize()"), document1.initialize(), true)
         SKGError err;
@@ -812,4 +812,4 @@ int main(int argc, char** argv)
     }
     // End test
     SKGENDTEST()
-}
+}  // NOLINT(readability/fn_size)
diff --git a/tests/skgbankmodelertest/skgtestimportgnucash.cpp b/tests/skgbankmodelertest/skgtestimportgnucash.cpp
index da469a5c8..91bcfd78a 100644
--- a/tests/skgbankmodelertest/skgtestimportgnucash.cpp
+++ b/tests/skgbankmodelertest/skgtestimportgnucash.cpp
@@ -587,7 +587,6 @@ int main(int argc, char** argv)
             SKGTESTERROR(QStringLiteral("GNUCASH.setName"), account.setName(QStringLiteral("Account2Name(no transaction)")), true)
             SKGTESTERROR(QStringLiteral("GNUCASH.load"), account.load(), true)
         }
-
     }
     // End test
     SKGENDTEST()
diff --git a/tests/skgbankmodelertest/skgtestimportqif1.cpp b/tests/skgbankmodelertest/skgtestimportqif1.cpp
index 9db18f466..e36c55712 100644
--- a/tests/skgbankmodelertest/skgtestimportqif1.cpp
+++ b/tests/skgbankmodelertest/skgtestimportqif1.cpp
@@ -844,4 +844,4 @@ int main(int argc, char** argv)
 
     // End test
     SKGENDTEST()
-}
+}  // NOLINT(readability/fn_size)


More information about the kde-doc-english mailing list