Qt 4.8
Macros | Functions | Variables
qsimplecodec.cpp File Reference
#include "qsimplecodec_p.h"
#include "qlist.h"

Go to the source code of this file.

Macros

#define LAST_MIB   2004
 

Functions

static QByteArraybuildReverseMap (int forwardIndex)
 

Variables

struct {
   const char *   aliases [7]
 
   int   mib
 
   const char *   mime
 
   quint16   values [128]
 
unicodevalues [QSimpleTextCodec::numSimpleCodecs]
 

Macro Definition Documentation

◆ LAST_MIB

#define LAST_MIB   2004

Definition at line 49 of file qsimplecodec.cpp.

Function Documentation

◆ buildReverseMap()

static QByteArray* buildReverseMap ( int  forwardIndex)
static

Definition at line 628 of file qsimplecodec.cpp.

Referenced by QSimpleTextCodec::convertFromUnicode().

629 {
630  QByteArray *map = new QByteArray();
631  int m = 0;
632  int i = 0;
633  while(i < 128) {
634  if (unicodevalues[forwardIndex].values[i] > m &&
635  unicodevalues[forwardIndex].values[i] < 0xfffd)
636  m = unicodevalues[forwardIndex].values[i];
637  i++;
638  }
639  m++;
640  map->resize(m);
641  for(i = 0; i < 128 && i < m; i++)
642  (*map)[i] = (char)i;
643  for(;i < m; i++)
644  (*map)[i] = 0;
645  for(i=128; i<256; i++) {
646  int u = unicodevalues[forwardIndex].values[i-128];
647  if (u < m)
648  (*map)[u] = (char)(unsigned char)(i);
649  }
650  return map;
651 }
static const struct @2 unicodevalues[QSimpleTextCodec::numSimpleCodecs]
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
quint16 u
QFuture< void > map(Sequence &sequence, MapFunction function)
quint16 values[128]
void resize(int size)
Sets the size of the byte array to size bytes.

Variable Documentation

◆ aliases

const char* aliases[7]

◆ mib

int mib

◆ mime

const char* mime

◆ unicodevalues

const { ... } numSimpleCodecs]

◆ values

quint16 values[128]

Definition at line 55 of file qsimplecodec.cpp.

Referenced by QUrl::allEncodedQueryItemValues(), QUrl::allQueryItemValues(), QVGCompositionHelper::blitWindow(), QSqlQuery::boundValues(), buildReverseMap(), QDeclarativeEnginePrivate::SimpleList< T >::clear(), QVGPaintEngine::clearRect(), QSqlResultPrivate::clearValues(), QTreeWidgetItem::columnCount(), QDeclarativeGestureAreaParser::compile(), QDeclarativeConnectionsParser::compile(), QDeclarativePropertyChangesParser::compileList(), QDeclarativeListModelParser::compileProperty(), QMacPasteboardMimeTiff::convertFromMime(), NestedListModel::data(), QVGPixmapConvolutionFilter::draw(), QVGPaintEngine::drawPixmapFragments(), QColorWell::dropEvent(), QIBaseResult::exec(), QDB2Result::exec(), QSQLiteResult::exec(), QSymSQLResult::exec(), QODBCResult::exec(), QSqlResult::execBatch(), QVGCompositionHelper::fillBackground(), QVGPaintEngine::fillRegion(), QDeclarativeListModel::flatten(), QFontEngineMac::getUnscaledGlyph(), QVGPaintEnginePrivate::initObjects(), QComboBox::insertItem(), QSqlRelationalTableModel::insertRowIntoTable(), QSqlTableModel::insertRowIntoTable(), QHash< QExplicitlySharedDataPointer, QHash >::isSharedWith(), QTreeModel::itemData(), QStandardItemPrivate::itemData(), kdeColor(), QXcbWindow::lower(), macDayName(), macMonthName(), macValue(), ModelNode::model(), QColorWell::mouseMoveEvent(), QDeclarativePath::AttributePoint::operator=(), QColorWell::paintCellContents(), parseAnimateTransformNode(), QPatternist::XsdSchemaParser::parseAny(), QPatternist::XsdSchemaParser::parseAnyAttribute(), QAuthenticatorPrivate::parseHttpResponse(), QGtkStyle::pixelMetric(), QDeclarativeGlobalScriptClass::QDeclarativeGlobalScriptClass(), qExtractSecurityPolicyFromString(), QFontEngineMac::QFontEngineMac(), QFontEngineMacMulti::QFontEngineMacMulti(), qGenericMatrixFromMatrix4x4(), QMatrix4x4::QMatrix4x4(), qmlsqldatabase_executeSql(), QSqlTableModelPrivate::QSqlTableModelPrivate(), qt_init(), qtValue(), QXcbScreen::QXcbScreen(), QXcbWindow::QXcbWindow(), QXcbWindow::raise(), QPatternist::XsdSchemaParser::readBlockingConstraintAttribute(), QPatternist::XsdSchemaParser::readDerivationConstraintAttribute(), QConfFileSettingsPrivate::readPlistFile(), Maemo::ProxyConfPrivate::readProxyData(), QPatternist::XsdSchemaResolver::resolveEnumerationFacetValues(), QGLShaderProgram::setAttributeValue(), QVGPaintEnginePrivate::setBrush(), QXcbWindow::setGeometry(), QVGPaintEnginePrivate::setImageOptions(), QMap< int, QFrameInfo >::setInsertInOrder(), QStandardItemPrivate::setItemData(), QXcbWindow::setWindowFlags(), QFileSystemModelPrivate::sortChildren(), QFontEngineMacMulti::stringToCMapInternal(), QMatrix4x4::toGenericMatrix(), QSqlRelationalTableModel::updateRowInTable(), QPatternist::XsdTypeChecker::valuesAreEqual(), QMYSQLResult::virtual_hook(), QScriptDeclarativeClass::Object::~Object(), and QDeclarativeImportsPrivate::~QDeclarativeImportsPrivate().