mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Return a default-constructed QString instead of implicitly converting an empty string literal.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user