Commit 04278689 authored by Jan Hambrecht's avatar Jan Hambrecht

SVN_SILENT krazy fixes


svn path=/trunk/koffice/; revision=898329
parent e65d7065
......@@ -35,7 +35,7 @@ void KoDeviceRegistry::init()
KoPluginLoader::instance()->load(QString::fromLatin1("KOffice/Device"),
QString::fromLatin1("[X-Flake-MinVersion] <= 0"));
foreach(QString id, keys()) {
foreach(const QString & id, keys()) {
KoDevice * d = value(id);
if (d)
d->start();
......@@ -44,7 +44,7 @@ void KoDeviceRegistry::init()
KoDeviceRegistry::~KoDeviceRegistry()
{
foreach(QString id, keys()) {
foreach(const QString & id, keys()) {
KoDevice * d = value(id);
if (d)
d->stop();
......
......@@ -437,7 +437,7 @@ void KoShape::copySettings(const KoShape *shape)
{
d->size = shape->size();
d->connectors.clear();
foreach(QPointF point, shape->connectionPoints())
foreach(const QPointF & point, shape->connectionPoints())
addConnectionPoint(point);
d->zIndex = shape->zIndex();
d->visible = shape->isVisible();
......@@ -542,7 +542,7 @@ QList<QPointF> KoShape::connectionPoints() const
QList<QPointF> points;
QSizeF s = size();
// convert glue points to shape coordinates
foreach(QPointF cp, d->connectors)
foreach(const QPointF & cp, d->connectors)
points.append(QPointF(s.width() * cp.x(), s.height() * cp.y()));
return points;
......@@ -874,7 +874,7 @@ bool KoShape::loadOdfAttributes(const KoXmlElement & element, KoShapeLoadingCont
if (attributes & OdfAdditionalAttributes) {
QSet<KoShapeLoadingContext::AdditionalAttributeData> additionalAttributeData = KoShapeLoadingContext::additionalAttributeData();
foreach(KoShapeLoadingContext::AdditionalAttributeData attributeData, additionalAttributeData) {
foreach(const KoShapeLoadingContext::AdditionalAttributeData & attributeData, additionalAttributeData) {
if (element.hasAttributeNS(attributeData.ns, attributeData.tag)) {
QString value = element.attributeNS(attributeData.ns, attributeData.tag);
//kDebug(30006) << "load additional attribute" << attributeData.tag << value;
......
......@@ -36,7 +36,7 @@ public:
}
~Private() {
foreach(KoShapeTemplate t, templates)
foreach(const KoShapeTemplate & t, templates)
delete t.properties;
templates.clear();
}
......@@ -51,7 +51,6 @@ public:
quint32 loadingPriority;
QString odfNameSpace;
QStringList odfElementNames;
};
......
......@@ -107,7 +107,7 @@ void KoShapeRegistry::insertFactory(KoShapeFactory * factory)
if (factory->odfNameSpace().isEmpty() || factory->odfElementNames().isEmpty()) {
kDebug(30006) << "Shape factory" << factory->id() << " does not have OdfNamespace defined, ignoring";
} else {
foreach(QString elementName, factory->odfElementNames()) {
foreach(const QString & elementName, factory->odfElementNames()) {
QPair<QString, QString> p(factory->odfNameSpace(), elementName);
......
......@@ -202,7 +202,7 @@ QList<QPointF> KoSnapProxy::pointsInRect(const QRectF &rect)
QList<QPointF> points;
QList<KoShape*> shapes = shapesInRect(rect);
foreach(KoShape * shape, shapes) {
foreach(QPointF point, pointsFromShape(shape)) {
foreach(const QPointF & point, pointsFromShape(shape)) {
if (rect.contains(point))
points.append(point);
}
......@@ -284,7 +284,7 @@ QList<KoPathSegment> KoSnapProxy::segmentsInRect(const QRectF &rect)
if (path) {
shapeSegments = path->segmentsAt(rectOnShape);
} else {
foreach(KoPathSegment s, shape->snapData().snapSegments()) {
foreach(const KoPathSegment & s, shape->snapData().snapSegments()) {
QRectF controlRect = s.controlPointRect();
if (! rect.intersects(controlRect) && ! controlRect.contains(rect))
continue;
......@@ -297,7 +297,7 @@ QList<KoPathSegment> KoSnapProxy::segmentsInRect(const QRectF &rect)
QMatrix m = shape->absoluteTransformation(0);
// transform segments to document coordinates
foreach(KoPathSegment s, shapeSegments) {
foreach(const KoPathSegment & s, shapeSegments) {
if (ignoredPoints.contains(s.first()) || ignoredPoints.contains(s.second()))
continue;
segments.append(s.mapped(m));
......
......@@ -77,7 +77,7 @@ bool OrthogonalSnapStrategy::snap(const QPointF &mousePosition, KoSnapProxy * pr
QList<KoShape*> shapes = proxy->shapes();
foreach(KoShape * shape, shapes) {
QList<QPointF> points = proxy->pointsFromShape(shape);
foreach(QPointF point, points) {
foreach(const QPointF & point, points) {
qreal dx = fabs(point.x() - mousePosition.x());
if (dx < minHorzDist && dx < maxSnapDistance) {
minHorzDist = dx;
......@@ -145,7 +145,7 @@ bool NodeSnapStrategy::snap(const QPointF &mousePosition, KoSnapProxy * proxy, q
QPointF snappedPoint = mousePosition;
foreach(QPointF point, points) {
foreach(const QPointF & point, points) {
qreal distance = fastDistance(mousePosition, point);
if (distance < maxDistance && distance < minDistance) {
snappedPoint = point;
......
......@@ -181,7 +181,7 @@ void KoToolManager::setup()
KoShapeRegistry::instance();
KoToolRegistry *registry = KoToolRegistry::instance();
foreach(QString id, registry->keys()) {
foreach(const QString & id, registry->keys()) {
ToolHelper *t = new ToolHelper(registry->value(id));
d->tools.append(t);
}
......@@ -244,7 +244,7 @@ void KoToolManager::registerTools(KActionCollection *ac, KoCanvasController *con
CanvasData *cd = d->canvasses.value(controller).first();
foreach(KoTool *tool, cd->allTools) {
QHash<QString, KAction*> actions = tool->actions();
foreach(QString name, actions.keys())
foreach(const QString & name, actions.keys())
ac->addAction(name, actions[name]);
}
}
......
......@@ -69,7 +69,7 @@ void KoPathPointMoveCommand::applyOffset( const QPointF &offset )
// repaint old bounding rect
path->update();
foreach(const KoPathPointIndex index, it.value()) {
foreach(const KoPathPointIndex & index, it.value()) {
KoPathPoint * p = path->pointByIndex(index);
if ( p )
p->map(matrix, true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment