summaryrefslogtreecommitdiff
path: root/core/apps/textedit/fileBrowser.cpp
Side-by-side diff
Diffstat (limited to 'core/apps/textedit/fileBrowser.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/fileBrowser.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp
index 82ccf2c..bb420e6 100644
--- a/core/apps/textedit/fileBrowser.cpp
+++ b/core/apps/textedit/fileBrowser.cpp
@@ -107,13 +107,13 @@ void fileBrowser::listDoubleClicked(QListViewItem *selectedItem)
// you may want to switch these 2 functions. I like single clicks
void fileBrowser::listClicked(QListViewItem *selectedItem)
{
QString strItem=selectedItem->text(0);
QString strSize=selectedItem->text(1);
-// qDebug("strItem is "+strItem);
+// qDebug("strItem is "+strItem);
strSize.stripWhiteSpace();
// qDebug(strSize);
if(strItem.find("@",0,TRUE) !=-1 || strItem.find("->",0,TRUE) !=-1 ) { //if symlink
// is symlink
QString strItem2=strItem.right( (strItem.length()-strItem.find("->",0,TRUE)) -4);
@@ -134,27 +134,30 @@ void fileBrowser::listClicked(QListViewItem *selectedItem)
populateList();
}
if(QDir(strItem).exists()){
currentDir.cd(strItem, TRUE);
populateList();
}
- } else
+ } else {
+ strItem=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+strItem);
if( QFile::exists(strItem ) ) {
-// qDebug("We found our files!!");
+//currentDir.canonicalPath()
+ qDebug("We found our files!!"+strItem);
OnOK();
+ }
} //end not symlink
chdir(strItem.latin1());
}
}
void fileBrowser::OnOK()
{
QListViewItemIterator it1( ListView);
for ( ; it1.current(); ++it1 ) {
if ( it1.current()->isSelected() ) {
selectedFileName=QDir::cleanDirPath(currentDir.canonicalPath()+"/"+it1.current()->text(0));
-// qDebug("selected filename is "+selectedFileName);
+ qDebug("selected filename is "+selectedFileName);
fileList.append( selectedFileName );
}
}
accept();
}