author | zecke <zecke> | 2004-09-10 11:04:46 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-10 11:04:46 (UTC) |
commit | 224c96feb94acd6a87e1a2463aca9726afe925ef (patch) (side-by-side diff) | |
tree | 58addf357217e4e84d7231afed4a901b3a2e0bba | |
parent | 2ec724fc789cd34f6b3743896516f2fef2731456 (diff) | |
download | opie-224c96feb94acd6a87e1a2463aca9726afe925ef.zip opie-224c96feb94acd6a87e1a2463aca9726afe925ef.tar.gz opie-224c96feb94acd6a87e1a2463aca9726afe925ef.tar.bz2 |
Fix warnings about unused parameters
-rw-r--r-- | libopie2/opiecore/oconfig.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/ofilenotify.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiecore/opluginloader.h | 3 |
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 @@ -84,64 +84,66 @@ QColor OConfig::readColorEntry( const QString& key, const QColor* pDefault ) con int nOldIndex = nIndex; nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ) { // return a sensible default -- Bernd if( pDefault ) aRetColor = *pDefault; return aRetColor; } nGreen = aValue.mid( nOldIndex+1, nIndex-nOldIndex-1 ).toInt( &bOK ); // find third part (blue) nBlue = aValue.right( aValue.length()-nIndex-1 ).toInt( &bOK ); aRetColor.setRgb( nRed, nGreen, nBlue ); } } else { if( pDefault ) aRetColor = *pDefault; } return aRetColor; } // FIXME: The whole font handling has to be revised for Opie QFont OConfig::readFontEntry( const QString& key, const QFont* pDefault ) const { + Q_CONST_UNUSED( key ) + Q_CONST_UNUSED( pDefault ) /* QFont aRetFont; QString aValue = readEntry( key ); if( !aValue.isNull() ) { if ( aValue.contains( ',' ) > 5 ) { // KDE3 and upwards entry if ( !aRetFont.fromString( aValue ) && pDefault ) aRetFont = *pDefault; } else { // backward compatibility with older font formats // ### remove KDE 3.1 ? // find first part (font family) int nIndex = aValue.find( ',' ); if( nIndex == -1 ){ if( pDefault ) aRetFont = *pDefault; return aRetFont; } aRetFont.setFamily( aValue.left( nIndex ) ); // find second part (point size) int nOldIndex = nIndex; nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ){ if( pDefault ) aRetFont = *pDefault; return aRetFont; } aRetFont.setPointSize( aValue.mid( nOldIndex+1, 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 @@ -220,64 +220,66 @@ bool OFileNotification::hasChanged() c = true; } if ( !c && (_type & Access) && (long)_stat.st_atime < (long)newstat.st_atime ) { qDebug( "OFileNotification::hasChanged(): atime changed" ); c = true; } if ( !c && (_type & Modify) && (long)_stat.st_mtime < (long)newstat.st_mtime ) { qDebug( "OFileNotification::hasChanged(): mtime changed" ); c = true; } if ( !c && (_type & Attrib) && (long)_stat.st_ctime < (long)newstat.st_ctime ) { qDebug( "OFileNotification::hasChanged(): ctime changed" ); c = true; } return c; } void OFileNotification::singleShot( const QString& path, QObject* receiver, const char* member, OFileNotificationType type ) { OFileNotification* ofn = new OFileNotification(); ofn->_signal.connect( receiver, member ); ofn->start( path, true, type ); } void OFileNotification::__signalHandler( int sig, siginfo_t *si, void *data ) { + Q_UNUSED( sig ) + Q_UNUSED( data ) qWarning( "OFileNotification::__signalHandler(): reached." ); int fd = si->si_fd; OFileNotification* fn = notification_list[fd]; if ( fn ) { // check if it really was the file (dnotify triggers on directory granularity, not file granularity) if ( !fn->activate() ) { qDebug( "OFileNotification::__signalHandler(): false alarm ;) Restarting the trigger (if it was single)..." ); if ( !(fn->type() & Multi ) ) { int result = ::fcntl( fn->fileno(), F_NOTIFY, fn->type() ); if ( result == -1 ) { qWarning( "OFileNotification::__signalHandler(): Can't restart the trigger: %s.", strerror( errno ) ); } } return; } #if 1 if ( !(fn->type() & Multi) ) { qDebug( "OFileNotification::__signalHandler(): '%d' was singleShot. Removing from list.", fd ); notification_list.remove( fd ); if ( notification_list.isEmpty() ) { OFileNotification::unregisterSignalHandler(); } } #endif } else 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 @@ -35,65 +35,66 @@ public: bool isEmpty()const; bool operator==( const OPluginItem& )const; bool operator!=( const OPluginItem& )const; QString name()const; QString path()const; bool isEnabled()const; int position()const; void setName( const QString& ); void setPath( const QString& ); void setEnabled( bool ); void setPosition( int ); private: QString m_name; QString m_path; bool m_enabled : 1; int m_pos; struct Private; Private *d; }; /** * \brief A generic class to easily load and manage plugins * * This is the generic non sepcialised loader for plugins. Normally * you would prefer using the OPluginLoader directly. This class * exists to minimize the application binary size due the usage - * of templates in the specialized API + * of templates in the specialized API. + * * * @since 1.2 * @see OPluginLoader */ class OGenericPluginLoader { public: typedef OPluginItem::List List; OGenericPluginLoader( const QString &name, bool isSorted = false ); virtual ~OGenericPluginLoader(); void setAutoDelete( bool ); bool autoDelete()const; void clear(); QString name()const; bool isSorted()const; bool isInSafeMode()const; List allAvailable(bool sorted = false )const; List filtered(bool sorted = false )const; virtual QUnknownInterface* load( const OPluginItem& item, const QUuid& ); virtual void unload( QUnknownInterface* ); protected: friend class OPluginManager; // we need the static unlibify void readConfig(); virtual List plugins( const QString& dir, bool sorted, bool disabled )const; void setPluginDirs( const QStringList& ); void setPluginDir( const QString& ); |