summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/LibraryDialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/LibraryDialog.cpp92
1 files changed, 48 insertions, 44 deletions
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
index 5b22b00..270a4cf 100644
--- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
+++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp
@@ -13,17 +13,21 @@
13// ***************************************************************************/ 13// ***************************************************************************/
14//ftp://ibiblio.org/pub/docs/books/gutenberg/GUTINDEX.ALL 14//ftp://ibiblio.org/pub/docs/books/gutenberg/GUTINDEX.ALL
15 15
16#include "LibraryDialog.h"
17#include "output.h"
18
19/* OPIE */
16#include <qpe/applnk.h> 20#include <qpe/applnk.h>
17#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
18#include <qpe/qpedialog.h> 22#include <qpe/qpedialog.h>
23#include <opie2/odebug.h>
19 24
20#include "LibraryDialog.h" 25/* QT */
21#include "output.h"
22
23#include <qpushbutton.h> 26#include <qpushbutton.h>
24#include <qmultilineedit.h> 27#include <qmultilineedit.h>
25//#include <qlayout.h> 28//#include <qlayout.h>
26 29
30/* STD */
27#include <unistd.h> 31#include <unistd.h>
28#include <stdio.h> 32#include <stdio.h>
29#include <stdlib.h> 33#include <stdlib.h>
@@ -64,7 +68,7 @@ LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, W
64 68
65 config.setGroup( "FTPsite" ); 69 config.setGroup( "FTPsite" );
66 ftp_host=config.readEntry("SiteName", "sailor.gutenberg.org"); 70 ftp_host=config.readEntry("SiteName", "sailor.gutenberg.org");
67 qDebug("Library Dialog: ftp_host is "+ftp_host); 71 odebug << "Library Dialog: ftp_host is "+ftp_host << oendl;
68 // ftp_host=ftp_host.right(ftp_host.length()-(ftp_host.find(") ",0,TRUE)+1) ); 72 // ftp_host=ftp_host.right(ftp_host.length()-(ftp_host.find(") ",0,TRUE)+1) );
69 // ftp_host=ftp_host.stripWhiteSpace(); 73 // ftp_host=ftp_host.stripWhiteSpace();
70 ftp_base_dir= config.readEntry("base", "/pub/gutenberg"); 74 ftp_base_dir= config.readEntry("base", "/pub/gutenberg");
@@ -77,7 +81,7 @@ LibraryDialog::LibraryDialog( QWidget* parent, const char* name , bool modal, W
77 81
78 config.setGroup("General"); 82 config.setGroup("General");
79 downDir =config.readEntry( "DownloadDirectory",local_library); 83 downDir =config.readEntry( "DownloadDirectory",local_library);
80 qDebug("downDir is "+downDir); 84 odebug << "downDir is "+downDir << oendl;
81 newindexLib.setName( old_index); 85 newindexLib.setName( old_index);
82 indexLib.setName( old_index); 86 indexLib.setName( old_index);
83 87
@@ -99,7 +103,7 @@ LibraryDialog::~LibraryDialog()
99void LibraryDialog::Newlibrary() 103void LibraryDialog::Newlibrary()
100{ 104{
101#ifndef Q_WS_QWS //sorry embedded gutenbrowser cant use zip files 105#ifndef Q_WS_QWS //sorry embedded gutenbrowser cant use zip files
102 //qDebug("Opening new library index %s",newindexLib); 106 //odebug << "Opening new library index " << newindexLib << "" << oendl;
103 if ( newindexLib.open( IO_ReadOnly) ) { 107 if ( newindexLib.open( IO_ReadOnly) ) {
104 setCaption( tr( "Library Index - using master pg index." ) );// file opened successfully 108 setCaption( tr( "Library Index - using master pg index." ) );// file opened successfully
105 QTextStream indexStream( &newindexLib ); 109 QTextStream indexStream( &newindexLib );
@@ -121,7 +125,7 @@ void LibraryDialog::Newlibrary()
121 getAuthor(); // groks author 125 getAuthor(); // groks author
122 author = author.stripWhiteSpace(); 126 author = author.stripWhiteSpace();
123 if (authBox->isChecked()) { // this reverses the first name and last name of the author 127 if (authBox->isChecked()) { // this reverses the first name and last name of the author
124 // qDebug("Sorting last name first"); 128 // odebug << "Sorting last name first" << oendl;
125 QString lastName, firstName=""; 129 QString lastName, firstName="";
126 int finder=author.findRev( ' ', -1, TRUE); 130 int finder=author.findRev( ' ', -1, TRUE);
127 lastName=author.right( author.length()-finder); 131 lastName=author.right( author.length()-finder);
@@ -180,7 +184,7 @@ void LibraryDialog::Library()
180 ListView4->clear(); 184 ListView4->clear();
181 ListView5->clear(); 185 ListView5->clear();
182 186
183 qDebug("opening GUTINDEX.ALL file"); 187 odebug << "opening GUTINDEX.ALL file" << oendl;
184 IDontKnowWhy = ""; 188 IDontKnowWhy = "";
185 if ( indexLib.open( IO_ReadOnly) ) { // file opened successfully 189 if ( indexLib.open( IO_ReadOnly) ) { // file opened successfully
186 QTextStream indexStream( &indexLib ); 190 QTextStream indexStream( &indexLib );
@@ -200,17 +204,17 @@ void LibraryDialog::Library()
200 file.remove(1,1); 204 file.remove(1,1);
201 if( file.find("]",0,TRUE) != -1) 205 if( file.find("]",0,TRUE) != -1)
202 file = file.left( file.find("]",0,TRUE)); 206 file = file.left( file.find("]",0,TRUE));
203 //qDebug("file is "+file); 207 //odebug << "file is "+file << oendl;
204 /// number = indexLine.mid( indexLine.find( "]", 0, TRUE ) +1, indexLine.find( " ", 0, TRUE )+1 ); 208 /// number = indexLine.mid( indexLine.find( "]", 0, TRUE ) +1, indexLine.find( " ", 0, TRUE )+1 );
205 number = indexLine.mid(55,5); 209 number = indexLine.mid(55,5);
206 number = number.stripWhiteSpace(); 210 number = number.stripWhiteSpace();
207 // title = indexLine.mid( indexLine.find(" ", 26, TRUE), indexLine.length() ); 211 // title = indexLine.mid( indexLine.find(" ", 26, TRUE), indexLine.length() );
208 title = indexLine.mid( 9, 50 ); 212 title = indexLine.mid( 9, 50 );
209 title = title.stripWhiteSpace(); 213 title = title.stripWhiteSpace();
210 //qDebug("title is "+title); 214 //odebug << "title is "+title << oendl;
211 getAuthor(); // grok author 215 getAuthor(); // grok author
212 author = author.stripWhiteSpace(); 216 author = author.stripWhiteSpace();
213 //qDebug("author is "+author); 217 //odebug << "author is "+author << oendl;
214 if (authBox->isChecked() == TRUE) { // this reverses the first name and last name of the author 218 if (authBox->isChecked() == TRUE) { // this reverses the first name and last name of the author
215 QString lastName, firstName=""; 219 QString lastName, firstName="";
216 int finder=author.findRev( ' ', -1, TRUE); 220 int finder=author.findRev( ' ', -1, TRUE);
@@ -397,14 +401,14 @@ void LibraryDialog::select_title( QListViewItem * item)
397 if(DlglistItemTitle.length()>2) { 401 if(DlglistItemTitle.length()>2) {
398 // DlglistItemNumber = item->text(0); 402 // DlglistItemNumber = item->text(0);
399 item = 0; 403 item = 0;
400 qDebug( "string from librarydialog is:%s %s %s", DlglistItemYear.latin1(),DlglistItemFile.latin1(),DlglistItemNumber.latin1()); 404 odebug << "string from librarydialog is:" << DlglistItemYear << " " << DlglistItemFile << " " << DlglistItemNumber << "" << oendl;
401 qDebug("Title is "+DlglistItemTitle); 405 odebug << "Title is "+DlglistItemTitle << oendl;
402 406
403 // check for connection here 407 // check for connection here
404 // if( get_extext()) 408 // if( get_extext())
405 409
406 if(download_Etext()) { 410 if(download_Etext()) {
407 // qDebug("get here 2"); 411 // odebug << "get here 2" << oendl;
408 if(i_binary == 1) { 412 if(i_binary == 1) {
409 413
410 } 414 }
@@ -423,7 +427,7 @@ bool LibraryDialog::download_Etext()
423 ftp_host=cfg.readEntry("SiteName", "sailor.gutenberg.org"); 427 ftp_host=cfg.readEntry("SiteName", "sailor.gutenberg.org");
424 ftp_base_dir= cfg.readEntry("base", "/pub/gutenberg"); 428 ftp_base_dir= cfg.readEntry("base", "/pub/gutenberg");
425 429
426 qDebug("about to network dialog"); 430 odebug << "about to network dialog" << oendl;
427 QString NewlistItemNumber, NewlistItemYear, ls_result, result_line, s, dir, networkUrl, outputFile; 431 QString NewlistItemNumber, NewlistItemYear, ls_result, result_line, s, dir, networkUrl, outputFile;
428 432
429 //////////////////// FIXME- if 'x' is part of real name.... 433 //////////////////// FIXME- if 'x' is part of real name....
@@ -431,11 +435,11 @@ bool LibraryDialog::download_Etext()
431 435
432 if( NewlistItemFile.find( DlglistItemFile.left(4) ,0,TRUE) ==-1 ) { 436 if( NewlistItemFile.find( DlglistItemFile.left(4) ,0,TRUE) ==-1 ) {
433 NewlistItemFile.replace( 0,4, DlglistItemFile.left(4)); 437 NewlistItemFile.replace( 0,4, DlglistItemFile.left(4));
434 qDebug("NewlistItemFile is now "+NewlistItemFile); 438 odebug << "NewlistItemFile is now "+NewlistItemFile << oendl;
435 } 439 }
436 NewlistItemYear = DlglistItemYear.right(2); 440 NewlistItemYear = DlglistItemYear.right(2);
437 int NewlistItemYear_Int = NewlistItemYear.toInt(0, 10); 441 int NewlistItemYear_Int = NewlistItemYear.toInt(0, 10);
438 qDebug(NewlistItemYear); 442 odebug << NewlistItemYear << oendl;
439 if (NewlistItemYear_Int < 91 && NewlistItemYear_Int > 70) { 443 if (NewlistItemYear_Int < 91 && NewlistItemYear_Int > 70) {
440 NewlistItemYear = "90"; 444 NewlistItemYear = "90";
441 } 445 }
@@ -447,8 +451,8 @@ bool LibraryDialog::download_Etext()
447 networkUrl= "ftp://"+ftp_host+dir; 451 networkUrl= "ftp://"+ftp_host+dir;
448 452
449 outputFile=local_library+".guten_temp"; 453 outputFile=local_library+".guten_temp";
450 //qDebug("Download file:%s",NewlistItemFile.latin1() ); 454 //odebug << "Download file:" << NewlistItemFile << "" << oendl;
451 qDebug("Checking: "+ftp_host+" "+dir+" "+outputFile+" "+NewlistItemFile); 455 odebug << "Checking: "+ftp_host+" "+dir+" "+outputFile+" "+NewlistItemFile << oendl;
452 QStringList networkList; 456 QStringList networkList;
453 networkList.append((const char *)ftp_host); 457 networkList.append((const char *)ftp_host);
454 networkList.append((const char *)dir); 458 networkList.append((const char *)dir);
@@ -462,18 +466,18 @@ bool LibraryDialog::download_Etext()
462 466
463 if( NetworkDlg->exec() != 0 ) { // use new, improved, *INSTANT* network-dialog-file-getterer 467 if( NetworkDlg->exec() != 0 ) { // use new, improved, *INSTANT* network-dialog-file-getterer
464 File_Name= NetworkDlg->localFileName; 468 File_Name= NetworkDlg->localFileName;
465 qDebug("back to Library from Network Dialog"); 469 odebug << "back to Library from Network Dialog" << oendl;
466 qDebug("Just downloaded "+NetworkDlg->localFileName); 470 odebug << "Just downloaded "+NetworkDlg->localFileName << oendl;
467 471
468 // if (File_Name.find( local_library, 0, TRUE) != -1 ) { //could not be found 472 // if (File_Name.find( local_library, 0, TRUE) != -1 ) { //could not be found
469 // QString oldName=File_Name; 473 // QString oldName=File_Name;
470 // File_Name.replace(0,local_library.length(),downDir); 474 // File_Name.replace(0,local_library.length(),downDir);
471 // qDebug("File_Name now is "+File_Name); 475 // odebug << "File_Name now is "+File_Name << oendl;
472 476
473 // } 477 // }
474 // rename .txt to .etx 478 // rename .txt to .etx
475 if(NetworkDlg->successDownload) { 479 if(NetworkDlg->successDownload) {
476 qDebug("Filename is "+File_Name); 480 odebug << "Filename is "+File_Name << oendl;
477 if(File_Name.right(4)==".txt") { 481 if(File_Name.right(4)==".txt") {
478 QString s_fileName=File_Name; 482 QString s_fileName=File_Name;
479 s_fileName.replace( s_fileName.length()-3,3,"gtn"); 483 s_fileName.replace( s_fileName.length()-3,3,"gtn");
@@ -481,7 +485,7 @@ bool LibraryDialog::download_Etext()
481 rename(File_Name.latin1(),s_fileName.latin1()); 485 rename(File_Name.latin1(),s_fileName.latin1());
482 File_Name=s_fileName; 486 File_Name=s_fileName;
483 487
484 qDebug("Filename is now "+File_Name); 488 odebug << "Filename is now "+File_Name << oendl;
485 489
486 } 490 }
487 if(File_Name.length() > 5 ) { 491 if(File_Name.length() > 5 ) {
@@ -490,20 +494,20 @@ bool LibraryDialog::download_Etext()
490 QString name_file=fi.fileName(); 494 QString name_file=fi.fileName();
491 name_file=name_file.left(name_file.length()-4); 495 name_file=name_file.left(name_file.length()-4);
492 496
493 qDebug("Setting doclink"); 497 odebug << "Setting doclink" << oendl;
494 DocLnk lnk; 498 DocLnk lnk;
495 qDebug("name is "+name_file); 499 odebug << "name is "+name_file << oendl;
496 lnk.setName(name_file); //sets file name 500 lnk.setName(name_file); //sets file name
497 qDebug("Title is "+DlglistItemTitle); 501 odebug << "Title is "+DlglistItemTitle << oendl;
498 lnk.setComment(DlglistItemTitle); 502 lnk.setComment(DlglistItemTitle);
499 503
500 qDebug("Filename is "+File_Name); 504 odebug << "Filename is "+File_Name << oendl;
501 lnk.setFile(File_Name); //sets File property 505 lnk.setFile(File_Name); //sets File property
502 lnk.setType("guten/plain");// hey is this a REGISTERED mime type?!?!? ;D 506 lnk.setType("guten/plain");// hey is this a REGISTERED mime type?!?!? ;D
503 lnk.setExec(File_Name); 507 lnk.setExec(File_Name);
504 lnk.setIcon("gutenbrowser/Gutenbrowser"); 508 lnk.setIcon("gutenbrowser/Gutenbrowser");
505 if(!lnk.writeLink()) { 509 if(!lnk.writeLink()) {
506 qDebug("Writing doclink did not work"); 510 odebug << "Writing doclink did not work" << oendl;
507 } else { 511 } else {
508 } 512 }
509 } else 513 } else
@@ -570,14 +574,14 @@ void LibraryDialog::cancelIt()
570bool LibraryDialog::setTitle() 574bool LibraryDialog::setTitle()
571{ 575{
572 Config config("Gutenbrowser"); 576 Config config("Gutenbrowser");
573 qDebug("setting title"); 577 odebug << "setting title" << oendl;
574 qDebug(DlglistItemTitle); 578 odebug << DlglistItemTitle << oendl;
575 579
576 if( DlglistItemTitle.find("[",0,TRUE) != -1) 580 if( DlglistItemTitle.find("[",0,TRUE) != -1)
577 DlglistItemTitle.replace(DlglistItemTitle.find("[",0,TRUE),1, "(" ); 581 DlglistItemTitle.replace(DlglistItemTitle.find("[",0,TRUE),1, "(" );
578 if( DlglistItemTitle.find("]",0,TRUE) !=-1) 582 if( DlglistItemTitle.find("]",0,TRUE) !=-1)
579 DlglistItemTitle.replace(DlglistItemTitle.find("]",0,TRUE),1, ")" ); 583 DlglistItemTitle.replace(DlglistItemTitle.find("]",0,TRUE),1, ")" );
580 qDebug("Title being set is "+DlglistItemTitle); 584 odebug << "Title being set is "+DlglistItemTitle << oendl;
581 int test = 0; 585 int test = 0;
582 QString ramble, temp; 586 QString ramble, temp;
583 config.setGroup("Files"); 587 config.setGroup("Files");
@@ -738,7 +742,7 @@ void LibraryDialog::onButtonSearch()
738 SearchResultsDialog->showMaximized(); 742 SearchResultsDialog->showMaximized();
739 if( SearchResultsDialog->exec() != 0) { 743 if( SearchResultsDialog->exec() != 0) {
740 texter = SearchResultsDialog->selText; 744 texter = SearchResultsDialog->selText;
741 // qDebug(texter); 745 // odebug << texter << oendl;
742 resultLs= SearchResultsDialog->resultsList; 746 resultLs= SearchResultsDialog->resultsList;
743 i_berger = 1; 747 i_berger = 1;
744 } 748 }
@@ -749,7 +753,7 @@ void LibraryDialog::onButtonSearch()
749 QString tester; 753 QString tester;
750 for ( QStringList::Iterator it = resultLs.begin(); it != resultLs.end(); ++it ) { 754 for ( QStringList::Iterator it = resultLs.begin(); it != resultLs.end(); ++it ) {
751 texter.sprintf("%s \n",(*it).latin1()); 755 texter.sprintf("%s \n",(*it).latin1());
752 // qDebug(texter); 756 // odebug << texter << oendl;
753 if( tester!=texter) 757 if( tester!=texter)
754 parseSearchResults( texter); 758 parseSearchResults( texter);
755 tester = texter; 759 tester = texter;
@@ -806,7 +810,7 @@ void LibraryDialog::parseSearchResults( QString resultStr)
806 810
807 // int exit=QMessageBox::information(this, "Unzip?", "Ok to unzip "+ zipFile+" ?", QMessageBox::Yes, QMessageBox::No); 811 // int exit=QMessageBox::information(this, "Unzip?", "Ok to unzip "+ zipFile+" ?", QMessageBox::Yes, QMessageBox::No);
808 // if (exit==QMessageBox::Yes) { 812 // if (exit==QMessageBox::Yes) {
809 // qDebug("Issuing the command "+cmd); 813 // odebug << "Issuing the command "+cmd << oendl;
810 // #if defined(_WS_WIN_) 814 // #if defined(_WS_WIN_)
811 // WinExec( cmd, SW_HIDE ); 815 // WinExec( cmd, SW_HIDE );
812 // #endif 816 // #endif
@@ -840,7 +844,7 @@ void LibraryDialog::sort()
840 Downloads the current selected listitem*/ 844 Downloads the current selected listitem*/
841bool LibraryDialog::getItem(QListViewItem *it) 845bool LibraryDialog::getItem(QListViewItem *it)
842{ 846{
843 // qDebug("selected getItem"); 847 // odebug << "selected getItem" << oendl;
844 848
845 // DlglistItemNumber = it->text(0); 849 // DlglistItemNumber = it->text(0);
846 DlglistItemTitle = it->text(0); 850 DlglistItemTitle = it->text(0);
@@ -858,7 +862,7 @@ bool LibraryDialog::getItem(QListViewItem *it)
858 download button is pushed so we get the current items to download*/ 862 download button is pushed so we get the current items to download*/
859bool LibraryDialog::onButtonDownload() 863bool LibraryDialog::onButtonDownload()
860{ 864{
861 // qDebug("selected onButtonDownloadz"); 865 // odebug << "selected onButtonDownloadz" << oendl;
862 866
863 QListViewItemIterator it1( ListView1 ); 867 QListViewItemIterator it1( ListView1 );
864 QListViewItemIterator it2( ListView2 ); 868 QListViewItemIterator it2( ListView2 );
@@ -900,7 +904,7 @@ bool LibraryDialog::onButtonDownload()
900 handles the sorting combo box */ 904 handles the sorting combo box */
901void LibraryDialog::comboSelect(int index) 905void LibraryDialog::comboSelect(int index)
902{ 906{
903 // qDebug("we are sorting"); 907 // odebug << "we are sorting" << oendl;
904 ListView1->setSorting( index, TRUE); 908 ListView1->setSorting( index, TRUE);
905 ListView2->setSorting( index, TRUE); 909 ListView2->setSorting( index, TRUE);
906 ListView3->setSorting( index, TRUE); 910 ListView3->setSorting( index, TRUE);
@@ -930,7 +934,7 @@ void LibraryDialog::newList()
930 QDir gutDir(QPEApplication::qpeDir()+"etc/gutenbrowser"); 934 QDir gutDir(QPEApplication::qpeDir()+"etc/gutenbrowser");
931 if(!gutDir.exists()) gutDir.mkdir(QPEApplication::qpeDir()+"etc/gutenbrowser",true); 935 if(!gutDir.exists()) gutDir.mkdir(QPEApplication::qpeDir()+"etc/gutenbrowser",true);
932 if( chdir(QPEApplication::qpeDir()+"etc/gutenbrowser") == 0) { 936 if( chdir(QPEApplication::qpeDir()+"etc/gutenbrowser") == 0) {
933 qDebug("changing dir "+QPEApplication::qpeDir()+"etc/gutenbrowser"); 937 odebug << "changing dir "+QPEApplication::qpeDir()+"etc/gutenbrowser" << oendl;
934 QString gutenindex1 = QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL"; 938 QString gutenindex1 = QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL";
935 QString cmd="wget -O " + gutenindex1 + " http://sailor.gutenberg.org/GUTINDEX.ALL 2>&1"; 939 QString cmd="wget -O " + gutenindex1 + " http://sailor.gutenberg.org/GUTINDEX.ALL 2>&1";
936 940
@@ -951,7 +955,7 @@ void LibraryDialog::newList()
951 fp = popen( (const char *) cmd, "r"); 955 fp = popen( (const char *) cmd, "r");
952 if ( !fp ) { 956 if ( !fp ) {
953 } else { 957 } else {
954 qDebug("Issuing the command\n"+cmd); 958 odebug << "Issuing the command\n"+cmd << oendl;
955 // system(cmd); 959 // system(cmd);
956 while ( fgets( line, sizeof line, fp)) { 960 while ( fgets( line, sizeof line, fp)) {
957 outDlg->OutputEdit->append(line); 961 outDlg->OutputEdit->append(line);
@@ -965,7 +969,7 @@ void LibraryDialog::newList()
965 // if( QFile(gutenindex1).exists() ) { 969 // if( QFile(gutenindex1).exists() ) {
966 // QString gutenindex=QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL"; 970 // QString gutenindex=QPEApplication::qpeDir()+"etc/gutenbrowser/GUTINDEX.ALL";
967 // if( rename(gutenindex1.latin1(),gutenindex.latin1()) !=0) 971 // if( rename(gutenindex1.latin1(),gutenindex.latin1()) !=0)
968 // qDebug("renaming error"); 972 // odebug << "renaming error" << oendl;
969 // } 973 // }
970 974
971 } 975 }
@@ -1024,7 +1028,7 @@ bool LibraryDialog::moreInfo()
1024 } 1028 }
1025 item=0; 1029 item=0;
1026 if(titleString.length()>2) { 1030 if(titleString.length()>2) {
1027 qDebug( "Title is "+titleString ); 1031 odebug << "Title is "+titleString << oendl;
1028 titleString.replace( QRegExp("\\s"), "%20"); 1032 titleString.replace( QRegExp("\\s"), "%20");
1029 titleString.replace( QRegExp("'"), "%20"); 1033 titleString.replace( QRegExp("'"), "%20");
1030 titleString.replace( QRegExp("\""), "%20"); 1034 titleString.replace( QRegExp("\""), "%20");
@@ -1048,12 +1052,12 @@ void LibraryDialog::FindLibrary()
1048 if( QFile( new_index).exists() /* && this->isHidden() */) { 1052 if( QFile( new_index).exists() /* && this->isHidden() */) {
1049 newindexLib.setName( new_index); 1053 newindexLib.setName( new_index);
1050 indexLib.setName( new_index); 1054 indexLib.setName( new_index);
1051 qDebug("index file is "+ new_index); 1055 odebug << "index file is "+ new_index << oendl;
1052 Newlibrary(); 1056 Newlibrary();
1053 } else { 1057 } else {
1054 newindexLib.setName( old_index); 1058 newindexLib.setName( old_index);
1055 indexLib.setName( old_index); 1059 indexLib.setName( old_index);
1056 qDebug("new index nameis "+ old_index); 1060 odebug << "new index nameis "+ old_index << oendl;
1057 Library(); 1061 Library();
1058 } 1062 }
1059 indexLoaded=true; 1063 indexLoaded=true;