History

Merge pull request #2875 from binaryking/19666

Code Review for Job #19666

Brad Hefta-Gaub committed 12 years ago

Commit a88de842 parents b4759e0 1714f7f5 files · +68 −67Browse files

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

Unified · Split

interface/src/Application.cpp+56−53
@@ -173,7 +173,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 172 unmodified lines
173 _previousScriptLocation(),173 _previousScriptLocation(),
174 _runningScriptsWidget(new RunningScriptsWidget(_window)),174 _runningScriptsWidget(new RunningScriptsWidget(_window)),
175 _runningScriptsWidgetWasVisible(false)175 _runningScriptsWidgetWasVisible(false)
176{ 176{
177 // read the ApplicationInfo.ini file for Name/Version/Domain information177 // read the ApplicationInfo.ini file for Name/Version/Domain information
178 QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);178 QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
179 179
@@ -235,10 +235,10 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 55 unmodified lines
235 235
236 connect(&nodeList->getDomainHandler(), SIGNAL(hostnameChanged(const QString&)), SLOT(domainChanged(const QString&)));236 connect(&nodeList->getDomainHandler(), SIGNAL(hostnameChanged(const QString&)), SLOT(domainChanged(const QString&)));
237 connect(&nodeList->getDomainHandler(), SIGNAL(connectedToDomain(const QString&)), SLOT(connectedToDomain(const QString&)));237 connect(&nodeList->getDomainHandler(), SIGNAL(connectedToDomain(const QString&)), SLOT(connectedToDomain(const QString&)));
238 238
239 // update our location every 5 seconds in the data-server, assuming that we are authenticated with one239 // update our location every 5 seconds in the data-server, assuming that we are authenticated with one
240 const float DATA_SERVER_LOCATION_CHANGE_UPDATE_MSECS = 5.0f * 1000.0f;240 const float DATA_SERVER_LOCATION_CHANGE_UPDATE_MSECS = 5.0f * 1000.0f;
241 241
242 QTimer* locationUpdateTimer = new QTimer(this);242 QTimer* locationUpdateTimer = new QTimer(this);
243 connect(locationUpdateTimer, &QTimer::timeout, this, &Application::updateLocationInServer);243 connect(locationUpdateTimer, &QTimer::timeout, this, &Application::updateLocationInServer);
244 locationUpdateTimer->start(DATA_SERVER_LOCATION_CHANGE_UPDATE_MSECS);244 locationUpdateTimer->start(DATA_SERVER_LOCATION_CHANGE_UPDATE_MSECS);
@@ -334,7 +334,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 89 unmodified lines
334 334
335 // when -url in command line, teleport to location335 // when -url in command line, teleport to location
336 urlGoTo(argc, constArgv);336 urlGoTo(argc, constArgv);
337 337
338 // For now we're going to set the PPS for outbound packets to be super high, this is338 // For now we're going to set the PPS for outbound packets to be super high, this is
339 // probably not the right long term solution. But for now, we're going to do this to339 // probably not the right long term solution. But for now, we're going to do this to
340 // allow you to move a particle around in your hand340 // allow you to move a particle around in your hand
@@ -361,23 +361,23 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 20 unmodified lines
361 // clear the scripts, and set out script to our default scripts361 // clear the scripts, and set out script to our default scripts
362 clearScriptsBeforeRunning();362 clearScriptsBeforeRunning();
363 loadScript("http://public.highfidelity.io/scripts/defaultScripts.js");363 loadScript("http://public.highfidelity.io/scripts/defaultScripts.js");
364 364
365 QMutexLocker locker(&_settingsMutex);365 QMutexLocker locker(&_settingsMutex);
366 _settings->setValue("firstRun",QVariant(false));366 _settings->setValue("firstRun",QVariant(false));
367 } else {367 } else {
368 // do this as late as possible so that all required subsystems are inialized368 // do this as late as possible so that all required subsystems are inialized
369 loadScripts();369 loadScripts();
370 370
371 QMutexLocker locker(&_settingsMutex);371 QMutexLocker locker(&_settingsMutex);
372 _previousScriptLocation = _settings->value("LastScriptLocation", QVariant("")).toString();372 _previousScriptLocation = _settings->value("LastScriptLocation", QVariant("")).toString();
373 }373 }
374 374
375 connect(_window, &MainWindow::windowGeometryChanged,375 connect(_window, &MainWindow::windowGeometryChanged,
376 _runningScriptsWidget, &RunningScriptsWidget::setBoundary);376 _runningScriptsWidget, &RunningScriptsWidget::setBoundary);
377 377
378 //When -url in command line, teleport to location378 //When -url in command line, teleport to location
379 urlGoTo(argc, constArgv);379 urlGoTo(argc, constArgv);
380 380
381 // call the OAuthWebviewHandler static getter so that its instance lives in our thread381 // call the OAuthWebviewHandler static getter so that its instance lives in our thread
382 OAuthWebViewHandler::getInstance();382 OAuthWebViewHandler::getInstance();
383 // make sure the High Fidelity root CA is in our list of trusted certs383 // make sure the High Fidelity root CA is in our list of trusted certs
@@ -390,11 +390,11 @@ Application::~Application() { · 6 unmodified lines
390 390
391 // make sure we don't call the idle timer any more391 // make sure we don't call the idle timer any more
392 delete idleTimer;392 delete idleTimer;
393 393
394 _sharedVoxelSystem.changeTree(new VoxelTree);394 _sharedVoxelSystem.changeTree(new VoxelTree);
395 395
396 saveSettings();396 saveSettings();
397 397
398 delete _voxelImporter;398 delete _voxelImporter;
399 399
400 // let the avatar mixer know we're out400 // let the avatar mixer know we're out
@@ -433,7 +433,7 @@ Application::~Application() { · 32 unmodified lines
433void Application::saveSettings() {433void Application::saveSettings() {
434 Menu::getInstance()->saveSettings();434 Menu::getInstance()->saveSettings();
435 _rearMirrorTools->saveSettings(_settings);435 _rearMirrorTools->saveSettings(_settings);
436 436
437 if (_voxelImporter) {437 if (_voxelImporter) {
438 _voxelImporter->saveSettings(_settings);438 _voxelImporter->saveSettings(_settings);
439 }439 }
@@ -515,7 +515,7 @@ void Application::initializeGL() { · 75 unmodified lines
515 _voxelHideShowThread.initialize(_enableProcessVoxelsThread);515 _voxelHideShowThread.initialize(_enableProcessVoxelsThread);
516 _particleEditSender.initialize(_enableProcessVoxelsThread);516 _particleEditSender.initialize(_enableProcessVoxelsThread);
517 _modelEditSender.initialize(_enableProcessVoxelsThread);517 _modelEditSender.initialize(_enableProcessVoxelsThread);
518 518
519 if (_enableProcessVoxelsThread) {519 if (_enableProcessVoxelsThread) {
520 qDebug("Voxel parsing thread created.");520 qDebug("Voxel parsing thread created.");
521 }521 }
@@ -579,7 +579,7 @@ void Application::paintGL() { · 57 unmodified lines
579 _myCamera.setDistance(MIRROR_FULLSCREEN_DISTANCE * _myAvatar->getScale() * _scaleMirror);579 _myCamera.setDistance(MIRROR_FULLSCREEN_DISTANCE * _myAvatar->getScale() * _scaleMirror);
580 _myCamera.setTargetPosition(_myAvatar->getPosition() + glm::vec3(0, headHeight + (_raiseMirror * _myAvatar->getScale()), 0));580 _myCamera.setTargetPosition(_myAvatar->getPosition() + glm::vec3(0, headHeight + (_raiseMirror * _myAvatar->getScale()), 0));
581 _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI + _rotateMirror, 0.0f)));581 _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI + _rotateMirror, 0.0f)));
582 582
583 // if the head would intersect the near clip plane, we must push the camera out583 // if the head would intersect the near clip plane, we must push the camera out
584 glm::vec3 relativePosition = glm::inverse(_myCamera.getTargetRotation()) *584 glm::vec3 relativePosition = glm::inverse(_myCamera.getTargetRotation()) *
585 (eyePosition - _myCamera.getTargetPosition());585 (eyePosition - _myCamera.getTargetPosition());
@@ -588,7 +588,7 @@ void Application::paintGL() { · 2 unmodified lines
588 pushback = relativePosition.z + pushbackRadius - _myCamera.getDistance();588 pushback = relativePosition.z + pushbackRadius - _myCamera.getDistance();
589 pushbackFocalLength = _myCamera.getDistance();589 pushbackFocalLength = _myCamera.getDistance();
590 }590 }
591 591
592 // handle pushback, if any592 // handle pushback, if any
593 if (pushbackFocalLength > 0.0f) {593 if (pushbackFocalLength > 0.0f) {
594 const float PUSHBACK_DECAY = 0.5f;594 const float PUSHBACK_DECAY = 0.5f;
@@ -1273,7 +1273,7 @@ void Application::dropEvent(QDropEvent *event) { · 678 unmodified lines
1273 1273
1274void Application::sendPingPackets() {1274void Application::sendPingPackets() {
1275 QByteArray pingPacket = NodeList::getInstance()->constructPingPacket();1275 QByteArray pingPacket = NodeList::getInstance()->constructPingPacket();
1276 controlledBroadcastToNodes(pingPacket, NodeSet() 1276 controlledBroadcastToNodes(pingPacket, NodeSet()
1277 << NodeType::VoxelServer << NodeType::ParticleServer << NodeType::ModelServer1277 << NodeType::VoxelServer << NodeType::ParticleServer << NodeType::ModelServer
1278 << NodeType::AudioMixer << NodeType::AvatarMixer1278 << NodeType::AudioMixer << NodeType::AvatarMixer
1279 << NodeType::MetavoxelServer);1279 << NodeType::MetavoxelServer);
@@ -1284,7 +1284,7 @@ void Application::timer() { · 4 unmodified lines
1284 if (Menu::getInstance()->isOptionChecked(MenuOption::TestPing)) {1284 if (Menu::getInstance()->isOptionChecked(MenuOption::TestPing)) {
1285 sendPingPackets();1285 sendPingPackets();
1286 }1286 }
1287 1287
1288 float diffTime = (float)_timerStart.nsecsElapsed() / 1000000000.0f;1288 float diffTime = (float)_timerStart.nsecsElapsed() / 1000000000.0f;
1289 1289
1290 _fps = (float)_frameCount / diffTime;1290 _fps = (float)_frameCount / diffTime;
@@ -1688,7 +1688,7 @@ void Application::init() { · 397 unmodified lines
1688 connect(_rearMirrorTools, SIGNAL(restoreView()), SLOT(restoreMirrorView()));1688 connect(_rearMirrorTools, SIGNAL(restoreView()), SLOT(restoreMirrorView()));
1689 connect(_rearMirrorTools, SIGNAL(shrinkView()), SLOT(shrinkMirrorView()));1689 connect(_rearMirrorTools, SIGNAL(shrinkView()), SLOT(shrinkMirrorView()));
1690 connect(_rearMirrorTools, SIGNAL(resetView()), SLOT(resetSensors()));1690 connect(_rearMirrorTools, SIGNAL(resetView()), SLOT(resetSensors()));
1691 1691
1692 // set up our audio reflector1692 // set up our audio reflector
1693 _audioReflector.setMyAvatar(getAvatar());1693 _audioReflector.setMyAvatar(getAvatar());
1694 _audioReflector.setVoxels(_voxels.getTree());1694 _audioReflector.setVoxels(_voxels.getTree());
@@ -1697,7 +1697,7 @@ void Application::init() { · 2 unmodified lines
1697 1697
1698 connect(getAudio(), &Audio::processInboundAudio, &_audioReflector, &AudioReflector::processInboundAudio,Qt::DirectConnection);1698 connect(getAudio(), &Audio::processInboundAudio, &_audioReflector, &AudioReflector::processInboundAudio,Qt::DirectConnection);
1699 connect(getAudio(), &Audio::processLocalAudio, &_audioReflector, &AudioReflector::processLocalAudio,Qt::DirectConnection);1699 connect(getAudio(), &Audio::processLocalAudio, &_audioReflector, &AudioReflector::processLocalAudio,Qt::DirectConnection);
1700 connect(getAudio(), &Audio::preProcessOriginalInboundAudio, &_audioReflector, 1700 connect(getAudio(), &Audio::preProcessOriginalInboundAudio, &_audioReflector,
1701 &AudioReflector::preProcessOriginalInboundAudio,Qt::DirectConnection);1701 &AudioReflector::preProcessOriginalInboundAudio,Qt::DirectConnection);
1702 1702
1703 // save settings when avatar changes1703 // save settings when avatar changes
@@ -1812,7 +1812,7 @@ void Application::updateMyAvatarLookAtPosition() { · 108 unmodified lines
1812 PerformanceWarning warn(showWarnings, "Application::updateMyAvatarLookAtPosition()");1812 PerformanceWarning warn(showWarnings, "Application::updateMyAvatarLookAtPosition()");
1813 1813
1814 FaceTracker* tracker = getActiveFaceTracker();1814 FaceTracker* tracker = getActiveFaceTracker();
1815 1815
1816 bool isLookingAtSomeone = false;1816 bool isLookingAtSomeone = false;
1817 glm::vec3 lookAtSpot;1817 glm::vec3 lookAtSpot;
1818 if (_myCamera.getMode() == CAMERA_MODE_MIRROR) {1818 if (_myCamera.getMode() == CAMERA_MODE_MIRROR) {
@@ -1847,7 +1847,7 @@ void Application::updateMyAvatarLookAtPosition() { · 28 unmodified lines
1847 glm::distance(_mouseRayOrigin, _myAvatar->getHead()->calculateAverageEyePosition()));1847 glm::distance(_mouseRayOrigin, _myAvatar->getHead()->calculateAverageEyePosition()));
1848 lookAtSpot = _mouseRayOrigin + _mouseRayDirection * qMax(minEyeDistance, distance);1848 lookAtSpot = _mouseRayOrigin + _mouseRayDirection * qMax(minEyeDistance, distance);
1849 */1849 */
1850 1850
1851 }1851 }
1852 //1852 //
1853 // Deflect the eyes a bit to match the detected Gaze from 3D camera if active1853 // Deflect the eyes a bit to match the detected Gaze from 3D camera if active
@@ -1867,7 +1867,7 @@ void Application::updateMyAvatarLookAtPosition() { · 13 unmodified lines
1867 eyePitch * pitchSign * deflection, eyeYaw * deflection, 0.0f))) *1867 eyePitch * pitchSign * deflection, eyeYaw * deflection, 0.0f))) *
1868 glm::inverse(_myCamera.getRotation()) * (lookAtSpot - origin);1868 glm::inverse(_myCamera.getRotation()) * (lookAtSpot - origin);
1869 }1869 }
1870 1870
1871 _myAvatar->getHead()->setLookAtPosition(lookAtSpot);1871 _myAvatar->getHead()->setLookAtPosition(lookAtSpot);
1872}1872}
1873 1873
@@ -1919,7 +1919,7 @@ void Application::updateCamera(float deltaTime) { · 45 unmodified lines
1919 PerformanceWarning warn(showWarnings, "Application::updateCamera()");1919 PerformanceWarning warn(showWarnings, "Application::updateCamera()");
1920 1920
1921 if (!OculusManager::isConnected() && !TV3DManager::isConnected() &&1921 if (!OculusManager::isConnected() && !TV3DManager::isConnected() &&
1922 Menu::getInstance()->isOptionChecked(MenuOption::OffAxisProjection)) { 1922 Menu::getInstance()->isOptionChecked(MenuOption::OffAxisProjection)) {
1923 FaceTracker* tracker = getActiveFaceTracker();1923 FaceTracker* tracker = getActiveFaceTracker();
1924 if (tracker) {1924 if (tracker) {
1925 const float EYE_OFFSET_SCALE = 0.025f;1925 const float EYE_OFFSET_SCALE = 0.025f;
@@ -2475,7 +2475,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 549 unmodified lines
2475 2475
2476 // disable specular lighting for ground and voxels2476 // disable specular lighting for ground and voxels
2477 glMaterialfv(GL_FRONT, GL_SPECULAR, NO_SPECULAR_COLOR);2477 glMaterialfv(GL_FRONT, GL_SPECULAR, NO_SPECULAR_COLOR);
2478 2478
2479 // draw the audio reflector overlay2479 // draw the audio reflector overlay
2480 _audioReflector.render();2480 _audioReflector.render();
2481 2481
@@ -2643,7 +2643,7 @@ void Application::displayOverlay() { · 161 unmodified lines
2643 const float LOG2_LOUDNESS_FLOOR = 11.f;2643 const float LOG2_LOUDNESS_FLOOR = 11.f;
2644 float audioLevel = 0.f;2644 float audioLevel = 0.f;
2645 float loudness = _audio.getLastInputLoudness() + 1.f;2645 float loudness = _audio.getLastInputLoudness() + 1.f;
2646 2646
2647 _trailingAudioLoudness = AUDIO_METER_AVERAGING * _trailingAudioLoudness + (1.f - AUDIO_METER_AVERAGING) * loudness;2647 _trailingAudioLoudness = AUDIO_METER_AVERAGING * _trailingAudioLoudness + (1.f - AUDIO_METER_AVERAGING) * loudness;
2648 float log2loudness = log(_trailingAudioLoudness) / LOG2;2648 float log2loudness = log(_trailingAudioLoudness) / LOG2;
2649 2649
@@ -2656,7 +2656,7 @@ void Application::displayOverlay() { · 6 unmodified lines
2656 audioLevel = AUDIO_METER_SCALE_WIDTH;2656 audioLevel = AUDIO_METER_SCALE_WIDTH;
2657 }2657 }
2658 bool isClipping = ((_audio.getTimeSinceLastClip() > 0.f) && (_audio.getTimeSinceLastClip() < CLIPPING_INDICATOR_TIME));2658 bool isClipping = ((_audio.getTimeSinceLastClip() > 0.f) && (_audio.getTimeSinceLastClip() < CLIPPING_INDICATOR_TIME));
2659 2659
2660 if ((_audio.getTimeSinceLastClip() > 0.f) && (_audio.getTimeSinceLastClip() < CLIPPING_INDICATOR_TIME)) {2660 if ((_audio.getTimeSinceLastClip() > 0.f) && (_audio.getTimeSinceLastClip() < CLIPPING_INDICATOR_TIME)) {
2661 const float MAX_MAGNITUDE = 0.7f;2661 const float MAX_MAGNITUDE = 0.7f;
2662 float magnitude = MAX_MAGNITUDE * (1 - _audio.getTimeSinceLastClip() / CLIPPING_INDICATOR_TIME);2662 float magnitude = MAX_MAGNITUDE * (1 - _audio.getTimeSinceLastClip() / CLIPPING_INDICATOR_TIME);
@@ -2762,7 +2762,7 @@ void Application::displayOverlay() { · 99 unmodified lines
2762 2762
2763 // give external parties a change to hook in2763 // give external parties a change to hook in
2764 emit renderingOverlay();2764 emit renderingOverlay();
2765 2765
2766 _overlays.render2D();2766 _overlays.render2D();
2767 2767
2768 glPopMatrix();2768 glPopMatrix();
@@ -2838,7 +2838,7 @@ void Application::renderRearViewMirror(const QRect& region, bool billboard) { · 69 unmodified lines
2838 // save absolute translations2838 // save absolute translations
2839 glm::vec3 absoluteSkeletonTranslation = _myAvatar->getSkeletonModel().getTranslation();2839 glm::vec3 absoluteSkeletonTranslation = _myAvatar->getSkeletonModel().getTranslation();
2840 glm::vec3 absoluteFaceTranslation = _myAvatar->getHead()->getFaceModel().getTranslation();2840 glm::vec3 absoluteFaceTranslation = _myAvatar->getHead()->getFaceModel().getTranslation();
2841 2841
2842 // get the eye positions relative to the neck and use them to set the face translation2842 // get the eye positions relative to the neck and use them to set the face translation
2843 glm::vec3 leftEyePosition, rightEyePosition;2843 glm::vec3 leftEyePosition, rightEyePosition;
2844 _myAvatar->getHead()->getFaceModel().setTranslation(glm::vec3());2844 _myAvatar->getHead()->getFaceModel().setTranslation(glm::vec3());
@@ -3104,7 +3104,7 @@ void Application::uploadModel(ModelType modelType) { · 259 unmodified lines
3104 thread->connect(uploader, SIGNAL(destroyed()), SLOT(quit()));3104 thread->connect(uploader, SIGNAL(destroyed()), SLOT(quit()));
3105 thread->connect(thread, SIGNAL(finished()), SLOT(deleteLater()));3105 thread->connect(thread, SIGNAL(finished()), SLOT(deleteLater()));
3106 uploader->connect(thread, SIGNAL(started()), SLOT(send()));3106 uploader->connect(thread, SIGNAL(started()), SLOT(send()));
3107 3107
3108 thread->start();3108 thread->start();
3109}3109}
3110 3110
@@ -3121,28 +3121,28 @@ void Application::updateWindowTitle(){ · 10 unmodified lines
3121}3121}
3122 3122
3123void Application::updateLocationInServer() {3123void Application::updateLocationInServer() {
3124 3124
3125 AccountManager& accountManager = AccountManager::getInstance();3125 AccountManager& accountManager = AccountManager::getInstance();
3126 3126
3127 if (accountManager.isLoggedIn()) {3127 if (accountManager.isLoggedIn()) {
3128 3128
3129 static QJsonObject lastLocationObject;3129 static QJsonObject lastLocationObject;
3130 3130
3131 // construct a QJsonObject given the user's current address information3131 // construct a QJsonObject given the user's current address information
3132 QJsonObject updatedLocationObject;3132 QJsonObject updatedLocationObject;
3133 3133
3134 QJsonObject addressObject;3134 QJsonObject addressObject;
3135 addressObject.insert("position", QString(createByteArray(_myAvatar->getPosition())));3135 addressObject.insert("position", QString(createByteArray(_myAvatar->getPosition())));
3136 addressObject.insert("orientation", QString(createByteArray(glm::degrees(safeEulerAngles(_myAvatar->getOrientation())))));3136 addressObject.insert("orientation", QString(createByteArray(glm::degrees(safeEulerAngles(_myAvatar->getOrientation())))));
3137 addressObject.insert("domain", NodeList::getInstance()->getDomainHandler().getHostname());3137 addressObject.insert("domain", NodeList::getInstance()->getDomainHandler().getHostname());
3138 3138
3139 updatedLocationObject.insert("address", addressObject);3139 updatedLocationObject.insert("address", addressObject);
3140 3140
3141 if (updatedLocationObject != lastLocationObject) {3141 if (updatedLocationObject != lastLocationObject) {
3142 3142
3143 accountManager.authenticatedRequest("/api/v1/users/address", QNetworkAccessManager::PutOperation,3143 accountManager.authenticatedRequest("/api/v1/users/address", QNetworkAccessManager::PutOperation,
3144 JSONCallbackParameters(), QJsonDocument(updatedLocationObject).toJson());3144 JSONCallbackParameters(), QJsonDocument(updatedLocationObject).toJson());
3145 3145
3146 lastLocationObject = updatedLocationObject;3146 lastLocationObject = updatedLocationObject;
3147 }3147 }
3148 }3148 }
@@ -3167,7 +3167,7 @@ void Application::domainChanged(const QString& domainHostname) { · 18 unmodified lines
3167 3167
3168 // reset the voxels renderer3168 // reset the voxels renderer
3169 _voxels.killLocalVoxels();3169 _voxels.killLocalVoxels();
3170 3170
3171 // reset the auth URL for OAuth web view handler3171 // reset the auth URL for OAuth web view handler
3172 OAuthWebViewHandler::getInstance().clearLastAuthorizationURL();3172 OAuthWebViewHandler::getInstance().clearLastAuthorizationURL();
3173}3173}
@@ -3388,7 +3388,7 @@ void Application::loadScripts() { · 214 unmodified lines
3388 loadScript(string);3388 loadScript(string);
3389 }3389 }
3390 }3390 }
3391 3391
3392 QMutexLocker locker(&_settingsMutex);3392 QMutexLocker locker(&_settingsMutex);
3393 _settings->endArray();3393 _settings->endArray();
3394}3394}
@@ -3614,9 +3614,12 @@ void Application::loadScriptURLDialog() { · 219 unmodified lines
3614void Application::toggleLogDialog() {3614void Application::toggleLogDialog() {
3615 if (! _logDialog) {3615 if (! _logDialog) {
3616 _logDialog = new LogDialog(_glWidget, getLogger());3616 _logDialog = new LogDialog(_glWidget, getLogger());
3617 _logDialog->show();3617 }
3618
3619 if (_logDialog->isVisible()) {
3620 _logDialog->hide();
3618 } else {3621 } else {
3619 _logDialog->close();3622 _logDialog->show();
3620 }3623 }
3621}3624}
3622 3625
@@ -3650,7 +3653,7 @@ void Application::parseVersionXml() { · 27 unmodified lines
3650 QObject* sender = QObject::sender();3653 QObject* sender = QObject::sender();
3651 3654
3652 QXmlStreamReader xml(qobject_cast<QNetworkReply*>(sender));3655 QXmlStreamReader xml(qobject_cast<QNetworkReply*>(sender));
3653 3656
3654 while (!xml.atEnd() && !xml.hasError()) {3657 while (!xml.atEnd() && !xml.hasError()) {
3655 if (xml.tokenType() == QXmlStreamReader::StartElement && xml.name() == operatingSystem) {3658 if (xml.tokenType() == QXmlStreamReader::StartElement && xml.name() == operatingSystem) {
3656 while (!(xml.tokenType() == QXmlStreamReader::EndElement && xml.name() == operatingSystem)) {3659 while (!(xml.tokenType() == QXmlStreamReader::EndElement && xml.name() == operatingSystem)) {
@@ -3667,7 +3670,7 @@ void Application::parseVersionXml() { · 10 unmodified lines
3667 }3670 }
3668 xml.readNext();3671 xml.readNext();
3669 }3672 }
3670 3673
3671 if (!shouldSkipVersion(latestVersion) && applicationVersion() != latestVersion) {3674 if (!shouldSkipVersion(latestVersion) && applicationVersion() != latestVersion) {
3672 new UpdateDialog(_glWidget, releaseNotes, latestVersion, downloadUrl);3675 new UpdateDialog(_glWidget, releaseNotes, latestVersion, downloadUrl);
3673 }3676 }
@@ -3719,24 +3722,24 @@ void Application::urlGoTo(int argc, const char * constArgv[]) { · 45 unmodified lines
3719 } else if (urlParts.count() > 1) {3722 } else if (urlParts.count() > 1) {
3720 // if url has 2 or more parts, the first one is domain name3723 // if url has 2 or more parts, the first one is domain name
3721 QString domain = urlParts[0];3724 QString domain = urlParts[0];
3722 3725
3723 // second part is either a destination coordinate or3726 // second part is either a destination coordinate or
3724 // a place name3727 // a place name
3725 QString destination = urlParts[1];3728 QString destination = urlParts[1];
3726 3729
3727 // any third part is an avatar orientation.3730 // any third part is an avatar orientation.
3728 QString orientation = urlParts.count() > 2 ? urlParts[2] : QString();3731 QString orientation = urlParts.count() > 2 ? urlParts[2] : QString();
3729 3732
3730 Menu::goToDomain(domain);3733 Menu::goToDomain(domain);
3731 3734
3732 // goto either @user, #place, or x-xx,y-yy,z-zz3735 // goto either @user, #place, or x-xx,y-yy,z-zz
3733 // style co-ordinate.3736 // style co-ordinate.
3734 Menu::goTo(destination);3737 Menu::goTo(destination);
3735 3738
3736 if (!orientation.isEmpty()) {3739 if (!orientation.isEmpty()) {
3737 // location orientation3740 // location orientation
3738 Menu::goToOrientation(orientation);3741 Menu::goToOrientation(orientation);
3739 }3742 }
3740 } 3743 }
3741 }3744 }
3742}3745}

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