From f79126f5ba0b1d1520e5fb07716ffe9e2479aedf Mon Sep 17 00:00:00 2001 From: zecke Date: Sun, 15 Sep 2002 20:00:57 +0000 Subject: Make it compile but it's not working yet --- (limited to 'libopie/ofileselector/ofilelistview.cpp') diff --git a/libopie/ofileselector/ofilelistview.cpp b/libopie/ofileselector/ofilelistview.cpp index 0c7d45b..7108a5b 100644 --- a/libopie/ofileselector/ofilelistview.cpp +++ b/libopie/ofileselector/ofilelistview.cpp @@ -1,4 +1,7 @@ +#include +#include + #include "ofileselector.h" #include "ofileselectoritem.h" #include "ofilelistview.h" @@ -15,7 +18,7 @@ OFileListView::~OFileListView() { void OFileListView::clear() { QListView::clear(); } -void OFileListView::addFile( const QString& mime, +void OFileListView::addFile( const QString&, QFileInfo* info, bool isSymlink ) { MimeType type( info->absFilePath() ); @@ -33,8 +36,8 @@ void OFileListView::addFile( const QString& mime, name = info->fileName() + " -> " +info->dirPath() + "/" + info->readLink(); else { name = info->fileName(); - if( ( selector()->mode() == Open && !info->isReadable() )|| - ( selector()->mode() == Save && !info->isWritable() ) ){ + if( ( selector()->mode() == OFileSelector::Open && !info->isReadable() ) || + ( selector()->mode() == OFileSelector::Save && !info->isWritable() ) ){ locked = true; pix = Resource::loadPixmap("locked"); } @@ -48,15 +51,15 @@ void OFileListView::addFile( const QString& /*mime*/, const QString& /*dir*/, const QString& /*file*/, bool /*isSyml*/ ) { } -void OFileListView::addDir( const QString& mime, - QFileInfo* info, bool isSym ) { +void OFileListView::addDir( const QString&, + QFileInfo* info, bool symlink ) { bool locked = false; QString name; QPixmap pix; - if( ( selector()->mode() == Open && !info->isReadable() ) || - ( selector()->mode() == Save && !info->isWritable() ) ){ + if( ( selector()->mode() == OFileSelector::Open && !info->isReadable() ) || + ( selector()->mode() == OFileSelector::Save && !info->isWritable() ) ){ locked = true; @@ -78,17 +81,17 @@ void OFileListView::addDir( const QString& mime, true ); } -void OFileListView::addDir( const QString& mime, const QString& dir, - const QString& file, bool ) { +void OFileListView::addDir( const QString& /*mime*/, const QString& /*dir*/, + const QString& /*file*/, bool ) { } -void OFileListView::addSymlink( const QString& mime, - QFileInfo* info, - bool isSym ) { +void OFileListView::addSymlink( const QString& /*mime*/, + QFileInfo* /*info*/, + bool /*isSym*/ ) { } -void OFileListView::addSymlink( const QString& mime, const QString& path, - const QString& file, bool isSym ) { +void OFileListView::addSymlink( const QString& /*mime*/, const QString& /*path*/, + const QString& /*file*/, bool /*isSym*/ ) { } void OFileListView::cd( const QString& ) { @@ -105,13 +108,17 @@ QString OFileListView::selectedName()const{ return item->text( 1 ); } QStringList OFileListView::selectedNames()const { - + QStringList list; + list << selectedName(); + return list; } QString OFileListView::selectedPath()const { - + return QString::null; } -QString OFileListView::selectedPaths()const { - +QStringList OFileListView::selectedPaths()const { + QStringList list; + list << selectedPath(); + return list; } int OFileListView::fileCount() { return childCount(); -- cgit v0.9.0.2