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

Formatting

parent 4e1fca07
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
#include <QHBoxLayout> #include <QHBoxLayout>
FontColourChooser::FontColourChooser(QWidget *parent, FontColourChooser::FontColourChooser(QWidget* parent, const QStringList& fontList,
const QStringList &fontList, const QString& frameLabel, bool fg, bool defaultFont, int visibleListSize) const QString& frameLabel, bool fg, bool defaultFont, int visibleListSize)
: QWidget(parent), : QWidget(parent),
mFgColourButton(0), mFgColourButton(0),
mReadOnly(false) mReadOnly(false)
......
...@@ -187,7 +187,7 @@ int KAMail::send(JobData& jobdata, QStringList& errmsgs) ...@@ -187,7 +187,7 @@ int KAMail::send(JobData& jobdata, QStringList& errmsgs)
{ {
qDebug() << "Sending via KDE"; qDebug() << "Sending via KDE";
const int transportId = identity.transport().isEmpty() ? -1 : identity.transport().toInt(); const int transportId = identity.transport().isEmpty() ? -1 : identity.transport().toInt();
transport = manager->transportById( transportId, true ); transport = manager->transportById(transportId, true);
if (!transport) if (!transport)
{ {
qCritical() << "No mail transport found for identity" << identity.identityName() << "uoid" << identity.uoid(); qCritical() << "No mail transport found for identity" << identity.identityName() << "uoid" << identity.uoid();
...@@ -359,24 +359,28 @@ QString KAMail::appendBodyAttachments(KMime::Message& message, JobData& data) ...@@ -359,24 +359,28 @@ QString KAMail::appendBodyAttachments(KMime::Message& message, JobData& data)
QString attachError = xi18nc("@info", "Error attaching file: <filename>%1</filename>", attachment); QString attachError = xi18nc("@info", "Error attaching file: <filename>%1</filename>", attachment);
url.cleanPath(); url.cleanPath();
KIO::UDSEntry uds; KIO::UDSEntry uds;
if (!KIO::NetAccess::stat(url, uds, MainWindow::mainMainWindow())) { if (!KIO::NetAccess::stat(url, uds, MainWindow::mainMainWindow()))
{
qCritical() << "Not found:" << attachment; qCritical() << "Not found:" << attachment;
return xi18nc("@info", "Attachment not found: <filename>%1</filename>", attachment); return xi18nc("@info", "Attachment not found: <filename>%1</filename>", attachment);
} }
KFileItem fi(uds, url); KFileItem fi(uds, url);
if (fi.isDir() || !fi.isReadable()) { if (fi.isDir() || !fi.isReadable())
{
qCritical() << "Not file/not readable:" << attachment; qCritical() << "Not file/not readable:" << attachment;
return attachError; return attachError;
} }
// Read the file contents // Read the file contents
QString tmpFile; QString tmpFile;
if (!KIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow())) { if (!KIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow()))
{
qCritical() << "Load failure:" << attachment; qCritical() << "Load failure:" << attachment;
return attachError; return attachError;
} }
QFile file(tmpFile); QFile file(tmpFile);
if (!file.open(QIODevice::ReadOnly)) { if (!file.open(QIODevice::ReadOnly))
{
qDebug() << "tmp load error:" << attachment; qDebug() << "tmp load error:" << attachment;
return attachError; return attachError;
} }
...@@ -384,7 +388,8 @@ QString KAMail::appendBodyAttachments(KMime::Message& message, JobData& data) ...@@ -384,7 +388,8 @@ QString KAMail::appendBodyAttachments(KMime::Message& message, JobData& data)
QByteArray contents = file.readAll(); QByteArray contents = file.readAll();
file.close(); file.close();
bool atterror = false; bool atterror = false;
if (contents.size() < size) { if (contents.size() < size)
{
qDebug() << "Read error:" << attachment; qDebug() << "Read error:" << attachment;
atterror = true; atterror = true;
} }
......
...@@ -145,7 +145,7 @@ class KAMessageBox ...@@ -145,7 +145,7 @@ class KAMessageBox
static int questionYesNoCancel(QWidget* parent, const QString& text, const QString& caption = QString(), static int questionYesNoCancel(QWidget* parent, const QString& text, const QString& caption = QString(),
const KGuiItem& buttonYes = KStandardGuiItem::yes(), const KGuiItem& buttonYes = KStandardGuiItem::yes(),
const KGuiItem& buttonNo = KStandardGuiItem::no(), 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)) const QString& dontAskAgainName = QString(), KMessageBox::Options options = KMessageBox::Options(KMessageBox::Notify|KMessageBox::WindowModal))
{ return KMessageBox::questionYesNoCancel(parent, text, caption, buttonYes, buttonNo, buttonCancel, dontAskAgainName, options); } { return KMessageBox::questionYesNoCancel(parent, text, caption, buttonYes, buttonNo, buttonCancel, dontAskAgainName, options); }
......
...@@ -149,7 +149,7 @@ KAlarmPrefDlg::KAlarmPrefDlg() ...@@ -149,7 +149,7 @@ KAlarmPrefDlg::KAlarmPrefDlg()
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
setObjectName(QLatin1String("PrefDlg")); // used by LikeBack setObjectName(QLatin1String("PrefDlg")); // used by LikeBack
setWindowTitle(i18nc("@title:window", "Configure")); 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); button(QDialogButtonBox::Ok)->setDefault(true);
setFaceType(List); setFaceType(List);
mTabScrollGroup = new StackedScrollGroup(this, this); mTabScrollGroup = new StackedScrollGroup(this, this);
...@@ -1007,7 +1007,7 @@ EmailPrefTab::EmailPrefTab(StackedScrollGroup* scrollGroup) ...@@ -1007,7 +1007,7 @@ EmailPrefTab::EmailPrefTab(StackedScrollGroup* scrollGroup)
grid->setColumnStretch(2, 1); grid->setColumnStretch(2, 1);
// 'From' email address controls ... // '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); grid->addWidget(label, 1, 0);
mFromAddressGroup = new ButtonGroup(group); mFromAddressGroup = new ButtonGroup(group);
connect(mFromAddressGroup, SIGNAL(buttonSet(QAbstractButton*)), SLOT(slotFromAddrChanged(QAbstractButton*))); 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