Phase 2 commits
Ralf Habacker
ralf.habacker at freenet.de
Wed Aug 12 08:55:52 BST 2020
Am 08.08.20 um 05:28 schrieb Prasun Kumar:
> Hi mentors,
>
> The rest of the work from the second phase has been completed. The databases
> for the additional countries have been incorporated in the library.
> Please take a look
> and suggest any necessary changes.
>
> Commits:
> https://sourceforge.net/u/prasun/ktoblzcheck-gsoc2020/commit_browser
I saw that the executables ktoblzcheck and benchmark are also depending
on sqlite library, where it should only be used by the library.
In src/lib/CMakeLists.txt you can check this by using the following line
add_library(ktoblzcheck ${MODE} ${ktoblzcheck_LIB_SRCS})
target_link_libraries(ktoblzcheck PRIVATE stdc++ ${LIBS}
${SQLite3_LIBRARIES})
and remove any other usage of ${SQlite3_LIBRARIES}
The remaining references in main() function of ktoblzcheck should be
replaced by a method from class AccountNumberCheck.
sqlite3 *db;
char* errorMsg;
int retcode = sqlite3_open(bankdataFile.c_str(),&db);
if (retcode) {
std::cerr << PACKAGE ": Warning: Specified bankdata file '"
<< bankdataFile
<< "' could not be opened. Trying default
database.\n"
<< errorMsg
<< std::endl;
This stuff is already implemented in AccountNumberCheck::readFile()
In the function check_testkontos() I think the call to
AccountNumberCheck checker(filename)
already checks opening and reading a database file, which would reduce
int check_testkontos(const std::string &filename)
{
assert(filename.size() > 0);
try {
AccountNumberCheck checker(filename);
} catch (int i) {
exit 1;
}
return 0;
}
Regards
Ralf
More information about the Kde-finance-apps
mailing list