summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/oconfig.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/oconfig.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oconfig.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opiecore/oconfig.cpp b/libopie2/opiecore/oconfig.cpp
index 05d8070..6b57729 100644
--- a/libopie2/opiecore/oconfig.cpp
+++ b/libopie2/opiecore/oconfig.cpp
@@ -92,48 +92,50 @@ QColor OConfig::readColorEntry( const QString& key, const QColor* pDefault ) con
92 return aRetColor; 92 return aRetColor;
93 } 93 }
94 nGreen = aValue.mid( nOldIndex+1, 94 nGreen = aValue.mid( nOldIndex+1,
95 nIndex-nOldIndex-1 ).toInt( &bOK ); 95 nIndex-nOldIndex-1 ).toInt( &bOK );
96 96
97 // find third part (blue) 97 // find third part (blue)
98 nBlue = aValue.right( aValue.length()-nIndex-1 ).toInt( &bOK ); 98 nBlue = aValue.right( aValue.length()-nIndex-1 ).toInt( &bOK );
99 99
100 aRetColor.setRgb( nRed, nGreen, nBlue ); 100 aRetColor.setRgb( nRed, nGreen, nBlue );
101 } 101 }
102 } 102 }
103 else { 103 else {
104 104
105 if( pDefault ) 105 if( pDefault )
106 aRetColor = *pDefault; 106 aRetColor = *pDefault;
107 } 107 }
108 108
109 return aRetColor; 109 return aRetColor;
110} 110}
111 111
112// FIXME: The whole font handling has to be revised for Opie 112// FIXME: The whole font handling has to be revised for Opie
113 113
114QFont OConfig::readFontEntry( const QString& key, const QFont* pDefault ) const 114QFont OConfig::readFontEntry( const QString& key, const QFont* pDefault ) const
115{ 115{
116 Q_CONST_UNUSED( key )
117 Q_CONST_UNUSED( pDefault )
116 /* 118 /*
117 QFont aRetFont; 119 QFont aRetFont;
118 120
119 QString aValue = readEntry( key ); 121 QString aValue = readEntry( key );
120 if( !aValue.isNull() ) { 122 if( !aValue.isNull() ) {
121 if ( aValue.contains( ',' ) > 5 ) { 123 if ( aValue.contains( ',' ) > 5 ) {
122 // KDE3 and upwards entry 124 // KDE3 and upwards entry
123 if ( !aRetFont.fromString( aValue ) && pDefault ) 125 if ( !aRetFont.fromString( aValue ) && pDefault )
124 aRetFont = *pDefault; 126 aRetFont = *pDefault;
125 } 127 }
126 else { 128 else {
127 // backward compatibility with older font formats 129 // backward compatibility with older font formats
128 // ### remove KDE 3.1 ? 130 // ### remove KDE 3.1 ?
129 // find first part (font family) 131 // find first part (font family)
130 int nIndex = aValue.find( ',' ); 132 int nIndex = aValue.find( ',' );
131 if( nIndex == -1 ){ 133 if( nIndex == -1 ){
132 if( pDefault ) 134 if( pDefault )
133 aRetFont = *pDefault; 135 aRetFont = *pDefault;
134 return aRetFont; 136 return aRetFont;
135 } 137 }
136 aRetFont.setFamily( aValue.left( nIndex ) ); 138 aRetFont.setFamily( aValue.left( nIndex ) );
137 139
138 // find second part (point size) 140 // find second part (point size)
139 int nOldIndex = nIndex; 141 int nOldIndex = nIndex;