[Development] SIC: QAbstractPrintDialog & QAbstractPageSetupDialog
John Layt
jlayt at kde.org
Thu May 17 00:49:42 CEST 2012
On Wednesday 16 May 2012 10:14:27 Thiago Macieira wrote:
> On quarta-feira, 16 de maio de 2012 00.07.10, John Layt wrote:
> > The QAbstractPritnDialog and QAbstractPageSetupDialog classes are
> > completely unnecessary, are given as bad examples in the Qt API design
> > standards, and were marked to be merged with QPrintDialog and
> > QPageSetupDialog in Qt5.
>
> Hi John
>
> What's the benefit of this change? Do you have something planned for the
> future that would require this?
>
> >From what I can tell, this would only remove the abstract base class...
Initially it was just it clean things up, but I do have an idea to move all
the platform-specific dialog code into the platform plugin. I'd prefer to
have a public factory method to create the dialog but that's a huge SIC break,
so instead I'm looking at making the private be created by a factory method in
the plugin with the public class creator calling the plugin to create the
private. I suspect this would be a lot easier without QAbstractPrintDialog
confusing things, I'd just have QPrintDialog with the common methods in the
base and the rest calling into the private platform methods.
Actually removing the "abstract" base class is just a case of
s/QAbstractPrintDialog/QPrintDialog and tweaking the constructors, as the
class is not really abstract, the only virtual method is exec(), nothing else
gets reimplemented in the platform specific QPrintDialog derived class, only
new methods get added.
So not vital, mostly just to make ongoing maintenance easier.
John.
More information about the Development
mailing list