1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

AddTabButton: Remove handling of drop events

It is handeld by the TabBar itself.
This commit is contained in:
David Rosca 2017-12-31 19:18:45 +01:00
parent ca04e9d967
commit c7d58017d2
2 changed files with 0 additions and 28 deletions

View File

@ -65,32 +65,6 @@ void AddTabButton::mouseReleaseEvent(QMouseEvent* event)
ToolButton::mouseReleaseEvent(event);
}
void AddTabButton::dragEnterEvent(QDragEnterEvent* event)
{
const QMimeData* mime = event->mimeData();
if (mime->hasUrls()) {
event->acceptProposedAction();
return;
}
ToolButton::dragEnterEvent(event);
}
void AddTabButton::dropEvent(QDropEvent* event)
{
const QMimeData* mime = event->mimeData();
if (!mime->hasUrls()) {
ToolButton::dropEvent(event);
return;
}
foreach (const QUrl &url, mime->urls()) {
m_tabWidget->addView(url, Qz::NT_SelectedNewEmptyTab);
}
}
void MenuTabs::mouseReleaseEvent(QMouseEvent* event)
{
if (event->button() == Qt::MiddleButton) {

View File

@ -44,8 +44,6 @@ public:
private:
void wheelEvent(QWheelEvent* event);
void mouseReleaseEvent(QMouseEvent* event);
void dragEnterEvent(QDragEnterEvent* event);
void dropEvent(QDropEvent* event);
TabBar* m_tabBar;
TabWidget* m_tabWidget;