GCC warnings.
--HG-- branch : develop
This commit is contained in:
parent
2940c131bc
commit
4127e3ec16
|
@ -118,9 +118,9 @@ bool VFormulaProperty::setEditorData(QWidget* editor)
|
|||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
//! 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)
|
||||
{
|
||||
QVariant value;
|
||||
|
|
|
@ -57,7 +57,7 @@ public:
|
|||
virtual bool setEditorData(QWidget* editor);
|
||||
|
||||
//! 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
|
||||
virtual QString type() const;
|
||||
|
|
|
@ -122,7 +122,7 @@ VFormulaPropertyEditor::~VFormulaPropertyEditor()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VFormula VFormulaPropertyEditor::getFormula()
|
||||
VFormula VFormulaPropertyEditor::getFormula() const
|
||||
{
|
||||
return formula;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
virtual ~VFormulaPropertyEditor();
|
||||
|
||||
//! Returns the formula currently set
|
||||
VFormula getFormula();
|
||||
VFormula getFormula() const;
|
||||
|
||||
//! Needed for proper event handling
|
||||
bool eventFilter(QObject *obj, QEvent *ev);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <QObject>
|
||||
#include <QSpinBox>
|
||||
|
||||
#include "vproperty_p.h"
|
||||
#include "../vproperty_p.h"
|
||||
|
||||
using namespace VPE;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef VBOOLPROPERTY_H
|
||||
#define VBOOLPROPERTY_H
|
||||
|
||||
#include "vproperty.h"
|
||||
#include "../vproperty.h"
|
||||
|
||||
namespace VPE
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "vcolorproperty.h"
|
||||
#include "vcolorpropertyeditor.h"
|
||||
|
||||
#include "vproperty_p.h"
|
||||
#include "../vproperty_p.h"
|
||||
|
||||
using namespace VPE;
|
||||
|
||||
|
@ -77,9 +77,9 @@ bool VColorProperty::setEditorData(QWidget* editor)
|
|||
}
|
||||
|
||||
//! 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)
|
||||
{
|
||||
return tmpWidget->getColor();
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
#ifndef VCOLORPROPERTY_H
|
||||
#define VCOLORPROPERTY_H
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#include "../vpropertyexplorer_global.h"
|
||||
|
||||
#include "vproperty.h"
|
||||
#include "../vproperty.h"
|
||||
|
||||
namespace VPE
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ public:
|
|||
virtual bool setEditorData(QWidget* editor);
|
||||
|
||||
//! 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
|
||||
virtual QString type() const;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <QApplication>
|
||||
#include <QColorDialog>
|
||||
|
||||
#include "vproperty.h"
|
||||
#include "../vproperty.h"
|
||||
|
||||
using namespace VPE;
|
||||
|
||||
|
@ -128,7 +128,7 @@ VColorPropertyEditor::~VColorPropertyEditor()
|
|||
//
|
||||
}
|
||||
|
||||
QColor VColorPropertyEditor::getColor()
|
||||
QColor VColorPropertyEditor::getColor() const
|
||||
{
|
||||
return Color;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef VCOLORPROPERTYEDITOR_H
|
||||
#define VCOLORPROPERTYEDITOR_H
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#include "../vpropertyexplorer_global.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QToolButton>
|
||||
|
@ -45,7 +45,7 @@ public:
|
|||
|
||||
|
||||
//! Returns the color currently set
|
||||
QColor getColor();
|
||||
QColor getColor() const;
|
||||
|
||||
//! A little helper function generating an image to represent a color
|
||||
//! \param color The color to fill the image with
|
||||
|
|
|
@ -71,7 +71,7 @@ QWidget* VEmptyProperty::createEditor(QWidget * parent, const QStyleOptionViewIt
|
|||
|
||||
|
||||
//! Gets the data from the widget
|
||||
QVariant VEmptyProperty::getEditorData(QWidget* editor) const
|
||||
QVariant VEmptyProperty::getEditorData(const QWidget *editor) const
|
||||
{
|
||||
Q_UNUSED(editor);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef VEMPTYPROPERTY_H
|
||||
#define VEMPTYPROPERTY_H
|
||||
|
||||
#include "vproperty.h"
|
||||
#include "../vproperty.h"
|
||||
|
||||
namespace VPE
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ public:
|
|||
const QAbstractItemDelegate* delegate);
|
||||
|
||||
//! Gets the data from the widget
|
||||
virtual QVariant getEditorData(QWidget* editor) const;
|
||||
virtual QVariant getEditorData(const QWidget* editor) const;
|
||||
|
||||
//! Returns item flags
|
||||
virtual Qt::ItemFlags flags(int column = DPC_Name) const;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*************************************************************************/
|
||||
|
||||
#include "venumproperty.h"
|
||||
#include "vproperty_p.h"
|
||||
#include "../vproperty_p.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QCoreApplication>
|
||||
|
@ -80,9 +80,9 @@ QWidget* VEnumProperty::createEditor(QWidget * parent, const QStyleOptionViewIte
|
|||
}
|
||||
|
||||
//! 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)
|
||||
{
|
||||
return tmpEditor->currentIndex();
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef VENUMPROPERTY_H
|
||||
#define VENUMPROPERTY_H
|
||||
|
||||
#include "vproperty.h"
|
||||
#include "../vproperty.h"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
|
@ -50,7 +50,7 @@ public:
|
|||
const QAbstractItemDelegate* delegate);
|
||||
|
||||
//! Gets the data from the widget
|
||||
virtual QVariant getEditorData(QWidget* editor) const;
|
||||
virtual QVariant getEditorData(const QWidget* editor) const;
|
||||
|
||||
//! Sets the enumeration literals
|
||||
virtual void setLiterals(const QStringList &literals);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "vfilepropertyeditor.h"
|
||||
|
||||
#include "vfileproperty_p.h"
|
||||
#include "../vfileproperty_p.h"
|
||||
|
||||
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)
|
||||
{
|
||||
return tmpWidget->getFile();
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
#ifndef VFILEPROPERTY_H
|
||||
#define VFILEPROPERTY_H
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#include "../vpropertyexplorer_global.h"
|
||||
|
||||
#include "vproperty.h"
|
||||
#include "../vproperty.h"
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
|
@ -65,7 +65,7 @@ public:
|
|||
virtual bool setEditorData(QWidget* editor);
|
||||
|
||||
//! Gets the data from the widget
|
||||
virtual QVariant getEditorData(QWidget* editor) const;
|
||||
virtual QVariant getEditorData(const QWidget* editor) const;
|
||||
|
||||
//! Sets the settings. Available settings:
|
||||
//!
|
||||
|
|
|
@ -93,7 +93,7 @@ void VFileEditWidget::setDirectory(bool dir)
|
|||
Directory = dir;
|
||||
}
|
||||
|
||||
QString VFileEditWidget::getFile()
|
||||
QString VFileEditWidget::getFile() const
|
||||
{
|
||||
return CurrentFilePath;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef VFILEPROPERTYEDITOR_H
|
||||
#define VFILEPROPERTYEDITOR_H
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#include "../vpropertyexplorer_global.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QToolButton>
|
||||
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
|
||||
//! This function returns the file currently set to this editor
|
||||
QString getFile();
|
||||
QString getFile() const;
|
||||
|
||||
//! Needed for proper event handling
|
||||
bool eventFilter(QObject* obj, QEvent* ev);
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <QSizePolicy>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "vproperty_p.h"
|
||||
#include "../vproperty_p.h"
|
||||
|
||||
using namespace VPE;
|
||||
|
||||
|
@ -69,9 +69,9 @@ QWidget* VIntegerProperty::createEditor(QWidget * parent, const QStyleOptionView
|
|||
}
|
||||
|
||||
//! 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)
|
||||
{
|
||||
return tmpEditor->value();
|
||||
|
@ -176,9 +176,9 @@ QWidget* VDoubleProperty::createEditor(QWidget * parent, const QStyleOptionViewI
|
|||
}
|
||||
|
||||
//! 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)
|
||||
{
|
||||
return tmpEditor->value();
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#ifndef VNUMBERPROPERTY_H
|
||||
#define VNUMBERPROPERTY_H
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#include "vproperty.h"
|
||||
#include "../vpropertyexplorer_global.h"
|
||||
#include "../vproperty.h"
|
||||
|
||||
namespace VPE
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ public:
|
|||
const QAbstractItemDelegate* delegate);
|
||||
|
||||
//! Gets the data from the widget
|
||||
virtual QVariant getEditorData(QWidget* editor) const;
|
||||
virtual QVariant getEditorData(const QWidget* editor) const;
|
||||
|
||||
//! Sets the settings. Available settings:
|
||||
//!
|
||||
|
@ -97,7 +97,7 @@ public:
|
|||
const QAbstractItemDelegate* delegate);
|
||||
|
||||
//! Gets the data from the widget
|
||||
virtual QVariant getEditorData(QWidget* editor) const;
|
||||
virtual QVariant getEditorData(const QWidget* editor) const;
|
||||
|
||||
//! Sets the settings. Available settings:
|
||||
//!
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*************************************************************************/
|
||||
|
||||
#include "vobjectproperty.h"
|
||||
#include "vproperty_p.h"
|
||||
#include "../vproperty_p.h"
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QCoreApplication>
|
||||
|
@ -100,9 +100,9 @@ bool VObjectProperty::setEditorData(QWidget *editor)
|
|||
}
|
||||
|
||||
//! 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)
|
||||
{
|
||||
return tmpEditor->itemData(tmpEditor->currentIndex());
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef VOBJECTPROPERTY_H
|
||||
#define VOBJECTPROPERTY_H
|
||||
|
||||
#include "vproperty.h"
|
||||
#include "../vproperty.h"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
virtual bool setEditorData(QWidget* editor);
|
||||
|
||||
//! Gets the data from the widget
|
||||
virtual QVariant getEditorData(QWidget* editor) const;
|
||||
virtual QVariant getEditorData(const QWidget* editor) const;
|
||||
|
||||
//! Sets the objects list
|
||||
void setObjectsList(const QMap<QString, quint32> &objects);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
using namespace VPE;
|
||||
|
||||
#include "vproperty_p.h"
|
||||
#include "../vproperty_p.h"
|
||||
#include "vnumberproperty.h"
|
||||
#include <QPointF>
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
#ifndef VPOINTFPROPERTY_H
|
||||
#define VPOINTFPROPERTY_H
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#include "../vpropertyexplorer_global.h"
|
||||
|
||||
#include "vproperty.h"
|
||||
#include "../vproperty.h"
|
||||
|
||||
namespace VPE
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include "vshortcutpropertyeditor.h"
|
||||
|
||||
#include "vproperty_p.h"
|
||||
#include "../vproperty_p.h"
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
return tmpWidget->getShortcutAsString();
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#ifndef VSHORTCUTROPERTY_H
|
||||
#define VSHORTCUTROPERTY_H
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#include "vproperty.h"
|
||||
#include "../vpropertyexplorer_global.h"
|
||||
#include "../vproperty.h"
|
||||
|
||||
namespace VPE
|
||||
{
|
||||
|
@ -51,7 +51,7 @@ public:
|
|||
virtual bool setEditorData(QWidget* editor);
|
||||
|
||||
//! 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
|
||||
virtual QString type() const;
|
||||
|
|
|
@ -75,7 +75,7 @@ bool VShortcutEditWidget::eventFilter(QObject *obj, QEvent *event)
|
|||
return QWidget::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
QString VShortcutEditWidget::getShortcutAsString()
|
||||
QString VShortcutEditWidget::getShortcutAsString() const
|
||||
{
|
||||
return CurrentKeySequence.toString();
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef VSHORTCUTPROPERTYEDITOR_H
|
||||
#define VSHORTCUTPROPERTYEDITOR_H
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#include "../vpropertyexplorer_global.h"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QToolButton>
|
||||
|
@ -44,7 +44,7 @@ public:
|
|||
bool eventFilter(QObject* obj, QEvent* evenvt);
|
||||
|
||||
//! Returns the currently set shortcut
|
||||
QString getShortcutAsString();
|
||||
QString getShortcutAsString() const;
|
||||
|
||||
//! Returns the currently set shortcut
|
||||
QKeySequence getShortcut();
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <QLineEdit>
|
||||
#include <QSizePolicy>
|
||||
|
||||
#include "vproperty_p.h"
|
||||
#include "../vproperty_p.h"
|
||||
|
||||
using namespace VPE;
|
||||
|
||||
|
@ -58,9 +58,9 @@ QWidget *VPE::VStringProperty::createEditor(QWidget *parent, const QStyleOptionV
|
|||
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)
|
||||
{
|
||||
return tmpEditor->text();
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#ifndef VSTRINGPROPERTY_H
|
||||
#define VSTRINGPROPERTY_H
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#include "vproperty.h"
|
||||
#include "../vpropertyexplorer_global.h"
|
||||
#include "../vproperty.h"
|
||||
|
||||
namespace VPE
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ public:
|
|||
const QAbstractItemDelegate* delegate);
|
||||
|
||||
//! Gets the data from the widget
|
||||
virtual QVariant getEditorData(QWidget* editor) const;
|
||||
virtual QVariant getEditorData(const QWidget* editor) const;
|
||||
|
||||
void setReadOnly(bool readOnly);
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "vwidgetproperty.h"
|
||||
|
||||
|
||||
#include "vwidgetproperty_p.h"
|
||||
#include "../vwidgetproperty_p.h"
|
||||
|
||||
using namespace VPE;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifndef VWIDGETROPERTY_H
|
||||
#define VWIDGETROPERTY_H
|
||||
|
||||
#include "vpropertyexplorer_global.h"
|
||||
#include "../vpropertyexplorer_global.h"
|
||||
|
||||
#include "vemptyproperty.h"
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ bool VProperty::setEditorData(QWidget* editor)
|
|||
}
|
||||
|
||||
//! Gets the data from the widget
|
||||
QVariant VProperty::getEditorData(QWidget* editor) const
|
||||
QVariant VProperty::getEditorData(const QWidget* editor) const
|
||||
{
|
||||
if (!editor)
|
||||
{
|
||||
|
|
|
@ -92,7 +92,7 @@ public:
|
|||
virtual bool setEditorData(QWidget* editor);
|
||||
|
||||
//! Gets the data from the widget
|
||||
virtual QVariant getEditorData(QWidget* editor) const;
|
||||
virtual QVariant getEditorData(const QWidget* editor) const;
|
||||
|
||||
//! Returns item flags
|
||||
virtual Qt::ItemFlags flags(int column = DPC_Name) const;
|
||||
|
|
|
@ -345,7 +345,7 @@ bool VPropertyFormWidget::eventFilter(QObject *object, QEvent *event)
|
|||
return false;
|
||||
}
|
||||
|
||||
void VPropertyFormWidget::commitData(QWidget *editor)
|
||||
void VPropertyFormWidget::commitData(const QWidget *editor)
|
||||
{
|
||||
if (!editor)
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@ protected:
|
|||
bool eventFilter(QObject *object, QEvent *event);
|
||||
|
||||
//! Commits data of an editor
|
||||
void commitData(QWidget* editor);
|
||||
void commitData(const QWidget* editor);
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(VPropertyFormWidget)
|
||||
|
|
|
@ -40,11 +40,7 @@ VPropertyModel::VPropertyModel(QObject * parent) :
|
|||
|
||||
VPropertyModel::~VPropertyModel()
|
||||
{
|
||||
if (d_ptr->Properties)
|
||||
{
|
||||
delete d_ptr->Properties;
|
||||
}
|
||||
|
||||
delete d_ptr->Properties;
|
||||
delete d_ptr;
|
||||
}
|
||||
|
||||
|
@ -273,7 +269,7 @@ VProperty* VPropertyModel::getProperty(const QModelIndex &index) const
|
|||
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();
|
||||
}
|
||||
|
@ -337,10 +333,7 @@ VPropertySet *VPropertyModel::takePropertySet(VPropertySet *new_property_set, bo
|
|||
void VPropertyModel::setPropertySet(VPropertySet *property_set, bool emit_signals)
|
||||
{
|
||||
VPropertySet* tmpOldPropertySet = takePropertySet(property_set, emit_signals);
|
||||
if (tmpOldPropertySet)
|
||||
{
|
||||
delete tmpOldPropertySet;
|
||||
}
|
||||
delete tmpOldPropertySet;
|
||||
}
|
||||
|
||||
VProperty *VPropertyModel::takeProperty(const QString &id)
|
||||
|
|
|
@ -107,7 +107,7 @@ public:
|
|||
//! The concept of property IDs is, that the object that manages the properties
|
||||
//! and not the properties themselves handle the IDs.
|
||||
//! \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,
|
||||
//! either use the methods provided by the model or use takePropertySet() and setPropertySet().
|
||||
|
|
|
@ -112,10 +112,7 @@ VProperty *VPropertySet::takeProperty(const QString &id)
|
|||
void VPropertySet::removeProperty(const QString &id)
|
||||
{
|
||||
VProperty* tmpProp = takeProperty(id);
|
||||
if (tmpProp)
|
||||
{
|
||||
delete tmpProp;
|
||||
}
|
||||
delete tmpProp;
|
||||
}
|
||||
|
||||
void VPropertySet::removeProperty(VProperty* prop, bool delete_property)
|
||||
|
|
Loading…
Reference in New Issue
Block a user