diff --git a/kfind/kfmenu.cpp b/kfind/kfmenu.cpp index b75e678a48..0c4164a766 100644 --- a/kfind/kfmenu.cpp +++ b/kfind/kfmenu.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -72,7 +73,7 @@ KfindMenu::KfindMenu( QWidget *parent, const char *name ) CHECK_PTR( options ); // options->setFont(menu_font ); - int prefs = options->insertItem("Preferences ...",this,SIGNAL(prefs())); + options->insertItem("Preferences ...",this,SIGNAL(prefs())); /* int saving = options->insertItem("Saving " ,this,SIGNAL(saving())); int archives = options->insertItem("Archives " ,this,SIGNAL(archives())); diff --git a/kfind/kfoptions.cpp b/kfind/kfoptions.cpp index fb08b4e1d1..a1d30f4963 100644 --- a/kfind/kfoptions.cpp +++ b/kfind/kfoptions.cpp @@ -39,7 +39,7 @@ extern QList *types; extern KfSaveOptions *saving; extern QList *archivers; -KfOptions::KfOptions( QWidget *parent=0, const char *name=0 ):QTabDialog() +KfOptions::KfOptions( QWidget *parent=0, const char *name=0 ):QTabDialog( parent, name) { resize(400,330); insertPages(); diff --git a/kfind/kftabdlg.cpp b/kfind/kftabdlg.cpp index b2dfff276c..01208dc084 100644 --- a/kfind/kftabdlg.cpp +++ b/kfind/kftabdlg.cpp @@ -227,7 +227,6 @@ void KfindTabDialog::init(const char *searchPath = 0 ) void KfindTabDialog::resizeEvent( QResizeEvent *ev ) { int w = width(); - int h = height(); int wTmp; QRect rTmp; @@ -336,7 +335,7 @@ void KfindTabDialog::enableCheckedEdit() void KfindTabDialog::isCheckedValid() { - int match,len; + int match, len; QRegExp date("[0-9][0-9]?[/][0-9][0-9]?[/][0-9][0-9][0-9][0-9]"); QRegExp r("[0-9]+"); @@ -345,14 +344,14 @@ void KfindTabDialog::isCheckedValid() bool rightDates = TRUE; match = date.match(le[0]->text(), 0,&len); - if ( !(match != -1 && len == strlen(le[0]->text())) ) + if ( !(match != -1 && len == (int)strlen(le[0]->text())) ) rightDates=FALSE; if ( string2Date(le[0]->text()).isNull() ) rightDates=FALSE; match = date.match(le[1]->text(), 0,&len); - if ( !(match != -1 && len == strlen(le[1]->text())) ) + if ( !(match != -1 && len == (int)strlen(le[1]->text())) ) rightDates=FALSE; if ( string2Date(le[1]->text()).isNull() ) @@ -374,7 +373,7 @@ void KfindTabDialog::isCheckedValid() if (prevMonth == TRUE) { match = r.match(le[2]->text(), 0,&len); - if ( !(match != -1 && len == strlen(le[2]->text())) ) + if ( !(match != -1 && len == (int)strlen(le[2]->text())) ) { QMessageBox mb(this,"message box"); mb.setText( "The month(s) value isn't valid!!"); @@ -386,7 +385,7 @@ void KfindTabDialog::isCheckedValid() if (prevDay == TRUE) { match = r.match(le[3]->text(), 0,&len); - if (! (match != -1 && len == strlen(le[3]->text())) ) + if (! (match != -1 && len == (int)strlen(le[3]->text())) ) { QMessageBox mb(this,"message box"); mb.setText( "The day(s) value isn't valid!!"); @@ -403,7 +402,7 @@ void KfindTabDialog::checkSize() QRegExp r("[0-9]+"); match = r.match(sizeEdit->text(), 0,&len); - if ( !(match != -1 && len == strlen(sizeEdit->text())) ) + if ( !(match != -1 && len == (int)strlen(sizeEdit->text())) ) { QMessageBox mb(this,"message box"); mb.setText( "The value in size isn't valid number!!"); diff --git a/kfind/kftypes.cpp b/kfind/kftypes.cpp index fbc7685ed1..4f2b25e1d4 100644 --- a/kfind/kftypes.cpp +++ b/kfind/kftypes.cpp @@ -26,7 +26,7 @@ void KfFileType::initFileTypes( const char* _path ) return; // Loop thru all directory entries - while ( ep = readdir( dp ) ) + while ( ( ep = readdir( dp ) ) != NULL ) { if ( strcmp( ep->d_name, "." ) != 0 && strcmp( ep->d_name, ".." ) != 0 ) { diff --git a/kfind/kftypes.h b/kfind/kftypes.h index b43477e6d5..97e077afdc 100644 --- a/kfind/kftypes.h +++ b/kfind/kftypes.h @@ -50,7 +50,7 @@ public: The return value may be 0L if there is no comment at all. This method does not use _url but some overloading methods do so. */ - virtual QString getComment( const char *_url ) + virtual QString getComment( const char * ) { return QString( comment.data() ); } /// Sets the comment diff --git a/kfind/kfwin.cpp b/kfind/kfwin.cpp index 17f3a1e0aa..35e61b279a 100644 --- a/kfind/kfwin.cpp +++ b/kfind/kfwin.cpp @@ -160,7 +160,7 @@ void KfindWindow::saveResults() item=0; while(item!=items) { - fprintf(results,"%s\n", lbx->text(item),lbx->text(item)); + fprintf(results,"%s\n", lbx->text(item)); item++; }; @@ -209,9 +209,9 @@ void KfindWindow::deleteFiles() else { KFM *PropertiesD= new KFM(); - QFileInfo *fileInfo = new QFileInfo(lbx->text( + /* QFileInfo *fileInfo = new QFileInfo(lbx->text( lbx->currentItem())); - + */ PropertiesD->refreshDirectory(lbx->text(lbx->currentItem())); lbx->removeItem(lbx->currentItem()); }; @@ -242,9 +242,9 @@ void KfindWindow::deleteFiles() else { KFM *PropertiesD= new KFM(); - QFileInfo *fileInfo = new QFileInfo(lbx->text( + /* QFileInfo *fileInfo = new QFileInfo(lbx->text( lbx->currentItem())); - + */ PropertiesD->refreshDirectory(lbx->text(lbx->currentItem())); lbx->removeItem(lbx->currentItem()); }; @@ -258,7 +258,7 @@ void KfindWindow::fileProperties() { KFM *PropertiesD= new KFM(); - QFileInfo *fileInfo = new QFileInfo(lbx->text(lbx->currentItem())); + // QFileInfo *fileInfo = new QFileInfo(lbx->text(lbx->currentItem())); PropertiesD->openProperties(lbx->text(lbx->currentItem())); }; diff --git a/kfind/main.cpp b/kfind/main.cpp index b5ef0c1f79..7f5b2d6c25 100644 --- a/kfind/main.cpp +++ b/kfind/main.cpp @@ -41,8 +41,10 @@ int main( int argc, char ** argv ) break; }; - if (i==argc) - searchPath = getcwd(searchPath.data(),0); + if (i==argc) { + char buffer[1000]; + searchPath = getcwd(buffer, 0); + }; if ( searchPath.isNull() ) searchPath = getenv( "HOME" );