Lua: Fix for setSizedSize arg type

Change-Id: If8e64d9556b44fc2fc440ce8c95bed18e241032f
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Artur Twardy
2024-10-29 16:09:30 +01:00
parent 34228039d8
commit 96cb78b617
3 changed files with 4 additions and 4 deletions

View File

@@ -709,9 +709,9 @@ void Widget::setSize(int w, int h)
access(this)->resize(w, h);
}
void Widget::setFixedSize(int w, int h)
void Widget::setFixedSize(const QSize &size)
{
access(this)->setFixedSize(w, h);
access(this)->setFixedSize(size);
}
void Widget::setAutoFillBackground(bool on)

View File

@@ -248,7 +248,7 @@ public:
void setAutoFillBackground(bool);
void setLayout(const Layout &layout);
void setSize(int, int);
void setFixedSize(int, int);
void setFixedSize(const QSize &);
void setWindowTitle(const QString &);
void setWindowFlags(Qt::WindowFlags);
void setWidgetAttribute(Qt::WidgetAttribute, bool on);

View File

@@ -123,7 +123,7 @@ void setProperties(std::unique_ptr<T> &item, const sol::table &children, QObject
if constexpr (has_setFixedSize<T>) {
sol::optional<QSize> size = children.get<sol::optional<QSize>>("fixedSize");
if (size)
item->setFixedSize(size->width(), size->height());
item->setFixedSize(*size);
}
if constexpr (has_setWordWrap<T>) {