fix maximum size in lieu of the WoC porting

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=778192
This commit is contained in:
Aaron J. Seigo 2008-02-22 19:40:46 +00:00
parent ac2b7ba7a5
commit ee26284ec3

View File

@ -20,6 +20,8 @@
#include "lineedit.h" #include "lineedit.h"
#include <limits>
#include <QStyleOptionFrameV2> #include <QStyleOptionFrameV2>
#include <QTextDocument> #include <QTextDocument>
#include <QKeyEvent> #include <QKeyEvent>
@ -140,7 +142,9 @@ QSizeF LineEdit::minimumSize() const
QSizeF LineEdit::maximumSize() const QSizeF LineEdit::maximumSize() const
{ {
return minimumSize(); //TODO: well, this is useless, isn't it? ;) when ported to WoC, remove it
return QSizeF(std::numeric_limits<qreal>::infinity(),
std::numeric_limits<qreal>::infinity());
} }
bool LineEdit::hasHeightForWidth() const bool LineEdit::hasHeightForWidth() const
@ -153,7 +157,7 @@ qreal LineEdit::heightForWidth(qreal w) const
QTextDocument* doc = document(); QTextDocument* doc = document();
doc->setTextWidth(w); doc->setTextWidth(w);
qreal height = doc->size().height(); qreal height = doc->size().height();
kDebug() << "LineEdit::heightForWidth(" << w << ") is " << height; //kDebug() << "LineEdit::heightForWidth(" << w << ") is " << height;
return height; return height;
} }