diff options
author | David Boddie <david.boddie@nokia.com> | 2011-04-28 17:39:11 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-04-28 17:39:11 (GMT) |
commit | 3abaecc3aec4e46f1c5969c33875fd45aa542385 (patch) | |
tree | 58613c5d2b765018c31d0b189e9c5a34d8adde69 /examples/xml/htmlinfo | |
parent | ddb22795641253a026b72f752ebc769745dd41be (diff) | |
download | Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.zip Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.gz Qt-3abaecc3aec4e46f1c5969c33875fd45aa542385.tar.bz2 |
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/xml/htmlinfo')
-rw-r--r-- | examples/xml/htmlinfo/htmlinfo.desktop | 11 | ||||
-rw-r--r-- | examples/xml/htmlinfo/htmlinfo.pro | 11 | ||||
-rw-r--r-- | examples/xml/htmlinfo/main.cpp | 5 | ||||
-rw-r--r-- | examples/xml/htmlinfo/resources.qrc | 11 |
4 files changed, 33 insertions, 5 deletions
diff --git a/examples/xml/htmlinfo/htmlinfo.desktop b/examples/xml/htmlinfo/htmlinfo.desktop new file mode 100644 index 0000000..901a285 --- /dev/null +++ b/examples/xml/htmlinfo/htmlinfo.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=XML HTML Info +Exec=/opt/usr/bin/htmlinfo +Icon=htmlinfo +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/xml/htmlinfo/htmlinfo.pro b/examples/xml/htmlinfo/htmlinfo.pro index 94b3a07..9b84cfd 100644 --- a/examples/xml/htmlinfo/htmlinfo.pro +++ b/examples/xml/htmlinfo/htmlinfo.pro @@ -1,6 +1,10 @@ SOURCES += main.cpp QT -= gui +RESOURCES = resources.qrc + +win32: CONFIG += console + wince*|symbian:{ htmlfiles.files = *.html htmlfiles.path = . @@ -9,11 +13,12 @@ wince*|symbian:{ # install target.path = $$[QT_INSTALL_EXAMPLES]/xml/htmlinfo -sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.html htmlinfo.pro -sources.path = $$[QT_INSTALL_EXAMPLES]/xml/htmlinfo -INSTALLS += target sources +INSTALLS += target symbian { TARGET.UID3 = 0xA000C609 include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + +symbian: warning(This example does not work on Symbian platform) diff --git a/examples/xml/htmlinfo/main.cpp b/examples/xml/htmlinfo/main.cpp index cb7ac52..4e36b1c 100644 --- a/examples/xml/htmlinfo/main.cpp +++ b/examples/xml/htmlinfo/main.cpp @@ -101,7 +101,8 @@ int main(int argc, char **argv) QStringList filter; filter << "*.htm"; filter << "*.html"; - QStringList htmlFiles = QDir::current().entryList(filter, QDir::Files); + + QStringList htmlFiles = QDir(":/").entryList(filter, QDir::Files); QTextStream out(stdout); @@ -112,7 +113,7 @@ int main(int argc, char **argv) // parse each html file and write the result to file/stream foreach(QString file, htmlFiles) - parseHtmlFile(out, file); + parseHtmlFile(out, ":/" + file); return 0; } diff --git a/examples/xml/htmlinfo/resources.qrc b/examples/xml/htmlinfo/resources.qrc new file mode 100644 index 0000000..a8cf88d --- /dev/null +++ b/examples/xml/htmlinfo/resources.qrc @@ -0,0 +1,11 @@ +<RCC> + <qresource prefix="/"> + <file>apache_org.html</file> + <file>nokia_com.html</file> + <file>simpleexample.html</file> + <file>trolltech_com.html</file> + <file>w3c_org.html</file> + <file>youtube_com.html</file> + </qresource> +</RCC> + |