diff --git a/src/app/widgets/vformulaproperty.cpp b/src/app/widgets/vformulaproperty.cpp index 417bbfaca..da4090161 100644 --- a/src/app/widgets/vformulaproperty.cpp +++ b/src/app/widgets/vformulaproperty.cpp @@ -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(editor); + const VFormulaPropertyEditor* tmpWidget = qobject_cast(editor); if (tmpWidget) { QVariant value; diff --git a/src/app/widgets/vformulaproperty.h b/src/app/widgets/vformulaproperty.h index 08837cc08..c9a23cfa8 100644 --- a/src/app/widgets/vformulaproperty.h +++ b/src/app/widgets/vformulaproperty.h @@ -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; diff --git a/src/app/widgets/vformulapropertyeditor.cpp b/src/app/widgets/vformulapropertyeditor.cpp index 3bff0d170..f1e684f35 100644 --- a/src/app/widgets/vformulapropertyeditor.cpp +++ b/src/app/widgets/vformulapropertyeditor.cpp @@ -122,7 +122,7 @@ VFormulaPropertyEditor::~VFormulaPropertyEditor() } //--------------------------------------------------------------------------------------------------------------------- -VFormula VFormulaPropertyEditor::getFormula() +VFormula VFormulaPropertyEditor::getFormula() const { return formula; } diff --git a/src/app/widgets/vformulapropertyeditor.h b/src/app/widgets/vformulapropertyeditor.h index 9c3eecf25..e7a1ab291 100644 --- a/src/app/widgets/vformulapropertyeditor.h +++ b/src/app/widgets/vformulapropertyeditor.h @@ -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); diff --git a/src/libs/vpropertyexplorer/plugins/vboolproperty.cpp b/src/libs/vpropertyexplorer/plugins/vboolproperty.cpp index 67ba88b30..677ed09d7 100644 --- a/src/libs/vpropertyexplorer/plugins/vboolproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vboolproperty.cpp @@ -27,7 +27,7 @@ #include #include -#include "vproperty_p.h" +#include "../vproperty_p.h" using namespace VPE; diff --git a/src/libs/vpropertyexplorer/plugins/vboolproperty.h b/src/libs/vpropertyexplorer/plugins/vboolproperty.h index f1cba9dc5..589bfe67f 100644 --- a/src/libs/vpropertyexplorer/plugins/vboolproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vboolproperty.h @@ -21,7 +21,7 @@ #ifndef VBOOLPROPERTY_H #define VBOOLPROPERTY_H -#include "vproperty.h" +#include "../vproperty.h" namespace VPE { diff --git a/src/libs/vpropertyexplorer/plugins/vcolorproperty.cpp b/src/libs/vpropertyexplorer/plugins/vcolorproperty.cpp index fdcb577a8..f47b41856 100644 --- a/src/libs/vpropertyexplorer/plugins/vcolorproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vcolorproperty.cpp @@ -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(editor); + const VColorPropertyEditor* tmpWidget = qobject_cast(editor); if (tmpWidget) { return tmpWidget->getColor(); diff --git a/src/libs/vpropertyexplorer/plugins/vcolorproperty.h b/src/libs/vpropertyexplorer/plugins/vcolorproperty.h index acd4ae084..ba4600bfa 100644 --- a/src/libs/vpropertyexplorer/plugins/vcolorproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vcolorproperty.h @@ -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; diff --git a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp index 01d6e58c2..bb1aac396 100644 --- a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp +++ b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp @@ -26,7 +26,7 @@ #include #include -#include "vproperty.h" +#include "../vproperty.h" using namespace VPE; @@ -128,7 +128,7 @@ VColorPropertyEditor::~VColorPropertyEditor() // } -QColor VColorPropertyEditor::getColor() +QColor VColorPropertyEditor::getColor() const { return Color; } diff --git a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h index dd71e8504..b90218b87 100644 --- a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h +++ b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h @@ -21,7 +21,7 @@ #ifndef VCOLORPROPERTYEDITOR_H #define VCOLORPROPERTYEDITOR_H -#include "vpropertyexplorer_global.h" +#include "../vpropertyexplorer_global.h" #include #include @@ -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 diff --git a/src/libs/vpropertyexplorer/plugins/vemptyproperty.cpp b/src/libs/vpropertyexplorer/plugins/vemptyproperty.cpp index 7995395d1..db1f9959e 100644 --- a/src/libs/vpropertyexplorer/plugins/vemptyproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vemptyproperty.cpp @@ -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); diff --git a/src/libs/vpropertyexplorer/plugins/vemptyproperty.h b/src/libs/vpropertyexplorer/plugins/vemptyproperty.h index 7ddc25108..a91d6003e 100644 --- a/src/libs/vpropertyexplorer/plugins/vemptyproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vemptyproperty.h @@ -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; diff --git a/src/libs/vpropertyexplorer/plugins/venumproperty.cpp b/src/libs/vpropertyexplorer/plugins/venumproperty.cpp index a53e64c7f..9caf63f6d 100644 --- a/src/libs/vpropertyexplorer/plugins/venumproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/venumproperty.cpp @@ -19,7 +19,7 @@ *************************************************************************/ #include "venumproperty.h" -#include "vproperty_p.h" +#include "../vproperty_p.h" #include #include @@ -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(editor); + const QComboBox* tmpEditor = qobject_cast(editor); if (tmpEditor) { return tmpEditor->currentIndex(); diff --git a/src/libs/vpropertyexplorer/plugins/venumproperty.h b/src/libs/vpropertyexplorer/plugins/venumproperty.h index 434afae52..40da26dba 100644 --- a/src/libs/vpropertyexplorer/plugins/venumproperty.h +++ b/src/libs/vpropertyexplorer/plugins/venumproperty.h @@ -21,7 +21,7 @@ #ifndef VENUMPROPERTY_H #define VENUMPROPERTY_H -#include "vproperty.h" +#include "../vproperty.h" #include @@ -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); diff --git a/src/libs/vpropertyexplorer/plugins/vfileproperty.cpp b/src/libs/vpropertyexplorer/plugins/vfileproperty.cpp index 3dbecb7c3..4434675d0 100644 --- a/src/libs/vpropertyexplorer/plugins/vfileproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vfileproperty.cpp @@ -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(editor); + const VFileEditWidget* tmpWidget = qobject_cast(editor); if (tmpWidget) { return tmpWidget->getFile(); diff --git a/src/libs/vpropertyexplorer/plugins/vfileproperty.h b/src/libs/vpropertyexplorer/plugins/vfileproperty.h index 324871fa5..c7a0c616e 100644 --- a/src/libs/vpropertyexplorer/plugins/vfileproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vfileproperty.h @@ -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 @@ -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: //! diff --git a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.cpp b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.cpp index ad5826be2..277b4dd23 100644 --- a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.cpp +++ b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.cpp @@ -93,7 +93,7 @@ void VFileEditWidget::setDirectory(bool dir) Directory = dir; } -QString VFileEditWidget::getFile() +QString VFileEditWidget::getFile() const { return CurrentFilePath; } diff --git a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h index dbd8e4cfc..d45a17e81 100644 --- a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h +++ b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h @@ -21,7 +21,7 @@ #ifndef VFILEPROPERTYEDITOR_H #define VFILEPROPERTYEDITOR_H -#include "vpropertyexplorer_global.h" +#include "../vpropertyexplorer_global.h" #include #include @@ -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); diff --git a/src/libs/vpropertyexplorer/plugins/vnumberproperty.cpp b/src/libs/vpropertyexplorer/plugins/vnumberproperty.cpp index 55c8420af..42ad9df4b 100644 --- a/src/libs/vpropertyexplorer/plugins/vnumberproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vnumberproperty.cpp @@ -25,7 +25,7 @@ #include #include -#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(editor); + const QSpinBox* tmpEditor = qobject_cast(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(editor); + const QDoubleSpinBox* tmpEditor = qobject_cast(editor); if (tmpEditor) { return tmpEditor->value(); diff --git a/src/libs/vpropertyexplorer/plugins/vnumberproperty.h b/src/libs/vpropertyexplorer/plugins/vnumberproperty.h index 4ccd0374a..bf39d60ec 100644 --- a/src/libs/vpropertyexplorer/plugins/vnumberproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vnumberproperty.h @@ -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: //! diff --git a/src/libs/vpropertyexplorer/plugins/vobjectproperty.cpp b/src/libs/vpropertyexplorer/plugins/vobjectproperty.cpp index ad3d21c45..46a0d60e6 100644 --- a/src/libs/vpropertyexplorer/plugins/vobjectproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vobjectproperty.cpp @@ -19,7 +19,7 @@ *************************************************************************/ #include "vobjectproperty.h" -#include "vproperty_p.h" +#include "../vproperty_p.h" #include #include @@ -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(editor); + const QComboBox* tmpEditor = qobject_cast(editor); if (tmpEditor) { return tmpEditor->itemData(tmpEditor->currentIndex()); diff --git a/src/libs/vpropertyexplorer/plugins/vobjectproperty.h b/src/libs/vpropertyexplorer/plugins/vobjectproperty.h index 17660df84..ba1462c39 100644 --- a/src/libs/vpropertyexplorer/plugins/vobjectproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vobjectproperty.h @@ -21,7 +21,7 @@ #ifndef VOBJECTPROPERTY_H #define VOBJECTPROPERTY_H -#include "vproperty.h" +#include "../vproperty.h" #include @@ -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 &objects); diff --git a/src/libs/vpropertyexplorer/plugins/vpointfproperty.cpp b/src/libs/vpropertyexplorer/plugins/vpointfproperty.cpp index deb69b2ad..f5ed1b951 100644 --- a/src/libs/vpropertyexplorer/plugins/vpointfproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vpointfproperty.cpp @@ -22,7 +22,7 @@ using namespace VPE; -#include "vproperty_p.h" +#include "../vproperty_p.h" #include "vnumberproperty.h" #include diff --git a/src/libs/vpropertyexplorer/plugins/vpointfproperty.h b/src/libs/vpropertyexplorer/plugins/vpointfproperty.h index 4a25bee52..c8e082529 100644 --- a/src/libs/vpropertyexplorer/plugins/vpointfproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vpointfproperty.h @@ -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 { diff --git a/src/libs/vpropertyexplorer/plugins/vshortcutproperty.cpp b/src/libs/vpropertyexplorer/plugins/vshortcutproperty.cpp index dd9a3974b..f51346d54 100644 --- a/src/libs/vpropertyexplorer/plugins/vshortcutproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vshortcutproperty.cpp @@ -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(editor); + const VShortcutEditWidget* tmpWidget = qobject_cast(editor); if (tmpWidget) { return tmpWidget->getShortcutAsString(); diff --git a/src/libs/vpropertyexplorer/plugins/vshortcutproperty.h b/src/libs/vpropertyexplorer/plugins/vshortcutproperty.h index b202d94c5..ad994f12f 100644 --- a/src/libs/vpropertyexplorer/plugins/vshortcutproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vshortcutproperty.h @@ -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; diff --git a/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.cpp b/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.cpp index d8dd104f9..c4864150f 100644 --- a/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.cpp +++ b/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.cpp @@ -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(); } diff --git a/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.h b/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.h index 6e8d1a137..97a6ffb46 100644 --- a/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.h +++ b/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.h @@ -21,7 +21,7 @@ #ifndef VSHORTCUTPROPERTYEDITOR_H #define VSHORTCUTPROPERTYEDITOR_H -#include "vpropertyexplorer_global.h" +#include "../vpropertyexplorer_global.h" #include #include @@ -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(); diff --git a/src/libs/vpropertyexplorer/plugins/vstringproperty.cpp b/src/libs/vpropertyexplorer/plugins/vstringproperty.cpp index 3205218a4..0446e6a3a 100644 --- a/src/libs/vpropertyexplorer/plugins/vstringproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vstringproperty.cpp @@ -23,7 +23,7 @@ #include #include -#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(editor); + const QLineEdit* tmpEditor = qobject_cast(editor); if (tmpEditor) { return tmpEditor->text(); diff --git a/src/libs/vpropertyexplorer/plugins/vstringproperty.h b/src/libs/vpropertyexplorer/plugins/vstringproperty.h index b32eaa5a9..87afc829c 100644 --- a/src/libs/vpropertyexplorer/plugins/vstringproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vstringproperty.h @@ -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); diff --git a/src/libs/vpropertyexplorer/plugins/vwidgetproperty.cpp b/src/libs/vpropertyexplorer/plugins/vwidgetproperty.cpp index 9cc28414c..61159e9b5 100644 --- a/src/libs/vpropertyexplorer/plugins/vwidgetproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vwidgetproperty.cpp @@ -21,7 +21,7 @@ #include "vwidgetproperty.h" -#include "vwidgetproperty_p.h" +#include "../vwidgetproperty_p.h" using namespace VPE; diff --git a/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h b/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h index 615cfb1dc..610d91cab 100644 --- a/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h +++ b/src/libs/vpropertyexplorer/plugins/vwidgetproperty.h @@ -21,7 +21,7 @@ #ifndef VWIDGETROPERTY_H #define VWIDGETROPERTY_H -#include "vpropertyexplorer_global.h" +#include "../vpropertyexplorer_global.h" #include "vemptyproperty.h" diff --git a/src/libs/vpropertyexplorer/vproperty.cpp b/src/libs/vpropertyexplorer/vproperty.cpp index 836cd0415..a8969b2dd 100644 --- a/src/libs/vpropertyexplorer/vproperty.cpp +++ b/src/libs/vpropertyexplorer/vproperty.cpp @@ -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) { diff --git a/src/libs/vpropertyexplorer/vproperty.h b/src/libs/vpropertyexplorer/vproperty.h index fd33f589f..a9126894a 100644 --- a/src/libs/vpropertyexplorer/vproperty.h +++ b/src/libs/vpropertyexplorer/vproperty.h @@ -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; diff --git a/src/libs/vpropertyexplorer/vpropertyformwidget.cpp b/src/libs/vpropertyexplorer/vpropertyformwidget.cpp index 766976e7e..fa0a976e7 100644 --- a/src/libs/vpropertyexplorer/vpropertyformwidget.cpp +++ b/src/libs/vpropertyexplorer/vpropertyformwidget.cpp @@ -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) { diff --git a/src/libs/vpropertyexplorer/vpropertyformwidget.h b/src/libs/vpropertyexplorer/vpropertyformwidget.h index 60749ff0a..55338084c 100644 --- a/src/libs/vpropertyexplorer/vpropertyformwidget.h +++ b/src/libs/vpropertyexplorer/vpropertyformwidget.h @@ -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) diff --git a/src/libs/vpropertyexplorer/vpropertymodel.cpp b/src/libs/vpropertyexplorer/vpropertymodel.cpp index 378d88dfe..6597ed9f3 100644 --- a/src/libs/vpropertyexplorer/vpropertymodel.cpp +++ b/src/libs/vpropertyexplorer/vpropertymodel.cpp @@ -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) diff --git a/src/libs/vpropertyexplorer/vpropertymodel.h b/src/libs/vpropertyexplorer/vpropertymodel.h index 9e07b2392..c254f8d8e 100644 --- a/src/libs/vpropertyexplorer/vpropertymodel.h +++ b/src/libs/vpropertyexplorer/vpropertymodel.h @@ -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(). diff --git a/src/libs/vpropertyexplorer/vpropertyset.cpp b/src/libs/vpropertyexplorer/vpropertyset.cpp index 720af7849..4cdc420e3 100644 --- a/src/libs/vpropertyexplorer/vpropertyset.cpp +++ b/src/libs/vpropertyexplorer/vpropertyset.cpp @@ -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)