From 7d56c5379d8449b1980fe89480fa40e0566f342a Mon Sep 17 00:00:00 2001 From: humdingerb Date: Mon, 15 Jul 2024 17:07:26 +0000 Subject: [PATCH] Apply clang-format changes --- src/Database.cpp | 10 ++++++---- src/MainWindow.cpp | 3 ++- src/ScheduledExecutor.cpp | 2 +- src/ScheduledTransData.cpp | 26 ++++++++++++-------------- src/TransactionData.h | 4 ++-- 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/Database.cpp b/src/Database.cpp index f616bcb..801e4e8 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -950,8 +950,9 @@ Database::GetTransferDestination(const uint32& transid, const uint32& accountid) LOCK; BString command; - command.SetToFormat("SELECT accountid FROM transactionlist WHERE transid = %i AND " - "accountid != %i;", + command.SetToFormat( + "SELECT accountid FROM transactionlist WHERE transid = %i AND " + "accountid != %i;", transid, accountid); CppSQLite3Query query = DBQuery(command.String(), "Database::GetTransferDestination:get accountid"); @@ -1067,8 +1068,9 @@ Database::GetScheduledTransaction(const uint32& transid, ScheduledTransData& dat BString command; CppSQLite3Query query; - command = "SELECT accountid,date,payee,amount,category,memo,type,nextdate," - "count,interval,destination FROM scheduledlist WHERE transid = "; + command + = "SELECT accountid,date,payee,amount,category,memo,type,nextdate," + "count,interval,destination FROM scheduledlist WHERE transid = "; command << transid << ";"; query = DBQuery(command.String(), "Database::GetScheduledTransaction:get transaction data"); diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 08d6b2c..af3fc99 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -500,7 +500,8 @@ MainWindow::MessageReceived(BMessage* msg) destAccount = gDatabase.GetTransferDestination(data.GetID(), acc->GetID()); if (destAccount < 0) { ShowAlert(B_TRANSLATE("Scheduling error"), - B_TRANSLATE("Transfers generated by scheduling cannot be scheduled themselves.")); + B_TRANSLATE( + "Transfers generated by scheduling cannot be scheduled themselves.")); break; } diff --git a/src/ScheduledExecutor.cpp b/src/ScheduledExecutor.cpp index 01abd6f..89850ae 100644 --- a/src/ScheduledExecutor.cpp +++ b/src/ScheduledExecutor.cpp @@ -1,7 +1,7 @@ +#include #include "Database.h" #include "ScheduledTransData.h" #include "TimeSupport.h" -#include void diff --git a/src/ScheduledTransData.cpp b/src/ScheduledTransData.cpp index 39ab592..73542f9 100644 --- a/src/ScheduledTransData.cpp +++ b/src/ScheduledTransData.cpp @@ -13,12 +13,11 @@ ScheduledTransData::ScheduledTransData(void) ScheduledTransData::ScheduledTransData(Account* account, const char* date, const char* type, const char* payee, const char* amount, const char* category, const char* memo, const TransactionInterval& interval, const int32& count) - : - TransactionData(account, date, type, payee, amount, category, memo, TRANS_OPEN), - fInterval(interval), - fCount(count), - fNextDate(0), - fDestination(-1) + : TransactionData(account, date, type, payee, amount, category, memo, TRANS_OPEN), + fInterval(interval), + fCount(count), + fNextDate(0), + fDestination(-1) { } @@ -28,14 +27,13 @@ ScheduledTransData::ScheduledTransData(const ScheduledTransData& trans) } -ScheduledTransData::ScheduledTransData(const TransactionData& data, - const TransactionInterval& interval, const int32& count) - : - TransactionData(data), - fInterval(interval), - fCount(count), - fNextDate(0), - fDestination(-1) +ScheduledTransData::ScheduledTransData( + const TransactionData& data, const TransactionInterval& interval, const int32& count) + : TransactionData(data), + fInterval(interval), + fCount(count), + fNextDate(0), + fDestination(-1) { } diff --git a/src/TransactionData.h b/src/TransactionData.h index 891b842..6931705 100644 --- a/src/TransactionData.h +++ b/src/TransactionData.h @@ -1,12 +1,12 @@ #ifndef TRANSACTIONDATA_H #define TRANSACTIONDATA_H +#include +#include #include "Category.h" #include "Fixed.h" #include "TextFile.h" #include "Transaction.h" -#include -#include class TransactionData { public: