Commit 7f8670d8 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Replace regexp to get the suffix by QFileInfo

parent b6a82447
......@@ -103,10 +103,8 @@ bool KoImageDataPrivate::saveData(QIODevice &device)
void KoImageDataPrivate::setSuffix(const QString &name)
{
QRegExp rx("\\.([^/]+$)"); // TODO does this work on windows or do we have to use \ instead of / for a path separator?
if (rx.indexIn(name) != -1) {
suffix = rx.cap(1);
}
QFileInfo fi(name);
suffix = fi.suffix();
}
void KoImageDataPrivate::copyToTemporary(QIODevice &device)
......
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