mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 18:43:55 -07:00
Fixed most issues from codacy (#3050)
This commit is contained in:
parent
3c3e6ae68a
commit
e127cb74b6
16 changed files with 26 additions and 33 deletions
|
|
@ -37,7 +37,7 @@ private:
|
|||
int flags;
|
||||
|
||||
public:
|
||||
compareFunctor(int _flags) : flags(_flags)
|
||||
explicit compareFunctor(int _flags) : flags(_flags)
|
||||
{
|
||||
}
|
||||
inline bool operator()(CardItem *a, CardItem *b) const
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ const FilterItemList *LogicMap::findTypeList(CardFilter::Type type) const
|
|||
{
|
||||
QList<FilterItemList *>::const_iterator i;
|
||||
|
||||
for (i = childNodes.constBegin(); i != childNodes.constEnd(); i++) {
|
||||
for (i = childNodes.constBegin(); i != childNodes.constEnd(); ++i) {
|
||||
if ((*i)->type == type) {
|
||||
return *i;
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@ FilterItemList *LogicMap::typeList(CardFilter::Type type)
|
|||
QList<FilterItemList *>::iterator i;
|
||||
int count = 0;
|
||||
|
||||
for (i = childNodes.begin(); i != childNodes.end(); i++) {
|
||||
for (i = childNodes.begin(); i != childNodes.end(); ++i) {
|
||||
if ((*i)->type == type) {
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -220,7 +220,6 @@ QModelIndex FilterTreeModel::parent(const QModelIndex &ind) const
|
|||
{
|
||||
const FilterTreeNode *node;
|
||||
FilterTreeNode *parent;
|
||||
int row;
|
||||
QModelIndex idx;
|
||||
|
||||
if (!ind.isValid())
|
||||
|
|
@ -232,7 +231,7 @@ QModelIndex FilterTreeModel::parent(const QModelIndex &ind) const
|
|||
|
||||
parent = node->parent();
|
||||
if (parent) {
|
||||
row = parent->index();
|
||||
int row = parent->index();
|
||||
if (row < 0)
|
||||
return QModelIndex();
|
||||
idx = createIndex(row, 0, parent);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <QTextCursor>
|
||||
#include <QWidget>
|
||||
|
||||
LineEditCompleter::LineEditCompleter(QWidget *parent) : QLineEdit(parent)
|
||||
LineEditCompleter::LineEditCompleter(QWidget *parent) : QLineEdit(parent), c(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -796,6 +796,7 @@ MessageLogWidget::MessageLogWidget(const TabSupervisor *_tabSupervisor,
|
|||
const UserlistProxy *_userlistProxy,
|
||||
TabGame *_game,
|
||||
QWidget *parent)
|
||||
: ChatView(_tabSupervisor, _userlistProxy, _game, true, parent), currentContext(MessageContext_None)
|
||||
: ChatView(_tabSupervisor, _userlistProxy, _game, true, parent), mulliganNumber(0),
|
||||
currentContext(MessageContext_None)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ private:
|
|||
CardInfo *card;
|
||||
QList<CardSet *> sortedSets;
|
||||
int setIndex;
|
||||
bool hq;
|
||||
|
||||
public:
|
||||
PictureToLoad(CardInfo *_card = 0);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "update_downloader.h"
|
||||
|
||||
UpdateDownloader::UpdateDownloader(QObject *parent) : QObject(parent)
|
||||
UpdateDownloader::UpdateDownloader(QObject *parent) : QObject(parent), response(nullptr)
|
||||
{
|
||||
netMan = new QNetworkAccessManager(this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue