Commit 64d76fa2 authored by Wolfgang Bauer's avatar Wolfgang Bauer

Fix changing the destination in the "New Download" dialog

Amongst other things, checkInput() sets the destination according to the
value in the destination text field.
It is supposed to be called whenever the text in some input field
changes, but this doesn't seem to work for the destination field for
some reason.
So as a workaround it is called explicitly now when the dialog is
accepted.

This fixes the problem that downloads always ended up in the default
folder, the entered/selected destination was ignored.
parent a2dd36a5
......@@ -77,7 +77,7 @@ NewTransferDialog::NewTransferDialog(QWidget *parent)
connect(ui.groupComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(setDefaultDestination()));
connect(ui.urlRequester, SIGNAL(textChanged(QString)), this, SLOT(setDefaultDestination()));
connect(ui.destRequester, SIGNAL(textChanged(QString)), this, SLOT(inputTimer()));
connect(ui.destRequester, SIGNAL(textChanged(QString)), this, SLOT(inputTimer())); //FIXME for some reason this signal never seems to be emitted
connect(ui.urlRequester, SIGNAL(textChanged(QString)), this, SLOT(inputTimer()));
connect(ui.listWidget, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(inputTimer()));
connect(this, SIGNAL(finished(int)), this, SLOT(slotFinished(int)));
......@@ -397,6 +397,10 @@ void NewTransferDialog::dialogAccepted()
{
qCDebug(KGET_DEBUG) << "Dialog accepted.";
//FIXME checkInput() shouldn't have to be called here, it should actually be called whenever the text in the input fields changes.
// For some reason that doesn't work for the destination field though, so call it explicitly here as a workaround for now, to make the choice be respected. (checkInput() sets m_destination accordingly)
checkInput();
//an existing transfer has been specified and since ok was clicked, it was chosen to be overwritten
if (m_existingTransfer) {
qCDebug(KGET_DEBUG) << "Removing existing transfer:" << m_existingTransfer;
......
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