mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-13 10:32:11 +01:00
TabBar: Fix dropping text/url to tabs
This commit is contained in:
parent
ef06ed567a
commit
7b6b69c35f
|
@ -661,12 +661,12 @@ void TabBar::dropEvent(QDropEvent* event)
|
||||||
req = mApp->searchEnginesManager()->searchResult(mime->text());
|
req = mApp->searchEnginesManager()->searchResult(mime->text());
|
||||||
}
|
}
|
||||||
if (action == SelectTab) {
|
if (action == SelectTab) {
|
||||||
if (tab->isRestored() && !req.isValid()) {
|
if (tab->isRestored() && req.isValid()) {
|
||||||
tab->webView()->load(req);
|
tab->webView()->load(req);
|
||||||
}
|
}
|
||||||
} else if (action == PrependTab || action == AppendTab) {
|
} else if (action == PrependTab || action == AppendTab) {
|
||||||
const int newIndex = action == PrependTab ? index : index + 1;
|
const int newIndex = action == PrependTab ? index : index + 1;
|
||||||
if (!req.isValid()) {
|
if (req.isValid()) {
|
||||||
m_tabWidget->addView(req, QString(), Qz::NT_SelectedNewEmptyTab, false, newIndex, index < pinnedTabsCount());
|
m_tabWidget->addView(req, QString(), Qz::NT_SelectedNewEmptyTab, false, newIndex, index < pinnedTabsCount());
|
||||||
} else if (mime->hasFormat(MIMETYPE) && sourceTabBar) {
|
} else if (mime->hasFormat(MIMETYPE) && sourceTabBar) {
|
||||||
WebTab *tab = sourceTabBar->webTab();
|
WebTab *tab = sourceTabBar->webTab();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user