From 45a59fcd4a35c9c0ce35162c0ac7a5c914e24a52 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Sat, 25 Sep 2004 05:01:41 +0000 Subject: redunancy --- diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 3bfec7d..3cd2067 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -342,7 +342,7 @@ QStringList AdvancedFm::getPath() { return strList; } -void AdvancedFm::changeTo(QString dir) { +void AdvancedFm::changeTo(const QString dir) { chdir( dir.latin1()); CurrentDir()->cd(dir, TRUE); populateView(); @@ -699,7 +699,7 @@ void AdvancedFm::gotoCustomDir(const QString &dir) { if( dir == s_removeBookmark) { removeCustomDir( ); } else { - gotoDirectory( dir); + changeTo( dir); // if(QDir( curDir).exists() ) // { // thisDir->setPath( curDir ); @@ -766,38 +766,15 @@ void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) { // odebug << "received" << oendl; QString file; stream >> file; - gotoDirectory( (const QString &) file); + changeTo( (const QString &) file); } } void AdvancedFm::setDocument(const QString &file) { - gotoDirectory( file); + changeTo( file); } -void AdvancedFm::gotoDirectory(const QString &file) { -// qDebug("goto dir "+file); - QString curDir = file; - QDir *thisDir = CurrentDir(); - if(QDir( curDir).exists() ) { - thisDir->setPath( curDir ); - chdir( curDir.latin1() ); - thisDir->cd( curDir, TRUE); - populateView(); - } - else if(QFileInfo(curDir).exists()) { - QFileInfo fileInfo(curDir); - curDir=fileInfo.dirPath(); - if(QDir( curDir).exists() ) { - thisDir->setPath( curDir ); - chdir( curDir.latin1() ); - thisDir->cd( curDir, TRUE); - populateView(); - } - findFile(file); - } - -} void AdvancedFm::findFile(const QString &fileName) { QFileInfo fi(fileName); diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index 9dbdc70..00ab909 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h @@ -177,7 +177,6 @@ private: void customDirsToMenu(); void addCustomDir(); void removeCustomDir(); - void gotoDirectory(const QString &); void navigateToSelected(); void findFile(const QString &); -- cgit v0.9.0.2