-rw-r--r-- | microkde/kdecore/klocale.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index 1d8ae9f..dd310fa 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp @@ -1,4 +1,5 @@ #include <qregexp.h> #include <qapplication.h> +#include <QDesktopWidget> #include "kdebug.h" @@ -12,6 +13,6 @@ -QDict<QString> *mLocaleDict = 0; -void setLocaleDict( QDict<QString> * dict ) +Q3Dict<QString> *mLocaleDict = 0; +void setLocaleDict( Q3Dict<QString> * dict ) { mLocaleDict = dict; @@ -46,5 +47,5 @@ void addExist(const char *text,QString trans ) #include <qfile.h> -#include <qtextstream.h> +#include <q3textstream.h> #include <qtextcodec.h> #endif @@ -54,8 +55,8 @@ void dumpMissing() QString fileName = "/tmp/usernewtrans.txt"; QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return ; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -71,8 +72,8 @@ void dumpMissing() QString fileName = "/tmp/usertrans.txt"; QFile file( fileName ); - if (!file.open( IO_WriteOnly ) ) { + if (!file.open( QIODevice::WriteOnly ) ) { return ; } - QTextStream ts( &file ); + Q3TextStream ts( &file ); ts.setCodec( QTextCodec::codecForName("utf8") ); @@ -468,5 +469,5 @@ QString KLocale::formatDateTime(const QDateTime &pDateTime, else if ( intIntDateFormat == Format1 ) format = "%1 %2"; - else if ( intIntDateFormat == ISODate ) + else if ( intIntDateFormat == Qt::ISODate ) format = "%1T%2"; @@ -528,5 +529,5 @@ QDate KLocale::readDate(const QString &intstr, const QString &fmt, bool* ok) con c = fmt.at(fmtpos++); - switch (c) + switch (c.unicode()) { case 'a': @@ -639,5 +640,5 @@ QTime KLocale::readTime(const QString &intstr, bool seconds, bool *ok) const c = Format.at(Formatpos++); - switch (c) + switch (c.unicode()) { case 'p': @@ -735,5 +736,5 @@ QDateTime KLocale::readDateTime(const QString &intstr, QDate m_date = readDate(date, dformat, &ok1); - QTime m_time = readTime(time, tformat, &ok2); + QTime m_time = readTime(time, !tformat.isEmpty(), &ok2); QDateTime m_dt; |