Commit a986f15b authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Avoid using QString::split

We are only interested in the first element of the splitted string, but split will compute all of them. This has some significant performance impact. Instead use indexOf+left to get the first element
parent 722809e8
......@@ -331,7 +331,8 @@ void LoadJob::onNewEntry(const Archive::Entry *entry)
fullPath = fullPath.remove(0, 2);
const QString basePath = fullPath.split(QLatin1Char('/')).at(0);
const int index = fullPath.indexOf(QLatin1Char('/'));
const QString basePath = fullPath.left(index);
if (m_basePath.isEmpty()) {
m_basePath = basePath;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment