-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 44 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.pro | 20 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 12 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 55 | ||||
-rw-r--r-- | noncore/apps/advancedfm/filePermissions.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/advancedfm/output.cpp | 23 |
6 files changed, 73 insertions, 83 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index a60d6ce..a47edd8 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -72,5 +72,5 @@ void AdvancedFm::cleanUp() { void AdvancedFm::tabChanged(QWidget *) { -// qWarning("tab changed"); +// owarn << "tab changed" << oendl; QString path = CurrentDir()->canonicalPath(); currentPathCombo->lineEdit()->setText( path ); @@ -94,5 +94,5 @@ void AdvancedFm::tabChanged(QWidget *) { void AdvancedFm::populateView() { -// qWarning("PopulateView"); +// owarn << "PopulateView" << oendl; QPixmap pm; QListView *thisView = CurrentView(); @@ -100,5 +100,5 @@ void AdvancedFm::populateView() { QString path = thisDir->canonicalPath(); -//qWarning("path is "+path); +//owarn << "path is "+path << oendl; thisView->clear(); thisDir->setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); @@ -161,5 +161,5 @@ void AdvancedFm::populateView() { } if( fi->isSymLink() || fileL.find("->",0,TRUE) != -1) { - // qDebug(" overlay link image"); + // odebug << " overlay link image" << oendl; pm= Resource::loadPixmap( "advancedfm/symlink" ); // pm= Resource::loadPixmap( "folder" ); @@ -185,5 +185,5 @@ void AdvancedFm::populateView() { while ((mydirent = readdir(dir)) != NULL) { lstat( mydirent->d_name, &buf); -// qDebug(mydirent->d_name); +// odebug << mydirent->d_name << oendl; fileL.sprintf("%s", mydirent->d_name); devT = buf.st_dev; @@ -210,5 +210,5 @@ void AdvancedFm::rePopulate() { // int tmpTab = whichTab; -// // qDebug("%d", tmpTab); +// // odebug << "" << tmpTab << "" << oendl; // for(int i =1; i < 3; i++) { @@ -220,8 +220,8 @@ void AdvancedFm::rePopulate() { void AdvancedFm::ListClicked(QListViewItem *selectedItem) { -//qWarning("listclicked"); +//owarn << "listclicked" << oendl; if(selectedItem) { QString strItem=selectedItem->text(0); -// qWarning(strItem); +// owarn << strItem << oendl; QString strSize=selectedItem->text(1); strSize=strSize.stripWhiteSpace(); @@ -268,5 +268,5 @@ void AdvancedFm::ListPressed( int mouse, QListViewItem *item, const QPoint& , in void AdvancedFm::switchToLocalTab() { -//qWarning("switch to local view"); +//owarn << "switch to local view" << oendl; TabWidget->setCurrentWidget(0); Local_View->setFocus(); @@ -274,5 +274,5 @@ void AdvancedFm::switchToLocalTab() { void AdvancedFm::switchToRemoteTab() { -//qWarning("switch to local view"); +//owarn << "switch to local view" << oendl; TabWidget->setCurrentWidget(1); Remote_View->setFocus(); @@ -330,5 +330,5 @@ QStringList AdvancedFm::getPath() { if ( it.current()->isSelected() ) { strList << it.current()->text(0); -// qDebug(it.current()->text(0)); +// odebug << it.current()->text(0) << oendl; } } @@ -381,5 +381,5 @@ void AdvancedFm::doAbout() { void AdvancedFm::keyPressEvent( QKeyEvent *e) { -// qWarning("key %d", e->key()); +// owarn << "key " << e->key() << "" << oendl; // if( CurrentView()->hasFocus() ) { @@ -639,5 +639,5 @@ void AdvancedFm::addToDocs() { for ( QStringList::Iterator it = strListPaths.begin(); it != strListPaths.end(); ++it ) { curFile = thisDir->canonicalPath()+"/"+(*it); -// qDebug(curFile); +// odebug << curFile << oendl; QFileInfo fi(curFile); DocLnk f; @@ -712,5 +712,5 @@ void AdvancedFm::addCustomDir() { void AdvancedFm::removeCustomDir() { -// qDebug("remove custom dir"); +// odebug << "remove custom dir" << oendl; Config cfg("AdvancedFm"); cfg.setGroup("Menu"); @@ -747,5 +747,5 @@ void AdvancedFm::removeCustomDir() { void AdvancedFm::gotoCustomDir(const QString &dir) { -// qDebug("gotoCustomDir(const QString &dir) " +dir ); +// odebug << "gotoCustomDir(const QString &dir) " +dir << oendl; // QString curDir = dir; // QDir *thisDir = CurrentDir(); @@ -788,8 +788,8 @@ QDir *AdvancedFm::OtherDir() { QListView * AdvancedFm::CurrentView() { if ( whichTab == 1) { -// qWarning("CurrentView Tab 1"); +// owarn << "CurrentView Tab 1" << oendl; return Local_View; } else { -// qWarning("CurrentView Tab 2"); +// owarn << "CurrentView Tab 2" << oendl; return Remote_View; } @@ -804,5 +804,5 @@ QListView * AdvancedFm::OtherView() { void AdvancedFm::setOtherTabCurrent() { -// qWarning("setOtherTabCurrent() %d", whichTab); +// owarn << "setOtherTabCurrent() " << whichTab << "" << oendl; if ( whichTab == 1) { TabWidget->setCurrentWidget(1); @@ -815,8 +815,8 @@ void AdvancedFm::setOtherTabCurrent() { void AdvancedFm::qcopReceive(const QCString &msg, const QByteArray &data) { -// qDebug("qcop message "+msg ); +// odebug << "qcop message "+msg << oendl; QDataStream stream ( data, IO_ReadOnly ); if ( msg == "openDirectory(QString)" ) { -// qDebug("received"); +// odebug << "received" << oendl; QString file; stream >> file; @@ -831,5 +831,5 @@ void AdvancedFm::setDocument(const QString &file) { void AdvancedFm::gotoDirectory(const QString &file) { -// qWarning("goto dir "+file); +// owarn << "goto dir "+file << oendl; QString curDir = file; QDir *thisDir = CurrentDir(); @@ -867,5 +867,5 @@ void AdvancedFm::findFile(const QString &fileName) { void AdvancedFm::slotSwitchMenu(int ) { -// qDebug("Switch %d", item); +// odebug << "Switch " << item << "" << oendl; // viewMenu->setItemChecked(item, true); } diff --git a/noncore/apps/advancedfm/advancedfm.pro b/noncore/apps/advancedfm/advancedfm.pro index 716343d..f1c518e 100644 --- a/noncore/apps/advancedfm/advancedfm.pro +++ b/noncore/apps/advancedfm/advancedfm.pro @@ -1,5 +1,4 @@ TEMPLATE = app CONFIG += qt warn_on quick-app -# CONFIG += qt warn_on HEADERS = advancedfm.h filePermissions.h output.h SOURCES = advancedfm.cpp advancedfmData.cpp advancedfmMenu.cpp filePermissions.cpp output.cpp main.cpp @@ -9,23 +8,4 @@ DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopiecore2 -lopieui2 -TRANSLATIONS = ../../../i18n/de/advancedfm.ts \ - ../../../i18n/nl/advancedfm.ts \ - ../../../i18n/da/advancedfm.ts \ - ../../../i18n/xx/advancedfm.ts \ - ../../../i18n/en/advancedfm.ts \ - ../../../i18n/es/advancedfm.ts \ - ../../../i18n/fr/advancedfm.ts \ - ../../../i18n/hu/advancedfm.ts \ - ../../../i18n/ja/advancedfm.ts \ - ../../../i18n/ko/advancedfm.ts \ - ../../../i18n/no/advancedfm.ts \ - ../../../i18n/pl/advancedfm.ts \ - ../../../i18n/pt/advancedfm.ts \ - ../../../i18n/pt_BR/advancedfm.ts \ - ../../../i18n/sl/advancedfm.ts \ - ../../../i18n/zh_CN/advancedfm.ts \ - ../../../i18n/zh_TW/advancedfm.ts - - !contains(CONFIG,quick-app) { DESTDIR = $(OPIEDIR)/bin diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 2997c55..29335f8 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp @@ -12,9 +12,14 @@ #include "advancedfm.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/storage.h> #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/menubutton.h> +using namespace Opie::Core; +using namespace Opie::Ui; +/* QT */ #include <qlayout.h> #include <qhbox.h> @@ -25,8 +30,7 @@ #include <qlistview.h> +/* STD */ #include <sys/utsname.h> - -using namespace Opie::Ui; void AdvancedFm::init() { b = false; @@ -220,9 +224,9 @@ void AdvancedFm::init() { if( !StorageInfo::hasSd() || !StorageInfo::hasMmc()) { - qDebug("not have sd"); + odebug << "not have sd" << oendl; sdButton->hide(); } if( !StorageInfo::hasCf() ) { - qDebug("not have cf"); + odebug << "not have cf" << oendl; cfButton->hide(); } diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 81a4318..d34f330 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -10,18 +10,24 @@ * (at your option) any later version. *
***************************************************************************/
+ #include "advancedfm.h"
#include "output.h"
#include "filePermissions.h"
+/* OPIE */ +#include <opie2/odebug.h> #include <qpe/lnkproperties.h>
#include <qpe/qpeapplication.h>
#include <qpe/applnk.h>
+using namespace Opie::Core; -#include <qmessagebox.h>
-
+/* QT*/ +#include <qmessagebox.h> #include <qpopupmenu.h>
#include <qlistview.h>
+/* STD */ + #include <errno.h>
#include <stdlib.h>
@@ -32,7 +38,4 @@ #include <fcntl.h>
-
-using namespace Opie::Core;
-using namespace Opie::Core;
void AdvancedFm::doDirChange() {
QString pathItem = CurrentView()->currentItem()->text(0);
@@ -42,5 +45,5 @@ void AdvancedFm::doDirChange() { if( pathItem.find(" -> ",0,TRUE) != -1)
pathItem = dealWithSymName((const QString&)pathItem)+"/";
-// qWarning(pathItem);
+// owarn << pathItem << oendl; gotoDirectory( CurrentDir()->path()+"/"+pathItem.left( pathItem.length() - 1) );
}
@@ -93,5 +96,5 @@ void AdvancedFm::runThis() { fs = getFileSystemType((const QString &) path);
QFileInfo fileInfo( path + "/" + curFile);
-// qDebug( fileInfo.owner());
+// odebug << fileInfo.owner() << oendl; if( (fileInfo.permission( QFileInfo::ExeUser)
@@ -105,5 +108,5 @@ void AdvancedFm::runThis() { DocLnk nf(curFile);
QString execStr = nf.exec();
-// qDebug( execStr);
+// odebug << execStr << oendl; if( execStr.isEmpty() ) {
} else {
@@ -203,10 +206,10 @@ void AdvancedFm::doDelete() { QFileInfo fi(myFile);
if( fi.fileName().find("../",0,TRUE)==-1) {
-// qDebug("remove link files "+myFile);
+// odebug << "remove link files "+myFile << oendl; // DocLnk lnk(f);
DocLnk *lnk;
lnk = new DocLnk(f);
-// qDebug("Deleting doclnk " + lnk->linkFile());
+// odebug << "Deleting doclnk " + lnk->linkFile() << oendl; if(lnk->isValid())
lnk->removeLinkFile();
@@ -244,8 +247,8 @@ void AdvancedFm::doProperties() { filePath = CurrentDir()->canonicalPath()+"/";
-// qDebug("%d",curFileList.count());
+// odebug << "" << curFileList.count() << "" << oendl; for ( QStringList::Iterator it = curFileList.begin(); it != curFileList.end(); ++it ) {
-// qDebug((filePath+*it));
+// odebug << (filePath+*it) << oendl; DocLnk lnk( (filePath+*it));
LnkProperties prop( &lnk );
@@ -303,6 +306,6 @@ void AdvancedFm::copy() { destFile = thatDir->canonicalPath()+"/"+ item;
-// qDebug("Destination file is "+destFile);
-// qDebug("CurrentFile file is " + curFile);
+// odebug << "Destination file is "+destFile << oendl; +// odebug << "CurrentFile file is " + curFile << oendl; QFile f(destFile);
@@ -421,5 +424,5 @@ void AdvancedFm::copySameDir() { }
-// qDebug("copy "+curFile+" as "+destFile);
+// odebug << "copy "+curFile+" as "+destFile << oendl; }
delete fileDlg;
@@ -444,5 +447,5 @@ void AdvancedFm::move() { destFile+="/";
destFile += item;
-// qDebug("Destination file is "+destFile);
+// odebug << "Destination file is "+destFile << oendl; curFile = thisDir->canonicalPath();
@@ -450,5 +453,5 @@ void AdvancedFm::move() { curFile +="/";
curFile+= item;
-// qDebug("CurrentFile file is " + curFile);
+// odebug << "CurrentFile file is " + curFile << oendl; if(QFileInfo(curFile).isDir()) {
@@ -490,5 +493,5 @@ bool AdvancedFm::copyDirectory( const QString & src, const QString & dest ) { QString cmd = "/bin/cp -fpR " + src + " " + dest;
- qWarning(cmd);
+ owarn << cmd << oendl; int err = system( (const char *) cmd );
if ( err != 0 ) {
@@ -526,5 +529,5 @@ bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { off_t offset = 0;
if(!srcFile.open( IO_ReadOnly|IO_Raw)) {
-// qWarning("open failed");
+// owarn << "open failed" << oendl; return success = false;
}
@@ -533,5 +536,5 @@ bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { fstat (read_fd, &stat_buf);
if( !destFile.open( IO_WriteOnly|IO_Raw ) ) {
-// qWarning("destfile open failed");
+// owarn << "destfile open failed" << oendl; return success = false;
}
@@ -548,5 +551,5 @@ bool AdvancedFm::copyFile( const QString & src, const QString & dest ) { };
success = false;
-// qWarning(msg);
+// owarn << msg << oendl; }
} else {
@@ -580,5 +583,5 @@ void AdvancedFm::runCommand() { if( fileDlg->result() == 1 ) {
-// qDebug(fileDlg->LineEdit1->text());
+// odebug << fileDlg->LineEdit1->text() << oendl; QStringList command;
@@ -663,5 +666,5 @@ void AdvancedFm::mkSym() { cmd = "ln -s "+curFile+" "+destName;
-// qDebug(cmd);
+// odebug << cmd << oendl; startProcess( (const QString)cmd );
}
@@ -716,5 +719,5 @@ void AdvancedFm::startProcess(const QString & cmd) { *process << command;
if(!process->start(OProcess::NotifyOnExit, OProcess::All) )
- qDebug("could not start process");
+ odebug << "could not start process" << oendl; }
@@ -724,5 +727,5 @@ void AdvancedFm::processEnded(OProcess *) { void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int ) {
-// qWarning("received stderrt %d bytes", buflen);
+// owarn << "received stderrt " << buflen << " bytes" << oendl; QString lineStr = buffer;
@@ -766,5 +769,5 @@ bool AdvancedFm::eventFilter( QObject * o, QEvent * e ) { void AdvancedFm::cancelRename() {
-// qDebug("cancel rename");
+// odebug << "cancel rename" << oendl; QListView * view;
view = CurrentView();
diff --git a/noncore/apps/advancedfm/filePermissions.cpp b/noncore/apps/advancedfm/filePermissions.cpp index 9698de7..b7d48e8 100644 --- a/noncore/apps/advancedfm/filePermissions.cpp +++ b/noncore/apps/advancedfm/filePermissions.cpp @@ -33,5 +33,5 @@ filePermissions::filePermissions( QWidget* parent, const char* name, bool modal if ( !name ) setName( tr("filePermissions") ); -// qDebug("FilePermissions "+fileName); +// odebug << "FilePermissions "+fileName << oendl; /* resize( 236, 210 ); setMaximumSize( QSize( 236, 210 ) ); diff --git a/noncore/apps/advancedfm/output.cpp b/noncore/apps/advancedfm/output.cpp index 6906298..8c585f4 100644 --- a/noncore/apps/advancedfm/output.cpp +++ b/noncore/apps/advancedfm/output.cpp @@ -6,7 +6,11 @@ #include "output.h" +/* OPIE */ +#include <opie2/odebug.h> #include <qpe/qpeapplication.h> #include <qpe/applnk.h> +using namespace Opie::Core; +/* QT */ #include <qfile.h> #include <qmultilineedit.h> @@ -14,9 +18,8 @@ #include <qlayout.h> +/* STD */ #include <errno.h> /* XPM */ -using namespace Opie::Core; -using namespace Opie::Core; static char * filesave_xpm[] = { "16 16 78 1", @@ -122,5 +125,5 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name, // cmmds=QStringList::split( " ", commands, false); cmmds=commands; -// qDebug("count %d", cmmds.count()); +// odebug << "count " << cmmds.count() << "" << oendl; if ( !name ) setName( tr("Output")); @@ -158,5 +161,5 @@ Output::Output( const QStringList commands, QWidget* parent, const char* name, // * proc << commands.latin1(); for ( QStringList::Iterator it = cmmds.begin(); it != cmmds.end(); ++it ) { - qDebug( "%s", (*it).latin1() ); + odebug << "" << (*it).latin1() << "" << oendl; * proc << (*it).latin1(); } @@ -187,5 +190,5 @@ void Output::saveOutput() { QString name = fileDlg->LineEdit1->text(); filename+="text/plain/"+name; - qDebug(filename); + odebug << filename << oendl; QFile f(filename); @@ -197,8 +200,8 @@ void Output::saveOutput() { lnk.setType("text/plain"); if(!lnk.writeLink()) { - qDebug("Writing doclink did not work"); + odebug << "Writing doclink did not work" << oendl; } } else - qWarning("Could not write file"); + owarn << "Could not write file" << oendl; f.close(); } @@ -206,5 +209,5 @@ void Output::saveOutput() { void Output::commandStdout(OProcess*, char *buffer, int buflen) { - qWarning("received stdout %d bytes", buflen); + owarn << "received stdout " << buflen << " bytes" << oendl; // QByteArray data(buflen); @@ -223,5 +226,5 @@ void Output::commandStdout(OProcess*, char *buffer, int buflen) { void Output::commandStdin( const QByteArray &data) { - qWarning("received stdin %d bytes", data.size()); + owarn << "received stdin " << data.size() << " bytes" << oendl; // recieved data from the io layer goes to sz proc->writeStdin(data.data(), data.size()); @@ -229,5 +232,5 @@ void Output::commandStdin( const QByteArray &data) { void Output::commandStderr(OProcess*, char *buffer, int buflen) { - qWarning("received stderrt %d bytes", buflen); + owarn << "received stderrt " << buflen << " bytes" << oendl; QString lineStr = buffer; |