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
b7e5064e
Commit
b7e5064e
authored
Sep 24, 2022
by
Laurent Montel
Browse files
We depend against kf5.98
parent
e88ab735
Pipeline
#236409
passed with stage
in 13 minutes and 44 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
messagecomposer/src/attachment/attachmentcontrollerbase.cpp
View file @
b7e5064e
...
...
@@ -25,12 +25,7 @@
#include
<MessageCore/StringUtil>
#include
<Akonadi/ItemFetchJob>
#include
<kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
#include
<KIO/JobUiDelegateFactory>
#else
#include
<KIO/JobUiDelegate>
#endif
#include
<QIcon>
#include
<QMenu>
...
...
@@ -688,11 +683,7 @@ void AttachmentControllerBase::openWith(const KService::Ptr &offer)
// If offer is null, this will show the "open with" dialog
auto
job
=
new
KIO
::
ApplicationLauncherJob
(
offer
);
job
->
setUrls
({
url
});
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
job
->
setUiDelegate
(
KIO
::
createDefaultJobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
d
->
wParent
));
#else
job
->
setUiDelegate
(
new
KIO
::
JobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
d
->
wParent
));
#endif
job
->
start
();
connect
(
job
,
&
KJob
::
result
,
this
,
[
tempFile
,
job
]()
{
if
(
job
->
error
())
{
...
...
@@ -713,11 +704,7 @@ void AttachmentControllerBase::openAttachment(const AttachmentPart::Ptr &part)
}
tempFile
->
setPermissions
(
QFile
::
ReadUser
);
auto
job
=
new
KIO
::
OpenUrlJob
(
QUrl
::
fromLocalFile
(
tempFile
->
fileName
()),
QString
::
fromLatin1
(
part
->
mimeType
()));
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
job
->
setUiDelegate
(
KIO
::
createDefaultJobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
d
->
wParent
));
#else
job
->
setUiDelegate
(
new
KIO
::
JobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
d
->
wParent
));
#endif
job
->
setDeleteTemporaryFile
(
true
);
connect
(
job
,
&
KIO
::
OpenUrlJob
::
result
,
this
,
[
this
,
tempFile
](
KJob
*
job
)
{
if
(
job
->
error
()
==
KIO
::
ERR_USER_CANCELED
)
{
...
...
messagecomposer/src/snippet/convertsnippetvariablesjob.cpp
View file @
b7e5064e
...
...
@@ -276,6 +276,7 @@ QString ConvertSnippetVariablesJob::getLastNameFromEmail(const QString &address)
for
(
const
QString
&
str
:
lst
)
{
KMime
::
Types
::
Mailbox
newAddress
;
newAddress
.
fromUnicodeString
(
KEmailAddress
::
normalizeAddressesAndEncodeIdn
(
str
));
qDebug
()
<<
"newAddress.name() "
<<
newAddress
.
name
();
const
QString
lastName
=
TemplateParser
::
Util
::
getLastNameFromEmail
(
newAddress
.
name
());
if
(
!
lastName
.
isEmpty
())
{
resultName
<<
lastName
;
...
...
messageviewer/src/viewer/viewer_p.cpp
View file @
b7e5064e
...
...
@@ -49,12 +49,7 @@
#include
<KEmailAddress>
#include
<KFileItemActions>
#include
<KIO/ApplicationLauncherJob>
#include
<kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
#include
<KIO/JobUiDelegateFactory>
#else
#include
<KIO/JobUiDelegate>
#endif
#include
<KIO/OpenUrlJob>
#include
<KLocalizedString>
#include
<KMessageBox>
...
...
@@ -284,11 +279,7 @@ void ViewerPrivate::openAttachment(KMime::Content *node, const QUrl &url)
if
(
ct
->
mimeType
()
==
"message/external-body"
)
{
if
(
ct
->
hasParameter
(
QStringLiteral
(
"url"
)))
{
auto
job
=
new
KIO
::
OpenUrlJob
(
url
,
QStringLiteral
(
"text/html"
));
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
job
->
setUiDelegate
(
KIO
::
createDefaultJobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
q
));
#else
job
->
setUiDelegate
(
new
KIO
::
JobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
q
));
#endif
job
->
start
();
return
;
}
...
...
@@ -689,11 +680,7 @@ void ViewerPrivate::attachmentOpenWith(KMime::Content *node, const KService::Ptr
auto
job
=
new
KIO
::
ApplicationLauncherJob
(
offer
);
job
->
setUrls
({
url
});
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
job
->
setUiDelegate
(
KIO
::
createDefaultJobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
mMainWindow
));
#else
job
->
setUiDelegate
(
new
KIO
::
JobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
mMainWindow
));
#endif
job
->
start
();
connect
(
job
,
&
KJob
::
result
,
this
,
[
url
,
job
]()
{
if
(
job
->
error
())
{
...
...
@@ -1945,11 +1932,7 @@ void ViewerPrivate::executeRunner(const QUrl &url)
{
if
(
!
MessageViewer
::
Util
::
handleUrlWithQDesktopServices
(
url
))
{
auto
job
=
new
KIO
::
OpenUrlJob
(
url
);
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
job
->
setUiDelegate
(
KIO
::
createDefaultJobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
viewer
()));
#else
job
->
setUiDelegate
(
new
KIO
::
JobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
viewer
()));
#endif
job
->
setRunExecutables
(
false
);
job
->
start
();
}
...
...
@@ -2276,11 +2259,7 @@ void ViewerPrivate::slotExportHtmlPageSuccess(const QString &filename)
{
const
QUrl
url
(
QUrl
::
fromLocalFile
(
filename
));
auto
job
=
new
KIO
::
OpenUrlJob
(
url
,
QStringLiteral
(
"text/html"
),
q
);
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
job
->
setUiDelegate
(
KIO
::
createDefaultJobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
q
));
#else
job
->
setUiDelegate
(
new
KIO
::
JobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
q
));
#endif
job
->
setDeleteTemporaryFile
(
true
);
job
->
start
();
...
...
messageviewer/src/widgets/opensavedfilefolderwidget.cpp
View file @
b7e5064e
...
...
@@ -6,12 +6,7 @@
#include
"opensavedfilefolderwidget.h"
#include
<kio_version.h>
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
#include
<KIO/JobUiDelegateFactory>
#else
#include
<KIO/JobUiDelegate>
#endif
#include
<KIO/OpenFileManagerWindowJob>
#include
<KIO/OpenUrlJob>
#include
<KLocalizedString>
...
...
@@ -75,11 +70,7 @@ void OpenSavedFileFolderWidget::slotOpenFile()
{
for
(
const
auto
&
url
:
std
::
as_const
(
mUrls
))
{
auto
job
=
new
KIO
::
OpenUrlJob
(
url
);
#if KIO_VERSION >= QT_VERSION_CHECK(5, 98, 0)
job
->
setUiDelegate
(
KIO
::
createDefaultJobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
this
));
#else
job
->
setUiDelegate
(
new
KIO
::
JobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
this
));
#endif
job
->
setDeleteTemporaryFile
(
true
);
connect
(
job
,
&
KIO
::
OpenUrlJob
::
result
,
this
,
[
this
](
KJob
*
job
)
{
if
(
job
->
error
()
==
KIO
::
ERR_USER_CANCELED
)
{
...
...
templateparser/src/templatesutil.cpp
View file @
b7e5064e
...
...
@@ -101,7 +101,7 @@ QString TemplateParser::Util::getFirstNameFromEmail(const QString &str)
}
return
res
;
}
#include
<QDebug>
QString
TemplateParser
::
Util
::
getLastNameFromEmail
(
const
QString
&
str
)
{
// simple logic:
...
...
@@ -134,6 +134,7 @@ QString TemplateParser::Util::getLastNameFromEmail(const QString &str)
}
}
}
qDebug
()
<<
" res "
<<
res
;
return
res
;
}
...
...
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