Diffstat (limited to 'noncore/apps/opie-console/profile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/profile.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/profile.cpp b/noncore/apps/opie-console/profile.cpp index 1a94619..ffd672e 100644 --- a/noncore/apps/opie-console/profile.cpp +++ b/noncore/apps/opie-console/profile.cpp @@ -33,87 +33,89 @@ Profile &Profile::operator=( const Profile& prof ) { return *this; } Profile::~Profile() { } QMap<QString, QString> Profile::conf()const { return m_conf; } QString Profile::name()const { return m_name; } QCString Profile::ioLayerName()const { return m_ioLayer; } QCString Profile::terminalName( )const { return m_term; } int Profile::foreground()const { return m_fore; } int Profile::background()const { return m_back; } int Profile::terminal()const { return m_terminal; } void Profile::setName( const QString& str ) { m_name = str; } void Profile::setIOLayer( const QCString& name ) { m_ioLayer = name; } void Profile::setTerminalName( const QCString& str ) { m_term = str; } void Profile::setBackground( int back ) { m_back = back; } void Profile::setForeground( int fore ) { m_fore = fore; } void Profile::setTerminal( int term ) { m_terminal = term; } /* config stuff */ void Profile::clearConf() { m_conf.clear(); } void Profile::writeEntry( const QString& key, const QString& value ) { + qWarning("key %s value %s", key.latin1(), value.latin1() ); m_conf.replace( key, value ); } void Profile::writeEntry( const QString& key, int num ) { + qWarning("num"); writeEntry( key, QString::number( num ) ); } void Profile::writeEntry( const QString& key, bool b ) { writeEntry( key, QString::number(b) ); } void Profile::writeEntry( const QString& key, const QStringList& lis, const QChar& sep ) { writeEntry( key, lis.join(sep) ); } QString Profile::readEntry( const QString& key, const QString& deflt )const { QMap<QString, QString>::ConstIterator it; it = m_conf.find( key ); if ( it != m_conf.end() ) return it.data(); return deflt; } int Profile::readNumEntry( const QString& key, int def )const { QMap<QString, QString>::ConstIterator it; it = m_conf.find( key ); if ( it != m_conf.end() ) { bool ok; int val = it.data().toInt(&ok); if (ok) return val; } return def; } bool Profile::readBoolEntry( const QString& key, bool def )const { return readNumEntry( key, def ); } void Profile::setConf( const QMap<QString, QString>& conf ) { m_conf = conf; }; |