summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qcolor.cpp61
-rw-r--r--src/gui/painting/qcolor.h5
2 files changed, 3 insertions, 63 deletions
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 93492ab134..8234fa19f6 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -46,15 +46,6 @@
#include "qvariant.h"
#include "qdebug.h"
-#ifdef Q_WS_X11
-# include "qapplication.h"
-# include "qx11info_x11.h"
-# include "private/qt_x11_p.h"
-
-static bool allowX11ColorNames = false;
-
-#endif
-
#include <math.h>
#include <stdio.h>
#include <limits.h>
@@ -163,9 +154,6 @@ QT_BEGIN_NAMESPACE
\img alphafill.png
- Alpha-blended drawing is supported on Windows, Mac OS X, and on
- X11 systems that have the X Render extension installed.
-
The alpha channel of a color can be retrieved and set using the
alpha() and setAlpha() functions if its value is an integer, and
alphaF() and setAlphaF() if its value is qreal (double). By
@@ -520,13 +508,11 @@ QString QColor::name() const
same as defined by the Qt::GlobalColor enums, e.g. "green" and Qt::green does not
refer to the same color.
\i \c transparent - representing the absence of a color.
- \i \e{X11 only}: If allowX11ColorNames() returns true, any valid X11 color name. See
- the documentation for \c XParseColor() for information about valid X11 color names.
\endlist
The color is invalid if \a name cannot be parsed.
- \sa QColor(), name(), isValid(), allowX11ColorNames()
+ \sa QColor(), name(), isValid()
*/
void QColor::setNamedColor(const QString &name)
@@ -576,20 +562,8 @@ bool QColor::setColorFromString(const QString &name)
} else
#endif
{
-#ifdef Q_WS_X11
- XColor result;
- if (allowX11ColorNames()
- && QApplication::instance()
- && QX11Info::display()
- && XParseColor(QX11Info::display(), QX11Info::appColormap(), name.toLatin1().constData(), &result)) {
- setRgb(result.red >> 8, result.green >> 8, result.blue >> 8);
- return true;
- } else
-#endif
- {
- invalidate();
- return false;
- }
+ invalidate();
+ return false;
}
}
@@ -2417,35 +2391,6 @@ QColor::operator QVariant() const
return QVariant(QVariant::Color, this);
}
-#ifdef Q_WS_X11
-/*!
- Returns true if setNamedColor() is allowed to look up colors in the X11
- color database. By default, this function returns false.
-
- \note This function is only available on the X11 platform.
-
- \sa setAllowX11ColorNames()
-*/
-bool QColor::allowX11ColorNames()
-{
- return ::allowX11ColorNames;
-}
-
-/*!
- Allow setNamedColor() to look up colors in the X11 color database if
- \a enabled. By default, setNamedColor() does \e not look up colors in the
- X11 color database.
-
- \note This function is only available on the X11 platform.
-
- \sa setNamedColor(), allowX11ColorNames()
-*/
-void QColor::setAllowX11ColorNames(bool enabled)
-{
- ::allowX11ColorNames = enabled;
-}
-#endif
-
/*! \internal
Marks the color as invalid and sets all components to zero (alpha is set
diff --git a/src/gui/painting/qcolor.h b/src/gui/painting/qcolor.h
index 1dd6c2a099..460a43183f 100644
--- a/src/gui/painting/qcolor.h
+++ b/src/gui/painting/qcolor.h
@@ -203,11 +203,6 @@ public:
operator QVariant() const;
-#ifdef Q_WS_X11
- static bool allowX11ColorNames();
- static void setAllowX11ColorNames(bool enabled);
-#endif
-
static bool isValidColor(const QString &name);
private: