-rw-r--r-- | libopie/ofileselector.cc | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index 3c3a6c4..b3aacd6 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc @@ -186,10 +186,6 @@ void OFileSelector::reread() const DocLnk *OFileSelector::selected() { - if( m_selector == NORMAL ){ - return m_select->selected(); - }else{ DocLnk *lnk = new DocLnk(selectedDocument() ); return lnk; - } } @@ -327,7 +323,6 @@ QString OFileSelector::selectedName() const QString name; if( m_selector == NORMAL ){ - const DocLnk *lnk = m_select->selected(); - name = lnk->file(); - delete lnk; + DocLnk lnk = m_select->selectedDocument(); + name = lnk.file(); }else if( m_selector == EXTENDED || m_selector == EXTENDED_ALL ){ if ( m_shLne ) { @@ -402,7 +397,5 @@ DocLnk OFileSelector::selectedDocument() const switch( m_selector ){ case NORMAL:{ - const DocLnk *lnk2 = m_select->selected(); - lnk = DocLnk(*lnk2 ); // copy - delete lnk2; + lnk = m_select->selectedDocument(); break; } |