Astyle kdelibs

wilder-work
Montel Laurent 11 years ago
parent ba1ac587c0
commit d65811c6ca
  1. 2
      editor/kmcomposewin.cpp
  2. 5
      editor/kmcomposewin.h
  3. 9
      kmcommands.cpp
  4. 4
      kmmainwidget.cpp
  5. 24
      tag/tagselectdialog.cpp
  6. 2
      tag/tagselectdialog.h

@ -1492,7 +1492,7 @@ QString KMComposeWin::replyTo() const
}
#if 0
void KMComposeWin::decryptOrStripOffCleartextSignature( QByteArray &body )
void KMComposeWin::decryptOrStripOffCleartextSignature(QByteArray &body)
{
QList<Kpgp::Block> pgpBlocks;
QList<QByteArray> nonPgpBlocks;

@ -268,8 +268,7 @@ private:
*/
bool isModified() const;
bool isComposerModified() const;
void changeModifiedState( bool modified );
void changeModifiedState(bool modified);
public Q_SLOTS: // kmkernel, callback
void slotSendNow();
@ -560,7 +559,7 @@ private:
* This function is for example used to restore the unencrypted/unsigned
* message text for editting.
*/
static void decryptOrStripOffCleartextSignature( QByteArray & );
static void decryptOrStripOffCleartextSignature(QByteArray &);
#endif
/**
* Send the message.

@ -1260,12 +1260,12 @@ void KMSetTagCommand::setTags()
Akonadi::Item::List itemsToModify;
Q_FOREACH (const Akonadi::Item &i, mItem) {
Akonadi::Item item(i);
if ( mMode == CleanExistingAndAddNew ){
if (mMode == CleanExistingAndAddNew) {
//WorkAround. ClearTags doesn't work.
Q_FOREACH(const Akonadi::Tag &tag, item.tags()) {
Q_FOREACH (const Akonadi::Tag &tag, item.tags()) {
item.clearTag(tag);
}
//item.clearTags();
//item.clearTags();
}
if (mMode == KMSetTagCommand::Toggle) {
@ -1277,8 +1277,9 @@ void KMSetTagCommand::setTags()
}
}
} else {
if (!mCreatedTags.isEmpty())
if (!mCreatedTags.isEmpty()) {
item.setTags(mCreatedTags);
}
}
itemsToModify << item;
}

@ -1925,10 +1925,10 @@ void KMMainWidget::slotSelectMoreMessageTagList()
}
TagSelectDialog dlg(this, selectedMessages.count(), selectedMessages.first());
dlg.setActionCollection(QList<KActionCollection*>() << actionCollection());
dlg.setActionCollection(QList<KActionCollection *>() << actionCollection());
if (dlg.exec()) {
const Akonadi::Tag::List lst = dlg.selectedTag();
KMCommand *command = new KMSetTagCommand( lst, selectedMessages, KMSetTagCommand::CleanExistingAndAddNew );
KMCommand *command = new KMSetTagCommand(lst, selectedMessages, KMSetTagCommand::CleanExistingAndAddNew);
command->start();
}
}

@ -97,24 +97,24 @@ TagSelectDialog::~TagSelectDialog()
void TagSelectDialog::readConfig()
{
KConfigGroup group( KSharedConfig::openConfig(), "TagSelectDialog" );
const QSize size = group.readEntry( "Size", QSize(500, 300) );
if ( size.isValid() ) {
resize( size );
KConfigGroup group(KSharedConfig::openConfig(), "TagSelectDialog");
const QSize size = group.readEntry("Size", QSize(500, 300));
if (size.isValid()) {
resize(size);
}
}
void TagSelectDialog::writeConfig()
{
KConfigGroup group( KSharedConfig::openConfig(), "TagSelectDialog" );
group.writeEntry( "Size", size() );
KConfigGroup group(KSharedConfig::openConfig(), "TagSelectDialog");
group.writeEntry("Size", size());
}
void TagSelectDialog::slotAddNewTag()
{
QPointer<MailCommon::AddTagDialog> dialog = new MailCommon::AddTagDialog(mActionCollectionList, this);
dialog->setTags(mTagList);
if ( dialog->exec() ) {
if (dialog->exec()) {
mCurrentSelectedTags = selectedTag();
mListTag->clear();
mTagList.clear();
@ -160,13 +160,13 @@ void TagSelectDialog::slotTagsFetched(KJob *job)
if (updatelist) {
const bool select = mCurrentSelectedTags.contains(tag->tag());
item->setCheckState( select ? Qt::Checked : Qt::Unchecked );
item->setCheckState(select ? Qt::Checked : Qt::Unchecked);
} else {
if ( mNumberOfSelectedMessages == 1 ) {
const bool hasTag = mSelectedItem.hasTag( tag->tag() );
item->setCheckState( hasTag ? Qt::Checked : Qt::Unchecked );
if (mNumberOfSelectedMessages == 1) {
const bool hasTag = mSelectedItem.hasTag(tag->tag());
item->setCheckState(hasTag ? Qt::Checked : Qt::Unchecked);
} else {
item->setCheckState( Qt::Unchecked );
item->setCheckState(Qt::Unchecked);
}
}
}

@ -62,7 +62,7 @@ private:
Akonadi::Tag::List mCurrentSelectedTags;
QList<MailCommon::Tag::Ptr> mTagList;
QList<KActionCollection*> mActionCollectionList;
QList<KActionCollection *> mActionCollectionList;
QListWidget *mListTag;
};

Loading…
Cancel
Save