diff options
Diffstat (limited to 'src/translators/pilotdb')
-rw-r--r-- | src/translators/pilotdb/pilotdb.cpp | 8 | ||||
-rw-r--r-- | src/translators/pilotdb/pilotdb.h | 4 | ||||
-rw-r--r-- | src/translators/pilotdb/strop.cpp | 32 |
3 files changed, 22 insertions, 22 deletions
diff --git a/src/translators/pilotdb/pilotdb.cpp b/src/translators/pilotdb/pilotdb.cpp index d7779e4..b42cb6a 100644 --- a/src/translators/pilotdb/pilotdb.cpp +++ b/src/translators/pilotdb/pilotdb.cpp @@ -17,7 +17,7 @@ #include <kdebug.h> -#include <qbuffer.h> +#include <tqbuffer.h> using namespace PalmLib; using Tellico::Export::PilotDB; @@ -42,8 +42,8 @@ PilotDB::~PilotDB() { } } -QByteArray PilotDB::data() { - QBuffer b; +TQByteArray PilotDB::data() { + TQBuffer b; b.open(IO_WriteOnly); pi_char_t buf[PI_HDR_SIZE]; @@ -53,7 +53,7 @@ QByteArray PilotDB::data() { for(int i=0; i<32; ++i) { buf[i] = 0; } - memcpy(buf, name().c_str(), QMIN(31, name().length())); + memcpy(buf, name().c_str(), TQMIN(31, name().length())); set_short(buf + 32, flags()); set_short(buf + 34, version()); set_long(buf + 36, creation_time()); diff --git a/src/translators/pilotdb/pilotdb.h b/src/translators/pilotdb/pilotdb.h index dd21c7b..871b6bb 100644 --- a/src/translators/pilotdb/pilotdb.h +++ b/src/translators/pilotdb/pilotdb.h @@ -23,7 +23,7 @@ #include "libpalm/Database.h" #include "libflatfile/Field.h" -#include <qcstring.h> +#include <tqcstring.h> namespace Tellico { namespace Export { @@ -36,7 +36,7 @@ public: PilotDB(); ~PilotDB(); - QByteArray data(); + TQByteArray data(); /** * Return the total number of records/resources in this database. diff --git a/src/translators/pilotdb/strop.cpp b/src/translators/pilotdb/strop.cpp index b8c7f55..3b0deeb 100644 --- a/src/translators/pilotdb/strop.cpp +++ b/src/translators/pilotdb/strop.cpp @@ -167,7 +167,7 @@ std::string StrOps::strip_front(const std::string& str,const std::string& what) StrOps::string_list_t StrOps::csv_to_array(const std::string& str, char delim, bool quoted_string) { - enum { STATE_NORMAL, STATE_QUOTES } state; + enum { STATE_NORMAL, STATE_TQUOTES } state; StrOps::string_list_t result; std::string elem; @@ -176,7 +176,7 @@ StrOps::string_list_t StrOps::csv_to_array(const std::string& str, char delim, b switch (state) { case STATE_NORMAL: if (quoted_string && *p == '"') { - state = STATE_QUOTES; + state = STATE_TQUOTES; } else if (*p == delim) { result.push_back(elem); elem = ""; @@ -185,7 +185,7 @@ StrOps::string_list_t StrOps::csv_to_array(const std::string& str, char delim, b } break; - case STATE_QUOTES: + case STATE_TQUOTES: if (quoted_string && *p == '"') { if ((p + 1) != str.end() && *(p+1) == '"') { ++p; @@ -204,7 +204,7 @@ StrOps::string_list_t StrOps::csv_to_array(const std::string& str, char delim, b case STATE_NORMAL: result.push_back(elem); break; - case STATE_QUOTES: + case STATE_TQUOTES: kdDebug() << "unterminated quotes" << endl; break; } @@ -216,8 +216,8 @@ StrOps::string_list_t StrOps::str_to_array(const std::string& str, const std::string& delim, bool multiple_delim, bool handle_comments) { - enum { STATE_NORMAL, STATE_COMMENT, STATE_QUOTE_DOUBLE, STATE_QUOTE_SINGLE, - STATE_BACKSLASH, STATE_BACKSLASH_DOUBLEQUOTE } state; + enum { STATE_NORMAL, STATE_COMMENT, STATE_TQUOTE_DOUBLE, STATE_TQUOTE_SINGLE, + STATE_BACKSLASH, STATE_BACKSLASH_DOUBLETQUOTE } state; StrOps::string_list_t result; std::string elem; @@ -226,9 +226,9 @@ StrOps::str_to_array(const std::string& str, const std::string& delim, switch (state) { case STATE_NORMAL: if (*p == '"') { - state = STATE_QUOTE_DOUBLE; + state = STATE_TQUOTE_DOUBLE; } else if (*p == '\'') { - state = STATE_QUOTE_SINGLE; + state = STATE_TQUOTE_SINGLE; } else if (std::find(delim.begin(), delim.end(), *p) != delim.end()) { if (multiple_delim) { ++p; @@ -252,16 +252,16 @@ StrOps::str_to_array(const std::string& str, const std::string& delim, case STATE_COMMENT: break; - case STATE_QUOTE_DOUBLE: + case STATE_TQUOTE_DOUBLE: if (*p == '"') state = STATE_NORMAL; else if (*p == '\\') - state = STATE_BACKSLASH_DOUBLEQUOTE; + state = STATE_BACKSLASH_DOUBLETQUOTE; else elem += *p; break; - case STATE_QUOTE_SINGLE: + case STATE_TQUOTE_SINGLE: if (*p == '\'') state = STATE_NORMAL; else @@ -273,7 +273,7 @@ StrOps::str_to_array(const std::string& str, const std::string& delim, state = STATE_NORMAL; break; - case STATE_BACKSLASH_DOUBLEQUOTE: + case STATE_BACKSLASH_DOUBLETQUOTE: switch (*p) { case '\\': elem += '\\'; @@ -329,7 +329,7 @@ StrOps::str_to_array(const std::string& str, const std::string& delim, } // Escape is done. Go back to the normal double quote state. - state = STATE_QUOTE_DOUBLE; + state = STATE_TQUOTE_DOUBLE; break; } } @@ -339,16 +339,16 @@ StrOps::str_to_array(const std::string& str, const std::string& delim, result.push_back(elem); break; - case STATE_QUOTE_DOUBLE: + case STATE_TQUOTE_DOUBLE: kdDebug() << "unterminated double quotes" << endl; break; - case STATE_QUOTE_SINGLE: + case STATE_TQUOTE_SINGLE: kdDebug() << "unterminated single quotes" << endl; break; case STATE_BACKSLASH: - case STATE_BACKSLASH_DOUBLEQUOTE: + case STATE_BACKSLASH_DOUBLETQUOTE: kdDebug() << "an escape character must follow a backslash" << endl; break; |