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
Tobias Hunger
qt-creator
Commits
204de404
Commit
204de404
authored
Apr 18, 2011
by
Friedemann Kleint
Browse files
HTML5 wizard: Compile on Linux/warnings.
parent
83638838
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/wizards/html5app.cpp
View file @
204de404
...
...
@@ -192,7 +192,7 @@ QByteArray Html5App::appViewerCppFileCode(QString *errorMessage) const
static
const
QString
touchNavigavigationDir
=
originsRoot
()
+
appViewerOriginsSubDir
+
QLatin1String
(
"touchnavigation/"
);
QByteArray
touchNavigavigationCode
;
for
(
in
t
i
=
0
;
i
<
sizeof
(
touchNavigavigationFiles
)
/
sizeof
(
touchNavigavigationFiles
[
0
]);
++
i
)
{
for
(
size_
t
i
=
0
;
i
<
sizeof
(
touchNavigavigationFiles
)
/
sizeof
(
touchNavigavigationFiles
[
0
]);
++
i
)
{
QFile
touchNavigavigationFile
(
touchNavigavigationDir
+
QLatin1String
(
touchNavigavigationFiles
[
i
]));
if
(
!
touchNavigavigationFile
.
open
(
QIODevice
::
ReadOnly
))
{
if
(
errorMessage
)
...
...
@@ -204,12 +204,13 @@ QByteArray Html5App::appViewerCppFileCode(QString *errorMessage) const
QString
line
;
while
(
!
(
line
=
touchNavigavigationFileIn
.
readLine
()).
isNull
())
{
if
(
line
.
startsWith
(
QLatin1String
(
"#include"
))
||
(
line
.
startsWith
(
QLatin1String
(
"#ifndef"
))
||
line
.
startsWith
(
QLatin1String
(
"#define"
))
||
line
.
startsWith
(
QLatin1String
(
"#endif"
)))
&&
line
.
endsWith
(
QLatin1String
(
"_H"
)))
(
(
line
.
startsWith
(
QLatin1String
(
"#ifndef"
))
||
line
.
startsWith
(
QLatin1String
(
"#define"
))
||
line
.
startsWith
(
QLatin1String
(
"#endif"
)))
&&
line
.
endsWith
(
QLatin1String
(
"_H"
)))
)
continue
;
touchNavigavigationCode
.
append
(
line
+
QLatin1Char
(
'\n'
));
touchNavigavigationCode
.
append
(
line
.
toLatin1
());
touchNavigavigationCode
.
append
(
'\n'
);
}
}
...
...
@@ -226,17 +227,21 @@ QByteArray Html5App::appViewerCppFileCode(QString *errorMessage) const
QString
line
;
while
(
!
(
line
=
in
.
readLine
()).
isNull
())
{
if
(
!
touchNavigavigationCodeInserted
&&
line
==
QLatin1String
(
"#ifdef TOUCH_OPTIMIZED_NAVIGATION"
))
{
appViewerCppCode
.
append
(
line
+
QLatin1Char
(
'\n'
));
appViewerCppCode
.
append
(
line
.
toLatin1
());
appViewerCppCode
.
append
(
'\n'
);
while
(
!
(
line
=
in
.
readLine
()).
isNull
()
&&
!
line
.
contains
(
QLatin1String
(
"#endif // TOUCH_OPTIMIZED_NAVIGATION"
)))
{
if
(
!
line
.
startsWith
(
QLatin1String
(
"#include
\"
"
)))
appViewerCppCode
.
append
(
line
+
QLatin1Char
(
'\n'
));
if
(
!
line
.
startsWith
(
QLatin1String
(
"#include
\"
"
)))
{
appViewerCppCode
.
append
(
line
.
toLatin1
());
appViewerCppCode
.
append
(
'\n'
);
}
}
appViewerCppCode
.
append
(
touchNavigavigationCode
);
touchNavigavigationCodeInserted
=
true
;
}
appViewerCppCode
.
append
(
line
+
QLatin1Char
(
'\n'
));
appViewerCppCode
.
append
(
line
.
toLatin1
());
appViewerCppCode
.
append
(
'\n'
);
}
return
appViewerCppCode
;
}
...
...
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