examples/xml/saxbookmarks/mainwindow.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    65 }
    65 }
    66 
    66 
    67 void MainWindow::open()
    67 void MainWindow::open()
    68 {
    68 {
    69 #if defined(Q_OS_SYMBIAN)
    69 #if defined(Q_OS_SYMBIAN)
    70     // Always look for bookmarks on the same drive where the application is installed to.
    70     // Look for bookmarks on the same drive where the application is installed to,
    71     QString bookmarksFolder = QCoreApplication::applicationFilePath().left(1);
    71     // if drive is not read only. QDesktopServices::DataLocation does this check,
       
    72     // and returns writable drive.
       
    73     QString bookmarksFolder =
       
    74             QDesktopServices::storageLocation(QDesktopServices::DataLocation).left(1);
    72     bookmarksFolder.append(":/Data/qt/saxbookmarks");
    75     bookmarksFolder.append(":/Data/qt/saxbookmarks");
    73     QDir::setCurrent(bookmarksFolder);
    76     QDir::setCurrent(bookmarksFolder);
    74 #endif
    77 #endif
    75     QString fileName =
    78     QString fileName =
    76             QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),
    79             QFileDialog::getOpenFileName(this, tr("Open Bookmark File"),