[bt-devel] Cleanup for KHTML and KDE/Qt Porting
Gary Holmlund
gary.holmlund at gmail.com
Sun Feb 15 15:23:30 MST 2009
Eeli Kaikkonen wrote:
> Gary Holmlund wrote:
>>
>> I removed the KHTML code that is not used any more.
>>
>> I also checked in changes for CHTMLWriteDisplay to eliminate using
>> KDE functions for the toolbar font, font size, and font color
>> buttons. I was working on this in December before I went on vacation
>> and just got back to finishing it.
>>
>> I looked at the remaining KDE code and am encouraged that we may be
>> able to port it relatively quickly. Below is a search for all the KDE
>> include statements. It shows the type of items remaining.
>>
>> Eeli, I think you were going to do part of the porting. How should we
>> split it?
>>
>
> I have been working on the actions in display windows. It's not easy
> because it involves much more than changing KActions to QActions. I'm
> trying to think forwards and find a way to configure the shortcuts. If
> KActionCollection were not used originally the work would be easier,
> but now the code is not easy understand. Removing KActionCollection
> completely wouldn't be too hard, but I want to replace it with some
> system which can help with shortcut configuration. And this leads to
> the whole configuration system. There is some discussion about that in
> http://devel.bibletime.info/wiki/Reworking_the_Configuration_System.
> To be honest, the current one is horrible. You could read the
> discussion and think about an alternative.
>
> Or is it better to just remove KActionCollection and create
> non-configurable QActions, leaving the config system later?
I think we should create a BtActionCollection to replace
KActionCollection. I does not have to do much now, but if we loose the
collection concept it will be harder to add the shortcut editor later.
I think the implementation of this class interface will do everything
we need to replace KActionCollection for now. This assumes that the
KAction's have been changed to QAction's.
class BtActionCollection : public QObject
{
Q_OBJECT
public:
BtActionCollection(QObject* parent);
~BtActionCollection();
addAction(const QString& name, QAction* action);
private:
QMap<QString, QAction*> m_actions;
};
Gary
More information about the bt-devel
mailing list