summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/importexport/csv/kexicsvexport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/importexport/csv/kexicsvexport.cpp')
-rw-r--r--kexi/plugins/importexport/csv/kexicsvexport.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/kexi/plugins/importexport/csv/kexicsvexport.cpp b/kexi/plugins/importexport/csv/kexicsvexport.cpp
index b83f85a7f..5af3d8edb 100644
--- a/kexi/plugins/importexport/csv/kexicsvexport.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvexport.cpp
@@ -30,9 +30,9 @@
#include <kexiutils/utils.h>
#include <widget/kexicharencodingcombobox.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qclipboard.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -50,28 +50,28 @@ Options::Options()
{
}
-bool Options::assign( QMap<QString,QString>& args )
+bool Options::assign( TQMap<TQString,TQString>& args )
{
mode = (args["destinationType"]=="file")
? KexiCSVExport::File : KexiCSVExport::Clipboard;
- if (args.contains("delimiter"))
+ if (args.tqcontains("delimiter"))
delimiter = args["delimiter"];
else
delimiter = (mode==File) ? KEXICSV_DEFAULT_FILE_DELIMITER : KEXICSV_DEFAULT_CLIPBOARD_DELIMITER;
- if (args.contains("textQuote"))
+ if (args.tqcontains("textQuote"))
textQuote = args["textQuote"];
else
- textQuote = (mode==File) ? KEXICSV_DEFAULT_FILE_TEXT_QUOTE : KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE;
+ textQuote = (mode==File) ? KEXICSV_DEFAULT_FILE_TEXT_TQUOTE : KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE;
bool ok;
itemId = args["itemId"].toInt(&ok);
if (!ok || itemId<=0)
return false;
- if (args.contains("forceDelimiter"))
+ if (args.tqcontains("forceDelimiter"))
forceDelimiter = args["forceDelimiter"];
- if (args.contains("addColumnNames"))
+ if (args.tqcontains("addColumnNames"))
addColumnNames = (args["addColumnNames"]=="1");
return true;
}
@@ -79,7 +79,7 @@ bool Options::assign( QMap<QString,QString>& args )
//------------------------------------
bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
- const Options& options, int rowCount, QTextStream *predefinedTextStream)
+ const Options& options, int rowCount, TQTextStream *predefinedTextStream)
{
KexiDB::Connection* conn = tableOrQuery.connection();
if (!conn)
@@ -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 /*UNIQUE*/)
+//! @todo OPTIMIZATION: use fieldsExpanded(true /*UNITQUE*/)
//! @todo OPTIMIZATION? (avoid multiple data retrieving) look for already fetched data within KexiProject..
KexiDB::QuerySchema* query = tableOrQuery.query();
@@ -103,15 +103,15 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
query = tableOrQuery.table()->query();
KexiDB::QueryColumnInfo::Vector fields( query->fieldsExpanded( KexiDB::QuerySchema::WithInternalFields ) );
- QString buffer;
+ TQString buffer;
KSaveFile *kSaveFile = 0;
- QTextStream *stream = 0;
+ TQTextStream *stream = 0;
const bool copyToClipboard = options.mode==Clipboard;
if (copyToClipboard) {
//! @todo (during exporting): enlarge bufSize by factor of 2 when it became too small
- uint bufSize = QMIN((rowCount<0 ? 10 : rowCount) * fields.count() * 20, 128000);
+ uint bufSize = TQMIN((rowCount<0 ? 10 : rowCount) * fields.count() * 20, 128000);
buffer.reserve( bufSize );
if (buffer.capacity() < bufSize) {
kdWarning() << "KexiCSVExportWizard::exportData() cannot allocate memory for " << bufSize
@@ -154,10 +154,10 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
// 0. Cache information
const uint fieldsCount = query->fieldsExpanded().count(); //real fields count without internals
- const QCString delimiter( options.delimiter.left(1).latin1() );
+ const TQCString delimiter( options.delimiter.left(1).latin1() );
const bool hasTextQuote = !options.textQuote.isEmpty();
- const QString textQuote( options.textQuote.left(1) );
- const QCString escapedTextQuote( (textQuote + textQuote).latin1() ); //ok?
+ const TQString textQuote( options.textQuote.left(1) );
+ const TQCString escapedTextQuote( (textQuote + textQuote).latin1() ); //ok?
//cache for faster checks
bool *isText = new bool[fieldsCount];
bool *isDateTime = new bool[fieldsCount];
@@ -193,7 +193,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
if (i>0)
APPEND( delimiter );
if (hasTextQuote){
- APPEND( textQuote + fields[i]->captionOrAliasOrName().replace(textQuote, escapedTextQuote) + textQuote );
+ APPEND( textQuote + fields[i]->captionOrAliasOrName().tqreplace(textQuote, escapedTextQuote) + textQuote );
}
else {
APPEND( fields[i]->captionOrAliasOrName() );
@@ -209,7 +209,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
_ERR;
}
for (cursor->moveFirst(); !cursor->eof() && !cursor->error(); cursor->moveNext()) {
- const uint realFieldCount = QMIN(cursor->fieldCount(), fieldsCount);
+ const uint realFieldCount = TQMIN(cursor->fieldCount(), fieldsCount);
for (uint i=0; i<realFieldCount; i++) {
const uint real_i = visibleFieldIndex[i];
if (i>0)
@@ -218,7 +218,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
continue;
if (isText[real_i]) {
if (hasTextQuote)
- APPEND( textQuote + QString(cursor->value(real_i).toString()).replace(textQuote, escapedTextQuote) + textQuote );
+ APPEND( textQuote + TQString(cursor->value(real_i).toString()).tqreplace(textQuote, escapedTextQuote) + textQuote );
else
APPEND( cursor->value(real_i).toString() );
}
@@ -252,7 +252,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
}
if (copyToClipboard)
- kapp->clipboard()->setText(buffer, QClipboard::Clipboard);
+ kapp->tqclipboard()->setText(buffer, TQClipboard::Clipboard);
delete [] isText;
delete [] isDateTime;