diff --git a/utils.h b/utils.h --- a/utils.h +++ b/utils.h @@ -111,6 +111,7 @@ public: explicit StrutRect(QRect rect = QRect(), StrutArea area = StrutAreaInvalid); StrutRect(const StrutRect& other); + StrutRect &operator=(const StrutRect& other); inline StrutArea area() const { return m_area; } diff --git a/utils.cpp b/utils.cpp --- a/utils.cpp +++ b/utils.cpp @@ -69,6 +69,15 @@ { } +StrutRect &StrutRect::operator=(const StrutRect &other) +{ + if (this != &other) { + QRect::operator=(other); + m_area = other.area(); + } + return *this; +} + #endif #ifndef KCMRULES