Coolo: I fixed a little bug and deleted some warnings.

Miroslav told me, that he has currently no time.

svn path=/trunk/kdebase/kfind/; revision=188
This commit is contained in:
Stephan Kulow 1997-05-18 12:34:09 +00:00
parent 2cf41a965c
commit 72bda9bb0a
7 changed files with 21 additions and 19 deletions

View file

@ -13,6 +13,7 @@
#include <qapp.h>
#include <stdio.h>
#include <qaccel.h>
#include <stdlib.h>
#include <kmsgbox.h>
@ -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()));

View file

@ -39,7 +39,7 @@ extern QList<KfFileType> *types;
extern KfSaveOptions *saving;
extern QList<KfArchiver> *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();

View file

@ -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!!");

View file

@ -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 )
{

View file

@ -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

View file

@ -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()));
};

View file

@ -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" );