mirror of
https://github.com/zealdocs/zeal.git
synced 2024-11-26 15:43:49 +03:00
style(ui): fix constructor initializer list style
This commit is contained in:
parent
26cb27ad41
commit
579afac786
@ -27,9 +27,9 @@
|
||||
|
||||
using namespace Zeal::WidgetUi;
|
||||
|
||||
AboutDialog::AboutDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::AboutDialog)
|
||||
AboutDialog::AboutDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::AboutDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
@ -30,8 +30,8 @@
|
||||
using namespace Zeal;
|
||||
using namespace Zeal::WidgetUi;
|
||||
|
||||
DocsetListItemDelegate::DocsetListItemDelegate(QObject *parent) :
|
||||
QStyledItemDelegate(parent)
|
||||
DocsetListItemDelegate::DocsetListItemDelegate(QObject *parent)
|
||||
: QStyledItemDelegate(parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -69,11 +69,11 @@ const char DownloadPreviousReceived[] = "downloadPreviousReceived";
|
||||
const char ListItemIndexProperty[] = "listItem";
|
||||
}
|
||||
|
||||
DocsetsDialog::DocsetsDialog(Core::Application *app, QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::DocsetsDialog()),
|
||||
m_application(app),
|
||||
m_docsetRegistry(app->docsetRegistry())
|
||||
DocsetsDialog::DocsetsDialog(Core::Application *app, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::DocsetsDialog())
|
||||
, m_application(app)
|
||||
, m_docsetRegistry(app->docsetRegistry())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
@ -63,11 +63,11 @@ const char DarkModeCssUrl[] = ":/browser/assets/css/darkmode.css";
|
||||
const char HighlightOnNavigateCssUrl[] = ":/browser/assets/css/highlight.css";
|
||||
}
|
||||
|
||||
MainWindow::MainWindow(Core::Application *app, QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow),
|
||||
m_application(app),
|
||||
m_settings(app->settings())
|
||||
MainWindow::MainWindow(Core::Application *app, QWidget *parent)
|
||||
: QMainWindow(parent)
|
||||
, ui(new Ui::MainWindow)
|
||||
, m_application(app)
|
||||
, m_settings(app->settings())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
@ -28,8 +28,8 @@
|
||||
|
||||
using namespace Zeal::WidgetUi;
|
||||
|
||||
ProgressItemDelegate::ProgressItemDelegate(QObject *parent) :
|
||||
QStyledItemDelegate(parent)
|
||||
ProgressItemDelegate::ProgressItemDelegate(QObject *parent)
|
||||
: QStyledItemDelegate(parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -62,8 +62,8 @@ int QxtGlobalShortcutPrivate::ref = 0;
|
||||
|
||||
QHash<QPair<quint32, quint32>, QxtGlobalShortcut *> QxtGlobalShortcutPrivate::shortcuts;
|
||||
|
||||
QxtGlobalShortcutPrivate::QxtGlobalShortcutPrivate(QxtGlobalShortcut *qq) :
|
||||
q_ptr(qq)
|
||||
QxtGlobalShortcutPrivate::QxtGlobalShortcutPrivate(QxtGlobalShortcut *qq)
|
||||
: q_ptr(qq)
|
||||
{
|
||||
#ifndef Q_OS_MACOS
|
||||
if (ref == 0)
|
||||
@ -163,18 +163,18 @@ bool QxtGlobalShortcutPrivate::activateShortcut(quint32 nativeKey, quint32 nativ
|
||||
/*!
|
||||
Constructs a new QxtGlobalShortcut with \a parent.
|
||||
*/
|
||||
QxtGlobalShortcut::QxtGlobalShortcut(QObject *parent) :
|
||||
QObject(parent),
|
||||
d_ptr(new QxtGlobalShortcutPrivate(this))
|
||||
QxtGlobalShortcut::QxtGlobalShortcut(QObject *parent)
|
||||
: QObject(parent)
|
||||
, d_ptr(new QxtGlobalShortcutPrivate(this))
|
||||
{
|
||||
}
|
||||
|
||||
/*!
|
||||
Constructs a new QxtGlobalShortcut with \a shortcut and \a parent.
|
||||
*/
|
||||
QxtGlobalShortcut::QxtGlobalShortcut(const QKeySequence &shortcut, QObject *parent) :
|
||||
QObject(parent),
|
||||
d_ptr(new QxtGlobalShortcutPrivate(this))
|
||||
QxtGlobalShortcut::QxtGlobalShortcut(const QKeySequence &shortcut, QObject *parent)
|
||||
: QObject(parent)
|
||||
, d_ptr(new QxtGlobalShortcutPrivate(this))
|
||||
{
|
||||
setShortcut(shortcut);
|
||||
}
|
||||
|
@ -31,8 +31,8 @@
|
||||
|
||||
using namespace Zeal::WidgetUi;
|
||||
|
||||
SearchItemDelegate::SearchItemDelegate(QObject *parent) :
|
||||
QStyledItemDelegate(parent)
|
||||
SearchItemDelegate::SearchItemDelegate(QObject *parent)
|
||||
: QStyledItemDelegate(parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -46,9 +46,9 @@ const QWebSettings::FontFamily BasicFontFamilies[] = {QWebSettings::SerifFont,
|
||||
QWebSettings::FixedFont};
|
||||
}
|
||||
|
||||
SettingsDialog::SettingsDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::SettingsDialog())
|
||||
SettingsDialog::SettingsDialog(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::SettingsDialog())
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
@ -34,8 +34,8 @@
|
||||
using namespace Zeal;
|
||||
using namespace Zeal::WidgetUi;
|
||||
|
||||
SearchEdit::SearchEdit(QWidget *parent) :
|
||||
QLineEdit(parent)
|
||||
SearchEdit::SearchEdit(QWidget *parent)
|
||||
: QLineEdit(parent)
|
||||
{
|
||||
setClearButtonEnabled(true);
|
||||
setPlaceholderText(tr("Search"));
|
||||
|
@ -28,13 +28,13 @@
|
||||
|
||||
using namespace Zeal::WidgetUi;
|
||||
|
||||
ShortcutEdit::ShortcutEdit(QWidget *parent) :
|
||||
ShortcutEdit(QString(), parent)
|
||||
ShortcutEdit::ShortcutEdit(QWidget *parent)
|
||||
: ShortcutEdit(QString(), parent)
|
||||
{
|
||||
}
|
||||
|
||||
ShortcutEdit::ShortcutEdit(const QString &text, QWidget *parent) :
|
||||
QLineEdit(text, parent)
|
||||
ShortcutEdit::ShortcutEdit(const QString &text, QWidget *parent)
|
||||
: QLineEdit(text, parent)
|
||||
{
|
||||
connect(this, &QLineEdit::textChanged, [this](const QString &text) {
|
||||
m_key = QKeySequence(text, QKeySequence::NativeText)[0];
|
||||
|
@ -4,7 +4,8 @@
|
||||
|
||||
using namespace Zeal::WidgetUi;
|
||||
|
||||
ToolBarFrame::ToolBarFrame(QWidget *parent) : QWidget(parent)
|
||||
ToolBarFrame::ToolBarFrame(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
setMaximumHeight(40);
|
||||
setMinimumHeight(40);
|
||||
|
Loading…
Reference in New Issue
Block a user