mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 11:53:34 +02:00
Merge pull request #12186 from ctrlaltdavid/21702
Add Window.protocolSignature() as a replacement for location.protocolVersion()
This commit is contained in:
commit
37504eca15
8 changed files with 17 additions and 6 deletions
interface
resources/qml/hifi
src
libraries/networking/src
scripts/system
unpublishedScripts/marketplace/camera-move
|
@ -102,7 +102,7 @@ Column {
|
|||
'include_actions=' + actions,
|
||||
'restriction=' + (Account.isLoggedIn() ? 'open,hifi' : 'open'),
|
||||
'require_online=true',
|
||||
'protocol=' + encodeURIComponent(AddressManager.protocolVersion()),
|
||||
'protocol=' + encodeURIComponent(Window.protocolSignature()),
|
||||
'page=' + pageNumber
|
||||
];
|
||||
var url = metaverseBase + 'user_stories?' + options.join('&');
|
||||
|
|
|
@ -573,8 +573,7 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
|
|||
}
|
||||
};
|
||||
reportAndQuit("--protocolVersion", [&](FILE* fp) {
|
||||
DependencyManager::set<AddressManager>();
|
||||
auto version = DependencyManager::get<AddressManager>()->protocolVersion();
|
||||
auto version = protocolVersionsSignatureBase64();
|
||||
fputs(version.toLatin1().data(), fp);
|
||||
});
|
||||
reportAndQuit("--version", [&](FILE* fp) {
|
||||
|
|
|
@ -390,6 +390,10 @@ QString WindowScriptingInterface::checkVersion() {
|
|||
return QCoreApplication::applicationVersion();
|
||||
}
|
||||
|
||||
QString WindowScriptingInterface::protocolSignature() {
|
||||
return protocolVersionsSignatureBase64();
|
||||
}
|
||||
|
||||
int WindowScriptingInterface::getInnerWidth() {
|
||||
return qApp->getDeviceSize().x;
|
||||
}
|
||||
|
|
|
@ -305,6 +305,13 @@ public slots:
|
|||
*/
|
||||
QString checkVersion();
|
||||
|
||||
/**jsdoc
|
||||
* Get the signature for Interface's protocol version.
|
||||
* @function Window.protocolSignature
|
||||
* @returns {string} A string uniquely identifying the version of the metaverse protocol that Interface is using.
|
||||
*/
|
||||
QString protocolSignature();
|
||||
|
||||
/**jsdoc
|
||||
* Copies text to the operating system's clipboard.
|
||||
* @function Window.copyToClipboard
|
||||
|
|
|
@ -73,6 +73,7 @@ public:
|
|||
* Get Interface's protocol version.
|
||||
* @function location.protocolVersion
|
||||
* @returns {string} A string uniquely identifying the version of the metaverse protocol that Interface is using.
|
||||
* @deprecated This function is deprecated and will be removed. Use {@link Window.protocolSignature} instead.
|
||||
*/
|
||||
Q_INVOKABLE QString protocolVersion();
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
'include_actions=' + actions,
|
||||
'restriction=' + (Account.isLoggedIn() ? 'open,hifi' : 'open'),
|
||||
'require_online=true',
|
||||
'protocol=' + encodeURIComponent(location.protocolVersion()),
|
||||
'protocol=' + encodeURIComponent(Window.protocolSignature()),
|
||||
'per_page=' + count
|
||||
];
|
||||
var url = Account.metaverseServerURL + '/api/v1/user_stories?' + options.join('&');
|
||||
|
|
|
@ -133,7 +133,7 @@ var DEBUG_INFO = {
|
|||
Reticle: {
|
||||
supportsScale: 'scale' in Reticle,
|
||||
},
|
||||
protocolVersion: location.protocolVersion,
|
||||
protocolVersion: Window.protocolSignature(),
|
||||
};
|
||||
|
||||
var globalState = {
|
||||
|
|
|
@ -52,7 +52,7 @@ function CustomSettingsApp(options) {
|
|||
|
||||
this.extraParams = Object.assign(options.extraParams || {}, {
|
||||
customSettingsVersion: CustomSettingsApp.version+'',
|
||||
protocolVersion: location.protocolVersion && location.protocolVersion()
|
||||
protocolVersion: Window.protocolSignature && Window.protocolSignature()
|
||||
});
|
||||
|
||||
var params = {
|
||||
|
|
Loading…
Reference in a new issue