[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 56722] kghostview blocks after attempts to open non-existing
From: Luis Pedro Coelho <luis_pedro () netcabo ! pt>
Date: 2003-08-31 15:25:41
[Download RAW message or body]
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=56722
luis_pedro@netcabo.pt changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From luis_pedro@netcabo.pt 2003-08-31 17:25 -------
Subject: kdegraphics/kghostview
CVS commit by luis_pedro:
Come back to a known state after a "open file" failed.
CCMAIL: 56722-close@bugs.kde.org
M +8 -5 kgv_view.cpp 1.158
M +8 -0 kgvshell.cpp 1.75
M +1 -0 kgvshell.h 1.26
M +9 -0 marklist.cpp 1.48
M +2 -1 marklist.h 1.27
--- kdegraphics/kghostview/marklist.h #1.26:1.27
@@ -71,4 +71,5 @@ public slots:
void toggleMarks();
void removeMarks();
+ void clear();
protected:
--- kdegraphics/kghostview/marklist.cpp #1.47:1.48
@@ -154,4 +154,13 @@ void MarkList::select( int index )
}
+void MarkList::clear()
+{
+ for ( int i = 0; i != numRows() ; ++i ) {
+ delete cellWidget( i, 0 );
+ setCellWidget( i, 0, 0 );
+ }
+ setNumRows( 0 );
+}
+
void MarkList::markCurrent()
{
--- kdegraphics/kghostview/kgvshell.cpp #1.74:1.75
@@ -32,4 +32,5 @@
#include <ktempfile.h>
#include <kmenubar.h>
+#include <kdebug.h>
#include <kicontheme.h>
@@ -115,4 +116,5 @@ KGVShell::KGVShell() :
connect( m_gvpart->pageView(), SIGNAL( rightClick() ),SLOT( slotRMBClick() ) );
+ connect( m_gvpart, SIGNAL( canceled(const QString&) ),SLOT( slotReset() ) );
if (!initialGeometrySet())
@@ -156,4 +158,10 @@ KGVShell::setDisplayOptions( const Displ
{
m_gvpart->setDisplayOptions( options );
+}
+
+void KGVShell::slotReset()
+{
+ kdDebug( 4500 ) << "KGVShell::slotReset()" << endl;
+ stateChanged( "initState" );
}
--- kdegraphics/kghostview/kgvshell.h #1.25:1.26
@@ -58,4 +58,5 @@ protected slots:
void slotResize();
void slotToggleFullScreen();
+ void slotReset();
protected:
--- kdegraphics/kghostview/kgv_view.cpp #1.157:1.158
@@ -392,4 +392,7 @@ bool KGVPart::closeURL()
_psWidget->stopInterpreter();
_docManager->getThumbnailService()->reset();
+ _markList->clear();
+ _pageDecorator->hide();
+ //_scrollBox->clear();
_isFileDirty = false;
if ( _job )
@@ -606,5 +609,5 @@ void KGVPart::updateReadUpDownActions()
bool KGVPart::openURL( const KURL& url )
{
- if( url.isMalformed() )
+ if( !url.isValid() )
return false;
if( !closeURL() )
@@ -627,4 +630,5 @@ bool KGVPart::openURL( const KURL& url )
void KGVPart::openURLContinue()
{
+ kdDebug(4500) << "KGVPart::openURLContinue()" << endl;
if( m_url.isLocalFile() )
{
@@ -744,5 +748,5 @@ void KGVPart::slotMimetypeFinished( cons
return;
}
- if( _mimetypeScanner->hasError() )
+ if( !_mimetypeScanner || _mimetypeScanner->hasError() )
emit canceled( QString::null );
else
@@ -753,10 +757,9 @@ void KGVPart::slotMimetypeFinished( cons
void KGVPart::slotMimetypeError()
{
- /*
+ kdDebug(4500) << "KGVPart::slotMimetypeError()" << endl;
_mimetypeScanner = 0;
emit started( 0 );
- kapp->processEvents();
+ //kapp->processEvents();
emit canceled( QString::null );
- */
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic