mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-05 15:39:47 +00:00
Don't show an ugly popup saying the document could not be loaded when we come from a file changed reload
BUG: 155734 svn path=/trunk/KDE/kdegraphics/okular/; revision=761490
This commit is contained in:
parent
4333d4b0b5
commit
ff20b1ee86
19
part.cpp
19
part.cpp
|
@ -574,13 +574,20 @@ void Part::setMimeTypes(KIO::Job *job)
|
|||
void Part::loadCancelled(const QString &reason)
|
||||
{
|
||||
emit setWindowCaption( QString() );
|
||||
if (!reason.isEmpty())
|
||||
|
||||
// when m_viewportDirty.pageNumber != -1 we come from slotDoFileDirty
|
||||
// so we don't want to show an ugly messagebox just because the document is
|
||||
// taking more than usual to be recreated
|
||||
if (m_viewportDirty.pageNumber == -1)
|
||||
{
|
||||
KMessageBox::error( widget(), i18n("Could not open %1. Reason: %2", url().prettyUrl(), reason ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
KMessageBox::error( widget(), i18n("Could not open %1", url().prettyUrl() ) );
|
||||
if (!reason.isEmpty())
|
||||
{
|
||||
KMessageBox::error( widget(), i18n("Could not open %1. Reason: %2", url().prettyUrl(), reason ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
KMessageBox::error( widget(), i18n("Could not open %1", url().prettyUrl() ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue