~ubuntu-branches/ubuntu/trusty/polkit-qt-1/trusty

« back to all changes in this revision

Viewing changes to .pc/kubuntu_01_fix_glib_ftbfs.diff/gui/polkitqt1-gui-actionbuttons.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2010-07-02 10:01:29 UTC
  • Revision ID: james.westby@ubuntu.com-20100702100129-oqgrsrt5x5upahrg
Tags: 0.95.1-1ubuntu1
Add kubuntu_01_fix_glib_ftbfs.diff to fix build failure with glib 2.25 or
greater (LP: #600948) Pending upstream commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of the Polkit-qt project
 
3
 * Copyright (C) 2009 Dario Freddi <drf@kde.org>
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU Library General Public
 
7
 * License as published by the Free Software Foundation; either
 
8
 * version 2 of the License, or (at your option) any later version.
 
9
 *
 
10
 * This library is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 
13
 * Library General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU Library General Public License
 
16
 * along with this library; see the file COPYING.LIB. If not, write to
 
17
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
18
 * Boston, MA 02110-1301, USA.
 
19
 */
 
20
 
 
21
#include "polkitqt1-gui-actionbuttons.h"
 
22
 
 
23
#include "polkitqt1-gui-actionbuttons_p.h"
 
24
 
 
25
namespace PolkitQt1
 
26
{
 
27
 
 
28
namespace Gui
 
29
{
 
30
 
 
31
ActionButtons::ActionButtons(const QList<QAbstractButton *> &buttons, const QString &actionId, QObject *parent)
 
32
        : ActionButton(*new ActionButtonsPrivate(buttons), actionId, parent)
 
33
{
 
34
    setButtons(buttons);
 
35
}
 
36
 
 
37
ActionButtons::~ActionButtons()
 
38
{
 
39
}
 
40
 
 
41
void ActionButtons::setButtons(const QList<QAbstractButton *> &buttons)
 
42
{
 
43
    foreach(QAbstractButton *ent, buttons) {
 
44
        addButton(ent);
 
45
    }
 
46
}
 
47
 
 
48
QList<QAbstractButton *> ActionButtons::buttons() const
 
49
{
 
50
    Q_D(const ActionButtons);
 
51
 
 
52
    return d->buttons;
 
53
}
 
54
 
 
55
void ActionButtons::addButton(QAbstractButton *button)
 
56
{
 
57
    Q_D(ActionButtons);
 
58
 
 
59
    d->addButton(button);
 
60
}
 
61
 
 
62
void ActionButtons::removeButton(QAbstractButton *button)
 
63
{
 
64
    Q_D(ActionButtons);
 
65
 
 
66
    d->removeButton(button);
 
67
}
 
68
 
 
69
}
 
70
 
 
71
}
 
72
 
 
73
#include "polkitqt1-gui-actionbuttons.moc"