Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akonadi Console
Commits
c595fed3
Commit
c595fed3
authored
Sep 04, 2022
by
Laurent Montel
Browse files
Const'ify pointer
parent
881978c1
Pipeline
#227039
passed with stage
in 1 minute and 27 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/jobtrackersearchwidget.cpp
View file @
c595fed3
...
...
@@ -13,24 +13,24 @@
JobTrackerSearchWidget
::
JobTrackerSearchWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mSearchLineEdit
(
new
QLineEdit
(
this
))
,
mSelectColumn
(
new
QComboBox
(
this
))
,
mSelectOnlyError
(
new
QCheckBox
(
QStringLiteral
(
"Show Only Errors"
),
this
))
{
auto
mainLayout
=
new
QHBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainlayout"
));
mainLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mSearchLineEdit
=
new
QLineEdit
(
this
);
mSearchLineEdit
->
setObjectName
(
QStringLiteral
(
"searchline"
));
mSearchLineEdit
->
setClearButtonEnabled
(
true
);
mSearchLineEdit
->
setPlaceholderText
(
QStringLiteral
(
"Search..."
));
mainLayout
->
addWidget
(
mSearchLineEdit
);
connect
(
mSearchLineEdit
,
&
QLineEdit
::
textChanged
,
this
,
&
JobTrackerSearchWidget
::
searchTextChanged
);
mSelectOnlyError
=
new
QCheckBox
(
QStringLiteral
(
"Show Only Errors"
),
this
);
mSelectOnlyError
->
setObjectName
(
QStringLiteral
(
"selectonlyerror"
));
mainLayout
->
addWidget
(
mSelectOnlyError
);
connect
(
mSelectOnlyError
,
&
QCheckBox
::
toggled
,
this
,
&
JobTrackerSearchWidget
::
selectOnlyErrorChanged
);
mSelectColumn
=
new
QComboBox
(
this
);
mSelectColumn
->
setObjectName
(
QStringLiteral
(
"selectcolumn"
));
mainLayout
->
addWidget
(
mSelectColumn
);
mSelectColumn
->
addItem
(
QStringLiteral
(
"All Columns"
),
-
1
);
...
...
src/jobtrackersearchwidget.h
View file @
c595fed3
...
...
@@ -29,8 +29,8 @@ private Q_SLOTS:
void
slotColumnChanged
(
int
index
);
private:
QLineEdit
*
mSearchLineEdit
=
nullptr
;
QComboBox
*
mSelectColumn
=
nullptr
;
QCheckBox
*
mSelectOnlyError
=
nullptr
;
QLineEdit
*
const
mSearchLineEdit
;
QComboBox
*
const
mSelectColumn
;
QCheckBox
*
const
mSelectOnlyError
;
};
src/logging.cpp
View file @
c595fed3
...
...
@@ -39,7 +39,7 @@ Logging::Logging(QWidget *parent)
auto
l
=
new
QVBoxLayout
(
this
);
setLayout
(
l
);
mEnabledCheckbox
=
new
QCheckBox
(
QStringLiteral
(
"Enable"
));
mEnabledCheckbox
=
new
QCheckBox
(
QStringLiteral
(
"Enable"
)
,
this
);
connect
(
mEnabledCheckbox
,
&
QCheckBox
::
toggled
,
this
,
[
this
](
bool
toggled
)
{
Q_EMIT
enabledChanged
(
toggled
);
});
...
...
@@ -48,10 +48,10 @@ Logging::Logging(QWidget *parent)
auto
h
=
new
QHBoxLayout
;
l
->
addLayout
(
h
);
h
->
addWidget
(
new
QLabel
(
QStringLiteral
(
"Programs:"
)));
h
->
addWidget
(
new
QLabel
(
QStringLiteral
(
"Programs:"
)
,
this
));
h
->
addWidget
(
mAppFilter
=
new
KCheckComboBox
());
h
->
setStretchFactor
(
mAppFilter
,
2
);
h
->
addWidget
(
new
QLabel
(
QStringLiteral
(
"Types:"
)));
h
->
addWidget
(
new
QLabel
(
QStringLiteral
(
"Types:"
)
,
this
));
h
->
addWidget
(
mTypeFilter
=
new
KCheckComboBox
());
h
->
setStretchFactor
(
mTypeFilter
,
2
);
mTypeFilter
->
addItem
(
QStringLiteral
(
"Debug"
),
QtDebugMsg
);
...
...
@@ -85,7 +85,7 @@ Logging::Logging(QWidget *parent)
h
=
new
QHBoxLayout
;
l
->
addLayout
(
h
);
auto
btn
=
new
QPushButton
(
QStringLiteral
(
"Save to File..."
));
auto
btn
=
new
QPushButton
(
QStringLiteral
(
"Save to File..."
)
,
this
);
connect
(
btn
,
&
QPushButton
::
clicked
,
this
,
&
Logging
::
saveToFile
);
h
->
addWidget
(
btn
);
h
->
addStretch
(
1
);
...
...
src/mainwindow.cpp
View file @
c595fed3
...
...
@@ -20,8 +20,8 @@
MainWindow
::
MainWindow
(
QWidget
*
parent
)
:
KXmlGuiWindow
(
parent
)
,
mMain
(
new
MainWidget
(
this
))
{
mMain
=
new
MainWidget
(
this
);
setCentralWidget
(
mMain
);
KStandardAction
::
quit
(
qApp
,
&
QApplication
::
quit
,
actionCollection
());
...
...
src/mainwindow.h
View file @
c595fed3
...
...
@@ -24,6 +24,6 @@ protected:
void
closeEvent
(
QCloseEvent
*
event
)
override
;
private:
MainWidget
*
mMain
;
MainWidget
*
const
mMain
;
};
src/monitorswidget.cpp
View file @
c595fed3
...
...
@@ -27,9 +27,8 @@ Q_DECLARE_METATYPE(Akonadi::NotificationSubscriber)
MonitorsWidget
::
MonitorsWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mModel
(
new
MonitorsModel
(
this
))
{
mModel
=
new
MonitorsModel
(
this
);
auto
layout
=
new
QHBoxLayout
(
this
);
mTreeView
=
new
QTreeView
(
this
);
...
...
src/monitorswidget.h
View file @
c595fed3
...
...
@@ -36,6 +36,6 @@ private Q_SLOTS:
private:
QTreeView
*
mTreeView
=
nullptr
;
QTreeView
*
mSubscriberView
=
nullptr
;
MonitorsModel
*
mModel
=
nullptr
;
MonitorsModel
*
const
mModel
;
};
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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