summaryrefslogtreecommitdiff
path: root/libopie2
authorzecke <zecke>2004-09-10 11:04:46 (UTC)
committer zecke <zecke>2004-09-10 11:04:46 (UTC)
commit224c96feb94acd6a87e1a2463aca9726afe925ef (patch) (unidiff)
tree58addf357217e4e84d7231afed4a901b3a2e0bba /libopie2
parent2ec724fc789cd34f6b3743896516f2fef2731456 (diff)
downloadopie-224c96feb94acd6a87e1a2463aca9726afe925ef.zip
opie-224c96feb94acd6a87e1a2463aca9726afe925ef.tar.gz
opie-224c96feb94acd6a87e1a2463aca9726afe925ef.tar.bz2
Fix warnings about unused parameters
Diffstat (limited to 'libopie2') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oconfig.cpp2
-rw-r--r--libopie2/opiecore/ofilenotify.cpp2
-rw-r--r--libopie2/opiecore/opluginloader.h3
3 files changed, 6 insertions, 1 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;
diff --git a/libopie2/opiecore/ofilenotify.cpp b/libopie2/opiecore/ofilenotify.cpp
index b576c4f..2a9bb8c 100644
--- a/libopie2/opiecore/ofilenotify.cpp
+++ b/libopie2/opiecore/ofilenotify.cpp
@@ -228,48 +228,50 @@ bool OFileNotification::hasChanged()
228 { 228 {
229 qDebug( "OFileNotification::hasChanged(): mtime changed" ); 229 qDebug( "OFileNotification::hasChanged(): mtime changed" );
230 c = true; 230 c = true;
231 } 231 }
232 if ( !c && (_type & Attrib) && (long)_stat.st_ctime < (long)newstat.st_ctime ) 232 if ( !c && (_type & Attrib) && (long)_stat.st_ctime < (long)newstat.st_ctime )
233 { 233 {
234 qDebug( "OFileNotification::hasChanged(): ctime changed" ); 234 qDebug( "OFileNotification::hasChanged(): ctime changed" );
235 c = true; 235 c = true;
236 } 236 }
237 237
238 return c; 238 return c;
239} 239}
240 240
241 241
242void OFileNotification::singleShot( const QString& path, QObject* receiver, const char* member, OFileNotificationType type ) 242void OFileNotification::singleShot( const QString& path, QObject* receiver, const char* member, OFileNotificationType type )
243{ 243{
244 OFileNotification* ofn = new OFileNotification(); 244 OFileNotification* ofn = new OFileNotification();
245 ofn->_signal.connect( receiver, member ); 245 ofn->_signal.connect( receiver, member );
246 ofn->start( path, true, type ); 246 ofn->start( path, true, type );
247} 247}
248 248
249 249
250void OFileNotification::__signalHandler( int sig, siginfo_t *si, void *data ) 250void OFileNotification::__signalHandler( int sig, siginfo_t *si, void *data )
251{ 251{
252 Q_UNUSED( sig )
253 Q_UNUSED( data )
252 qWarning( "OFileNotification::__signalHandler(): reached." ); 254 qWarning( "OFileNotification::__signalHandler(): reached." );
253 int fd = si->si_fd; 255 int fd = si->si_fd;
254 OFileNotification* fn = notification_list[fd]; 256 OFileNotification* fn = notification_list[fd];
255 if ( fn ) 257 if ( fn )
256 { 258 {
257 // check if it really was the file (dnotify triggers on directory granularity, not file granularity) 259 // check if it really was the file (dnotify triggers on directory granularity, not file granularity)
258 if ( !fn->activate() ) 260 if ( !fn->activate() )
259 { 261 {
260 qDebug( "OFileNotification::__signalHandler(): false alarm ;) Restarting the trigger (if it was single)..." ); 262 qDebug( "OFileNotification::__signalHandler(): false alarm ;) Restarting the trigger (if it was single)..." );
261 if ( !(fn->type() & Multi ) ) 263 if ( !(fn->type() & Multi ) )
262 { 264 {
263 int result = ::fcntl( fn->fileno(), F_NOTIFY, fn->type() ); 265 int result = ::fcntl( fn->fileno(), F_NOTIFY, fn->type() );
264 if ( result == -1 ) 266 if ( result == -1 )
265 { 267 {
266 qWarning( "OFileNotification::__signalHandler(): Can't restart the trigger: %s.", strerror( errno ) ); 268 qWarning( "OFileNotification::__signalHandler(): Can't restart the trigger: %s.", strerror( errno ) );
267 } 269 }
268 } 270 }
269 return; 271 return;
270 } 272 }
271 #if 1 273 #if 1
272 if ( !(fn->type() & Multi) ) 274 if ( !(fn->type() & Multi) )
273 { 275 {
274 qDebug( "OFileNotification::__signalHandler(): '%d' was singleShot. Removing from list.", fd ); 276 qDebug( "OFileNotification::__signalHandler(): '%d' was singleShot. Removing from list.", fd );
275 notification_list.remove( fd ); 277 notification_list.remove( fd );
diff --git a/libopie2/opiecore/opluginloader.h b/libopie2/opiecore/opluginloader.h
index d97f586..ee47733 100644
--- a/libopie2/opiecore/opluginloader.h
+++ b/libopie2/opiecore/opluginloader.h
@@ -43,49 +43,50 @@ public:
43 QString path()const; 43 QString path()const;
44 bool isEnabled()const; 44 bool isEnabled()const;
45 int position()const; 45 int position()const;
46 46
47 void setName( const QString& ); 47 void setName( const QString& );
48 void setPath( const QString& ); 48 void setPath( const QString& );
49 void setEnabled( bool ); 49 void setEnabled( bool );
50 void setPosition( int ); 50 void setPosition( int );
51 51
52private: 52private:
53 QString m_name; 53 QString m_name;
54 QString m_path; 54 QString m_path;
55 bool m_enabled : 1; 55 bool m_enabled : 1;
56 int m_pos; 56 int m_pos;
57 struct Private; 57 struct Private;
58 Private *d; 58 Private *d;
59}; 59};
60 60
61/** 61/**
62 * \brief A generic class to easily load and manage plugins 62 * \brief A generic class to easily load and manage plugins
63 * 63 *
64 * This is the generic non sepcialised loader for plugins. Normally 64 * This is the generic non sepcialised loader for plugins. Normally
65 * you would prefer using the OPluginLoader directly. This class 65 * you would prefer using the OPluginLoader directly. This class
66 * exists to minimize the application binary size due the usage 66 * exists to minimize the application binary size due the usage
67 * of templates in the specialized API 67 * of templates in the specialized API.
68 *
68 * 69 *
69 * @since 1.2 70 * @since 1.2
70 * @see OPluginLoader 71 * @see OPluginLoader
71 */ 72 */
72class OGenericPluginLoader { 73class OGenericPluginLoader {
73public: 74public:
74 typedef OPluginItem::List List; 75 typedef OPluginItem::List List;
75 OGenericPluginLoader( const QString &name, bool isSorted = false ); 76 OGenericPluginLoader( const QString &name, bool isSorted = false );
76 virtual ~OGenericPluginLoader(); 77 virtual ~OGenericPluginLoader();
77 78
78 void setAutoDelete( bool ); 79 void setAutoDelete( bool );
79 bool autoDelete()const; 80 bool autoDelete()const;
80 void clear(); 81 void clear();
81 82
82 QString name()const; 83 QString name()const;
83 bool isSorted()const; 84 bool isSorted()const;
84 bool isInSafeMode()const; 85 bool isInSafeMode()const;
85 86
86 87
87 List allAvailable(bool sorted = false )const; 88 List allAvailable(bool sorted = false )const;
88 List filtered(bool sorted = false )const; 89 List filtered(bool sorted = false )const;
89 90
90 91
91 virtual QUnknownInterface* load( const OPluginItem& item, const QUuid& ); 92 virtual QUnknownInterface* load( const OPluginItem& item, const QUuid& );