Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
KPimTextEdit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PIM
KPimTextEdit
Commits
b6a8cc3c
Commit
b6a8cc3c
authored
Feb 23, 2017
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add isEmpty method. We don't want to rely on toPlainText().isEmpty()
(cherry picked from commit
a9361d56
)
parent
d2975557
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
0 deletions
+13
-0
src/texteditor/plaintexteditor/plaintexteditorwidget.cpp
src/texteditor/plaintexteditor/plaintexteditorwidget.cpp
+6
-0
src/texteditor/plaintexteditor/plaintexteditorwidget.h
src/texteditor/plaintexteditor/plaintexteditorwidget.h
+1
-0
src/texteditor/richtexteditor/richtexteditorwidget.cpp
src/texteditor/richtexteditor/richtexteditorwidget.cpp
+5
-0
src/texteditor/richtexteditor/richtexteditorwidget.h
src/texteditor/richtexteditor/richtexteditorwidget.h
+1
-0
No files found.
src/texteditor/plaintexteditor/plaintexteditorwidget.cpp
View file @
b6a8cc3c
...
...
@@ -85,6 +85,12 @@ void PlainTextEditorWidget::setPlainText(const QString &text)
d
->
mEditor
->
setPlainText
(
text
);
}
bool
PlainTextEditorWidget
::
isEmpty
()
const
{
return
d
->
mEditor
->
document
()
->
isEmpty
();
}
QString
PlainTextEditorWidget
::
toPlainText
()
const
{
return
d
->
mEditor
->
toPlainText
();
...
...
src/texteditor/plaintexteditor/plaintexteditorwidget.h
View file @
b6a8cc3c
...
...
@@ -47,6 +47,7 @@ public:
void
clear
();
void
setSpellCheckingConfigFileName
(
const
QString
&
_fileName
);
bool
isEmpty
()
const
;
private
Q_SLOTS
:
void
slotFind
();
void
slotReplace
();
...
...
src/texteditor/richtexteditor/richtexteditorwidget.cpp
View file @
b6a8cc3c
...
...
@@ -106,6 +106,11 @@ void RichTextEditorWidget::setPlainText(const QString &text)
d
->
mEditor
->
setPlainText
(
text
);
}
bool
RichTextEditorWidget
::
isEmpty
()
const
{
return
d
->
mEditor
->
document
()
->
isEmpty
();
}
QString
RichTextEditorWidget
::
toPlainText
()
const
{
return
d
->
mEditor
->
toPlainText
();
...
...
src/texteditor/richtexteditor/richtexteditorwidget.h
View file @
b6a8cc3c
...
...
@@ -55,6 +55,7 @@ public:
void
setSpellCheckingConfigFileName
(
const
QString
&
_fileName
);
bool
isEmpty
()
const
;
public
Q_SLOTS
:
void
slotFindNext
();
void
slotFind
();
...
...
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