author | zecke <zecke> | 2002-11-03 11:03:20 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-03 11:03:20 (UTC) |
commit | 207f7430db6c90e88825ea2bedc9ae1bf68e3d99 (patch) (side-by-side diff) | |
tree | fb69b58f130c0b0a17224989f26aa4af5939b33e | |
parent | 485fae36510cb42690c9df55fae64312b1e656ae (diff) | |
download | opie-207f7430db6c90e88825ea2bedc9ae1bf68e3d99.zip opie-207f7430db6c90e88825ea2bedc9ae1bf68e3d99.tar.gz opie-207f7430db6c90e88825ea2bedc9ae1bf68e3d99.tar.bz2 |
Patch by Simon Hausmann to suit gcc3 needs
many thanks
-rw-r--r-- | libopie/oclickablelabel.cpp | 2 | ||||
-rw-r--r-- | libopie/ofileselector.cc | 9 | ||||
-rw-r--r-- | libopie/ofileselector.h | 2 | ||||
-rw-r--r-- | libopie/ofileselector/odefaultfactories.cpp | 4 | ||||
-rw-r--r-- | libopie/ofileselector/odefaultfactories.h | 1 | ||||
-rw-r--r-- | libopie/ofileselector/ofileselector.cpp | 3 | ||||
-rw-r--r-- | libopie/pim/opimaccessbackend.h | 4 | ||||
-rw-r--r-- | libopie/pim/opimaccesstemplate.h | 10 | ||||
-rw-r--r-- | libopie/pim/orecordlist.h | 4 | ||||
-rw-r--r-- | libopie/pim/otodo.cpp | 2 | ||||
-rw-r--r-- | libopie2/opiepim/backend/opimaccessbackend.h | 4 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimaccesstemplate.h | 10 | ||||
-rw-r--r-- | libopie2/opiepim/orecordlist.h | 4 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.cpp | 2 |
14 files changed, 28 insertions, 33 deletions
diff --git a/libopie/oclickablelabel.cpp b/libopie/oclickablelabel.cpp index 43a0524..5768529 100644 --- a/libopie/oclickablelabel.cpp +++ b/libopie/oclickablelabel.cpp @@ -8,25 +8,25 @@ OClickableLabel::OClickableLabel(QWidget* parent, { textInverted=false; isToggle=false; isDown=false; showState(false); setFrameShadow(Sunken); } void OClickableLabel::setToggleButton(bool t) { isToggle=t; } -void OClickableLabel::mousePressEvent( QMouseEvent *e ) { +void OClickableLabel::mousePressEvent( QMouseEvent * /*e*/ ) { if (isToggle && isDown) { showState(false); } else { showState(true); } } void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { if (rect().contains(e->pos()) && isToggle) isDown=!isDown; if (isToggle && isDown) { showState(true); diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index 9534667..6a6a300 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc @@ -366,25 +366,25 @@ QStringList OFileSelector::selectedPaths() const QStringList list; list << selectedPath(); return list; } QString OFileSelector::directory()const { if( m_selector == NORMAL ) return QPEApplication::documentDir(); return QDir(m_currentDir).absPath(); } -int OFileSelector::fileCount() +int OFileSelector::fileCount() const { int count; switch( m_selector ){ case NORMAL: count = m_select->fileCount(); break; //case CUSTOM: case EXTENDED: case EXTENDED_ALL: default: count = m_View->childCount(); break; @@ -673,25 +673,25 @@ void OFileSelector::initVars() m_lay = 0; m_Oselector = 0; m_boxToolbar = 0; m_boxOk = 0; m_boxName = 0; m_boxView = 0; m_custom = 0; m_edit = 0; m_fnLabel = 0; m_new = 0; m_close = 0; } -void OFileSelector::addFile(const QString &mime, QFileInfo *info, bool symlink) +void OFileSelector::addFile(const QString &/*mime*/, QFileInfo *info, bool symlink) { if(!m_files) return; // if( !compliesMime(info->absFilePath(), mime ) ) // return; MimeType type( info->absFilePath() ); if (!compliesMime( type.id() ) ) return; QPixmap pix = type.pixmap(); QString dir; QString name; @@ -705,25 +705,25 @@ void OFileSelector::addFile(const QString &mime, QFileInfo *info, bool symlink) name = info->fileName(); if( ( m_mode == OPEN && !info->isReadable() )|| ( m_mode == SAVE && !info->isWritable() ) ){ locked = true; pix = Resource::loadPixmap("locked"); } } new OFileSelectorItem( m_View, pix, name, info->lastModified().toString(), QString::number( info->size() ), dir, locked ); } -void OFileSelector::addDir(const QString &mime, QFileInfo *info, bool symlink ) +void OFileSelector::addDir(const QString &/*mime*/, QFileInfo *info, bool symlink ) { if(!m_dir) return; if( m_selector == EXTENDED_ALL || m_selector == EXTENDED ){ bool locked = false; QString name; QPixmap pix; if( ( m_mode == OPEN && !info->isReadable() ) || ( m_mode == SAVE && !info->isWritable() ) ){ locked = true; if( symlink ) pix = (*m_pixmaps)["symlinkedlocked"]; else @@ -1009,25 +1009,24 @@ bool OFileSelector::compliesMime( const QString& mime ) { else qWarning("found"), list = it.data(); } // dump it now //for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { // qWarning( "%s", (*it).latin1() ); //} if ( list.contains(mime) ) return true; qWarning("list doesn't contain it "); QStringList::Iterator it2; int pos; - int pos2; for ( it2 = list.begin(); it2 != list.end(); ++it2 ) { pos = (*it2).findRev("/*"); if ( pos >= 0 ) { if ( mime.contains( (*it2).left(pos) ) ) return true; } } return false; } void OFileSelector::slotFileSelected( const QString &string ) { if( m_shLne ) m_edit->setText( string ); @@ -1096,25 +1095,25 @@ void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint & } } } void OFileSelector::slotRightButton(int button, QListViewItem *item, const QPoint &, int ) { if( item == 0 ) return; if( button != Qt::RightButton ) return; slotContextMenu( item ); } -void OFileSelector::slotContextMenu( QListViewItem *item) +void OFileSelector::slotContextMenu( QListViewItem * /*item*/) { } void OFileSelector::slotChangedDir() { OFileSelectorItem *sel = (OFileSelectorItem*)m_View->currentItem(); if(sel->isDir() ){ QStringList str = QStringList::split("->", sel->text(1) ); cd( sel->directory() + "/" + str[0].stripWhiteSpace() ); } } void OFileSelector::slotOpen() diff --git a/libopie/ofileselector.h b/libopie/ofileselector.h index f2d5f84..17c494e 100644 --- a/libopie/ofileselector.h +++ b/libopie/ofileselector.h @@ -171,25 +171,25 @@ class OFileSelector : public QWidget { // void updateLay(); void reparse(); // re reads the dir QString selectedName( )const; QStringList selectedNames()const; QString selectedPath() const; QStringList selectedPaths() const; QString directory()const; - int fileCount(); + int fileCount() const; /* the user needs to delete it */ DocLnk selectedDocument()const; /* the user needs to delete it */ QValueList<DocLnk> selectedDocuments()const; signals: void fileSelected( const DocLnk & ); void fileSelected( const QString & ); void dirSelected(const QString &dir ); void closeMe(); void ok(); diff --git a/libopie/ofileselector/odefaultfactories.cpp b/libopie/ofileselector/odefaultfactories.cpp index c8efffb..2f8ef9b 100644 --- a/libopie/ofileselector/odefaultfactories.cpp +++ b/libopie/ofileselector/odefaultfactories.cpp @@ -1,23 +1,19 @@ #include "ofilelistview.h" -#include "ofileiconview.h" #include "olocallister.h" #include "odefaultfactories.h" extern "C" { - OFileView* newFileIconView( OFileSelector* sel, QWidget* parent ) { - return new OFileIconView( parent, sel ); - } OFileView* newFileListView( OFileSelector* sel, QWidget* par ) { return new OFileListView(par, sel ); } OLister* newLocalLister( OFileSelector* sel) { return new OLocalLister( sel ); } }; diff --git a/libopie/ofileselector/odefaultfactories.h b/libopie/ofileselector/odefaultfactories.h index b4c35af..0cc90e5 100644 --- a/libopie/ofileselector/odefaultfactories.h +++ b/libopie/ofileselector/odefaultfactories.h @@ -1,17 +1,16 @@ #ifndef OPIE_DEFAULT_FACTORIES_H #define OPIE_DEFAULT_FACTORIES_H #include "ofilefactory.h" extern "C" { - OFileView* newFileIconView( OFileSelector*, QWidget* parent ); OFileView* newFileListView( OFileSelector*, QWidget* parent ); OLister* newLocalLister(OFileSelector* ); }; #endif diff --git a/libopie/ofileselector/ofileselector.cpp b/libopie/ofileselector/ofileselector.cpp index c6e923f..abc2889 100644 --- a/libopie/ofileselector/ofileselector.cpp +++ b/libopie/ofileselector/ofileselector.cpp @@ -967,25 +967,26 @@ void OFileSelector::setView( const QString& lis ) { m_fileView = factory()->view( list, this, m_mainView ); m_mainView->setWidget( m_fileView->widget() ); reparse(); } } /* * the factory */ void OFileSelector::initFactory() { m_fileFactory = new OFileFactory(); m_fileFactory->addLister(tr("Files"), newLocalLister ); m_fileFactory->addView(tr("List View"), newFileListView ); - m_fileFactory->addView(tr("Documents"), newFileIconView ); + /* dummy entry */ + m_fileFactory->addView(tr("Documents"), newFileListView ); } void OFileSelector::fillList() { qWarning("fill list"); if (!m_viewCheck ) return; m_viewCheck->clear(); QStringList list = factory()->views(); qWarning("views: " + list.join(";") ); for (QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { qWarning( (*it) ); diff --git a/libopie/pim/opimaccessbackend.h b/libopie/pim/opimaccessbackend.h index 0bd2723..4f00bc9 100644 --- a/libopie/pim/opimaccessbackend.h +++ b/libopie/pim/opimaccessbackend.h @@ -48,25 +48,25 @@ public: * queryByExample for T with the SortOrder * sort */ virtual QArray<int> queryByExample( const T& t, int sort ) = 0; /** * find the OPimRecord with uid @param uid * returns T and T.isEmpty() if nothing was found */ virtual T find(int uid )const = 0; virtual T find(int uid, const QArray<int>& items, - uint current, Frontend::CacheDirection )const ; + uint current, typename Frontend::CacheDirection )const ; /** * clear the back end */ virtual void clear() = 0; /** * add T */ virtual bool add( const T& t ) = 0; /** * remove @@ -118,24 +118,24 @@ void OPimAccessBackend<T>::setFrontend( Frontend* fr ) { template <class T> void OPimAccessBackend<T>::cache( const T& t )const { if (m_front ) m_front->cache( t ); } template <class T> void OPimAccessBackend<T>::setSaneCacheSize( int size) { if (m_front ) m_front->setSaneCacheSize( size ); } template <class T> T OPimAccessBackend<T>::find( int uid, const QArray<int>&, - uint, Frontend::CacheDirection )const { + uint, typename Frontend::CacheDirection )const { return find( uid ); } template <class T> void OPimAccessBackend<T>::setReadAhead( uint count ) { m_read = count; } template <class T> uint OPimAccessBackend<T>::readAhead()const { return m_read; } #endif diff --git a/libopie/pim/opimaccesstemplate.h b/libopie/pim/opimaccesstemplate.h index c5523a8..6de68b1 100644 --- a/libopie/pim/opimaccesstemplate.h +++ b/libopie/pim/opimaccesstemplate.h @@ -70,25 +70,25 @@ public: */ virtual List queryByExample( const T& t, int querySettings ); /** * find the OPimRecord uid */ virtual T find( int uid )const; /** * read ahead cache find method ;) */ virtual T find( int uid, const QArray<int>&, - uint current, CacheDirection dir = Forward )const; + uint current, typename OTemplateBase<T>::CacheDirection dir = OTemplateBase<T>::Forward )const; /* invalidate cache here */ /** * clears the backend and invalidates the backend */ virtual void clear() ; /** * add T to the backend * @param t The item to add. * @return <i>true</i> if added successfully. */ @@ -156,46 +156,46 @@ bool OPimAccessTemplate<T>::load() { return m_backEnd->load(); } template <class T> bool OPimAccessTemplate<T>::reload() { invalidateCache(); // zecke: I think this should be added (se) return m_backEnd->reload(); } template <class T> bool OPimAccessTemplate<T>::save() { return m_backEnd->save(); } template <class T> -OPimAccessTemplate<T>::List OPimAccessTemplate<T>::allRecords()const { +typename OPimAccessTemplate<T>::List OPimAccessTemplate<T>::allRecords()const { QArray<int> ints = m_backEnd->allRecords(); List lis(ints, this ); return lis; } template <class T> -OPimAccessTemplate<T>::List +typename OPimAccessTemplate<T>::List OPimAccessTemplate<T>::queryByExample( const T& t, int sortOrder ) { QArray<int> ints = m_backEnd->queryByExample( t, sortOrder ); List lis(ints, this ); return lis; } template <class T> T OPimAccessTemplate<T>::find( int uid ) const{ T t = m_backEnd->find( uid ); cache( t ); return t; } template <class T> T OPimAccessTemplate<T>::find( int uid, const QArray<int>& ar, - uint current, CacheDirection dir )const { + uint current, typename OTemplateBase<T>::CacheDirection dir )const { /* * better do T.isEmpty() * after a find this way we would * avoid two finds in QCache... */ // qWarning("find it now %d", uid ); if (m_cache.contains( uid ) ) { return m_cache.find( uid ); } T t = m_backEnd->find( uid, ar, current, dir ); cache( t ); @@ -221,25 +221,25 @@ bool OPimAccessTemplate<T>::remove( int uid ) { return m_backEnd->remove( uid ); } template <class T> bool OPimAccessTemplate<T>::replace( const T& t ) { m_cache.replace( t ); return m_backEnd->replace( t ); } template <class T> void OPimAccessTemplate<T>::invalidateCache() { m_cache.invalidate(); } template <class T> -OPimAccessTemplate<T>::BackEnd* OPimAccessTemplate<T>::backEnd() { +typename OPimAccessTemplate<T>::BackEnd* OPimAccessTemplate<T>::backEnd() { return m_backEnd; } template <class T> bool OPimAccessTemplate<T>::wasChangedExternally()const { return false; } template <class T> void OPimAccessTemplate<T>::setBackEnd( BackEnd* end ) { m_backEnd = end; if (m_backEnd ) m_backEnd->setFrontend( this ); } diff --git a/libopie/pim/orecordlist.h b/libopie/pim/orecordlist.h index 8ed41e2..b77a4ab 100644 --- a/libopie/pim/orecordlist.h +++ b/libopie/pim/orecordlist.h @@ -238,30 +238,30 @@ uint ORecordListIterator<T>::count()const { } template <class T> ORecordList<T>::ORecordList( const QArray<int>& ids, const Base* acc ) : m_ids( ids ), m_acc( acc ) { } template <class T> ORecordList<T>::~ORecordList() { /* nothing to do here */ } template <class T> -ORecordList<T>::Iterator ORecordList<T>::begin() { +typename ORecordList<T>::Iterator ORecordList<T>::begin() { Iterator it( m_ids, m_acc ); return it; } template <class T> -ORecordList<T>::Iterator ORecordList<T>::end() { +typename ORecordList<T>::Iterator ORecordList<T>::end() { Iterator it( m_ids, m_acc ); it.m_end = true; it.m_current = m_ids.count(); return it; } template <class T> uint ORecordList<T>::count()const { return m_ids.count(); } template <class T> T ORecordList<T>::operator[]( uint i ) { diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp index 0d5b1d3..4d5cb79 100644 --- a/libopie/pim/otodo.cpp +++ b/libopie/pim/otodo.cpp @@ -390,16 +390,16 @@ void OTodo::copy( OTodoData* src, OTodoData* dest ) { dest->desc = src->desc; dest->sum = src->sum; dest->extra = src->extra; dest->prog = src->prog; dest->hasAlarmDateTime = src->hasAlarmDateTime; dest->alarmDateTime = src->alarmDateTime; dest->state = src->state; dest->recur = src->recur; } QString OTodo::type() const { return QString::fromLatin1("OTodo"); } -QString OTodo::recordField(int id )const { +QString OTodo::recordField(int /*id*/ )const { return QString::null; } diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h index 0bd2723..4f00bc9 100644 --- a/libopie2/opiepim/backend/opimaccessbackend.h +++ b/libopie2/opiepim/backend/opimaccessbackend.h @@ -48,25 +48,25 @@ public: * queryByExample for T with the SortOrder * sort */ virtual QArray<int> queryByExample( const T& t, int sort ) = 0; /** * find the OPimRecord with uid @param uid * returns T and T.isEmpty() if nothing was found */ virtual T find(int uid )const = 0; virtual T find(int uid, const QArray<int>& items, - uint current, Frontend::CacheDirection )const ; + uint current, typename Frontend::CacheDirection )const ; /** * clear the back end */ virtual void clear() = 0; /** * add T */ virtual bool add( const T& t ) = 0; /** * remove @@ -118,24 +118,24 @@ void OPimAccessBackend<T>::setFrontend( Frontend* fr ) { template <class T> void OPimAccessBackend<T>::cache( const T& t )const { if (m_front ) m_front->cache( t ); } template <class T> void OPimAccessBackend<T>::setSaneCacheSize( int size) { if (m_front ) m_front->setSaneCacheSize( size ); } template <class T> T OPimAccessBackend<T>::find( int uid, const QArray<int>&, - uint, Frontend::CacheDirection )const { + uint, typename Frontend::CacheDirection )const { return find( uid ); } template <class T> void OPimAccessBackend<T>::setReadAhead( uint count ) { m_read = count; } template <class T> uint OPimAccessBackend<T>::readAhead()const { return m_read; } #endif diff --git a/libopie2/opiepim/core/opimaccesstemplate.h b/libopie2/opiepim/core/opimaccesstemplate.h index c5523a8..6de68b1 100644 --- a/libopie2/opiepim/core/opimaccesstemplate.h +++ b/libopie2/opiepim/core/opimaccesstemplate.h @@ -70,25 +70,25 @@ public: */ virtual List queryByExample( const T& t, int querySettings ); /** * find the OPimRecord uid */ virtual T find( int uid )const; /** * read ahead cache find method ;) */ virtual T find( int uid, const QArray<int>&, - uint current, CacheDirection dir = Forward )const; + uint current, typename OTemplateBase<T>::CacheDirection dir = OTemplateBase<T>::Forward )const; /* invalidate cache here */ /** * clears the backend and invalidates the backend */ virtual void clear() ; /** * add T to the backend * @param t The item to add. * @return <i>true</i> if added successfully. */ @@ -156,46 +156,46 @@ bool OPimAccessTemplate<T>::load() { return m_backEnd->load(); } template <class T> bool OPimAccessTemplate<T>::reload() { invalidateCache(); // zecke: I think this should be added (se) return m_backEnd->reload(); } template <class T> bool OPimAccessTemplate<T>::save() { return m_backEnd->save(); } template <class T> -OPimAccessTemplate<T>::List OPimAccessTemplate<T>::allRecords()const { +typename OPimAccessTemplate<T>::List OPimAccessTemplate<T>::allRecords()const { QArray<int> ints = m_backEnd->allRecords(); List lis(ints, this ); return lis; } template <class T> -OPimAccessTemplate<T>::List +typename OPimAccessTemplate<T>::List OPimAccessTemplate<T>::queryByExample( const T& t, int sortOrder ) { QArray<int> ints = m_backEnd->queryByExample( t, sortOrder ); List lis(ints, this ); return lis; } template <class T> T OPimAccessTemplate<T>::find( int uid ) const{ T t = m_backEnd->find( uid ); cache( t ); return t; } template <class T> T OPimAccessTemplate<T>::find( int uid, const QArray<int>& ar, - uint current, CacheDirection dir )const { + uint current, typename OTemplateBase<T>::CacheDirection dir )const { /* * better do T.isEmpty() * after a find this way we would * avoid two finds in QCache... */ // qWarning("find it now %d", uid ); if (m_cache.contains( uid ) ) { return m_cache.find( uid ); } T t = m_backEnd->find( uid, ar, current, dir ); cache( t ); @@ -221,25 +221,25 @@ bool OPimAccessTemplate<T>::remove( int uid ) { return m_backEnd->remove( uid ); } template <class T> bool OPimAccessTemplate<T>::replace( const T& t ) { m_cache.replace( t ); return m_backEnd->replace( t ); } template <class T> void OPimAccessTemplate<T>::invalidateCache() { m_cache.invalidate(); } template <class T> -OPimAccessTemplate<T>::BackEnd* OPimAccessTemplate<T>::backEnd() { +typename OPimAccessTemplate<T>::BackEnd* OPimAccessTemplate<T>::backEnd() { return m_backEnd; } template <class T> bool OPimAccessTemplate<T>::wasChangedExternally()const { return false; } template <class T> void OPimAccessTemplate<T>::setBackEnd( BackEnd* end ) { m_backEnd = end; if (m_backEnd ) m_backEnd->setFrontend( this ); } diff --git a/libopie2/opiepim/orecordlist.h b/libopie2/opiepim/orecordlist.h index 8ed41e2..b77a4ab 100644 --- a/libopie2/opiepim/orecordlist.h +++ b/libopie2/opiepim/orecordlist.h @@ -238,30 +238,30 @@ uint ORecordListIterator<T>::count()const { } template <class T> ORecordList<T>::ORecordList( const QArray<int>& ids, const Base* acc ) : m_ids( ids ), m_acc( acc ) { } template <class T> ORecordList<T>::~ORecordList() { /* nothing to do here */ } template <class T> -ORecordList<T>::Iterator ORecordList<T>::begin() { +typename ORecordList<T>::Iterator ORecordList<T>::begin() { Iterator it( m_ids, m_acc ); return it; } template <class T> -ORecordList<T>::Iterator ORecordList<T>::end() { +typename ORecordList<T>::Iterator ORecordList<T>::end() { Iterator it( m_ids, m_acc ); it.m_end = true; it.m_current = m_ids.count(); return it; } template <class T> uint ORecordList<T>::count()const { return m_ids.count(); } template <class T> T ORecordList<T>::operator[]( uint i ) { diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index 0d5b1d3..4d5cb79 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp @@ -390,16 +390,16 @@ void OTodo::copy( OTodoData* src, OTodoData* dest ) { dest->desc = src->desc; dest->sum = src->sum; dest->extra = src->extra; dest->prog = src->prog; dest->hasAlarmDateTime = src->hasAlarmDateTime; dest->alarmDateTime = src->alarmDateTime; dest->state = src->state; dest->recur = src->recur; } QString OTodo::type() const { return QString::fromLatin1("OTodo"); } -QString OTodo::recordField(int id )const { +QString OTodo::recordField(int /*id*/ )const { return QString::null; } |