mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 18:26:26 +02:00
added SNAPSHOT_EXTENSION constant
This commit is contained in:
parent
fe6f5a341c
commit
08c8f47cd4
3 changed files with 4 additions and 2 deletions
|
@ -1384,7 +1384,7 @@ void Application::dropEvent(QDropEvent *event) {
|
||||||
QString snapshotPath;
|
QString snapshotPath;
|
||||||
const QMimeData *mimeData = event->mimeData();
|
const QMimeData *mimeData = event->mimeData();
|
||||||
foreach (QUrl url, mimeData->urls()) {
|
foreach (QUrl url, mimeData->urls()) {
|
||||||
if (url.url().toLower().endsWith("jpg")) {
|
if (url.url().toLower().endsWith(SNAPSHOT_EXTENSION)) {
|
||||||
snapshotPath = url.url().remove("file://");
|
snapshotPath = url.url().remove("file://");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,8 @@ static const float NODE_KILLED_RED = 1.0f;
|
||||||
static const float NODE_KILLED_GREEN = 0.0f;
|
static const float NODE_KILLED_GREEN = 0.0f;
|
||||||
static const float NODE_KILLED_BLUE = 0.0f;
|
static const float NODE_KILLED_BLUE = 0.0f;
|
||||||
|
|
||||||
|
static const QString SNAPSHOT_EXTENSION = ".jpg";
|
||||||
|
|
||||||
class Application : public QApplication {
|
class Application : public QApplication {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ void GLCanvas::wheelEvent(QWheelEvent* event) {
|
||||||
void GLCanvas::dragEnterEvent(QDragEnterEvent* event) {
|
void GLCanvas::dragEnterEvent(QDragEnterEvent* event) {
|
||||||
const QMimeData *mimeData = event->mimeData();
|
const QMimeData *mimeData = event->mimeData();
|
||||||
foreach (QUrl url, mimeData->urls()) {
|
foreach (QUrl url, mimeData->urls()) {
|
||||||
if (url.url().toLower().endsWith("jpg")) {
|
if (url.url().toLower().endsWith(SNAPSHOT_EXTENSION)) {
|
||||||
event->acceptProposedAction();
|
event->acceptProposedAction();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue