Reverted changes to Interface.

This commit is contained in:
NissimHadar 2018-11-05 22:10:20 -05:00
parent 562c9b1196
commit c0e7a4348b
4 changed files with 1 additions and 50 deletions

View file

@ -4803,13 +4803,7 @@ void Application::idle() {
_idleLoopStdev.reset();
}
}
// This is done here so it won't be during a resize/move event
if (_setGeometryRequested) {
_setGeometryRequested = false;
_window->setGeometry(requestedGeometry);
}
_overlayConductor.update(secondsSinceLastUpdate);
_gameLoopCounter.increment();
@ -8584,12 +8578,6 @@ void Application::copyToClipboard(const QString& text) {
QApplication::clipboard()->setText(text);
}
void Application::setGeometry(int x, int y, int width, int height) {
// Note that calling setGeometry inside resizeEvent() or moveEvent() can cause infinite recursion
requestedGeometry = QRect(x, y, width, height);
_setGeometryRequested = true;
}
#if defined(Q_OS_ANDROID)
void Application::beforeEnterBackground() {
auto nodeList = DependencyManager::get<NodeList>();

View file

@ -315,8 +315,6 @@ public:
Q_INVOKABLE void copyToClipboard(const QString& text);
void setGeometry(int x, int y, int width, int height);
int getOtherAvatarsReplicaCount() { return DependencyManager::get<AvatarHashMap>()->getReplicaCount(); }
void setOtherAvatarsReplicaCount(int count) { DependencyManager::get<AvatarHashMap>()->setReplicaCount(count); }
@ -786,9 +784,5 @@ private:
bool _showTrackedObjects { false };
bool _prevShowTrackedObjects { false };
// Data for the setGeometry script command
bool _setGeometryRequested{ false };
QRect requestedGeometry;
};
#endif // hifi_Application_h

View file

@ -199,17 +199,3 @@ void TestScriptingInterface::setOtherAvatarsReplicaCount(int count) {
int TestScriptingInterface::getOtherAvatarsReplicaCount() {
return qApp->getOtherAvatarsReplicaCount();
}
QString TestScriptingInterface::getOperatingSystemType() {
#ifdef Q_OS_WIN
return "WINDOWS";
#elif defined Q_OS_MAC
return "MACOS";
#else
return "UNKNOWN";
#endif
}
void TestScriptingInterface::setGeometry(int x, int y, int width, int height) {
qApp->setGeometry(x, y, width, height);
}

View file

@ -163,23 +163,6 @@ public slots:
*/
Q_INVOKABLE int getOtherAvatarsReplicaCount();
/**jsdoc
* Returns the Operating Sytem type
* @function Test.getOperatingSystemType
* @returns {string} "WINDOWS", "MACOS" or "UNKNOWN"
*/
QString getOperatingSystemType();
/**jsdoc
* Sets the position and size of the window on desktop. All units are pixels
* @function Test.setGeometry
* @param {int} x - Distance of window from left edge
* @param {int} y - Distance of window from top edge
* @param {int} width - Width of window
* @param {int} height - Height of window
*/
void setGeometry(int x, int y, int width, int height);
private:
bool waitForCondition(qint64 maxWaitMs, std::function<bool()> condition);
QString _testResultsLocation;