Commit 36d8d9e3 authored by Benjamin Port's avatar Benjamin Port
Browse files

KCM fonts : Rearrange code

Summary: Don't mix KFonts and FontAASettings method implementation

Reviewers: #plasma, ervin, mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24670
parent a4d23764
......@@ -465,6 +465,29 @@ bool FontAASettings::needsSave() const
return m_state != m_originalState;
}
bool FontAASettings::State::operator==(const State& other) const
{
if (
exclude != other.exclude
|| antiAliasing != other.antiAliasing
|| dpi != other.dpi
|| subPixel != other.subPixel
|| hinting != other.hinting
) {
return false;
}
if (exclude && (excludeFrom != other.excludeFrom || excludeTo != other.excludeTo)) {
return false;
}
return true;
}
bool FontAASettings::State::operator!=(const State& other) const
{
return !(*this == other);
}
/**** KFonts ****/
......@@ -612,29 +635,5 @@ QFont KFonts::applyFontDiff(const QFont &fnt, const QFont &newFont, int fontDiff
return font;
}
bool FontAASettings::State::operator==(const State& other) const
{
if (
exclude != other.exclude
|| antiAliasing != other.antiAliasing
|| dpi != other.dpi
|| subPixel != other.subPixel
|| hinting != other.hinting
) {
return false;
}
if (exclude && (excludeFrom != other.excludeFrom || excludeTo != other.excludeTo)) {
return false;
}
return true;
}
bool FontAASettings::State::operator!=(const State& other) const
{
return !(*this == other);
}
#include "fonts.moc"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment