trim tooltip content to avoid extraneous spaces
BUG:272520
This commit is contained in:
parent
9bf34b2194
commit
986615f544
@ -95,9 +95,9 @@ ToolTipContent::ToolTipContent(const QString &mainText,
|
||||
const QPixmap &image)
|
||||
: d(new ToolTipContentPrivate)
|
||||
{
|
||||
d->mainText = mainText;
|
||||
d->subText = subText;
|
||||
d->image = image;
|
||||
setMainText(mainText);
|
||||
setSubText(subText);
|
||||
setImage(image);
|
||||
}
|
||||
|
||||
ToolTipContent::ToolTipContent(const QString &mainText,
|
||||
@ -105,9 +105,9 @@ ToolTipContent::ToolTipContent(const QString &mainText,
|
||||
const QIcon &icon)
|
||||
: d(new ToolTipContentPrivate)
|
||||
{
|
||||
d->mainText = mainText;
|
||||
d->subText = subText;
|
||||
d->image = icon.pixmap(IconSize(KIconLoader::Desktop));
|
||||
setMainText(mainText);
|
||||
setSubText(subText);
|
||||
setImage(icon);
|
||||
}
|
||||
|
||||
bool ToolTipContent::isEmpty() const
|
||||
@ -120,7 +120,7 @@ bool ToolTipContent::isEmpty() const
|
||||
|
||||
void ToolTipContent::setMainText(const QString &text)
|
||||
{
|
||||
d->mainText = text;
|
||||
d->mainText = text.trimmed();
|
||||
}
|
||||
|
||||
QString ToolTipContent::mainText() const
|
||||
@ -132,7 +132,7 @@ QString ToolTipContent::mainText() const
|
||||
|
||||
void ToolTipContent::setSubText(const QString &text)
|
||||
{
|
||||
d->subText = text;
|
||||
d->subText = text.trimmed();
|
||||
}
|
||||
|
||||
QString ToolTipContent::subText() const
|
||||
|
Loading…
Reference in New Issue
Block a user