katie_generate_obsolete(QStyleOptionViewItemV3 QtGui qstyleoption.h)
katie_generate_obsolete(QStyleOptionViewItemV4 QtGui qstyleoption.h)
katie_generate_obsolete(QSwipeGesture QtGui qgesture.h)
-katie_generate_obsolete(QSysInfo QtCore qglobal.h)
katie_generate_obsolete(QTableWidgetItem QtGui qtablewidget.h)
katie_generate_obsolete(QTableWidgetSelectionRange QtGui qtablewidget.h)
katie_generate_obsolete(QtAlgorithms QtCore qalgorithms.h)
include/katie/QtCore/QStringListIterator
include/katie/QtCore/QStringMatcher
include/katie/QtCore/QStringRef
-include/katie/QtCore/QSysInfo
include/katie/QtCore/QSystemSemaphore
include/katie/QtCore/QTemporaryFile
include/katie/QtCore/QTextBoundaryFinder
include/katie/QtCore/QStringListIterator
include/katie/QtCore/QStringMatcher
include/katie/QtCore/QStringRef
-include/katie/QtCore/QSysInfo
include/katie/QtCore/QSystemSemaphore
include/katie/QtCore/QTemporaryFile
include/katie/QtCore/QTextBoundaryFinder
include/katie/QtCore/QStringListIterator
include/katie/QtCore/QStringMatcher
include/katie/QtCore/QStringRef
-include/katie/QtCore/QSysInfo
include/katie/QtCore/QSystemSemaphore
include/katie/QtCore/QTemporaryFile
include/katie/QtCore/QTextBoundaryFinder
'QSizeF': 'qsize.h',
'QStringListIterator': 'qstringlist.h',
'QStringRef': 'qstring.h',
- 'QSysInfo': 'qglobal.h',
'QTextDecoder': 'qtextcodec.h',
'QTextEncoder': 'qtextcodec.h',
'QTextStreamFunction': 'qtextstream.h',
"QSvgWidget",
"QSwipeGesture",
"QSyntaxHighlighter",
- "QSysInfo",
"QSystemSemaphore",
"QSystemTrayIcon",
"Qt",
Qt's version number, i.e the version the application is compiled
against.
- \sa <QtAlgorithms>, QSysInfo
+ \sa <QtAlgorithms>
*/
/*!
*****************************************************************************/
/*!
- \class QSysInfo
- \brief The QSysInfo class provides information about the system.
-
- \list
- \o \l ByteOrder specifies whether the platform is big-endian or
- little-endian.
- \endlist
-
- \sa QLibraryInfo
-*/
-
-/*!
- \enum QSysInfo::Endian
-
- \value BigEndian Big-endian byte order (also called Network byte order)
- \value LittleEndian Little-endian byte order
- \value ByteOrder Equals BigEndian or LittleEndian, depending on
- the platform's byte order.
-*/
-
-/*!
\macro Q_WS_X11
\relates <QtGlobal>
# define QT_RETHROW throw
#endif
-/*
- System information
-*/
-class Q_CORE_EXPORT QSysInfo {
-public:
- enum Endian {
- BigEndian,
- LittleEndian,
-
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- ByteOrder = BigEndian
-#elif Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- ByteOrder = LittleEndian
-#endif
- };
-};
-
Q_CORE_EXPORT const char *qVersion();
/*
that are compiled into the Katie library. For more information, see
the \l {Using Katie.conf} documentation.
- \sa QSysInfo, {Using Katie.conf}
+ \sa {Using Katie.conf}
*/
/*!
\value BigEndian Most significant byte first (the default)
\value LittleEndian Least significant byte first
+ \value HostEndian Either BigEndian or LittleEndian, depends on the host endian
*/
/*!
QDataStream::QDataStream()
: dev(nullptr),
owndev(false),
- noswap(QSysInfo::ByteOrder == QSysInfo::BigEndian),
+ noswap(QDataStream::HostEndian == QDataStream::BigEndian),
byteorder(QDataStream::BigEndian),
ver(QDataStream::Qt_Default),
q_status(QDataStream::Ok),
QDataStream::QDataStream(QIODevice *device)
: dev(device),
owndev(false),
- noswap(QSysInfo::ByteOrder == QSysInfo::BigEndian),
+ noswap(QDataStream::HostEndian == QDataStream::BigEndian),
byteorder(QDataStream::BigEndian),
ver(QDataStream::Qt_Default),
q_status(QDataStream::Ok),
QDataStream::QDataStream(QByteArray *a, QIODevice::OpenMode flags)
: dev(nullptr),
owndev(true),
- noswap(QSysInfo::ByteOrder == QSysInfo::BigEndian),
+ noswap(QDataStream::HostEndian == QDataStream::BigEndian),
byteorder(QDataStream::BigEndian),
ver(QDataStream::Qt_Default),
q_status(QDataStream::Ok),
QDataStream::QDataStream(const QByteArray &a)
: dev(nullptr),
owndev(true),
- noswap(QSysInfo::ByteOrder == QSysInfo::BigEndian),
+ noswap(QDataStream::HostEndian == QDataStream::BigEndian),
byteorder(QDataStream::BigEndian),
ver(QDataStream::Qt_Default),
q_status(QDataStream::Ok),
void QDataStream::setByteOrder(ByteOrder bo)
{
byteorder = bo;
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- noswap = (byteorder == BigEndian);
-#else
- noswap = (byteorder == LittleEndian);
-#endif
+ noswap = (byteorder == QDataStream::HostEndian);
}
/*!
};
enum ByteOrder {
- BigEndian = QSysInfo::BigEndian,
- LittleEndian = QSysInfo::LittleEndian
+ BigEndian = Q_BIG_ENDIAN,
+ LittleEndian = Q_LITTLE_ENDIAN,
+ HostEndian = Q_BYTE_ORDER
};
enum DataStatus {
Use toUpper() instead.
*/
-/*!
- \fn bool QChar::networkOrdered()
-
- See if QSysInfo::ByteOrder == QSysInfo::BigEndian instead.
-*/
-
QT_END_NAMESPACE
QDataStream &operator<<(QDataStream &out, const QString &str)
{
if (!str.isEmpty()) {
- if ((out.byteOrder() == QDataStream::BigEndian) == (QSysInfo::ByteOrder == QSysInfo::BigEndian)) {
+ if (out.byteOrder() == QDataStream::HostEndian) {
out.writeBytes(reinterpret_cast<const char *>(str.unicode()), sizeof(QChar) * str.length());
} else {
QSTACKARRAY(ushort, buffer, str.length());
allocated += blockSize;
}
- if ((in.byteOrder() == QDataStream::BigEndian)
- != (QSysInfo::ByteOrder == QSysInfo::BigEndian)) {
+ if (in.byteOrder() != QDataStream::HostEndian) {
ushort *data = reinterpret_cast<ushort *>(str.data());
while (len--) {
*data = qbswap(*data);
parameter instead.
*/
-/*! \fn QImage::Endian QImage::systemByteOrder()
-
- Determines the host computer byte order. Returns
- QImage::LittleEndian (LSB first) or QImage::BigEndian (MSB first).
-
- This function is no longer relevant for QImage. Use QSysInfo
- instead.
-*/
-
/*!
\since 4.6
Resizes the color table to contain \a colorCount entries.
Makes a call to QPixmap::convertToImage().
*/
-/*! \fn QImage::Endian QImage::systemBitOrder()
-
- Determines the bit order of the display hardware. Returns
- QImage::LittleEndian (LSB first) or QImage::BigEndian (MSB first).
-
- This function is no longer relevant for QImage. Use QSysInfo
- instead.
-*/
-
-
/*!
\internal
Q_ASSERT(false);
}
- if ((xi->byte_order == MSBFirst) != (QSysInfo::ByteOrder == QSysInfo::BigEndian)) {
+ if ((xi->byte_order == MSBFirst) != (Q_BYTE_ORDER == Q_BIG_ENDIAN)) {
uint *xidata = (uint *)xi->data;
uint *xiend = xidata + w*h;
while (xidata < xiend) {
BPP32_MSB, BPP32_LSB
} mode = BPP8;
- bool same_msb_lsb = (xi->byte_order == MSBFirst) == (QSysInfo::ByteOrder == QSysInfo::BigEndian);
+ bool same_msb_lsb = (xi->byte_order == MSBFirst) == (Q_BYTE_ORDER == Q_BIG_ENDIAN);
if(bppc == 8) // 8 bit
mode = BPP8;
xi->data = 0;
// we may have to swap the byte order
- if ((QSysInfo::ByteOrder == QSysInfo::LittleEndian && xi->byte_order == MSBFirst)
- || (QSysInfo::ByteOrder == QSysInfo::BigEndian && xi->byte_order == LSBFirst))
+ if ((Q_BYTE_ORDER == Q_LITTLE_ENDIAN && xi->byte_order == MSBFirst)
+ || (Q_BYTE_ORDER == Q_BIG_ENDIAN && xi->byte_order == LSBFirst))
{
const int bpl = image.bytesPerLine();
uchar* dest = image.bits();
*(bptr) = z >> (zprec + aprec);
}
-static const int alphaIndex = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3);
-
static inline void qt_blurrow(QImage & im, int line, int alpha, bool alphaOnly)
{
uchar *bptr = im.scanLine(line);
int zR = 0, zG = 0, zB = 0, zA = 0;
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
if (alphaOnly && im.format() != QImage::Format_Indexed8)
- bptr += alphaIndex;
+ bptr += 3;
+#endif
const int stride = im.depth() >> 3;
const int im_width = im.width();
const int h = rect.height();
int image_byte_order = ImageByteOrder(qt_x11Data->display);
- if ((QSysInfo::ByteOrder == QSysInfo::BigEndian && ((image_byte_order == LSBFirst) || bgr_layout))
- || (image_byte_order == MSBFirst && QSysInfo::ByteOrder == QSysInfo::LittleEndian)
+ if ((Q_BYTE_ORDER == Q_BIG_ENDIAN && ((image_byte_order == LSBFirst) || bgr_layout))
+ || (image_byte_order == MSBFirst && Q_BYTE_ORDER == Q_LITTLE_ENDIAN)
|| (image_byte_order == LSBFirst && bgr_layout))
{
QImage im = image->copy(rect);
for (int i=0; i < h; i++) {
uint *p = data;
uint *end = p + w;
- if (bgr_layout && image_byte_order == MSBFirst && QSysInfo::ByteOrder == QSysInfo::LittleEndian) {
+ if (bgr_layout && image_byte_order == MSBFirst && Q_BYTE_ORDER == Q_LITTLE_ENDIAN) {
while (p < end) {
*p = ((*p << 8) & 0xffffff00) | ((*p >> 24) & 0x000000ff);
p++;
}
- } else if ((image_byte_order == LSBFirst && QSysInfo::ByteOrder == QSysInfo::BigEndian)
- || (image_byte_order == MSBFirst && QSysInfo::ByteOrder == QSysInfo::LittleEndian)) {
+ } else if ((image_byte_order == LSBFirst && Q_BYTE_ORDER == Q_BIG_ENDIAN)
+ || (image_byte_order == MSBFirst && Q_BYTE_ORDER == Q_LITTLE_ENDIAN)) {
while (p < end) {
*p = ((*p << 24) & 0xff000000) | ((*p << 8) & 0x00ff0000)
| ((*p >> 8) & 0x0000ff00) | ((*p >> 24) & 0x000000ff);
p++;
}
- } else if ((image_byte_order == MSBFirst && QSysInfo::ByteOrder == QSysInfo::BigEndian)
+ } else if ((image_byte_order == MSBFirst && Q_BYTE_ORDER == Q_BIG_ENDIAN)
|| (image_byte_order == LSBFirst && bgr_layout))
{
while (p < end) {
{ QLatin1String("QSvgWidget"), QLatin1String("QtSvg/qsvgwidget.h") },
{ QLatin1String("QSwipeGesture"), QLatin1String("QtGui/qgesture.h") },
{ QLatin1String("QSyntaxHighlighter"), QLatin1String("QtGui/qsyntaxhighlighter.h") },
- { QLatin1String("QSysInfo"), QLatin1String("QtCore/qglobal.h") },
{ QLatin1String("QSystemSemaphore"), QLatin1String("QtCore/qsystemsemaphore.h") },
{ QLatin1String("QSystemTrayIcon"), QLatin1String("QtGui/qsystemtrayicon.h") },
{ QLatin1String("QTabBar"), QLatin1String("QtGui/qtabbar.h") },
void tst_QDataStream::floatingPointNaN()
{
- QDataStream::ByteOrder bo = QSysInfo::ByteOrder == QSysInfo::BigEndian
- ? QDataStream::LittleEndian
- : QDataStream::BigEndian;
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+ QDataStream::ByteOrder bo = QDataStream::LittleEndian;
+#else
+ QDataStream::ByteOrder bo = QDataStream::BigEndian;
+#endif
// Test and verify that values that become (s)nan's after swapping endianness
// don't change in the process.
{
double negativeZero( 0.0 ); // Initialise to zero.
uchar *ptr = (uchar *)&negativeZero;
- ptr[QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 7] = 0x80;
+#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+ ptr[0] = 0x80;
+#else
+ ptr[7] = 0x80;
+#endif
QString s = QString::number(negativeZero);
QCOMPARE(s, QString("0"));
}