summaryrefslogtreecommitdiffstats
path: root/examples/xml/saxbookmarks/mainwindow.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-11-29 22:58:27 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-11-29 22:58:27 (GMT)
commit1fe08312164a8eef87b3efe9b77452b86224999f (patch)
tree65d3147ae69860d9031ffaa86dcdd28f5d5fca21 /examples/xml/saxbookmarks/mainwindow.cpp
parent10b5653ad4f25c6f37d640facf4a5ef01fe25926 (diff)
parentc2c31f30830a4e1e455a13321dd7bae6ac8b360f (diff)
downloadQt-1fe08312164a8eef87b3efe9b77452b86224999f.zip
Qt-1fe08312164a8eef87b3efe9b77452b86224999f.tar.gz
Qt-1fe08312164a8eef87b3efe9b77452b86224999f.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'examples/xml/saxbookmarks/mainwindow.cpp')
-rw-r--r--examples/xml/saxbookmarks/mainwindow.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/xml/saxbookmarks/mainwindow.cpp b/examples/xml/saxbookmarks/mainwindow.cpp
index 49cb468..ff3cf11 100644
--- a/examples/xml/saxbookmarks/mainwindow.cpp
+++ b/examples/xml/saxbookmarks/mainwindow.cpp
@@ -67,8 +67,11 @@ MainWindow::MainWindow()
void MainWindow::open()
{
#if defined(Q_OS_SYMBIAN)
- // Always look for bookmarks on the same drive where the application is installed to.
- QString bookmarksFolder = QCoreApplication::applicationFilePath().left(1);
+ // 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