Fix a couple of clazy warnings

This commit is contained in:
Sergio Martins
2020-08-07 22:21:35 +01:00
parent 8db40d368c
commit 0a6f760100
4 changed files with 8 additions and 4 deletions

2
.clazy
View File

@@ -1 +1 @@
CHECKS level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots CHECKS level2,detaching-member,heap-allocated-small-trivial-type,isempty-vs-count,qstring-varargs,qvariant-template-instantiation,raw-environment-function,reserve-candidates,signal-with-return-value,thread-with-slots,no-ctor-missing-parent-argument,no-missing-qobject-macro

View File

@@ -27,6 +27,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <time.h> #include <time.h>
// clazy:excludeall=qstring-allocations
static MyWidget *newMyWidget() static MyWidget *newMyWidget()
{ {
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0) #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)

View File

@@ -2918,8 +2918,8 @@ SizingInfo::List ItemContainer::sizes(bool ignoreBeingInserted) const
return result; return result;
} }
QVector<int> ItemContainer::calculateSqueezes(SizingInfo::List::ConstIterator begin, QVector<int> ItemContainer::calculateSqueezes(SizingInfo::List::ConstIterator begin, //clazy:exclude=function-args-by-ref
SizingInfo::List::ConstIterator end, int needed, SizingInfo::List::ConstIterator end, int needed, //clazy:exclude=function-args-by-ref
NeighbourSqueezeStrategy strategy, bool reversed) const NeighbourSqueezeStrategy strategy, bool reversed) const
{ {
QVector<int> availabilities; QVector<int> availabilities;

View File

@@ -24,7 +24,7 @@ namespace Layouting {
class RubberBand : public QRubberBand class RubberBand : public QRubberBand
, public Layouting::Widget_qwidget , public Layouting::Widget_qwidget
{ {
Q_OBJECT
public: public:
RubberBand(Layouting::Widget *parent) RubberBand(Layouting::Widget *parent)
: QRubberBand(QRubberBand::Line, parent ? parent->asQWidget() : nullptr) : QRubberBand(QRubberBand::Line, parent ? parent->asQWidget() : nullptr)
@@ -107,3 +107,5 @@ Widget *SeparatorWidget::asWidget()
{ {
return this; return this;
} }
#include <Separator_qwidget.moc>