diff options
author | Timothy Pearson <[email protected]> | 2012-01-13 13:15:14 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-01-13 13:15:14 -0600 |
commit | 735d75d6ce19269dc5faa00abc8f88ff30ce2f23 (patch) | |
tree | 4e85ad9cc0479892232125234c6b71c4f17ac611 /kexi/plugins/importexport/csv/kexicsvimportdialog.cpp | |
parent | b180811d9a814c638032f77aaf02e84a3126328c (diff) | |
download | koffice-735d75d6ce19269dc5faa00abc8f88ff30ce2f23.tar.gz koffice-735d75d6ce19269dc5faa00abc8f88ff30ce2f23.zip |
Fix inadvertent TQt string conversions
This closes Bug 782
Diffstat (limited to 'kexi/plugins/importexport/csv/kexicsvimportdialog.cpp')
-rw-r--r-- | kexi/plugins/importexport/csv/kexicsvimportdialog.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp index 0e5f6e4c..3f1cb6a3 100644 --- a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp +++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp @@ -156,7 +156,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin, m_cancelled( false ), m_adjustRows( true ), m_startline( 0 ), - m_textquote( TQString(KEXICSV_DEFAULT_FILE_TEXT_TQUOTE)[0] ), + m_textquote( TQString(KEXICSV_DEFAULT_FILE_TEXT_QUOTE)[0] ), m_mode(mode), m_prevSelectedCol(-1), m_columnsAdjusted(false), @@ -554,9 +554,9 @@ TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextS bool insideQuote = false; //characters by priority - const int CH_TAB_AFTER_TQUOTE = 500; - const int CH_SEMICOLON_AFTER_TQUOTE = 499; - const int CH_COMMA_AFTER_TQUOTE = 498; + const int CH_TAB_AFTER_QUOTE = 500; + const int CH_SEMICOLON_AFTER_QUOTE = 499; + const int CH_COMMA_AFTER_QUOTE = 498; const int CH_TAB = 200; // \t const int CH_SEMICOLON = 199; // ; const int CH_COMMA = 198; // , @@ -588,15 +588,15 @@ TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextS } else if (c=='\t') { tabs++; - detectedDelimiter = TQMAX( prevChar=='"' ? CH_TAB_AFTER_TQUOTE : CH_TAB, detectedDelimiter ); + detectedDelimiter = TQMAX( prevChar=='"' ? CH_TAB_AFTER_QUOTE : CH_TAB, detectedDelimiter ); } else if (c==';') { semicolons++; - detectedDelimiter = TQMAX( prevChar=='"' ? CH_SEMICOLON_AFTER_TQUOTE : CH_SEMICOLON, detectedDelimiter ); + detectedDelimiter = TQMAX( prevChar=='"' ? CH_SEMICOLON_AFTER_QUOTE : CH_SEMICOLON, detectedDelimiter ); } else if (c==',') { commas++; - detectedDelimiter = TQMAX( prevChar=='"' ? CH_COMMA_AFTER_TQUOTE : CH_COMMA, detectedDelimiter ); + detectedDelimiter = TQMAX( prevChar=='"' ? CH_COMMA_AFTER_QUOTE : CH_COMMA, detectedDelimiter ); } prevChar = c; } @@ -634,11 +634,11 @@ TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextS return ","; } //now return the winning character by looking at CH_* symbol - if (detectedDelimiter == CH_TAB_AFTER_TQUOTE || detectedDelimiter == CH_TAB) + if (detectedDelimiter == CH_TAB_AFTER_QUOTE || detectedDelimiter == CH_TAB) return "\t"; - if (detectedDelimiter == CH_SEMICOLON_AFTER_TQUOTE || detectedDelimiter == CH_SEMICOLON) + if (detectedDelimiter == CH_SEMICOLON_AFTER_QUOTE || detectedDelimiter == CH_SEMICOLON) return ";"; - if (detectedDelimiter == CH_COMMA_AFTER_TQUOTE || detectedDelimiter == CH_COMMA) + if (detectedDelimiter == CH_COMMA_AFTER_QUOTE || detectedDelimiter == CH_COMMA) return ","; return KEXICSV_DEFAULT_FILE_DELIMITER; //<-- default @@ -647,7 +647,7 @@ TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextS tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, int &maxColumn, bool inGUI) { - enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD, + enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD, S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START; field = TQString(); const bool ignoreDups = m_ignoreDuplicates->isChecked(); @@ -717,7 +717,7 @@ tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, i case S_START : if (x == m_textquote) { - state = S_TQUOTED_FIELD; + state = S_QUOTED_FIELD; } else if (x == delimiter) { @@ -745,10 +745,10 @@ tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, i state = S_MAYBE_NORMAL_FIELD; } break; - case S_TQUOTED_FIELD : + case S_QUOTED_FIELD : if (x == m_textquote) { - state = S_MAYBE_END_OF_TQUOTED_FIELD; + state = S_MAYBE_END_OF_QUOTED_FIELD; } /*allow \n inside quoted fields else if (x == '\n') @@ -774,11 +774,11 @@ tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, i field += x; } break; - case S_MAYBE_END_OF_TQUOTED_FIELD : + case S_MAYBE_END_OF_QUOTED_FIELD : if (x == m_textquote) { field += x; //no, this was just escaped quote character - state = S_TQUOTED_FIELD; + state = S_QUOTED_FIELD; } else if (x == delimiter || x == '\n') { @@ -800,10 +800,10 @@ tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, i } else { - state = S_END_OF_TQUOTED_FIELD; + state = S_END_OF_QUOTED_FIELD; } break; - case S_END_OF_TQUOTED_FIELD : + case S_END_OF_QUOTED_FIELD : if (x == delimiter || x == '\n') { setText(row - m_startline, column, field, inGUI); @@ -824,14 +824,14 @@ tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, i } else { - state = S_END_OF_TQUOTED_FIELD; + state = S_END_OF_QUOTED_FIELD; } break; case S_MAYBE_NORMAL_FIELD : if (x == m_textquote) { field = TQString(); - state = S_TQUOTED_FIELD; + state = S_QUOTED_FIELD; break; } case S_NORMAL_FIELD : |