PKGBUILDs/extra/digikam/qreal-float.patch
2012-05-04 10:21:31 -04:00

78 lines
4.2 KiB
Diff

Index: digikam-2.5.0/extra/kipi-plugins/photolayoutseditor/widgets/canvas/CropWidgetItem.cpp
===================================================================
--- digikam-2.5.0.orig/extra/kipi-plugins/photolayoutseditor/widgets/canvas/CropWidgetItem.cpp 2012-01-03 00:31:44.000000000 +0000
+++ digikam-2.5.0/extra/kipi-plugins/photolayoutseditor/widgets/canvas/CropWidgetItem.cpp 2012-03-15 16:02:31.000000000 +0000
@@ -340,8 +340,8 @@
QPointF dif = event->scenePos() - event->lastScenePos();
temp.translate(dif);
- temp.translate( qMin(maxRect.right()-temp.right(),0.0), qMin(maxRect.bottom()-temp.bottom(),0.0) );
- temp.translate( qMax(maxRect.left()-temp.left(),0.0), qMax(maxRect.top()-temp.top(),0.0) );
+ temp.translate( qMin(maxRect.right()-temp.right(),qreal(0.0)), qMin(maxRect.bottom()-temp.bottom(),qreal(0.0)) );
+ temp.translate( qMax(maxRect.left()-temp.left(),qreal(0.0)), qMax(maxRect.top()-temp.top(),qreal(0.0)) );
}
// Size change
else
Index: digikam-2.5.0/core/libs/widgets/graphicsview/regionframeitem.cpp
===================================================================
--- digikam-2.5.0.orig/core/libs/widgets/graphicsview/regionframeitem.cpp 2012-01-03 00:32:18.000000000 +0000
+++ digikam-2.5.0/core/libs/widgets/graphicsview/regionframeitem.cpp 2012-03-15 16:02:31.000000000 +0000
@@ -639,8 +639,8 @@
{
const QSizeF maxSize = parentDImgItem()->boundingRect().size();
const QPointF point = mapToParent(event->pos());
- qreal posX = qBound(0., point.x(), maxSize.width());
- qreal posY = qBound(0., point.y(), maxSize.height());
+ qreal posX = qBound(qreal(0.0), point.x(), maxSize.width());
+ qreal posY = qBound(qreal(0.0), point.y(), maxSize.height());
QRectF r = rect();
// Adjust edge
Index: digikam-2.5.0/core/libs/database/searchxml.cpp
===================================================================
--- digikam-2.5.0.orig/core/libs/database/searchxml.cpp 2012-01-03 00:32:25.000000000 +0000
+++ digikam-2.5.0/core/libs/database/searchxml.cpp 2012-03-15 16:02:31.000000000 +0000
@@ -645,7 +645,7 @@
}
}
-void SearchXmlWriter::writeValue(const QList<double>& valueList, int precision)
+void SearchXmlWriter::writeValue(const QList<qreal>& valueList, int precision)
{
QString listitem("listitem");
foreach(double i, valueList)
Index: digikam-2.5.0/core/libs/database/searchxml.h
===================================================================
--- digikam-2.5.0.orig/core/libs/database/searchxml.h 2012-01-03 00:32:26.000000000 +0000
+++ digikam-2.5.0/core/libs/database/searchxml.h 2012-03-15 16:02:31.000000000 +0000
@@ -231,7 +231,7 @@
void writeValue(const QDateTime& dateTime);
void writeValue(const QList<int>& valueList);
void writeValue(const QList<qlonglong>& valueList);
- void writeValue(const QList<double>& valueList, int precision = 8);
+ void writeValue(const QList<qreal>& valueList, int precision = 8);
void writeValue(const QStringList& valueList);
void writeValue(const QList<QDateTime>& valueList);
Index: digikam-2.5.0/core/utilities/searchwindow/searchfields.cpp
===================================================================
--- digikam-2.5.0.orig/core/utilities/searchwindow/searchfields.cpp 2012-01-03 00:32:02.000000000 +0000
+++ digikam-2.5.0/core/utilities/searchwindow/searchfields.cpp 2012-03-15 19:49:39.000000000 +0000
@@ -1209,7 +1209,7 @@
if (m_reciprocal)
{
- writer.writeValue(QList<double>() << m_secondBox->fractionMagicValue() << m_firstBox->fractionMagicValue());
+ writer.writeValue(QList<qreal>() << m_secondBox->fractionMagicValue() << m_firstBox->fractionMagicValue());
}
else
{
@@ -1505,7 +1505,7 @@
if (m_firstBox->value() != m_secondBox->value())
{
writer.writeField(m_name, SearchXml::Interval);
- writer.writeValue(QList<double>()
+ writer.writeValue(QList<qreal>()
<< (m_firstBox->value() * m_factor) << (m_secondBox->value() * m_factor));
writer.finishField();
}