Rename QPixelFormat enum value to avoid conflict with X.h.
This commit fixes a potential compile error where pixelformat.h would not compile if X.h from x11proto was included first, since X.h #define's GrayScale as an integer constant. Task-number: QTBUG-40087 Change-Id: I7208a204259c6d3a13b5d0cbc98a76bb54b8b494 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This commit is contained in:
parent
8e69a03921
commit
6d87e3ed40
@ -4603,7 +4603,7 @@ static const QPixelFormat pixelformats[] = {
|
|||||||
//QImage::Format_Invalid:
|
//QImage::Format_Invalid:
|
||||||
QPixelFormat(),
|
QPixelFormat(),
|
||||||
//QImage::Format_Mono:
|
//QImage::Format_Mono:
|
||||||
QPixelFormat(QPixelFormat::GrayScale,
|
QPixelFormat(QPixelFormat::Grayscale,
|
||||||
/*RED*/ 1,
|
/*RED*/ 1,
|
||||||
/*GREEN*/ 0,
|
/*GREEN*/ 0,
|
||||||
/*BLUE*/ 0,
|
/*BLUE*/ 0,
|
||||||
@ -4616,7 +4616,7 @@ static const QPixelFormat pixelformats[] = {
|
|||||||
/*INTERPRETATION*/ QPixelFormat::UnsignedByte,
|
/*INTERPRETATION*/ QPixelFormat::UnsignedByte,
|
||||||
/*BYTE ORDER*/ QPixelFormat::CurrentSystemEndian),
|
/*BYTE ORDER*/ QPixelFormat::CurrentSystemEndian),
|
||||||
//QImage::Format_MonoLSB:
|
//QImage::Format_MonoLSB:
|
||||||
QPixelFormat(QPixelFormat::GrayScale,
|
QPixelFormat(QPixelFormat::Grayscale,
|
||||||
/*RED*/ 1,
|
/*RED*/ 1,
|
||||||
/*GREEN*/ 0,
|
/*GREEN*/ 0,
|
||||||
/*BLUE*/ 0,
|
/*BLUE*/ 0,
|
||||||
|
@ -85,7 +85,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
\value Indexed The color model uses a color palette.
|
\value Indexed The color model uses a color palette.
|
||||||
|
|
||||||
\value GrayScale The color model is GrayScale.
|
\value Grayscale The color model is Grayscale.
|
||||||
|
|
||||||
\value CMYK The color model is CMYK.
|
\value CMYK The color model is CMYK.
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ Q_STATIC_ASSERT(sizeof(QPixelFormatGrayScale) == sizeof(QPixelFormat));
|
|||||||
\fn QPixelFormatGrayScale::QPixelFormatGrayScale(uchar channelSize,
|
\fn QPixelFormatGrayScale::QPixelFormatGrayScale(uchar channelSize,
|
||||||
TypeInterpretation typeInterpretation = UnsignedInteger)
|
TypeInterpretation typeInterpretation = UnsignedInteger)
|
||||||
|
|
||||||
Constructor for creating a GrayScale format. Monochrome formats can be
|
Constructor for creating a Grayscale format. Monochrome formats can be
|
||||||
described by passing 1 to \a channelSize. Its also possible to define very
|
described by passing 1 to \a channelSize. Its also possible to define very
|
||||||
accurate greyscale formats using doubles to describe each pixel by passing 8
|
accurate greyscale formats using doubles to describe each pixel by passing 8
|
||||||
as \a channelSize and FloatingPoint as \a typeInterpretation.
|
as \a channelSize and FloatingPoint as \a typeInterpretation.
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
RGB,
|
RGB,
|
||||||
BGR,
|
BGR,
|
||||||
Indexed,
|
Indexed,
|
||||||
GrayScale,
|
Grayscale,
|
||||||
CMYK,
|
CMYK,
|
||||||
HSL,
|
HSL,
|
||||||
HSV,
|
HSV,
|
||||||
@ -360,7 +360,7 @@ QPixelFormatRgb::QPixelFormatRgb(uchar red,
|
|||||||
Q_DECL_CONSTEXPR
|
Q_DECL_CONSTEXPR
|
||||||
QPixelFormatGrayScale::QPixelFormatGrayScale(uchar channelSize,
|
QPixelFormatGrayScale::QPixelFormatGrayScale(uchar channelSize,
|
||||||
TypeInterpretation typeInt) Q_DECL_NOTHROW
|
TypeInterpretation typeInt) Q_DECL_NOTHROW
|
||||||
: QPixelFormat(GrayScale,
|
: QPixelFormat(Grayscale,
|
||||||
channelSize,
|
channelSize,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user