diff options
Diffstat (limited to 'src/translators/onixexporter.cpp')
-rw-r--r-- | src/translators/onixexporter.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/translators/onixexporter.cpp b/src/translators/onixexporter.cpp index 65b85ee..713a96a 100644 --- a/src/translators/onixexporter.cpp +++ b/src/translators/onixexporter.cpp @@ -42,14 +42,14 @@ using Tellico::Export::ONIXExporter; ONIXExporter::ONIXExporter() : Tellico::Export::Exporter(), m_handler(0), - m_xsltFile(TQString::tqfromLatin1("tellico2onix.xsl")), + m_xsltFile(TQString::fromLatin1("tellico2onix.xsl")), m_includeImages(true), m_widget(0) { } ONIXExporter::ONIXExporter(Data::CollPtr coll_) : Tellico::Export::Exporter(coll_), m_handler(0), - m_xsltFile(TQString::tqfromLatin1("tellico2onix.xsl")), + m_xsltFile(TQString::fromLatin1("tellico2onix.xsl")), m_includeImages(true), m_widget(0) { } @@ -80,18 +80,18 @@ bool ONIXExporter::exec() { KZip zip(TQT_TQIODEVICE(&buf)); zip.open(IO_WriteOnly); - zip.writeFile(TQString::tqfromLatin1("onix.xml"), TQString(), TQString(), xml.length(), xml); + zip.writeFile(TQString::fromLatin1("onix.xml"), TQString(), TQString(), xml.length(), xml); // use a dict for fast random access to keep track of which images were written to the file if(m_includeImages) { // for now, we're ignoring (options() & Export::ExportImages) - const TQString cover = TQString::tqfromLatin1("cover"); + const TQString cover = TQString::fromLatin1("cover"); StringSet imageSet; for(Data::EntryVec::ConstIterator it = entries().begin(); it != entries().end(); ++it) { const Data::Image& img = ImageFactory::imageById(it->field(cover)); if(!img.isNull() && !imageSet.has(img.id()) && (img.format() == "JPEG" || img.format() == "JPG" || img.format() == "GIF")) { /// onix only understands jpeg and gif TQByteArray ba = img.byteArray(); - zip.writeFile(TQString::tqfromLatin1("images/") + it->field(cover), + zip.writeFile(TQString::fromLatin1("images/") + it->field(cover), TQString(), TQString(), ba.size(), ba); imageSet.add(img.id()); } @@ -140,8 +140,8 @@ TQString ONIXExporter::text() { delete m_handler; m_handler = new XSLTHandler(dom, TQFile::encodeName(xsltfile)); - TQDateTime now = TQDateTime::tqcurrentDateTime(); - m_handler->addStringParam("sentDate", now.toString(TQString::tqfromLatin1("yyyyMMddhhmm")).utf8()); + TQDateTime now = TQDateTime::currentDateTime(); + m_handler->addStringParam("sentDate", now.toString(TQString::fromLatin1("yyyyMMddhhmm")).utf8()); m_handler->addStringParam("version", VERSION); @@ -155,7 +155,7 @@ TQString ONIXExporter::text() { exporter.setOptions(options() | Export::ExportUTF8); TQDomDocument output = exporter.exportXML(); #if 0 - TQFile f(TQString::tqfromLatin1("/tmp/test.xml")); + TQFile f(TQString::fromLatin1("/tmp/test.xml")); if(f.open(IO_WriteOnly)) { TQTextStream t(&f); t << output.toString(); @@ -185,14 +185,14 @@ TQWidget* ONIXExporter::widget(TQWidget* parent_, const char* name_/*=0*/) { } void ONIXExporter::readOptions(KConfig* config_) { - KConfigGroup group(config_, TQString::tqfromLatin1("ExportOptions - %1").tqarg(formatString())); + KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); m_includeImages = group.readBoolEntry("Include Images", m_includeImages); } void ONIXExporter::saveOptions(KConfig* config_) { m_includeImages = m_checkIncludeImages->isChecked(); - KConfigGroup group(config_, TQString::tqfromLatin1("ExportOptions - %1").tqarg(formatString())); + KConfigGroup group(config_, TQString::fromLatin1("ExportOptions - %1").tqarg(formatString())); group.writeEntry("Include Images", m_includeImages); } |