Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
KDebugSettings
Commits
cbe25955
Commit
cbe25955
authored
Feb 16, 2021
by
Laurent Montel
😁
Browse files
Const'ify pointer
parent
ad4862e7
Pipeline
#51281
canceled with stage
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/configurecustomsettingdialog.cpp
View file @
cbe25955
...
...
@@ -15,11 +15,11 @@
ConfigureCustomSettingDialog
::
ConfigureCustomSettingDialog
(
QWidget
*
parent
)
:
QDialog
(
parent
)
,
mCustomSettingWidget
(
new
ConfigureCustomSettingWidget
(
this
))
{
auto
mainLayout
=
new
QVBoxLayout
(
this
);
setWindowTitle
(
i18nc
(
"@title:window"
,
"Add custom rule"
));
mCustomSettingWidget
=
new
ConfigureCustomSettingWidget
(
this
);
mCustomSettingWidget
->
setObjectName
(
QStringLiteral
(
"customsettingwidget"
));
mainLayout
->
addWidget
(
mCustomSettingWidget
);
...
...
src/configurecustomsettingdialog.h
View file @
cbe25955
...
...
@@ -23,7 +23,7 @@ public:
Q_REQUIRED_RESULT
QString
rule
()
const
;
private:
ConfigureCustomSettingWidget
*
mCustomSettingWidget
=
nullptr
;
ConfigureCustomSettingWidget
*
const
mCustomSettingWidget
;
};
#endif // CONFIGURECUSTOMSETTINGDIALOG_H
src/configurecustomsettingwidget.cpp
View file @
cbe25955
...
...
@@ -18,12 +18,14 @@
ConfigureCustomSettingWidget
::
ConfigureCustomSettingWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mCategoryLineEdit
(
new
KLineEdit
(
this
))
,
mEnableCategory
(
new
QCheckBox
(
i18n
(
"Enable"
),
this
))
,
mCategoryType
(
new
CategoryTypeComboBox
(
true
,
this
))
{
auto
vbox
=
new
QVBoxLayout
(
this
);
auto
lab
=
new
QLabel
(
i18n
(
"Category:"
),
this
);
lab
->
setObjectName
(
QStringLiteral
(
"category_label"
));
mCategoryLineEdit
=
new
KLineEdit
(
this
);
mCategoryLineEdit
->
setTrapReturnKey
(
true
);
mCategoryLineEdit
->
setClearButtonEnabled
(
true
);
mCategoryLineEdit
->
setObjectName
(
QStringLiteral
(
"category_lineedit"
));
...
...
@@ -37,11 +39,9 @@ ConfigureCustomSettingWidget::ConfigureCustomSettingWidget(QWidget *parent)
lab
->
setObjectName
(
QStringLiteral
(
"categorytype_label"
));
categoryLayout
->
addWidget
(
lab
);
mCategoryType
=
new
CategoryTypeComboBox
(
true
,
this
);
mCategoryType
->
setObjectName
(
QStringLiteral
(
"categorytype_combobox"
));
categoryLayout
->
addWidget
(
mCategoryType
);
mEnableCategory
=
new
QCheckBox
(
i18n
(
"Enable"
),
this
);
mEnableCategory
->
setObjectName
(
QStringLiteral
(
"enable_category"
));
categoryLayout
->
addWidget
(
mEnableCategory
);
}
...
...
src/configurecustomsettingwidget.h
View file @
cbe25955
...
...
@@ -29,9 +29,9 @@ Q_SIGNALS:
private:
void
slotTextChanged
(
const
QString
&
);
KLineEdit
*
mCategoryLineEdit
=
nullptr
;
QCheckBox
*
mEnableCategory
=
nullptr
;
CategoryTypeComboBox
*
mCategoryType
=
nullptr
;
KLineEdit
*
const
mCategoryLineEdit
;
QCheckBox
*
const
mEnableCategory
;
CategoryTypeComboBox
*
const
mCategoryType
;
};
#endif // CONFIGURECUSTOMSETTINGWIDGET_H
src/environmentsettingsrulespage.cpp
View file @
cbe25955
...
...
@@ -13,11 +13,11 @@
EnvironmentSettingsRulesPage
::
EnvironmentSettingsRulesPage
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mRichTextEdit
(
new
EnvironmentPlainTextEdit
(
this
))
{
auto
mainLayout
=
new
QVBoxLayout
(
this
);
auto
lab
=
new
QLabel
(
i18n
(
"Rules:"
),
this
);
lab
->
setObjectName
(
QStringLiteral
(
"label"
));
mRichTextEdit
=
new
EnvironmentPlainTextEdit
(
this
);
mRichTextEdit
->
setReadOnly
(
true
);
mRichTextEdit
->
setObjectName
(
QStringLiteral
(
"richtext"
));
mainLayout
->
addWidget
(
lab
);
...
...
src/environmentsettingsrulespage.h
View file @
cbe25955
...
...
@@ -20,7 +20,7 @@ public:
void
setRules
(
const
QString
&
rules
);
private:
EnvironmentPlainTextEdit
*
mRichTextEdit
=
nullptr
;
EnvironmentPlainTextEdit
*
const
mRichTextEdit
;
};
#endif // ENVIRONMENTSETTINGSRULESPAGE_H
src/kdeapplicationdebugsettingpage.cpp
View file @
cbe25955
...
...
@@ -16,13 +16,16 @@
KDEApplicationDebugSettingPage
::
KDEApplicationDebugSettingPage
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mTreeListWidget
(
new
KDEApplicationTreeListWidget
(
this
))
,
mTreeListWidgetSearchLine
(
new
KTreeWidgetSearchLine
(
this
,
mTreeListWidget
))
,
mEnableDebug
(
new
QPushButton
(
i18n
(
"Enable All Debug"
),
this
))
,
mTurnOffDebug
(
new
QPushButton
(
i18n
(
"Turn Off Debug"
),
this
))
,
mTurnOffAllMessages
(
new
QPushButton
(
i18n
(
"Turn Off All Messages"
),
this
))
{
auto
mainLayout
=
new
QVBoxLayout
(
this
);
mTreeListWidget
=
new
KDEApplicationTreeListWidget
(
this
);
mTreeListWidget
->
setObjectName
(
QStringLiteral
(
"listwidget"
));
mTreeListWidgetSearchLine
=
new
KTreeWidgetSearchLine
(
this
,
mTreeListWidget
);
mTreeListWidgetSearchLine
->
setPlaceholderText
(
i18n
(
"Search..."
));
mTreeListWidgetSearchLine
->
setObjectName
(
QStringLiteral
(
"searchline"
));
mTreeListWidgetSearchLine
->
setSearchColumns
(
mTreeListWidget
->
searchColumns
());
...
...
@@ -33,17 +36,14 @@ KDEApplicationDebugSettingPage::KDEApplicationDebugSettingPage(QWidget *parent)
auto
buttonLayout
=
new
QHBoxLayout
;
mainLayout
->
addLayout
(
buttonLayout
);
mEnableDebug
=
new
QPushButton
(
i18n
(
"Enable All Debug"
),
this
);
mEnableDebug
->
setObjectName
(
QStringLiteral
(
"selectall"
));
buttonLayout
->
addWidget
(
mEnableDebug
);
connect
(
mEnableDebug
,
&
QAbstractButton
::
clicked
,
this
,
&
KDEApplicationDebugSettingPage
::
slotSelectAllDebug
);
mTurnOffDebug
=
new
QPushButton
(
i18n
(
"Turn Off Debug"
),
this
);
mTurnOffDebug
->
setObjectName
(
QStringLiteral
(
"deselectall"
));
buttonLayout
->
addWidget
(
mTurnOffDebug
);
connect
(
mTurnOffDebug
,
&
QAbstractButton
::
clicked
,
this
,
&
KDEApplicationDebugSettingPage
::
slotDeselectAllDebug
);
mTurnOffAllMessages
=
new
QPushButton
(
i18n
(
"Turn Off All Messages"
),
this
);
mTurnOffAllMessages
->
setObjectName
(
QStringLiteral
(
"deselectallmessage"
));
buttonLayout
->
addWidget
(
mTurnOffAllMessages
);
connect
(
mTurnOffAllMessages
,
&
QAbstractButton
::
clicked
,
this
,
&
KDEApplicationDebugSettingPage
::
slotDeselectAllMessages
);
...
...
src/kdeapplicationdebugsettingpage.h
View file @
cbe25955
...
...
@@ -36,11 +36,11 @@ private:
void
slotDeselectAllDebug
();
void
slotDeselectAllMessages
();
KDEApplicationTreeListWidget
*
mTreeListWidget
=
nullptr
;
KTreeWidgetSearchLine
*
mTreeListWidgetSearchLine
=
nullptr
;
QPushButton
*
mEnableDebug
=
nullptr
;
QPushButton
*
mTurnOffDebug
=
nullptr
;
QPushButton
*
mTurnOffAllMessages
=
nullptr
;
KDEApplicationTreeListWidget
*
const
mTreeListWidget
;
KTreeWidgetSearchLine
*
const
mTreeListWidgetSearchLine
;
QPushButton
*
const
mEnableDebug
;
QPushButton
*
const
mTurnOffDebug
;
QPushButton
*
const
mTurnOffAllMessages
;
};
#endif // KDEAPPLICATIONDEBUGSETTINGPAGE_H
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment