[Digikam-devel] setButtonGuiItem() from KDE 3.3

Gilles Caulier caulier.gilles at free.fr
Tue Nov 15 06:02:21 GMT 2005


Le Mardi 15 Novembre 2005 00:14, Uwe Reder a écrit :
> Hi!
>
> I run KDE 3.2.3. Compilation breaks in
> digikam-0.8.0-rc/digikam/digikam/imageproperties.cpp with
> setButtonGuiItem() undefined. It seams setButtonGuiItem() appeared with
> KDE 3.3. There must be a way to work around setButtonGuiItem() since it is
> the only method (as far as I can see) that is used from 3.3.
>
> I took a rather simple approach to solve the problem: I backported
> setButtonGuiItem() to 3.2.3's libkdeui.so. Works perfectly for me :-)
>
> Uwe.

Fixed on svn to ignore this method if compiling under kde 3.2.x like this :

ImageProperties::ImageProperties(enum Mode mode, QWidget* parent,
                                 AlbumIconView* view, AlbumIconItem* currItem,
                                 QRect* selectionArea, uint* imageData,
                                 int imageWidth, int imageHeight)
    : KDialogBase(Tabbed, QString::null,
                  (mode == MULTI) ? Help|User1|User2|Stretch|Close : Help|
Stretch|Close,
                  Close, parent, 0, true, true),
      m_view(view), m_currItem(currItem), m_mode(mode)
{
    if (m_mode == MULTI)
    {
#if KDE_IS_VERSION(3,3,0)
        setButtonGuiItem(User1, KStdGuiItem::guiItem(KStdGuiItem::Forward));
        setButtonGuiItem(User2, KStdGuiItem::guiItem(KStdGuiItem::Back));
#endif
        enableButton(User1, m_currItem->nextItem() != 0);
        enableButton(User2, m_currItem->prevItem() != 0);
    }
...

Regards

-- 
Gilles Caulier




More information about the Digikam-devel mailing list