summaryrefslogtreecommitdiff
path: root/noncore/apps/tinykate/libkate/kateconfig.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/tinykate/libkate/kateconfig.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/kateconfig.cpp29
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
@@ -18,6 +18,14 @@
**
**********************************************************************/
+#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)
@@ -25,16 +33,13 @@
#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
@@ -93,7 +98,7 @@ 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();
@@ -118,7 +123,7 @@ KateConfig::KateConfig ( const QString &name, bool what )
*/
KateConfig::~KateConfig()
{
- qWarning("KateConfig destructor\n");
+ owarn << "KateConfig destructor\n" << oendl;
if ( changed )
write();
}
@@ -172,7 +177,7 @@ 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 ) {
@@ -232,7 +237,7 @@ 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);
@@ -321,7 +326,7 @@ 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 );
@@ -397,7 +402,7 @@ 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 );
@@ -500,7 +505,7 @@ 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() ) {
@@ -521,7 +526,7 @@ void KateConfig::write( const QString &fn )
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;
}