mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
gwenview: simplify kipi orientation handling
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
0fa5f95d9f
commit
9eb73d7f60
1 changed files with 3 additions and 24 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue