mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 15:37:23 +00:00
replace all nbsp in previews (#142)
This commit is contained in:
parent
e525cb4742
commit
55319521b2
@ -340,7 +340,8 @@ QString AWKeys::parsePattern(QString _pattern) const
|
|||||||
|
|
||||||
// main keys
|
// main keys
|
||||||
for (auto &key : m_foundKeys)
|
for (auto &key : m_foundKeys)
|
||||||
_pattern.replace(QString("$%1").arg(key), m_aggregator->formatter(m_values[key], key, true));
|
_pattern.replace(QString("$%1").arg(key),
|
||||||
|
m_aggregator->formatter(m_values[key], key, true));
|
||||||
|
|
||||||
// bars
|
// bars
|
||||||
for (auto &bar : m_foundBars) {
|
for (auto &bar : m_foundBars) {
|
||||||
|
@ -55,7 +55,8 @@ void AWKeysAggregator::initFormatters()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString AWKeysAggregator::formatter(const QVariant &_data, const QString &_key, bool replaceSpace) const
|
QString AWKeysAggregator::formatter(const QVariant &_data, const QString &_key,
|
||||||
|
bool replaceSpace) const
|
||||||
{
|
{
|
||||||
qCDebug(LOG_AW) << "Data" << _data << "for key" << _key;
|
qCDebug(LOG_AW) << "Data" << _data << "for key" << _key;
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ Row {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onShowMessage: {
|
onShowMessage: {
|
||||||
compiledText.text = message.replace(" ", " ")
|
compiledText.text = message.split(" ").join(" ") // replaceAll lols
|
||||||
compiledText.open()
|
compiledText.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ Row {
|
|||||||
// generate message
|
// generate message
|
||||||
var message = i18n("Tag: %1", tags.currentText)
|
var message = i18n("Tag: %1", tags.currentText)
|
||||||
message += "<br>"
|
message += "<br>"
|
||||||
message += i18n("Value: %1", backend.valueByKey(tags.currentText))
|
message += i18n("Value: %1", backend.valueByKey(tags.currentText).split(" ").join(" "))
|
||||||
message += "<br>"
|
message += "<br>"
|
||||||
message += i18n("Info: %1", backend.infoByKey(tags.currentText))
|
message += i18n("Info: %1", backend.infoByKey(tags.currentText))
|
||||||
notifyBackend.sendNotification("tag", message)
|
notifyBackend.sendNotification("tag", message)
|
||||||
|
Loading…
Reference in New Issue
Block a user