Merge pull request #4443 from huffman/fix-svo-path-detection

Fix issue with .svo's not loading when the url has parameters
This commit is contained in:
Stephen Birarda 2015-03-13 10:40:29 -07:00
commit f8c549ab87
2 changed files with 5 additions and 4 deletions

View file

@ -889,7 +889,7 @@ bool Application::event(QEvent* event) {
if (!url.isEmpty()) {
if (url.scheme() == HIFI_URL_SCHEME) {
DependencyManager::get<AddressManager>()->handleLookupString(fileEvent->url().toString());
} else if (url.url().toLower().endsWith(SVO_EXTENSION)) {
} else if (url.path().toLower().endsWith(SVO_EXTENSION)) {
emit svoImportRequested(url.url());
}
}
@ -1455,10 +1455,11 @@ void Application::dropEvent(QDropEvent *event) {
QString snapshotPath;
const QMimeData *mimeData = event->mimeData();
foreach (QUrl url, mimeData->urls()) {
if (url.url().toLower().endsWith(SNAPSHOT_EXTENSION)) {
auto lower = url.path().toLower();
if (lower.endsWith(SNAPSHOT_EXTENSION)) {
snapshotPath = url.toLocalFile();
break;
} else if (url.url().toLower().endsWith(SVO_EXTENSION)) {
} else if (lower.endsWith(SVO_EXTENSION)) {
emit svoImportRequested(url.url());
event->acceptProposedAction();
return;

View file

@ -170,7 +170,7 @@ void GLCanvas::wheelEvent(QWheelEvent* event) {
void GLCanvas::dragEnterEvent(QDragEnterEvent* event) {
const QMimeData *mimeData = event->mimeData();
foreach (QUrl url, mimeData->urls()) {
auto lower = url.url().toLower();
auto lower = url.path().toLower();
if (lower.endsWith(SNAPSHOT_EXTENSION) || lower.endsWith(SVO_EXTENSION)) {
event->acceptProposedAction();
break;