-rw-r--r-- | microkde/kapplication.cpp | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index d7c12bb..b058d54 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -7,9 +7,12 @@ #include <qstring.h> #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qdialog.h> #include <qlayout.h> -#include <qtextbrowser.h> +#include <q3textbrowser.h> #include <qregexp.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <Q3VBoxLayout> int KApplication::random() @@ -76,8 +79,8 @@ void KApplication::showFile(QString caption, QString fn) #endif QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return ; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); text = ts.read(); file.close(); @@ -90,17 +93,17 @@ bool KApplication::convert2latin1(QString fileName) QString text; QFile file( fileName ); - if (!file.open( IO_ReadOnly ) ) { + if (!file.open( QIODevice::ReadOnly ) ) { return false; } - QTextStream ts( &file ); - ts.setEncoding( QTextStream::UnicodeUTF8 ); + Q3TextStream ts( &file ); + ts.setEncoding( Q3TextStream::UnicodeUTF8 ); text = ts.read(); file.close(); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return false; } - QTextStream tsIn( &file ); - tsIn.setEncoding( QTextStream::Latin1 ); + Q3TextStream tsIn( &file ); + tsIn.setEncoding( Q3TextStream::Latin1 ); tsIn << text.latin1(); file.close(); @@ -113,9 +116,9 @@ void KApplication::showText(QString caption, QString text) QDialog dia( 0, "name", true ); ; dia.setCaption( caption ); - QVBoxLayout* lay = new QVBoxLayout( &dia ); + Q3VBoxLayout* lay = new Q3VBoxLayout( &dia ); lay->setSpacing( 3 ); lay->setMargin( 3 ); KTextEdit tb ( &dia ); - tb.setWordWrap( QMultiLineEdit::WidgetWidth ); + tb.setWordWrap( Q3MultiLineEdit::WidgetWidth ); lay->addWidget( &tb ); tb.setText( text ); @@ -134,5 +137,5 @@ void KApplication::showText(QString caption, QString text) #include <qdir.h> #include <qradiobutton.h> -#include <qbuttongroup.h> +#include <q3buttongroup.h> #include "kglobal.h" #include "klocale.h" @@ -145,10 +148,10 @@ class KBackupPrefs : public QDialog { setCaption( i18n("Backup Failed!") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel * lab = new QLabel( message, this ); lay->addWidget( lab ); - QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Choose action"), this ); + Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Choose action"), this ); lay->addWidget( format ); format->setExclusive ( true ) ; |