No header in dialogs includes non-inherited class.
No class in dialogs inherits from more than one class.
Details
Details
- Reviewers
tbaumgart - Group Reviewers
KMyMoney - Commits
- R261:e807af84de50: Use single inheritance for classes in dialogs
Tested some dialogs.
Diff Detail
Diff Detail
- Repository
- R261 KMyMoney
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Comment Actions
I get the following compile error here:
[ 28%] Building CXX object kmymoney/dialogs/CMakeFiles/dialogs.dir/investtransactioneditor.cpp.o /home/thb/devel/kmymoney/kmymoney/dialogs/investtransactioneditor.cpp:92:24: error: reference to 'Split' is ambiguous void activityFactory(Split::InvestmentTransactionType type) ^ /home/thb/devel/kmymoney/kmymoney/dialogs/investactivities.h:46:32: note: candidate found by name lookup is 'eMyMoney::Split' namespace eMyMoney { namespace Split { enum class InvestmentTransactionType; } } ^ /home/thb/devel/kmymoney/kmymoney/dialogs/investactivities.h:170:7: note: candidate found by name lookup is 'Invest::Split' class Split : public Activity ^
Comment Actions
I get more :( I am using clang as compiler, maybe that adds to being more pedantic.
/home/thb/devel/kmymoney/kmymoney/dialogs/investtransactioneditor.cpp:751:39: error: reference to 'Split' is ambiguous if (d->m_split.reconcileFlag() == Split::State::Unknown) ^ /home/thb/devel/kmymoney/kmymoney/dialogs/investactivities.h:46:32: note: candidate found by name lookup is 'eMyMoney::Split' namespace eMyMoney { namespace Split { enum class InvestmentTransactionType; } } ^ /home/thb/devel/kmymoney/kmymoney/dialogs/investactivities.h:170:7: note: candidate found by name lookup is 'Invest::Split' class Split : public Activity ^
You can simply rename
class Split : public Activity
into
class StockSplit : public Activity
to avoid confusion with the transaction Split.
Also, I get the following error:
/home/thb/devel/kmymoney/kmymoney/dialogs/investtransactioneditor.cpp:347:115: error: no member named 'eMyMoney' in namespace 'eMyMoney'; did you mean simply 'eMyMoney'? ...this, static_cast<void (InvestTransactionEditor::*)(eMyMoney::eMyMoney::... ^~~~~~~~~~~~~~~~~~ eMyMoney /home/thb/devel/kmymoney/kmymoney/dialogs/investactivities.h:46:11: note: 'eMyMoney' declared here namespace eMyMoney { namespace Split { enum class InvestmentTransactionType; } } ^
I am happy to help trying to get this done. It looks very promising.
Comment Actions
I still try to avoid rename to StockSplit. Please try this time and make sure you're applying the latest diff.
Comment Actions
Works for me now. I have not run intensive testing. Just a bank download and starting a report and editing a split transaction.