Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMail
Commits
7c51f6dc
Commit
7c51f6dc
authored
Mar 04, 2022
by
Laurent Montel
😁
Browse files
Add own subjectlineeditwithautocorrection
parent
b2dab8be
Pipeline
#145007
failed with stage
in 3 minutes and 48 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/CMakeLists.txt
View file @
7c51f6dc
...
...
@@ -87,6 +87,8 @@ target_sources(kmailprivate PRIVATE
identity/identityinvalidfolder.cpp
identity/identityfolderrequester.cpp
editor/kmcomposereditorng.cpp
editor/subjectlineeditwithautocorrection.cpp
editor/subjectlineeditwithautocorrection.h
editor/composer.cpp
editor/codec/codecaction.cpp
editor/codec/codecmanager.cpp
...
...
src/editor/kmcomposerwin.cpp
View file @
7c51f6dc
...
...
@@ -10,6 +10,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "kmcomposerwin.h"
#include "subjectlineeditwithautocorrection.h"
// KMail includes
#include "attachment/attachmentcontroller.h"
#include "attachment/attachmentview.h"
...
...
@@ -331,10 +332,8 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg,
connect
(
recipientsEditor
,
&
MessageComposer
::
RecipientsEditor
::
focusInRecipientLineEdit
,
this
,
&
KMComposerWin
::
slotRecipientEditorLineFocused
);
mComposerBase
->
setRecipientsEditor
(
recipientsEditor
);
mEdtSubject
=
new
PimCommon
::
LineEditWithAutoCorrection
(
mHeadersArea
,
QStringLiteral
(
"kmail2rc"
));
mEdtSubject
=
new
Subject
LineEditWithAutoCorrection
(
mHeadersArea
,
QStringLiteral
(
"kmail2rc"
));
mEdtSubject
->
installEventFilter
(
this
);
mEdtSubject
->
setActivateLanguageMenu
(
false
);
mEdtSubject
->
setToolTip
(
i18n
(
"Set a subject for this message"
));
mEdtSubject
->
setAutocorrection
(
KMKernel
::
self
()
->
composerAutoCorrection
());
mLblIdentity
=
new
QLabel
(
i18n
(
"&Identity:"
),
mHeadersArea
);
mDictionaryLabel
=
new
QLabel
(
i18n
(
"&Dictionary:"
),
mHeadersArea
);
...
...
src/editor/kmcomposerwin.h
View file @
7c51f6dc
...
...
@@ -61,6 +61,7 @@ class KMailPluginGrammarEditorManagerInterface;
class
AttachmentAddedFromExternalWarning
;
class
KHamburgerMenu
;
class
TooManyRecipientsWarning
;
class
SubjectLineEditWithAutoCorrection
;
namespace
MailTransport
{
class
Transport
;
...
...
@@ -591,7 +592,7 @@ private:
QWidget
*
mMainWidget
=
nullptr
;
MessageComposer
::
ComposerLineEdit
*
mEdtFrom
=
nullptr
;
PimCommon
::
LineEditWithAutoCorrection
*
mEdtSubject
=
nullptr
;
Subject
LineEditWithAutoCorrection
*
mEdtSubject
=
nullptr
;
QLabel
*
mLblIdentity
=
nullptr
;
QLabel
*
mLblTransport
=
nullptr
;
QLabel
*
mLblFcc
=
nullptr
;
...
...
src/editor/subjectlineeditwithautocorrection.cpp
0 → 100644
View file @
7c51f6dc
/*
* This file is part of KMail.
* SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "subjectlineeditwithautocorrection.h"
#include <KLocalizedString>
SubjectLineEditWithAutoCorrection
::
SubjectLineEditWithAutoCorrection
(
QWidget
*
parent
,
const
QString
&
configFile
)
:
PimCommon
::
LineEditWithAutoCorrection
(
parent
,
configFile
)
{
setActivateLanguageMenu
(
false
);
setToolTip
(
i18n
(
"Set a subject for this message"
));
}
SubjectLineEditWithAutoCorrection
::~
SubjectLineEditWithAutoCorrection
()
{
}
src/editor/subjectlineeditwithautocorrection.h
0 → 100644
View file @
7c51f6dc
/*
* This file is part of KMail.
* SPDX-FileCopyrightText: 2022 Laurent Montel <montel@kde.org>
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include "kmail_private_export.h"
#include <PimCommon/LineEditWithAutoCorrection>
class
KMAILTESTS_TESTS_EXPORT
SubjectLineEditWithAutoCorrection
:
public
PimCommon
::
LineEditWithAutoCorrection
{
Q_OBJECT
public:
explicit
SubjectLineEditWithAutoCorrection
(
QWidget
*
parent
,
const
QString
&
configFile
);
~
SubjectLineEditWithAutoCorrection
()
override
;
};
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