summaryrefslogtreecommitdiffstats
path: root/examples/xml/dombookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'examples/xml/dombookmarks')
-rw-r--r--examples/xml/dombookmarks/dombookmarks.pro15
-rw-r--r--examples/xml/dombookmarks/main.cpp5
-rw-r--r--examples/xml/dombookmarks/mainwindow.cpp18
3 files changed, 35 insertions, 3 deletions
diff --git a/examples/xml/dombookmarks/dombookmarks.pro b/examples/xml/dombookmarks/dombookmarks.pro
index aa815457f5..3d38ca3f47 100644
--- a/examples/xml/dombookmarks/dombookmarks.pro
+++ b/examples/xml/dombookmarks/dombookmarks.pro
@@ -13,8 +13,17 @@ INSTALLS += target sources
symbian: CONFIG += qt_example
+symbian: {
+ include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+ addFiles.sources = frank.xbel jennifer.xbel
+ addFiles.path = files
+ DEPLOYMENT += addFiles
+}
+
wince*: {
- addFiles.files = frank.xbel jennifer.xbel
- addFiles.path = "\\My Documents"
- DEPLOYMENT += addFiles
+ addFiles.files = frank.xbel jennifer.xbel
+ addFiles.path = "\\My Documents"
+ DEPLOYMENT += addFiles
}
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/xml/dombookmarks/main.cpp b/examples/xml/dombookmarks/main.cpp
index 71ce6aec0b..6a3bb8c1a9 100644
--- a/examples/xml/dombookmarks/main.cpp
+++ b/examples/xml/dombookmarks/main.cpp
@@ -46,7 +46,12 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MainWindow mainWin;
+#if defined(Q_OS_SYMBIAN)
+ mainWin.showMaximized();
+#else
mainWin.show();
+#endif
+
mainWin.open();
return app.exec();
}
diff --git a/examples/xml/dombookmarks/mainwindow.cpp b/examples/xml/dombookmarks/mainwindow.cpp
index b3bfe64e17..0a3a3f9c3b 100644
--- a/examples/xml/dombookmarks/mainwindow.cpp
+++ b/examples/xml/dombookmarks/mainwindow.cpp
@@ -59,6 +59,15 @@ MainWindow::MainWindow()
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(),
@@ -81,6 +90,15 @@ void MainWindow::open()
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(),