check for validity
This commit is contained in:
parent
89cb417e9f
commit
b68bbca6c8
@ -613,7 +613,12 @@ void DialogProxy::updateMinimumHeight()
|
|||||||
void DialogProxy::updateMaximumWidth()
|
void DialogProxy::updateMaximumWidth()
|
||||||
{
|
{
|
||||||
if (m_mainItemLayout) {
|
if (m_mainItemLayout) {
|
||||||
setMaximumWidth(m_mainItemLayout.data()->property("maximumWidth").toInt());
|
const int hint = m_mainItemLayout.data()->property("maximumWidth").toInt();
|
||||||
|
if (hint > 0) {
|
||||||
|
setMaximumWidth(hint);
|
||||||
|
} else {
|
||||||
|
setMaximumWidth(DIALOGSIZE_MAX);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setMaximumWidth(DIALOGSIZE_MAX);
|
setMaximumWidth(DIALOGSIZE_MAX);
|
||||||
}
|
}
|
||||||
@ -622,7 +627,12 @@ void DialogProxy::updateMaximumWidth()
|
|||||||
void DialogProxy::updateMaximumHeight()
|
void DialogProxy::updateMaximumHeight()
|
||||||
{
|
{
|
||||||
if (m_mainItemLayout) {
|
if (m_mainItemLayout) {
|
||||||
setMaximumHeight(m_mainItemLayout.data()->property("maximumWidth").toInt());
|
const int hint = m_mainItemLayout.data()->property("maximumHeight").toInt();
|
||||||
|
if (hint > 0) {
|
||||||
|
setMaximumWidth(hint);
|
||||||
|
} else {
|
||||||
|
setMaximumWidth(DIALOGSIZE_MAX);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setMaximumHeight(DIALOGSIZE_MAX);
|
setMaximumHeight(DIALOGSIZE_MAX);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user