-rw-r--r-- | noncore/apps/opie-gutenbrowser/LibraryDialog.cpp | 12 | ||||
-rw-r--r-- | noncore/apps/opie-gutenbrowser/openetext.cpp | 124 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/om3u.cpp | 17 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/threadutil.cpp | 11 | ||||
-rw-r--r-- | noncore/net/opiestumbler/opiestumbler.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindow/mainwindowimp.cpp | 9 | ||||
-rw-r--r-- | noncore/settings/networksettings/ppp/modem.cpp | 6 |
8 files changed, 93 insertions, 93 deletions
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp index 6c246e97..7f21ab3 100644 --- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp | |||
@@ -22,3 +22,3 @@ | |||
22 | #include <qpe/qpedialog.h> | 22 | #include <qpe/qpedialog.h> |
23 | //#include <opie2///odebug.h> | 23 | #include <opie2/odebug.h> |
24 | 24 | ||
@@ -474,4 +474,8 @@ bool LibraryDialog::getEtext(const QStringList &networkList) | |||
474 | s_fileName.replace( s_fileName.length() - 3, 3, "gtn"); | 474 | s_fileName.replace( s_fileName.length() - 3, 3, "gtn"); |
475 | // s_fileName.replace( s_fileName.length()-3,3,"etx"); | 475 | if (rename( File_Name.latin1(), s_fileName.latin1()) == 1) { |
476 | rename( File_Name.latin1(), s_fileName.latin1()); | 476 | owarn << "Failed to rename " << File_Name.latin1() << " to " |
477 | << s_fileName.latin1() << oendl; | ||
478 | return false; | ||
479 | } | ||
480 | |||
477 | File_Name = s_fileName; | 481 | File_Name = s_fileName; |
@@ -501,3 +505,2 @@ bool LibraryDialog::getEtext(const QStringList &networkList) | |||
501 | //odebug << "Writing doclink did not work" << oendl; | 505 | //odebug << "Writing doclink did not work" << oendl; |
502 | } else { | ||
503 | } | 506 | } |
@@ -703,3 +706,2 @@ void LibraryDialog::onButtonSearch() | |||
703 | QString searcherStr = searchDlg->get_text(); | 706 | QString searcherStr = searchDlg->get_text(); |
704 | int fluff = 0; | ||
705 | 707 | ||
diff --git a/noncore/apps/opie-gutenbrowser/openetext.cpp b/noncore/apps/opie-gutenbrowser/openetext.cpp index 0267416..a5d855d 100644 --- a/noncore/apps/opie-gutenbrowser/openetext.cpp +++ b/noncore/apps/opie-gutenbrowser/openetext.cpp | |||
@@ -59,4 +59,3 @@ void OpenEtext::getTitles() | |||
59 | s_numofFiles = config.readEntry("NumberOfFiles", "0"); | 59 | s_numofFiles = config.readEntry("NumberOfFiles", "0"); |
60 | QLabel_1->setText( tr( | 60 | QLabel_1->setText( tr( s_numofFiles+" etexts in your library." ) ); |
61 | s_numofFiles+" etexts in your library.")); | ||
62 | int i_numofFiles = s_numofFiles.toInt(); | 61 | int i_numofFiles = s_numofFiles.toInt(); |
@@ -70,3 +69,8 @@ void OpenEtext::getTitles() | |||
70 | if( !title.isEmpty()) { | 69 | if( !title.isEmpty()) { |
71 | QListBox_1->insertItem ( QPixmap( QPEApplication::qpeDir()+"pics/gutenbrowser/gutenbrowser_sm.png"), title, -1); | 70 | QListBox_1->insertItem ( QPixmap( |
71 | QPEApplication::qpeDir() + | ||
72 | "pics/gutenbrowser/gutenbrowser_sm.png" | ||
73 | ), | ||
74 | title, | ||
75 | -1); | ||
72 | } | 76 | } |
@@ -102,4 +106,5 @@ void OpenEtext::select_title(int index ) | |||
102 | 106 | ||
103 | /* | 107 | /*! |
104 | This function imports already existing etexts into the local library list*/ | 108 | * This function imports already existing etexts into the local library list |
109 | */ | ||
105 | void OpenEtext::open() | 110 | void OpenEtext::open() |
@@ -115,10 +120,2 @@ OpenFileButton->setDown(TRUE); | |||
115 | 120 | ||
116 | // fileBrowser *browseForFiles; | ||
117 | // browseForFiles=new fileBrowser(this,"Browse for File", TRUE, 0, "guten/plain;text/plain"); | ||
118 | // // browseForFiles=new fileBrowser(this,"fileBrowser",TRUE,0, "*"); | ||
119 | // browseForFiles->setFileView( 0); | ||
120 | // browseForFiles->showMaximized(); | ||
121 | // browseForFiles->exec(); | ||
122 | // QString selFile= browseForFiles->selectedFileName; | ||
123 | // fileList=browseForFiles->fileList; | ||
124 | Config cfg("Gutenbrowser"); | 121 | Config cfg("Gutenbrowser"); |
@@ -141,23 +138,11 @@ OpenFileButton->setDown(TRUE); | |||
141 | 138 | ||
142 | // QStringList::ConstIterator f; | 139 | if( filer.right(4) == ".txt" || |
143 | // QString fileTemp; | 140 | filer.right(4) == ".TXT" || |
144 | // for ( f = fileList.begin(); f != fileList.end(); f++ ) { | 141 | filer.right(4) == ".etx" || |
145 | // fileTemp = *f; | 142 | filer.right(4) == ".ETX" || |
146 | // fileTemp.right( fileTemp.length()-5); | 143 | filer.right(4) == ".etx" || |
147 | // fileName = fileTemp; | 144 | filer.right(4) == ".ETX" || |
148 | // if( !fileName.isEmpty() ){ | 145 | filer.right(4) == ".zip" || |
149 | // filer = fileName; | 146 | filer.right(4) == ".ZIP" ) |
150 | // } else { //filename is empty | 147 | { |
151 | // // QString sMsg; | ||
152 | // // sMsg = "Error opening library filelist "+fileName; | ||
153 | // } | ||
154 | |||
155 | if( filer.right(4) == ".txt" | ||
156 | || filer.right(4) == ".TXT" | ||
157 | || filer.right(4) == ".etx" | ||
158 | || filer.right(4) == ".ETX" | ||
159 | || filer.right(4) == ".etx" | ||
160 | || filer.right(4) == ".ETX" | ||
161 | || filer.right(4) == ".zip" | ||
162 | || filer.right(4) == ".ZIP" ) { | ||
163 | QFileInfo zipFile( filer); | 148 | QFileInfo zipFile( filer); |
@@ -166,6 +151,6 @@ OpenFileButton->setDown(TRUE); | |||
166 | 151 | ||
167 | if( s_fileName.right(4) == ".zip") { // unzip that sucker.... | 152 | if( s_fileName.right(4) == ".zip") { // unzip the file |
168 | s_fileName = s_fileName.left( s_fileName.length() - 4); | 153 | s_fileName = s_fileName.left( s_fileName.length() - 4); |
169 | if( chdir((const char*)local_library.latin1())!=0) | 154 | if( chdir((const char*)local_library.latin1())!=0) |
170 | odebug << "chdir failed." << oendl; // QString cmd = "gunzip -d " + filer + " -d " + local_library; | 155 | odebug << "chdir failed." << oendl; |
171 | cmd = "gunzip -S .zip " + filer; | 156 | cmd = "gunzip -S .zip " + filer; |
@@ -173,9 +158,9 @@ OpenFileButton->setDown(TRUE); | |||
173 | system( cmd); | 158 | system( cmd); |
174 | } | 159 | } else { // else rename .txt to .etx |
175 | // this renames the .txt to .etx!! | ||
176 | else /*if( s_fileName.right(4) == ".txt" || if( s_fileName.right(4) == ".TXT"))*/ { | ||
177 | // odebug << "Filename is "+fileName << oendl; | 160 | // odebug << "Filename is "+fileName << oendl; |
178 | s_fileName = fileName; | 161 | s_fileName = fileName; |
179 | s_fileName.replace( s_fileName.length()-3,3,"gtn");// s_fileName.replace( s_fileName.length()-3,3,"etx"); | 162 | s_fileName.replace( s_fileName.length()-3,3,"gtn"); |
180 | rename(fileName.latin1(),s_fileName.latin1()); | 163 | if (rename(fileName.latin1(),s_fileName.latin1()) == -1) |
164 | owarn << "Rename of " << fileName.latin1() << " to " | ||
165 | << s_fileName.latin1() << " failed" << oendl; | ||
181 | fileName = s_fileName; | 166 | fileName = s_fileName; |
@@ -203,3 +188,6 @@ OpenFileButton->setDown(TRUE); | |||
203 | lnk.setFile(fileName); //sets File property | 188 | lnk.setFile(fileName); //sets File property |
204 | lnk.setType("guten/plain");// hey is this a REGISTERED mime type?!?!? ;D | 189 | // @bug This is probably not a registered MIME type. Perhaps we should |
190 | // set a valid MIME type here instead. Or maybe register .etx as a | ||
191 | // Gutenberge etext? | ||
192 | lnk.setType("guten/plain"); | ||
205 | lnk.setExec(fileName); | 193 | lnk.setExec(fileName); |
@@ -227,3 +215,2 @@ bool OpenEtext::FindTitle( QString filename) | |||
227 | bool findCheck = FALSE; | 215 | bool findCheck = FALSE; |
228 | // int Titlenumber=0; | ||
229 | 216 | ||
@@ -279,3 +266,2 @@ bool OpenEtext::FindTitle( QString filename) | |||
279 | if ( checkConf() == false && findCheck == TRUE) { | 266 | if ( checkConf() == false && findCheck == TRUE) { |
280 | |||
281 | config.setGroup( "Files"); | 267 | config.setGroup( "Files"); |
@@ -317,6 +303,6 @@ QString OpenEtext::titleFromLibrary( QString fileName) | |||
317 | int find2 = fileName.findRev(".gtn",-1,TRUE) - find1; | 303 | int find2 = fileName.findRev(".gtn",-1,TRUE) - find1; |
318 | if(find2==-1-find1) | 304 | if(find2== (-1-find1)) |
319 | int find2 = fileName.findRev(".etx",-1,TRUE) - find1; | 305 | find2 = fileName.findRev(".etx",-1,TRUE) - find1; |
320 | else if(find2==-1-find1) | 306 | else if(find2==(-1-find1)) |
321 | int find2 = fileName.findRev(".txt",-1,TRUE) - find1; | 307 | find2 = fileName.findRev(".txt",-1,TRUE) - find1; |
322 | 308 | ||
@@ -346,3 +332,2 @@ QString OpenEtext::titleFromLibrary( QString fileName) | |||
346 | title = indexLine.mid( 9, 50); | 332 | title = indexLine.mid( 9, 50); |
347 | // title = indexLine.mid( 26, indexLine.length() ); | ||
348 | title = title.stripWhiteSpace (); | 333 | title = title.stripWhiteSpace (); |
@@ -383,6 +368,8 @@ void OpenEtext::remove() | |||
383 | title_text=title_text.stripWhiteSpace(); | 368 | title_text=title_text.stripWhiteSpace(); |
384 | QString msg ="<p>Do you really want to REMOVE\n" +title_text +"?\nThis will not delete the file.</P>"; | 369 | QString msg ="<p>Do you really want to REMOVE\n" + title_text + |
385 | switch( QMessageBox::information( this, (tr("Remove Etext")), | 370 | "?\nThis will not delete the file.</P>"; |
386 | (tr(msg)), | 371 | switch( QMessageBox::information( this, tr("Remove Etext"), |
387 | (tr("&Yes")), (tr("&Cancel")), 0 )){ | 372 | tr(msg), |
373 | tr("&Yes"), tr("&Cancel"), 0 ) ) | ||
374 | { | ||
388 | case 0: // Yes clicked, | 375 | case 0: // Yes clicked, |
@@ -392,9 +379,10 @@ void OpenEtext::remove() | |||
392 | break; | 379 | break; |
393 | case 1: // Cancel | 380 | case 1: |
394 | break; | 381 | default: |
395 | }; | 382 | } |
396 | } | 383 | } |
397 | 384 | ||
398 | /* | 385 | /*! |
399 | this removes selected title entry*/ | 386 | * This removes selected title entry |
387 | */ | ||
400 | void OpenEtext::removeSelection() | 388 | void OpenEtext::removeSelection() |
@@ -438,7 +426,7 @@ void OpenEtext::removeSelection() | |||
438 | config.removeEntry(fileNum2); | 426 | config.removeEntry(fileNum2); |
439 | // remFile(); | ||
440 | } | 427 | } |
441 | 428 | ||
442 | /* | 429 | /*! |
443 | removes file title name from list and config file*/ | 430 | * Removes file title name from list and config file |
431 | */ | ||
444 | void OpenEtext::remFile() | 432 | void OpenEtext::remFile() |
@@ -463,3 +451,3 @@ void OpenEtext::remFile() | |||
463 | 451 | ||
464 | if (!s_filename2.isEmpty()) { | 452 | if (!s_filename2.isEmpty()) |
465 | config.writeEntry(fileNum, s_filename2 ); | 453 | config.writeEntry(fileNum, s_filename2 ); |
@@ -468,3 +456,2 @@ void OpenEtext::remFile() | |||
468 | } | 456 | } |
469 | } | ||
470 | config.writeEntry("NumberOfFiles", i_numofFiles - 1 ); | 457 | config.writeEntry("NumberOfFiles", i_numofFiles - 1 ); |
@@ -475,4 +462,5 @@ void OpenEtext::remFile() | |||
475 | 462 | ||
476 | /* | 463 | /*! |
477 | sorts the list*/ | 464 | * Sorts the list |
465 | */ | ||
478 | void OpenEtext::scan() { | 466 | void OpenEtext::scan() { |
@@ -512,3 +500,7 @@ void OpenEtext::editTitle() { | |||
512 | QListBox_1->removeItem(currentItem); | 500 | QListBox_1->removeItem(currentItem); |
513 | QListBox_1->insertItem ( QPixmap( QPEApplication::qpeDir()+"pics/gutenbrowser/gutenbrowser_sm.png"), titleEdit->newTitle, currentItem); | 501 | QListBox_1->insertItem ( |
502 | QPixmap( QPEApplication::qpeDir()+ | ||
503 | "pics/gutenbrowser/gutenbrowser_sm.png"), | ||
504 | titleEdit->newTitle, currentItem | ||
505 | ); | ||
514 | } | 506 | } |
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index 84d28ce..5f281b7 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp | |||
@@ -79,3 +79,3 @@ Lib::Lib( InitializationMode initMode, XineVideoWidget* widget ) | |||
79 | QFile f(configPath); | 79 | QFile f(configPath); |
80 | f.open(IO_WriteOnly); | 80 | if (f.open(IO_WriteOnly)) { |
81 | QTextStream ts( &f ); | 81 | QTextStream ts( &f ); |
@@ -93,2 +93,4 @@ Lib::Lib( InitializationMode initMode, XineVideoWidget* widget ) | |||
93 | f.close(); | 93 | f.close(); |
94 | } else | ||
95 | owarn << "Failed to open " f.name() << oendl; | ||
94 | } | 96 | } |
diff --git a/noncore/multimedia/opieplayer2/om3u.cpp b/noncore/multimedia/opieplayer2/om3u.cpp index 790fa09..f2a01d3 100644 --- a/noncore/multimedia/opieplayer2/om3u.cpp +++ b/noncore/multimedia/opieplayer2/om3u.cpp | |||
@@ -40,6 +40,9 @@ using namespace Opie::Core; | |||
40 | Om3u::Om3u( const QString &filePath, int mode) | 40 | Om3u::Om3u( const QString &filePath, int mode) |
41 | : QStringList (){ | 41 | : QStringList () |
42 | { | ||
42 | odebug << "<<<<<<<new m3u "+filePath << oendl; | 43 | odebug << "<<<<<<<new m3u "+filePath << oendl; |
43 | f.setName(filePath); | 44 | f.setName(filePath); |
44 | f.open(mode); | 45 | if (!f.open(mode)) { |
46 | owarn << "Unable to open file " << f.name() << oendl; | ||
47 | } | ||
45 | } | 48 | } |
@@ -85,8 +88,2 @@ void Om3u::readPls() { //it's a pls file | |||
85 | // odebug << "adding " + s + " to playlist" << oendl; | 88 | // odebug << "adding " + s + " to playlist" << oendl; |
86 | // numberofentries=2 | ||
87 | // File1=http | ||
88 | // Title | ||
89 | // Length | ||
90 | // Version | ||
91 | // File2=http | ||
92 | s = s.replace( QRegExp( "\\" ), "/" ); | 89 | s = s.replace( QRegExp( "\\" ), "/" ); |
@@ -103,5 +100,2 @@ void Om3u::readPls() { //it's a pls file | |||
103 | else { //if its a url | 100 | else { //if its a url |
104 | // if( name.right( 1 ).find( '/' ) == -1) { | ||
105 | // s += "/"; | ||
106 | // } | ||
107 | append(s); | 101 | append(s); |
@@ -122,3 +116,2 @@ void Om3u::write() { //writes list to m3u file | |||
122 | } | 116 | } |
123 | // f.close(); | ||
124 | } | 117 | } |
diff --git a/noncore/multimedia/opieplayer2/threadutil.cpp b/noncore/multimedia/opieplayer2/threadutil.cpp index b5cac61..5fc8a0b 100644 --- a/noncore/multimedia/opieplayer2/threadutil.cpp +++ b/noncore/multimedia/opieplayer2/threadutil.cpp | |||
@@ -235,8 +235,13 @@ void Thread::exit() | |||
235 | 235 | ||
236 | OnewayNotifier::OnewayNotifier() | 236 | OnewayNotifier::OnewayNotifier() : |
237 | m_readFd(-1), | ||
238 | m_writeFd(-1) | ||
237 | { | 239 | { |
238 | int fds[ 2 ]; | 240 | int fds[ 2 ] = { -1, -1 }; |
239 | pipe( fds ); | 241 | if (pipe( fds ) == 0) { |
240 | m_readFd = fds[ 0 ]; | 242 | m_readFd = fds[ 0 ]; |
241 | m_writeFd = fds[ 1 ]; | 243 | m_writeFd = fds[ 1 ]; |
244 | } else { | ||
245 | owarn << "Call to pipe() failed" << oendl; | ||
246 | } | ||
242 | 247 | ||
diff --git a/noncore/net/opiestumbler/opiestumbler.cpp b/noncore/net/opiestumbler/opiestumbler.cpp index 9b0d099..ab0b8d8 100644 --- a/noncore/net/opiestumbler/opiestumbler.cpp +++ b/noncore/net/opiestumbler/opiestumbler.cpp | |||
@@ -344,3 +344,4 @@ void OpieStumbler::slotAssociated() | |||
344 | *m_proc << "udhcpc" << "-f" << "-n" << "-i" << m_interface; | 344 | *m_proc << "udhcpc" << "-f" << "-n" << "-i" << m_interface; |
345 | m_proc->start(Opie::Core::OProcess::DontCare); | 345 | if (!m_proc->start(Opie::Core::OProcess::DontCare)) |
346 | owarn << "Execution of udhcpc returned false. Are paths correct?" << oendl; | ||
346 | QTimer::singleShot(5000, this, SLOT(slotCheckDHCP())); | 347 | QTimer::singleShot(5000, this, SLOT(slotCheckDHCP())); |
diff --git a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp index 650e634..e81f603 100644 --- a/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindow/mainwindowimp.cpp | |||
@@ -198,3 +198,4 @@ void MainWindowImp::getAllInterfaces() | |||
198 | { | 198 | { |
199 | procFile.open(IO_ReadOnly); | 199 | if (!procFile.open(IO_ReadOnly)) |
200 | owarn << "Failed to open proc file " << procFile.name() << oendl; | ||
200 | QString line; | 201 | QString line; |
@@ -734,3 +735,4 @@ void MainWindowImp::setHostname() | |||
734 | connect(&h,SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)),this,SLOT(slotHostname(Opie::Core::OProcess*,char*,int))); | 735 | connect(&h,SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)),this,SLOT(slotHostname(Opie::Core::OProcess*,char*,int))); |
735 | h.start(OProcess::Block,OProcess::Stderr); | 736 | if (!h.start(OProcess::Block,OProcess::Stderr)) |
737 | owarn << "Failed execution of 'hostname'. Are the paths correct?" << oendl; | ||
736 | odebug << "Got " << _procTemp << " - " << h.exitStatus() << oendl; | 738 | odebug << "Got " << _procTemp << " - " << h.exitStatus() << oendl; |
@@ -770,3 +772,4 @@ void MainWindowImp::initHostname() | |||
770 | connect(&h,SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)),this,SLOT(slotHostname(Opie::Core::OProcess*,char*,int))); | 772 | connect(&h,SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)),this,SLOT(slotHostname(Opie::Core::OProcess*,char*,int))); |
771 | h.start(OProcess::Block,OProcess::AllOutput); | 773 | if (!h.start(OProcess::Block,OProcess::AllOutput)) |
774 | owarn << "Could not execute 'hostname'. Are the paths correct?" oendl; | ||
772 | odebug << "Got " << _procTemp <<oendl; | 775 | odebug << "Got " << _procTemp <<oendl; |
diff --git a/noncore/settings/networksettings/ppp/modem.cpp b/noncore/settings/networksettings/ppp/modem.cpp index 7b2e2a3..17ada9b 100644 --- a/noncore/settings/networksettings/ppp/modem.cpp +++ b/noncore/settings/networksettings/ppp/modem.cpp | |||
@@ -770,4 +770,6 @@ bool Modem::createAuthFile(Auth method, const char *username, const char *passwo | |||
770 | 770 | ||
771 | rename(authfile, oldName); | 771 | if (rename(authfile, oldName) == -1) |
772 | rename(newName, authfile); | 772 | return false; |
773 | if (rename(newName, authfile) == -1) | ||
774 | return false; | ||
773 | 775 | ||