Skip to content

Commit

Permalink
chore: remove ~TabBar
Browse files Browse the repository at this point in the history
It cause crash after Qt6

Log:
  • Loading branch information
Johnson-zs committed Jan 7, 2025
1 parent af2307e commit 7881dc1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/plugins/filemanager/dfmplugin-titlebar/views/tabbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ TabBar::TabBar(QWidget *parent)

TabBar::~TabBar()
{
disconnect(this, &TabBar::currentChanged, nullptr, nullptr);
for (int index = tabList.count() - 1; index >= 0; --index) {
removeTab(index);
}
}

int TabBar::createTab()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void TitleBarWidget::handleSplitterAnimation(const QVariant &position)
splitterEndValue = -1;
isSplitterAnimating = false;
}

int newWidth = qMax(0, 95 - position.toInt());
if (newWidth == placeholder->width())
return;
Expand Down Expand Up @@ -455,7 +455,7 @@ void TitleBarWidget::saveTitleBarState(const QString &uniqueId)
state.advancedSearchChecked = searchEditWidget->isAdvancedButtonChecked();
state.searchText = searchEditWidget->text();
state.viewMode = optionButtonBox->viewMode();

titleBarStateMap[uniqueId] = state;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ private slots:
int splitterEndValue { -1 };
bool isSplitterAnimating { false };

struct TitleBarState {
struct TitleBarState
{
DFMBASE_NAMESPACE::Global::ViewMode viewMode { DFMBASE_NAMESPACE::Global::ViewMode::kIconMode };
bool advancedSearchChecked { false };
QString searchText { "" };
Expand Down

0 comments on commit 7881dc1

Please sign in to comment.