-rw-r--r-- | microkde/kapplication.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index 21aa0a4..f05b91b 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp | |||
@@ -72,33 +72,34 @@ bool KApplication::convert2latin1(QString fileName) | |||
72 | QString text; | 72 | QString text; |
73 | QFile file( fileName ); | 73 | QFile file( fileName ); |
74 | if (!file.open( IO_ReadOnly ) ) { | 74 | if (!file.open( IO_ReadOnly ) ) { |
75 | return false; | 75 | return false; |
76 | 76 | ||
77 | } | 77 | } |
78 | QTextStream ts( &file ); | 78 | QTextStream ts( &file ); |
79 | ts.setEncoding( QTextStream::UnicodeUTF8 ); | 79 | ts.setEncoding( QTextStream::UnicodeUTF8 ); |
80 | text = ts.read(); | 80 | text = ts.read(); |
81 | file.close(); | 81 | file.close(); |
82 | if (!file.open( IO_WriteOnly ) ) { | 82 | if (!file.open( IO_WriteOnly ) ) { |
83 | return false; | 83 | return false; |
84 | } | 84 | } |
85 | QTextStream tsIn( &file ); | 85 | QTextStream tsIn( &file ); |
86 | tsIn.setEncoding( QTextStream::Latin1 ); | 86 | tsIn.setEncoding( QTextStream::Latin1 ); |
87 | tsIn << text.latin1(); | 87 | tsIn << text.latin1(); |
88 | file.close(); | 88 | file.close(); |
89 | return true; | ||
89 | 90 | ||
90 | 91 | ||
91 | } | 92 | } |
92 | void KApplication::showText(QString caption, QString text) | 93 | void KApplication::showText(QString caption, QString text) |
93 | { | 94 | { |
94 | QDialog dia( 0, "name", true ); ; | 95 | QDialog dia( 0, "name", true ); ; |
95 | dia.setCaption( caption ); | 96 | dia.setCaption( caption ); |
96 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 97 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
97 | lay->setSpacing( 3 ); | 98 | lay->setSpacing( 3 ); |
98 | lay->setMargin( 3 ); | 99 | lay->setMargin( 3 ); |
99 | KTextEdit tb ( &dia ); | 100 | KTextEdit tb ( &dia ); |
100 | tb.setWordWrap( QMultiLineEdit::WidgetWidth ); | 101 | tb.setWordWrap( QMultiLineEdit::WidgetWidth ); |
101 | lay->addWidget( &tb ); | 102 | lay->addWidget( &tb ); |
102 | tb.setText( text ); | 103 | tb.setText( text ); |
103 | #ifdef DESKTOP_VERSION | 104 | #ifdef DESKTOP_VERSION |
104 | dia.resize( 640, 480); | 105 | dia.resize( 640, 480); |