diff options
author | David Boddie <david.boddie@nokia.com> | 2011-04-27 17:16:41 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-05-04 16:34:57 (GMT) |
commit | b727e5b95c1f0bd308b228fcf0445b42847ae583 (patch) | |
tree | e120ca1ec5c2e303fb6fca97bc9754403e0f25f2 /examples/webkit | |
parent | 6d1e0faa19be784f79730d65af9c1a162245c7dc (diff) | |
download | Qt-b727e5b95c1f0bd308b228fcf0445b42847ae583.zip Qt-b727e5b95c1f0bd308b228fcf0445b42847ae583.tar.gz Qt-b727e5b95c1f0bd308b228fcf0445b42847ae583.tar.bz2 |
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
(cherry picked from commit 539311f7b2687e3148ea695ce06fee768abe7b44)
Diffstat (limited to 'examples/webkit')
-rw-r--r-- | examples/webkit/domtraversal/domtraversal.pro | 8 | ||||
-rw-r--r-- | examples/webkit/domtraversal/main.cpp | 6 | ||||
-rw-r--r-- | examples/webkit/domtraversal/window.h | 6 | ||||
-rw-r--r-- | examples/webkit/fancybrowser/fancybrowser.pro | 4 | ||||
-rw-r--r-- | examples/webkit/fancybrowser/main.cpp | 6 | ||||
-rw-r--r-- | examples/webkit/formextractor/formextractor.cpp | 5 | ||||
-rw-r--r-- | examples/webkit/formextractor/formextractor.h | 6 | ||||
-rw-r--r-- | examples/webkit/formextractor/formextractor.pro | 5 | ||||
-rw-r--r-- | examples/webkit/framecapture/framecapture.pro | 10 | ||||
-rw-r--r-- | examples/webkit/googlechat/googlechat.pro | 6 | ||||
-rw-r--r-- | examples/webkit/previewer/main.cpp | 6 | ||||
-rw-r--r-- | examples/webkit/previewer/previewer.cpp | 5 | ||||
-rw-r--r-- | examples/webkit/previewer/previewer.h | 6 | ||||
-rw-r--r-- | examples/webkit/previewer/previewer.pro | 5 | ||||
-rw-r--r-- | examples/webkit/simpleselector/main.cpp | 6 | ||||
-rw-r--r-- | examples/webkit/simpleselector/simpleselector.pro | 3 | ||||
-rw-r--r-- | examples/webkit/webkit.pro | 1 |
17 files changed, 82 insertions, 12 deletions
diff --git a/examples/webkit/domtraversal/domtraversal.pro b/examples/webkit/domtraversal/domtraversal.pro index ba5f2d8..2e1b3aa 100644 --- a/examples/webkit/domtraversal/domtraversal.pro +++ b/examples/webkit/domtraversal/domtraversal.pro @@ -1,5 +1,6 @@ QT += webkit network -FORMS = window.ui +FORMS = window.ui \ + window_mobiles.ui HEADERS = window.h SOURCES = main.cpp \ window.cpp @@ -12,5 +13,10 @@ INSTALLS += target sources symbian { TARGET.UID3 = 0xA000D7CB + TARGET.CAPABILITY = NetworkServices + TARGET.EPOCHEAPSIZE = 0x100000 0x2000000 + TARGET.EPOCSTACKSIZE = 0x14000 include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/webkit/domtraversal/main.cpp b/examples/webkit/domtraversal/main.cpp index c705bbc..6d5650c 100644 --- a/examples/webkit/domtraversal/main.cpp +++ b/examples/webkit/domtraversal/main.cpp @@ -45,7 +45,11 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); Window window; - window.show(); + #if defined Q_OS_SYMBIAN || defined Q_WS_HILDON || defined Q_WS_MAEMO_5 || defined Q_WS_SIMULATOR + window.showMaximized(); + #else + window.show(); + #endif window.setUrl(QUrl("http://qt.nokia.com/")); return app.exec(); } diff --git a/examples/webkit/domtraversal/window.h b/examples/webkit/domtraversal/window.h index 6828783..eb3b4ea 100644 --- a/examples/webkit/domtraversal/window.h +++ b/examples/webkit/domtraversal/window.h @@ -50,7 +50,11 @@ class QTreeWidgetItem; QT_END_NAMESPACE //! [Window class definition] -#include "ui_window.h" +#if defined Q_OS_SYMBIAN || defined Q_WS_HILDON || defined Q_WS_MAEMO_5 || defined Q_WS_SIMULATOR + #include "ui_window_mobiles.h" +#else + #include "ui_window.h" +#endif class Window : public QMainWindow, private Ui::Window { diff --git a/examples/webkit/fancybrowser/fancybrowser.pro b/examples/webkit/fancybrowser/fancybrowser.pro index df4dbe3..1ed212e 100644 --- a/examples/webkit/fancybrowser/fancybrowser.pro +++ b/examples/webkit/fancybrowser/fancybrowser.pro @@ -13,6 +13,8 @@ INSTALLS += target sources symbian { TARGET.UID3 = 0xA000CF6C TARGET.EPOCHEAPSIZE = 0×020000 0×4000000 - TARGET.CAPABILITY += Location NetworkServices + TARGET.CAPABILITY += NetworkServices include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/webkit/fancybrowser/main.cpp b/examples/webkit/fancybrowser/main.cpp index bd5c236..b18d190 100644 --- a/examples/webkit/fancybrowser/main.cpp +++ b/examples/webkit/fancybrowser/main.cpp @@ -50,6 +50,10 @@ int main(int argc, char * argv[]) else url = QUrl("http://www.google.com/ncr"); MainWindow *browser = new MainWindow(url); - browser->show(); + #if defined Q_OS_SYMBIAN || defined Q_WS_HILDON || defined Q_WS_MAEMO_5 || defined Q_WS_SIMULATOR + browser->showMaximized(); + #else + browser->show(); + #endif return app.exec(); } diff --git a/examples/webkit/formextractor/formextractor.cpp b/examples/webkit/formextractor/formextractor.cpp index c1417ba..4f2b25b 100644 --- a/examples/webkit/formextractor/formextractor.cpp +++ b/examples/webkit/formextractor/formextractor.cpp @@ -78,6 +78,11 @@ void FormExtractor::submit() ui.updatesEdit->setText("Yes"); else ui.updatesEdit->setText("No"); + + // In mobile devices, change the tab when the data has been submitted + #if defined Q_OS_SYMBIAN || defined Q_WS_HILDON || defined Q_WS_MAEMO_5 || defined Q_WS_SIMULATOR + ui.tabWidget->setCurrentWidget(ui.tabData); + #endif } void FormExtractor::populateJavaScriptWindowObject() diff --git a/examples/webkit/formextractor/formextractor.h b/examples/webkit/formextractor/formextractor.h index 9fd17b1..8958708 100644 --- a/examples/webkit/formextractor/formextractor.h +++ b/examples/webkit/formextractor/formextractor.h @@ -43,7 +43,11 @@ #include <QtGui/QWidget> #include <QWebFrame> -#include "ui_formextractor.h" +#if defined Q_OS_SYMBIAN || defined Q_WS_HILDON || defined Q_WS_MAEMO_5 || defined Q_WS_SIMULATOR + #include "ui_formextractor_mobiles.h" +#else + #include "ui_formextractor.h" +#endif class FormExtractor : public QWidget { diff --git a/examples/webkit/formextractor/formextractor.pro b/examples/webkit/formextractor/formextractor.pro index 51e0c45..a41ed0f 100644 --- a/examples/webkit/formextractor/formextractor.pro +++ b/examples/webkit/formextractor/formextractor.pro @@ -6,7 +6,8 @@ SOURCES += main.cpp \ mainwindow.cpp HEADERS += formextractor.h \ mainwindow.h -FORMS += formextractor.ui +FORMS += formextractor.ui \ + formextractor_mobiles.ui RESOURCES += formextractor.qrc # install @@ -18,4 +19,6 @@ INSTALLS += target sources symbian { TARGET.UID3 = 0xA000CF6D include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.CAPABILITY = NetworkServices } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) diff --git a/examples/webkit/framecapture/framecapture.pro b/examples/webkit/framecapture/framecapture.pro index 11960b9..f235224 100644 --- a/examples/webkit/framecapture/framecapture.pro +++ b/examples/webkit/framecapture/framecapture.pro @@ -9,3 +9,13 @@ target.path = $$[QT_INSTALL_EXAMPLES]/webkit/framecapture sources.files = $$SOURCES $$HEADERS sources.path = $$[QT_INSTALL_EXAMPLES]/webkit/framecapture INSTALLS += target sources + +symbian { + TARGET.CAPABILITY = NetworkServices + 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) +simulator: warning(This example does not work on Simulator platform) diff --git a/examples/webkit/googlechat/googlechat.pro b/examples/webkit/googlechat/googlechat.pro index 3d32c1b..5d998f7 100644 --- a/examples/webkit/googlechat/googlechat.pro +++ b/examples/webkit/googlechat/googlechat.pro @@ -13,4 +13,10 @@ INSTALLS += target sources symbian { TARGET.UID3 = 0xA000CF6E include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.CAPABILITY = NetworkServices } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + +symbian: warning(This example does not work on Symbian platform) +maemo5: warning(This example does not work on Maemo platform) +simulator: warning(This example does not work on Simulator platform) diff --git a/examples/webkit/previewer/main.cpp b/examples/webkit/previewer/main.cpp index 03aa831..89e9f39 100644 --- a/examples/webkit/previewer/main.cpp +++ b/examples/webkit/previewer/main.cpp @@ -46,7 +46,11 @@ int main(int argc, char * argv[]) { QApplication app(argc, argv); MainWindow mainWindow; - mainWindow.show(); + #if defined Q_OS_SYMBIAN || defined Q_WS_HILDON || defined Q_WS_MAEMO_5 || defined Q_WS_SIMULATOR + mainWindow.showMaximized(); + #else + mainWindow.show(); + #endif return app.exec(); } //! [0] diff --git a/examples/webkit/previewer/previewer.cpp b/examples/webkit/previewer/previewer.cpp index 40c5da4..06cba16 100644 --- a/examples/webkit/previewer/previewer.cpp +++ b/examples/webkit/previewer/previewer.cpp @@ -60,5 +60,10 @@ void Previewer::on_previewButton_clicked() // Update the contents in web viewer QString text = plainTextEdit->toPlainText(); webView->setHtml(text, baseUrl); + + // In mobile devices, change the tab + #if defined Q_OS_SYMBIAN || defined Q_WS_HILDON || defined Q_WS_MAEMO_5 || defined Q_WS_SIMULATOR + tabWidget->setCurrentWidget(tabHTMLPreview); + #endif } //! [1] diff --git a/examples/webkit/previewer/previewer.h b/examples/webkit/previewer/previewer.h index f59efbf..771b21f 100644 --- a/examples/webkit/previewer/previewer.h +++ b/examples/webkit/previewer/previewer.h @@ -41,7 +41,11 @@ #ifndef PREVIEWER_H #define PREVIEWER_H -#include "ui_previewer.h" +#if defined Q_OS_SYMBIAN || defined Q_WS_HILDON || defined Q_WS_MAEMO_5 || defined Q_WS_SIMULATOR + #include "ui_previewer_mobiles.h" +#else + #include "ui_previewer.h" +#endif //! [0] class Previewer : public QWidget, public Ui::Form diff --git a/examples/webkit/previewer/previewer.pro b/examples/webkit/previewer/previewer.pro index 525dbb2..371695e 100644 --- a/examples/webkit/previewer/previewer.pro +++ b/examples/webkit/previewer/previewer.pro @@ -4,7 +4,8 @@ HEADERS = previewer.h \ SOURCES = main.cpp \ previewer.cpp \ mainwindow.cpp -FORMS = previewer.ui +FORMS = previewer.ui \ + previewer_mobiles.ui # install target.path = $$[QT_INSTALL_EXAMPLES]/webkit/previewer @@ -15,4 +16,6 @@ INSTALLS += target sources symbian { TARGET.UID3 = 0xA000CF6F include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.CAPABILITY = NetworkServices } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) diff --git a/examples/webkit/simpleselector/main.cpp b/examples/webkit/simpleselector/main.cpp index 959f15d..cdd1123 100644 --- a/examples/webkit/simpleselector/main.cpp +++ b/examples/webkit/simpleselector/main.cpp @@ -47,7 +47,11 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); Window window; window.setUrl(QUrl("http://www.webkit.org")); - window.show(); + #if defined Q_OS_SYMBIAN || defined Q_WS_HILDON || defined Q_WS_MAEMO_5 || defined Q_WS_SIMULATOR + window.showMaximized(); + #else + window.show(); + #endif return app.exec(); } //! [main program] diff --git a/examples/webkit/simpleselector/simpleselector.pro b/examples/webkit/simpleselector/simpleselector.pro index 3ddd6db..f5c1018 100644 --- a/examples/webkit/simpleselector/simpleselector.pro +++ b/examples/webkit/simpleselector/simpleselector.pro @@ -13,4 +13,7 @@ INSTALLS += target sources symbian { TARGET.UID3 = 0xA000D7CC include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) + TARGET.CAPABILITY = NetworkServices } +maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri) + diff --git a/examples/webkit/webkit.pro b/examples/webkit/webkit.pro index 62d3762..de9dbac 100644 --- a/examples/webkit/webkit.pro +++ b/examples/webkit/webkit.pro @@ -15,4 +15,3 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS webkit.pro README sources.path = $$[QT_INSTALL_EXAMPLES]/webkit INSTALLS += target sources -symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) |