[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/koffice
From: Jaroslaw Staniek <js () iidea ! pl>
Date: 2006-07-06 16:54:44
Message-ID: 1152204884.581082.11864.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 559137 by staniek:
Forms
- possible crash removed when changing property of enum type
1.0/2.0: ported
M +3 -3 1.5/koffice/kexi/formeditor/formIO.cpp
M +2 -2 1.5/koffice/kexi/formeditor/widgetpropertyset.cpp
M +1 -1 1.5/koffice/kexi/formeditor/widgetpropertyset.h
M +2 -2 1.6/koffice/kexi/formeditor/formIO.cpp
M +2 -2 1.6/koffice/kexi/formeditor/widgetpropertyset.cpp
M +1 -1 1.6/koffice/kexi/formeditor/widgetpropertyset.h
--- branches/koffice/1.5/koffice/kexi/formeditor/formIO.cpp #559136:559137
@@ -869,9 +869,9 @@
else if(type == "set")
{
int count = obj->metaObject()->findProperty(name.latin1(), true);
- const QMetaProperty *meta = obj->metaObject()->property(count, true);
+ const QMetaProperty *meta = count!=-1 ? obj->metaObject()->property(count, true) : 0;
- if(meta->isSetType())
+ if(meta && meta->isSetType())
{
QStrList keys;
QStringList list = QStringList::split("|", text);
@@ -881,7 +881,7 @@
return QVariant(meta->keysToValue(keys));
}
}
- return QVariant();
+ return QVariant();
}
/////////////////////////////////////////////////////////////////////////////
--- branches/koffice/1.5/koffice/kexi/formeditor/widgetpropertyset.cpp #559136:559137
@@ -1,6 +1,6 @@
/* This file is part of the KDE project
Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
- Copyright (C) 2004-2005 Jaroslaw Staniek <js@iidea.pl>
+ Copyright (C) 2004-2006 Jaroslaw Staniek <js@iidea.pl>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -379,7 +379,7 @@
{
if (!d->set.contains(property))
return;
- KoProperty::Property p = d->set[property];
+ KoProperty::Property& p = d->set[property];
//! \todo what about set properties, and lists properties
QMap<QString, QVariant>::ConstIterator it( tree->modifiedProperties()->find(property) );
--- branches/koffice/1.5/koffice/kexi/formeditor/widgetpropertyset.h #559136:559137
@@ -1,6 +1,6 @@
/* This file is part of the KDE project
Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
- Copyright (C) 2004-2005 Jaroslaw Staniek <js@iidea.pl>
+ Copyright (C) 2004-2006 Jaroslaw Staniek <js@iidea.pl>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
--- branches/koffice/1.6/koffice/kexi/formeditor/formIO.cpp #559136:559137
@@ -881,9 +881,9 @@
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(obj);
QObject *subobject = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : obj;
int count = subobject->metaObject()->findProperty(name.latin1(), true);
- const QMetaProperty *meta = subobject->metaObject()->property(count, true);
+ const QMetaProperty *meta = count!=-1 ? subobject->metaObject()->property(count, true) : 0;
- if(meta->isSetType())
+ if(meta && meta->isSetType())
{
QStrList keys;
QStringList list = QStringList::split("|", text);
--- branches/koffice/1.6/koffice/kexi/formeditor/widgetpropertyset.cpp #559136:559137
@@ -1,6 +1,6 @@
/* This file is part of the KDE project
Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
- Copyright (C) 2004-2005 Jaroslaw Staniek <js@iidea.pl>
+ Copyright (C) 2004-2006 Jaroslaw Staniek <js@iidea.pl>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -409,7 +409,7 @@
{
if (!d->set.contains(property))
return;
- KoProperty::Property p = d->set[property];
+ KoProperty::Property& p = d->set[property];
//! \todo what about set properties, and lists properties
QMap<QString, QVariant>::ConstIterator it( tree->modifiedProperties()->find(property) );
--- branches/koffice/1.6/koffice/kexi/formeditor/widgetpropertyset.h #559136:559137
@@ -1,6 +1,6 @@
/* This file is part of the KDE project
Copyright (C) 2004 Cedric Pasteur <cedric.pasteur@free.fr>
- Copyright (C) 2004-2005 Jaroslaw Staniek <js@iidea.pl>
+ Copyright (C) 2004-2006 Jaroslaw Staniek <js@iidea.pl>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic