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
KPimTextEdit
Commits
067308b6
Commit
067308b6
authored
Mar 17, 2022
by
Laurent Montel
😁
Browse files
Const'ify pointer
parent
f8f5d1de
Pipeline
#151815
skipped
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/inserthtmleditor.cpp
View file @
067308b6
...
...
@@ -21,6 +21,7 @@ using namespace KPIMTextEdit;
InsertHtmlEditor
::
InsertHtmlEditor
(
QWidget
*
parent
)
:
KPIMTextEdit
::
PlainTextEditor
(
parent
)
,
mTextEditorCompleter
(
new
KPIMTextEdit
::
TextEditorCompleter
(
this
,
this
))
{
const
KSyntaxHighlighting
::
Definition
def
=
mRepo
.
definitionForName
(
QStringLiteral
(
"HTML"
));
if
(
!
def
.
isValid
())
{
...
...
@@ -32,7 +33,6 @@ InsertHtmlEditor::InsertHtmlEditor(QWidget *parent)
:
mRepo
.
defaultTheme
(
KSyntaxHighlighting
::
Repository
::
LightTheme
));
hl
->
setDefinition
(
def
);
setFocus
();
mTextEditorCompleter
=
new
KPIMTextEdit
::
TextEditorCompleter
(
this
,
this
);
const
QStringList
completerList
=
{
QStringLiteral
(
"<b></b>"
),
QStringLiteral
(
"<i></i>"
),
QStringLiteral
(
"<u></u>"
)};
// Add more
mTextEditorCompleter
->
setCompleterStringList
(
completerList
);
...
...
src/inserthtmleditor.h
View file @
067308b6
...
...
@@ -26,7 +26,7 @@ protected:
void
keyPressEvent
(
QKeyEvent
*
e
)
override
;
private:
KPIMTextEdit
::
TextEditorCompleter
*
mTextEditorCompleter
=
nullptr
;
KPIMTextEdit
::
TextEditorCompleter
*
const
mTextEditorCompleter
;
KSyntaxHighlighting
::
Repository
mRepo
;
};
}
...
...
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