X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=repoview.h;h=c5efcfc6d06fbe201f5aae1ec112736489ec2308;hb=HEAD;hp=c8d8dd060e74cba03e44fdd4869952289e072146;hpb=23b54f1b9c89080d87c3a51d28dcaabc86b6ab2b;p=fapman diff --git a/repoview.h b/repoview.h index c8d8dd0..c5efcfc 100644 --- a/repoview.h +++ b/repoview.h @@ -41,24 +41,20 @@ public: void openWin(); void closeEvent(QCloseEvent *event); -#ifdef Q_WS_MAEMO_5 // workaround for buggy Qt autorotation void show() { - if( !isVisible() ) { - QRect r = dynamic_cast(this->parent())->rect(); - if(r.width() < r.height()) - this->setAttribute(Qt::WA_Maemo5PortraitOrientation); - else { - if( dynamic_cast(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); + if( !isVisible() ) { +#ifdef Q_WS_MAEMO_5 + if( dynamic_cast(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 } QMainWindow::show(); } -#endif protected: @@ -75,6 +71,7 @@ private: AAptInterface* iAptInterface; private slots: + void on_actionRe_import_HAM_repo_settings_triggered(); void on_listWidget_itemClicked(QListWidgetItem* item); void on_btnNew_clicked(); };