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
PIM
KAlarm
Commits
429141e2
Commit
429141e2
authored
Oct 13, 2020
by
David Jarvie
Browse files
Use member function syntax for disconnect and KStandardAction connect
parent
013ec1fe
Pipeline
#37575
passed with stage
in 20 minutes and 1 second
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/birthdaydlg.cpp
View file @
429141e2
...
...
@@ -229,8 +229,8 @@ BirthdayDlg::BirthdayDlg(QWidget* parent)
KActionCollection
*
actions
=
new
KActionCollection
(
this
);
KStandardAction
::
selectAll
(
mListView
,
SLOT
(
selectAll
())
,
actions
);
KStandardAction
::
deselect
(
mListView
,
SLOT
(
clearSelection
())
,
actions
);
KStandardAction
::
selectAll
(
mListView
,
&
QTreeView
::
selectAll
,
actions
);
KStandardAction
::
deselect
(
mListView
,
&
QTreeView
::
clearSelection
,
actions
);
actions
->
addAssociatedWidget
(
mListView
);
const
auto
lstActions
=
actions
->
actions
();
for
(
QAction
*
action
:
lstActions
)
...
...
src/templatedlg.cpp
View file @
429141e2
...
...
@@ -104,9 +104,9 @@ TemplateDlg::TemplateDlg(QWidget* parent)
topLayout
->
addWidget
(
buttonBox
);
KActionCollection
*
actions
=
new
KActionCollection
(
this
);
QAction
*
act
=
KStandardAction
::
selectAll
(
mListView
,
SLOT
(
selectAll
())
,
actions
);
QAction
*
act
=
KStandardAction
::
selectAll
(
mListView
,
&
QTreeView
::
selectAll
,
actions
);
topLevelWidget
()
->
addAction
(
act
);
act
=
KStandardAction
::
deselect
(
mListView
,
SLOT
(
clearSelection
())
,
actions
);
act
=
KStandardAction
::
deselect
(
mListView
,
&
QAbstractItemView
::
clearSelection
,
actions
);
topLevelWidget
()
->
addAction
(
act
);
slotSelectionChanged
();
// enable/disable buttons as appropriate
...
...
src/traywindow.cpp
View file @
429141e2
...
...
@@ -84,14 +84,14 @@ TrayWindow::TrayWindow(MainWindow* parent)
addAction
(
QStringLiteral
(
"tSpread"
),
a
);
contextMenu
()
->
addAction
(
a
);
contextMenu
()
->
addSeparator
();
contextMenu
()
->
addAction
(
KStandardAction
::
preferences
(
this
,
SLOT
(
slotPreferences
())
,
this
));
contextMenu
()
->
addAction
(
KStandardAction
::
preferences
(
this
,
&
TrayWindow
::
slotPreferences
,
this
));
// Disable standard quit behaviour. We have to intercept the quit even
,
//
if the main window is hidden
.
// Disable standard quit behaviour. We have to intercept the quit even
t
//
(which triggers KStatusNotifierItem to quit unconditionally)
.
QAction
*
act
=
action
(
QStringLiteral
(
"quit"
));
if
(
act
)
{
act
->
disconnect
(
SIGNAL
(
triggered
(
bool
))
,
this
,
SLOT
(
maybeQuit
())
);
disconnect
(
act
,
&
QAction
::
triggered
,
this
,
nullptr
);
connect
(
act
,
&
QAction
::
triggered
,
this
,
&
TrayWindow
::
slotQuit
);
}
...
...
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