mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 10:48:15 +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();
|
QString lowerPath = url.path().toLower();
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
i.next();
|
i.next();
|
||||||
if (lowerPath.endsWith(i.key())) {
|
if (lowerPath.endsWith(i.key(), Qt::CaseInsensitive)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4099,7 +4099,7 @@ bool Application::acceptURL(const QString& urlString, bool defaultUpload) {
|
||||||
QString lowerPath = url.path().toLower();
|
QString lowerPath = url.path().toLower();
|
||||||
while (i.hasNext()) {
|
while (i.hasNext()) {
|
||||||
i.next();
|
i.next();
|
||||||
if (lowerPath.endsWith(i.key())) {
|
if (lowerPath.endsWith(i.key(), Qt::CaseInsensitive)) {
|
||||||
AcceptURLMethod method = i.value();
|
AcceptURLMethod method = i.value();
|
||||||
return (this->*method)(urlString);
|
return (this->*method)(urlString);
|
||||||
}
|
}
|
||||||
|
@ -4199,7 +4199,7 @@ bool Application::askToUploadAsset(const QString& filename) {
|
||||||
messageBox.setDefaultButton(QMessageBox::Ok);
|
messageBox.setDefaultButton(QMessageBox::Ok);
|
||||||
|
|
||||||
// Option to drop model in world for models
|
// 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);
|
auto checkBox = new QCheckBox(&messageBox);
|
||||||
checkBox->setText("Add to scene");
|
checkBox->setText("Add to scene");
|
||||||
messageBox.setCheckBox(checkBox);
|
messageBox.setCheckBox(checkBox);
|
||||||
|
@ -4234,7 +4234,7 @@ void Application::modelUploadFinished(AssetUpload* upload, const QString& hash)
|
||||||
auto filename = QFileInfo(upload->getFilename()).fileName();
|
auto filename = QFileInfo(upload->getFilename()).fileName();
|
||||||
|
|
||||||
if ((upload->getError() == AssetUpload::NoError) &&
|
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>();
|
auto entities = DependencyManager::get<EntityScriptingInterface>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue