Return a default-constructed QString instead of implicitly converting an empty string literal.

This commit is contained in:
Mat Sutcliffe
2018-12-20 21:47:58 +00:00
parent 6c05c5249d
commit d6b5dca6b2
49 changed files with 128 additions and 127 deletions

View File

@@ -17,6 +17,7 @@
#include <QPainter>
#include <QPixmap>
#include <QSize>
#include <QStringBuilder>
#include <Qt>
#include <QtGlobal>
@@ -127,9 +128,9 @@ namespace BlackMisc
QString CRgbColor::hex(bool withHash) const
{
if (!isValid()) { return ""; }
if (!isValid()) { return {}; }
const QString h(redHex() + greenHex() + blueHex());
return withHash ? "#" + h : h;
return withHash ? u'#' % h : h;
}
void CRgbColor::setByString(const QString &color, bool isName)