-rw-r--r-- | noncore/apps/opie-gutenbrowser/LibraryDialog.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp index 9858188..6c246e97 100644 --- a/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp +++ b/noncore/apps/opie-gutenbrowser/LibraryDialog.cpp | |||
@@ -757,50 +757,51 @@ void LibraryDialog::onButtonSearch() | |||
757 | accept(); | 757 | accept(); |
758 | } else { | 758 | } else { |
759 | setActiveWindow(); | 759 | setActiveWindow(); |
760 | } | 760 | } |
761 | } | 761 | } |
762 | 762 | ||
763 | /* | 763 | /* |
764 | splits the result string and calls download for the current search result*/ | 764 | splits the result string and calls download for the current search result*/ |
765 | void LibraryDialog::parseSearchResults( QString resultStr) | 765 | void LibraryDialog::parseSearchResults( QString resultStr) |
766 | { | 766 | { |
767 | int stringLeng = resultStr.length(); | 767 | int stringLeng = resultStr.length(); |
768 | 768 | ||
769 | QString my; | 769 | QString my; |
770 | my.setNum( stringLeng, 10); | 770 | my.setNum( stringLeng, 10); |
771 | 771 | ||
772 | if( resultStr.length() > 2 && resultStr.length() < 130) { | 772 | if( resultStr.length() > 2 && resultStr.length() < 130) { |
773 | QStringList token = QStringList::split(" : ", resultStr); | ||
773 | 774 | ||
774 | int titleInt = resultStr.find( " : ", 0, true); | 775 | DlglistItemTitle = token[0]; |
775 | DlglistItemTitle = resultStr.left( titleInt); | 776 | DlglistItemTitle = DlglistItemTitle.stripWhiteSpace(); |
776 | 777 | ||
777 | int yearInt = resultStr.find( " : ", titleInt+3, true); | 778 | DlglistItemYear = token[1]; |
778 | 779 | DlglistItemYear = DlglistItemYear.stripWhiteSpace(); | |
779 | DlglistItemYear = resultStr.mid( titleInt+3, (yearInt - titleInt)-3); | 780 | |
780 | 781 | DlglistItemFile = token[2]; | |
781 | DlglistItemFile = resultStr.right( resultStr.length() - (yearInt + 3)); | 782 | |
782 | DlglistItemFile = DlglistItemFile.left( DlglistItemFile.length() - 2); | 783 | DlglistItemFile = DlglistItemFile.stripWhiteSpace(); |
783 | 784 | ||
784 | cleanStrings(); | 785 | // qWarning(DlglistItemYear); |
786 | |||
785 | 787 | ||
786 | if(DlglistItemFile.left(1) == "/") | 788 | if(DlglistItemFile.left(1) == "/") |
787 | DlglistItemFile = DlglistItemFile.right( DlglistItemFile.length() - 1); | 789 | DlglistItemFile = DlglistItemFile.right( DlglistItemFile.length() - 1); |
788 | 790 | ||
789 | 791 | if(DlglistItemFile.toInt() > 10000 || DlglistItemYear == "1980" ) { | |
790 | if(DlglistItemFile.toInt() > 10000 || yearInt == 1980 ) { | ||
791 | // new directory sturcture | 792 | // new directory sturcture |
792 | download_newEtext(); //) | 793 | download_newEtext(); //) |
793 | } else { | 794 | } else { |
794 | download_Etext(); //) | 795 | download_Etext(); //) |
795 | } | 796 | } |
796 | } | 797 | } |
797 | } | 798 | } |
798 | 799 | ||
799 | void LibraryDialog::sortLists(int index) | 800 | void LibraryDialog::sortLists(int index) |
800 | { | 801 | { |
801 | 802 | ||
802 | ListView1->setSorting(index); | 803 | ListView1->setSorting(index); |
803 | ListView2->setSorting(index); | 804 | ListView2->setSorting(index); |
804 | ListView3->setSorting(index); | 805 | ListView3->setSorting(index); |
805 | ListView4->setSorting(index); | 806 | ListView4->setSorting(index); |
806 | ListView5->setSorting(index); | 807 | ListView5->setSorting(index); |