|
|
Subject: Re: A DBUS call for calling global shortcuts. - msg#00195
On 12 April 2010 13:07, Kelvie Wong <kelvie@xxxxxxxx> wrote:
> Scratch that, this may have to wait until after exams (or during a study
> break).
>
> --
> Kelvie Wong
>
It has been committed. r1115342
To call:
qdbus org.kde.kglobalaccel /component/kwin
org.kde.kglobalaccel.Component.invokeShortcut ShowDesktopGrid
--
Kelvie Wong
> > Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
Thread at a glance:
Previous Message by Date:
Re: Problem with QGraphicsLinearLayout
On Thursday, April 15, 2010 11:53:51 Christophe Olinger wrote:
> I have a crash in my application (plasma media center) that I do not
> understand. This is my situation:
>
> I have a bar which is supposed to show iconwidgets. The class of that bar
> has a function which I use to add widgets to my bar. Depending on the
> widget, I want it to be on the left, the middle or the right side of my
> bar. Later I want to add a bottom part but that's not the problem at the
> moment. (The function takes a list of Widgets as paramter)
>
> The way I understood layouts in Qt I did the following:
> 1) I created a QGraphicsLinearLayout m_layoutHorizontalTop (this is the
> container)
> 2) I created additional layouts: m_layoutTopLeft, m_layoutTopMiddle,
> m_layoutTopRight (this will be boxes in the container)
> 3) In the init() of my bar I did:
> m_layoutHorizontalTop->addItem(m_layoutTopLeft) (I only add the first box)
> 4) On my bar I do: addLayout->(m_layoutHorizontalTop)
> 5) my function adds items only to the m_layoutTopLeft, (later also to the
> other layouts)
> 6) no problem, icons are there
>
> Now as soon as I add this line in my init (which would add the next box):
> m_layoutHorizontalTop->addItem(m_layoutTopMiddle) my application crashes on
> startup?!
>
> It is not the fact that I add this layout that makes it crash, but the fact
> that my function wants to add widgets to the TopLeft layout. I thought
> these layouts would be boxes that I could fill with widgets, but why does
> that fact that I put two boxes next to each other interfere with me adding
> widgets in one box?
>
> Confusion :-?
Looks like a problem I've run into as well, it's a bug in Qt:
http://bugreports.qt.nokia.com/browse/QTBUG-6447
If you do
QGraphicsLinearLayout* m_layout = new QGraphicsLinearLayout(this);
m_outerLayout->addItem(m_layout);
it'll crash, if you leave the parent out of the constructor:
QGraphicsLinearLayout* m_layout = new QGraphicsLinearLayout;
m_outerLayout->addItem(m_layout);
it should work. (And the parenting will be OK as well, as the addItem() call
will
reparent m_layout correctly anyway.)
Is this the same bug you're running into?
Cheers,
--
sebas
http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
signature.asc
Description: This is a digitally signed message part.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
Next Message by Date:
Re: Problem with QGraphicsLinearLayout
Looks like a problem I've run into as well, it's a bug in Qt:
http://bugreports.qt.nokia.com/browse/QTBUG-6447
If you do
QGraphicsLinearLayout* m_layout = new QGraphicsLinearLayout(this);
m_outerLayout->addItem(m_layout);
it'll crash, if you leave the parent out of the constructor:
QGraphicsLinearLayout* m_layout = new QGraphicsLinearLayout;
m_outerLayout->addItem(m_layout);
it should work. (And the parenting will be OK as well, as the addItem() call will
reparent m_layout correctly anyway.)
Is this the same bug you're running into?Unfortunately reparenting or no parents at all didn't change the outcome.Here is my code: http://pastebin.com/fqszdrK0
- The layouts are initialized in the constructor- As soon as I uncomment line 57, the app crashes- At line 157 is the function that adds the widgets. At the moment it only adds to one layout, but this already causes it to crash if I enable another layout.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
Previous Message by Thread:
Re: A DBUS call for calling global shortcuts.
On 8 April 2010 00:12, Kelvie Wong <kelvie@xxxxxxxx> wrote:
> On 7 April 2010 04:29, Eduardo Robles Elvira <edulix@xxxxxxxxx> wrote:
>> On Tue, Apr 6, 2010 at 2:06 PM, Michael Jansen <kde@xxxxxxxxxxxxxxxxxx>
>> wrote:
>>> Hi
>>>
>>> Just my thought. But since i never reserve the right to veto any change
>>> feel free to ignore them
>>>
>>> 1. I would really like to hear about use cases for that patch. Just because
>>> we can do it doesn't
>>> mean we should do it. In most use cases i can think of adding a dbus method
>>> doXYZ to the
>>> application's dbus interface is the better idea. You will know if the app
>>> is running that way for
>>> example.
>>
>> Hello:
>>
>> I have written a krunner runner for global shortcuts, but I haven't
>> published it and kept it to myself instead because there was no easy
>> way to trigger the shorcuts via dbus (the runner obtains the list of
>> shortcuts also via dbus), so my runner only shows/filters for shortcut
>> names and shortcut key combos but doesn't really trigger the
>> shortcuts' actions, and that makes the runner quite incomplete.
>>
>> I would have written this patch myself at some point in time, but I
>> for one welcome it (less work for me :D) and I think that the global
>> shortcuts runner is a pretty good use case isn't it? :P Of course
>> after this patch gets accepted, I'll publish the global shortcuts
>> runner so that everyone can enjoy it =).
>>
>> Regards,
>> Eduardo Robles Elvira.
>>
>>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe
>>>> <<
>>
>
> I was thinking of committing it as soon as I move it over to the right
> D-Bus path. Perhaps later this weekend.
>
>
> --
> Kelvie Wong
>
Scratch that, this may have to wait until after exams (or during a study break).
--
Kelvie Wong
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
Next Message by Thread:
Re: A DBUS call for calling global shortcuts.
On Fri, Apr 16, 2010 at 5:47 AM, Kelvie Wong <kelvie@xxxxxxxx> wrote:
> On 12 April 2010 13:07, Kelvie Wong <kelvie@xxxxxxxx> wrote:
>> Scratch that, this may have to wait until after exams (or during a study
>> break).
>>
>> --
>> Kelvie Wong
>>
>
> It has been committed. r1115342
>
> To call:
>
> qdbus org.kde.kglobalaccel /component/kwin
> org.kde.kglobalaccel.Component.invokeShortcut ShowDesktopGrid
>
> --
> Kelvie Wong
Nice!
In return, I just committed a first version of the globalshortcuts
runner in playground/base/plasma/runners/globalshortcuts ;-)
Regards,
Eduardo Robles Elvira.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
|
|