Doc: update QFileDialog::setSideBarUrls code snippet
The example code uses QDesktopServices::storageLocation which has been replaced by QStandardPaths. This patch fixes this. Change-Id: Ifff25fcb9d85b37ef8247cb4cd9c4c1c8d368780 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This commit is contained in:
parent
63cf5d3d26
commit
8a0be4007d
Binary file not shown.
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 26 KiB |
@ -46,8 +46,8 @@ int main(int argv, char **args)
|
||||
|
||||
//![0]
|
||||
QList<QUrl> urls;
|
||||
urls << QUrl::fromLocalFile("/home/gvatteka/dev/qt-45")
|
||||
<< QUrl::fromLocalFile(QDesktopServices::storageLocation(QDesktopServices::MusicLocation));
|
||||
urls << QUrl::fromLocalFile("/Users/foo/Code/qt5")
|
||||
<< QUrl::fromLocalFile(QStandardPaths::standardLocations(QStandardPaths::MusicLocation).first());
|
||||
|
||||
QFileDialog dialog;
|
||||
dialog.setSidebarUrls(urls);
|
||||
|
Loading…
Reference in New Issue
Block a user