Diffstat (limited to 'noncore/apps/tinykate/libkate/kateconfig.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/libkate/kateconfig.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/noncore/apps/tinykate/libkate/kateconfig.cpp b/noncore/apps/tinykate/libkate/kateconfig.cpp index 96f91fb..782b629 100644 --- a/noncore/apps/tinykate/libkate/kateconfig.cpp +++ b/noncore/apps/tinykate/libkate/kateconfig.cpp @@ -17,25 +17,30 @@ ** not clear to you. ** **********************************************************************/ +#define QTOPIA_INTERNAL_LANGLIST +#include "kateconfig.h" + +/* OPIE */ +#include <opie2/odebug.h> +#include <qpe/global.h> + +/* QT */ #include <qdir.h> #include <qmessagebox.h> #if QT_VERSION <= 230 && defined(QT_NO_CODECS) #include <qtextcodec.h> #endif #include <qtextstream.h> +/* STD */ #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> #include <stdlib.h> #include <unistd.h> -#define QTOPIA_INTERNAL_LANGLIST -#include "kateconfig.h" -#include <qpe/global.h> - /*! \internal */ @@ -92,9 +97,9 @@ QString KateConfig::configFilename(const QString& name, Domain d) */ KateConfig::KateConfig( const QString &name, Domain domain ) : filename( configFilename(name,domain) ) { - qWarning("KateConfig constructor\n"); + owarn << "KateConfig constructor\n" << oendl; git = groups.end(); read(); QStringList l = Global::languageList(); lang = l[0]; @@ -117,9 +122,9 @@ KateConfig::KateConfig ( const QString &name, bool what ) Writes any changes to disk and destroys the in-memory object. */ KateConfig::~KateConfig() { - qWarning("KateConfig destructor\n"); + owarn << "KateConfig destructor\n" << oendl; if ( changed ) write(); } @@ -171,9 +176,9 @@ void KateConfig::writeEntry( const QString &key, const char* value ) */ void KateConfig::writeEntry( const QString &key, const QString &value ) { if ( git == groups.end() ) { - qWarning( "no group set" ); + owarn << "no group set" << oendl; return; } if ( (*git)[key] != value ) { ( *git ).insert( key, value ); @@ -231,9 +236,9 @@ static QString decipher(const QString& cipher) */ void KateConfig::writeEntryCrypt( const QString &key, const QString &value ) { if ( git == groups.end() ) { - qWarning( "no group set" ); + owarn << "no group set" << oendl; return; } QString evalue = encipher(value); if ( (*git)[key] != evalue ) { @@ -320,9 +325,9 @@ void KateConfig::writeEntry( const QString &key, const QFont &val ) void KateConfig::removeEntry( const QString &key ) { if ( git == groups.end() ) { - qWarning( "no group set" ); + owarn << "no group set" << oendl; return; } ( *git ).remove( key ); changed = TRUE; @@ -396,9 +401,9 @@ QString KateConfig::readEntryCrypt( const QString &key, const QString &deflt ) */ QString KateConfig::readEntryDirect( const QString &key, const QString &deflt ) { if ( git == groups.end() ) { - //qWarning( "no group set" ); + //owarn << "no group set" << oendl; return deflt; } KateConfigGroup::ConstIterator it = ( *git ).find( key ); if ( it != ( *git ).end() ) @@ -499,9 +504,9 @@ QValueList<int> KateConfig::readIntListEntry( const QString &key ) const */ void KateConfig::clearGroup() { if ( git == groups.end() ) { - qWarning( "no group set" ); + owarn << "no group set" << oendl; return; } if ( !(*git).isEmpty() ) { ( *git ).clear(); @@ -520,9 +525,9 @@ void KateConfig::write( const QString &fn ) strNewFile = filename + ".new"; QFile f( strNewFile ); if ( !f.open( IO_WriteOnly|IO_Raw ) ) { - qWarning( "could not open for writing `%s'", strNewFile.latin1() ); + owarn << "could not open for writing `" << strNewFile << "'" << oendl; git = groups.end(); return; } |