author | zecke <zecke> | 2004-09-10 11:06:50 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-10 11:06:50 (UTC) |
commit | 00b7879d0d886b642b1f1102e3a811e67f928df7 (patch) (side-by-side diff) | |
tree | 15a9a6b1ba3ddf64a94265556cd9140916a47811 /libopie2 | |
parent | d416ff23ea50303173d07ea243498a163f5995b5 (diff) | |
download | opie-00b7879d0d886b642b1f1102e3a811e67f928df7.zip opie-00b7879d0d886b642b1f1102e3a811e67f928df7.tar.gz opie-00b7879d0d886b642b1f1102e3a811e67f928df7.tar.bz2 |
Fix warnings about unused parameters and no newline at the end of file
-rw-r--r-- | libopie2/opieui/big-screen/owidgetstack.cpp | 2 | ||||
-rw-r--r-- | libopie2/opieui/ofontselector.cpp | 1 | ||||
-rw-r--r-- | libopie2/opieui/olistview.cpp | 20 | ||||
-rw-r--r-- | libopie2/opieui/oselector.cpp | 2 | ||||
-rw-r--r-- | libopie2/opieui/owait.cpp | 1 |
5 files changed, 17 insertions, 9 deletions
diff --git a/libopie2/opieui/big-screen/owidgetstack.cpp b/libopie2/opieui/big-screen/owidgetstack.cpp index de7f83f..9c9f7ec 100644 --- a/libopie2/opieui/big-screen/owidgetstack.cpp +++ b/libopie2/opieui/big-screen/owidgetstack.cpp @@ -435,7 +435,7 @@ void OWidgetStack::switchTop() { delete m_stack; m_stack = 0; } } -}
\ No newline at end of file +} diff --git a/libopie2/opieui/ofontselector.cpp b/libopie2/opieui/ofontselector.cpp index 6763ee6..4870cd9 100644 --- a/libopie2/opieui/ofontselector.cpp +++ b/libopie2/opieui/ofontselector.cpp @@ -190,12 +190,13 @@ bool OFontSelector::setSelectedFont ( const QFont &f ) * @param styleStr The style of the font * @param sizeVal The size of font * @param charset The charset to be used. Will be deprecated by QT3 */ bool OFontSelector::setSelectedFont( const QString &familyStr, const QString &styleStr, int sizeVal, const QString & charset ) { + Q_CONST_UNUSED( charset ) QString sizeStr = QString::number ( sizeVal ); QListBoxItem *family = d->m_font_family_list->findItem ( familyStr ); if ( !family ) family = d->m_font_family_list->findItem ( "Helvetica" ); if ( !family ) diff --git a/libopie2/opieui/olistview.cpp b/libopie2/opieui/olistview.cpp index b90c786..67b4b83 100644 --- a/libopie2/opieui/olistview.cpp +++ b/libopie2/opieui/olistview.cpp @@ -184,13 +184,13 @@ void OListView::serializeFrom( QDataStream& s ) while ( columns() < cols ) addColumn( QString::null ); for ( int i = 0; i < cols; ++i ) { QString coltext; s >> coltext; - odebug << "read text '" << coltext << "' for column " << i << "" << oendl; + odebug << "read text '" << coltext << "' for column " << i << "" << oendl; setColumnText( i, coltext ); } int items; s >> items; odebug << "read number of items = " << items << oendl; @@ -229,17 +229,19 @@ void OListView::collapse() } QDataStream& operator<<( QDataStream& s, const OListView& lv ) { lv.serializeTo( s ); + return s; } QDataStream& operator>>( QDataStream& s, OListView& lv ) { lv.serializeFrom( s ); + return s; } #endif // QT_NO_DATASTREAM /*====================================================================================== * OListViewItem *======================================================================================*/ @@ -439,19 +441,19 @@ void OListViewItem::serializeFrom( QDataStream& s ) odebug << "loading OListViewItem..." << oendl; for ( int i = 0; i < listView()->columns(); ++i ) { QString coltext; s >> coltext; - odebug << "read text '" << coltext << "' for column " << i << "" << oendl; + odebug << "read text '" << coltext << "' for column " << i << "" << oendl; setText( i, coltext ); } int items; s >> items; - odebug << "read number of items = " << items << "" << oendl; + odebug << "read number of items = " << items << "" << oendl; for ( int i = 0; i < items; ++i ) { OListViewItem* item = childFactory(); s >> (*item); } @@ -460,18 +462,20 @@ void OListViewItem::serializeFrom( QDataStream& s ) } QDataStream& operator<<( QDataStream& s, const OListViewItem& lvi ) { lvi.serializeTo( s ); + return s; } QDataStream& operator>>( QDataStream& s, OListViewItem& lvi ) { lvi.serializeFrom( s ); + return s; } #endif // QT_NO_DATASTREAM /*====================================================================================== * OCheckListItem @@ -612,13 +616,13 @@ ONamedListView::~ONamedListView() void ONamedListView::addColumns( const QStringList& columns ) { for ( QStringList::ConstIterator it = columns.begin(); it != columns.end(); ++it ) { - odebug << "adding column " << *it << "" << oendl; + odebug << "adding column " << *it << "" << oendl; addColumn( *it ); } } int ONamedListView::findColumn( const QString& text ) const @@ -641,17 +645,17 @@ ONamedListViewItem* ONamedListView::find( int column, const QString& text, int r ONamedListViewItem* ONamedListView::find( ONamedListViewItem* item, int column, const QString& text, int recurse ) const { ONamedListViewItem* result; while ( item && item->text( column ) != text ) { - odebug << "checked " << item->text( column ) << "" << oendl; + odebug << "checked " << item->text( column ) << "" << oendl; if ( recurse < 0 || recurse > 0 ) { - odebug << "recursion is " << recurse << " - recursing into..." << oendl; + odebug << "recursion is " << recurse << " - recursing into..." << oendl; result = find( (ONamedListViewItem*) item->firstChild(), column, text, recurse-1 ); if ( result ) return result; } item = (ONamedListViewItem*) item->itemBelow(); @@ -722,13 +726,13 @@ ONamedListViewItem::~ONamedListViewItem() void ONamedListViewItem::setText( const QStringList& texts ) { int col = 0; for ( QStringList::ConstIterator it = texts.begin(); it != texts.end(); ++it ) { - odebug << "setting column " << col << " = text " << *it << "" << oendl; + odebug << "setting column " << col << " = text " << *it << "" << oendl; OListViewItem::setText( col++, *it ); } } @@ -738,13 +742,13 @@ void ONamedListViewItem::setText( const QString& column, const QString& text ) //FIXME: because of the linear search over all column texts. //FIXME: I will optimize later by using a hash map. int col = ( (ONamedListView*) listView() )->findColumn( column ); if ( col != -1 ) OListViewItem::setText( col, text ); else - owarn << "ONamedListViewItem::setText(): Warning! Columntext '" << column << "' not found." << oendl; + owarn << "ONamedListViewItem::setText(): Warning! Columntext '" << column << "' not found." << oendl; } ONamedListViewItem* ONamedListViewItem::find( int column, const QString& text, int recurse ) const { return ( (ONamedListView*) listView() )->find( (ONamedListViewItem*) firstChild(), column, text, recurse ); diff --git a/libopie2/opieui/oselector.cpp b/libopie2/opieui/oselector.cpp index 5f6f10f..05543c5 100644 --- a/libopie2/opieui/oselector.cpp +++ b/libopie2/opieui/oselector.cpp @@ -143,12 +143,14 @@ void OXYSelector::wheelEvent( QWheelEvent *e ) if ( e->orientation() == Qt::Horizontal ) setValues( xValue() + e->delta()/120, yValue() ); else setValues( xValue(), yValue() + e->delta()/120 ); emit valueChanged( xPos, yPos ); + #else + Q_UNUSED( e ) #endif } void OXYSelector::valuesFromPosition( int x, int y, int &xVal, int &yVal ) const { xVal = ( (maxX-minX) * (x-2) ) / ( width()-4 ); diff --git a/libopie2/opieui/owait.cpp b/libopie2/opieui/owait.cpp index 9519888..ec1f25a 100644 --- a/libopie2/opieui/owait.cpp +++ b/libopie2/opieui/owait.cpp @@ -52,12 +52,13 @@ static int frame = 0; * @param dispIcon Display Icon? */ OWait::OWait( QWidget *parent, const char* msg, bool dispIcon ) :QDialog( parent, msg, TRUE, WStyle_Customize ) { + Q_UNUSED( dispIcon ) QHBoxLayout * hbox = new QHBoxLayout( this ); m_lb = new QLabel( this ); m_lb->setBackgroundMode ( NoBackground ); |