MCPcopy Create free account
hub / github.com/KDE/kdevelop / isTextType

Method isTextType

kdevplatform/shell/partcontroller.cpp:127–142  ·  view source on GitHub ↗

MOVE BACK TO DOCUMENTCONTROLLER OR MULTIBUFFER EVENTUALLY

Source from the content-addressed store, hash-verified

125
126//MOVE BACK TO DOCUMENTCONTROLLER OR MULTIBUFFER EVENTUALLY
127bool PartController::isTextType(const QMimeType& mimeType)
128{
129 Q_D(PartController);
130
131 bool isTextType = false;
132 if (d->m_textTypes.contains(mimeType.name()))
133 {
134 isTextType = true;
135 }
136
137 // is this regular text - open in editor
138 return ( isTextType
139 || mimeType.inherits(QStringLiteral("text/plain"))
140 || mimeType.inherits(QStringLiteral("text/html"))
141 || mimeType.inherits(QStringLiteral("application/x-zerosize")));
142}
143
144KTextEditor::Editor* PartController::editorPart() const
145{

Callers 1

openDocumentInternalMethod · 0.80

Calls 2

containsMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected