diff --git a/src/api/UBWidgetUniboardAPI.cpp b/src/api/UBWidgetUniboardAPI.cpp index 970095c9..9f2b362e 100644 --- a/src/api/UBWidgetUniboardAPI.cpp +++ b/src/api/UBWidgetUniboardAPI.cpp @@ -541,7 +541,7 @@ void UBWidgetUniboardAPI::ProcessDropEvent(QDropEvent *event) registerIDWidget(UBDownloadManager::downloadManager()->addFileToDownload(desc)); - return; +// return; } } else if (pMimeData->hasUrls()) { //Local file processing diff --git a/src/api/UBWidgetUniboardAPI.h b/src/api/UBWidgetUniboardAPI.h index 7725aee7..66731e87 100644 --- a/src/api/UBWidgetUniboardAPI.h +++ b/src/api/UBWidgetUniboardAPI.h @@ -253,7 +253,6 @@ class UBWidgetUniboardAPI : public QObject private slots: void onDownloadFinished(bool pSuccess, sDownloadFileDesc desc, QByteArray pData); - private: inline void registerIDWidget(int id){webDownloadIds.append(id);} inline bool takeIDWidget(int id); diff --git a/src/domain/UBAbstractWidget.cpp b/src/domain/UBAbstractWidget.cpp index 0a598156..8832317b 100644 --- a/src/domain/UBAbstractWidget.cpp +++ b/src/domain/UBAbstractWidget.cpp @@ -428,7 +428,10 @@ void UBAbstractWidget::paintEvent(QPaintEvent * event) p.drawText(rect(), Qt::AlignCenter, message); } } - +void UBAbstractWidget::dropEvent(QDropEvent *event) +{ + QWebView::dropEvent(event); +} QPixmap UBAbstractWidget::takeSnapshot() { diff --git a/src/domain/UBAbstractWidget.h b/src/domain/UBAbstractWidget.h index 5c077d04..d2b65466 100644 --- a/src/domain/UBAbstractWidget.h +++ b/src/domain/UBAbstractWidget.h @@ -131,6 +131,7 @@ class UBAbstractWidget : public UBRoutedMouseEventWebView virtual void injectInlineJavaScript(); virtual void paintEvent(QPaintEvent * event); + virtual void dropEvent(QDropEvent *); protected slots: diff --git a/src/web/UBRoutedMouseEventWebView.cpp b/src/web/UBRoutedMouseEventWebView.cpp index e81be76c..77c3d015 100644 --- a/src/web/UBRoutedMouseEventWebView.cpp +++ b/src/web/UBRoutedMouseEventWebView.cpp @@ -93,3 +93,8 @@ void UBRoutedMouseEventWebView::wheelEvent(QWheelEvent* ev) p->event(ev); } } +//void UBRoutedMouseEventWebView::dropEvent(QDropEvent *event) +//{ +//// QWebView::dropEvent(event); +// event->accept(); +//} diff --git a/src/web/UBRoutedMouseEventWebView.h b/src/web/UBRoutedMouseEventWebView.h index 29aec978..3c030964 100644 --- a/src/web/UBRoutedMouseEventWebView.h +++ b/src/web/UBRoutedMouseEventWebView.h @@ -39,6 +39,7 @@ class UBRoutedMouseEventWebView : public QWebView virtual void mouseReleaseEvent(QMouseEvent* ev); virtual void contextMenuEvent(QContextMenuEvent* ev); virtual void wheelEvent(QWheelEvent* ev); +// virtual void dropEvent(QDropEvent *); }; #endif /* UBROUTEDMOUSEEVENTWEBVIEW_H_ */