Commit 0dfdbb7f authored by Michael Reeves's avatar Michael Reeves

*fix bug where url selections not recorded.

*QFileDialog program to crash on exit inside Qt
--Qt bug.
parent ebb41d43
......@@ -20,7 +20,7 @@
#include <vector>
#include <cstdlib>
#include <klocalizedstring.h>
#include <KLocalizedString>
#include <QTemporaryFile>
#include <kio/global.h>
#include <kio/job.h>
......
......@@ -22,7 +22,7 @@
#define OPTION_DIALOG_H
#include <kpagedialog.h>
#include <KPageDialog>
#include <QStringList>
#include <list>
......
......@@ -233,9 +233,17 @@ void OpenDialog::selectURL( QComboBox* pLine, bool bDir, int i, bool bSave ) {
current = m_pLineA->currentText();
}
QUrl newURL = bDir ? QFileDialog::getExistingDirectoryUrl( this, QString(), current)
: bSave ? QFileDialog::getSaveFileUrl( this, QString(), current, "all/allfiles")
: QFileDialog::getOpenFileUrl( this, QString(), current, "all/allfiles");
QUrl newURL = bDir ? QFileDialog::getExistingDirectoryUrl( this, QString("t"), QUrl::fromUserInput(current))
: bSave ? QFileDialog::getSaveFileUrl( this, QString(""), QUrl::fromUserInput(current), QLatin1Literal("all/allfiles") )
: QFileDialog::getOpenFileUrl( this, QString(""), QUrl::fromUserInput(current), QLatin1Literal("all/allfiles") );
if( !newURL.isEmpty() ) {
/*
Since we are selecting a directory open in the parent directory
not the one selected.
*/
//QFileDialog::setStartDir( KIO::upUrl( newURL ) );
pLine->setEditText( newURL.url() );
}
}
void OpenDialog::selectFileA() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment