| 253 | } |
| 254 | |
| 255 | QByteArray 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 | |
| 273 | QStandardItem* ProjectSelectionPage::currentItem() const |
| 274 | { |