-rw-r--r-- | noncore/tools/opie-sh/fviewer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/tools/opie-sh/fviewer.cpp b/noncore/tools/opie-sh/fviewer.cpp index 1a0acc6..5dc09ff 100644 --- a/noncore/tools/opie-sh/fviewer.cpp +++ b/noncore/tools/opie-sh/fviewer.cpp | |||
@@ -27,30 +27,31 @@ FViewer::FViewer(QString filename, QString title, QWidget *parent=0, const char* | |||
27 | if(title.isNull()) | 27 | if(title.isNull()) |
28 | { | 28 | { |
29 | setCaption(filename); | 29 | setCaption(filename); |
30 | } | 30 | } |
31 | else | 31 | else |
32 | { | 32 | { |
33 | setCaption(title); | 33 | setCaption(title); |
34 | } | 34 | } |
35 | 35 | ||
36 | file = new QFile(); | 36 | file = new QFile(); |
37 | 37 | ||
38 | if(!filename.isNull()) | 38 | if(!filename.isNull()) |
39 | { | 39 | { |
40 | file->setName(filename); | 40 | file->setName(filename); |
41 | file->open(IO_ReadOnly); | 41 | file->open(IO_ReadOnly); |
42 | } | 42 | } |
43 | else | 43 | else |
44 | { | 44 | { |
45 | file->open(IO_ReadOnly, 0); | 45 | file->open(IO_ReadOnly, 0); |
46 | } | 46 | } |
47 | 47 | ||
48 | stream = new QTextStream(file); | 48 | stream = new QTextStream(file); |
49 | 49 | ||
50 | string = stream->read(); | 50 | string = stream->read(); |
51 | textView->setText(string); | 51 | textView->mimeSourceFactory()->setFilePath(QDir::currentDirPath()+"/"); |
52 | textView->mimeSourceFactory()->setFilePath(QDir::currentDirPath()); | 52 | textView->setText(string, QDir::currentDirPath()+"/"); |
53 | printf("%s\n", QDir::currentDirPath().latin1()); | ||
53 | file->close(); | 54 | file->close(); |
54 | 55 | ||
55 | } | 56 | } |
56 | 57 | ||