This is an automatically generated e-mail. To reply, visit: http://svn.reviewboard.kde.org/r/5465/

Ship it!

looks good, though the patch looks like it hasn't been tidied up for commit yet. the code itself looks good, though, so just tidy it up and commit. nicely done!

/trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.h (Diff revision 1)
class Kolourpicker : public Plasma::Applet
40
        virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
40
        //virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
delete the line before committing :)

/trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp (Diff revision 1)
Kolourpicker::Kolourpicker(QObject *parent, const QVariantList &args)
161
    
162
    m_grabWidget = new QWidget( 0,  Qt::X11BypassWindowManagerHint );
163
    m_grabWidget->move( -1000, -1000 );
watch the whitespace :)

/trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp (Diff revision 1)
bool Kolourpicker::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
259
bool Kolourpicker::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
263
/*bool Kolourpicker::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
260
{
264
{
261
    if (watched == m_grabButton && event->type() == QEvent::GraphicsSceneMouseRelease)
265
    if (watched == m_grabButton && event->type() == QEvent::GraphicsSceneMouseRelease)
262
    {
266
    {
263
        m_grabWidget = static_cast<QGraphicsSceneMouseEvent *>(event)->widget();
267
        m_grabWidget = static_cast<QGraphicsSceneMouseEvent *>(event)->widget();
264
        if (m_grabWidget && m_grabWidget->parentWidget()) {
268
        if (m_grabWidget && m_grabWidget->parentWidget()) {
265
            m_grabWidget = m_grabWidget->parentWidget();
269
            m_grabWidget = m_grabWidget->parentWidget();
266
        }
270
        }
267
271
268
        if (m_grabWidget) {
272
        if (m_grabWidget) {
269
            m_grabWidget->installEventFilter(this);
273
            m_grabWidget->installEventFilter(this);
270
        }
274
        }
271
    }
275
    }
272
    return false;
276
    return false;
273
}
277
}*/
delete before commit

- Aaron


On September 28th, 2010, 10:01 a.m., Björn Ruberg wrote:

Review request for Plasma.
By Björn Ruberg.

Updated 2010-09-28 10:01:19

Description

Patch fixes the bug that the mouse grab of the color-picker goes away when the panel hides. The idea of initiating the grab not on the panel but on a self created widget is from ksnapshot.
I want someone to look at it because I want to commit it KDE 4.5 branch as a bugfix.

Testing

Had kolourpicker in an autohiding panel - and it suddenly works. Tested with an applet on the desktop too. Works.
Bugs: 252350

Diffs

  • /trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.h (1180054)
  • /trunk/KDE/kdeplasma-addons/applets/kolourpicker/kolourpicker.cpp (1180054)

View Diff