Summary: | kde themes crash repeatedly | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kdelibs | Reporter: | Tim <Dreq934> |
Component: | general | Assignee: | Stephan Kulow <coolo> |
Status: | RESOLVED DUPLICATE | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Tim
2003-08-18 12:26:19 UTC
Subject: quanta/quanta CVS commit by amantia: Don't show too many error dialogs if saving failed (when using KDE CVS). Don't reload the file if saving failed (fixes 63872). Reload the file after save only if the highlighting mode is 0 (original patch by bj at altern.org, improves the fix/workaround for 62625). CCMAIL: 62872-done@bugs.kde.org M +16 -5 quantadoc.cpp 1.113 --- quanta/quanta/quantadoc.cpp #1.112:1.113 @@ -211,13 +211,24 @@ bool QuantaDoc::saveDocument(const KURL& { fileWatcher->removeFile(oldURL.path()); - if (!w->doc()->saveAs( url )) + KTextEditor::Document *wdoc = w->doc(); + if (!wdoc->saveAs( url )) { +#if KDE_VERSION < KDE_MAKE_VERSION(3,1,90) KMessageBox::error(quantaApp, i18n("Saving of the document\n%1\nfailed.\nMaybe you should try to save in another directory.").arg(url.prettyURL())); +#endif result = false; - } + } else + { w->closeTempFile(); - w->doc()->openURL(url); + if (dynamic_cast<KTextEditor::HighlightingInterface*>(wdoc)->hlMode()==0) + { + uint line,col; + w->viewCursorIf->cursorPositionReal(&line, &col); + wdoc->openURL(url); + w->viewCursorIf->setCursorPosition(line, col); + } w->createTempFile(); w->setDirtyStatus(false); + } if (w->url().isLocalFile()) { Sorry, fixed by mistaked (typo in CVS commit). Please close it if it was closed before. Andras |