Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
7296cd0f
Commit
7296cd0f
authored
Feb 02, 2011
by
Alessandro Portale
Browse files
Removed Avkon from html5 template
parent
a225493f
Changes
2
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/templates/html5app/app.pro
View file @
7296cd0f
...
...
@@ -4,12 +4,11 @@ folder_01.source = html
DEPLOYMENTFOLDERS
=
folder_01
#
DEPLOYMENTFOLDERS_END
#
#
Avoid
auto
screen
rotation
#
ORIENTATIONLOCK
#
DEFINES
+=
ORIENTATIONLOCK
#
TARGETUID3
#
symbian
:
TARGET
.
UID3
=
0
xE1111234
#
Allow
network
access
on
Symbian
#
NETWORKACCESS
#
symbian
:
TARGET
.
CAPABILITY
+=
NetworkServices
#
Smart
Installer
package
'
s
UID
...
...
share/qtcreator/templates/html5app/html5applicationviewer/html5applicationviewer.cpp
View file @
7296cd0f
...
...
@@ -18,13 +18,6 @@
#include
<QtWebKit/QGraphicsWebView>
#include
<QtWebKit/QWebFrame>
#if defined(Q_OS_SYMBIAN) && defined(ORIENTATIONLOCK)
#include
<eikenv.h>
#include
<eikappui.h>
#include
<aknenv.h>
#include
<aknappui.h>
#endif // Q_OS_SYMBIAN && ORIENTATIONLOCK
class
Html5ApplicationViewerPrivate
:
public
QGraphicsView
{
Q_OBJECT
...
...
@@ -124,40 +117,45 @@ void Html5ApplicationViewer::loadUrl(const QUrl &url)
void
Html5ApplicationViewer
::
setOrientation
(
ScreenOrientation
orientation
)
{
#ifdef Q_OS_SYMBIAN
#if defined(Q_OS_SYMBIAN)
// If the version of Qt on the device is < 4.7.2, that attribute won't work
if
(
orientation
!=
ScreenOrientationAuto
)
{
#if defined(ORIENTATIONLOCK)
const
CAknAppUiBase
::
TAppUiOrientation
uiOrientation
=
(
orientation
==
ScreenOrientationLockPortrait
)
?
CAknAppUi
::
EAppUiOrientationPortrait
:
CAknAppUi
::
EAppUiOrientationLandscape
;
CAknAppUi
*
appUi
=
dynamic_cast
<
CAknAppUi
*>
(
CEikonEnv
::
Static
()
->
AppUi
());
TRAPD
(
error
,
if
(
appUi
)
appUi
->
SetOrientationL
(
uiOrientation
);
);
Q_UNUSED
(
error
)
#else // ORIENTATIONLOCK
qWarning
(
"'ORIENTATIONLOCK' needs to be defined on Symbian when locking the orientation."
);
#endif // ORIENTATIONLOCK
const
QStringList
v
=
QString
::
fromAscii
(
qVersion
()).
split
(
QLatin1Char
(
'.'
));
if
(
v
.
count
()
==
3
&&
(
v
.
at
(
0
).
toInt
()
<<
16
|
v
.
at
(
1
).
toInt
()
<<
8
|
v
.
at
(
2
).
toInt
())
<
0x040702
)
{
qWarning
(
"Screen orientation locking only supported with Qt 4.7.2 and above"
);
return
;
}
}
#elif defined(Q_WS_MAEMO_5)
#endif // Q_OS_SYMBIAN
Qt
::
WidgetAttribute
attribute
;
switch
(
orientation
)
{
#if QT_VERSION < 0x040702
// Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes
case
ScreenOrientationLockPortrait
:
attribute
=
Qt
::
WA_Maemo5PortraitOrientation
;
attribute
=
static_cast
<
Qt
::
WidgetAttribute
>
(
128
)
;
break
;
case
ScreenOrientationLockLandscape
:
attribute
=
Qt
::
WA_Maemo5LandscapeOrientation
;
attribute
=
static_cast
<
Qt
::
WidgetAttribute
>
(
129
)
;
break
;
default:
case
ScreenOrientationAuto
:
attribute
=
static_cast
<
Qt
::
WidgetAttribute
>
(
130
);
break
;
#else // QT_VERSION < 0x040702
case
ScreenOrientationLockPortrait
:
attribute
=
Qt
::
WA_LockPortraitOrientation
;
break
;
case
ScreenOrientationLockLandscape
:
attribute
=
Qt
::
WA_LockLandscapeOrientation
;
break
;
default:
attribute
=
Qt
::
WA_Maemo5AutoOrientation
;
case
ScreenOrientationAuto
:
attribute
=
Qt
::
WA_AutoOrientation
;
break
;
}
#endif // QT_VERSION < 0x040702
};
setAttribute
(
attribute
,
true
);
#else // Q_OS_SYMBIAN
Q_UNUSED
(
orientation
);
#endif // Q_OS_SYMBIAN
}
void
Html5ApplicationViewer
::
showExpanded
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment