Showing the changes to interface/src/Application.cpp (1 of 6 files). Show all
Unified · Split
| @@ -1799,16 +1799,25 @@ void Application::init() { · 1798 unmodified lines | ||
| 1799 | 1799 | |
| 1800 | 1800 | Menu::getInstance()->loadSettings(); |
| 1801 | 1801 | _audio.setReceivedAudioStreamSettings(Menu::getInstance()->getReceivedAudioStreamSettings()); |
| 1802 | − | |
| 1803 | − qDebug() << "Loaded settings"; | |
| 1804 | 1802 | |
| 1805 | 1803 | // when --url in command line, teleport to location |
| 1806 | 1804 | const QString HIFI_URL_COMMAND_LINE_KEY = "--url"; |
| 1807 | 1805 | int urlIndex = arguments().indexOf(HIFI_URL_COMMAND_LINE_KEY); |
| 1808 | 1806 | if (urlIndex != -1) { |
| 1809 | 1807 | 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(); | |
| 1810 | 1817 | } |
| 1811 | 1818 | |
| 1819 | + qDebug() << "Loaded settings"; | |
| 1820 | + | |
| 1812 | 1821 | #ifdef __APPLE__ |
| 1813 | 1822 | if (Menu::getInstance()->isOptionChecked(MenuOption::SixenseEnabled)) { |
| 1814 | 1823 | // on OS X we only setup sixense if the user wants it on - this allows running without the hid_init crash |