diff --git a/src/skin/legacy/legacyskinparser.cpp b/src/skin/legacy/legacyskinparser.cpp index 7f41d448bbd4..49753cffcce8 100644 --- a/src/skin/legacy/legacyskinparser.cpp +++ b/src/skin/legacy/legacyskinparser.cpp @@ -356,9 +356,10 @@ QWidget* LegacySkinParser::parseSkin(const QString& skinPath, QWidget* pParent) bool ok = false; double value = QString::fromStdString(attribute.value()).toDouble(&ok); if (!ok) { - SKIN_WARNING(skinDocument, *m_pContext) - << "Error reading double value from skin attribute: " - << QString::fromStdString(attribute.value()); + SKIN_WARNING(skinDocument, + *m_pContext, + QStringLiteral("Error reading double value from skin attribute: %1") + .arg(QString::fromStdString(attribute.value()))); continue; } @@ -411,10 +412,12 @@ QWidget* LegacySkinParser::parseSkin(const QString& skinPath, QWidget* pParent) QList widgets = parseNode(skinDocument); if (widgets.empty()) { - SKIN_WARNING(skinDocument, *m_pContext) << "Skin produced no widgets!"; + SKIN_WARNING(skinDocument, *m_pContext, QStringLiteral("Skin produced no widgets!")); return nullptr; } else if (widgets.size() > 1) { - SKIN_WARNING(skinDocument, *m_pContext) << "Skin produced more than 1 widget!"; + SKIN_WARNING(skinDocument, + *m_pContext, + QStringLiteral("Skin produced more than 1 widget!")); } return widgets[0]; } @@ -619,8 +622,10 @@ QList LegacySkinParser::parseNode(const QDomElement& node) { } else if (nodeName == "SingletonContainer") { result = wrapWidget(parseStandardWidget(node)); } else { - SKIN_WARNING(node, *m_pContext) << "Invalid node name in skin:" - << nodeName; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("Invalid node name in skin: %1") + .arg(nodeName)); } if (sDebug) { @@ -673,14 +678,19 @@ QWidget* LegacySkinParser::parseScrollable(const QDomElement& node) { if (!childrenNode.isNull()) { QDomNodeList childNodes = childrenNode.childNodes(); if (childNodes.count() != 1) { - SKIN_WARNING(node, *m_pContext) << "Scrollables must have exactly one child"; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("Scrollables must have exactly one child")); } QDomNode childnode = childNodes.at(0); if (childnode.isElement()) { QList children = parseNode(childnode.toElement()); if (children.count() != 1) { - SKIN_WARNING(node, *m_pContext) << "Scrollables must have exactly one child"; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral( + "Scrollables must have exactly one child")); } else if (children.at(0) != nullptr) { pScrollable->setWidget(children.at(0)); } @@ -781,15 +791,19 @@ QWidget* LegacySkinParser::parseWidgetStack(const QDomElement& node) { QList child_widgets = parseNode(element); if (child_widgets.empty()) { - SKIN_WARNING(node, *m_pContext) - << "WidgetStack child produced no widget."; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral( + "WidgetStack child produced no widget.")); continue; } if (child_widgets.size() > 1) { - SKIN_WARNING(node, *m_pContext) - << "WidgetStack child produced multiple widgets." - << "All but the first are ignored."; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral( + "WidgetStack child produced multiple widgets. " + "All but the first are ignored.")); } QWidget* pChild = child_widgets[0]; @@ -849,15 +863,19 @@ QWidget* LegacySkinParser::parseSizeAwareStack(const QDomElement& node) { QList children = parseNode(element); if (children.empty()) { - SKIN_WARNING(node, *m_pContext) - << "SizeAwareStack child produced no widget."; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral( + "SizeAwareStack child produced no widget.")); continue; } if (children.size() > 1) { - SKIN_WARNING(node, *m_pContext) - << "SizeAwareStack child produced multiple widgets." - << "All but the first are ignored."; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral( + "SizeAwareStack child produced multiple " + "widgets. All but the first are ignored.")); } QWidget* pChild = children[0]; @@ -958,7 +976,7 @@ QWidget* LegacySkinParser::parseOverview(const QDomElement& node) { QString group = lookupNodeGroup(node); BaseTrackPlayer* pPlayer = m_pPlayerManager->getPlayer(group); if (!pPlayer) { - SKIN_WARNING(node, *m_pContext) << "No player found for group:" << group; + SKIN_WARNING(node, *m_pContext, QStringLiteral("No player found for group: %1").arg(group)); return nullptr; } @@ -1004,7 +1022,7 @@ QWidget* LegacySkinParser::parseVisual(const QDomElement& node) { QString group = lookupNodeGroup(node); BaseTrackPlayer* pPlayer = m_pPlayerManager->getPlayer(group); if (!pPlayer) { - SKIN_WARNING(node, *m_pContext) << "No player found for group:" << group; + SKIN_WARNING(node, *m_pContext, QStringLiteral("No player found for group: %1").arg(group)); return nullptr; } @@ -1049,7 +1067,7 @@ QWidget* LegacySkinParser::parseText(const QDomElement& node) { QString group = lookupNodeGroup(node); BaseTrackPlayer* pPlayer = m_pPlayerManager->getPlayer(group); if (!pPlayer) { - SKIN_WARNING(node, *m_pContext) << "No player found for group:" << group; + SKIN_WARNING(node, *m_pContext, QStringLiteral("No player found for group:").arg(group)); return nullptr; } @@ -1079,7 +1097,7 @@ QWidget* LegacySkinParser::parseTrackProperty(const QDomElement& node) { QString group = lookupNodeGroup(node); BaseTrackPlayer* pPlayer = m_pPlayerManager->getPlayer(group); if (!pPlayer) { - SKIN_WARNING(node, *m_pContext) << "No player found for group:" << group; + SKIN_WARNING(node, *m_pContext, QStringLiteral("No player found for group: %1").arg(group)); return nullptr; } @@ -1119,7 +1137,7 @@ QWidget* LegacySkinParser::parseTrackWidgetGroup(const QDomElement& node) { QString group = lookupNodeGroup(node); BaseTrackPlayer* pPlayer = m_pPlayerManager->getPlayer(group); if (!pPlayer) { - SKIN_WARNING(node, *m_pContext) << "No player found for group:" << group; + SKIN_WARNING(node, *m_pContext, QStringLiteral("No player found for group: %1").arg(group)); return nullptr; } @@ -1161,7 +1179,7 @@ QWidget* LegacySkinParser::parseStarRating(const QDomElement& node) { QString group = lookupNodeGroup(node); BaseTrackPlayer* pPlayer = m_pPlayerManager->getPlayer(group); if (!pPlayer) { - SKIN_WARNING(node, *m_pContext) << "No player found for group:" << group; + SKIN_WARNING(node, *m_pContext, QStringLiteral("No player found for group: %1").arg(group)); return nullptr; } @@ -1298,7 +1316,7 @@ QWidget* LegacySkinParser::parseSpinny(const QDomElement& node) { QString group = lookupNodeGroup(node); BaseTrackPlayer* pPlayer = m_pPlayerManager->getPlayer(group); if (!pPlayer) { - SKIN_WARNING(node, *m_pContext) << "No player found for group:" << group; + SKIN_WARNING(node, *m_pContext, QStringLiteral("No player found for group: %1").arg(group)); return nullptr; } // Note: For some reasons on X11 we need to create the widget without a parent to avoid to @@ -1443,7 +1461,9 @@ QWidget* LegacySkinParser::parseCoverArt(const QDomElement& node) { if (!group.isEmpty()) { pPlayer = m_pPlayerManager->getPlayer(group); if (!pPlayer) { - SKIN_WARNING(node, *m_pContext) << "No player found for group:" << group; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("No player found for group: %1").arg(group)); return nullptr; } } @@ -1472,14 +1492,17 @@ QWidget* LegacySkinParser::parseCoverArt(const QDomElement& node) { void LegacySkinParser::parseSingletonDefinition(const QDomElement& node) { QString objectName = m_pContext->selectString(node, "ObjectName"); if (objectName.isEmpty()) { - SKIN_WARNING(node, *m_pContext) - << "SingletonDefinition requires an ObjectName"; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("SingletonDefinition requires an ObjectName")); } QDomNode childrenNode = m_pContext->selectNode(node, "Children"); if (childrenNode.isNull()) { - SKIN_WARNING(node, *m_pContext) - << "SingletonDefinition requires a Children tag with one child"; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("SingletonDefinition requires a Children tag " + "with one child")); } // Descend children, taking the first valid element. @@ -1493,27 +1516,30 @@ void LegacySkinParser::parseSingletonDefinition(const QDomElement& node) { } if (child_node.isNull()) { - SKIN_WARNING(node, *m_pContext) - << "SingletonDefinition Children node is empty"; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("SingletonDefinition Children node is empty")); return; } QDomElement element = child_node.toElement(); QList child_widgets = parseNode(element); if (child_widgets.empty()) { - SKIN_WARNING(node, *m_pContext) - << "SingletonDefinition child produced no widget."; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral( + "SingletonDefinition child produced no widget.")); return; } else if (child_widgets.size() > 1) { - SKIN_WARNING(node, *m_pContext) - << "SingletonDefinition child produced multiple widgets." - << "All but the first are ignored."; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("SingletonDefinition child produced multiple " + "widgets. All but the first are ignored.")); } QWidget* pChild = child_widgets[0]; if (pChild == nullptr) { - SKIN_WARNING(node, *m_pContext) - << "SingletonDefinition child widget is NULL"; + SKIN_WARNING(node, *m_pContext, QStringLiteral("SingletonDefinition child widget is NULL")); return; } @@ -1712,9 +1738,11 @@ QDomElement LegacySkinParser::loadTemplate(const QString& path) { QList LegacySkinParser::parseTemplate(const QDomElement& node) { if (!node.hasAttribute("src")) { - SKIN_WARNING(node, *m_pContext) - << "Template instantiation without src attribute:" - << node.text(); + SKIN_WARNING(node, + *m_pContext, + QStringLiteral( + "Template instantiation without src attribute: %1") + .arg(node.text())); return QList(); } @@ -1726,7 +1754,10 @@ QList LegacySkinParser::parseTemplate(const QDomElement& node) { QDomElement templateNode = loadTemplate(path); if (templateNode.isNull()) { - SKIN_WARNING(node, *m_pContext) << "Template instantiation for template failed:" << path; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("Template instantiation for template failed: %1") + .arg(path)); m_pContext = std::move(pOldContext); return QList(); } @@ -1943,9 +1974,11 @@ void LegacySkinParser::setupSize(const QDomNode& node, QWidget* pWidget) { } else if (y >= 0 && x == -1) { pWidget->setMinimumHeight(y); } else if (x != -1 || y != -1) { - SKIN_WARNING(node, *m_pContext) - << "Could not parse widget MinimumSize:" << size; - } + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("Could not parse widget MinimumSize: %1") + .arg(size)); + } } @@ -1965,8 +1998,10 @@ void LegacySkinParser::setupSize(const QDomNode& node, QWidget* pWidget) { } else if (y >= 0 && x == -1) { pWidget->setMaximumHeight(y); } else if (x != -1 || y != -1) { - SKIN_WARNING(node, *m_pContext) - << "Could not parse widget MaximumSize:" << size; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("Could not parse widget MaximumSize: %1") + .arg(size)); } } @@ -1982,16 +2017,20 @@ void LegacySkinParser::setupSize(const QDomNode& node, QWidget* pWidget) { if (parseSizePolicy(&xs, &horizontalPolicy)) { sizePolicy.setHorizontalPolicy(horizontalPolicy); } else if (!xs.isEmpty()) { - SKIN_WARNING(node, *m_pContext) - << "Could not parse horizontal size policy:" << xs; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("Could not parse horizontal size policy: %1") + .arg(xs)); } QSizePolicy::Policy verticalPolicy; if (parseSizePolicy(&ys, &verticalPolicy)) { sizePolicy.setVerticalPolicy(verticalPolicy); } else if (!ys.isEmpty()) { - SKIN_WARNING(node, *m_pContext) - << "Could not parse vertical size policy:" << ys; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("Could not parse vertical size policy: %1") + .arg(ys)); } hasSizePolicyNode = true; @@ -2164,8 +2203,10 @@ void LegacySkinParser::setupBaseWidget(const QDomNode& node, } else if (!toolTipId.isEmpty()) { // Only warn if there was a tooltip ID specified and no tooltip for // that ID. - SKIN_WARNING(node, *m_pContext) - << "Invalid in skin.xml:" << toolTipId; + SKIN_WARNING(node, + *m_pContext, + QStringLiteral("Invalid in skin.xml: %1") + .arg(toolTipId)); } } } @@ -2275,9 +2316,11 @@ void LegacySkinParser::setupConnections(const QDomNode& node, WBaseWidget* pWidg if (nodeValue) { emitOption = ControlParameterWidgetConnection::EMIT_ON_PRESS_AND_RELEASE; } else { - SKIN_WARNING(con, *m_pContext) - << "LegacySkinParser::setupConnections():" - << "Setting EmitOnPressAndRelease to false is not necessary."; + SKIN_WARNING(con, + *m_pContext, + QStringLiteral("LegacySkinParser::setupConnections(" + "): Setting EmitOnPressAndRelease " + "to false is not necessary.")); } } else { // default: diff --git a/src/skin/legacy/skincontext.cpp b/src/skin/legacy/skincontext.cpp index 06c896819529..7dfbbcaeb590 100644 --- a/src/skin/legacy/skincontext.cpp +++ b/src/skin/legacy/skincontext.cpp @@ -135,14 +135,19 @@ PixmapSource SkinContext::getPixmapSourceInner(const QString& filename) const { return PixmapSource(); } -QDebug SkinContext::logWarning(const char* file, const int line, - const QDomNode& node) const { - return qWarning() << QString("%1:%2 SKIN ERROR at %3:%4 <%5>:") - .arg(file, QString::number(line), m_xmlPath, - QString::number(node.lineNumber()), - node.nodeName()) - .toUtf8() - .constData(); +QDebug SkinContext::logWarning(const char* file, + const int line, + const QDomNode& node, + const QString& message) const { + return qWarning() << QString("SKIN ERROR at %1:%2 <%3>: %4 | %5:%6") + .arg(m_xmlPath, + QString::number(node.lineNumber()), + node.nodeName(), + message, + file, + QString::number(line)) + .toUtf8() + .constData(); } int SkinContext::scaleToWidgetSize(QString& size) const { diff --git a/src/skin/legacy/skincontext.h b/src/skin/legacy/skincontext.h index d8d353003b37..9817f022bb2e 100644 --- a/src/skin/legacy/skincontext.h +++ b/src/skin/legacy/skincontext.h @@ -15,7 +15,8 @@ #include "widget/wpixmapstore.h" #include "widget/wsingletoncontainer.h" -#define SKIN_WARNING(node, context) (context).logWarning(__FILE__, __LINE__, (node)) +#define SKIN_WARNING(node, context, message) \ + (context).logWarning(__FILE__, __LINE__, (node), (message)) // A class for managing the current context/environment when processing a // skin. Used hierarchically by LegacySkinParser to create new contexts and @@ -225,7 +226,10 @@ class SkinContext { return defaultDrawMode; } - QDebug logWarning(const char* file, const int line, const QDomNode& node) const; + QDebug logWarning(const char* file, + const int line, + const QDomNode& node, + const QString& message) const; void defineSingleton(const QString& objectName, QWidget* widget) { m_pSharedState->singletons.insertSingleton(objectName, widget); diff --git a/src/widget/wcombobox.cpp b/src/widget/wcombobox.cpp index 7fc52220463a..11b917823fd8 100644 --- a/src/widget/wcombobox.cpp +++ b/src/widget/wcombobox.cpp @@ -25,8 +25,10 @@ void WComboBox::setup(const QDomNode& node, const SkinContext& context) { QString icon = context.selectString(state, "Icon"); addItem(QIcon(icon), text, QVariant(iState)); } else { - SKIN_WARNING(state, context) - << "WComboBox ignoring without node."; + SKIN_WARNING(state, + context, + QStringLiteral("WComboBox ignoring without " + " node.")); } } state = state.nextSibling(); diff --git a/src/widget/weffectbuttonparametername.cpp b/src/widget/weffectbuttonparametername.cpp index 8ae4a90c3882..8eb8e17ed00f 100644 --- a/src/widget/weffectbuttonparametername.cpp +++ b/src/widget/weffectbuttonparametername.cpp @@ -22,8 +22,10 @@ void WEffectButtonParameterName::setup(const QDomNode& node, const SkinContext& EffectWidgetUtils::getButtonParameterSlotFromNode( node, context, m_pEffectSlot); VERIFY_OR_DEBUG_ASSERT(m_pParameterSlot) { - SKIN_WARNING(node, context) - << "EffectButtonParameter node could not attach to effect parameter"; + SKIN_WARNING(node, + context, + QStringLiteral("EffectButtonParameter node could not attach to " + "effect parameter")); } setEffectParameterSlot(m_pParameterSlot); } diff --git a/src/widget/weffectchain.cpp b/src/widget/weffectchain.cpp index 6ec1216b71a2..a4275b2c3d7f 100644 --- a/src/widget/weffectchain.cpp +++ b/src/widget/weffectchain.cpp @@ -19,8 +19,10 @@ void WEffectChain::setup(const QDomNode& node, const SkinContext& context) { if (pChainSlot) { setEffectChain(pChainSlot); } else { - SKIN_WARNING(node, context) - << "EffectChain node could not attach to effect chain slot."; + SKIN_WARNING(node, + context, + QStringLiteral("EffectChain node could not attach to effect " + "chain slot.")); } } diff --git a/src/widget/weffectchainpresetbutton.cpp b/src/widget/weffectchainpresetbutton.cpp index 3941259464ab..9943d0e1a397 100644 --- a/src/widget/weffectchainpresetbutton.cpp +++ b/src/widget/weffectchainpresetbutton.cpp @@ -26,8 +26,10 @@ void WEffectChainPresetButton::setup(const QDomNode& node, const SkinContext& co m_pChain = EffectWidgetUtils::getEffectChainFromNode( node, context, m_pEffectsManager); VERIFY_OR_DEBUG_ASSERT(m_pChain) { - SKIN_WARNING(node, context) - << "EffectChainPresetButton node could not attach to effect chain"; + SKIN_WARNING(node, + context, + QStringLiteral("EffectChainPresetButton node could not attach " + "to effect chain")); return; } connect(m_pChain.get(), diff --git a/src/widget/weffectchainpresetselector.cpp b/src/widget/weffectchainpresetselector.cpp index bfed3191968e..7a61c8b7e1f5 100644 --- a/src/widget/weffectchainpresetselector.cpp +++ b/src/widget/weffectchainpresetselector.cpp @@ -31,8 +31,10 @@ void WEffectChainPresetSelector::setup(const QDomNode& node, const SkinContext& node, context, m_pEffectsManager); VERIFY_OR_DEBUG_ASSERT(m_pChain != nullptr) { - SKIN_WARNING(node, context) - << "EffectChainPresetSelector node could not attach to EffectChain"; + SKIN_WARNING(node, + context, + QStringLiteral("EffectChainPresetSelector node could not " + "attach to EffectChain")); return; } diff --git a/src/widget/weffectknobparametername.cpp b/src/widget/weffectknobparametername.cpp index 66004391eac3..157e3eb5768b 100644 --- a/src/widget/weffectknobparametername.cpp +++ b/src/widget/weffectknobparametername.cpp @@ -22,8 +22,10 @@ void WEffectKnobParameterName::setup(const QDomNode& node, const SkinContext& co EffectWidgetUtils::getParameterSlotFromNode( node, context, m_pEffectSlot); VERIFY_OR_DEBUG_ASSERT(m_pParameterSlot) { - SKIN_WARNING(node, context) - << "EffectParameter node could not attach to effect parameter"; + SKIN_WARNING(node, + context, + QStringLiteral("EffectParameter node could not attach to " + "effect parameter")); } setEffectParameterSlot(m_pParameterSlot); } diff --git a/src/widget/weffectname.cpp b/src/widget/weffectname.cpp index 1984449d701b..b5184764146a 100644 --- a/src/widget/weffectname.cpp +++ b/src/widget/weffectname.cpp @@ -22,8 +22,10 @@ void WEffectName::setup(const QDomNode& node, const SkinContext& context) { if (pEffectSlot) { setEffectSlot(pEffectSlot); } else { - SKIN_WARNING(node, context) - << "EffectName node could not attach to effect slot."; + SKIN_WARNING(node, + context, + QStringLiteral( + "EffectName node could not attach to effect slot.")); } } diff --git a/src/widget/weffectparameterknob.cpp b/src/widget/weffectparameterknob.cpp index d77b9b491ae8..656402746c0f 100644 --- a/src/widget/weffectparameterknob.cpp +++ b/src/widget/weffectparameterknob.cpp @@ -12,7 +12,7 @@ void WEffectParameterKnob::setup(const QDomNode& node, const SkinContext& contex m_pEffectParameterSlot = EffectWidgetUtils::getParameterSlotFromNode( node, context, pEffectSlot); VERIFY_OR_DEBUG_ASSERT(m_pEffectParameterSlot) { - SKIN_WARNING(node, context) << "Could not find effect parameter slot"; + SKIN_WARNING(node, context, QStringLiteral("Could not find effect parameter slot")); return; } connect(m_pEffectParameterSlot.data(), diff --git a/src/widget/weffectparameterknobcomposed.cpp b/src/widget/weffectparameterknobcomposed.cpp index aba1e6a9c353..5b7d516bafce 100644 --- a/src/widget/weffectparameterknobcomposed.cpp +++ b/src/widget/weffectparameterknobcomposed.cpp @@ -12,7 +12,7 @@ void WEffectParameterKnobComposed::setup(const QDomNode& node, const SkinContext m_pEffectParameterSlot = EffectWidgetUtils::getParameterSlotFromNode( node, context, pEffectSlot); VERIFY_OR_DEBUG_ASSERT(m_pEffectParameterSlot) { - SKIN_WARNING(node, context) << "Could not find effect parameter slot"; + SKIN_WARNING(node, context, QStringLiteral("Could not find effect parameter slot")); return; } connect(m_pEffectParameterSlot.data(), diff --git a/src/widget/weffectpushbutton.cpp b/src/widget/weffectpushbutton.cpp index d9a027964687..8f60ed1b0ca1 100644 --- a/src/widget/weffectpushbutton.cpp +++ b/src/widget/weffectpushbutton.cpp @@ -23,7 +23,7 @@ void WEffectPushButton::setup(const QDomNode& node, const SkinContext& context) m_pEffectParameterSlot = EffectWidgetUtils::getButtonParameterSlotFromNode( node, context, pEffectSlot); if (!m_pEffectParameterSlot) { - SKIN_WARNING(node, context) << "Could not find effect parameter slot"; + SKIN_WARNING(node, context, QStringLiteral("Could not find effect parameter slot")); DEBUG_ASSERT(false); } connect(m_pEffectParameterSlot.data(), diff --git a/src/widget/weffectselector.cpp b/src/widget/weffectselector.cpp index ab1e21170a05..ba29aab31235 100644 --- a/src/widget/weffectselector.cpp +++ b/src/widget/weffectselector.cpp @@ -42,8 +42,10 @@ void WEffectSelector::setup(const QDomNode& node, const SkinContext& context) { this, &WEffectSelector::slotEffectSelected); } else { - SKIN_WARNING(node, context) - << "EffectSelector node could not attach to effect slot."; + SKIN_WARNING(node, + context, + QStringLiteral("EffectSelector node could not attach to effect " + "slot.")); } populate(); diff --git a/src/widget/whotcuebutton.cpp b/src/widget/whotcuebutton.cpp index 98bad972db1f..5eba7f6cee37 100644 --- a/src/widget/whotcuebutton.cpp +++ b/src/widget/whotcuebutton.cpp @@ -33,7 +33,10 @@ void WHotcueButton::setup(const QDomNode& node, const SkinContext& context) { if (ok && hotcue > 0) { m_hotcue = hotcue - 1; } else { - SKIN_WARNING(node, context) << "Hotcue value invalid"; + SKIN_WARNING(node, + context, + QStringLiteral("Hotcue index %1 invalid") + .arg(context.selectString(node, QStringLiteral("Hotcue")))); } bool okay; @@ -84,7 +87,7 @@ void WHotcueButton::setup(const QDomNode& node, const SkinContext& context) { QDomNode con = context.selectNode(node, QStringLiteral("Connection")); if (!con.isNull()) { - SKIN_WARNING(node, context) << "Additional Connections are not allowed"; + SKIN_WARNING(node, context, QStringLiteral("Additional Connections are not allowed")); } } diff --git a/src/widget/wpushbutton.cpp b/src/widget/wpushbutton.cpp index dd874db5a200..c13c1f9ddec7 100644 --- a/src/widget/wpushbutton.cpp +++ b/src/widget/wpushbutton.cpp @@ -195,9 +195,13 @@ void WPushButton::setup(const QDomNode& node, const SkinContext& context) { if (m_rightButtonMode != ControlPushButton::PUSH && m_rightButtonMode != ControlPushButton::TOGGLE && m_rightButtonMode != ControlPushButton::TRIGGER) { - SKIN_WARNING(node, context) - << "WPushButton::setup: Connecting a Pushbutton not in PUSH, TRIGGER or TOGGLE mode is not implemented\n" - << "Please consider to set true"; + SKIN_WARNING(node, + context, + "WPushButton::setup: Connecting a Pushbutton not " + "in PUSH, TRIGGER or TOGGLE mode is not " + "implemented\n Please consider to set " + "true"); } } } diff --git a/src/widget/wsingletoncontainer.cpp b/src/widget/wsingletoncontainer.cpp index 225e2c5ce5b5..80ee4f9b4bed 100644 --- a/src/widget/wsingletoncontainer.cpp +++ b/src/widget/wsingletoncontainer.cpp @@ -20,19 +20,19 @@ void WSingletonContainer::setup(const QDomNode& node, const SkinContext& context QDomElement containerNode = node.toElement(); QString objectName; if (!context.hasNodeSelectString(node, "ObjectName", &objectName)) { - SKIN_WARNING(node, context) - << "Need objectName attribute for Singleton tag"; + SKIN_WARNING(node, context, QStringLiteral("Need objectName attribute for Singleton tag")); return; } if (objectName.isEmpty()) { - SKIN_WARNING(node, context) - << "Singleton tag's ObjectName is empty"; + SKIN_WARNING(node, context, QStringLiteral("Singleton tag's ObjectName is empty")); return; } m_pWidget = context.getSingletonWidget(objectName); if (m_pWidget == nullptr) { - SKIN_WARNING(node, context) - << "Asked for an unknown singleton widget:" << objectName; + SKIN_WARNING(node, + context, + QStringLiteral("Asked for an unknown singleton widget: %1") + .arg(objectName)); } } diff --git a/src/widget/wsplitter.cpp b/src/widget/wsplitter.cpp index 61dcb8344a88..4934a2f61e0e 100644 --- a/src/widget/wsplitter.cpp +++ b/src/widget/wsplitter.cpp @@ -65,7 +65,7 @@ void WSplitter::setup(const QDomNode& node, const SkinContext& context) { } } if (sizesList.length() != this->count()) { - SKIN_WARNING(node, context) << msg; + SKIN_WARNING(node, context, msg); ok = false; } if (ok) { @@ -90,7 +90,7 @@ void WSplitter::setup(const QDomNode& node, const SkinContext& context) { + collapsibleJoined + ") does not match the number of children nodes:" + QString::number(this->count()); - SKIN_WARNING(node, context) << msg; + SKIN_WARNING(node, context, msg); ok = false; } if (ok) { diff --git a/src/widget/wvumeterbase.cpp b/src/widget/wvumeterbase.cpp index 34216b9433c9..2696a1971258 100644 --- a/src/widget/wvumeterbase.cpp +++ b/src/widget/wvumeterbase.cpp @@ -80,8 +80,10 @@ void WVuMeterBase::setup(const QDomNode& node, const SkinContext& context) { if (height() < 2 || width() < 2) { // This triggers a QT bug and displays a white widget instead. // We warn here, because the skin designer may not use the affected mode. - SKIN_WARNING(node, context) - << "VuMeterBase needs to have 2 pixel in all extents to be visible on all targets."; + SKIN_WARNING(node, + context, + QStringLiteral("VuMeterBase needs to have 2 pixel in all " + "extents to be visible on all targets.")); } setFocusPolicy(Qt::NoFocus);