Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KAlarm
Commits
962c989a
Commit
962c989a
authored
Aug 20, 2014
by
David Jarvie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting
parent
4e1fca07
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
11 deletions
+16
-11
fontcolour.cpp
fontcolour.cpp
+2
-2
kamail.cpp
kamail.cpp
+11
-6
lib/messagebox.h
lib/messagebox.h
+1
-1
prefdlg.cpp
prefdlg.cpp
+2
-2
No files found.
fontcolour.cpp
View file @
962c989a
...
...
@@ -35,8 +35,8 @@
#include <QHBoxLayout>
FontColourChooser
::
FontColourChooser
(
QWidget
*
parent
,
const
QStringList
&
fontList
,
const
QString
&
frameLabel
,
bool
fg
,
bool
defaultFont
,
int
visibleListSize
)
FontColourChooser
::
FontColourChooser
(
QWidget
*
parent
,
const
QStringList
&
fontList
,
const
QString
&
frameLabel
,
bool
fg
,
bool
defaultFont
,
int
visibleListSize
)
:
QWidget
(
parent
),
mFgColourButton
(
0
),
mReadOnly
(
false
)
...
...
kamail.cpp
View file @
962c989a
...
...
@@ -187,7 +187,7 @@ int KAMail::send(JobData& jobdata, QStringList& errmsgs)
{
qDebug
()
<<
"Sending via KDE"
;
const
int
transportId
=
identity
.
transport
().
isEmpty
()
?
-
1
:
identity
.
transport
().
toInt
();
transport
=
manager
->
transportById
(
transportId
,
true
);
transport
=
manager
->
transportById
(
transportId
,
true
);
if
(
!
transport
)
{
qCritical
()
<<
"No mail transport found for identity"
<<
identity
.
identityName
()
<<
"uoid"
<<
identity
.
uoid
();
...
...
@@ -359,24 +359,28 @@ QString KAMail::appendBodyAttachments(KMime::Message& message, JobData& data)
QString
attachError
=
xi18nc
(
"@info"
,
"Error attaching file: <filename>%1</filename>"
,
attachment
);
url
.
cleanPath
();
KIO
::
UDSEntry
uds
;
if
(
!
KIO
::
NetAccess
::
stat
(
url
,
uds
,
MainWindow
::
mainMainWindow
()))
{
if
(
!
KIO
::
NetAccess
::
stat
(
url
,
uds
,
MainWindow
::
mainMainWindow
()))
{
qCritical
()
<<
"Not found:"
<<
attachment
;
return
xi18nc
(
"@info"
,
"Attachment not found: <filename>%1</filename>"
,
attachment
);
}
KFileItem
fi
(
uds
,
url
);
if
(
fi
.
isDir
()
||
!
fi
.
isReadable
())
{
if
(
fi
.
isDir
()
||
!
fi
.
isReadable
())
{
qCritical
()
<<
"Not file/not readable:"
<<
attachment
;
return
attachError
;
}
// Read the file contents
QString
tmpFile
;
if
(
!
KIO
::
NetAccess
::
download
(
url
,
tmpFile
,
MainWindow
::
mainMainWindow
()))
{
if
(
!
KIO
::
NetAccess
::
download
(
url
,
tmpFile
,
MainWindow
::
mainMainWindow
()))
{
qCritical
()
<<
"Load failure:"
<<
attachment
;
return
attachError
;
}
QFile
file
(
tmpFile
);
if
(
!
file
.
open
(
QIODevice
::
ReadOnly
))
{
if
(
!
file
.
open
(
QIODevice
::
ReadOnly
))
{
qDebug
()
<<
"tmp load error:"
<<
attachment
;
return
attachError
;
}
...
...
@@ -384,7 +388,8 @@ QString KAMail::appendBodyAttachments(KMime::Message& message, JobData& data)
QByteArray
contents
=
file
.
readAll
();
file
.
close
();
bool
atterror
=
false
;
if
(
contents
.
size
()
<
size
)
{
if
(
contents
.
size
()
<
size
)
{
qDebug
()
<<
"Read error:"
<<
attachment
;
atterror
=
true
;
}
...
...
lib/messagebox.h
View file @
962c989a
...
...
@@ -145,7 +145,7 @@ class KAMessageBox
static
int
questionYesNoCancel
(
QWidget
*
parent
,
const
QString
&
text
,
const
QString
&
caption
=
QString
(),
const
KGuiItem
&
buttonYes
=
KStandardGuiItem
::
yes
(),
const
KGuiItem
&
buttonNo
=
KStandardGuiItem
::
no
(),
const
KGuiItem
&
buttonCancel
=
KStandardGuiItem
::
cancel
(),
const
KGuiItem
&
buttonCancel
=
KStandardGuiItem
::
cancel
(),
const
QString
&
dontAskAgainName
=
QString
(),
KMessageBox
::
Options
options
=
KMessageBox
::
Options
(
KMessageBox
::
Notify
|
KMessageBox
::
WindowModal
))
{
return
KMessageBox
::
questionYesNoCancel
(
parent
,
text
,
caption
,
buttonYes
,
buttonNo
,
buttonCancel
,
dontAskAgainName
,
options
);
}
...
...
prefdlg.cpp
View file @
962c989a
...
...
@@ -149,7 +149,7 @@ KAlarmPrefDlg::KAlarmPrefDlg()
setAttribute
(
Qt
::
WA_DeleteOnClose
);
setObjectName
(
QLatin1String
(
"PrefDlg"
));
// used by LikeBack
setWindowTitle
(
i18nc
(
"@title:window"
,
"Configure"
));
setStandardButtons
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
|
QDialogButtonBox
::
RestoreDefaults
|
QDialogButtonBox
::
Apply
);
setStandardButtons
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
|
QDialogButtonBox
::
RestoreDefaults
|
QDialogButtonBox
::
Apply
);
button
(
QDialogButtonBox
::
Ok
)
->
setDefault
(
true
);
setFaceType
(
List
);
mTabScrollGroup
=
new
StackedScrollGroup
(
this
,
this
);
...
...
@@ -1007,7 +1007,7 @@ EmailPrefTab::EmailPrefTab(StackedScrollGroup* scrollGroup)
grid
->
setColumnStretch
(
2
,
1
);
// 'From' email address controls ...
QLabel
*
label
=
new
Label
(
i18nc
(
"@label 'From' email address"
,
"From:"
),
group
);
QLabel
*
label
=
new
Label
(
i18nc
(
"@label 'From' email address"
,
"From:"
),
group
);
grid
->
addWidget
(
label
,
1
,
0
);
mFromAddressGroup
=
new
ButtonGroup
(
group
);
connect
(
mFromAddressGroup
,
SIGNAL
(
buttonSet
(
QAbstractButton
*
)),
SLOT
(
slotFromAddrChanged
(
QAbstractButton
*
)));
...
...
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