Commit d9f3467a authored by Halla Rempt's avatar Halla Rempt Committed by C. Boemann
Browse files

remove wantsExportConfirmation virtual method

Replaced by a configuration string
parent ead31ef3
[krita]
WantExportConfirmation=false
favoriteCompositeOps=normal,erase,multiply
[TemplateChooserDialog]
......
......@@ -67,10 +67,6 @@ public:
virtual ~KisDoc2();
public:
// Overide KoDocument
virtual bool wantExportConfirmation() const {
return false;
}
virtual bool completeLoading(KoStore *store);
virtual bool completeSaving(KoStore*);
......
......@@ -635,11 +635,6 @@ void KoDocument::setSaveInBatchMode(const bool batchMode)
d->filterManager->setBatchMode(batchMode);
}
bool KoDocument::wantExportConfirmation() const
{
return true;
}
bool KoDocument::isImporting() const
{
return d->isImporting;
......
......@@ -319,8 +319,6 @@ public:
*/
void setSaveInBatchMode(const bool batchMode);
virtual bool wantExportConfirmation() const;
/**
* Sets the error message to be shown to the user (use i18n()!)
* when loading or saving fails.
......
......@@ -750,7 +750,11 @@ void KoMainWindow::slotSaveCompleted()
// returns true if we should save, false otherwise.
bool KoMainWindow::exportConfirmation(const QByteArray &outputFormat)
{
if (!rootDocument()->wantExportConfirmation()) return true;
KConfigGroup group = KGlobal::config()->group(rootDocument()->componentData().componentName());
if (!group.readEntry("WantExportConfirmation", true)) {
return false;
}
KMimeType::Ptr mime = KMimeType::mimeType(outputFormat);
QString comment = mime ? mime->comment() : i18n("%1 (unknown file type)", QString::fromLatin1(outputFormat));
......
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