mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 06:03:26 +02:00
testing for URL bug
This commit is contained in:
parent
9833ba1987
commit
76a847d34f
2 changed files with 6 additions and 2 deletions
|
@ -2010,13 +2010,13 @@ bool Application::importJSONFromURL(const QString& urlString) {
|
|||
}
|
||||
|
||||
bool Application::importSVOFromURL(const QString& urlString) {
|
||||
|
||||
emit svoImportRequested(urlString);
|
||||
return true;
|
||||
}
|
||||
|
||||
// attempt to start ZIP download project
|
||||
bool Application::importZIPFromURL(const QString& urlString) {
|
||||
qDebug() << "zip import request has been emitted";
|
||||
emit zipImportRequested(urlString);
|
||||
return true;
|
||||
}
|
||||
|
@ -2141,13 +2141,16 @@ bool Application::event(QEvent* event) {
|
|||
// handle custom URL
|
||||
if (event->type() == QEvent::FileOpen) {
|
||||
|
||||
QFileOpenEvent* fileEvent = static_cast<QFileOpenEvent*>(event);
|
||||
qDebug() << "we have received one url!: ";
|
||||
QFileOpenEvent* fileEvent = static_cast<QFileOpenEvent*>(event);
|
||||
|
||||
QUrl url = fileEvent->url();
|
||||
|
||||
if (!url.isEmpty()) {
|
||||
QString urlString = url.toString();
|
||||
qDebug() << "we got a url!: " + urlString;
|
||||
if (canAcceptURL(urlString)) {
|
||||
qDebug() << "we got an ACCEPTED url!: " + urlString;
|
||||
return acceptURL(urlString);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ WindowScriptingInterface::WindowScriptingInterface() {
|
|||
});
|
||||
// attempt to start ZIP download project
|
||||
connect(qApp, &Application::zipImportRequested, [this](const QString& urlString) {
|
||||
qDebug() << "zip import has been requested";
|
||||
static const QMetaMethod zipImportRequestedSignal =
|
||||
QMetaMethod::fromSignal(&WindowScriptingInterface::zipImportRequested);
|
||||
|
||||
|
|
Loading…
Reference in a new issue