From kde-commits Sat Aug 16 13:23:26 2003 From: Roberto Raggi Date: Sat, 16 Aug 2003 13:23:26 +0000 To: kde-commits Subject: kdevelop/parts/classview X-MARC-Message: https://marc.info/?l=kde-commits&m=106104023812003 CVS commit by raggi: returns 'fn' if QDir(fn).canonicalpath() is empty. i hope it will fix the empty class view bug M +7 -0 classviewwidget.cpp 1.39 --- kdevelop/parts/classview/classviewwidget.cpp #1.38:1.39 @@ -166,4 +166,7 @@ void ClassViewWidget::slotProjectOpened( m_projectDirectory = QDir(m_part->project()->projectDirectory()).canonicalPath(); + if( m_projectDirectory.isEmpty() ) + m_projectDirectory = m_part->project()->projectDirectory(); + m_projectDirectoryLength = m_projectDirectory.length() + 1; @@ -183,4 +186,6 @@ void ClassViewWidget::insertFile( const { QString fn = QDir( fileName ).canonicalPath(); + if( fn.isEmpty() ) + fn = fileName; //kdDebug() << "======================== insertFile(" << fn << ")" << endl; @@ -226,4 +231,6 @@ void ClassViewWidget::removeFile( const { QString fn = QDir( fileName ).canonicalPath(); + if( fn.isEmpty() ) + fn = fileName; //kdDebug() << "======================== removeFile(" << fn << ")" << endl;