Bug 260278 - Change all designer based widgets to use the generated code through composition instead of inheritance
Summary: Change all designer based widgets to use the generated code through compositi...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-16 14:42 UTC by Cristian Oneț
Modified: 2020-05-25 08:56 UTC (History)
1 user (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 Cristian Oneț 2010-12-16 14:42:12 UTC
Version:           SVN trunk (using KDE 4.5.4) 
OS:                Linux

in the case of the widgets we design using Qt Designer it would be better to have instead of:
contents of kmmwidget.h:
#include "ui_kmmwidgetdecl.h"

class kmmwidget : public QWidget, public Ui::kmmwidgetdecl
{
....
};
like it is now, this version:

contents of kmmwidget.h:
class Ui::kmmwidgetdecl; // forward decl or even pimpl
class kmmwidget : public 
{
....
Ui::kmmwidgetdecl *ui;
};

contents of kmmwidget.cpp:
#include "ui_kmmwidgetdecl.h"

This way we could avoid errors caused by included headers which are not yet generated because they are included in another module then the one they are generated in for ex. reports include headers from widgets and building reports starts when widgets is not yet generated.

I find this solution much better then explicitly adding cmake dependencies. Since it reduces build time and it's a good practice to avoid polluting header files. Especially the headers of very important classes.

Reproducible: Always
Comment 1 Cristian Oneț 2011-01-06 15:05:04 UTC
SVN commit 1212306 by conet:

BUG: 260278
Change all designer based widgets to used the generated code trough composition instead of inheritance.
There are more changes to come for this one but I wanted to commit this to get rid of these changes is my sandbox.

 M  +22 -13    kchooseimportexportdlg.cpp  
 M  +17 -12    kchooseimportexportdlg.h  
 M  +25 -12    kconfirmmanualenterdlg.cpp  
 M  +12 -16    kconfirmmanualenterdlg.h  
 M  +58 -35    kgncpricesourcedlg.cpp  
 M  +5 -18     kgncpricesourcedlg.h  
 M  +45 -30    knewfiledlg.cpp  
 M  +9 -14     knewfiledlg.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1212306
Comment 2 Thomas Baumgart 2011-01-06 15:15:35 UTC
... because there is more to come :)
Comment 3 Cristian Oneț 2011-01-07 11:53:22 UTC
SVN commit 1212522 by conet:

BUG: 260278
Change all designer based widgets to used the generated code trough composition instead of inheritance.
There are more changes to come for this one but I wanted to commit this to get rid of these changes is my sandbox.

 M  +225 -204  dialogs/kfindtransactiondlg.cpp  
 M  +15 -17    dialogs/kfindtransactiondlg.h  
 M  +34 -12    dialogs/knewbudgetdlg.cpp  
 M  +9 -26     dialogs/knewbudgetdlg.h  
 M  +86 -85    dialogs/kreportconfigurationfilterdlg.cpp  
 M  +2 -0      views/kgloballedgerview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1212522
Comment 4 Jack 2020-01-17 18:27:24 UTC
Considering the age of this bug, is it still relevant, or has it been fixed by migrating to Frameworks?
Comment 5 Thomas Baumgart 2020-01-17 19:12:12 UTC
I think we can close this one.
Comment 6 Thomas Baumgart 2020-05-25 08:56:53 UTC
This is not relevant anymore as things have changed too much. I follow Jack's suggestion to close the bug as unmaintained.