qtquick: Remove isWrapper
Will readd it if it's really needed
This commit is contained in:
@@ -409,29 +409,12 @@ QSize View_qtquick::sizeHint() const
|
||||
|
||||
QSize View_qtquick::minSize() const
|
||||
{
|
||||
if (m_isWrapper) {
|
||||
const auto children = childItems();
|
||||
if (!children.isEmpty()) {
|
||||
const QSize min = children.constFirst()->property("kddockwidgets_min_size").toSize();
|
||||
return min.expandedTo(Layouting::Item::hardcodedMinimumSize);
|
||||
}
|
||||
}
|
||||
|
||||
const QSize min = property("kddockwidgets_min_size").toSize();
|
||||
return min.expandedTo(Layouting::Item::hardcodedMinimumSize);
|
||||
}
|
||||
|
||||
QSize View_qtquick::maxSizeHint() const
|
||||
{
|
||||
if (m_isWrapper) {
|
||||
const auto children = childItems();
|
||||
if (!children.isEmpty()) {
|
||||
const QSize max = children.constFirst()->property("kddockwidgets_max_size").toSize();
|
||||
return max.isEmpty() ? Layouting::Item::hardcodedMaximumSize
|
||||
: max.boundedTo(Layouting::Item::hardcodedMaximumSize);
|
||||
}
|
||||
}
|
||||
|
||||
const QSize max = property("kddockwidgets_max_size").toSize();
|
||||
return max.isEmpty() ? Layouting::Item::hardcodedMaximumSize
|
||||
: max.boundedTo(Layouting::Item::hardcodedMaximumSize);
|
||||
@@ -799,16 +782,6 @@ QVector<std::shared_ptr<View>> View_qtquick::childViews() const
|
||||
return result;
|
||||
}
|
||||
|
||||
void View_qtquick::setIsWrapper()
|
||||
{
|
||||
m_isWrapper = true;
|
||||
}
|
||||
|
||||
bool View_qtquick::isWrapper() const
|
||||
{
|
||||
return m_isWrapper;
|
||||
}
|
||||
|
||||
void View_qtquick::onWindowStateChangeEvent(QWindowStateChangeEvent *)
|
||||
{
|
||||
if (QWindow *window = QQuickItem::window()) {
|
||||
|
||||
@@ -158,12 +158,6 @@ public:
|
||||
void setMouseTracking(bool enable) override;
|
||||
QVector<std::shared_ptr<View>> childViews() const override;
|
||||
|
||||
// TODOv2: Check if this is still needed
|
||||
void setIsWrapper();
|
||||
|
||||
// TODOv2: Check if this is still needed
|
||||
bool isWrapper() const;
|
||||
|
||||
/// @brief This is equivalent to "anchors.fill: parent but in C++
|
||||
void makeItemFillParent(QQuickItem *item);
|
||||
void onWindowStateChangeEvent(QWindowStateChangeEvent *);
|
||||
@@ -194,7 +188,6 @@ private:
|
||||
int m_widgetAttributes = 0; // Qt::WidgetAttribute
|
||||
Qt::FocusPolicy m_focusPolicy = Qt::NoFocus;
|
||||
bool m_mouseTrackingEnabled = false;
|
||||
bool m_isWrapper = false; // TODOv2: What's this about
|
||||
QRect m_normalGeometry;
|
||||
Qt::WindowStates m_oldWindowState = Qt::WindowState::WindowNoState;
|
||||
MouseEventRedirector *m_mouseEventRedirector = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user