summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-05-03 00:44:51 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2011-05-04 03:18:21 (GMT)
commit012b2d8198b8cfe39a66025334ed9ae2a045a68c (patch)
treea2bdb3d3c329946193e1338b8c3c35d54db91ff5 /tests
parentd1011fc9328fa335bc69a065b29e77ce60608c55 (diff)
downloadQt-012b2d8198b8cfe39a66025334ed9ae2a045a68c.zip
Qt-012b2d8198b8cfe39a66025334ed9ae2a045a68c.tar.gz
Qt-012b2d8198b8cfe39a66025334ed9ae2a045a68c.tar.bz2
Remove dead code from qgraphicsgridlayout autotest
Change-Id: I230d1ec9dfd5df2a0fac161a03090308b7f07a1e Task-number: QTBUG-17582 Reviewed-by: Rohan McGovern
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
index 837df78..78010e6 100644
--- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
+++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp
@@ -3018,39 +3018,6 @@ static QSizeF wfh(Qt::SizeHint /*which*/, const QSizeF &constraint)
return result;
}
-static qreal growthFactorBelowPreferredSize(qreal desired, qreal sumAvailable, qreal sumDesired)
-{
- Q_ASSERT(sumDesired != 0.0);
- return desired * qPow(sumAvailable / sumDesired, desired / sumDesired);
-}
-
-static void expectedWidth(qreal minSize1, qreal prefSize1,
- qreal minSize2, qreal prefSize2,
- qreal targetSize, qreal *width1, qreal *width2)
-{
- qreal sumAvail,factor1,factor2;
- // stretch behaviour is different below and above preferred size...
- if (targetSize < prefSize1 + prefSize2) {
- sumAvail = targetSize - minSize1 - minSize2;
- const qreal desired1 = prefSize1 - minSize1;
- const qreal desired2 = prefSize2 - minSize2;
- const qreal sumDesired = desired1 + desired2;
- factor1 = growthFactorBelowPreferredSize(desired1, sumAvail, sumDesired);
- factor2 = growthFactorBelowPreferredSize(desired2, sumAvail, sumDesired);
- const qreal sumFactors = factor1 + factor2;
- *width1 = sumAvail*factor1/sumFactors + minSize1;
- *width2 = sumAvail*factor2/sumFactors + minSize2;
- } else {
- sumAvail = targetSize - prefSize1 - prefSize2;
- factor1 = prefSize1;
- factor2 = prefSize2;
- const qreal sumFactors = factor1 + factor2;
- *width1 = sumAvail*factor1/sumFactors + prefSize1;
- *width2 = sumAvail*factor2/sumFactors + prefSize2;
- }
-}
-
-
bool qFuzzyCompare(const QSizeF &a, const QSizeF &b)
{
return qFuzzyCompare(a.width(), b.width()) && qFuzzyCompare(a.height(), b.height());