Bug 312127 - KMyMoney New Investment Wizard
Summary: KMyMoney New Investment Wizard
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-23 17:26 UTC by Peter Jones
Modified: 2013-01-26 16:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Jones 2012-12-23 17:26:49 UTC
When you go through the Wizard (Choosing Stocks) and get to the online update screen and choose an online data source the 'Factor' field stays greyed out.  To enter a Factor (I am entering UK Shares), you need to save the record then go back in under edit to change the Factor.

Reproducible: Always

Steps to Reproduce:
1. Start New Investment Wizard
2. Choose Stocks, and on-line update
3. Try and change 'Factor'
Actual Results:  
Factor is greyed out

Expected Results:  
Able to enter factor without having to go back in.
Comment 1 David Houlden 2012-12-23 19:45:27 UTC
This is a duplicate of bug 281459
Comment 2 Thomas Baumgart 2012-12-23 22:42:39 UTC

*** This bug has been marked as a duplicate of bug 281459 ***
Comment 3 allan 2012-12-24 13:00:40 UTC
As far as I can see, m_onlineFactor is enabled at KOnlineUpdateWizardPage::slotCheckPage(const QString& txt), which can be called from KNewInvestmentWizard::KNewInvestmentWizard(QWidget *parent) m_onlineUpdatePage->slotCheckPage(QString()) or from KNewInvestmentWizard::init2(void).  the latter only getting called when editing an existing security, or when an existing symbol has been entered.  So, it seems the first call is the relevant one.

However, this call to slotCheckPage() is made with txt = QString(), so the widget will not get enabled.  QString() could be replaced with a non-empty string, but there seems little point in that.  Instead, why have the check for a string in m_onlineFactor->setEnabled(!txt.isEmpty())?  Why not change it to setEnabled(void))?  Why have the enabling conditional in a constructor?
Comment 4 allan 2012-12-24 17:16:35 UTC
As a probably better alternative, more in keeping with the intended use, and, assuming it might have been the intention to enable the m_onlineFactor widget once an update source has been selected, I've introduced another call to m_onlineUpdatePage->slotCheckPage(), triggered by a connect when the source combo is activated.
This seems to work as I expected.
Comment 5 allan 2013-01-26 16:29:06 UTC
Fixed in duplicate - Bug 281459 New: Can't select Factor in New Investment Wizard

(Sorry, but I did not see your comment on a duplicate of the bug. I just fixed that similar to your proposed patch but a bit differently. So you can simply drop this review request here.

- Thomas)