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

Method encodedProjectName

plugins/appwizard/projectselectionpage.cpp:255–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255QByteArray ProjectSelectionPage::encodedProjectName()
256{
257 // : < > * ? / \ | " are invalid on windows
258 QByteArray tEncodedName = projectName().toUtf8();
259 for (int i = 0; i < tEncodedName.size(); ++i)
260 {
261 QChar tChar(QLatin1Char(tEncodedName.at(i)));
262 if (tChar.isDigit() || tChar.isSpace() || tChar.isLetter() || tChar == QLatin1Char('%')) {
263 continue;
264 }
265
266 QByteArray tReplace = QUrl::toPercentEncoding( tChar );
267 tEncodedName.replace( tEncodedName.at( i ) ,tReplace );
268 i = i + tReplace.size() - 1;
269 }
270 return tEncodedName;
271}
272
273QStandardItem* ProjectSelectionPage::currentItem() const
274{

Callers

nothing calls this directly

Calls 4

isDigitMethod · 0.80
sizeMethod · 0.45
atMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected