History

Handle .svo drop events and emit svoImportRequested

Ryan Huffman committed 11 years ago

Commit c3c2a751 parent 2f885bb5 files · +15 −3Browse files

Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all

Unified · Split

interface/src/Application.cpp+8−2
@@ -882,9 +882,15 @@ bool Application::event(QEvent* event) { · 881 unmodified lines
882882 if (event->type() == QEvent::FileOpen) {
883883
884884 QFileOpenEvent* fileEvent = static_cast<QFileOpenEvent*>(event);
885+
886+ QUrl url = fileEvent->url();
885887
886− if (!fileEvent->url().isEmpty()) {
887− DependencyManager::get<AddressManager>()->handleLookupString(fileEvent->url().toString());
888+ if (!url.isEmpty()) {
889+ if (url.scheme() == HIFI_URL_SCHEME) {
890+ DependencyManager::get<AddressManager>()->handleLookupString(fileEvent->url().toString());
891+ } else if (url.url().toLower().endsWith(SVO_EXTENSION)) {
892+ emit svoImportRequested(url.url());
893+ }
888894 }
889895
890896 return false;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t