History

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

Atlante45 committed 11 years ago

Commit 327daac2 parents 296c002 fb15b0f107 files · +1333 −822Browse files

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

Unified · Split

interface/src/Application.cpp+3−25
@@ -130,7 +130,7 @@ static QTimer* idleTimer = NULL; · 129 unmodified lines
130130 const QString CHECK_VERSION_URL = "https://highfidelity.io/latestVersion.xml";
131131 const QString SKIP_FILENAME = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/hifi.skipversion";
132132
133−const QString DEFAULT_SCRIPTS_JS_URL = "http://public.highfidelity.io/scripts/defaultScripts.js";
133+const QString DEFAULT_SCRIPTS_JS_URL = "http://s3.amazonaws.com/hifi-public/scripts/defaultScripts.js";
134134
135135 void messageHandler(QtMsgType type, const QMessageLogContext& context, const QString& message) {
136136 QString logMessage = LogHandler::getInstance().printMessage((LogMsgType) type, context, message);
@@ -310,13 +310,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 173 unmodified lines
310310 // use our MyAvatar position and quat for address manager path
311311 addressManager.setPositionGetter(getPositionForPath);
312312 addressManager.setOrientationGetter(getOrientationForPath);
313−
314− // handle domain change signals from AddressManager
315− connect(&addressManager, &AddressManager::possibleDomainChangeRequiredToHostname,
316− this, &Application::changeDomainHostname);
317−
318− connect(&addressManager, &AddressManager::possibleDomainChangeRequiredViaICEForID,
319− &domainHandler, &DomainHandler::setIceServerHostnameAndID);
320313
321314 _settings = new QSettings(this);
322315 _numChangedSettings = 0;
@@ -538,8 +531,6 @@ void Application::initializeGL() { · 215 unmodified lines
538531 } else {
539532 isInitialized = true;
540533 }
541− int argc = 0;
542− glutInit(&argc, 0);
543534 #endif
544535
545536 #ifdef WIN32
@@ -1436,7 +1427,7 @@ void Application::dropEvent(QDropEvent *event) { · 890 unmodified lines
14361427 SnapshotMetaData* snapshotData = Snapshot::parseSnapshotData(snapshotPath);
14371428 if (snapshotData) {
14381429 if (!snapshotData->getDomain().isEmpty()) {
1439− changeDomainHostname(snapshotData->getDomain());
1430+ DependencyManager::get<NodeList>()->getDomainHandler().setHostnameAndPort(snapshotData->getDomain());
14401431 }
14411432
14421433 _myAvatar->setPosition(snapshotData->getLocation());
@@ -3577,7 +3568,7 @@ void Application::renderViewFrustum(ViewFrustum& viewFrustum) { · 2134 unmodified lines
35773568 glPushMatrix();
35783569 glColor4f(1, 1, 0, 1);
35793570 glTranslatef(position.x, position.y, position.z); // where we actually want it!
3580− glutWireSphere(keyholeRadius, 20, 20);
3571+ DependencyManager::get<GeometryCache>()->renderSphere(keyholeRadius, 20, 20, false);
35813572 glPopMatrix();
35823573 }
35833574 }
@@ -3701,19 +3692,6 @@ void Application::updateLocationInServer() { · 117 unmodified lines
37013692 }
37023693 }
37033694
3704−void Application::changeDomainHostname(const QString &newDomainHostname) {
3705− auto nodeList = DependencyManager::get<NodeList>();
3706−
3707− if (!nodeList->getDomainHandler().isCurrentHostname(newDomainHostname)) {
3708− // tell the MyAvatar object to send a kill packet so that it dissapears from its old avatar mixer immediately
3709− _myAvatar->sendKillAvatar();
3710−
3711− // call the domain hostname change as a queued connection on the nodelist
3712− QMetaObject::invokeMethod(&DependencyManager::get<NodeList>()->getDomainHandler(), "setHostname",
3713− Q_ARG(const QString&, newDomainHostname));
3714− }
3715−}
3716−
37173695 void Application::clearDomainOctreeDetails() {
37183696 qDebug() << "Clearing domain octree details...";
37193697 // reset the environment so that we don't erroneously end up with multiple

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