Commit f4b44058 authored by Ivan Ilin's avatar Ivan Ilin

some debug changes for dnd

parent 2984f83c
...@@ -541,7 +541,7 @@ void UBWidgetUniboardAPI::ProcessDropEvent(QDropEvent *event) ...@@ -541,7 +541,7 @@ void UBWidgetUniboardAPI::ProcessDropEvent(QDropEvent *event)
registerIDWidget(UBDownloadManager::downloadManager()->addFileToDownload(desc)); registerIDWidget(UBDownloadManager::downloadManager()->addFileToDownload(desc));
return; // return;
} }
} else if (pMimeData->hasUrls()) { //Local file processing } else if (pMimeData->hasUrls()) { //Local file processing
......
...@@ -253,7 +253,6 @@ class UBWidgetUniboardAPI : public QObject ...@@ -253,7 +253,6 @@ class UBWidgetUniboardAPI : public QObject
private slots: private slots:
void onDownloadFinished(bool pSuccess, sDownloadFileDesc desc, QByteArray pData); void onDownloadFinished(bool pSuccess, sDownloadFileDesc desc, QByteArray pData);
private: private:
inline void registerIDWidget(int id){webDownloadIds.append(id);} inline void registerIDWidget(int id){webDownloadIds.append(id);}
inline bool takeIDWidget(int id); inline bool takeIDWidget(int id);
......
...@@ -428,7 +428,10 @@ void UBAbstractWidget::paintEvent(QPaintEvent * event) ...@@ -428,7 +428,10 @@ void UBAbstractWidget::paintEvent(QPaintEvent * event)
p.drawText(rect(), Qt::AlignCenter, message); p.drawText(rect(), Qt::AlignCenter, message);
} }
} }
void UBAbstractWidget::dropEvent(QDropEvent *event)
{
QWebView::dropEvent(event);
}
QPixmap UBAbstractWidget::takeSnapshot() QPixmap UBAbstractWidget::takeSnapshot()
{ {
......
...@@ -131,6 +131,7 @@ class UBAbstractWidget : public UBRoutedMouseEventWebView ...@@ -131,6 +131,7 @@ class UBAbstractWidget : public UBRoutedMouseEventWebView
virtual void injectInlineJavaScript(); virtual void injectInlineJavaScript();
virtual void paintEvent(QPaintEvent * event); virtual void paintEvent(QPaintEvent * event);
virtual void dropEvent(QDropEvent *);
protected slots: protected slots:
......
...@@ -93,3 +93,8 @@ void UBRoutedMouseEventWebView::wheelEvent(QWheelEvent* ev) ...@@ -93,3 +93,8 @@ void UBRoutedMouseEventWebView::wheelEvent(QWheelEvent* ev)
p->event(ev); p->event(ev);
} }
} }
//void UBRoutedMouseEventWebView::dropEvent(QDropEvent *event)
//{
//// QWebView::dropEvent(event);
// event->accept();
//}
...@@ -39,6 +39,7 @@ class UBRoutedMouseEventWebView : public QWebView ...@@ -39,6 +39,7 @@ class UBRoutedMouseEventWebView : public QWebView
virtual void mouseReleaseEvent(QMouseEvent* ev); virtual void mouseReleaseEvent(QMouseEvent* ev);
virtual void contextMenuEvent(QContextMenuEvent* ev); virtual void contextMenuEvent(QContextMenuEvent* ev);
virtual void wheelEvent(QWheelEvent* ev); virtual void wheelEvent(QWheelEvent* ev);
// virtual void dropEvent(QDropEvent *);
}; };
#endif /* UBROUTEDMOUSEEVENTWEBVIEW_H_ */ #endif /* UBROUTEDMOUSEEVENTWEBVIEW_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment