GCC warnings.

--HG--
branch : develop
This commit is contained in:
dismine 2014-09-14 12:16:59 +03:00
parent 2940c131bc
commit 4127e3ec16
39 changed files with 77 additions and 87 deletions

View file

@ -118,9 +118,9 @@ bool VFormulaProperty::setEditorData(QWidget* editor)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
//! Gets the data from the widget //! Gets the data from the widget
QVariant VFormulaProperty::getEditorData(QWidget* editor) const QVariant VFormulaProperty::getEditorData(const QWidget *editor) const
{ {
VFormulaPropertyEditor* tmpWidget = qobject_cast<VFormulaPropertyEditor*>(editor); const VFormulaPropertyEditor* tmpWidget = qobject_cast<const VFormulaPropertyEditor*>(editor);
if (tmpWidget) if (tmpWidget)
{ {
QVariant value; QVariant value;

View file

@ -57,7 +57,7 @@ public:
virtual bool setEditorData(QWidget* editor); virtual bool setEditorData(QWidget* editor);
//! Gets the data from the widget //! Gets the data from the widget
virtual QVariant getEditorData(QWidget* editor) const; virtual QVariant getEditorData(const QWidget* editor) const;
//! Returns a string containing the type of the property //! Returns a string containing the type of the property
virtual QString type() const; virtual QString type() const;

View file

@ -122,7 +122,7 @@ VFormulaPropertyEditor::~VFormulaPropertyEditor()
} }
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
VFormula VFormulaPropertyEditor::getFormula() VFormula VFormulaPropertyEditor::getFormula() const
{ {
return formula; return formula;
} }

View file

@ -49,7 +49,7 @@ public:
virtual ~VFormulaPropertyEditor(); virtual ~VFormulaPropertyEditor();
//! Returns the formula currently set //! Returns the formula currently set
VFormula getFormula(); VFormula getFormula() const;
//! Needed for proper event handling //! Needed for proper event handling
bool eventFilter(QObject *obj, QEvent *ev); bool eventFilter(QObject *obj, QEvent *ev);

View file

@ -27,7 +27,7 @@
#include <QObject> #include <QObject>
#include <QSpinBox> #include <QSpinBox>
#include "vproperty_p.h" #include "../vproperty_p.h"
using namespace VPE; using namespace VPE;

View file

@ -21,7 +21,7 @@
#ifndef VBOOLPROPERTY_H #ifndef VBOOLPROPERTY_H
#define VBOOLPROPERTY_H #define VBOOLPROPERTY_H
#include "vproperty.h" #include "../vproperty.h"
namespace VPE namespace VPE
{ {

View file

@ -21,7 +21,7 @@
#include "vcolorproperty.h" #include "vcolorproperty.h"
#include "vcolorpropertyeditor.h" #include "vcolorpropertyeditor.h"
#include "vproperty_p.h" #include "../vproperty_p.h"
using namespace VPE; using namespace VPE;
@ -77,9 +77,9 @@ bool VColorProperty::setEditorData(QWidget* editor)
} }
//! Gets the data from the widget //! Gets the data from the widget
QVariant VColorProperty::getEditorData(QWidget* editor) const QVariant VColorProperty::getEditorData(const QWidget *editor) const
{ {
VColorPropertyEditor* tmpWidget = qobject_cast<VColorPropertyEditor*>(editor); const VColorPropertyEditor* tmpWidget = qobject_cast<const VColorPropertyEditor*>(editor);
if (tmpWidget) if (tmpWidget)
{ {
return tmpWidget->getColor(); return tmpWidget->getColor();

View file

@ -21,9 +21,9 @@
#ifndef VCOLORPROPERTY_H #ifndef VCOLORPROPERTY_H
#define VCOLORPROPERTY_H #define VCOLORPROPERTY_H
#include "vpropertyexplorer_global.h" #include "../vpropertyexplorer_global.h"
#include "vproperty.h" #include "../vproperty.h"
namespace VPE namespace VPE
{ {
@ -49,7 +49,7 @@ public:
virtual bool setEditorData(QWidget* editor); virtual bool setEditorData(QWidget* editor);
//! Gets the data from the widget //! Gets the data from the widget
virtual QVariant getEditorData(QWidget* editor) const; virtual QVariant getEditorData(const QWidget* editor) const;
//! Returns a string containing the type of the property //! Returns a string containing the type of the property
virtual QString type() const; virtual QString type() const;

View file

@ -26,7 +26,7 @@
#include <QApplication> #include <QApplication>
#include <QColorDialog> #include <QColorDialog>
#include "vproperty.h" #include "../vproperty.h"
using namespace VPE; using namespace VPE;
@ -128,7 +128,7 @@ VColorPropertyEditor::~VColorPropertyEditor()
// //
} }
QColor VColorPropertyEditor::getColor() QColor VColorPropertyEditor::getColor() const
{ {
return Color; return Color;
} }

View file

@ -21,7 +21,7 @@
#ifndef VCOLORPROPERTYEDITOR_H #ifndef VCOLORPROPERTYEDITOR_H
#define VCOLORPROPERTYEDITOR_H #define VCOLORPROPERTYEDITOR_H
#include "vpropertyexplorer_global.h" #include "../vpropertyexplorer_global.h"
#include <QWidget> #include <QWidget>
#include <QToolButton> #include <QToolButton>
@ -45,7 +45,7 @@ public:
//! Returns the color currently set //! Returns the color currently set
QColor getColor(); QColor getColor() const;
//! A little helper function generating an image to represent a color //! A little helper function generating an image to represent a color
//! \param color The color to fill the image with //! \param color The color to fill the image with

View file

@ -71,7 +71,7 @@ QWidget* VEmptyProperty::createEditor(QWidget * parent, const QStyleOptionViewIt
//! Gets the data from the widget //! Gets the data from the widget
QVariant VEmptyProperty::getEditorData(QWidget* editor) const QVariant VEmptyProperty::getEditorData(const QWidget *editor) const
{ {
Q_UNUSED(editor); Q_UNUSED(editor);

View file

@ -21,7 +21,7 @@
#ifndef VEMPTYPROPERTY_H #ifndef VEMPTYPROPERTY_H
#define VEMPTYPROPERTY_H #define VEMPTYPROPERTY_H
#include "vproperty.h" #include "../vproperty.h"
namespace VPE namespace VPE
{ {
@ -47,7 +47,7 @@ public:
const QAbstractItemDelegate* delegate); const QAbstractItemDelegate* delegate);
//! Gets the data from the widget //! Gets the data from the widget
virtual QVariant getEditorData(QWidget* editor) const; virtual QVariant getEditorData(const QWidget* editor) const;
//! Returns item flags //! Returns item flags
virtual Qt::ItemFlags flags(int column = DPC_Name) const; virtual Qt::ItemFlags flags(int column = DPC_Name) const;

View file

@ -19,7 +19,7 @@
*************************************************************************/ *************************************************************************/
#include "venumproperty.h" #include "venumproperty.h"
#include "vproperty_p.h" #include "../vproperty_p.h"
#include <QComboBox> #include <QComboBox>
#include <QCoreApplication> #include <QCoreApplication>
@ -80,9 +80,9 @@ QWidget* VEnumProperty::createEditor(QWidget * parent, const QStyleOptionViewIte
} }
//! Gets the data from the widget //! Gets the data from the widget
QVariant VEnumProperty::getEditorData(QWidget* editor) const QVariant VEnumProperty::getEditorData(const QWidget *editor) const
{ {
QComboBox* tmpEditor = qobject_cast<QComboBox*>(editor); const QComboBox* tmpEditor = qobject_cast<const QComboBox*>(editor);
if (tmpEditor) if (tmpEditor)
{ {
return tmpEditor->currentIndex(); return tmpEditor->currentIndex();

View file

@ -21,7 +21,7 @@
#ifndef VENUMPROPERTY_H #ifndef VENUMPROPERTY_H
#define VENUMPROPERTY_H #define VENUMPROPERTY_H
#include "vproperty.h" #include "../vproperty.h"
#include <QStringList> #include <QStringList>
@ -50,7 +50,7 @@ public:
const QAbstractItemDelegate* delegate); const QAbstractItemDelegate* delegate);
//! Gets the data from the widget //! Gets the data from the widget
virtual QVariant getEditorData(QWidget* editor) const; virtual QVariant getEditorData(const QWidget* editor) const;
//! Sets the enumeration literals //! Sets the enumeration literals
virtual void setLiterals(const QStringList &literals); virtual void setLiterals(const QStringList &literals);

View file

@ -24,7 +24,7 @@
#include "vfilepropertyeditor.h" #include "vfilepropertyeditor.h"
#include "vfileproperty_p.h" #include "../vfileproperty_p.h"
using namespace VPE; using namespace VPE;
@ -108,9 +108,9 @@ bool VFileProperty::setEditorData(QWidget* editor)
} }
QVariant VFileProperty::getEditorData(QWidget* editor) const QVariant VFileProperty::getEditorData(const QWidget *editor) const
{ {
VFileEditWidget* tmpWidget = qobject_cast<VFileEditWidget*>(editor); const VFileEditWidget* tmpWidget = qobject_cast<const VFileEditWidget*>(editor);
if (tmpWidget) if (tmpWidget)
{ {
return tmpWidget->getFile(); return tmpWidget->getFile();

View file

@ -21,9 +21,9 @@
#ifndef VFILEPROPERTY_H #ifndef VFILEPROPERTY_H
#define VFILEPROPERTY_H #define VFILEPROPERTY_H
#include "vpropertyexplorer_global.h" #include "../vpropertyexplorer_global.h"
#include "vproperty.h" #include "../vproperty.h"
#include <QPointer> #include <QPointer>
@ -65,7 +65,7 @@ public:
virtual bool setEditorData(QWidget* editor); virtual bool setEditorData(QWidget* editor);
//! Gets the data from the widget //! Gets the data from the widget
virtual QVariant getEditorData(QWidget* editor) const; virtual QVariant getEditorData(const QWidget* editor) const;
//! Sets the settings. Available settings: //! Sets the settings. Available settings:
//! //!

View file

@ -93,7 +93,7 @@ void VFileEditWidget::setDirectory(bool dir)
Directory = dir; Directory = dir;
} }
QString VFileEditWidget::getFile() QString VFileEditWidget::getFile() const
{ {
return CurrentFilePath; return CurrentFilePath;
} }

View file

@ -21,7 +21,7 @@
#ifndef VFILEPROPERTYEDITOR_H #ifndef VFILEPROPERTYEDITOR_H
#define VFILEPROPERTYEDITOR_H #define VFILEPROPERTYEDITOR_H
#include "vpropertyexplorer_global.h" #include "../vpropertyexplorer_global.h"
#include <QWidget> #include <QWidget>
#include <QToolButton> #include <QToolButton>
@ -42,7 +42,7 @@ public:
//! This function returns the file currently set to this editor //! This function returns the file currently set to this editor
QString getFile(); QString getFile() const;
//! Needed for proper event handling //! Needed for proper event handling
bool eventFilter(QObject* obj, QEvent* ev); bool eventFilter(QObject* obj, QEvent* ev);

View file

@ -25,7 +25,7 @@
#include <QSizePolicy> #include <QSizePolicy>
#include <QCoreApplication> #include <QCoreApplication>
#include "vproperty_p.h" #include "../vproperty_p.h"
using namespace VPE; using namespace VPE;
@ -69,9 +69,9 @@ QWidget* VIntegerProperty::createEditor(QWidget * parent, const QStyleOptionView
} }
//! Gets the data from the widget //! Gets the data from the widget
QVariant VIntegerProperty::getEditorData(QWidget* editor) const QVariant VIntegerProperty::getEditorData(const QWidget *editor) const
{ {
QSpinBox* tmpEditor = qobject_cast<QSpinBox*>(editor); const QSpinBox* tmpEditor = qobject_cast<const QSpinBox*>(editor);
if (tmpEditor) if (tmpEditor)
{ {
return tmpEditor->value(); return tmpEditor->value();
@ -176,9 +176,9 @@ QWidget* VDoubleProperty::createEditor(QWidget * parent, const QStyleOptionViewI
} }
//! Gets the data from the widget //! Gets the data from the widget
QVariant VDoubleProperty::getEditorData(QWidget* editor) const QVariant VDoubleProperty::getEditorData(const QWidget *editor) const
{ {
QDoubleSpinBox* tmpEditor = qobject_cast<QDoubleSpinBox*>(editor); const QDoubleSpinBox* tmpEditor = qobject_cast<const QDoubleSpinBox*>(editor);
if (tmpEditor) if (tmpEditor)
{ {
return tmpEditor->value(); return tmpEditor->value();

View file

@ -21,8 +21,8 @@
#ifndef VNUMBERPROPERTY_H #ifndef VNUMBERPROPERTY_H
#define VNUMBERPROPERTY_H #define VNUMBERPROPERTY_H
#include "vpropertyexplorer_global.h" #include "../vpropertyexplorer_global.h"
#include "vproperty.h" #include "../vproperty.h"
namespace VPE namespace VPE
{ {
@ -46,7 +46,7 @@ public:
const QAbstractItemDelegate* delegate); const QAbstractItemDelegate* delegate);
//! Gets the data from the widget //! Gets the data from the widget
virtual QVariant getEditorData(QWidget* editor) const; virtual QVariant getEditorData(const QWidget* editor) const;
//! Sets the settings. Available settings: //! Sets the settings. Available settings:
//! //!
@ -97,7 +97,7 @@ public:
const QAbstractItemDelegate* delegate); const QAbstractItemDelegate* delegate);
//! Gets the data from the widget //! Gets the data from the widget
virtual QVariant getEditorData(QWidget* editor) const; virtual QVariant getEditorData(const QWidget* editor) const;
//! Sets the settings. Available settings: //! Sets the settings. Available settings:
//! //!

View file

@ -19,7 +19,7 @@
*************************************************************************/ *************************************************************************/
#include "vobjectproperty.h" #include "vobjectproperty.h"
#include "vproperty_p.h" #include "../vproperty_p.h"
#include <QComboBox> #include <QComboBox>
#include <QCoreApplication> #include <QCoreApplication>
@ -100,9 +100,9 @@ bool VObjectProperty::setEditorData(QWidget *editor)
} }
//! Gets the data from the widget //! Gets the data from the widget
QVariant VObjectProperty::getEditorData(QWidget* editor) const QVariant VObjectProperty::getEditorData(const QWidget *editor) const
{ {
QComboBox* tmpEditor = qobject_cast<QComboBox*>(editor); const QComboBox* tmpEditor = qobject_cast<const QComboBox*>(editor);
if (tmpEditor) if (tmpEditor)
{ {
return tmpEditor->itemData(tmpEditor->currentIndex()); return tmpEditor->itemData(tmpEditor->currentIndex());

View file

@ -21,7 +21,7 @@
#ifndef VOBJECTPROPERTY_H #ifndef VOBJECTPROPERTY_H
#define VOBJECTPROPERTY_H #define VOBJECTPROPERTY_H
#include "vproperty.h" #include "../vproperty.h"
#include <QStringList> #include <QStringList>
@ -55,7 +55,7 @@ public:
virtual bool setEditorData(QWidget* editor); virtual bool setEditorData(QWidget* editor);
//! Gets the data from the widget //! Gets the data from the widget
virtual QVariant getEditorData(QWidget* editor) const; virtual QVariant getEditorData(const QWidget* editor) const;
//! Sets the objects list //! Sets the objects list
void setObjectsList(const QMap<QString, quint32> &objects); void setObjectsList(const QMap<QString, quint32> &objects);

View file

@ -22,7 +22,7 @@
using namespace VPE; using namespace VPE;
#include "vproperty_p.h" #include "../vproperty_p.h"
#include "vnumberproperty.h" #include "vnumberproperty.h"
#include <QPointF> #include <QPointF>

View file

@ -21,9 +21,9 @@
#ifndef VPOINTFPROPERTY_H #ifndef VPOINTFPROPERTY_H
#define VPOINTFPROPERTY_H #define VPOINTFPROPERTY_H
#include "vpropertyexplorer_global.h" #include "../vpropertyexplorer_global.h"
#include "vproperty.h" #include "../vproperty.h"
namespace VPE namespace VPE
{ {

View file

@ -24,7 +24,7 @@
#include "vshortcutpropertyeditor.h" #include "vshortcutpropertyeditor.h"
#include "vproperty_p.h" #include "../vproperty_p.h"
using namespace VPE; using namespace VPE;
@ -80,9 +80,9 @@ bool VShortcutProperty::setEditorData(QWidget* editor)
} }
QVariant VShortcutProperty::getEditorData(QWidget* editor) const QVariant VShortcutProperty::getEditorData(const QWidget *editor) const
{ {
VShortcutEditWidget* tmpWidget = qobject_cast<VShortcutEditWidget*>(editor); const VShortcutEditWidget* tmpWidget = qobject_cast<const VShortcutEditWidget*>(editor);
if (tmpWidget) if (tmpWidget)
{ {
return tmpWidget->getShortcutAsString(); return tmpWidget->getShortcutAsString();

View file

@ -21,8 +21,8 @@
#ifndef VSHORTCUTROPERTY_H #ifndef VSHORTCUTROPERTY_H
#define VSHORTCUTROPERTY_H #define VSHORTCUTROPERTY_H
#include "vpropertyexplorer_global.h" #include "../vpropertyexplorer_global.h"
#include "vproperty.h" #include "../vproperty.h"
namespace VPE namespace VPE
{ {
@ -51,7 +51,7 @@ public:
virtual bool setEditorData(QWidget* editor); virtual bool setEditorData(QWidget* editor);
//! Gets the data from the widget //! Gets the data from the widget
virtual QVariant getEditorData(QWidget* editor) const; virtual QVariant getEditorData(const QWidget* editor) const;
//! Returns a string containing the type of the property //! Returns a string containing the type of the property
virtual QString type() const; virtual QString type() const;

View file

@ -75,7 +75,7 @@ bool VShortcutEditWidget::eventFilter(QObject *obj, QEvent *event)
return QWidget::eventFilter(obj, event); return QWidget::eventFilter(obj, event);
} }
QString VShortcutEditWidget::getShortcutAsString() QString VShortcutEditWidget::getShortcutAsString() const
{ {
return CurrentKeySequence.toString(); return CurrentKeySequence.toString();
} }

View file

@ -21,7 +21,7 @@
#ifndef VSHORTCUTPROPERTYEDITOR_H #ifndef VSHORTCUTPROPERTYEDITOR_H
#define VSHORTCUTPROPERTYEDITOR_H #define VSHORTCUTPROPERTYEDITOR_H
#include "vpropertyexplorer_global.h" #include "../vpropertyexplorer_global.h"
#include <QWidget> #include <QWidget>
#include <QToolButton> #include <QToolButton>
@ -44,7 +44,7 @@ public:
bool eventFilter(QObject* obj, QEvent* evenvt); bool eventFilter(QObject* obj, QEvent* evenvt);
//! Returns the currently set shortcut //! Returns the currently set shortcut
QString getShortcutAsString(); QString getShortcutAsString() const;
//! Returns the currently set shortcut //! Returns the currently set shortcut
QKeySequence getShortcut(); QKeySequence getShortcut();

View file

@ -23,7 +23,7 @@
#include <QLineEdit> #include <QLineEdit>
#include <QSizePolicy> #include <QSizePolicy>
#include "vproperty_p.h" #include "../vproperty_p.h"
using namespace VPE; using namespace VPE;
@ -58,9 +58,9 @@ QWidget *VPE::VStringProperty::createEditor(QWidget *parent, const QStyleOptionV
return d_ptr->editor; return d_ptr->editor;
} }
QVariant VPE::VStringProperty::getEditorData(QWidget *editor) const QVariant VPE::VStringProperty::getEditorData(const QWidget *editor) const
{ {
QLineEdit* tmpEditor = qobject_cast<QLineEdit*>(editor); const QLineEdit* tmpEditor = qobject_cast<const QLineEdit*>(editor);
if (tmpEditor) if (tmpEditor)
{ {
return tmpEditor->text(); return tmpEditor->text();

View file

@ -21,8 +21,8 @@
#ifndef VSTRINGPROPERTY_H #ifndef VSTRINGPROPERTY_H
#define VSTRINGPROPERTY_H #define VSTRINGPROPERTY_H
#include "vpropertyexplorer_global.h" #include "../vpropertyexplorer_global.h"
#include "vproperty.h" #include "../vproperty.h"
namespace VPE namespace VPE
{ {
@ -45,7 +45,7 @@ public:
const QAbstractItemDelegate* delegate); const QAbstractItemDelegate* delegate);
//! Gets the data from the widget //! Gets the data from the widget
virtual QVariant getEditorData(QWidget* editor) const; virtual QVariant getEditorData(const QWidget* editor) const;
void setReadOnly(bool readOnly); void setReadOnly(bool readOnly);

View file

@ -21,7 +21,7 @@
#include "vwidgetproperty.h" #include "vwidgetproperty.h"
#include "vwidgetproperty_p.h" #include "../vwidgetproperty_p.h"
using namespace VPE; using namespace VPE;

View file

@ -21,7 +21,7 @@
#ifndef VWIDGETROPERTY_H #ifndef VWIDGETROPERTY_H
#define VWIDGETROPERTY_H #define VWIDGETROPERTY_H
#include "vpropertyexplorer_global.h" #include "../vpropertyexplorer_global.h"
#include "vemptyproperty.h" #include "vemptyproperty.h"

View file

@ -138,7 +138,7 @@ bool VProperty::setEditorData(QWidget* editor)
} }
//! Gets the data from the widget //! Gets the data from the widget
QVariant VProperty::getEditorData(QWidget* editor) const QVariant VProperty::getEditorData(const QWidget* editor) const
{ {
if (!editor) if (!editor)
{ {

View file

@ -92,7 +92,7 @@ public:
virtual bool setEditorData(QWidget* editor); virtual bool setEditorData(QWidget* editor);
//! Gets the data from the widget //! Gets the data from the widget
virtual QVariant getEditorData(QWidget* editor) const; virtual QVariant getEditorData(const QWidget* editor) const;
//! Returns item flags //! Returns item flags
virtual Qt::ItemFlags flags(int column = DPC_Name) const; virtual Qt::ItemFlags flags(int column = DPC_Name) const;

View file

@ -345,7 +345,7 @@ bool VPropertyFormWidget::eventFilter(QObject *object, QEvent *event)
return false; return false;
} }
void VPropertyFormWidget::commitData(QWidget *editor) void VPropertyFormWidget::commitData(const QWidget *editor)
{ {
if (!editor) if (!editor)
{ {

View file

@ -91,7 +91,7 @@ protected:
bool eventFilter(QObject *object, QEvent *event); bool eventFilter(QObject *object, QEvent *event);
//! Commits data of an editor //! Commits data of an editor
void commitData(QWidget* editor); void commitData(const QWidget* editor);
private: private:
Q_DISABLE_COPY(VPropertyFormWidget) Q_DISABLE_COPY(VPropertyFormWidget)

View file

@ -40,11 +40,7 @@ VPropertyModel::VPropertyModel(QObject * parent) :
VPropertyModel::~VPropertyModel() VPropertyModel::~VPropertyModel()
{ {
if (d_ptr->Properties) delete d_ptr->Properties;
{
delete d_ptr->Properties;
}
delete d_ptr; delete d_ptr;
} }
@ -273,7 +269,7 @@ VProperty* VPropertyModel::getProperty(const QModelIndex &index) const
return nullptr; return nullptr;
} }
QString VPropertyModel::getPropertyID(VProperty *prop) const QString VPropertyModel::getPropertyID(const VProperty *prop) const
{ {
return d_ptr->Properties != nullptr ? d_ptr->Properties->getPropertyID(prop) : QString(); return d_ptr->Properties != nullptr ? d_ptr->Properties->getPropertyID(prop) : QString();
} }
@ -337,10 +333,7 @@ VPropertySet *VPropertyModel::takePropertySet(VPropertySet *new_property_set, bo
void VPropertyModel::setPropertySet(VPropertySet *property_set, bool emit_signals) void VPropertyModel::setPropertySet(VPropertySet *property_set, bool emit_signals)
{ {
VPropertySet* tmpOldPropertySet = takePropertySet(property_set, emit_signals); VPropertySet* tmpOldPropertySet = takePropertySet(property_set, emit_signals);
if (tmpOldPropertySet) delete tmpOldPropertySet;
{
delete tmpOldPropertySet;
}
} }
VProperty *VPropertyModel::takeProperty(const QString &id) VProperty *VPropertyModel::takeProperty(const QString &id)

View file

@ -107,7 +107,7 @@ public:
//! The concept of property IDs is, that the object that manages the properties //! The concept of property IDs is, that the object that manages the properties
//! and not the properties themselves handle the IDs. //! and not the properties themselves handle the IDs.
//! \return Returns the ID under which the property is stored within the model //! \return Returns the ID under which the property is stored within the model
virtual QString getPropertyID(VProperty* prop) const; virtual QString getPropertyID(const VProperty* prop) const;
//! Returns a const pointer to the property set managed by this model. If you want to manipulate the property set, //! Returns a const pointer to the property set managed by this model. If you want to manipulate the property set,
//! either use the methods provided by the model or use takePropertySet() and setPropertySet(). //! either use the methods provided by the model or use takePropertySet() and setPropertySet().

View file

@ -112,10 +112,7 @@ VProperty *VPropertySet::takeProperty(const QString &id)
void VPropertySet::removeProperty(const QString &id) void VPropertySet::removeProperty(const QString &id)
{ {
VProperty* tmpProp = takeProperty(id); VProperty* tmpProp = takeProperty(id);
if (tmpProp) delete tmpProp;
{
delete tmpProp;
}
} }
void VPropertySet::removeProperty(VProperty* prop, bool delete_property) void VPropertySet::removeProperty(VProperty* prop, bool delete_property)