qtquick: Remove unneeded functions from Stack_qtquick

This commit is contained in:
Sergio Martins
2022-09-10 15:46:56 +01:00
parent cf6b3c06e0
commit f18a288def
2 changed files with 2 additions and 40 deletions

View File

@@ -25,22 +25,3 @@ Stack_qtquick::Stack_qtquick(Controllers::Stack *controller, QQuickItem *parent)
, StackViewInterface(controller)
{
}
void Stack_qtquick::init()
{
m_tabBarAutoHideChanged =
m_stack->tabBarAutoHideChanged.connect([this] { Q_EMIT tabBarAutoHideChanged(); });
Q_EMIT tabBarChanged();
}
Controllers::Stack *Stack_qtquick::stack() const
{
return m_stack;
}
bool Stack_qtquick::tabBarAutoHide() const
{
return m_stack->tabBarAutoHide();
}

View File

@@ -25,13 +25,10 @@
#include <QVector>
#include "kdbindings/signal.h"
namespace KDDockWidgets {
namespace Controllers {
class DockWidget;
class Group;
class TabBar;
class Stack;
}
namespace Views {
@@ -42,24 +39,8 @@ class DOCKS_EXPORT Stack_qtquick : public View_qtquick, public StackViewInterfac
public:
explicit Stack_qtquick(Controllers::Stack *controller, QQuickItem *parent = nullptr);
/// @brief Returns the stack controller associated with this view
Controllers::Stack *stack() const;
/// Returns whether the tab bar should hide when there's only 1 tab visible
/// Default true, unless Flag_HideTitleBarWhenTabsVisible
bool tabBarAutoHide() const;
Q_SIGNALS:
void tabBarChanged();
void tabBarAutoHideChanged();
protected:
void init() override;
private:
Q_DISABLE_COPY(Stack_qtquick)
KDBindings::ScopedConnection m_tabBarAutoHideChanged;
};
}