mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 05:53:29 +02:00
keep signature for askToLoadScript
This commit is contained in:
parent
216e47b29a
commit
5bce924eda
2 changed files with 6 additions and 5 deletions
|
@ -4804,16 +4804,17 @@ bool Application::askToSetAvatarUrl(const QString& url) {
|
|||
}
|
||||
|
||||
|
||||
bool Application::askToLoadScript(QString scriptFilenameOrURL) {
|
||||
bool Application::askToLoadScript(const QString& scriptFilenameOrURL) {
|
||||
QMessageBox::StandardButton reply;
|
||||
|
||||
static const QString MARKETPLACE_SCRIPT_URL_HOSTNAME_SUFFIX = "mpassets.highfidelity.com";
|
||||
|
||||
if (scriptFilenameOrURL.contains(MARKETPLACE_SCRIPT_URL_HOSTNAME_SUFFIX)) {
|
||||
scriptFilenameOrURL = scriptFilenameOrURL.mid(scriptFilenameOrURL.lastIndexOf('/') + 1);
|
||||
QString shortName = scriptFilenameOrURL;
|
||||
if (shortName.contains(MARKETPLACE_SCRIPT_URL_HOSTNAME_SUFFIX)) {
|
||||
shortName = shortName.mid(shortName.lastIndexOf('/') + 1);
|
||||
}
|
||||
|
||||
QString message = "Would you like to run this script:\n" + scriptFilenameOrURL;
|
||||
QString message = "Would you like to run this script:\n" + shortName;
|
||||
|
||||
reply = OffscreenUi::question(getWindow(), "Run Script", message, QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
|
|
|
@ -329,7 +329,7 @@ private slots:
|
|||
|
||||
bool acceptSnapshot(const QString& urlString);
|
||||
bool askToSetAvatarUrl(const QString& url);
|
||||
bool askToLoadScript(QString scriptFilenameOrURL);
|
||||
bool askToLoadScript(const QString& scriptFilenameOrURL);
|
||||
|
||||
bool askToWearAvatarAttachmentUrl(const QString& url);
|
||||
void displayAvatarAttachmentWarning(const QString& message) const;
|
||||
|
|
Loading…
Reference in a new issue