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
PIM Messagelib
Commits
fa957a5e
Commit
fa957a5e
authored
Feb 24, 2021
by
Laurent Montel
Browse files
Don't regenerate all actions each time that we add new url
parent
02c72181
Pipeline
#51995
passed with stage
in 42 minutes and 50 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
messageviewer/src/remote-content/remotecontentmenu.cpp
View file @
fa957a5e
...
...
@@ -18,8 +18,8 @@ RemoteContentMenu::RemoteContentMenu(QWidget *parent)
:
QMenu
(
parent
)
{
setTitle
(
i18n
(
"Remote Content"
));
connect
(
this
,
&
QMenu
::
aboutToShow
,
this
,
&
RemoteContentMenu
::
updateMenu
);
initialize
();
updateMenu
();
}
RemoteContentMenu
::~
RemoteContentMenu
()
...
...
@@ -29,12 +29,10 @@ RemoteContentMenu::~RemoteContentMenu()
void
RemoteContentMenu
::
initialize
()
{
mConfigureRemoteContentAction
=
new
QAction
(
i18n
(
"Configure"
),
this
);
connect
(
mConfigureRemoteContentAction
,
&
QAction
::
triggered
,
this
,
&
RemoteContentMenu
::
slotConfigure
);
}
void
RemoteContentMenu
::
slotConfigure
()
{
qDebug
()
<<
" void RemoteContentMenu::slotConfigure()"
;
QPointer
<
MessageViewer
::
RemoteContentConfigureDialog
>
remoteContentDialog
=
new
MessageViewer
::
RemoteContentConfigureDialog
(
this
);
remoteContentDialog
->
exec
();
delete
remoteContentDialog
;
...
...
@@ -64,6 +62,7 @@ void RemoteContentMenu::updateMenu()
}
addSeparator
();
addAction
(
mConfigureRemoteContentAction
);
connect
(
mConfigureRemoteContentAction
,
&
QAction
::
triggered
,
this
,
&
RemoteContentMenu
::
slotConfigure
);
}
void
RemoteContentMenu
::
authorize
(
const
QString
&
url
)
...
...
@@ -84,5 +83,4 @@ void RemoteContentMenu::appendUrl(const QString &url)
if
(
!
mUrls
.
contains
(
url
))
{
mUrls
.
append
(
url
);
}
updateMenu
();
}
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