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

Method ConfigForMimeType

kdevplatform/shell/sourceformatterconfig.h:84–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82};
83
84inline ConfigForMimeType::ConfigForMimeType(const KConfigGroup& sourceFormatterConfig, const QString& mimeTypeName)
85{
86 m_entry = sourceFormatterConfig.readEntry(mimeTypeName, QString{});
87 if (m_entry.isEmpty()) {
88 Q_ASSERT(!isValid());
89 return;
90 }
91
92 m_formatterEndPos = m_entry.indexOf(delimiter);
93 if (m_formatterEndPos <= 0 || stylePos() >= m_entry.size()) {
94 qCWarning(SHELL) << "Broken formatting entry for mime type" << mimeTypeName << ":" << m_entry;
95 m_formatterEndPos = 0;
96 Q_ASSERT(!isValid());
97 return;
98 }
99
100 Q_ASSERT(isValid());
101}
102
103}
104}

Callers

nothing calls this directly

Calls 5

readEntryMethod · 0.80
isValidFunction · 0.50
isEmptyMethod · 0.45
indexOfMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected