author | llornkcor <llornkcor> | 2005-02-06 04:30:34 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2005-02-06 04:30:34 (UTC) |
commit | 60a856903eb688b56c61fa787ac26b6be9f6d6c4 (patch) (side-by-side diff) | |
tree | 81848a11c6b006ed4b6ac5a036de8402dde8e25d | |
parent | e23dd592fc71aa22c449363231eac2f8ebd2a45b (diff) | |
download | opie-60a856903eb688b56c61fa787ac26b6be9f6d6c4.zip opie-60a856903eb688b56c61fa787ac26b6be9f6d6c4.tar.gz opie-60a856903eb688b56c61fa787ac26b6be9f6d6c4.tar.bz2 |
fix #1494 - download of file when search is canceled
-rw-r--r-- | noncore/apps/opie-gutenbrowser/LibraryDialog.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp index 3c096ed..7426e80 100644 --- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp @@ -587,32 +587,35 @@ bool LibraryDialog::setTitle() int test = 0; QString ramble, temp; config.setGroup("Files"); QString s_numofFiles = config.readEntry("NumberOfFiles", "0" ); int i_numofFiles = s_numofFiles.toInt(); for ( int i = 0; i <= i_numofFiles; i++){ temp.setNum( i); ramble = config.readEntry( temp, "" ); if( strcmp( ramble, File_Name) == 0){ test = 1; } } + + if(test == 0 ) { + config.setGroup("Files"); config.writeEntry( "NumberOfFiles", i_numofFiles +1 ); QString interger; interger.setNum( i_numofFiles +1); config.writeEntry( interger, File_Name); config.setGroup( "Titles" ); config.writeEntry( File_Name, DlglistItemTitle); - + } test = 0; return true; } void LibraryDialog::saveConfig() { Config config("Gutenbrowser"); if( httpBox->isChecked() == TRUE) { checked = 1; config.setGroup( "Proxy" ); config.writeEntry("IsChecked", "TRUE"); @@ -738,24 +741,26 @@ void LibraryDialog::onButtonSearch() tabWidget->setCurrentPage( curTab); Searchlist.sort(); SearchResultsDlg* SearchResultsDialog; SearchResultsDialog = new SearchResultsDlg( searchDlg, "Results Dialog", true, 0 , Searchlist); SearchResultsDialog->showMaximized(); if( SearchResultsDialog->exec() != 0) { texter = SearchResultsDialog->selText; // odebug << texter << oendl; resultLs= SearchResultsDialog->resultsList; i_berger = 1; + } else { + resultLs.clear(); } Searchlist.clear(); // if(SearchResultsDialog) // delete SearchResultsDialog; QString tester; for ( QStringList::Iterator it = resultLs.begin(); it != resultLs.end(); ++it ) { texter.sprintf("%s \n",(*it).latin1()); // odebug << texter << oendl; if( tester!=texter) parseSearchResults( texter); tester = texter; |