Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

const char * QByteArray::constData (  )  const [inline]

Returns a pointer to the data stored in the byte array. The pointer can be used to access the bytes that compose the array. The data is '\0'-terminated. The pointer remains valid as long as the byte array isn't reallocated.

This function is mostly useful to pass a byte array to a function that accepts a {const char *}.

Note: A QByteArray can store any byte values including '\0's, but most functions that take {char *} arguments assume that the data ends at the first '\0' they encounter.

See also:
data(), operator[]()

Definition at line 332 of file qbytearray.h.

Referenced by QCoreApplication::applicationFilePath(), TranslatorMessage::comment(), QObject::connect(), QAbstractSocket::connectToHost(), QAbstractSocket::connectToHostImplementation(), TranslatorMessage::context(), QEucKrCodec::convertFromUnicode(), QSjisCodec::convertFromUnicode(), QGb2312Codec::convertFromUnicode(), QEucJpCodec::convertFromUnicode(), QTsciiCodec::convertFromUnicode(), QGb18030Codec::convertFromUnicode(), QGbkCodec::convertFromUnicode(), QBitArray::count(), QFormBuilder::createWidget(), Q3ColorDrag::decode(), QPainter::drawText(), QSqlQuery::exec(), QFontDatabase::findFont(), QDropEvent::format(), QImage::fromData(), QHostInfo::fromName(), QUrl::fromPercentEncoding(), QUrl::fromPunycode(), QByteArrayMatcher::indexIn(), QNativeSocketEngine::initialize(), QMetaObject::invokeMethod(), QMetaEnum::keysToValue(), Q3CString::leftJustify(), QTcpServer::listen(), QPixmap::loadFromData(), QImage::loadFromData(), QHostInfo::lookupHost(), QFSFileEngine::open(), QBitArray::operator &=(), QString::operator!=(), operator!=(), operator<(), QString::operator<(), QTextStream::operator<<(), QString::operator<=(), operator<=(), QString::operator==(), operator==(), operator>(), QString::operator>(), QString::operator>=(), operator>=(), QBitArray::operator^=(), QBitArray::operator|=(), QBitArray::operator~(), QIODevice::peek(), QSqlQuery::prepare(), qCompress(), QLock::QLock(), qUncompress(), qvsnprintf(), Q3CString::replace(), replace(), Q3CString::rightJustify(), QPainter::setFont(), QColor::setNamedColor(), QByteArrayMatcher::setPattern(), QFont::setRawName(), QWidget::setWindowRole(), QBitArray::size(), TranslatorMessage::sourceText(), Q3CString::sprintf(), QBitArray::testBit(), toDouble(), Q3CString::toDouble(), Q3CString::toLong(), toLongLong(), QUrl::toPercentEncoding(), QString::toStdString(), Q3CString::toULong(), toULongLong(), QTextCodec::toUnicode(), QTextDecoder::toUnicode(), QString::toUtf8(), QIODevice::write(), and QUdpSocket::writeDatagram().

{ return d->data; }


Generated by  Doxygen 1.6.0   Back to index