File kcm-fcitx-0.4.2-compat-qt474.patch of Package kcm-fcitx

diff --git a/src/fontbutton.cpp b/src/fontbutton.cpp
index 5a20989..cd50e63 100644
--- a/src/fontbutton.cpp
+++ b/src/fontbutton.cpp
@@ -75,10 +75,13 @@ void FontButton::setFont(const QFont& font)
 {
     m_font = font;
     QString style;
+#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
     if (!font.styleName().isEmpty()) {
         style = font.styleName();
     }
-    else {
+    else
+#endif
+    {
         QStringList styles;
         if (font.bold())
             styles << "Bold";
openSUSE Build Service is sponsored by