mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 19:38:22 +02:00
use case insensitive check for extensions
This commit is contained in:
parent
f71d2d00d2
commit
0fee004bdd
1 changed files with 4 additions and 4 deletions
|
@ -4079,7 +4079,7 @@ bool Application::canAcceptURL(const QString& urlString) {
|
|||
QString lowerPath = url.path().toLower();
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
if (lowerPath.endsWith(i.key())) {
|
||||
if (lowerPath.endsWith(i.key(), Qt::CaseInsensitive)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -4099,7 +4099,7 @@ bool Application::acceptURL(const QString& urlString, bool defaultUpload) {
|
|||
QString lowerPath = url.path().toLower();
|
||||
while (i.hasNext()) {
|
||||
i.next();
|
||||
if (lowerPath.endsWith(i.key())) {
|
||||
if (lowerPath.endsWith(i.key(), Qt::CaseInsensitive)) {
|
||||
AcceptURLMethod method = i.value();
|
||||
return (this->*method)(urlString);
|
||||
}
|
||||
|
@ -4199,7 +4199,7 @@ bool Application::askToUploadAsset(const QString& filename) {
|
|||
messageBox.setDefaultButton(QMessageBox::Ok);
|
||||
|
||||
// Option to drop model in world for models
|
||||
if (filename.endsWith(FBX_EXTENSION) || filename.endsWith(OBJ_EXTENSION)) {
|
||||
if (filename.endsWith(FBX_EXTENSION, Qt::CaseInsensitive) || filename.endsWith(OBJ_EXTENSION, Qt::CaseInsensitive)) {
|
||||
auto checkBox = new QCheckBox(&messageBox);
|
||||
checkBox->setText("Add to scene");
|
||||
messageBox.setCheckBox(checkBox);
|
||||
|
@ -4234,7 +4234,7 @@ void Application::modelUploadFinished(AssetUpload* upload, const QString& hash)
|
|||
auto filename = QFileInfo(upload->getFilename()).fileName();
|
||||
|
||||
if ((upload->getError() == AssetUpload::NoError) &&
|
||||
(filename.endsWith(FBX_EXTENSION) || filename.endsWith(OBJ_EXTENSION))) {
|
||||
(filename.endsWith(FBX_EXTENSION, Qt::CaseInsensitive) || filename.endsWith(OBJ_EXTENSION, Qt::CaseInsensitive))) {
|
||||
|
||||
auto entities = DependencyManager::get<EntityScriptingInterface>();
|
||||
|
||||
|
|
Loading…
Reference in a new issue