Logging: use qCDebug/Warning/Info when for categorized logging
When building qt with QT_NO_DEBUG/WARNING/INFO_OUTPUT set, then the qDebug/Warning/Info macros expand to `QMessageLogger::noDebug`. That helper is not defined to take a logging category or category function, so using `qDebug(lcX, ...)` breaks the build. The correct way to emit categorized logging is to use the qCDebug/Warning/Info macros. Task-number: QTBUG-125589 Pick-to: 6.7 6.5 Change-Id: I968b0e826871a09023c11fec9e51caa5a2c4dc0b Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io> (cherry picked from commit 1e1c68017338c89265d6664a27f4137fc8960473) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
678dccb7ac
commit
d2730bc303
@ -2922,7 +2922,7 @@ void QCoreApplication::requestPermission(const QPermission &requestedPermission,
|
|||||||
Q_ASSERT(slotObj);
|
Q_ASSERT(slotObj);
|
||||||
|
|
||||||
if (QThread::currentThread() != QCoreApplicationPrivate::mainThread()) {
|
if (QThread::currentThread() != QCoreApplicationPrivate::mainThread()) {
|
||||||
qWarning(lcPermissions, "Permissions can only be requested from the GUI (main) thread");
|
qCWarning(lcPermissions, "Permissions can only be requested from the GUI (main) thread");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,7 +364,7 @@ inline void QLibraryStore::cleanup()
|
|||||||
if (lcDebugLibrary().isDebugEnabled()) {
|
if (lcDebugLibrary().isDebugEnabled()) {
|
||||||
for (auto &[_, lib] : data->libraryMap) {
|
for (auto &[_, lib] : data->libraryMap) {
|
||||||
if (lib)
|
if (lib)
|
||||||
qDebug(lcDebugLibrary)
|
qCDebug(lcDebugLibrary)
|
||||||
<< "On QtCore unload," << lib->fileName << "was leaked, with"
|
<< "On QtCore unload," << lib->fileName << "was leaked, with"
|
||||||
<< lib->libraryRefCount.loadRelaxed() << "users";
|
<< lib->libraryRefCount.loadRelaxed() << "users";
|
||||||
}
|
}
|
||||||
|
@ -732,7 +732,7 @@ static void initialDistanceFieldFactor()
|
|||||||
}
|
}
|
||||||
if (qEnvironmentVariableIsSet("QT_DISTANCEFIELD_DEFAULT_RADIUS")) {
|
if (qEnvironmentVariableIsSet("QT_DISTANCEFIELD_DEFAULT_RADIUS")) {
|
||||||
QT_DISTANCEFIELD_DEFAULT_RADIUS = qEnvironmentVariableIntValue("QT_DISTANCEFIELD_DEFAULT_RADIUS");
|
QT_DISTANCEFIELD_DEFAULT_RADIUS = qEnvironmentVariableIntValue("QT_DISTANCEFIELD_DEFAULT_RADIUS");
|
||||||
qDebug(lcDistanceField) << "set the QT_DISTANCEFIELD_DEFAULT_RADIUS:" << QT_DISTANCEFIELD_DEFAULT_RADIUS;
|
qCDebug(lcDistanceField) << "set the QT_DISTANCEFIELD_DEFAULT_RADIUS:" << QT_DISTANCEFIELD_DEFAULT_RADIUS;
|
||||||
}
|
}
|
||||||
if (qEnvironmentVariableIsSet("QT_DISTANCEFIELD_DEFAULT_HIGHGLYPHCOUNT")) {
|
if (qEnvironmentVariableIsSet("QT_DISTANCEFIELD_DEFAULT_HIGHGLYPHCOUNT")) {
|
||||||
QT_DISTANCEFIELD_DEFAULT_HIGHGLYPHCOUNT = qEnvironmentVariableIntValue("QT_DISTANCEFIELD_DEFAULT_HIGHGLYPHCOUNT");
|
QT_DISTANCEFIELD_DEFAULT_HIGHGLYPHCOUNT = qEnvironmentVariableIntValue("QT_DISTANCEFIELD_DEFAULT_HIGHGLYPHCOUNT");
|
||||||
|
@ -754,7 +754,7 @@ void QWindowsDirectWriteFontDatabase::populateFontDatabase()
|
|||||||
fontFamily->AddRef();
|
fontFamily->AddRef();
|
||||||
|
|
||||||
if (defaultLocaleName == defaultFontName && defaultFontName != systemDefaultFontName) {
|
if (defaultLocaleName == defaultFontName && defaultFontName != systemDefaultFontName) {
|
||||||
qDebug(lcQpaFonts) << "Adding default font" << systemDefaultFontName << "as alternative to" << defaultLocaleName;
|
qCDebug(lcQpaFonts) << "Adding default font" << systemDefaultFontName << "as alternative to" << defaultLocaleName;
|
||||||
|
|
||||||
m_populatedFonts.insert(systemDefaultFontName, *fontFamily);
|
m_populatedFonts.insert(systemDefaultFontName, *fontFamily);
|
||||||
fontFamily->AddRef();
|
fontFamily->AddRef();
|
||||||
@ -767,7 +767,7 @@ void QWindowsDirectWriteFontDatabase::populateFontDatabase()
|
|||||||
fontFamily->AddRef();
|
fontFamily->AddRef();
|
||||||
|
|
||||||
if (englishLocaleName == defaultFontName && defaultFontName != systemDefaultFontName) {
|
if (englishLocaleName == defaultFontName && defaultFontName != systemDefaultFontName) {
|
||||||
qDebug(lcQpaFonts) << "Adding default font" << systemDefaultFontName << "as alternative to" << englishLocaleName;
|
qCDebug(lcQpaFonts) << "Adding default font" << systemDefaultFontName << "as alternative to" << englishLocaleName;
|
||||||
|
|
||||||
m_populatedFonts.insert(systemDefaultFontName, *fontFamily);
|
m_populatedFonts.insert(systemDefaultFontName, *fontFamily);
|
||||||
fontFamily->AddRef();
|
fontFamily->AddRef();
|
||||||
|
@ -106,24 +106,24 @@ QTextureFileData QKtxHandler::read()
|
|||||||
|
|
||||||
const QByteArray buf = device()->readAll();
|
const QByteArray buf = device()->readAll();
|
||||||
if (static_cast<size_t>(buf.size()) > std::numeric_limits<quint32>::max()) {
|
if (static_cast<size_t>(buf.size()) > std::numeric_limits<quint32>::max()) {
|
||||||
qWarning(lcQtGuiTextureIO, "Too big KTX file %s", logName().constData());
|
qCWarning(lcQtGuiTextureIO, "Too big KTX file %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!canRead(QByteArray(), buf)) {
|
if (!canRead(QByteArray(), buf)) {
|
||||||
qWarning(lcQtGuiTextureIO, "Invalid KTX file %s", logName().constData());
|
qCWarning(lcQtGuiTextureIO, "Invalid KTX file %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf.size() < qsizetype(qktxh_headerSize)) {
|
if (buf.size() < qsizetype(qktxh_headerSize)) {
|
||||||
qWarning(lcQtGuiTextureIO, "Invalid KTX header size in %s", logName().constData());
|
qCWarning(lcQtGuiTextureIO, "Invalid KTX header size in %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
KTXHeader header;
|
KTXHeader header;
|
||||||
memcpy(&header, buf.data(), qktxh_headerSize);
|
memcpy(&header, buf.data(), qktxh_headerSize);
|
||||||
if (!checkHeader(header)) {
|
if (!checkHeader(header)) {
|
||||||
qWarning(lcQtGuiTextureIO, "Unsupported KTX file format in %s", logName().constData());
|
qCWarning(lcQtGuiTextureIO, "Unsupported KTX file format in %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,13 +141,13 @@ QTextureFileData QKtxHandler::read()
|
|||||||
const quint32 bytesOfKeyValueData = decode(header.bytesOfKeyValueData);
|
const quint32 bytesOfKeyValueData = decode(header.bytesOfKeyValueData);
|
||||||
quint32 headerKeyValueSize;
|
quint32 headerKeyValueSize;
|
||||||
if (qAddOverflow(qktxh_headerSize, bytesOfKeyValueData, &headerKeyValueSize)) {
|
if (qAddOverflow(qktxh_headerSize, bytesOfKeyValueData, &headerKeyValueSize)) {
|
||||||
qWarning(lcQtGuiTextureIO, "Overflow in size of key value data in header of KTX file %s",
|
qCWarning(lcQtGuiTextureIO, "Overflow in size of key value data in header of KTX file %s",
|
||||||
logName().constData());
|
logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (headerKeyValueSize >= quint32(buf.size())) {
|
if (headerKeyValueSize >= quint32(buf.size())) {
|
||||||
qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
|
qCWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,13 +155,13 @@ QTextureFileData QKtxHandler::read()
|
|||||||
if (bytesOfKeyValueData > 0) {
|
if (bytesOfKeyValueData > 0) {
|
||||||
auto keyValueDataView = safeView(buf, qktxh_headerSize, bytesOfKeyValueData);
|
auto keyValueDataView = safeView(buf, qktxh_headerSize, bytesOfKeyValueData);
|
||||||
if (keyValueDataView.isEmpty()) {
|
if (keyValueDataView.isEmpty()) {
|
||||||
qWarning(lcQtGuiTextureIO, "Invalid view in KTX file %s", logName().constData());
|
qCWarning(lcQtGuiTextureIO, "Invalid view in KTX file %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto keyValues = decodeKeyValues(keyValueDataView);
|
auto keyValues = decodeKeyValues(keyValueDataView);
|
||||||
if (!keyValues) {
|
if (!keyValues) {
|
||||||
qWarning(lcQtGuiTextureIO, "Could not parse key values in KTX file %s",
|
qCWarning(lcQtGuiTextureIO, "Could not parse key values in KTX file %s",
|
||||||
logName().constData());
|
logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
@ -177,12 +177,12 @@ QTextureFileData QKtxHandler::read()
|
|||||||
{ header.pixelWidth, header.pixelHeight, header.pixelDepth }));
|
{ header.pixelWidth, header.pixelHeight, header.pixelDepth }));
|
||||||
|
|
||||||
if (texData.numLevels() > maxLevels) {
|
if (texData.numLevels() > maxLevels) {
|
||||||
qWarning(lcQtGuiTextureIO, "Too many levels in KTX file %s", logName().constData());
|
qCWarning(lcQtGuiTextureIO, "Too many levels in KTX file %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (texData.numFaces() != 1 && texData.numFaces() != 6) {
|
if (texData.numFaces() != 1 && texData.numFaces() != 6) {
|
||||||
qWarning(lcQtGuiTextureIO, "Invalid number of faces in KTX file %s", logName().constData());
|
qCWarning(lcQtGuiTextureIO, "Invalid number of faces in KTX file %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ QTextureFileData QKtxHandler::read()
|
|||||||
for (int level = 0; level < texData.numLevels(); level++) {
|
for (int level = 0; level < texData.numLevels(); level++) {
|
||||||
const auto imageSizeView = safeView(buf, offset, sizeof(quint32));
|
const auto imageSizeView = safeView(buf, offset, sizeof(quint32));
|
||||||
if (imageSizeView.isEmpty()) {
|
if (imageSizeView.isEmpty()) {
|
||||||
qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
|
qCWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,13 +204,13 @@ QTextureFileData QKtxHandler::read()
|
|||||||
// Add image data and padding to offset
|
// Add image data and padding to offset
|
||||||
const auto padded = nearestMultipleOf4(imageSize);
|
const auto padded = nearestMultipleOf4(imageSize);
|
||||||
if (!padded) {
|
if (!padded) {
|
||||||
qWarning(lcQtGuiTextureIO, "Overflow in KTX file %s", logName().constData());
|
qCWarning(lcQtGuiTextureIO, "Overflow in KTX file %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
quint32 offsetNext;
|
quint32 offsetNext;
|
||||||
if (qAddOverflow(offset, *padded, &offsetNext)) {
|
if (qAddOverflow(offset, *padded, &offsetNext)) {
|
||||||
qWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
|
qCWarning(lcQtGuiTextureIO, "OOB request in KTX file %s", logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,7 +219,7 @@ QTextureFileData QKtxHandler::read()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!texData.isValid()) {
|
if (!texData.isValid()) {
|
||||||
qWarning(lcQtGuiTextureIO, "Invalid values in header of KTX file %s",
|
qCWarning(lcQtGuiTextureIO, "Invalid values in header of KTX file %s",
|
||||||
logName().constData());
|
logName().constData());
|
||||||
return QTextureFileData();
|
return QTextureFileData();
|
||||||
}
|
}
|
||||||
@ -273,7 +273,7 @@ std::optional<QMap<QByteArray, QByteArray>> QKtxHandler::decodeKeyValues(QByteAr
|
|||||||
while (offset < quint32(view.size())) {
|
while (offset < quint32(view.size())) {
|
||||||
const auto keyAndValueByteSizeView = safeView(view, offset, sizeof(quint32));
|
const auto keyAndValueByteSizeView = safeView(view, offset, sizeof(quint32));
|
||||||
if (keyAndValueByteSizeView.isEmpty()) {
|
if (keyAndValueByteSizeView.isEmpty()) {
|
||||||
qWarning(lcQtGuiTextureIO, "Invalid view in KTX key-value");
|
qCWarning(lcQtGuiTextureIO, "Invalid view in KTX key-value");
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -282,19 +282,19 @@ std::optional<QMap<QByteArray, QByteArray>> QKtxHandler::decodeKeyValues(QByteAr
|
|||||||
|
|
||||||
quint32 offsetKeyAndValueStart;
|
quint32 offsetKeyAndValueStart;
|
||||||
if (qAddOverflow(offset, quint32(sizeof(quint32)), &offsetKeyAndValueStart)) {
|
if (qAddOverflow(offset, quint32(sizeof(quint32)), &offsetKeyAndValueStart)) {
|
||||||
qWarning(lcQtGuiTextureIO, "Overflow in KTX key-value");
|
qCWarning(lcQtGuiTextureIO, "Overflow in KTX key-value");
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
quint32 offsetKeyAndValueEnd;
|
quint32 offsetKeyAndValueEnd;
|
||||||
if (qAddOverflow(offsetKeyAndValueStart, keyAndValueByteSize, &offsetKeyAndValueEnd)) {
|
if (qAddOverflow(offsetKeyAndValueStart, keyAndValueByteSize, &offsetKeyAndValueEnd)) {
|
||||||
qWarning(lcQtGuiTextureIO, "Overflow in KTX key-value");
|
qCWarning(lcQtGuiTextureIO, "Overflow in KTX key-value");
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto keyValueView = safeView(view, offsetKeyAndValueStart, keyAndValueByteSize);
|
const auto keyValueView = safeView(view, offsetKeyAndValueStart, keyAndValueByteSize);
|
||||||
if (keyValueView.isEmpty()) {
|
if (keyValueView.isEmpty()) {
|
||||||
qWarning(lcQtGuiTextureIO, "Invalid view in KTX key-value");
|
qCWarning(lcQtGuiTextureIO, "Invalid view in KTX key-value");
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,13 +304,13 @@ std::optional<QMap<QByteArray, QByteArray>> QKtxHandler::decodeKeyValues(QByteAr
|
|||||||
|
|
||||||
const int idx = keyValueView.indexOf('\0');
|
const int idx = keyValueView.indexOf('\0');
|
||||||
if (idx == -1) {
|
if (idx == -1) {
|
||||||
qWarning(lcQtGuiTextureIO, "Invalid key in KTX key-value");
|
qCWarning(lcQtGuiTextureIO, "Invalid key in KTX key-value");
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArrayView keyView = safeView(view, offsetKeyAndValueStart, idx);
|
const QByteArrayView keyView = safeView(view, offsetKeyAndValueStart, idx);
|
||||||
if (keyView.isEmpty()) {
|
if (keyView.isEmpty()) {
|
||||||
qWarning(lcQtGuiTextureIO, "Overflow in KTX key-value");
|
qCWarning(lcQtGuiTextureIO, "Overflow in KTX key-value");
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -318,19 +318,19 @@ std::optional<QMap<QByteArray, QByteArray>> QKtxHandler::decodeKeyValues(QByteAr
|
|||||||
|
|
||||||
quint32 offsetValueStart;
|
quint32 offsetValueStart;
|
||||||
if (qAddOverflow(offsetKeyAndValueStart, keySize, &offsetValueStart)) {
|
if (qAddOverflow(offsetKeyAndValueStart, keySize, &offsetValueStart)) {
|
||||||
qWarning(lcQtGuiTextureIO, "Overflow in KTX key-value");
|
qCWarning(lcQtGuiTextureIO, "Overflow in KTX key-value");
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
quint32 valueSize;
|
quint32 valueSize;
|
||||||
if (qSubOverflow(keyAndValueByteSize, keySize, &valueSize)) {
|
if (qSubOverflow(keyAndValueByteSize, keySize, &valueSize)) {
|
||||||
qWarning(lcQtGuiTextureIO, "Underflow in KTX key-value");
|
qCWarning(lcQtGuiTextureIO, "Underflow in KTX key-value");
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QByteArrayView valueView = safeView(view, offsetValueStart, valueSize);
|
const QByteArrayView valueView = safeView(view, offsetValueStart, valueSize);
|
||||||
if (valueView.isEmpty()) {
|
if (valueView.isEmpty()) {
|
||||||
qWarning(lcQtGuiTextureIO, "Invalid view in KTX key-value");
|
qCWarning(lcQtGuiTextureIO, "Invalid view in KTX key-value");
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,7 +338,7 @@ std::optional<QMap<QByteArray, QByteArray>> QKtxHandler::decodeKeyValues(QByteAr
|
|||||||
|
|
||||||
const auto offsetNext = nearestMultipleOf4(offsetKeyAndValueEnd);
|
const auto offsetNext = nearestMultipleOf4(offsetKeyAndValueEnd);
|
||||||
if (!offsetNext) {
|
if (!offsetNext) {
|
||||||
qWarning(lcQtGuiTextureIO, "Overflow in KTX key-value");
|
qCWarning(lcQtGuiTextureIO, "Overflow in KTX key-value");
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ void QBasicPlatformVulkanInstance::init(QLibrary *lib)
|
|||||||
m_supportedExtensions.append(ext);
|
m_supportedExtensions.append(ext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qDebug(lcPlatVk) << "Supported Vulkan instance extensions:" << m_supportedExtensions;
|
qCDebug(lcPlatVk) << "Supported Vulkan instance extensions:" << m_supportedExtensions;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVulkanInfoVector<QVulkanLayer> QBasicPlatformVulkanInstance::supportedLayers() const
|
QVulkanInfoVector<QVulkanLayer> QBasicPlatformVulkanInstance::supportedLayers() const
|
||||||
@ -248,13 +248,13 @@ void QBasicPlatformVulkanInstance::initInstance(QVulkanInstance *instance, const
|
|||||||
if (!m_supportedLayers.contains(layerName))
|
if (!m_supportedLayers.contains(layerName))
|
||||||
m_enabledLayers.removeAt(i--);
|
m_enabledLayers.removeAt(i--);
|
||||||
}
|
}
|
||||||
qDebug(lcPlatVk) << "Enabling Vulkan instance layers:" << m_enabledLayers;
|
qCDebug(lcPlatVk) << "Enabling Vulkan instance layers:" << m_enabledLayers;
|
||||||
for (int i = 0; i < m_enabledExtensions.size(); ++i) {
|
for (int i = 0; i < m_enabledExtensions.size(); ++i) {
|
||||||
const QByteArray &extName(m_enabledExtensions[i]);
|
const QByteArray &extName(m_enabledExtensions[i]);
|
||||||
if (!m_supportedExtensions.contains(extName))
|
if (!m_supportedExtensions.contains(extName))
|
||||||
m_enabledExtensions.removeAt(i--);
|
m_enabledExtensions.removeAt(i--);
|
||||||
}
|
}
|
||||||
qDebug(lcPlatVk) << "Enabling Vulkan instance extensions:" << m_enabledExtensions;
|
qCDebug(lcPlatVk) << "Enabling Vulkan instance extensions:" << m_enabledExtensions;
|
||||||
|
|
||||||
VkInstanceCreateInfo instInfo = {};
|
VkInstanceCreateInfo instInfo = {};
|
||||||
instInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
instInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||||
|
@ -378,7 +378,7 @@ QVulkanInfoVector<QVulkanExtension> QVulkanWindow::supportedDeviceExtensions()
|
|||||||
exts.append(ext);
|
exts.append(ext);
|
||||||
}
|
}
|
||||||
d->supportedDevExtensions.insert(physDev, exts);
|
d->supportedDevExtensions.insert(physDev, exts);
|
||||||
qDebug(lcGuiVk) << "Supported device extensions:" << exts;
|
qCDebug(lcGuiVk) << "Supported device extensions:" << exts;
|
||||||
return exts;
|
return exts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -229,20 +229,20 @@ bool QNetworkConnectionMonitor::startMonitoring()
|
|||||||
|
|
||||||
auto queue = qt_reachability_queue();
|
auto queue = qt_reachability_queue();
|
||||||
if (!queue) {
|
if (!queue) {
|
||||||
qWarning(lcNetMon, "Failed to create a dispatch queue to schedule a probe on");
|
qCWarning(lcNetMon, "Failed to create a dispatch queue to schedule a probe on");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SCNetworkReachabilityContext context = {};
|
SCNetworkReachabilityContext context = {};
|
||||||
context.info = d;
|
context.info = d;
|
||||||
if (!SCNetworkReachabilitySetCallback(d->probe, QNetworkConnectionMonitorPrivate::probeCallback, &context)) {
|
if (!SCNetworkReachabilitySetCallback(d->probe, QNetworkConnectionMonitorPrivate::probeCallback, &context)) {
|
||||||
qWarning(lcNetMon, "Failed to set a reachability callback");
|
qCWarning(lcNetMon, "Failed to set a reachability callback");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!SCNetworkReachabilitySetDispatchQueue(d->probe, queue)) {
|
if (!SCNetworkReachabilitySetDispatchQueue(d->probe, queue)) {
|
||||||
qWarning(lcNetMon, "Failed to schedule a reachability callback on a queue");
|
qCWarning(lcNetMon, "Failed to schedule a reachability callback on a queue");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QString &fileName)
|
|||||||
QJsonParseError err;
|
QJsonParseError err;
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(file.readAll(), &err);
|
QJsonDocument doc = QJsonDocument::fromJson(file.readAll(), &err);
|
||||||
if (err.error != QJsonParseError::NoError) {
|
if (err.error != QJsonParseError::NoError) {
|
||||||
qWarning(lcQGtk3Interface) << "Unable to parse Json document from" << fileName
|
qCWarning(lcQGtk3Interface) << "Unable to parse Json document from" << fileName
|
||||||
<< err.error << err.errorString();
|
<< err.error << err.errorString();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -417,7 +417,7 @@ bool QGtk3Json::load(QGtk3Storage::PaletteMap &map, const QJsonDocument &doc)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case QGtk3Storage::SourceType::Invalid:
|
case QGtk3Storage::SourceType::Invalid:
|
||||||
qInfo(lcQGtk3Interface) << "Invalid source type for palette" << paletteName
|
qCInfo(lcQGtk3Interface) << "Invalid source type for palette" << paletteName
|
||||||
<< "Brush." << colorRoleName;
|
<< "Brush." << colorRoleName;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -353,7 +353,7 @@ extern "C" long q_dgram_ctrl(BIO *bio, int cmd, long num, void *ptr)
|
|||||||
// command.
|
// command.
|
||||||
|
|
||||||
if (!bio) {
|
if (!bio) {
|
||||||
qDebug(lcTlsBackend, "invalid 'bio' parameter (nullptr)");
|
qCDebug(lcTlsBackend, "invalid 'bio' parameter (nullptr)");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ QVariant x509ExtensionToValue(X509_EXTENSION *ext)
|
|||||||
else if (meth->ext_free)
|
else if (meth->ext_free)
|
||||||
meth->ext_free(ext_internal);
|
meth->ext_free(ext_internal);
|
||||||
else
|
else
|
||||||
qWarning(lcTlsBackend, "Cannot free an extension, a potential memory leak?");
|
qCWarning(lcTlsBackend, "Cannot free an extension, a potential memory leak?");
|
||||||
});
|
});
|
||||||
|
|
||||||
const char * hexString = nullptr; // The value returned by meth->i2s.
|
const char * hexString = nullptr; // The value returned by meth->i2s.
|
||||||
|
@ -771,7 +771,7 @@ void tst_QHighDpi::mouseVelocity()
|
|||||||
{
|
{
|
||||||
velocity = ev->points().first().velocity();
|
velocity = ev->points().first().velocity();
|
||||||
if (ev->buttons())
|
if (ev->buttons())
|
||||||
qDebug(lcTests) << "velocity" << velocity << ev;
|
qCDebug(lcTests) << "velocity" << velocity << ev;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user