History

load Address from settings to get back to domain and path

Stephen Birarda committed 12 years ago

Commit 96aacab1 parent f2710516 files · +27 −21Browse files

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

Unified · Split

interface/src/Application.cpp+11−2
@@ -1799,16 +1799,25 @@ void Application::init() { · 1798 unmodified lines
17991799
18001800 Menu::getInstance()->loadSettings();
18011801 _audio.setReceivedAudioStreamSettings(Menu::getInstance()->getReceivedAudioStreamSettings());
1802−
1803− qDebug() << "Loaded settings";
18041802
18051803 // when --url in command line, teleport to location
18061804 const QString HIFI_URL_COMMAND_LINE_KEY = "--url";
18071805 int urlIndex = arguments().indexOf(HIFI_URL_COMMAND_LINE_KEY);
18081806 if (urlIndex != -1) {
18091807 AddressManager::getInstance().handleLookupString(arguments().value(urlIndex + 1));
1808+ } else {
1809+ // check if we have a URL in settings to load to jump back to
1810+ // we load this separate from the other settings so we don't double lookup a URL
1811+ QSettings* interfaceSettings = lockSettings();
1812+ QUrl addressURL = interfaceSettings->value(SETTINGS_ADDRESS_KEY).toUrl();
1813+
1814+ AddressManager::getInstance().handleLookupString(addressURL.toString());
1815+
1816+ unlockSettings();
18101817 }
18111818
1819+ qDebug() << "Loaded settings";
1820+
18121821 #ifdef __APPLE__
18131822 if (Menu::getInstance()->isOptionChecked(MenuOption::SixenseEnabled)) {
18141823 // on OS X we only setup sixense if the user wants it on - this allows running without the hid_init crash

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