Fixed infinite loops in the config loader if the type of the config element was "point", "rect" or "size".
svn path=/trunk/KDE/kdelibs/; revision=1174512
This commit is contained in:
parent
5c72c867eb
commit
43b5b80b47
@ -288,7 +288,7 @@ void ConfigLoaderHandler::addItem()
|
|||||||
} else if (m_type == "point") {
|
} else if (m_type == "point") {
|
||||||
QPoint defaultPoint;
|
QPoint defaultPoint;
|
||||||
QStringList tmpList = m_default.split(',');
|
QStringList tmpList = m_default.split(',');
|
||||||
while (tmpList.size() >= 2) {
|
if (tmpList.size() >= 2) {
|
||||||
defaultPoint.setX(tmpList[0].toInt());
|
defaultPoint.setX(tmpList[0].toInt());
|
||||||
defaultPoint.setY(tmpList[1].toInt());
|
defaultPoint.setY(tmpList[1].toInt());
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ void ConfigLoaderHandler::addItem()
|
|||||||
} else if (m_type == "rect") {
|
} else if (m_type == "rect") {
|
||||||
QRect defaultRect;
|
QRect defaultRect;
|
||||||
QStringList tmpList = m_default.split(',');
|
QStringList tmpList = m_default.split(',');
|
||||||
while (tmpList.size() >= 4) {
|
if (tmpList.size() >= 4) {
|
||||||
defaultRect.setCoords(tmpList[0].toInt(), tmpList[1].toInt(),
|
defaultRect.setCoords(tmpList[0].toInt(), tmpList[1].toInt(),
|
||||||
tmpList[2].toInt(), tmpList[3].toInt());
|
tmpList[2].toInt(), tmpList[3].toInt());
|
||||||
}
|
}
|
||||||
@ -304,7 +304,7 @@ void ConfigLoaderHandler::addItem()
|
|||||||
} else if (m_type == "size") {
|
} else if (m_type == "size") {
|
||||||
QSize defaultSize;
|
QSize defaultSize;
|
||||||
QStringList tmpList = m_default.split(',');
|
QStringList tmpList = m_default.split(',');
|
||||||
while (tmpList.size() >= 2) {
|
if (tmpList.size() >= 2) {
|
||||||
defaultSize.setWidth(tmpList[0].toInt());
|
defaultSize.setWidth(tmpList[0].toInt());
|
||||||
defaultSize.setHeight(tmpList[1].toInt());
|
defaultSize.setHeight(tmpList[1].toInt());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user