History

Merge branch 'master' of https://github.com/highfidelity/hifi into 19561

Thijs Wenker committed 12 years ago

Commit 14e9cb72 parents d93f91a 8a823ee8 files · +252 −190Browse files

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

Unified · Split

interface/src/Application.cpp+15−15
@@ -316,6 +316,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 315 unmodified lines
316 Particle::setVoxelEditPacketSender(&_voxelEditSender);316 Particle::setVoxelEditPacketSender(&_voxelEditSender);
317 Particle::setParticleEditPacketSender(&_particleEditSender);317 Particle::setParticleEditPacketSender(&_particleEditSender);
318 318
319 // when -url in command line, teleport to location
320 urlGoTo(argc, constArgv);
321
319 // For now we're going to set the PPS for outbound packets to be super high, this is322 // For now we're going to set the PPS for outbound packets to be super high, this is
320 // probably not the right long term solution. But for now, we're going to do this to323 // probably not the right long term solution. But for now, we're going to do this to
321 // allow you to move a particle around in your hand324 // allow you to move a particle around in your hand
@@ -352,8 +355,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 30 unmodified lines
352 QMutexLocker locker(&_settingsMutex);355 QMutexLocker locker(&_settingsMutex);
353 _previousScriptLocation = _settings->value("LastScriptLocation", QVariant("")).toString();356 _previousScriptLocation = _settings->value("LastScriptLocation", QVariant("")).toString();
354 }357 }
355 //When -url in command line, teleport to location
356 urlGoTo(argc, constArgv);
357}358}
358 359
359Application::~Application() {360Application::~Application() {
@@ -3583,34 +3584,33 @@ void Application::takeSnapshot() { · 3223 unmodified lines
3583void Application::urlGoTo(int argc, const char * constArgv[]) {3584void Application::urlGoTo(int argc, const char * constArgv[]) {
3584 //Gets the url (hifi://domain/destination/orientation)3585 //Gets the url (hifi://domain/destination/orientation)
3585 QString customUrl = getCmdOption(argc, constArgv, "-url");3586 QString customUrl = getCmdOption(argc, constArgv, "-url");
3586 3587 if(customUrl.startsWith(CUSTOM_URL_SCHEME + "//")) {
3587 if (customUrl.startsWith("hifi://")) {
3588 QStringList urlParts = customUrl.remove(0, CUSTOM_URL_SCHEME.length() + 2).split('/', QString::SkipEmptyParts);3588 QStringList urlParts = customUrl.remove(0, CUSTOM_URL_SCHEME.length() + 2).split('/', QString::SkipEmptyParts);
3589 if (urlParts.count() > 1) {3589 if (urlParts.count() == 1) {
3590 // location coordinates or place name
3591 QString domain = urlParts[0];
3592 Menu::goToDomain(domain);
3593 } else if (urlParts.count() > 1) {
3590 // if url has 2 or more parts, the first one is domain name3594 // if url has 2 or more parts, the first one is domain name
3591 QString domain = urlParts[0];3595 QString domain = urlParts[0];
3592 3596
3593 // second part is either a destination coordinate or3597 // second part is either a destination coordinate or
3594 // a place name3598 // a place name
3595 QString destination = urlParts[1];3599 QString destination = urlParts[1];
3596 3600
3597 // any third part is an avatar orientation.3601 // any third part is an avatar orientation.
3598 QString orientation = urlParts.count() > 2 ? urlParts[2] : QString();3602 QString orientation = urlParts.count() > 2 ? urlParts[2] : QString();
3599 3603
3600 Menu::goToDomain(domain);3604 Menu::goToDomain(domain);
3601 3605
3602 // goto either @user, #place, or x-xx,y-yy,z-zz3606 // goto either @user, #place, or x-xx,y-yy,z-zz
3603 // style co-ordinate.3607 // style co-ordinate.
3604 Menu::goTo(destination);3608 Menu::goTo(destination);
3605 3609
3606 if (!orientation.isEmpty()) {3610 if (!orientation.isEmpty()) {
3607 // location orientation3611 // location orientation
3608 Menu::goToOrientation(orientation);3612 Menu::goToOrientation(orientation);
3609 }3613 }
3610 } else if (urlParts.count() == 1) {3614 }
3611 // location coordinates or place name
3612 QString destination = urlParts[0];
3613 Menu::goTo(destination);
3614 }
3615 }3615 }
3616}3616}

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