Changeset View
Changeset View
Standalone View
Standalone View
ksirkskineditor/onu.cpp
Show First 20 Lines • Show All 772 Lines • ▼ Show 20 Line(s) | |||||
773 | { | 773 | { | ||
774 | QFont backgroundFont(m_font.family, m_font.size, QFont::Normal, m_font.italic); | 774 | QFont backgroundFont(m_font.family, m_font.size, QFont::Normal, m_font.italic); | ||
775 | return backgroundFont; | 775 | return backgroundFont; | ||
776 | } | 776 | } | ||
777 | 777 | | |||
778 | void ONU::setFont(const QFont& font) | 778 | void ONU::setFont(const QFont& font) | ||
779 | { | 779 | { | ||
780 | if (m_font.family == font.family() | 780 | if (m_font.family == font.family() | ||
781 | && m_font.size == font.pointSize() | 781 | && m_font.size == (uint)font.pointSize() | ||
chehrlic: later pointSize() (int) is assigned to m_font.size - so why not change m_font.size to be an int? | |||||
wouldn't it make more sense to make FontDesc size an int? It's always used to compare with QFont pointsize or to load from it or from file, so i'm not sure why we'd want to keep it being uint. aacid: wouldn't it make more sense to make FontDesc size an int?
It's always used to compare with… | |||||
782 | && m_font.weight == (QFont::Weight)font.weight() | 782 | && m_font.weight == (QFont::Weight)font.weight() | ||
783 | && m_font.italic == font.italic()) | 783 | && m_font.italic == font.italic()) | ||
784 | return; | 784 | return; | ||
785 | m_font.family = font.family(); | 785 | m_font.family = font.family(); | ||
786 | m_font.size = font.pointSize(); | 786 | m_font.size = font.pointSize(); | ||
787 | m_font.weight = (QFont::Weight)font.weight(); | 787 | m_font.weight = (QFont::Weight)font.weight(); | ||
788 | m_font.italic = font.italic(); | 788 | m_font.italic = font.italic(); | ||
789 | m_dirty = true; | 789 | m_dirty = true; | ||
▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines |
later pointSize() (int) is assigned to m_font.size - so why not change m_font.size to be an int?