Commit 2a7336b4 authored by Alessandro Portale's avatar Alessandro Portale
Browse files

Move hide implementation of conditional show()

...and do not call it show(), because that is the signature of
a non-virtual base class function. showExpanded() sucks as name,
and hjk, who reviewed this is not convinced.
But showExpanded() is still better than show().

Task-Number: QTCREATORBUG-2979
Reviewed-By: hjk
parent 7d622f11
......@@ -8,13 +8,7 @@ int main(int argc, char *argv[])
MainWindow mainWindow;
mainWindow.setOrientation(MainWindow::ScreenOrientationAuto); // ORIENTATION
mainWindow.showExpanded();
#ifdef Q_OS_SYMBIAN
mainWindow.showFullScreen();
#elif defined(Q_WS_MAEMO_5)
mainWindow.showMaximized();
#else
mainWindow.show();
#endif
return app.exec();
}
......@@ -65,3 +65,14 @@ void MainWindow::setOrientation(ScreenOrientation orientation)
Q_UNUSED(orientation);
#endif // Q_OS_SYMBIAN
}
void MainWindow::showExpanded()
{
#ifdef Q_OS_SYMBIAN
showFullScreen();
#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
showMaximized();
#else
show();
#endif
}
......@@ -29,6 +29,7 @@ public:
virtual ~MainWindow();
void setOrientation(ScreenOrientation orientation);
void showExpanded();
private:
Ui::MainWindow *ui;
......
......@@ -123,13 +123,13 @@ void QmlApplicationViewer::setOrientation(ScreenOrientation orientation)
#endif // Q_OS_SYMBIAN
}
void QmlApplicationViewer::show()
void QmlApplicationViewer::showExpanded()
{
#ifdef Q_OS_SYMBIAN
showFullScreen();
#elif defined(Q_WS_MAEMO_5) || defined(Q_WS_MAEMO_6)
showMaximized();
#else
QDeclarativeView::show();
show();
#endif
}
......@@ -29,7 +29,7 @@ public:
void setMainQmlFile(const QString &file);
void addImportPath(const QString &path);
void setOrientation(ScreenOrientation orientation);
void show();
void showExpanded();
private:
class QmlApplicationViewerPrivate *m_d;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment