[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    kfiledialog crash (directory mode)
From:       Espen Sand <espensa () online ! no>
Date:       1999-09-26 10:18:14
[Download RAW message or body]

For kfile I use a cvs code that is approx 9 days old.

If I open a "Directory view only" filedialog (KFileDialog::getDirectory())
and from that one open the config dialog, I get a seg fault when closing that 
config dialog. 

Reason:
It seems the "hiddenToggle" widget (kfiledialog.cpp) is not created in 
"directory only mode" operation, yet from the code we see that "hiddenToggle" 
is being accessed: (the last print is "C: 2")

(btw: I have played with the config dialog code, using the new DialogBase, which
is not yet committed Result: the config dialog box now resizes properly to a
valid minimum size, I will commit these changes once DialogBase is updated).

<kfiledialog.cpp>
case CONFIGURE_BUTTON: {
	KFileDialogConfigureDlg conf(this, "filedlgconf");
	conf.exec();
	puts("A");
	fileList->widget()->hide();
	puts("B");
	showHidden = c->readBoolEntry("ShowHidden", DefaultShowHidden);
	printf("C: %d\n", hiddenToggle );
	hiddenToggle->setChecked(showHidden);
	puts("D");
	delete boxLayout; // this removes all child layouts too
	puts("E");
	boxLayout = 0;

	// recreate this widget
	delete fileList;
	puts("F");
        fileList = initFileList( wrapper );
	puts("G");
	initGUI(); // add them back to the layout managment
	puts("H");
	fileList->widget()->show();
	puts("I");
	resize(width(), height());
	pathChanged(); // refresh now
	puts("J");
	break;
    }
 

-- 
Espen Sand

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic