X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/3957884bf2e44619a4ed35ba0ffead519988885b..681d8bb6c:/src/kitemviews/kitemliststyleoption.cpp diff --git a/src/kitemviews/kitemliststyleoption.cpp b/src/kitemviews/kitemliststyleoption.cpp index f26b220bc..bcfb86064 100644 --- a/src/kitemviews/kitemliststyleoption.cpp +++ b/src/kitemviews/kitemliststyleoption.cpp @@ -19,13 +19,19 @@ #include "kitemliststyleoption.h" + KItemListStyleOption::KItemListStyleOption() : rect(), font(), fontMetrics(QFont()), palette(), - margin(0), - iconSize(0) + padding(-1), + horizontalMargin(-1), + verticalMargin(-1), + iconSize(-1), + extendedSelectionRegion(false), + maxTextLines(0), + maxTextWidth(0) { } @@ -34,11 +40,36 @@ KItemListStyleOption::KItemListStyleOption(const KItemListStyleOption& other) : font(other.font), fontMetrics(other.fontMetrics), palette(other.palette), - margin(other.margin), - iconSize(other.iconSize) + padding(other.padding), + horizontalMargin(other.horizontalMargin), + verticalMargin(other.verticalMargin), + iconSize(other.iconSize), + extendedSelectionRegion(other.extendedSelectionRegion), + maxTextLines(other.maxTextLines), + maxTextWidth(other.maxTextWidth) { } 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); +}