diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-06-01 09:55:12 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-06-02 07:46:14 +0000 |
commit | e5d85ff44ee6a3125d928597583de7a7ebe8a644 (patch) | |
tree | 807a2613892ea14741fb2810ba0e7be466b3650c /examples/widgets | |
parent | 11512d6a2cd6d816a13db7ee0c48627d6534b377 (diff) | |
download | qtbase-e5d85ff44ee6a3125d928597583de7a7ebe8a644.tar.gz |
imageviewer example: support loading images on iOS
Use the last path from QSP to hint that we want to
load photos from the global photo library. This
should currently only make a difference on iOS.
Change-Id: I7a6217dbbbc2e247b69bf406c02001458c757211
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'examples/widgets')
-rw-r--r-- | examples/widgets/widgets/imageviewer/imageviewer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/widgets/widgets/imageviewer/imageviewer.cpp b/examples/widgets/widgets/imageviewer/imageviewer.cpp index c32f21e7f3..0b8513f090 100644 --- a/examples/widgets/widgets/imageviewer/imageviewer.cpp +++ b/examples/widgets/widgets/imageviewer/imageviewer.cpp @@ -107,7 +107,7 @@ void ImageViewer::open() mimeTypeFilters.sort(); const QStringList picturesLocations = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation); QFileDialog dialog(this, tr("Open File"), - picturesLocations.isEmpty() ? QDir::currentPath() : picturesLocations.first()); + picturesLocations.isEmpty() ? QDir::currentPath() : picturesLocations.last()); dialog.setAcceptMode(QFileDialog::AcceptOpen); dialog.setMimeTypeFilters(mimeTypeFilters); dialog.selectMimeTypeFilter("image/jpeg"); |