mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:17:43 +02:00
Fix compile error
This commit is contained in:
parent
b666acdb26
commit
a1c154e7be
1 changed files with 6 additions and 22 deletions
|
@ -332,14 +332,6 @@ bool setupEssentials(int& argc, char** argv) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QHash<QString, Application::AcceptURLMethod> Application::_acceptedExtensions {
|
|
||||||
{ SNAPSHOT_EXTENSION, &Application::acceptSnapshot },
|
|
||||||
{ SVO_EXTENSION, &Application::importSVOFromURL },
|
|
||||||
{ SVO_JSON_EXTENSION, &Application::importSVOFromURL },
|
|
||||||
{ JS_EXTENSION, &Application::askToLoadScript },
|
|
||||||
{ FST_EXTENSION, &Application::askToSetAvatarUrl }
|
|
||||||
};
|
|
||||||
|
|
||||||
// FIXME move to header, or better yet, design some kind of UI manager
|
// FIXME move to header, or better yet, design some kind of UI manager
|
||||||
// to take care of highlighting keyboard focused items, rather than
|
// to take care of highlighting keyboard focused items, rather than
|
||||||
// continuing to overburden Application.cpp
|
// continuing to overburden Application.cpp
|
||||||
|
@ -2027,26 +2019,18 @@ void Application::wheelEvent(QWheelEvent* event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::dropEvent(QDropEvent *event) {
|
void Application::dropEvent(QDropEvent *event) {
|
||||||
const QMimeData *mimeData = event->mimeData();
|
const QMimeData* mimeData = event->mimeData();
|
||||||
bool atLeastOneFileAccepted = false;
|
for (auto& url : mimeData->urls()) {
|
||||||
foreach (QUrl url, mimeData->urls()) {
|
|
||||||
QString urlString = url.toString();
|
QString urlString = url.toString();
|
||||||
if (canAcceptURL(urlString)) {
|
if (canAcceptURL(urlString) && acceptURL(urlString)) {
|
||||||
if (acceptURL(urlString)) {
|
event->acceptProposedAction();
|
||||||
atLeastOneFileAccepted = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (atLeastOneFileAccepted) {
|
|
||||||
event->acceptProposedAction();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::dragEnterEvent(QDragEnterEvent* event) {
|
void Application::dragEnterEvent(QDragEnterEvent* event) {
|
||||||
const QMimeData* mimeData = event->mimeData();
|
const QMimeData* mimeData = event->mimeData();
|
||||||
foreach(QUrl url, mimeData->urls()) {
|
for (auto& url : mimeData->urls()) {
|
||||||
auto urlString = url.toString();
|
auto urlString = url.toString();
|
||||||
if (canAcceptURL(urlString)) {
|
if (canAcceptURL(urlString)) {
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
|
@ -4091,7 +4075,7 @@ bool Application::askToUploadAsset(const QString& filename) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptEngine* Application::loadScript(const QString& scriptFilename, bool isUserLoaded,
|
ScriptEngine* Application::loadScript(const QString& scriptFilename, bool isUserLoaded,
|
||||||
bool loadScriptFromEditor, bool activateMainWindow, bool reload) {
|
bool loadScriptFromEditor, bool activateMainWindow, bool reload) {
|
||||||
|
|
||||||
if (isAboutToQuit()) {
|
if (isAboutToQuit()) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue