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:
parent
ca04e9d967
commit
c7d58017d2
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user