mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:23:36 +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;
|
||||
const QMimeData *mimeData = event->mimeData();
|
||||
foreach (QUrl url, mimeData->urls()) {
|
||||
if (url.url().toLower().endsWith("jpg")) {
|
||||
if (url.url().toLower().endsWith(SNAPSHOT_EXTENSION)) {
|
||||
snapshotPath = url.url().remove("file://");
|
||||
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_BLUE = 0.0f;
|
||||
|
||||
static const QString SNAPSHOT_EXTENSION = ".jpg";
|
||||
|
||||
class Application : public QApplication {
|
||||
Q_OBJECT
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ void GLCanvas::wheelEvent(QWheelEvent* event) {
|
|||
void GLCanvas::dragEnterEvent(QDragEnterEvent* event) {
|
||||
const QMimeData *mimeData = event->mimeData();
|
||||
foreach (QUrl url, mimeData->urls()) {
|
||||
if (url.url().toLower().endsWith("jpg")) {
|
||||
if (url.url().toLower().endsWith(SNAPSHOT_EXTENSION)) {
|
||||
event->acceptProposedAction();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue