mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 04:54:29 -04:00
Use auto to avoid duplicating the type name
This commit is contained in:
@ -14,20 +14,20 @@ FlowType flowType = Strip;
|
||||
OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
: YACReaderOptionsDialog(parent)
|
||||
{
|
||||
QTabWidget *tabWidget = new QTabWidget();
|
||||
auto tabWidget = new QTabWidget();
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
auto layout = new QVBoxLayout(this);
|
||||
|
||||
QVBoxLayout *flowLayout = new QVBoxLayout;
|
||||
QVBoxLayout *gridViewLayout = new QVBoxLayout();
|
||||
QVBoxLayout *generalLayout = new QVBoxLayout();
|
||||
auto flowLayout = new QVBoxLayout;
|
||||
auto gridViewLayout = new QVBoxLayout();
|
||||
auto generalLayout = new QVBoxLayout();
|
||||
|
||||
QHBoxLayout *switchFlowType = new QHBoxLayout();
|
||||
auto switchFlowType = new QHBoxLayout();
|
||||
switchFlowType->addStretch();
|
||||
#ifndef NO_OPENGL
|
||||
switchFlowType->addWidget(useGL);
|
||||
#endif
|
||||
QHBoxLayout *buttons = new QHBoxLayout();
|
||||
auto buttons = new QHBoxLayout();
|
||||
buttons->addStretch();
|
||||
buttons->addWidget(accept);
|
||||
buttons->addWidget(cancel);
|
||||
@ -42,11 +42,11 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
sw->hide();
|
||||
#endif
|
||||
|
||||
QVBoxLayout *apiKeyLayout = new QVBoxLayout();
|
||||
QPushButton *apiKeyButton = new QPushButton(tr("Edit Comic Vine API key"));
|
||||
auto apiKeyLayout = new QVBoxLayout();
|
||||
auto apiKeyButton = new QPushButton(tr("Edit Comic Vine API key"));
|
||||
apiKeyLayout->addWidget(apiKeyButton);
|
||||
|
||||
QGroupBox *apiKeyBox = new QGroupBox(tr("Comic Vine API key"));
|
||||
auto apiKeyBox = new QGroupBox(tr("Comic Vine API key"));
|
||||
apiKeyBox->setLayout(apiKeyLayout);
|
||||
|
||||
connect(apiKeyButton, SIGNAL(clicked()), this, SLOT(editApiKey()));
|
||||
@ -68,7 +68,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
|
||||
resetButton = new QPushButton(tr("Restore defautls"));
|
||||
|
||||
QVBoxLayout *gridBackgroundLayout = new QVBoxLayout();
|
||||
auto gridBackgroundLayout = new QVBoxLayout();
|
||||
gridBackgroundLayout->addWidget(useBackgroundImageCheck);
|
||||
gridBackgroundLayout->addWidget(opacityLabel);
|
||||
gridBackgroundLayout->addWidget(backgroundImageOpacitySlider);
|
||||
@ -77,7 +77,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
gridBackgroundLayout->addWidget(useCurrentComicCoverCheck);
|
||||
gridBackgroundLayout->addWidget(resetButton, 0, Qt::AlignRight);
|
||||
|
||||
QGroupBox *gridBackgroundGroup = new QGroupBox(tr("Background"));
|
||||
auto gridBackgroundGroup = new QGroupBox(tr("Background"));
|
||||
gridBackgroundGroup->setLayout(gridBackgroundLayout);
|
||||
|
||||
gridViewLayout->addWidget(gridBackgroundGroup);
|
||||
@ -90,13 +90,13 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
connect(resetButton, &QPushButton::clicked, this, &OptionsDialog::resetToDefaults);
|
||||
//end grid view background config
|
||||
|
||||
QWidget *comicFlowW = new QWidget;
|
||||
auto comicFlowW = new QWidget;
|
||||
comicFlowW->setLayout(flowLayout);
|
||||
|
||||
QWidget *gridViewW = new QWidget;
|
||||
auto gridViewW = new QWidget;
|
||||
gridViewW->setLayout(gridViewLayout);
|
||||
|
||||
QWidget *generalW = new QWidget;
|
||||
auto generalW = new QWidget;
|
||||
generalW->setLayout(generalLayout);
|
||||
generalLayout->addWidget(shortcutsBox);
|
||||
generalLayout->addWidget(apiKeyBox);
|
||||
|
Reference in New Issue
Block a user