X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/60b868108151463a702e8c10933b0ceb99f11bbe..76a46fd9094b17eb99e8a42cca8562fdc0b3814c:/src/kitemviews/kitemliststyleoption.cpp diff --git a/src/kitemviews/kitemliststyleoption.cpp b/src/kitemviews/kitemliststyleoption.cpp index 36cfeb088..84054aaac 100644 --- a/src/kitemviews/kitemliststyleoption.cpp +++ b/src/kitemviews/kitemliststyleoption.cpp @@ -19,36 +19,42 @@ #include "kitemliststyleoption.h" -#include KItemListStyleOption::KItemListStyleOption() : rect(), font(), fontMetrics(QFont()), palette(), - padding(0), - horizontalMargin(0), - verticalMargin(0), - iconSize(KIconLoader::SizeMedium), + padding(-1), + horizontalMargin(-1), + verticalMargin(-1), + iconSize(-1), extendedSelectionRegion(false), - maxTextSize() + maxTextLines(0), + maxTextWidth(0) { } -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), - maxTextSize(other.maxTextSize) +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); }