summaryrefslogtreecommitdiffstats
path: root/src/isbnvalidator.cpp
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2014-03-03 13:46:44 +0100
committerSlávek Banko <[email protected]>2014-03-03 13:46:44 +0100
commit2e02da046d3e56cdf4744f644af35ad07424f48b (patch)
treef2dcf353aa2338eae1c2ff2c41af971c580c2762 /src/isbnvalidator.cpp
parent3c13229d98167ae4ae0710d5eeef23fef5005bf0 (diff)
downloadtellico-2e02da046d3e56cdf4744f644af35ad07424f48b.tar.gz
tellico-2e02da046d3e56cdf4744f644af35ad07424f48b.zip
Update to upstream version 1.3.6
Diffstat (limited to 'src/isbnvalidator.cpp')
-rw-r--r--src/isbnvalidator.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/isbnvalidator.cpp b/src/isbnvalidator.cpp
index 4832cdd..d6ae49f 100644
--- a/src/isbnvalidator.cpp
+++ b/src/isbnvalidator.cpp
@@ -12,6 +12,7 @@
***************************************************************************/
#include "isbnvalidator.h"
+#include "upcvalidator.h"
#include "tellico_debug.h"
using Tellico::ISBNValidator;
@@ -58,6 +59,13 @@ ISBNValidator::ISBNValidator(TQObject* parent_, const char* name_/*=0*/)
}
TQValidator::State ISBNValidator::validate(TQString& input_, int& pos_) const {
+ // check if it's a cuecat first
+ State catState = CueCat::decode(input_);
+ if(catState != Invalid) {
+ pos_ = input_.length();
+ return catState;
+ }
+
if(input_.startsWith(TQString::fromLatin1("978")) ||
input_.startsWith(TQString::fromLatin1("979"))) {
return validate13(input_, pos_);