Changeset View
Changeset View
Standalone View
Standalone View
kate/katedocmanager.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 578 | { | |||
---|---|---|---|---|---|
579 | KColorScheme colors(QPalette::Active); | 579 | KColorScheme colors(QPalette::Active); | ||
580 | 580 | | |||
581 | KTextEditor::Document *doc = qobject_cast<KTextEditor::Document *>(sender()); | 581 | KTextEditor::Document *doc = qobject_cast<KTextEditor::Document *>(sender()); | ||
582 | if (!doc) { | 582 | if (!doc) { | ||
583 | return; // should never happen, but who knows | 583 | return; // should never happen, but who knows | ||
584 | } | 584 | } | ||
585 | disconnect(doc, SIGNAL(completed()), this, SLOT(documentOpened())); | 585 | disconnect(doc, SIGNAL(completed()), this, SLOT(documentOpened())); | ||
586 | disconnect(doc, SIGNAL(canceled(QString)), this, SLOT(documentOpened())); | 586 | disconnect(doc, SIGNAL(canceled(QString)), this, SLOT(documentOpened())); | ||
587 | if (doc->openingError()) { | 587 | // Checking both, openingError and isEmpty, does not only avoid to show an empty pop dialog | ||
588 | // but also to not set "openSuccess" which cause a false close in closeOrphaned() when the | ||||
589 | // file has some other trouble, but exist. | ||||
590 | // This works now only due to the patch introduced this comment, but is no sane solution -> FIXME | ||||
591 | if (doc->openingError() && !doc->openingErrorMessage().isEmpty()) { | ||||
588 | m_openingErrors += QLatin1Char('\n') + doc->openingErrorMessage() + QStringLiteral("\n\n"); | 592 | m_openingErrors += QLatin1Char('\n') + doc->openingErrorMessage() + QStringLiteral("\n\n"); | ||
589 | KateDocumentInfo *info = documentInfo(doc); | 593 | KateDocumentInfo *info = documentInfo(doc); | ||
590 | if (info) { | 594 | if (info) { | ||
591 | info->openSuccess = false; | 595 | info->openSuccess = false; | ||
592 | } | 596 | } | ||
593 | } | 597 | } | ||
594 | --m_documentStillToRestore; | 598 | --m_documentStillToRestore; | ||
595 | 599 | | |||
Show All 17 Lines |