summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/importexport/csv
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-13 13:15:14 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-13 13:15:14 -0600
commit735d75d6ce19269dc5faa00abc8f88ff30ce2f23 (patch)
tree4e85ad9cc0479892232125234c6b71c4f17ac611 /kexi/plugins/importexport/csv
parentb180811d9a814c638032f77aaf02e84a3126328c (diff)
downloadkoffice-735d75d6ce19269dc5faa00abc8f88ff30ce2f23.tar.gz
koffice-735d75d6ce19269dc5faa00abc8f88ff30ce2f23.zip
Fix inadvertent TQt string conversions
This closes Bug 782
Diffstat (limited to 'kexi/plugins/importexport/csv')
-rw-r--r--kexi/plugins/importexport/csv/kexicsvexport.cpp4
-rw-r--r--kexi/plugins/importexport/csv/kexicsvexportwizard.cpp4
-rw-r--r--kexi/plugins/importexport/csv/kexicsvimportdialog.cpp40
-rw-r--r--kexi/plugins/importexport/csv/kexicsvwidgets.h4
4 files changed, 26 insertions, 26 deletions
diff --git a/kexi/plugins/importexport/csv/kexicsvexport.cpp b/kexi/plugins/importexport/csv/kexicsvexport.cpp
index 37e30e04..c5c46560 100644
--- a/kexi/plugins/importexport/csv/kexicsvexport.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvexport.cpp
@@ -63,7 +63,7 @@ bool Options::assign( TQMap<TQString,TQString>& args )
if (args.contains("textQuote"))
textQuote = args["textQuote"];
else
- textQuote = (mode==File) ? KEXICSV_DEFAULT_FILE_TEXT_TQUOTE : KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE;
+ textQuote = (mode==File) ? KEXICSV_DEFAULT_FILE_TEXT_QUOTE : KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE;
bool ok;
itemId = args["itemId"].toInt(&ok);
@@ -95,7 +95,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
//! @todo look at rowCount whether the data is really large;
//! if so: avoid copying to clipboard (or ask user) because of system memory
-//! @todo OPTIMIZATION: use fieldsExpanded(true /*UNITQUE*/)
+//! @todo OPTIMIZATION: use fieldsExpanded(true /*UNIQUE*/)
//! @todo OPTIMIZATION? (avoid multiple data retrieving) look for already fetched data within KexiProject..
KexiDB::QuerySchema* query = tableOrQuery.query();
diff --git a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp
index 4a11d1d7..72292afc 100644
--- a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp
@@ -424,8 +424,8 @@ TQString KexiCSVExportWizard::defaultDelimiter() const
TQString KexiCSVExportWizard::defaultTextQuote() const
{
if (m_options.mode==KexiCSVExport::Clipboard)
- return KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE;
- return KEXICSV_DEFAULT_FILE_TEXT_TQUOTE;
+ return KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE;
+ return KEXICSV_DEFAULT_FILE_TEXT_QUOTE;
}
#include "kexicsvexportwizard.moc"
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 :
diff --git a/kexi/plugins/importexport/csv/kexicsvwidgets.h b/kexi/plugins/importexport/csv/kexicsvwidgets.h
index 76f76d31..388e6246 100644
--- a/kexi/plugins/importexport/csv/kexicsvwidgets.h
+++ b/kexi/plugins/importexport/csv/kexicsvwidgets.h
@@ -27,8 +27,8 @@ class KLineEdit;
class KActiveLabel;
class TQLabel;
-#define KEXICSV_DEFAULT_FILE_TEXT_TQUOTE "\""
-#define KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE ""
+#define KEXICSV_DEFAULT_FILE_TEXT_QUOTE "\""
+#define KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE ""
#define KEXICSV_DEFAULT_FILE_DELIMITER ","
#define KEXICSV_DEFAULT_CLIPBOARD_DELIMITER "\t"
#define KEXICSV_DEFAULT_FILE_DELIMITER_INDEX 0