author | zecke <zecke> | 2004-10-16 00:01:01 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-16 00:01:01 (UTC) |
commit | df14f647ff1a60ca82e0fa9bd91458be146153b8 (patch) (unidiff) | |
tree | 4859961352851a4392e1442f2080c15bff8ad7bc /noncore/games/backgammon/filedialog.cpp | |
parent | 419f9710c488f56a7a117eb1529970d3371e0094 (diff) | |
download | opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.zip opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.tar.gz opie-df14f647ff1a60ca82e0fa9bd91458be146153b8.tar.bz2 |
Replace QPEApplication::qpeDir() + "/ with
QPEApplication::qpeDir() + "
as it is guranteed that qpeDir() will have '/' as the last
charachter
Diffstat (limited to 'noncore/games/backgammon/filedialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/backgammon/filedialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/games/backgammon/filedialog.cpp b/noncore/games/backgammon/filedialog.cpp index e0a2914..f185188 100644 --- a/noncore/games/backgammon/filedialog.cpp +++ b/noncore/games/backgammon/filedialog.cpp | |||
@@ -16,46 +16,46 @@ FileDialog::FileDialog(QWidget* parent,QString header,QString extension,const ch | |||
16 | getCurrentDir(); | 16 | getCurrentDir(); |
17 | 17 | ||
18 | file_name="user"; | 18 | file_name="user"; |
19 | fileinput=new QLineEdit(file_name,this); | 19 | fileinput=new QLineEdit(file_name,this); |
20 | fileinput->setGeometry(1,220,235,20); | 20 | fileinput->setGeometry(1,220,235,20); |
21 | 21 | ||
22 | QPEApplication::showDialog( this ); | 22 | QPEApplication::showDialog( this ); |
23 | } | 23 | } |
24 | 24 | ||
25 | FileDialog::~FileDialog() | 25 | FileDialog::~FileDialog() |
26 | {} | 26 | {} |
27 | 27 | ||
28 | 28 | ||
29 | void FileDialog::selectorclicked(QListViewItem* entry) | 29 | void FileDialog::selectorclicked(QListViewItem* entry) |
30 | { | 30 | { |
31 | if(entry==NULL) | 31 | if(entry==NULL) |
32 | return; | 32 | return; |
33 | file_name=entry->text(0); | 33 | file_name=entry->text(0); |
34 | fileinput->setText(file_name); | 34 | fileinput->setText(file_name); |
35 | } | 35 | } |
36 | 36 | ||
37 | void FileDialog::getCurrentDir() | 37 | void FileDialog::getCurrentDir() |
38 | { | 38 | { |
39 | dirselector->clear(); | 39 | dirselector->clear(); |
40 | QDir dir(QPEApplication::qpeDir()+"/backgammon"); | 40 | QDir dir(QPEApplication::qpeDir()+"backgammon"); |
41 | dir.setFilter(QDir::Files); | 41 | dir.setFilter(QDir::Files); |
42 | QFileInfoListIterator it(*(dir.entryInfoList())); | 42 | QFileInfoListIterator it(*(dir.entryInfoList())); |
43 | QFileInfo* fi; | 43 | QFileInfo* fi; |
44 | 44 | ||
45 | int ext_length=ext.length(); | 45 | int ext_length=ext.length(); |
46 | while((fi=it.current())) // go through all file and subdirs | 46 | while((fi=it.current())) // go through all file and subdirs |
47 | { | 47 | { |
48 | QString file=fi->fileName(); | 48 | QString file=fi->fileName(); |
49 | if(file.right(ext_length)==ext && file) | 49 | if(file.right(ext_length)==ext && file) |
50 | { | 50 | { |
51 | file=file.left(file.length()-ext_length); | 51 | file=file.left(file.length()-ext_length); |
52 | new QListViewItem(dirselector,file); | 52 | new QListViewItem(dirselector,file); |
53 | } | 53 | } |
54 | ++it; | 54 | ++it; |
55 | } | 55 | } |
56 | } | 56 | } |
57 | 57 | ||
58 | QString FileDialog::filename() | 58 | QString FileDialog::filename() |
59 | { | 59 | { |
60 | return file_name; | 60 | return file_name; |
61 | } | 61 | } |