add an accepted signal, differentiate between accepted and finished; more qdialog-like and lets the widget react to a failed file dialog
svn path=/trunk/KDE/kdebase/runtime/; revision=1051186
This commit is contained in:
parent
e968acb6e6
commit
86b12fc8cb
@ -28,12 +28,12 @@ FileDialogProxy::FileDialogProxy(KFileDialog::OperationMode mode, QObject *paren
|
||||
{
|
||||
kDebug() << "hello beautiful";
|
||||
m_dialog->setOperationMode(mode);
|
||||
connect(m_dialog, SIGNAL(okClicked()), this, SLOT(dialogFinished()));
|
||||
connect(m_dialog, SIGNAL(finished()), this, SLOT(dialogFinished()));
|
||||
}
|
||||
|
||||
FileDialogProxy::~FileDialogProxy()
|
||||
{
|
||||
kDebug() << "bye bye";
|
||||
kDebug() << this << "bye bye";
|
||||
delete m_dialog;
|
||||
}
|
||||
|
||||
@ -126,6 +126,9 @@ void FileDialogProxy::show()
|
||||
|
||||
void FileDialogProxy::dialogFinished()
|
||||
{
|
||||
if (m_dialog->result() == QDialog::Accepted) {
|
||||
emit accepted(this);
|
||||
}
|
||||
emit finished(this);
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,7 @@ public Q_SLOTS:
|
||||
void show();
|
||||
|
||||
Q_SIGNALS:
|
||||
void accepted(FileDialogProxy *);
|
||||
void finished(FileDialogProxy *);
|
||||
|
||||
private Q_SLOTS:
|
||||
|
Loading…
Reference in New Issue
Block a user