mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-15 06:52:15 -07:00
make static methods static
This commit is contained in:
parent
6c21712e45
commit
b737ee7372
2 changed files with 5 additions and 8 deletions
|
|
@ -20,18 +20,17 @@ static const QString DECK_ZONE_NAME = "deck";
|
|||
static const QString SIDEBOARD_ZONE_NAME = "sb";
|
||||
static const QString STACK_ZONE_NAME = "stack";
|
||||
|
||||
QString MessageLogWidget::sanitizeHtml(QString dirty) const
|
||||
static QString sanitizeHtml(QString dirty)
|
||||
{
|
||||
return dirty.replace("&", "&").replace("<", "<").replace(">", ">").replace("\"", """);
|
||||
}
|
||||
|
||||
QString MessageLogWidget::cardLink(const QString cardName) const
|
||||
static QString cardLink(const QString &cardName)
|
||||
{
|
||||
return QString("<i><a href=\"card://%1\">%2</a></i>").arg(cardName).arg(cardName);
|
||||
}
|
||||
|
||||
QPair<QString, QString>
|
||||
MessageLogWidget::getFromStr(CardZone *zone, QString cardName, int position, bool ownerChange) const
|
||||
QPair<QString, QString> MessageLogWidget::getFromStr(CardZone *zone, QString cardName, int position, bool ownerChange)
|
||||
{
|
||||
bool cardNameContainsStartZone = false;
|
||||
QString fromStr;
|
||||
|
|
@ -92,7 +91,7 @@ MessageLogWidget::getFromStr(CardZone *zone, QString cardName, int position, boo
|
|||
if (!cardNameContainsStartZone) {
|
||||
cardName.clear();
|
||||
}
|
||||
return QPair<QString, QString>(cardName, fromStr);
|
||||
return {cardName, fromStr};
|
||||
}
|
||||
|
||||
void MessageLogWidget::containerProcessingDone()
|
||||
|
|
|
|||
|
|
@ -26,9 +26,7 @@ private:
|
|||
MessageContext currentContext;
|
||||
QString messagePrefix, messageSuffix;
|
||||
|
||||
QString sanitizeHtml(QString dirty) const;
|
||||
QString cardLink(QString cardName) const;
|
||||
QPair<QString, QString> getFromStr(CardZone *zone, QString cardName, int position, bool ownerChange) const;
|
||||
static QPair<QString, QString> getFromStr(CardZone *zone, QString cardName, int position, bool ownerChange);
|
||||
|
||||
public slots:
|
||||
void containerProcessingDone();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue