diff options
Diffstat (limited to 'examples/xml/streambookmarks')
-rw-r--r-- | examples/xml/streambookmarks/main.cpp | 3 | ||||
-rw-r--r-- | examples/xml/streambookmarks/mainwindow.cpp | 18 | ||||
-rw-r--r-- | examples/xml/streambookmarks/streambookmarks.pro | 8 |
3 files changed, 28 insertions, 1 deletions
diff --git a/examples/xml/streambookmarks/main.cpp b/examples/xml/streambookmarks/main.cpp index c44e921e82..d909c01b51 100644 --- a/examples/xml/streambookmarks/main.cpp +++ b/examples/xml/streambookmarks/main.cpp @@ -47,6 +47,9 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); MainWindow mainWin; +#ifdef Q_OS_SYMBIAN + mainWin.showFullScreen(); +#endif mainWin.show(); mainWin.open(); return app.exec(); diff --git a/examples/xml/streambookmarks/mainwindow.cpp b/examples/xml/streambookmarks/mainwindow.cpp index e9236e93e6..ac839fe9a0 100644 --- a/examples/xml/streambookmarks/mainwindow.cpp +++ b/examples/xml/streambookmarks/mainwindow.cpp @@ -68,6 +68,15 @@ MainWindow::MainWindow() //! [1] 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(), @@ -103,6 +112,15 @@ void MainWindow::open() //! [2] 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(), diff --git a/examples/xml/streambookmarks/streambookmarks.pro b/examples/xml/streambookmarks/streambookmarks.pro index 91abf97ec2..9ccbb619be 100644 --- a/examples/xml/streambookmarks/streambookmarks.pro +++ b/examples/xml/streambookmarks/streambookmarks.pro @@ -13,4 +13,10 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS streambookmarks.pro *.xb sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/xml/streambookmarks INSTALLS += target sources -symbian: CONFIG += qt_example +symbian: { + CONFIG += qt_example + addFiles.sources = frank.xbel jennifer.xbel + addFiles.path = /data/qt/streambookmarks + DEPLOYMENT += addFiles +} +maemo5: CONFIG += qt_example |