From 9eb73d7f6069a84f9613c1afc583053cf773c703 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 27 Dec 2015 07:25:08 +0200 Subject: [PATCH] gwenview: simplify kipi orientation handling Signed-off-by: Ivailo Monev --- gwenview/app/kipiinterface.cpp | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/gwenview/app/kipiinterface.cpp b/gwenview/app/kipiinterface.cpp index 88add50c..60dd51af 100644 --- a/gwenview/app/kipiinterface.cpp +++ b/gwenview/app/kipiinterface.cpp @@ -154,35 +154,14 @@ private: const KFileMetaInfoItem& mii = metaInfo.item("http://freedesktop.org/standards/xesam/1.0/core#orientation"); bool ok = false; - const Orientation orientation = (Orientation)mii.value().toInt(&ok); + const int orientation = mii.value().toInt(&ok); if (!ok) { return 0; - } - - switch (orientation) { - case NOT_AVAILABLE: - case NORMAL: - return 0; - - case ROT_90: - return 90; - - case ROT_180: - return 180; - - case ROT_270: - return 270; - - case HFLIP: - case VFLIP: - case TRANSPOSE: - case TRANSVERSE: + } else if(orientation != 0 || orientation != 90 + || orientation != 180 || orientation != 270) { kWarning() << "Can't represent an orientation value of" << orientation << "as an angle (" << _url << ')'; return 0; } - - kWarning() << "Don't know how to handle an orientation value of" << orientation << '(' << _url << ')'; - return 0; } QVariantMap mAttributes; -- 2.11.0