summaryrefslogtreecommitdiffabout
path: root/microkde/kapplication.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kapplication.cpp33
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
@@ -6,11 +6,14 @@
#include <qapplication.h>
#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()
{
@@ -75,10 +78,10 @@ void KApplication::showFile(QString caption, QString fn)
fileName = qApp->applicationDirPath () + "/" + 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();
KApplication::showText( caption, text );
@@ -89,19 +92,19 @@ 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();
return true;
@@ -112,11 +115,11 @@ 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 );
#ifdef DESKTOP_VERSION
@@ -133,7 +136,7 @@ void KApplication::showText(QString caption, QString text)
#include <qlayout.h>
#include <qdir.h>
#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <q3buttongroup.h>
#include "kglobal.h"
#include "klocale.h"
@@ -144,12 +147,12 @@ class KBackupPrefs : public QDialog
QDialog( parent, name, true )
{
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 ) ;
vcal = new QRadioButton(i18n("Try again now"), format );