diff options
author | Timothy Pearson <[email protected]> | 2011-12-15 15:34:15 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-15 15:34:15 -0600 |
commit | 031454e56009d576589c28757f6c6fcf4884095e (patch) | |
tree | ad4c9959d05a814c9090e8fe63ba27057903271b /src/listviewcomparison.cpp | |
parent | 54011e0e1af8cd96162160ecf5d361a59a2c733e (diff) | |
download | tellico-031454e56009d576589c28757f6c6fcf4884095e.tar.gz tellico-031454e56009d576589c28757f6c6fcf4884095e.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/listviewcomparison.cpp')
-rw-r--r-- | src/listviewcomparison.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/listviewcomparison.cpp b/src/listviewcomparison.cpp index e15b1d8..b78de94 100644 --- a/src/listviewcomparison.cpp +++ b/src/listviewcomparison.cpp @@ -51,7 +51,7 @@ Tellico::ListViewComparison* Tellico::ListViewComparison::create(Data::ConstFiel } else if(field_->formatFlag() == Data::Field::FormatTitle) { // Dependent could be title, so put this test after return new TitleComparison(field_); - } else if(field_->property(TQString::tqfromLatin1("lcc")) == Latin1Literal("true") || + } else if(field_->property(TQString::fromLatin1("lcc")) == Latin1Literal("true") || (field_->name() == Latin1Literal("lcc") && Data::Document::self()->collection() && (Data::Document::self()->collection()->type() == Data::Collection::Book || @@ -119,15 +119,15 @@ int Tellico::NumberComparison::compare(const TQString& str1_, const TQString& st // http://www.mcgees.org/2001/08/08/sort-by-library-of-congress-call-number-in-perl/ Tellico::LCCComparison::LCCComparison(Data::ConstFieldPtr field) : StringComparison(field), - m_regexp(TQString::tqfromLatin1("^([A-Z]+)(\\d+(?:\\.\\d+)?)\\.?([A-Z]*)(\\d*)\\.?([A-Z]*)(\\d*)(?: (\\d\\d\\d\\d))?")) { + m_regexp(TQString::fromLatin1("^([A-Z]+)(\\d+(?:\\.\\d+)?)\\.?([A-Z]*)(\\d*)\\.?([A-Z]*)(\\d*)(?: (\\d\\d\\d\\d))?")) { } int Tellico::LCCComparison::compare(const TQString& str1_, const TQString& str2_) { // myDebug() << "LCCComparison::compare() - " << str1_ << " to " << str2_ << endl; int pos1 = m_regexp.search(str1_); - const TQStringList cap1 = m_regexp.tqcapturedTexts(); + const TQStringList cap1 = m_regexp.capturedTexts(); int pos2 = m_regexp.search(str2_); - const TQStringList cap2 = m_regexp.tqcapturedTexts(); + const TQStringList cap2 = m_regexp.capturedTexts(); if(pos1 > -1 && pos2 > -1) { int res = compareLCC(cap1, cap2); // myLog() << "...result = " << res << endl; @@ -142,11 +142,11 @@ int Tellico::LCCComparison::compareLCC(const TQStringList& cap1, const TQStringL return (res = cap1[1].compare(cap2[1])) != 0 ? res : (res = compareFloat(cap1[2], cap2[2])) != 0 ? res : (res = cap1[3].compare(cap2[3])) != 0 ? res : - (res = compareFloat(TQString::tqfromLatin1("0.") + cap1[4], - TQString::tqfromLatin1("0.") + cap2[4])) != 0 ? res : + (res = compareFloat(TQString::fromLatin1("0.") + cap1[4], + TQString::fromLatin1("0.") + cap2[4])) != 0 ? res : (res = cap1[5].compare(cap2[5])) != 0 ? res : - (res = compareFloat(TQString::tqfromLatin1("0.") + cap1[6], - TQString::tqfromLatin1("0.") + cap2[6])) != 0 ? res : + (res = compareFloat(TQString::fromLatin1("0.") + cap1[6], + TQString::fromLatin1("0.") + cap2[6])) != 0 ? res : (res = compareFloat(cap1[7], cap2[7])) != 0 ? res : 0; } @@ -241,9 +241,9 @@ int Tellico::ISODateComparison::compare(const TQString& str1, const TQString& st // and accounting for "current year - 1 - 1" default scheme TQStringList dlist1 = TQStringList::split('-', str1, true); bool ok = true; - int y1 = dlist1.count() > 0 ? dlist1[0].toInt(&ok) : TQDate::tqcurrentDate().year(); + int y1 = dlist1.count() > 0 ? dlist1[0].toInt(&ok) : TQDate::currentDate().year(); if(!ok) { - y1 = TQDate::tqcurrentDate().year(); + y1 = TQDate::currentDate().year(); } int m1 = dlist1.count() > 1 ? dlist1[1].toInt(&ok) : 1; if(!ok) { @@ -256,9 +256,9 @@ int Tellico::ISODateComparison::compare(const TQString& str1, const TQString& st TQDate date1(y1, m1, d1); TQStringList dlist2 = TQStringList::split('-', str2, true); - int y2 = dlist2.count() > 0 ? dlist2[0].toInt(&ok) : TQDate::tqcurrentDate().year(); + int y2 = dlist2.count() > 0 ? dlist2[0].toInt(&ok) : TQDate::currentDate().year(); if(!ok) { - y2 = TQDate::tqcurrentDate().year(); + y2 = TQDate::currentDate().year(); } int m2 = dlist2.count() > 1 ? dlist2[1].toInt(&ok) : 1; if(!ok) { |