Commit af9428a6 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Only add #ifdef for symbian on mobile builds

Reviewed-by: Friedemann Kleint
parent 7ed80f16
...@@ -5,10 +5,6 @@ int main(int argc, char *argv[]) ...@@ -5,10 +5,6 @@ int main(int argc, char *argv[])
{ {
QApplication a(argc, argv); QApplication a(argc, argv);
%CLASS% w; %CLASS% w;
#if defined(Q_WS_S60) %SHOWMETHOD%
w.showMaximized();
#else
w.show();
#endif
return a.exec(); return a.exec();
} }
...@@ -46,6 +46,13 @@ ...@@ -46,6 +46,13 @@
#include <QtGui/QIcon> #include <QtGui/QIcon>
static const char *mainSourceFileC = "main"; static const char *mainSourceFileC = "main";
static const char *mainSourceShowC = "w.show();\n";
static const char *mainSourceMobilityShowC = "#if defined(Q_WS_S60)\n"
" w.showMaximized();\n"
"#else\n"
" w.show();\n"
"#endif\n";
static const char *mainWindowUiContentsC = static const char *mainWindowUiContentsC =
"\n <widget class=\"QMenuBar\" name=\"menuBar\" />" "\n <widget class=\"QMenuBar\" name=\"menuBar\" />"
"\n <widget class=\"QToolBar\" name=\"mainToolBar\" />" "\n <widget class=\"QToolBar\" name=\"mainToolBar\" />"
...@@ -242,6 +249,11 @@ bool GuiAppWizard::parametrizeTemplate(const QString &templatePath, const QStrin ...@@ -242,6 +249,11 @@ bool GuiAppWizard::parametrizeTemplate(const QString &templatePath, const QStrin
contents.replace(QLatin1String("%BASECLASS%"), params.baseClassName); contents.replace(QLatin1String("%BASECLASS%"), params.baseClassName);
contents.replace(QLatin1String("%WIDGET_HEIGHT%"), QString::number(params.widgetHeight)); contents.replace(QLatin1String("%WIDGET_HEIGHT%"), QString::number(params.widgetHeight));
contents.replace(QLatin1String("%WIDGET_WIDTH%"), QString::number(params.widgetWidth)); contents.replace(QLatin1String("%WIDGET_WIDTH%"), QString::number(params.widgetWidth));
if (params.isMobileApplication)
contents.replace(QLatin1String("%SHOWMETHOD%"), QString::fromLatin1(mainSourceMobilityShowC));
else
contents.replace(QLatin1String("%SHOWMETHOD%"), QString::fromLatin1(mainSourceShowC));
const QChar dot = QLatin1Char('.'); const QChar dot = QLatin1Char('.');
......
Supports Markdown
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