author | sandman <sandman> | 2002-10-10 16:18:17 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-10 16:18:17 (UTC) |
commit | aa38f642a07810515dcc18ea38bf520e26d7f88e (patch) (unidiff) | |
tree | f9bd4346cc043e63663474f0818eac11f8b37706 /libopie | |
parent | c82a7868e0e2f8dc3e3d2b42629fc8d8efef05c7 (diff) | |
download | opie-aa38f642a07810515dcc18ea38bf520e26d7f88e.zip opie-aa38f642a07810515dcc18ea38bf520e26d7f88e.tar.gz opie-aa38f642a07810515dcc18ea38bf520e26d7f88e.tar.bz2 |
fileSelected ( DocLnk & ); was not emitted
(opening files in qpdf works now)
-rw-r--r-- | libopie/ofileselector.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/ofileselector.cc b/libopie/ofileselector.cc index b3aacd6..9534667 100644 --- a/libopie/ofileselector.cc +++ b/libopie/ofileselector.cc | |||
@@ -1007,65 +1007,65 @@ bool OFileSelector::compliesMime( const QString& mime ) { | |||
1007 | it = m_mimetypes.find(currentText ); | 1007 | it = m_mimetypes.find(currentText ); |
1008 | if ( it == m_mimetypes.end() ) qWarning("not there"), list << currentText; | 1008 | if ( it == m_mimetypes.end() ) qWarning("not there"), list << currentText; |
1009 | else qWarning("found"), list = it.data(); | 1009 | else qWarning("found"), list = it.data(); |
1010 | } | 1010 | } |
1011 | // dump it now | 1011 | // dump it now |
1012 | //for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { | 1012 | //for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { |
1013 | // qWarning( "%s", (*it).latin1() ); | 1013 | // qWarning( "%s", (*it).latin1() ); |
1014 | //} | 1014 | //} |
1015 | 1015 | ||
1016 | 1016 | ||
1017 | if ( list.contains(mime) ) return true; | 1017 | if ( list.contains(mime) ) return true; |
1018 | qWarning("list doesn't contain it "); | 1018 | qWarning("list doesn't contain it "); |
1019 | QStringList::Iterator it2; | 1019 | QStringList::Iterator it2; |
1020 | int pos; | 1020 | int pos; |
1021 | int pos2; | 1021 | int pos2; |
1022 | for ( it2 = list.begin(); it2 != list.end(); ++it2 ) { | 1022 | for ( it2 = list.begin(); it2 != list.end(); ++it2 ) { |
1023 | pos = (*it2).findRev("/*"); | 1023 | pos = (*it2).findRev("/*"); |
1024 | if ( pos >= 0 ) { | 1024 | if ( pos >= 0 ) { |
1025 | if ( mime.contains( (*it2).left(pos) ) ) return true; | 1025 | if ( mime.contains( (*it2).left(pos) ) ) return true; |
1026 | } | 1026 | } |
1027 | } | 1027 | } |
1028 | return false; | 1028 | return false; |
1029 | } | 1029 | } |
1030 | void OFileSelector::slotFileSelected( const QString &string ) | 1030 | void OFileSelector::slotFileSelected( const QString &string ) |
1031 | { | 1031 | { |
1032 | if( m_shLne ) | 1032 | if( m_shLne ) |
1033 | m_edit->setText( string ); | 1033 | m_edit->setText( string ); |
1034 | emit fileSelected( string ); | 1034 | emit fileSelected( string ); |
1035 | } | 1035 | } |
1036 | void OFileSelector::slotFileBridgeSelected( const DocLnk &lnk ) | 1036 | void OFileSelector::slotFileBridgeSelected( const DocLnk &lnk ) |
1037 | { | 1037 | { |
1038 | slotFileSelected( lnk.name() ); | 1038 | slotFileSelected( lnk.name() ); |
1039 | // emit fileSelected( lnk ); | 1039 | emit fileSelected( lnk ); |
1040 | } | 1040 | } |
1041 | void OFileSelector::slotSelectionChanged() | 1041 | void OFileSelector::slotSelectionChanged() |
1042 | { | 1042 | { |
1043 | 1043 | ||
1044 | } | 1044 | } |
1045 | void OFileSelector::slotCurrentChanged(QListViewItem* item ) | 1045 | void OFileSelector::slotCurrentChanged(QListViewItem* item ) |
1046 | { | 1046 | { |
1047 | if( item == 0 ) | 1047 | if( item == 0 ) |
1048 | return; | 1048 | return; |
1049 | if( m_selector == EXTENDED || m_selector == EXTENDED_ALL ) { | 1049 | if( m_selector == EXTENDED || m_selector == EXTENDED_ALL ) { |
1050 | OFileSelectorItem *sel = (OFileSelectorItem*) item; // start to use the C++ casts ;) | 1050 | OFileSelectorItem *sel = (OFileSelectorItem*) item; // start to use the C++ casts ;) |
1051 | qWarning("current changed"); | 1051 | qWarning("current changed"); |
1052 | if(!sel->isDir() ){ | 1052 | if(!sel->isDir() ){ |
1053 | if( m_shLne ) | 1053 | if( m_shLne ) |
1054 | m_edit->setText( sel->text(1) ); | 1054 | m_edit->setText( sel->text(1) ); |
1055 | 1055 | ||
1056 | if (m_mode == FILESELECTOR ) { | 1056 | if (m_mode == FILESELECTOR ) { |
1057 | QStringList str = QStringList::split("->", sel->text(1) ); | 1057 | QStringList str = QStringList::split("->", sel->text(1) ); |
1058 | QString path =sel->directory() + "/" + str[0].stripWhiteSpace(); | 1058 | QString path =sel->directory() + "/" + str[0].stripWhiteSpace(); |
1059 | emit fileSelected(path ); | 1059 | emit fileSelected(path ); |
1060 | DocLnk lnk( path ); | 1060 | DocLnk lnk( path ); |
1061 | emit fileSelected(lnk ); | 1061 | emit fileSelected(lnk ); |
1062 | } | 1062 | } |
1063 | } | 1063 | } |
1064 | } | 1064 | } |
1065 | } | 1065 | } |
1066 | void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint &, int) | 1066 | void OFileSelector::slotClicked( int button, QListViewItem *item, const QPoint &, int) |
1067 | { | 1067 | { |
1068 | if ( item == 0 ) | 1068 | if ( item == 0 ) |
1069 | return; | 1069 | return; |
1070 | 1070 | ||
1071 | if( button != Qt::LeftButton ) | 1071 | if( button != Qt::LeftButton ) |