|
|
|
@ -359,7 +359,7 @@ QString UBFileSystemUtils::thumbnailPath(const QString& path) |
|
|
|
|
|
|
|
|
|
QString UBFileSystemUtils::extension(const QString& fileName) |
|
|
|
|
{ |
|
|
|
|
QString extension; |
|
|
|
|
QString extension(""); |
|
|
|
|
|
|
|
|
|
int lastDotIndex = fileName.lastIndexOf("."); |
|
|
|
|
|
|
|
|
@ -397,6 +397,7 @@ QString UBFileSystemUtils::lastPathComponent(const QString& path) |
|
|
|
|
|
|
|
|
|
QString UBFileSystemUtils::mimeTypeFromFileName(const QString& fileName) |
|
|
|
|
{ |
|
|
|
|
Q_ASSERT(fileName.length()); |
|
|
|
|
QString ext = extension(fileName); |
|
|
|
|
|
|
|
|
|
if (ext == "xls" || ext == "xlsx") return "application/msexcel"; |
|
|
|
@ -853,4 +854,4 @@ QString UBFileSystemUtils::readTextFile(QString path) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ""; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|