[Kget] [Bug 243093] Kget crashes when downloading repeatedly

Matthias Fuchs mat69 at gmx.net
Wed Jun 30 12:30:34 CEST 2010


https://bugs.kde.org/show_bug.cgi?id=243093


Matthias Fuchs <mat69 at gmx.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |faure at kde.org,
                   |                            |mat69 at gmx.net




--- Comment #2 from Matthias Fuchs <mat69 gmx net>  2010-06-30 12:30:30 ---
I am afraid we can't fix this for 4.4 since there won't be a new release of
that, though we hope to fix this for 4.5. Sorry for the inconvenience this bug
caused.

####
Dev-info

This is the code where it crashes:

kget.cpp:
KUrl KGet::destFileInputDialog(QString destDir, const QString&
suggestedFileName) // krazy:exclude=passbyvalue
{
    if (destDir.isEmpty())
        destDir = generalDestDir();

    // open the filedialog for confirmation
    QPointer<KFileDialog> dlg = new KFileDialog(destDir, QString(), 0, 0);
    dlg->setCaption(i18n("Save As"));
    dlg->setOperationMode(KFileDialog::Saving);
    dlg->setMode(KFile::File | KFile::LocalOnly);

    // Use the destination name if not empty...
    if (!suggestedFileName.isEmpty())
        dlg->setSelection(suggestedFileName);

    KUrl destUrl;
    if (dlg->exec() != QDialog::Rejected){
        destUrl = dlg->selectedUrl();
        Settings::setLastDirectory(destUrl.directory(KUrl::ObeyTrailingSlash));
    }

    delete dlg;
    return destUrl;
}

Line 883 is the one with "delete dlg;".
So maybe the way we use KFileDialog is compeletly wrong (?) and we will use one
of the static method as (hopefully) workaround, though I still think that this
is a bug.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Kget mailing list