summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2012-01-05 19:26:16 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-01-05 19:26:16 -0200
commita8d255e9784b47d1e1f6f797decdbc0f5306d815 (patch)
treecce9cd6936af8985bde6b2bf6014a198ecd2f8fb
parent2e20211cb711ad1767d17d074da24c7857d9450d (diff)
downloadpyside-a8d255e9784b47d1e1f6f797decdbc0f5306d815.tar.gz
pyside-a8d255e9784b47d1e1f6f797decdbc0f5306d815.tar.xz
pyside-a8d255e9784b47d1e1f6f797decdbc0f5306d815.zip
Fix bug 1065 - "Invalid example in QFileDialog documentation"
-rw-r--r--doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp b/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
index 51c03c5..6c6bf14 100644
--- a/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
+++ b/doc/codesnippets/doc/src/snippets/code/src_gui_dialogs_qfiledialog.cpp
@@ -1,6 +1,6 @@
//! [0]
-fileName = QFileDialog.getOpenFileName(self,
- tr("Open Image"), "/home/jana", tr("Image Files (*.png *.jpg *.bmp)"))
+fileName, filter = QFileDialog.getOpenFileName(self,
+ "Open Image", "/home/jana", "Image Files (*.png *.jpg *.bmp)")
//! [0]
@@ -16,7 +16,7 @@ dialog.setFileMode(QFileDialog.AnyFile)
//! [3]
-dialog.setNameFilter(tr("Images (*.png *.xpm *.jpg)"))
+dialog.setNameFilter("Images (*.png *.xpm *.jpg)")
//! [3]
@@ -50,14 +50,14 @@ dialog.exec_()
//! [8]
-fileName = QFileDialog.getOpenFileName(self, tr("Open File"),
+fileName, filter = QFileDialog.getOpenFileName(self, "Open File",
"/home",
- tr("Images (*.png *.xpm *.jpg)"))
+ "Images (*.png *.xpm *.jpg)")
//! [8]
//! [9]
-files = QFileDialog.getOpenFileNames(self,
+files, filter = QFileDialog.getOpenFileNames(self,
"Select one or more files to open",
"/home",
"Images (*.png *.xpm *.jpg)")
@@ -72,14 +72,14 @@ for it in list:
//! [11]
-fileName = QFileDialog.getSaveFileName(self, tr("Save F:xile"),
+fileName, filter = QFileDialog.getSaveFileName(self, "Save F:xile",
"/home/jana/untitled.png",
- tr("Images (*.png *.xpm *.jpg)"))
+ "Images (*.png *.xpm *.jpg)")
//! [11]
//! [12]
-dir = QFileDialog.getExistingDirectory(self, tr("Open Directory"),
+dir = QFileDialog.getExistingDirectory(self, "Open Directory",
"/home",
QFileDialog.ShowDirsOnly
| QFileDialog.DontResolveSymlinks)