diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-27 15:57:23 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-27 15:58:43 (GMT) |
commit | f93097671f512f38790ba2d56bd5b1e037810266 (patch) | |
tree | a4dd9aa09a8ca658bb9a46da26472ee0c5f317da /examples/xml/saxbookmarks/mainwindow.cpp | |
parent | 19d0a365dd99dc1a108e58949f7d0f49bac72623 (diff) | |
parent | 583b1529894aca5e9ffa353f0547dfb4b8b0ab21 (diff) | |
download | Qt-f93097671f512f38790ba2d56bd5b1e037810266.zip Qt-f93097671f512f38790ba2d56bd5b1e037810266.tar.gz Qt-f93097671f512f38790ba2d56bd5b1e037810266.tar.bz2 |
Merge commit oslo-staging-2/4.6 into upstream/4.6
Diffstat (limited to 'examples/xml/saxbookmarks/mainwindow.cpp')
-rw-r--r-- | examples/xml/saxbookmarks/mainwindow.cpp | 7 |
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 |