connect(tabBar, &DolphinTabBar::openNewActivatedTab, this, QOverload<int>::of(&DolphinTabWidget::openNewActivatedTab));
connect(tabBar, &DolphinTabBar::tabDropEvent, this, &DolphinTabWidget::tabDropEvent);
connect(tabBar, &DolphinTabBar::tabDetachRequested, this, &DolphinTabWidget::detachTab);
- tabBar->hide();
setTabBar(tabBar);
setDocumentMode(true);
setElideMode(Qt::ElideRight);
setUsesScrollButtons(true);
+ setTabBarAutoHide(true);
}
DolphinTabPage *DolphinTabWidget::currentTabPage() const
const auto urls = event->mimeData()->urls();
for (const QUrl &url : urls) {
- auto *job = KIO::statDetails(url, KIO::StatJob::SourceSide, KIO::StatDetail::StatBasic, KIO::JobFlag::HideProgressInfo);
+ auto *job = KIO::stat(url, KIO::StatJob::SourceSide, KIO::StatDetail::StatBasic, KIO::JobFlag::HideProgressInfo);
connect(job, &KJob::result, this, [this, job]() {
if (!job->error() && job->statResult().isDir()) {
openNewTab(job->url(), QUrl(), NewTabPosition::AtEnd);
{
QTabWidget::tabInserted(index);
- if (count() > 1) {
+ if (tabBar()->isVisible()) {
// Resolve all pending tab icons
for (int i = 0; i < count(); ++i) {
const QUrl url = tabPageAt(i)->activeViewContainer()->url();
tabBar()->setTabToolTip(index, url.toDisplayString(QUrl::PreferLocalFile));
}
}
-
- tabBar()->show();
}
Q_EMIT tabCountChanged(count());
{
QTabWidget::tabRemoved(index);
- // If only one tab is left, then remove the tab entry so that
- // closing the last tab is not possible.
- if (count() < 2) {
- tabBar()->hide();
- }
-
Q_EMIT tabCountChanged(count());
}