From 0748751c9f097d9d866605306bbdd4b96e2a5c4e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 27 Apr 2011 19:16:41 +0200 Subject: Squashed commit of the changes from the mobile-examples repository (4.7-generated-declarative branch). --- examples/xml/dombookmarks/mainwindow.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'examples/xml/dombookmarks/mainwindow.cpp') 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(), -- cgit v1.2.3