add compilation condition to allow compilation on desktop
authorlepelley <lepelley@lepelley.(none)>
Fri, 20 Aug 2010 10:49:54 +0000 (12:49 +0200)
committerlepelley <lepelley@lepelley.(none)>
Fri, 20 Aug 2010 10:49:54 +0000 (12:49 +0200)
main.cpp
playermainwindow.cpp

index 59754e4..caf2cb0 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -49,7 +49,8 @@ int main(int argc, char *argv[])
   //mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
 
   mainwindow->showMaximized();
-  mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
-
+ #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+mainwindow->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+#endif
     return a.exec();
 }
index c2186e9..5f91727 100644 (file)
 
   void PlayerMainWindow::setPortrait()
   {
-      this->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
+     #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+     this->setAttribute(Qt::WA_Maemo5PortraitOrientation, true);
+    #endif
+    
+      
   }
 
   void PlayerMainWindow::setLandscape()
   {
+      #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
       this->setAttribute(Qt::WA_Maemo5LandscapeOrientation, true);
+      #endif
   }
 
   void PlayerMainWindow::setAutoRotate()
   {
-      this->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+    #if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+   this->setAttribute(Qt::WA_Maemo5AutoOrientation, true);
+   #endif
   }
 
   void PlayerMainWindow::orientationChanged() {