[calligra] kexi/widget/fields: Fixed KexiFieldListModel
Jaroslaw Staniek
staniek at kde.org
Tue Nov 27 09:00:04 GMT 2012
On 27 November 2012 09:53, Boudewijn Rempt <boud at valdyas.org> wrote:
> On Monday 26 November 2012 Nov, Christoph Feck wrote:
>> On Monday 26 November 2012 21:33:19 Oleg Kukharchuk wrote:
>> > Git commit 175e0957fdb9ad56c5665a23b3c8c39fff5ad703 by Oleg
>> > Kukharchuk. Committed on 26/11/2012 at 21:30.
>> > Pushed by okukharchuk into branch 'master'.
>> >
>> > Fixed KexiFieldListModel
>> >
>> > Added caption for a second section of the header
>> >
>> > REVIEW: 107481
>> >
>> > M +8 -4 kexi/widget/fields/KexiFieldListModel.cpp
>> >
>> > http://commits.kde.org/calligra/175e0957fdb9ad56c5665a23b3c8c39fff5
>> > ad703
>> >
>> > diff --git a/kexi/widget/fields/KexiFieldListModel.cpp
>> > b/kexi/widget/fields/KexiFieldListModel.cpp index 91ed791..1b9d184
>> > 100644
>> > --- a/kexi/widget/fields/KexiFieldListModel.cpp
>> > +++ b/kexi/widget/fields/KexiFieldListModel.cpp
>> > @@ -127,15 +127,19 @@ int KexiFieldListModel::rowCount(const
>> > QModelIndex& /*parent*/) const return d->items.count();
>> > }
>> >
>> > -QVariant KexiFieldListModel::headerData(int /*section*/,
>> > Qt::Orientation orientation, int role) const +QVariant
>> > KexiFieldListModel::headerData(int section, Qt::Orientation
>> > orientation, int role) const {
>> > if (role != Qt::DisplayRole)
>> > return QVariant();
>> >
>> > - if (orientation == Qt::Horizontal)
>> > - return i18n("Field Name");
>> > - else
>> > + if (orientation == Qt::Horizontal) {
>> > + if (section == 0) {
>> > + return i18n("Field Name");
>> > + } else if (section == 1) {
>> > + return i18n("Data Type");
>> > + }
>> > return QVariant();
>> > + }
>> > }
>> >
>> > QStringList KexiFieldListModel::mimeTypes() const
>>
>> This commit fails to compile, because if orientation != Horizontal, no
>> value is returned.
>>
>
> I just fixed that in ca34428e23b999e5c37ae83720509603b0389f60
Thanks!
--
regards / pozdrawiam, Jaroslaw Staniek
Kexi & Calligra & KDE | http://calligra.org/kexi | http://kde.org
Qt Certified Specialist | http://qt-project.org
http://www.linkedin.com/in/jstaniek
More information about the calligra-devel
mailing list