Commit 962c989a authored by David Jarvie's avatar David Jarvie
Browse files

Formatting

parent 4e1fca07
......@@ -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)
......
......@@ -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;
}
......
......@@ -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); }
......
......@@ -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*)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment