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.desktop | 11 | ||||
-rw-r--r-- | examples/xml/streambookmarks/streambookmarks.pro | 8 |
4 files changed, 39 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 ed765995e7..780b2b82d1 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.desktop b/examples/xml/streambookmarks/streambookmarks.desktop new file mode 100644 index 0000000000..29961a90eb --- /dev/null +++ b/examples/xml/streambookmarks/streambookmarks.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Terminal=false +Name=QXmlStream Bookmarks +Exec=/opt/usr/bin/streambookmarks +Icon=streambookmarks +X-Window-Icon= +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable diff --git a/examples/xml/streambookmarks/streambookmarks.pro b/examples/xml/streambookmarks/streambookmarks.pro index 7811775597..de9b1ab5a1 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 |