Re: Problems when adding a combo box to a toolbar and KActionCollection in KF6

2023-10-30 Thread Stefano Crocco
On lunedì 30 ottobre 2023 01:07:43 CET Albert Astals Cid wrote:
> El diumenge, 29 d’octubre de 2023, a les 18:38:50 (CET), Stefano Crocco va
> 
> escriure:
> > Hello to everyone,
> > while porting Konqueror to KF6, I've hit a problem I don't know how to
> > solve. The issue is that it's impossible to give focus to the location bar
> > by clicking on it with the mouse as you can do in KF5.
> > 
> > After spending some hours trying to find out the cause of this, I reached
> > the conclusion that it has something to do with the main window's
> > actionCollection. A shortened version of the code which creates the
> > location bar is the following:
> > 
> > KonqMainWindow::KonqMainWindow() : KParts::MainWindow()
> > {
> > 
> >   //...
> >   m_combo = new KonqCombo(nullptr) //KonqCombo derives from
> >   KHistoryComboBox
> > 
> > //...
> > 
> >   QWidgetAction *comboAction = new QWidgetAction(this);
> >   actionCollection()->addAction(QStringLiteral("toolbar_url_combo"),
> > 
> > comboAction);
> > 
> >  comboAction->setDefaultWidget(m_combo);
> >  
> >   //...
> >   setXMLFile(QStringLiteral("konqueror.rc"));
> >   createGUI(nullptr);
> > 
> > //"locationToolBar" is the name of the toolbar where the widget should be
> > //inserted
> > 
> >   m_combo->setParent(toolBar(QStringLiteral("locationToolBar")));
> >   m_combo->show();
> >  
> >  //...
> > 
> > }
> > 
> > If I remove the addAction method, the location bar is, of course,
> > displayed
> > floating above the toolbar and it can be given focus clicking on it with
> > the mouse. The same happens if I remove the setDefaultWidget line. I
> > tried adding the action to the toolbar using
> > 
> > QAction *a =
> > toolBar(QStringLiteral("locationToolBar"))->addWidget(m_combo);
> > actionCollection()->addAction(QStringLiteral("toolbar_url_combo"), a);
> > 
> > This gives the same problem as the previous code; however, if I remove the
> > second line, the focus works correctly again. This is what made me suppose
> > the problem is related to KActionCollection.
> > 
> > Initially, I thought that the problem was caused by some event filter or
> > event handler, so I tried creating a different action with new QComboBox,
> > new action name and so on, but the results were the same. Also, using a
> > QLineEdit instead of a QComboBox changed nothing.
> > 
> > I tried looking at the source code of KActionCollection, but I couldn't
> > find any significant difference between the KF5 and the KF6 version. The
> > same can be said for Konqueror source code, however.
> > 
> > Can someone give me some hints about what's happening?
> 
> Is this code live in some branch so we can try it?
> 
> Cheers,
>   Albert
> 

Yes, it's in the kf6 branch of the Konqueror repository. Note that the code is 
actually split into several functions in src/konqmainwindow.cpp which are 
called by the main window constructor:
- the combo box is created in the function initCombo (line 2832) called from 
line 278 of the constructor
- the actions are created in the function initActions (line 3322) called from 
line 279 of the constructor
- the combo box is given the toolbar as a parent and displayed in lines 
287-288 of the constructor.

Stefano




Re: Problems when adding a combo box to a toolbar and KActionCollection in KF6

2023-10-30 Thread Stefano Crocco
On lunedì 30 ottobre 2023 01:11:27 CET Nicolas Fella wrote:
> On 10/29/23 18:38, Stefano Crocco wrote:
> > Hello to everyone,
> > while porting Konqueror to KF6, I've hit a problem I don't know how to
> > solve. The issue is that it's impossible to give focus to the location
> > bar by clicking on it with the mouse as you can do in KF5.
> > 
> > After spending some hours trying to find out the cause of this, I reached
> > the conclusion that it has something to do with the main window's
> > actionCollection. A shortened version of the code which creates the
> > location bar is the following:
> > 
> > KonqMainWindow::KonqMainWindow() : KParts::MainWindow()
> > {
> > 
> >//...
> >m_combo = new KonqCombo(nullptr) //KonqCombo derives from
> >KHistoryComboBox
> >//...
> >QWidgetAction *comboAction = new QWidgetAction(this);
> >actionCollection()->addAction(QStringLiteral("toolbar_url_combo"),
> > 
> > comboAction);
> > 
> >   comboAction->setDefaultWidget(m_combo);
> >   
> >//...
> >setXMLFile(QStringLiteral("konqueror.rc"));
> >createGUI(nullptr);
> > 
> > //"locationToolBar" is the name of the toolbar where the widget should be
> > //inserted
> > 
> >m_combo->setParent(toolBar(QStringLiteral("locationToolBar")));
> >m_combo->show();
> >   
> >   //...
> > 
> > }
> > 
> > If I remove the addAction method, the location bar is, of course,
> > displayed
> > floating above the toolbar and it can be given focus clicking on it with
> > the mouse. The same happens if I remove the setDefaultWidget line. I
> > tried adding the action to the toolbar using
> > 
> > QAction *a =
> > toolBar(QStringLiteral("locationToolBar"))->addWidget(m_combo);
> > actionCollection()->addAction(QStringLiteral("toolbar_url_combo"), a);
> > 
> > This gives the same problem as the previous code; however, if I remove the
> > second line, the focus works correctly again. This is what made me suppose
> > the problem is related to KActionCollection.
> > 
> > Initially, I thought that the problem was caused by some event filter or
> > event handler, so I tried creating a different action with new QComboBox,
> > new action name and so on, but the results were the same. Also, using a
> > QLineEdit instead of a QComboBox changed nothing.
> > 
> > I tried looking at the source code of KActionCollection, but I couldn't
> > find any significant difference between the KF5 and the KF6 version. The
> > same can be said for Konqueror source code, however.
> > 
> > Can someone give me some hints about what's happening?
> > 
> > Thanks in advance
> > 
> > Stefano
> 
> Hi,
> 
> focus and toolbar brings
> https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/188 to my
> mind. Can  you check whether it works as you expect before that change?

Yes, without that change, everything works correctly. Thanks for the 
information.

Do you think it would make sense to create a merge request for kxmlgui so that 
the focus policy is only changed if it doesn't include TabFocus? Otherwise, I 
can just manually set the combo box focus policy.

Stefano




Bringing Glaxnimate into KDE

2023-10-30 Thread Mattia Basaglia

Hi,

I'm the maintainer of Glaxnimate (https://glaxnimate.mattbas.org/) a 
vector graphics animation editor that has been integrated with kdenlive 
through the MLT framework. I've been having talks with some of the 
kdenlive devs and we came to the conclusion that it would be helpful to 
bring Glaxnimate into KDE.


With the help of jk from kdenlive, we've made the code reuse compliant, 
and added some craft jobs to the CI.


I would need some guidance on how to push this further.

Thanks,

Matt


Re: Problems when adding a combo box to a toolbar and KActionCollection in KF6

2023-10-30 Thread Ingo Klöcker
On Montag, 30. Oktober 2023 09:53:08 CET Stefano Crocco wrote:
> On lunedì 30 ottobre 2023 01:11:27 CET Nicolas Fella wrote:
> > On 10/29/23 18:38, Stefano Crocco wrote:
> > > Hello to everyone,
> > > while porting Konqueror to KF6, I've hit a problem I don't know how to
> > > solve. The issue is that it's impossible to give focus to the location
> > > bar by clicking on it with the mouse as you can do in KF5.
> > 
> > focus and toolbar brings
> > https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/188 to my
> > mind. Can  you check whether it works as you expect before that change?
> 
> Yes, without that change, everything works correctly. Thanks for the
> information.
> 
> Do you think it would make sense to create a merge request for kxmlgui so
> that the focus policy is only changed if it doesn't include TabFocus?

Yes, if the current policy flags don't include TabFocus then TabFocus should be 
added but the current policy flags should be kept.

Regards,
Ingo


signature.asc
Description: This is a digitally signed message part.


Re: Problems when adding a combo box to a toolbar and KActionCollection in KF6

2023-10-30 Thread Stefano Crocco
On lunedì 30 ottobre 2023 11:53:51 CET Ingo Klöcker wrote:
> On Montag, 30. Oktober 2023 09:53:08 CET Stefano Crocco wrote:
> > On lunedì 30 ottobre 2023 01:11:27 CET Nicolas Fella wrote:
> > > On 10/29/23 18:38, Stefano Crocco wrote:
> > > > Hello to everyone,
> > > > while porting Konqueror to KF6, I've hit a problem I don't know how to
> > > > solve. The issue is that it's impossible to give focus to the location
> > > > bar by clicking on it with the mouse as you can do in KF5.
> > > 
> > > focus and toolbar brings
> > > https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/188 to my
> > > mind. Can  you check whether it works as you expect before that change?
> > 
> > Yes, without that change, everything works correctly. Thanks for the
> > information.
> > 
> > Do you think it would make sense to create a merge request for kxmlgui so
> > that the focus policy is only changed if it doesn't include TabFocus?
> 
> Yes, if the current policy flags don't include TabFocus then TabFocus should
> be added but the current policy flags should be kept.
> 
> Regards,
> Ingo

Done: https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/203

Stefano





Re: Bringing Glaxnimate into KDE

2023-10-30 Thread Carl Schwan
On Monday, October 30, 2023 11:43:47 AM CET Mattia Basaglia wrote:
> Hi,

Hi Matt,

> I'm the maintainer of Glaxnimate (https://glaxnimate.mattbas.org/) a
> vector graphics animation editor that has been integrated with kdenlive
> through the MLT framework. I've been having talks with some of the
> kdenlive devs and we came to the conclusion that it would be helpful to
> bring Glaxnimate into KDE.
> 
> With the help of jk from kdenlive, we've made the code reuse compliant,
> and added some craft jobs to the CI.
> 
> I would need some guidance on how to push this further.

First thing first, make sure you have read https://manifesto.kde.org/
commitments/ and https://manifesto.kde.org/benefits/

Then you need to find a sponsor and this mailing list is indeed the right place 
to do that. I think someone from the Kdenlive team with whom you already 
interacted (e.g. jk) would be the best for this task. In none of them has the 
time, I can probably also help.

Then create a sysadmin request to move your repo to the KDE infrastructure:
https://phabricator.kde.org/maniphest/task/edit/form/2/

And ask to get a KDE developer account in https://identity.kde.org  so you can 
keep your git write access to your project ;)

Cheers,
Carl

> 
> Thanks,
> 
> Matt






Re: Bringing Glaxnimate into KDE

2023-10-30 Thread Ben Cooksley
On Tue, Oct 31, 2023 at 2:04 AM Carl Schwan  wrote:

> On Monday, October 30, 2023 11:43:47 AM CET Mattia Basaglia wrote:
> > Hi,
>
> Hi Matt,
>
> > I'm the maintainer of Glaxnimate (https://glaxnimate.mattbas.org/) a
> > vector graphics animation editor that has been integrated with kdenlive
> > through the MLT framework. I've been having talks with some of the
> > kdenlive devs and we came to the conclusion that it would be helpful to
> > bring Glaxnimate into KDE.
> >
> > With the help of jk from kdenlive, we've made the code reuse compliant,
> > and added some craft jobs to the CI.
> >
> > I would need some guidance on how to push this further.
>
> First thing first, make sure you have read https://manifesto.kde.org/
> commitments/  and
> https://manifesto.kde.org/benefits/
>
> Then you need to find a sponsor and this mailing list is indeed the right
> place
> to do that. I think someone from the Kdenlive team with whom you already
> interacted (e.g. jk) would be the best for this task. In none of them has
> the
> time, I can probably also help.
>
> Then create a sysadmin request to move your repo to the KDE infrastructure:
> https://phabricator.kde.org/maniphest/task/edit/form/2/
>
> And ask to get a KDE developer account in https://identity.kde.org  so
> you can
> keep your git write access to your project ;)
>

These should be done simultaneously, and the requests should refer to each
other (doesn't need a link, just a note in there that this is part of
$project incubation) so we can ensure they're both processed at the same
time.
While in most cases we pick up on these requests coming in simultaneously,
it has happened once or twice where people have lost access for a couple of
days as they didn't flag this.


>
> Cheers,
> Carl
>

Cheers,
Ben


>
> >
> > Thanks,
> >
> > Matt
>
>
>
>
>