Bugs,bugs,bugs...

Nikolay Liber nikolay_liber at mail.ru
Fri Jul 23 06:51:05 UTC 1999


Hi 

There are two bugs old and new one.
I'll begin from old one.

Yesterday Sandy commit my patch (bugfixes 
in appwizard) but with his own chages 
(actualy I couldn't find my code there). And it 
does not completly fix bug.

Example: Default proj. dir. "/home/fw/" type proj. name
"aaaaaaaaaaaaaaaa" (11 symbols or more) then change p. dir
to /home/fw/p for example (length of p. name must be greater
than length of p. dir) and try to create project. You'll
see MB "Directory /home/fw/p does not exist"

Problem resides in CKAppWizard::slotOkClicked()

Original code:

  QString direct = directoryline->text();
  QString a = directoryline->text();
  if (a.right(1) == "/") { a.resize(a.length()); }
  QString b = nameline->text();
  direct.resize (a.length() - b.length());
  
//(a.length() - b.length()) is not length of proj. subdir
//if length of subdir and lenght of prj name not equal

  dir.setPath(direct);

My patch:
 
  QString direct = directoryline->text();
  if (direct.right(1) == "/") { direct.resize(direct.length()); }
  direct.resize (direct.length() - (direct.length() - direct.findRev('/') - 1));
  //Correct subdir length
  //And I couldn't find any reason to keep
  //these QStrings a and b ;)
  dir.setPath(direct);
  
And no need to change anything else

Another problem: If you type prj subdir with
length differ than length of prj name 
future changes prj name or choosing different
dir by choose dir button will cause changes of
subdir. imho it couldn't be so.
This bug??? wasn't fixed at all yet :(
my patch fixes it in ver19990719-20 but does
not work at all in 22 I don't know why :(

AND NEW BUG!!!!!!!!!!
CKDevelop::slotAddExistingFiles() don't
checks if files he add are existing
And can add not existing files 

I simple add:

    if (!QFile::exists((const char*)file)) {
        KMsgBox::message(this,i18n("Attention"),file +i18n("\n\nFile does not exist!"));
        continue;
    }
to correct it (fixed ckdevelop_project.cpp attached)

Here is fixed ckdevelop_project.cpp and ckappwizard.cpp

So thats all.

P.S. Sandy please just replace these files with my ones
     and DON'T WASTE YOUR TIME this patch really WORKS ;)
     
           With best regards Nikolay Liber
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdev-bugfix.tar.gz
Type: application/x-gzip-compressed
Size: 19470 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/19990723/c2d690c0/attachment.bin>


More information about the KDevelop mailing list