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

List:       kde-devel
Subject:    New feature/bug in KDialogBase or QDialog?
From:       Andreas Nicolai <Andreas.Nicolai () gmx ! net>
Date:       2003-07-15 12:42:49
[Download RAW message or body]

Hi there!

Can anybody (using KDE 3.1.2 and QT 3.1.2) reproduce the following problem?

// ---- snip ----------------
void SettingsTutorial::executePreferencesDlg() {
    // create dialog on demand
    if (m_prefDialog==0)
        m_prefDialog=new PrefDialog(this);
    if (m_prefDialog->exec()==QDialog::Accepted)
        applyPreferences();
};
// ---- snip ----------------

m_prefDialog is a pointer to a PrefDialog, which inherits KDialogBase.

Now the following happens:

First time the executePreferecesDlg() function is called, m_prefDialog is 
still 0, so a new dialog get's created and the pointer is stored in 
m_prefDialog. The dialog is executed and everything's well.

The second (and any following) time the function gets called the dialog exists 
already and only m_prefDialog->exec() will be called. What happens now is, 
that the dialog is shown and immediately closed again (results in a 
flickering appearance).


This worked in my KDE CVS version (2 months ago) as expected, but now it seems 
to bug. I believe that the dialog stores the exit code internally and when it 
gets executed again, it "believes" that the user has closed the dialog 
already and returns. 

Can anybody help me with this (reproduce the bug, or offer an explaination?)

Thanks in advance
Andreas


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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