]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/checkedwidgets.C
enable Font cache only for MacOSX and inline width() for other platform.
[lyx.git] / src / frontends / qt4 / checkedwidgets.C
index 8294094cf626826e51fd9903a62d1ab5dc10f6d0..c694ac10694c8fd880fb0d50f8c6131e65c2fcd2 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * \file qt2/checkedwidgets.C
+ * \file qt4/checkedwidgets.C
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
@@ -35,7 +35,7 @@ void setWarningColor(QWidget * widget)
        // So copy the appropriate parts of the function here:
        QPalette pal = widget->palette();
        pal.setColor(QPalette::Active,
-                    QColorGroup::Foreground,
+                    QPalette::Foreground,
                     QColor(255, 0, 0));
        widget->setPalette(pal);
 }
@@ -44,7 +44,7 @@ void setWarningColor(QWidget * widget)
 void setWidget(bool valid, QLineEdit * input, QLabel * label)
 {
        if (valid)
-               input->unsetPalette();
+               input->setPalette(QPalette());
        else
                setWarningColor(input);
 
@@ -52,7 +52,7 @@ void setWidget(bool valid, QLineEdit * input, QLabel * label)
                return;
 
        if (valid)
-               label->unsetPalette();
+               label->setPalette(QPalette());
        else
                setWarningColor(label);
 }