summaryrefslogtreecommitdiffstats
path: root/examples/xml/streambookmarks
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-04-27 19:16:41 +0200
committerDavid Boddie <david.boddie@nokia.com>2011-05-23 14:24:07 +0200
commit0748751c9f097d9d866605306bbdd4b96e2a5c4e (patch)
tree1838365e6ad6592a26e193289d2136cb89319972 /examples/xml/streambookmarks
parent5feefb0c039dae04290d1fca7c2f24276b6f7582 (diff)
Squashed commit of the changes from the mobile-examples repository
(4.7-generated-declarative branch).
Diffstat (limited to 'examples/xml/streambookmarks')
-rw-r--r--examples/xml/streambookmarks/main.cpp3
-rw-r--r--examples/xml/streambookmarks/mainwindow.cpp18
-rw-r--r--examples/xml/streambookmarks/streambookmarks.pro8
3 files changed, 28 insertions, 1 deletions
diff --git a/examples/xml/streambookmarks/main.cpp b/examples/xml/streambookmarks/main.cpp
index c44e921e82..d909c01b51 100644
--- a/examples/xml/streambookmarks/main.cpp
+++ b/examples/xml/streambookmarks/main.cpp
@@ -47,6 +47,9 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow mainWin;
+#ifdef Q_OS_SYMBIAN
+ mainWin.showFullScreen();
+#endif
mainWin.show();
mainWin.open();
return app.exec();
diff --git a/examples/xml/streambookmarks/mainwindow.cpp b/examples/xml/streambookmarks/mainwindow.cpp
index e9236e93e6..ac839fe9a0 100644
--- a/examples/xml/streambookmarks/mainwindow.cpp
+++ b/examples/xml/streambookmarks/mainwindow.cpp
@@ -68,6 +68,15 @@ MainWindow::MainWindow()
//! [1]
void MainWindow::open()
{
+#if defined(Q_OS_SYMBIAN)
+ // Look for bookmarks on the same drive where the application is installed to,
+ // if drive is not read only. QDesktopServices::DataLocation does this check,
+ // and returns writable drive.
+ QString bookmarksFolder =
+ QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
+ bookmarksFolder.append(":/Data/qt/saxbookmarks");
+ QDir::setCurrent(bookmarksFolder);
+#endif
QString fileName =
QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),
QDir::currentPath(),
@@ -103,6 +112,15 @@ void MainWindow::open()
//! [2]
void MainWindow::saveAs()
{
+#if defined(Q_OS_SYMBIAN)
+ // Look for bookmarks on the same drive where the application is installed to,
+ // if drive is not read only. QDesktopServices::DataLocation does this check,
+ // and returns writable drive.
+ QString bookmarksFolder =
+ QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
+ bookmarksFolder.append(":/Data/qt/saxbookmarks");
+ QDir::setCurrent(bookmarksFolder);
+#endif
QString fileName =
QFileDialog::getSaveFileName(this, tr("Save Bookmark File"),
QDir::currentPath(),
diff --git a/examples/xml/streambookmarks/streambookmarks.pro b/examples/xml/streambookmarks/streambookmarks.pro
index 91abf97ec2..9ccbb619be 100644
--- a/examples/xml/streambookmarks/streambookmarks.pro
+++ b/examples/xml/streambookmarks/streambookmarks.pro
@@ -13,4 +13,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS streambookmarks.pro *.xb
sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml/streambookmarks
INSTALLS += target sources
-symbian: CONFIG += qt_example
+symbian: {
+ CONFIG += qt_example
+ addFiles.sources = frank.xbel jennifer.xbel
+ addFiles.path = /data/qt/streambookmarks
+ DEPLOYMENT += addFiles
+}
+maemo5: CONFIG += qt_example