From 3b34e5cf56262c9f54a3bcf02ee5ad93ca0fb05b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 10:00:09 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit d6331f1b56eb6dca7a1950658b2932f208015da0. --- kbabel/common/catalog.cpp | 54 +++++++++++++++++++-------------------- kbabel/common/catalog.h | 20 +++++++-------- kbabel/common/catalogfileplugin.h | 8 +++--- kbabel/common/catalogitem.cpp | 4 +-- kbabel/common/catalogsettings.cpp | 2 +- kbabel/common/importplugin.cpp | 4 +-- kbabel/common/kbmailer.cpp | 6 ++--- kbabel/common/msgfmt.cpp | 10 ++++---- kbabel/common/msgfmt.h | 6 ++--- kbabel/common/poinfo.cpp | 18 ++++++------- kbabel/common/poinfo.h | 6 ++--- 11 files changed, 69 insertions(+), 69 deletions(-) (limited to 'kbabel/common') diff --git a/kbabel/common/catalog.cpp b/kbabel/common/catalog.cpp index 7470ad87..00c9491d 100644 --- a/kbabel/common/catalog.cpp +++ b/kbabel/common/catalog.cpp @@ -31,13 +31,13 @@ your version. **************************************************************************** */ -#include +#include #include #include #include #include #include -#include +#include #include #include @@ -497,7 +497,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const } temp="X-Generator: KBabel %1\\n"; - temp=temp.arg(VERSION); + temp=temp.tqarg(VERSION); found=false; for( it = headerList.begin(); it != headerList.end(); ++it ) @@ -533,7 +533,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const temp="Plural-Forms: %1\\n"; - temp=temp.arg(identityOptions.gnuPluralFormHeader); + temp=temp.tqarg(identityOptions.gnuPluralFormHeader); found=false; // update plural form header @@ -578,12 +578,12 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const if( saveOptions.FSFCopyright == ProjectSettingsBase::Remove) (*it).remove(" YEAR Free Software Foundation, Inc"); else - (*it).replace("YEAR", TQDate::currentDate().toString("yyyy")); + (*it).replace("YEAR", TQDate::tqcurrentDate().toString("yyyy")); } else if( saveOptions.FSFCopyright == ProjectSettingsBase::Update ) { //update years - TQString cy = TQDate::currentDate().toString("yyyy"); + TQString cy = TQDate::tqcurrentDate().toString("yyyy"); if( !(*it).contains( TQRegExp(cy)) ) // is the year already included? { int index = (*it).findRev( TQRegExp("[\\d]+[\\d\\-, ]*") ); @@ -674,7 +674,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const { temp+=(" <"+identityOptions.authorEmail+">"); } - temp+=", "+TQDate::currentDate().toString("yyyy")+"."; + temp+=", "+TQDate::tqcurrentDate().toString("yyyy")+"."; // ### TODO: it would be nice if the entry could start with "COPYRIGHT" and have the "(C)" symbol (both not mandatory) TQRegExp regexpAuthorYear( "^#.*(<.+@.+>)?,\\s*([\\d]+[\\d\\-, ]*|YEAR)" ); @@ -721,7 +721,7 @@ CatalogItem Catalog::updatedHeader(CatalogItem oldHeader, bool usePrefs) const found = false; bool foundAuthor = false; - const TQString cy = TQDate::currentDate().toString("yyyy"); + const TQString cy = TQDate::tqcurrentDate().toString("yyyy"); ait = foundAuthors.end(); for( it = foundAuthors.begin() ; it!=foundAuthors.end(); ++it ) @@ -816,7 +816,7 @@ void Catalog::setFuzzy(uint index, bool on) } -void Catalog::removeFuzzyStatus(uint index) +void Catalog::removeFuzzytqStatus(uint index) { setFuzzy(index,false); } @@ -888,10 +888,10 @@ TQString Catalog::encoding() const return encodingStr; } -ConversionStatus Catalog::openURL(const KURL& url, const TQString& package) +ConversiontqStatus Catalog::openURL(const KURL& url, const TQString& package) { TQString target; - ConversionStatus error = OK; + ConversiontqStatus error = OK; if(KIO::NetAccess::download(url, target, NULL)) { @@ -992,10 +992,10 @@ ConversionStatus Catalog::openURL(const KURL& url, const TQString& package) } } -ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, const TQString& package) +ConversiontqStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, const TQString& package) { TQString target; - ConversionStatus error = OK; + ConversiontqStatus error = OK; if(KIO::NetAccess::download(openUrl, target, NULL)) { @@ -1093,7 +1093,7 @@ ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, cons } } -Msgfmt::Status Catalog::checkSyntax(TQString& output, bool clearErrors) +Msgfmt::tqStatus Catalog::checkSyntax(TQString& output, bool clearErrors) { if( !d->_mimeTypes.contains( "application/x-gettext" ) ) return Msgfmt::Unsupported; @@ -1112,7 +1112,7 @@ Msgfmt::Status Catalog::checkSyntax(TQString& output, bool clearErrors) } Msgfmt msgfmt; - Msgfmt::Status result = msgfmt.checkSyntax( filename , output, pluralFormType() != KDESpecific ); + Msgfmt::tqStatus result = msgfmt.checkSyntax( filename , output, pluralFormType() != KDESpecific ); if( clearErrors) clearErrorList(); @@ -1185,7 +1185,7 @@ void Catalog::removeFromErrorList(uint index) } } -TQStringList Catalog::itemStatus(uint index, bool recheck, TQPtrList whatToCheck) +TQStringList Catalog::itemtqStatus(uint index, bool recheck, TQPtrList whatToCheck) { if ( d->_entries.isEmpty() ) return TQStringList(); @@ -1207,7 +1207,7 @@ TQStringList Catalog::itemStatus(uint index, bool recheck, TQPtrList return item.errors(); } -TQStringList Catalog::itemStatus(uint index) +TQStringList Catalog::itemtqStatus(uint index) { if ( d->_entries.isEmpty() ) return TQStringList(); @@ -1800,7 +1800,7 @@ int Catalog::findPrevInList(const TQValueList& list,uint index) const TQString Catalog::dateTime() const { - const TQDateTime dt = TQDateTime::currentDateTime(); + const TQDateTime dt = TQDateTime::tqcurrentDateTime(); TQString dateTimeString; const SaveSettings options = d->_project->saveSettings(); @@ -1936,7 +1936,7 @@ TQString Catalog::dateTime() const } -ConversionStatus Catalog::saveFile() +ConversiontqStatus Catalog::saveFile() { if(d->_url.isEmpty()) { @@ -1947,11 +1947,11 @@ ConversionStatus Catalog::saveFile() return saveFileAs(d->_url,true); } -ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite) +ConversiontqStatus Catalog::saveFileAs(const KURL &url, bool overwrite) { if( d->_active ) return BUSY; - ConversionStatus status=OK; + ConversiontqStatus status=OK; bool newName=false; KURL targetURL=d->_url; @@ -2043,7 +2043,7 @@ TQString Catalog::saveTempFile() } -ConversionStatus Catalog::writeFile(TQString localFile , bool overwrite) +ConversiontqStatus Catalog::writeFile(TQString localFile , bool overwrite) { TQFileInfo info(localFile); @@ -2066,7 +2066,7 @@ ConversionStatus Catalog::writeFile(TQString localFile , bool overwrite) } } - ConversionStatus error = OK; + ConversiontqStatus error = OK; CatalogExportPlugin* filter=0; // gimme plugin for this MIME type @@ -2549,7 +2549,7 @@ bool Catalog::findNext(const FindOptions* findOpts, DocPosition& docPos, int& le int contextInfoPos = -1; TQString targetStr; - kapp->processEvents(10); + kapp->tqprocessEvents(10); if( d->_stop || endReached) { @@ -2798,7 +2798,7 @@ bool Catalog::findPrev(const FindOptions* findOpts, DocPosition& docPos, int& le int contextInfoPos = -1; TQString targetStr; - kapp->processEvents(10); + kapp->tqprocessEvents(10); if( d->_stop || beginReached) { @@ -3155,7 +3155,7 @@ Catalog::DiffResult Catalog::diff(uint entry, TQString *result) bestId = (*it); } - kapp->processEvents(10); + kapp->tqprocessEvents(10); if( d->_stop ) { @@ -3232,7 +3232,7 @@ void Catalog::setDiffList( const TQValueList& list) { oldPercent = percent; emit signalProgress(percent); - kapp->processEvents(10); + kapp->tqprocessEvents(10); } TQString id = (*it).msgid; diff --git a/kbabel/common/catalog.h b/kbabel/common/catalog.h index a034375e..dd8c3a30 100644 --- a/kbabel/common/catalog.h +++ b/kbabel/common/catalog.h @@ -226,7 +226,7 @@ public: * @return the list of errors found for a given item index * @param index index of the item to check */ - TQStringList itemStatus(uint index); + TQStringList itemtqStatus(uint index); /** * @return the list of errors found for a given item index @@ -234,7 +234,7 @@ public: * @param recheck flag, if the item status should be checked now * @param whatToCheck what checks to do (a list of tools to be used */ - TQStringList itemStatus(uint index, bool recheck, TQPtrList whatToCheck); + TQStringList itemtqStatus(uint index, bool recheck, TQPtrList whatToCheck); /** * replaces msgstr in catalog item at index index with msgstr @@ -253,7 +253,7 @@ public: bool setHeader(CatalogItem header); /** removes string ", fuzzy" from comment */ - void removeFuzzyStatus(uint index); + void removeFuzzytqStatus(uint index); /** sets or unsets fuzzy status of entry index */ void setFuzzy(uint index, bool on); @@ -297,19 +297,19 @@ public: * opens file url by using KDE's network downlad and calls * openFile with a local filename */ - ConversionStatus openURL(const KURL& url, const TQString& package=TQString()); + ConversiontqStatus openURL(const KURL& url, const TQString& package=TQString()); /** * opens file openURL by using KDE's network downlad and calls * openFile with a local filename * sets current URL to saveURL */ - ConversionStatus openURL(const KURL& openURL, const KURL& saveURL, const TQString& package=TQString()); + ConversiontqStatus openURL(const KURL& openURL, const KURL& saveURL, const TQString& package=TQString()); /** save the file under the old filename */ - ConversionStatus saveFile(); + ConversiontqStatus saveFile(); /** saves the file under a new filename */ - ConversionStatus saveFileAs(const KURL& url,bool overwrite=false); + ConversiontqStatus saveFileAs(const KURL& url,bool overwrite=false); /** * saves the current catalog in a temporary file and @@ -342,7 +342,7 @@ public: * @param clearError should the errors be cleared before running msgfmt * @return the file codec used for the current catalog */ - Msgfmt::Status checkSyntax(TQString& output, bool clearErrors=true); + Msgfmt::tqStatus checkSyntax(TQString& output, bool clearErrors=true); /** * checks using an external tool. The tool must provide the "validate" command @@ -484,7 +484,7 @@ public: * the search in po-files. This way, I can easily find the first * catalog entry in the textstream */ -// static ConversionStatus readHeader(TQTextStream& stream,CatalogItem& header); +// static ConversiontqStatus readHeader(TQTextStream& stream,CatalogItem& header); void registerView(CatalogView* view); @@ -612,7 +612,7 @@ private: void processCommand(EditCommand* cmd, CatalogView* view2exclude=0, bool undo=false); /** do the actual file write using plugin */ - ConversionStatus writeFile(TQString localfile, bool overwrite=false); + ConversiontqStatus writeFile(TQString localfile, bool overwrite=false); /** * generates lists that contain indexes of all fuzzy and untranslated entries diff --git a/kbabel/common/catalogfileplugin.h b/kbabel/common/catalogfileplugin.h index 631a94b3..d4e72a76 100644 --- a/kbabel/common/catalogfileplugin.h +++ b/kbabel/common/catalogfileplugin.h @@ -50,7 +50,7 @@ class CatalogExportPluginPrivate; /** * Result of the conversion */ -enum ConversionStatus { +enum ConversiontqStatus { OK, NOT_IMPLEMENTED, NO_FILE, @@ -97,7 +97,7 @@ public: * @param catalog the catalog to be filled * @return result of the operation */ - ConversionStatus open(const TQString& file, const TQString& mimetype, Catalog* catalog); + ConversiontqStatus open(const TQString& file, const TQString& mimetype, Catalog* catalog); /** * Reimplement this method to load the local file passed as an argument. @@ -109,7 +109,7 @@ public: * @param file file to be loaded * @param mimetype the expected MIME type (the type used for plugin selection */ - virtual ConversionStatus load(const TQString& file, const TQString& mimetype) = 0; + virtual ConversiontqStatus load(const TQString& file, const TQString& mimetype) = 0; /** * Reimplement this method to return unique identification of your plugin */ @@ -183,7 +183,7 @@ class KDE_EXPORT CatalogExportPlugin: public TQObject public: CatalogExportPlugin(TQObject* parent, const char* name); virtual ~CatalogExportPlugin(); - virtual ConversionStatus save(const TQString& file, const TQString& mimetype, const Catalog* catalog) = 0; + virtual ConversiontqStatus save(const TQString& file, const TQString& mimetype, const Catalog* catalog) = 0; static TQStringList availableExportMimeTypes(); diff --git a/kbabel/common/catalogitem.cpp b/kbabel/common/catalogitem.cpp index 0dd1a9ae..234637d1 100644 --- a/kbabel/common/catalogitem.cpp +++ b/kbabel/common/catalogitem.cpp @@ -40,8 +40,8 @@ #include "regexpextractor.h" -#include -#include +#include +#include #include using namespace KBabel; diff --git a/kbabel/common/catalogsettings.cpp b/kbabel/common/catalogsettings.cpp index 4dc9cca1..24d469ec 100644 --- a/kbabel/common/catalogsettings.cpp +++ b/kbabel/common/catalogsettings.cpp @@ -44,7 +44,7 @@ #include #include -#include +#include #include #include diff --git a/kbabel/common/importplugin.cpp b/kbabel/common/importplugin.cpp index e75deca7..ed6d15ef 100644 --- a/kbabel/common/importplugin.cpp +++ b/kbabel/common/importplugin.cpp @@ -99,13 +99,13 @@ void CatalogImportPlugin::setMimeTypes( const TQString& mimetypes ) d->_mimeTypes=mimetypes; } -ConversionStatus CatalogImportPlugin::open(const TQString& file, const TQString& mimetype, Catalog* catalog) +ConversiontqStatus CatalogImportPlugin::open(const TQString& file, const TQString& mimetype, Catalog* catalog) { d->_stopped=false; d->_catalog=catalog; startTransaction(); - ConversionStatus result = load(file, mimetype); + ConversiontqStatus result = load(file, mimetype); if( d->_stopped ) { d->_started=false; diff --git a/kbabel/common/kbmailer.cpp b/kbabel/common/kbmailer.cpp index 18c679b1..90f61256 100644 --- a/kbabel/common/kbmailer.cpp +++ b/kbabel/common/kbmailer.cpp @@ -103,7 +103,7 @@ void KBabelMailer::sendOneFile( const KURL& url) kapp->invokeMailer("", "", "", "", "", "", fileName); else { - KMessageBox::error( m_parent, i18n("Error while trying to download file %1.").arg( url.prettyURL() ) ); + KMessageBox::error( m_parent, i18n("Error while trying to download file %1.").tqarg( url.prettyURL() ) ); } } else @@ -190,7 +190,7 @@ TQString KBabelMailer::buildArchive(TQStringList fileList, TQString archiveName, #endif TQString poTempName; if ( !KIO::NetAccess::download( url, poTempName, m_parent ) ) { - KMessageBox::error( m_parent, i18n("Error while trying to read file %1.").arg( url.prettyURL() ) ); + KMessageBox::error( m_parent, i18n("Error while trying to read file %1.").tqarg( url.prettyURL() ) ); continue; } @@ -205,7 +205,7 @@ TQString KBabelMailer::buildArchive(TQStringList fileList, TQString archiveName, poArchFileName.remove( TQRegExp( "^" + TQRegExp::escape( _poBaseDir ) + "/?" ) ); if ( !archive.addLocalFile( poTempName, poArchFileName ) ) { - KMessageBox::error( m_parent, i18n("Error while trying to copy file %1 into archive.").arg( url.prettyURL() ) ); + KMessageBox::error( m_parent, i18n("Error while trying to copy file %1 into archive.").tqarg( url.prettyURL() ) ); } KIO::NetAccess::removeTempFile(poTempName); diff --git a/kbabel/common/msgfmt.cpp b/kbabel/common/msgfmt.cpp index 6a2f9d2b..f91f25f9 100644 --- a/kbabel/common/msgfmt.cpp +++ b/kbabel/common/msgfmt.cpp @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include @@ -51,9 +51,9 @@ Msgfmt::Msgfmt(TQObject* parent,const char* name) { } -Msgfmt::Status Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu) +Msgfmt::tqStatus Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu) { - Status stat=Ok; + tqStatus stat=Ok; // this method does not return the right retrun values at the moment :-( KProcess proc; @@ -92,9 +92,9 @@ Msgfmt::Status Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu) return stat; } -Msgfmt::Status Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString& output) +Msgfmt::tqStatus Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString& output) { - Status stat=Ok; + tqStatus stat=Ok; // this method does not return the right return values at the moment :-( KProcess proc; diff --git a/kbabel/common/msgfmt.h b/kbabel/common/msgfmt.h index c711cf48..025a2fdd 100644 --- a/kbabel/common/msgfmt.h +++ b/kbabel/common/msgfmt.h @@ -47,11 +47,11 @@ class KDE_EXPORT Msgfmt : private TQObject Q_OBJECT TQ_OBJECT public: - enum Status{NoExecutable,Ok,SyntaxError,HeaderError,Error,Unsupported}; + enum tqStatus{NoExecutable,Ok,SyntaxError,HeaderError,Error,Unsupported}; Msgfmt(TQObject* parent=0,const char* name=0); - Status checkSyntax(TQString file,TQString& output, bool gnu = false); - Status checkSyntaxInDir(TQString dir,TQString regexp,TQString& output); + tqStatus checkSyntax(TQString file,TQString& output, bool gnu = false); + tqStatus checkSyntaxInDir(TQString dir,TQString regexp,TQString& output); private slots: void addToOutput(KProcess*,char *buffer, int buflen); diff --git a/kbabel/common/poinfo.cpp b/kbabel/common/poinfo.cpp index 3ab33287..63a01d38 100644 --- a/kbabel/common/poinfo.cpp +++ b/kbabel/common/poinfo.cpp @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include "libgettext/pofiles.h" #include "libgettext/tokens.h" @@ -350,12 +350,12 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem) } -ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive) +ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive) { return PoInfo::info( url, info, wordList, updateWordList, interactive, true); } -ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt) +ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt) { stopStaticRead = false; @@ -372,7 +372,7 @@ ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &w // First check file with msgfmt to be sure, it is syntactically correct Msgfmt msgfmt; TQString output; - Msgfmt::Status stat = msgfmt.checkSyntax( target , output ); + Msgfmt::tqStatus stat = msgfmt.checkSyntax( target , output ); if(stat == Msgfmt::SyntaxError) { KIO::NetAccess::removeTempFile(target); @@ -395,11 +395,11 @@ ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &w lexer->yylex(); // now parse the rest of the file - ConversionStatus success=OK; + ConversiontqStatus success=OK; while( lexer->lastToken != T_EOF && success==OK) { - if( interactive ) kapp->processEvents(10); + if( interactive ) kapp->tqprocessEvents(10); if( stopStaticRead ) { @@ -532,7 +532,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options ) // first read header CatalogItem temp; - ConversionStatus status = fastRead( temp, lexer, true ); + ConversiontqStatus status = fastRead( temp, lexer, true ); if( status != OK || !temp.msgid().first().isEmpty() ) { delete lexer; @@ -639,7 +639,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options ) } case T_MSGID: case T_MSGIDPLURAL: { - kapp->processEvents(10); + kapp->tqprocessEvents(10); // if stopped, return not found if( stopStaticRead ) @@ -666,7 +666,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options ) } // this does not like any incorrect files -ConversionStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, bool storeText) +ConversiontqStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, bool storeText) { item.clear(); _gettextPluralForm = false; diff --git a/kbabel/common/poinfo.h b/kbabel/common/poinfo.h index 70ba652a..58e0bc66 100644 --- a/kbabel/common/poinfo.h +++ b/kbabel/common/poinfo.h @@ -105,7 +105,7 @@ public: * being parsed? * @since KBabel 1.11 (KDE 3.5) */ - static ConversionStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt); + static ConversiontqStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt); /** * @brief Get information about the PO file @@ -121,7 +121,7 @@ public: * KBabel 1.11.1 (KDE 3.5.1) * @note This function always call Gettext's mgfmt before parsing each file */ - static ConversionStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive = true); + static ConversiontqStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive = true); static PoInfo headerInfo(const CatalogItem&); static bool findInFile(const TQString& url, FindOptions options ); @@ -147,7 +147,7 @@ private: */ static void cacheRead(); - static ConversionStatus fastRead( CatalogItem& item, GettextFlexLexer* lexer, bool storeText ); + static ConversiontqStatus fastRead( CatalogItem& item, GettextFlexLexer* lexer, bool storeText ); static bool _gettextPluralForm; }; -- cgit v1.2.1