From 06b78c5f24891fd38d25ed64f5029106eec7c4fb Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Wed, 16 May 2018 16:38:04 -0300 Subject: [PATCH 2/3] Fix breakages with qt5.11-rc2 On Qt5.11, there was a change at the way qPrintable() works. There, the var using it should be already a QString() type, not allowing implicit conversions. With that, some usages of qPrintable() are invalid for qt5.11, as the vars to be printed are either enums or integers. BUG: 393222 Signed-off-by: Mauro Carvalho Chehab --- src/backend-vlc/vlcmediawidget.cpp | 4 ++-- src/dvb/dvbdevice_linux.cpp | 2 +- src/dvb/dvbrecording.cpp | 2 +- src/sqlinterface.cpp | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/backend-vlc/vlcmediawidget.cpp b/src/backend-vlc/vlcmediawidget.cpp index 9be6263..60666d2 100644 --- a/src/backend-vlc/vlcmediawidget.cpp +++ b/src/backend-vlc/vlcmediawidget.cpp @@ -95,7 +95,7 @@ bool VlcMediaWidget::init() for (uint i = 0; i < (sizeof(eventTypes) / sizeof(eventTypes[0])); ++i) { if (libvlc_event_attach(eventManager, eventTypes[i], vlcEventHandler, this) != 0) { - qCCritical(logMediaWidget, "Cannot attach event handler %s", qPrintable(eventTypes[i])); + qCCritical(logMediaWidget, "Cannot attach event handler %d", eventTypes[i]); return false; } } @@ -328,7 +328,7 @@ void VlcMediaWidget::play(const MediaSource &source) for (uint i = 0; i < (sizeof(eventTypes) / sizeof(eventTypes[0])); ++i) { if (libvlc_event_attach(eventManager, eventTypes[i], vlcEventHandler, this) != 0) { - qCWarning(logMediaWidget, "Cannot attach event handler %s", qPrintable(eventTypes[i])); + qCWarning(logMediaWidget, "Cannot attach event handler %d", eventTypes[i]); } } diff --git a/src/dvb/dvbdevice_linux.cpp b/src/dvb/dvbdevice_linux.cpp index 1f6c4ad..aa7fd34 100644 --- a/src/dvb/dvbdevice_linux.cpp +++ b/src/dvb/dvbdevice_linux.cpp @@ -1245,7 +1245,7 @@ bool DvbLinuxDevice::getProps(DvbTransponder &transponder) qCWarning(logDev, "Invalid transmission type"); return false; default: - qCWarning(logDev, "Unknown transmission type %s", qPrintable(transponder.getTransmissionType())); + qCWarning(logDev, "Unknown transmission type %d", transponder.getTransmissionType()); return false; } return true; diff --git a/src/dvb/dvbrecording.cpp b/src/dvb/dvbrecording.cpp index 1018455..1f1bf07 100644 --- a/src/dvb/dvbrecording.cpp +++ b/src/dvb/dvbrecording.cpp @@ -473,7 +473,7 @@ DvbSharedRecording DvbRecordingModel::getLeastImportant(QListname), qPrintable(listRec->priority)); + qCDebug(logDvb, "name and priority %s %d", qPrintable(listRec->name), listRec->priority); if (listRec->priority < leastImportant->priority) { leastImportant = listRec; } diff --git a/src/sqlinterface.cpp b/src/sqlinterface.cpp index 8cc3bbd..d78d997 100644 --- a/src/sqlinterface.cpp +++ b/src/sqlinterface.cpp @@ -135,7 +135,7 @@ void SqlInterface::sqlInsert(SqlKey key) break; } - qCWarning(logSql, "Invalid pending statement '%s'", qPrintable(pendingStatement)); + qCWarning(logSql, "Invalid pending statement '%d'", pendingStatement); } void SqlInterface::sqlUpdate(SqlKey key) @@ -155,7 +155,7 @@ void SqlInterface::sqlUpdate(SqlKey key) break; } - qCWarning(logSql, "Invalid pending statement '%s'", qPrintable(pendingStatement)); + qCWarning(logSql, "Invalid pending statement '%d'", pendingStatement); } void SqlInterface::sqlRemove(SqlKey key) @@ -176,7 +176,7 @@ void SqlInterface::sqlRemove(SqlKey key) break; } - qCWarning(logSql, "Invalid pending statement %s", qPrintable(pendingStatement)); + qCWarning(logSql, "Invalid pending statement %d", pendingStatement); } void SqlInterface::requestSubmission() @@ -226,7 +226,7 @@ void SqlInterface::sqlSubmit() continue; } - qCWarning(logSql, "Invalid pending statement %s", qPrintable(pendingStatement)); + qCWarning(logSql, "Invalid pending statement %d", pendingStatement); } pendingStatements.clear(); -- 2.17.0