Bug 92034 - KFileDialog::getSaveURL() doesn't say if a file already exists
Summary: KFileDialog::getSaveURL() doesn't say if a file already exists
Status: RESOLVED DUPLICATE of bug 102972
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: kfile (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Carsten Pfeiffer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-24 22:13 UTC by Sebastien
Modified: 2005-06-11 12:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastien 2004-10-24 22:13:52 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Compiled From Sources

When using KFileDialog to get a save url or file, if I select an existing file the save dialog don't show a confirmation message to ask me if I want to overwrite the existing file or not.

Perhapse I haven't searched enoutgh (because it's strange KDE doesn't provide such parameter), but I haven't found any parameter to ask confirmation.

So, it's what I do:

    KURL url;
    bool tryAgain = true;
    while (tryAgain)
    {
        url = KFileDialog::getSaveURL();

        if (url.isEmpty())
        {
            tryAgain = false;
        }

        if (!KIO::NetAccess::exists(url, true, this) ||
            KMessageBox::warningYesNo(this, "<qt>" + i18n("The file <strong>%1</strong> already exists. Do you wish to overwrite it?").arg(url.prettyURL()) + "</qt>", i18n("File Exists")) == KMessageBox::Yes)
        {
            tryAgain = false;
        }
    }

Very heavy to do this, and the message can to not be the same as in other applications.
Comment 1 Christian Loose 2005-06-11 12:13:06 UTC

*** This bug has been marked as a duplicate of 102972 ***