Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qbytearray.h File Reference

(21dfb0ebcc6b3a3408a8272ce536a1e4d53910cd)

#include <QtCore/qrefcount.h>
#include <QtCore/qnamespace.h>
#include <QtCore/qarraydata.h>
#include <QtCore/qarraydatapointer.h>
#include <QtCore/qcompare.h>
#include <QtCore/qcontainerfwd.h>
#include <QtCore/qbytearrayalgorithms.h>
#include <QtCore/qbytearrayview.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <iterator>
+ Include dependency graph for qbytearray.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QByteArray
 \inmodule QtCore More...
 
class  QByteArray::FromBase64Result
 \inmodule QtCore More...
 

Namespaces

namespace  Qt
 
namespace  Qt::Literals
 
namespace  Qt::Literals::StringLiterals
 
namespace  QtLiterals
 

Macros

#define QT5_NULL_STRINGS   1
 
#define QByteArrayLiteral(str)    (QByteArray(QByteArrayData(nullptr, const_cast<char *>(str), sizeof(str) - 1))) \
 

Typedefs

using QByteArrayData = QArrayDataPointer<char>
 

Functions

QByteArray operator+ (const QByteArray &a1, const QByteArray &a2)
 
QByteArray operator+ (QByteArray &&lhs, const QByteArray &rhs)
 
QByteArray operator+ (const QByteArray &a1, const char *a2)
 
QByteArray operator+ (QByteArray &&lhs, const char *rhs)
 
QByteArray operator+ (const QByteArray &a1, char a2)
 
QByteArray operator+ (QByteArray &&lhs, char rhs)
 
QByteArray operator+ (const char *a1, const QByteArray &a2)
 
QByteArray operator+ (char a1, const QByteArray &a2)
 
Q_CORE_EXPORT QDataStreamoperator<< (QDataStream &, const QByteArray &)
 
Q_CORE_EXPORT QDataStreamoperator>> (QDataStream &, QByteArray &)
 
Q_CORE_EXPORT QByteArray qCompress (const uchar *data, qsizetype nbytes, int compressionLevel=-1)
 
Q_CORE_EXPORT QByteArray qUncompress (const uchar *data, qsizetype nbytes)
 
QByteArray qCompress (const QByteArray &data, int compressionLevel=-1)
 
QByteArray qUncompress (const QByteArray &data)
 
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION size_t qHash (const QByteArray::FromBase64Result &key, size_t seed=0) noexcept
 
template<typename T >
qsizetype erase (QByteArray &ba, const T &t)
 
template<typename Predicate >
qsizetype erase_if (QByteArray &ba, Predicate pred)
 
QByteArray Qt::Literals::StringLiterals::operator""_ba (const char *str, size_t size) noexcept
 

Macro Definition Documentation

◆ QByteArrayLiteral

#define QByteArrayLiteral ( str)     (QByteArray(QByteArrayData(nullptr, const_cast<char *>(str), sizeof(str) - 1))) \

Definition at line 52 of file qbytearray.h.

Referenced by QT_BEGIN_NAMESPACE::DeviceIntegration::DeviceIntegration(), GeoCodingManagerEngineEsri::GeoCodingManagerEngineEsri(), GeoRoutingManagerEngineEsri::GeoRoutingManagerEngineEsri(), QSSGRhiContextStats::PerLayerInfo::PerLayerInfo(), QBsdKeyboardHandler::QBsdKeyboardHandler(), QBsdMouseHandler::QBsdMouseHandler(), QDeclarativeGeoMap::QDeclarativeGeoMap(), QGeoCodingManagerEngineMapbox::QGeoCodingManagerEngineMapbox(), QGraphicsFrameCaptureMetal::QGraphicsFrameCaptureMetal(), QOpenGLTextureHelper::QOpenGLTextureHelper(), QQnxButtonEventNotifier::QQnxButtonEventNotifier(), QTextureFileHandler::QTextureFileHandler(), Python::WriteImports::acceptUI(), addEndCond(), QSSGRenderReflectionMap::addReflectionMapEntry(), QSSGStageGeneratorBase::addShaderItemMap(), QSSGStageGeneratorBase::addShaderPass2Marker(), QSSGStageGeneratorBase::addShaderUniformMap(), QSSGRenderShadowMap::addShadowMapEntry(), QSGRhiSupport::applySwapChainFormat(), QX11Info::appRootWindow(), QX11Info::appScreen(), QLocalePrivate::bcp47Name(), QOpenGL2PaintEngineEx::beginNativePainting(), QSSGMaterialVertexPipeline::beginVertexGeneration(), buildDevicePath(), QSSGStageGeneratorBase::buildShaderSourcePass1(), QSSGStageGeneratorBase::buildShaderSourcePass2(), QTestPrivate::canHandleUnicodeFileNames(), QDDSHandler::canRead(), QICNSHandler::canRead(), QWebpHandler::canRead(), QDDSHandler::canRead(), QICNSHandler::canRead(), QJp2Handler::canRead(), QDDSPlugin::capabilities(), QICNSPlugin::capabilities(), QTlsPrivate::TlsCryptographOpenSSL::continueHandshake(), copyrightHeaderEnd(), copyrightHeaderStart(), QOpenGLTimerQueryPrivate::create(), QOpenGLTimeMonitorPrivate::create(), QOpenGLVertexArrayObjectPrivate::create(), QSGRhiShaderEffectDefaultShader::create(), QRhiGles2::create(), QRhiVulkan::create(), QXcbSystemTrayTracker::create(), createOidMap(), QAndroidPlatformVulkanInstance::createOrAdoptInstance(), QCocoaVulkanInstance::createOrAdoptInstance(), QVkKhrDisplayVulkanInstance::createOrAdoptInstance(), QWindowsVulkanInstance::createOrAdoptInstance(), QXcbVulkanInstance::createOrAdoptInstance(), QtWaylandClient::QWaylandVulkanInstance::createOrAdoptInstance(), VDMListDelegateDataType::createProperty(), createRhiRenderTarget(), createRhiRenderTargetMultiView(), createRhiRenderTargetWithDepthTexture(), createRhiRenderTargetWithRenderBuffer(), QKmsDevice::createScreenForConnector(), QPlatformPrintDevice::defaultInputSlot(), QPlatformPrintDevice::defaultOutputBin(), QGenericUnixServices::desktopEnvironment(), QOpenGLDebugLogger::disableMessages(), QOpenGLDebugLogger::disableMessages(), QRhiNull::driverInfo(), QObject::dumpObjectInfo(), QOpenGLDebugLogger::enableMessages(), QOpenGLDebugLogger::enableMessages(), QEglFSDeviceIntegration::fbDeviceName(), QSGRhiShaderLinker::feedConstants(), QDeclarativeGeoMapItemTransitionManager::finalizeEnterTransition(), QDeclarativeGeoMapItemTransitionManager::finalizeExitTransition(), QApplication::font(), formatConnectionSignature(), generateFragmentShader(), QSSGShaderLibraryManager::getIncludeContents(), QSSGBuiltInRhiShaderCache::getRhiCubemapShadowBlurXShader(), QSSGBuiltInRhiShaderCache::getRhiCubemapShadowBlurYShader(), QSSGBuiltInRhiShaderCache::getRhiDebugObjectShader(), QSSGBuiltInRhiShaderCache::getRhiEnvironmentmapShader(), QSSGBuiltInRhiShaderCache::getRhiGridShader(), getRhiImplementation(), QSSGBuiltInRhiShaderCache::getRhiLightmapDilateShader(), QSSGBuiltInRhiShaderCache::getRhiLightmapUVRasterizationShader(), QSSGBuiltInRhiShaderCache::getRhiOrthographicShadowBlurXShader(), QSSGBuiltInRhiShaderCache::getRhiOrthographicShadowBlurYShader(), QSSGBuiltInRhiShaderCache::getRhiParticleShader(), QSSGBuiltInRhiShaderCache::getRhiProgressiveAAShader(), QSSGBuiltInRhiShaderCache::getRhiReflectionprobePreFilterShader(), QSSGBuiltInRhiShaderCache::getRhiSimpleQuadShader(), QSSGBuiltInRhiShaderCache::getRhiSkyBoxCubeShader(), QSSGBuiltInRhiShaderCache::getRhiSsaoShader(), QSSGBuiltInRhiShaderCache::getRhiSupersampleResolveShader(), QSSGRenderShaderMetadata::getShaderMetaData(), handleDirectionalLight(), handlePointLight(), handleSpecularLight(), handleSpotLight(), QOpenGLTexture::hasFeature(), QWindowsVistaStylePrivate::hdcForWidgetBackingStore(), includeSearch(), QWindowsOpengl32DLL::init(), QOpenGLDebugLogger::initialize(), VDMAbstractItemModelDataType::initializeMetaType(), QApplicationPrivate::initializeWidgetFontHash(), insertProcessorArgs(), insertVertexMainArgs(), QGeoFileTileCache::isTileBogus(), isWindowMetaObject(), joinEnumValues(), locateSystemTray(), logPrefix(), QOpenGLContext::makeCurrent(), msgConnect(), msgCouldNotResolveProperty(), msgProblemParsing(), QSSGShaderUtils::ShaderType< QMetaType::Double >::name(), QSSGShaderUtils::ShaderType< QMetaType::Bool >::name(), QSSGShaderUtils::ShaderType< QMetaType::Int >::name(), QSSGShaderUtils::ShaderType< QMetaType::QVector2D >::name(), QSSGShaderUtils::ShaderType< QMetaType::QVector3D >::name(), QSSGShaderUtils::ShaderType< QMetaType::QVector4D >::name(), QSSGShaderUtils::ShaderType< QMetaType::QColor >::name(), QSSGShaderUtils::ShaderType< QMetaType::QSize >::name(), QSSGShaderUtils::ShaderType< QMetaType::QSizeF >::name(), QSSGShaderUtils::ShaderType< QMetaType::QPoint >::name(), QSSGShaderUtils::ShaderType< QMetaType::QPointF >::name(), QSSGShaderUtils::ShaderType< QMetaType::QRect >::name(), QSSGShaderUtils::ShaderType< QMetaType::QRectF >::name(), QSSGShaderUtils::ShaderType< QMetaType::QQuaternion >::name(), QSSGShaderUtils::ShaderType< QMetaType::QMatrix4x4 >::name(), QLocaleId::name(), nameForCompressedIcon(), QWindowsNativeInterface::nativeResourceForCursor(), QXcbNativeInterface::nativeResourceForCursor(), QEglFSKmsIntegration::nativeResourceForIntegration(), QEglFSKmsIntegration::nativeResourceForScreen(), QOffscreenX11PlatformNativeInterface::nativeResourceForScreen(), parseHtmlMetaForEncoding(), parseIconEntryData(), QPlatformOpenGLContext::parseOpenGLVersion(), QTlsPrivate::TlsKey::pemFooter(), QTlsPrivate::TlsKey::pemHeader(), QTlsPrivate::TlsKeyBase::pkcs8Footer(), QTlsPrivate::TlsKeyBase::pkcs8Header(), prefixMessage(), QSGMaterialShaderPrivate::prepare(), QSSGShaderCustomMaterialAdapter::prepareCustomShader(), QSSGDebugDrawSystem::prepareGeometry(), QEventDispatcherWin32::processEvents(), QTest::qRun(), qSaveQmlJSUnitAsCpp(), qt_macWindowMainWindow(), QQC2_NAMESPACE::qt_macWindowMainWindow(), QSSGRhiCubeRenderer::recordRenderCube(), QSGBatchRenderer::Renderer::recordRenderPass(), QSSGRhiQuadRenderer::recordRenderQuad(), QSSGProgramGenerator::registerShaderMetaDataFromSource(), QSSGRhiContextStats::rendererDebugEnabled(), ShadowMapPass::renderPass(), ReflectionMapPass::renderPass(), ZPrePassPass::renderPass(), SSAOMapPass::renderPass(), DepthMapPass::renderPass(), SkyboxPass::renderPass(), SkyboxCubeMapPass::renderPass(), ScreenMapPass::renderPass(), ScreenReflectionPass::renderPass(), OpaquePass::renderPass(), TransparentPass::renderPass(), Item2DPass::renderPass(), InfiniteGridPass::renderPass(), DebugDrawPass::renderPass(), ZPrePassPass::renderPrep(), QQuick3DSceneRenderer::renderToRhiTexture(), QSSGShaderLibraryManager::resolveIncludeFiles(), TileProvider::resolveProvider(), QSSGShaderCache::resourceFolder(), resourceType(), resourceType(), resourceType(), resourceType(), resourceType(), RenderHelpers::rhiPrepareAoTexture(), RenderHelpers::rhiPrepareDepthTexture(), RenderHelpers::rhiPrepareGrid(), RenderHelpers::rhiPrepareScreenTexture(), RenderHelpers::rhiPrepareSkyBox(), RenderHelpers::rhiPrepareSkyBoxForReflectionMap(), RenderHelpers::rhiRenderShadowMap(), QFileSystemModel::roleNames(), QSqlQueryModel::roleNames(), QQuickCalendarModel::roleNames(), QQuickDayOfWeekModel::roleNames(), QQuickMonthModel::roleNames(), QQuickWeekNumberModel::roleNames(), runMoc(), QQuickItem::setContainmentMask(), QWaylandTextInputV3Private::setFocus(), setMaterialProperties(), QJp2Handler::setOption(), setStreamURL(), setupShadowMapVariableNames(), QSSGShaderCache::shaderCollectionFile(), QSvgHandler::startElement(), QTextureFileReader::supportedFileFormats(), QQuick3DSceneRenderer::synchronize(), QSGRhiShaderEffectNode::syncMaterial(), QOpenGLTextureUploader::textureImage(), QRhiGles2::tryLoadFromDiskOrPipelineCache(), QQuick3DCustomMaterial::updateSpatialNode(), QQuick3DEffect::updateSpatialNode(), QTimeZonePrivate::utcQByteArray(), TestHTTPServer::wait(), QXcbScreen::windowShown(), wrapInFunction(), src_gui_opengl_qopengldebug::SnippetWrapper::wrapper1(), QPNGImageWriter::writeImage(), and QWaylandTextInputV3Private::zwp_text_input_v3_disable().

◆ QT5_NULL_STRINGS

#define QT5_NULL_STRINGS   1

Definition at line 25 of file qbytearray.h.

Typedef Documentation

◆ QByteArrayData

Definition at line 50 of file qbytearray.h.

Function Documentation

◆ erase()

template<typename T >
qsizetype erase ( QByteArray & ba,
const T & t )
related

◆ erase_if()

template<typename Predicate >
qsizetype erase_if ( QByteArray & ba,
Predicate pred )
related

Definition at line 788 of file qbytearray.h.

Referenced by QAndroidFormatInfo::QAndroidFormatInfo(), QBluetoothServiceDiscoveryAgentPrivate::_q_deviceDiscovered(), QQuick3DPhysicsHeightFieldManager::releaseHeightField(), QLibraryStore::releaseLibrary(), and QQuick3DPhysicsMeshManager::releaseMesh().

+ Here is the caller graph for this function:

◆ operator+() [1/8]

QByteArray operator+ ( char a1,
const QByteArray & a2 )
related

Definition at line 684 of file qbytearray.h.

◆ operator+() [2/8]

QByteArray operator+ ( const char * a1,
const QByteArray & a2 )
related

Definition at line 682 of file qbytearray.h.

◆ operator+() [3/8]

QByteArray operator+ ( const QByteArray & a1,
char a2 )
related

Definition at line 678 of file qbytearray.h.

◆ operator+() [4/8]

QByteArray operator+ ( const QByteArray & a1,
const char * a2 )
related

Definition at line 674 of file qbytearray.h.

◆ operator+() [5/8]

QByteArray operator+ ( const QByteArray & a1,
const QByteArray & a2 )
related

Definition at line 670 of file qbytearray.h.

◆ operator+() [6/8]

QByteArray operator+ ( QByteArray && lhs,
char rhs )
inline

Definition at line 680 of file qbytearray.h.

◆ operator+() [7/8]

QByteArray operator+ ( QByteArray && lhs,
const char * rhs )
inline

Definition at line 676 of file qbytearray.h.

◆ operator+() [8/8]

QByteArray operator+ ( QByteArray && lhs,
const QByteArray & rhs )
inline

Definition at line 672 of file qbytearray.h.

◆ operator<<()

Q_CORE_EXPORT QDataStream & operator<< ( QDataStream & ,
const QByteArray &  )
related

◆ operator>>()

Q_CORE_EXPORT QDataStream & operator>> ( QDataStream & ,
QByteArray &  )
related

◆ qCompress() [1/2]

QByteArray qCompress ( const QByteArray & data,
int compressionLevel = -1 )
related

Definition at line 728 of file qbytearray.h.

◆ qCompress() [2/2]

Q_CORE_EXPORT QByteArray qCompress ( const uchar * data,
qsizetype nbytes,
int compressionLevel = -1 )
related

Definition at line 671 of file qbytearray.cpp.

Referenced by QByteArray::qCompress(), QSvgIconEngine::read(), QShader::serialized(), QSvgIconEngine::write(), QCacheItem::writeCompressedData(), and RCCFileInfo::writeDataBlob().

+ Here is the caller graph for this function:

◆ qHash()

Q_CORE_EXPORT Q_DECL_PURE_FUNCTION size_t qHash ( const QByteArray::FromBase64Result & key,
size_t seed = 0 )
related

◆ qUncompress() [1/2]

QByteArray qUncompress ( const QByteArray & data)
related

Definition at line 730 of file qbytearray.h.

◆ qUncompress() [2/2]

Q_CORE_EXPORT QByteArray qUncompress ( const uchar * data,
qsizetype nbytes )
related

Referenced by QShader::fromSerialized(), maybeUncompress(), QByteArray::qUncompress(), QSvgIconEngine::read(), and QCacheItem::read().

+ Here is the caller graph for this function: