0.7.1
[fapman] / repoview.h
index 0b699f6..c5efcfc 100644 (file)
@@ -42,20 +42,14 @@ public:
        void closeEvent(QCloseEvent *event);
 
        void show() {
-               if( !isVisible() ) {
-                       /*
-                       QRect r = dynamic_cast<QMainWindow*>(this->parent())->rect();
-                       if(r.width() < r.height())
-                               this->setAttribute(Qt::WA_Maemo5PortraitOrientation);
-                       else {
-                               if( dynamic_cast<QMainWindow*>(this->parent())->testAttribute( Qt::WA_Maemo5AutoOrientation ) )
-                                       this->setAttribute( Qt::WA_Maemo5AutoOrientation );
-                               else
-                                       this->setAttribute( Qt::WA_Maemo5LandscapeOrientation );
-                       }
-                       */
+        if( !isVisible() ) {
 #ifdef Q_WS_MAEMO_5
-                       this->setAttribute(Qt::WA_Maemo5StackedWindow);
+            if( dynamic_cast<QMainWindow*>(this->parent())->testAttribute( Qt::WA_Maemo5AutoOrientation ) ) {
+                this->setAttribute( Qt::WA_Maemo5AutoOrientation );
+            } else {
+                this->setAttribute( Qt::WA_Maemo5LandscapeOrientation );
+            }
+            this->setAttribute(Qt::WA_Maemo5StackedWindow);
                        this->setWindowFlags( Qt::Window );
 #endif
                }