summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/LibraryDialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/LibraryDialog.cpp12
1 files changed, 7 insertions, 5 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
@@ -20,7 +20,7 @@
#include <qpe/applnk.h>
#include <qpe/qpeapplication.h>
#include <qpe/qpedialog.h>
-//#include <opie2///odebug.h>
+#include <opie2/odebug.h>
/* QT */
#include <qpushbutton.h>
@@ -472,8 +472,12 @@ bool LibraryDialog::getEtext(const QStringList &networkList)
if(File_Name.right(4) == ".txt") {
QString s_fileName = File_Name;
s_fileName.replace( s_fileName.length() - 3, 3, "gtn");
- // s_fileName.replace( s_fileName.length()-3,3,"etx");
- rename( File_Name.latin1(), s_fileName.latin1());
+ if (rename( File_Name.latin1(), s_fileName.latin1()) == 1) {
+ owarn << "Failed to rename " << File_Name.latin1() << " to "
+ << s_fileName.latin1() << oendl;
+ return false;
+ }
+
File_Name = s_fileName;
//odebug << "Filename is now "+File_Name << oendl;
@@ -499,7 +503,6 @@ bool LibraryDialog::getEtext(const QStringList &networkList)
lnk.setIcon("gutenbrowser/Gutenbrowser");
if(!lnk.writeLink()) {
//odebug << "Writing doclink did not work" << oendl;
- } else {
}
} else
QMessageBox::message("Note","<p>There was an error with the file</p>");
@@ -701,7 +704,6 @@ void LibraryDialog::onButtonSearch()
int i_berger = 0;
if( searchDlg->exec() != 0 ) {
QString searcherStr = searchDlg->get_text();
- int fluff = 0;
bool cS;
if( searchDlg->caseSensitiveCheckBox->isChecked())