diff --git a/src/libs/qmuparser/qmuparserbase.cpp b/src/libs/qmuparser/qmuparserbase.cpp index 8fbc64995..286c0c05b 100644 --- a/src/libs/qmuparser/qmuparserbase.cpp +++ b/src/libs/qmuparser/qmuparserbase.cpp @@ -1068,6 +1068,10 @@ qreal QmuParserBase::ParseCmdCodeBulk(int nOffset, int nThreadID) const case cmFUNC: { int iArgCount = pTok->Fun.argc; +#ifdef Q_CC_CLANG + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wundefined-reinterpret-cast" +#endif // switch according to argument count switch (iArgCount) @@ -1259,6 +1263,11 @@ qreal QmuParserBase::ParseCmdCodeBulk(int nOffset, int nThreadID) const Error(ecINTERNAL_ERROR, 3); return 0; } // switch CmdCode + +#ifdef Q_CC_CLANG + #pragma clang diagnostic pop +#endif + } // for all bytecode tokens return Stack[m_nFinalResultIdx]; diff --git a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp index a3bf55fff..29d173ef4 100644 --- a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp +++ b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp @@ -80,7 +80,7 @@ void VColorPropertyEditor::setColor(const QColor& color_) QPixmap VColorPropertyEditor::getColorPixmap(const QColor& color, unsigned int size) { - QImage tmpImgage(size, size, QImage::Format_ARGB32_Premultiplied); + QImage tmpImgage(static_cast(size), static_cast(size), QImage::Format_ARGB32_Premultiplied); tmpImgage.fill(static_cast(color.rgb())); return QPixmap::fromImage(tmpImgage); // todo: support alpha channel diff --git a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h index 9cdaca357..c4b69151c 100644 --- a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h +++ b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.h @@ -64,8 +64,9 @@ signals: public slots: //! Sets the current file, does not check if it is valid - //! \param file The new filepath the widget should show - //! \emit_signal If true, this will emit the dataChangedByUser()-signal (if file differs from the current file) + //! \param getFile The new filepath the widget should show + //! \param emit_signal If true, this will emit the dataChangedByUser()-signal (if file differs from the current + //! file) void setFile(const QString &getFile, bool emit_signal = false); //! Sets a filter for the file field diff --git a/src/libs/vpropertyexplorer/plugins/vnumberproperty.cpp b/src/libs/vpropertyexplorer/plugins/vnumberproperty.cpp index 9ec659725..b86def022 100644 --- a/src/libs/vpropertyexplorer/plugins/vnumberproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vnumberproperty.cpp @@ -139,7 +139,7 @@ void VIntegerProperty::valueChanged(int i) const double VDoubleProperty::StandardPrecision = 5; VDoubleProperty::VDoubleProperty(const QString& name, const QMap& settings) - : VIntegerProperty(name), Precision(StandardPrecision) + : VIntegerProperty(name), Precision(static_cast(StandardPrecision)) { VProperty::setSettings(settings); VProperty::d_ptr->VariantValue.setValue(0); @@ -148,7 +148,7 @@ VDoubleProperty::VDoubleProperty(const QString& name, const QMap(StandardPrecision)) { VProperty::d_ptr->VariantValue.setValue(0); VProperty::d_ptr->VariantValue.convert(QVariant::Double); diff --git a/src/libs/vpropertyexplorer/vabstractpropertyfactory.h b/src/libs/vpropertyexplorer/vabstractpropertyfactory.h index 1d77e7e7f..2d71d137e 100644 --- a/src/libs/vpropertyexplorer/vabstractpropertyfactory.h +++ b/src/libs/vpropertyexplorer/vabstractpropertyfactory.h @@ -29,11 +29,17 @@ namespace VPE class VProperty; +#ifdef Q_CC_CLANG + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wweak-vtables" +#endif + class VPROPERTYEXPLORERSHARED_EXPORT VAbstractPropertyFactory { public: //! Empty virtual destructor - virtual ~VAbstractPropertyFactory() {} + virtual ~VAbstractPropertyFactory() + {} //! Creates a new property of a certain type and assigns a name and description (otionally) //! \param type The type of the property as string @@ -42,6 +48,10 @@ public: virtual VProperty* createProperty(const QString& type, const QString &name) = 0; }; +#ifdef Q_CC_CLANG + #pragma clang diagnostic pop +#endif + } #endif // VABSTRACTPROPERTYFACTORY_H diff --git a/src/libs/vpropertyexplorer/vproperty.cpp b/src/libs/vpropertyexplorer/vproperty.cpp index a8969b2dd..a89cb160b 100644 --- a/src/libs/vpropertyexplorer/vproperty.cpp +++ b/src/libs/vpropertyexplorer/vproperty.cpp @@ -113,7 +113,7 @@ QWidget* VProperty::createEditor(QWidget * parent, const QStyleOptionViewItem& o factory->registerEditor(QVariant::String, lineCreator); QItemEditorFactory::setDefaultFactory(factory); - d_ptr->editor = factory->createEditor(d_ptr->PropertyVariantType, parent); + d_ptr->editor = factory->createEditor(static_cast(d_ptr->PropertyVariantType), parent); return d_ptr->editor; } @@ -174,7 +174,7 @@ Qt::ItemFlags VProperty::flags(int column) const void VProperty::setValue(const QVariant &value) { d_ptr->VariantValue = value; - d_ptr->VariantValue.convert(d_ptr->PropertyVariantType); + d_ptr->VariantValue.convert(static_cast(d_ptr->PropertyVariantType)); if (d_ptr->editor != nullptr) { setEditorData(d_ptr->editor); diff --git a/src/libs/vpropertyexplorer/vpropertyformview_p.h b/src/libs/vpropertyexplorer/vpropertyformview_p.h index 28dc4a480..a97758f80 100644 --- a/src/libs/vpropertyexplorer/vpropertyformview_p.h +++ b/src/libs/vpropertyexplorer/vpropertyformview_p.h @@ -31,6 +31,11 @@ namespace VPE class VPropertyModel; class VPropertySet; +#ifdef Q_CC_CLANG + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wweak-vtables" +#endif + class VPropertyFormViewPrivate : public VPropertyFormWidgetPrivate { public: @@ -68,6 +73,10 @@ private: Q_DISABLE_COPY(VPropertyFormViewPrivate) }; +#ifdef Q_CC_CLANG + #pragma clang diagnostic pop +#endif + } #endif // VPROPERTYFORMVIEW_P_H diff --git a/src/libs/vpropertyexplorer/vpropertyformwidget_p.h b/src/libs/vpropertyexplorer/vpropertyformwidget_p.h index 0cba9f21f..013e607fd 100644 --- a/src/libs/vpropertyexplorer/vpropertyformwidget_p.h +++ b/src/libs/vpropertyexplorer/vpropertyformwidget_p.h @@ -29,6 +29,11 @@ namespace VPE { +#ifdef Q_CC_CLANG + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wweak-vtables" +#endif + class VPropertyFormWidgetPrivate { public: @@ -67,6 +72,10 @@ public: {} }; +#ifdef Q_CC_CLANG + #pragma clang diagnostic pop +#endif + } #endif // VPROPERTYFORMWIDGET_P_H diff --git a/src/libs/vpropertyexplorer/vpropertyset.h b/src/libs/vpropertyexplorer/vpropertyset.h index 46adb1273..d3559c7d7 100644 --- a/src/libs/vpropertyexplorer/vpropertyset.h +++ b/src/libs/vpropertyexplorer/vpropertyset.h @@ -63,7 +63,8 @@ public: //! \param property The property to add //! \param id The property ID. If id is empty, the property will not be accessable by it's id but still be added. //! If the property was filed under another ID before, that will no longer be valid. - //! \param parentid The property to which to add the property as child. Pass NULL to add it to the root properties. + //! \param parent_property The property to which to add the property as child. Pass NULL to add it to the root + //! properties. virtual bool addProperty(VProperty* property, const QString& id, VProperty* parent_property = nullptr); //! Checks whether a property belongs to this set and returns the result diff --git a/src/libs/vpropertyexplorer/vpropertytreeview.h b/src/libs/vpropertyexplorer/vpropertytreeview.h index 62ab14831..58e17341e 100644 --- a/src/libs/vpropertyexplorer/vpropertytreeview.h +++ b/src/libs/vpropertyexplorer/vpropertytreeview.h @@ -40,7 +40,7 @@ public: explicit VPropertyTreeView(QWidget *parent = 0); //! The destructor, taking a model and setting it to the tree view - //! \param The model to set as model for this tree view + //! \param model The model to set as model for this tree view VPropertyTreeView(VPropertyModel* model, QWidget *parent = 0); //! Destructor diff --git a/src/libs/vpropertyexplorer/vserializedproperty.cpp b/src/libs/vpropertyexplorer/vserializedproperty.cpp index f27c21cb6..d7b626daa 100644 --- a/src/libs/vpropertyexplorer/vserializedproperty.cpp +++ b/src/libs/vpropertyexplorer/vserializedproperty.cpp @@ -53,9 +53,6 @@ VSerializedProperty::VSerializedProperty(const QString &id, const QString &type, { } -VPE::VSerializedProperty::~VSerializedProperty() -{} - void VSerializedProperty::initChildren(const VProperty *property, const VPropertySet *set) { if (property && set) diff --git a/src/libs/vpropertyexplorer/vserializedproperty.h b/src/libs/vpropertyexplorer/vserializedproperty.h index a057b111a..a44bf459d 100644 --- a/src/libs/vpropertyexplorer/vserializedproperty.h +++ b/src/libs/vpropertyexplorer/vserializedproperty.h @@ -49,9 +49,6 @@ public: //! Constructor VSerializedProperty(const QString& id, const QString& type, const QVariant& value); - //! Destructor - ~VSerializedProperty(); - //! The property type QString ID; diff --git a/src/libs/vpropertyexplorer/vwidgetproperty_p.h b/src/libs/vpropertyexplorer/vwidgetproperty_p.h index b71dece37..0e33fb801 100644 --- a/src/libs/vpropertyexplorer/vwidgetproperty_p.h +++ b/src/libs/vpropertyexplorer/vwidgetproperty_p.h @@ -31,6 +31,11 @@ namespace VPE { +#ifdef Q_CC_CLANG + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wweak-vtables" +#endif + class VWidgetPropertyPrivate : public VPropertyPrivate { public: @@ -46,7 +51,7 @@ public: : VPropertyPrivate(), Widget(nullptr) {} //! Destructor - ~VWidgetPropertyPrivate() + virtual ~VWidgetPropertyPrivate() { if (Widget) { @@ -55,6 +60,10 @@ public: } }; +#ifdef Q_CC_CLANG + #pragma clang diagnostic pop +#endif + } #endif // VWIDGETPROPERTY_P_H