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") {
|
||||
QPoint defaultPoint;
|
||||
QStringList tmpList = m_default.split(',');
|
||||
while (tmpList.size() >= 2) {
|
||||
if (tmpList.size() >= 2) {
|
||||
defaultPoint.setX(tmpList[0].toInt());
|
||||
defaultPoint.setY(tmpList[1].toInt());
|
||||
}
|
||||
@ -296,7 +296,7 @@ void ConfigLoaderHandler::addItem()
|
||||
} else if (m_type == "rect") {
|
||||
QRect defaultRect;
|
||||
QStringList tmpList = m_default.split(',');
|
||||
while (tmpList.size() >= 4) {
|
||||
if (tmpList.size() >= 4) {
|
||||
defaultRect.setCoords(tmpList[0].toInt(), tmpList[1].toInt(),
|
||||
tmpList[2].toInt(), tmpList[3].toInt());
|
||||
}
|
||||
@ -304,7 +304,7 @@ void ConfigLoaderHandler::addItem()
|
||||
} else if (m_type == "size") {
|
||||
QSize defaultSize;
|
||||
QStringList tmpList = m_default.split(',');
|
||||
while (tmpList.size() >= 2) {
|
||||
if (tmpList.size() >= 2) {
|
||||
defaultSize.setWidth(tmpList[0].toInt());
|
||||
defaultSize.setHeight(tmpList[1].toInt());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user