]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemliststyleoption.cpp
Fix selection rect after porting from QFontMetrics::width()
[dolphin.git] / src / kitemviews / kitemliststyleoption.cpp
index 1ebcad141509fc499bc01211c7bc2f98f1b17aa3..84054aaacc0051c572ecfbaef4c327b6fd92980f 100644 (file)
@@ -35,21 +35,26 @@ KItemListStyleOption::KItemListStyleOption() :
 {
 }
 
-KItemListStyleOption::KItemListStyleOption(const KItemListStyleOption& other) :
-    rect(other.rect),
-    font(other.font),
-    fontMetrics(other.fontMetrics),
-    palette(other.palette),
-    padding(other.padding),
-    horizontalMargin(other.horizontalMargin),
-    verticalMargin(other.verticalMargin),
-    iconSize(other.iconSize),
-    extendedSelectionRegion(other.extendedSelectionRegion),
-    maxTextLines(other.maxTextLines),
-    maxTextWidth(other.maxTextWidth)
+KItemListStyleOption::~KItemListStyleOption()
 {
 }
 
-KItemListStyleOption::~KItemListStyleOption()
+bool KItemListStyleOption::operator==(const KItemListStyleOption& other) const
+{
+    return rect == other.rect
+            && font == other.font
+            && fontMetrics == other.fontMetrics
+            && palette == other.palette
+            && padding == other.padding
+            && horizontalMargin == other.horizontalMargin
+            && verticalMargin == other.verticalMargin
+            && iconSize == other.iconSize
+            && extendedSelectionRegion == other.extendedSelectionRegion
+            && maxTextLines == other.maxTextLines
+            && maxTextWidth == other.maxTextWidth;
+}
+
+bool KItemListStyleOption::operator!=(const KItemListStyleOption& other) const
 {
+    return !(*this == other);
 }