[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasma-framework/mart/AppletAttached] src/declarativeimports/core: check for validity
From: Marco Martin <notmart () gmail ! com>
Date: 2014-01-31 19:03:48
Message-ID: E1W9JNU-0005dB-O0 () scm ! kde ! org
[Download RAW message or body]
Git commit b68bbca6c8ad397e913c48c0ed8aec10953929b7 by Marco Martin.
Committed on 31/01/2014 at 19:03.
Pushed by mart into branch 'mart/AppletAttached'.
check for validity
M +12 -2 src/declarativeimports/core/dialog.cpp
http://commits.kde.org/plasma-framework/b68bbca6c8ad397e913c48c0ed8aec10953929b7
diff --git a/src/declarativeimports/core/dialog.cpp b/src/declarativeimports/core/dialog.cpp
index a4f5d23..80cb674 100644
--- a/src/declarativeimports/core/dialog.cpp
+++ b/src/declarativeimports/core/dialog.cpp
@@ -613,7 +613,12 @@ void DialogProxy::updateMinimumHeight()
void DialogProxy::updateMaximumWidth()
{
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 {
setMaximumWidth(DIALOGSIZE_MAX);
}
@@ -622,7 +627,12 @@ void DialogProxy::updateMaximumWidth()
void DialogProxy::updateMaximumHeight()
{
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 {
setMaximumHeight(DIALOGSIZE_MAX);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic