mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check * 2/3 Run clang-format * 3/3 Fix compilation problems due to include reordering * 3bis/3 AfterControlStatement: false
This commit is contained in:
parent
8dbdd24c8e
commit
b29bd9e070
272 changed files with 13378 additions and 9535 deletions
|
|
@ -1,16 +1,14 @@
|
|||
#include <QVBoxLayout>
|
||||
#include <QDesktopWidget>
|
||||
#include "cardinfowidget.h"
|
||||
#include "carditem.h"
|
||||
#include "carddatabase.h"
|
||||
#include "cardinfopicture.h"
|
||||
#include "cardinfotext.h"
|
||||
#include "carditem.h"
|
||||
#include "main.h"
|
||||
#include <QDesktopWidget>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
CardInfoWidget::CardInfoWidget(const QString &cardName, QWidget *parent, Qt::WindowFlags flags)
|
||||
: QFrame(parent, flags)
|
||||
, aspectRatio((qreal) CARD_HEIGHT / (qreal) CARD_WIDTH)
|
||||
, info(nullptr)
|
||||
: QFrame(parent, flags), aspectRatio((qreal)CARD_HEIGHT / (qreal)CARD_WIDTH), info(nullptr)
|
||||
{
|
||||
setContentsMargins(3, 3, 3, 3);
|
||||
pic = new CardInfoPicture();
|
||||
|
|
@ -18,7 +16,7 @@ CardInfoWidget::CardInfoWidget(const QString &cardName, QWidget *parent, Qt::Win
|
|||
text = new CardInfoText();
|
||||
text->setObjectName("text");
|
||||
|
||||
QVBoxLayout * layout = new QVBoxLayout();
|
||||
QVBoxLayout *layout = new QVBoxLayout();
|
||||
layout->setObjectName("layout");
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setSpacing(0);
|
||||
|
|
@ -33,7 +31,7 @@ CardInfoWidget::CardInfoWidget(const QString &cardName, QWidget *parent, Qt::Win
|
|||
pic->setFixedWidth(pixmapWidth);
|
||||
pic->setFixedHeight(pixmapHeight);
|
||||
setFixedWidth(pixmapWidth + 150);
|
||||
|
||||
|
||||
setCard(cardName);
|
||||
|
||||
// ensure our parent gets a valid size to position us correctly
|
||||
|
|
@ -45,7 +43,7 @@ void CardInfoWidget::setCard(CardInfo *card)
|
|||
if (info)
|
||||
disconnect(info, nullptr, this, nullptr);
|
||||
info = card;
|
||||
if(info)
|
||||
if (info)
|
||||
connect(info, SIGNAL(destroyed()), this, SLOT(clear()));
|
||||
|
||||
text->setCard(info);
|
||||
|
|
@ -64,5 +62,5 @@ void CardInfoWidget::setCard(AbstractCardItem *card)
|
|||
|
||||
void CardInfoWidget::clear()
|
||||
{
|
||||
setCard((CardInfo *) nullptr);
|
||||
setCard((CardInfo *)nullptr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue