Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KDE PIM Add-ons
Commits
64f3219f
Commit
64f3219f
authored
Mar 10, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add message in statusbar when it's not a shorten url
parent
344751bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
plugins/messageviewerplugins/common/expandurlplugin/CMakeLists.txt
...essageviewerplugins/common/expandurlplugin/CMakeLists.txt
+1
-1
plugins/messageviewerplugins/common/expandurlplugin/viewerpluginexpandurlinterface.cpp
...common/expandurlplugin/viewerpluginexpandurlinterface.cpp
+3
-2
No files found.
plugins/messageviewerplugins/common/expandurlplugin/CMakeLists.txt
View file @
64f3219f
...
...
@@ -6,7 +6,7 @@ set(messageviewer_expandurlplugin_SRCS
add_library
(
messageviewer_expandurlplugin MODULE
${
messageviewer_expandurlplugin_SRCS
}
)
target_link_libraries
(
messageviewer_expandurlplugin
KF5::MessageViewer KF5::XmlGui
KF5::MessageViewer KF5::XmlGui
KF5::Libkdepim
)
install
(
TARGETS messageviewer_expandurlplugin DESTINATION
${
PLUGIN_INSTALL_DIR
}
/messageviewer
)
...
...
plugins/messageviewerplugins/common/expandurlplugin/viewerpluginexpandurlinterface.cpp
View file @
64f3219f
...
...
@@ -24,6 +24,7 @@
#include <QIcon>
#include <QAction>
#include <BroadcastStatus>
#include <KActionCollection>
#include <KLocalizedString>
...
...
@@ -46,14 +47,14 @@ QAction *ViewerPluginExpandurlInterface::action() const
return
mAction
;
}
void
ViewerPluginExpandurlInterface
::
showWidget
()
void
ViewerPluginExpandurlInterface
::
execute
()
{
if
(
mCurrentUrl
.
isValid
())
{
if
(
MessageViewer
::
ScamCheckShortUrlManager
::
self
()
->
scamCheckShortUrl
()
->
isShortUrl
(
mCurrentUrl
))
{
MessageViewer
::
ScamExpandUrlJob
*
job
=
new
MessageViewer
::
ScamExpandUrlJob
(
this
);
job
->
expandedUrl
(
mCurrentUrl
);
}
else
{
//TODO message in statusbar.
KPIM
::
BroadcastStatus
::
instance
()
->
setStatusMsg
(
i18n
(
"Current Url is not a shorten url."
));
}
}
}
...
...
Write
Preview
Markdown
is supported
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