Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 5ef4d08d authored by Laurent Montel's avatar Laurent Montel 😁

Use new connect api. Remove warning. Reorder variable in kmmainwidget.h etc

parent 8e124e5f
......@@ -39,7 +39,7 @@ private:
void slotCreateNewComposer(bool forceCursorPosition);
Akonadi::Collection mCollectionForNewMessage;
KMime::Message::Ptr mMsg;
uint mCurrentIdentity;
uint mCurrentIdentity = 0;
};
#endif // KMCOMPOSERCREATENEWCOMPOSERJOB_H
......@@ -57,10 +57,10 @@ private:
QString mCustomTemplate;
KMime::Message::Ptr mMsg;
Akonadi::Collection mCollectionForNewMessage;
uint mUoldId;
uint mUoid;
uint mUoldId = 0;
uint mUoid = 0;
KIdentityManagement::Identity mIdent;
bool mWasModified;
bool mWasModified = false;
};
#endif // KMCOMPOSERUPDATETEMPLATEJOB_H
......@@ -22,7 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "kmcomposerwin.h"
#include "kconfigwidgets_version.h"
// KMail includes
#include "job/addressvalidationjob.h"
#include "kmcomposercreatenewcomposerjob.h"
......@@ -1099,8 +1099,8 @@ void KMComposerWin::setupActions(void)
actionCollection()->addAction(QStringLiteral("send_alternative_via"), actActionNowMenu);
}
connect(actActionNowMenu, SIGNAL(triggered(bool)), this,
SLOT(slotSendNow()));
connect(actActionNowMenu, &QAction::triggered, this,
&KMComposerWin::slotSendNow);
connect(actActionLaterMenu, &QAction::triggered, this,
&KMComposerWin::slotSendLater);
connect(actActionNowMenu, &KActionMenuTransport::transportSelected, this,
......@@ -1166,7 +1166,11 @@ void KMComposerWin::setupActions(void)
KStandardAction::redo(mGlobalAction, &KMComposerGlobalAction::slotRedo, actionCollection());
KStandardAction::cut(mGlobalAction, &KMComposerGlobalAction::slotCut, actionCollection());
KStandardAction::copy(mGlobalAction, &KMComposerGlobalAction::slotCopy, actionCollection());
#if KCONFIGWIDGETS_VERSION_MINOR >= 39
KStandardAction::paste(mGlobalAction, &KMComposerGlobalAction::slotPaste, actionCollection());
#else
KStandardAction::pasteText(mGlobalAction, &KMComposerGlobalAction::slotPaste, actionCollection());
#endif
mSelectAll = KStandardAction::selectAll(mGlobalAction, &KMComposerGlobalAction::slotMarkAll, actionCollection());
mFindText = KStandardAction::find(mRichTextEditorwidget, &KPIMTextEdit::RichTextEditorWidget::slotFind, actionCollection());
......@@ -1279,7 +1283,7 @@ void KMComposerWin::setupActions(void)
KStandardAction::keyBindings(this, &KMComposerWin::slotEditKeys, actionCollection());
KStandardAction::configureToolbars(this, &KMComposerWin::slotEditToolbars, actionCollection());
KStandardAction::preferences(kmkernel, SLOT(slotShowConfigurationDialog()), actionCollection());
KStandardAction::preferences(kmkernel, &KMKernel::slotShowConfigurationDialog, actionCollection());
action = new QAction(i18n("&Spellchecker..."), this);
action->setIconText(i18n("Spellchecker"));
......@@ -1315,7 +1319,7 @@ void KMComposerWin::setupActions(void)
mCryptoModuleAction = new KSelectAction(i18n("&Cryptographic Message Format"), this);
actionCollection()->addAction(QStringLiteral("options_select_crypto"), mCryptoModuleAction);
connect(mCryptoModuleAction, SIGNAL(triggered(int)), SLOT(slotSelectCryptoModule()));
connect(mCryptoModuleAction, QOverload<int>::of(&KSelectAction::triggered), this, &KMComposerWin::slotCryptoModuleSelected);
mCryptoModuleAction->setToolTip(i18n("Select a cryptographic format for this message"));
mCryptoModuleAction->setItems(listCryptoFormat);
......@@ -1912,6 +1916,11 @@ void KMComposerWin::slotInsertTextFile(KJob *job)
showErrorMessage(job);
}
void KMComposerWin::slotCryptoModuleSelected()
{
slotSelectCryptoModule(false);
}
void KMComposerWin::slotSelectCryptoModule(bool init)
{
if (!init) {
......
......@@ -306,7 +306,7 @@ private Q_SLOTS:
* Change crypto plugin to be used for signing/encrypting messages,
* or switch to built-in OpenPGP code.
*/
void slotSelectCryptoModule(bool init = false);
void slotSelectCryptoModule(bool init);
/**
* XML-GUI stuff
......@@ -531,6 +531,7 @@ private:
KeyOk,
NoKey
};
void slotCryptoModuleSelected();
void updateComposerAfterIdentityChanged(const KIdentityManagement::Identity &ident, uint uoid, bool wasModified);
......@@ -555,23 +556,24 @@ private:
QLabel *mCursorLineLabel = nullptr;
QLabel *mCursorColumnLabel = nullptr;
QLabel *mStatusbarLabel = nullptr;
bool mDone;
bool mDone = false;
KMime::Message::Ptr mMsg;
QGridLayout *mGrid = nullptr;
QString mTextSelection;
QString mCustomTemplate;
bool mLastSignActionState;
bool mLastEncryptActionState;
bool mSigningAndEncryptionExplicitlyDisabled;
bool mLastIdentityHasSigningKey;
bool mLastIdentityHasEncryptionKey;
bool mLastSignActionState = false;
bool mLastEncryptActionState = false;
bool mSigningAndEncryptionExplicitlyDisabled = false;
bool mLastIdentityHasSigningKey = false;
bool mLastIdentityHasEncryptionKey = false;
Akonadi::Collection mFolder;
long mShowHeaders;
bool mForceDisableHtml; // Completely disable any HTML. Useful when sending invitations in the
bool mForceDisableHtml = false; // Completely disable any HTML. Useful when sending invitations in the
// mail body.
int mNumHeaders;
QFont mBodyFont, mFixedFont;
QFont mBodyFont;
QFont mFixedFont;
uint mId;
TemplateContext mContext;
......@@ -630,11 +632,11 @@ private:
ExternalEditorWarning *mExternalEditorWarning = nullptr;
QTimer *mVerifyMissingAttachment = nullptr;
MailCommon::FolderRequester *mFccFolder = nullptr;
bool mPreventFccOverwrite;
bool mCheckForForgottenAttachments;
bool mWasModified;
bool mPreventFccOverwrite = false;
bool mCheckForForgottenAttachments = false;
bool mWasModified = false;
CryptoStateIndicatorWidget *mCryptoStateIndicatorWidget = nullptr;
bool mSendNowByShortcutUsed;
bool mSendNowByShortcutUsed = false;
KSplitterCollapserButton *mSnippetSplitterCollapser = nullptr;
KToggleAction *mFollowUpToggleAction = nullptr;
StatusBarLabelToggledState *mStatusBarLabelToggledOverrideMode = nullptr;
......
......@@ -28,9 +28,6 @@
CryptoStateIndicatorWidget::CryptoStateIndicatorWidget(QWidget *parent)
: QWidget(parent)
, mShowAlwaysIndicator(true)
, mIsSign(false)
, mIsEncrypted(false)
{
QHBoxLayout *hbox = new QHBoxLayout(this);
hbox->setMargin(0);
......
......@@ -38,9 +38,9 @@ private:
void updateShowAlwaysIndicator();
QLabel *mSignatureStateIndicator = nullptr;
QLabel *mEncryptionStateIndicator = nullptr;
bool mShowAlwaysIndicator;
bool mIsSign;
bool mIsEncrypted;
bool mShowAlwaysIndicator = true;
bool mIsSign = false;
bool mIsEncrypted = false;
};
#endif // CRYPTOSTATEINDICATORWIDGET_H
This diff is collapsed.
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