diff options
Diffstat (limited to 'kbabel/common')
-rw-r--r-- | kbabel/common/catalog.cpp | 46 | ||||
-rw-r--r-- | kbabel/common/catalog.h | 20 | ||||
-rw-r--r-- | kbabel/common/catalogfileplugin.h | 8 | ||||
-rw-r--r-- | kbabel/common/importplugin.cpp | 4 | ||||
-rw-r--r-- | kbabel/common/msgfmt.cpp | 8 | ||||
-rw-r--r-- | kbabel/common/msgfmt.h | 6 | ||||
-rw-r--r-- | kbabel/common/poinfo.cpp | 16 | ||||
-rw-r--r-- | kbabel/common/poinfo.h | 6 |
8 files changed, 57 insertions, 57 deletions
diff --git a/kbabel/common/catalog.cpp b/kbabel/common/catalog.cpp index 00c9491d..01c8bab9 100644 --- a/kbabel/common/catalog.cpp +++ b/kbabel/common/catalog.cpp @@ -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::tqcurrentDate().toString("yyyy")); + (*it).replace("YEAR", TQDate::currentDate().toString("yyyy")); } else if( saveOptions.FSFCopyright == ProjectSettingsBase::Update ) { //update years - TQString cy = TQDate::tqcurrentDate().toString("yyyy"); + TQString cy = TQDate::currentDate().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::tqcurrentDate().toString("yyyy")+"."; + temp+=", "+TQDate::currentDate().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::tqcurrentDate().toString("yyyy"); + const TQString cy = TQDate::currentDate().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::removeFuzzytqStatus(uint index) +void Catalog::removeFuzzyStatus(uint index) { setFuzzy(index,false); } @@ -888,10 +888,10 @@ TQString Catalog::encoding() const return encodingStr; } -ConversiontqStatus Catalog::openURL(const KURL& url, const TQString& package) +ConversionStatus Catalog::openURL(const KURL& url, const TQString& package) { TQString target; - ConversiontqStatus error = OK; + ConversionStatus error = OK; if(KIO::NetAccess::download(url, target, NULL)) { @@ -992,10 +992,10 @@ ConversiontqStatus Catalog::openURL(const KURL& url, const TQString& package) } } -ConversiontqStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, const TQString& package) +ConversionStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, const TQString& package) { TQString target; - ConversiontqStatus error = OK; + ConversionStatus error = OK; if(KIO::NetAccess::download(openUrl, target, NULL)) { @@ -1093,7 +1093,7 @@ ConversiontqStatus Catalog::openURL(const KURL& openUrl, const KURL& saveURL, co } } -Msgfmt::tqStatus Catalog::checkSyntax(TQString& output, bool clearErrors) +Msgfmt::Status Catalog::checkSyntax(TQString& output, bool clearErrors) { if( !d->_mimeTypes.contains( "application/x-gettext" ) ) return Msgfmt::Unsupported; @@ -1112,7 +1112,7 @@ Msgfmt::tqStatus Catalog::checkSyntax(TQString& output, bool clearErrors) } Msgfmt msgfmt; - Msgfmt::tqStatus result = msgfmt.checkSyntax( filename , output, pluralFormType() != KDESpecific ); + Msgfmt::Status result = msgfmt.checkSyntax( filename , output, pluralFormType() != KDESpecific ); if( clearErrors) clearErrorList(); @@ -1185,7 +1185,7 @@ void Catalog::removeFromErrorList(uint index) } } -TQStringList Catalog::itemtqStatus(uint index, bool recheck, TQPtrList<KDataTool> whatToCheck) +TQStringList Catalog::itemStatus(uint index, bool recheck, TQPtrList<KDataTool> whatToCheck) { if ( d->_entries.isEmpty() ) return TQStringList(); @@ -1207,7 +1207,7 @@ TQStringList Catalog::itemtqStatus(uint index, bool recheck, TQPtrList<KDataTool return item.errors(); } -TQStringList Catalog::itemtqStatus(uint index) +TQStringList Catalog::itemStatus(uint index) { if ( d->_entries.isEmpty() ) return TQStringList(); @@ -1800,7 +1800,7 @@ int Catalog::findPrevInList(const TQValueList<uint>& list,uint index) const TQString Catalog::dateTime() const { - const TQDateTime dt = TQDateTime::tqcurrentDateTime(); + const TQDateTime dt = TQDateTime::currentDateTime(); TQString dateTimeString; const SaveSettings options = d->_project->saveSettings(); @@ -1936,7 +1936,7 @@ TQString Catalog::dateTime() const } -ConversiontqStatus Catalog::saveFile() +ConversionStatus Catalog::saveFile() { if(d->_url.isEmpty()) { @@ -1947,11 +1947,11 @@ ConversiontqStatus Catalog::saveFile() return saveFileAs(d->_url,true); } -ConversiontqStatus Catalog::saveFileAs(const KURL &url, bool overwrite) +ConversionStatus Catalog::saveFileAs(const KURL &url, bool overwrite) { if( d->_active ) return BUSY; - ConversiontqStatus status=OK; + ConversionStatus status=OK; bool newName=false; KURL targetURL=d->_url; @@ -2043,7 +2043,7 @@ TQString Catalog::saveTempFile() } -ConversiontqStatus Catalog::writeFile(TQString localFile , bool overwrite) +ConversionStatus Catalog::writeFile(TQString localFile , bool overwrite) { TQFileInfo info(localFile); @@ -2066,7 +2066,7 @@ ConversiontqStatus Catalog::writeFile(TQString localFile , bool overwrite) } } - ConversiontqStatus error = OK; + ConversionStatus 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->tqprocessEvents(10); + kapp->processEvents(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->tqprocessEvents(10); + kapp->processEvents(10); if( d->_stop || beginReached) { @@ -3155,7 +3155,7 @@ Catalog::DiffResult Catalog::diff(uint entry, TQString *result) bestId = (*it); } - kapp->tqprocessEvents(10); + kapp->processEvents(10); if( d->_stop ) { @@ -3232,7 +3232,7 @@ void Catalog::setDiffList( const TQValueList<DiffEntry>& list) { oldPercent = percent; emit signalProgress(percent); - kapp->tqprocessEvents(10); + kapp->processEvents(10); } TQString id = (*it).msgid; diff --git a/kbabel/common/catalog.h b/kbabel/common/catalog.h index dd8c3a30..a034375e 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 itemtqStatus(uint index); + TQStringList itemStatus(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 itemtqStatus(uint index, bool recheck, TQPtrList<KDataTool> whatToCheck); + TQStringList itemStatus(uint index, bool recheck, TQPtrList<KDataTool> 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 removeFuzzytqStatus(uint index); + void removeFuzzyStatus(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 */ - ConversiontqStatus openURL(const KURL& url, const TQString& package=TQString()); + ConversionStatus 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 */ - ConversiontqStatus openURL(const KURL& openURL, const KURL& saveURL, const TQString& package=TQString()); + ConversionStatus openURL(const KURL& openURL, const KURL& saveURL, const TQString& package=TQString()); /** save the file under the old filename */ - ConversiontqStatus saveFile(); + ConversionStatus saveFile(); /** saves the file under a new filename */ - ConversiontqStatus saveFileAs(const KURL& url,bool overwrite=false); + ConversionStatus 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::tqStatus checkSyntax(TQString& output, bool clearErrors=true); + Msgfmt::Status 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 ConversiontqStatus readHeader(TQTextStream& stream,CatalogItem& header); +// static ConversionStatus 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 */ - ConversiontqStatus writeFile(TQString localfile, bool overwrite=false); + ConversionStatus 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 d4e72a76..631a94b3 100644 --- a/kbabel/common/catalogfileplugin.h +++ b/kbabel/common/catalogfileplugin.h @@ -50,7 +50,7 @@ class CatalogExportPluginPrivate; /** * Result of the conversion */ -enum ConversiontqStatus { +enum ConversionStatus { OK, NOT_IMPLEMENTED, NO_FILE, @@ -97,7 +97,7 @@ public: * @param catalog the catalog to be filled * @return result of the operation */ - ConversiontqStatus open(const TQString& file, const TQString& mimetype, Catalog* catalog); + ConversionStatus 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 ConversiontqStatus load(const TQString& file, const TQString& mimetype) = 0; + virtual ConversionStatus 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 ConversiontqStatus save(const TQString& file, const TQString& mimetype, const Catalog* catalog) = 0; + virtual ConversionStatus save(const TQString& file, const TQString& mimetype, const Catalog* catalog) = 0; static TQStringList availableExportMimeTypes(); diff --git a/kbabel/common/importplugin.cpp b/kbabel/common/importplugin.cpp index ed6d15ef..e75deca7 100644 --- a/kbabel/common/importplugin.cpp +++ b/kbabel/common/importplugin.cpp @@ -99,13 +99,13 @@ void CatalogImportPlugin::setMimeTypes( const TQString& mimetypes ) d->_mimeTypes=mimetypes; } -ConversiontqStatus CatalogImportPlugin::open(const TQString& file, const TQString& mimetype, Catalog* catalog) +ConversionStatus CatalogImportPlugin::open(const TQString& file, const TQString& mimetype, Catalog* catalog) { d->_stopped=false; d->_catalog=catalog; startTransaction(); - ConversiontqStatus result = load(file, mimetype); + ConversionStatus result = load(file, mimetype); if( d->_stopped ) { d->_started=false; diff --git a/kbabel/common/msgfmt.cpp b/kbabel/common/msgfmt.cpp index f91f25f9..11e6969f 100644 --- a/kbabel/common/msgfmt.cpp +++ b/kbabel/common/msgfmt.cpp @@ -51,9 +51,9 @@ Msgfmt::Msgfmt(TQObject* parent,const char* name) { } -Msgfmt::tqStatus Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu) +Msgfmt::Status Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu) { - tqStatus stat=Ok; + Status stat=Ok; // this method does not return the right retrun values at the moment :-( KProcess proc; @@ -92,9 +92,9 @@ Msgfmt::tqStatus Msgfmt::checkSyntax(TQString file,TQString& output, bool gnu) return stat; } -Msgfmt::tqStatus Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString& output) +Msgfmt::Status Msgfmt::checkSyntaxInDir(TQString dir,TQString regexp,TQString& output) { - tqStatus stat=Ok; + Status 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 025a2fdd..c711cf48 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 tqStatus{NoExecutable,Ok,SyntaxError,HeaderError,Error,Unsupported}; + enum Status{NoExecutable,Ok,SyntaxError,HeaderError,Error,Unsupported}; Msgfmt(TQObject* parent=0,const char* name=0); - tqStatus checkSyntax(TQString file,TQString& output, bool gnu = false); - tqStatus checkSyntaxInDir(TQString dir,TQString regexp,TQString& output); + Status checkSyntax(TQString file,TQString& output, bool gnu = false); + Status 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 63a01d38..aa6b1666 100644 --- a/kbabel/common/poinfo.cpp +++ b/kbabel/common/poinfo.cpp @@ -350,12 +350,12 @@ PoInfo PoInfo::headerInfo(const CatalogItem& headerItem) } -ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive) +ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive) { return PoInfo::info( url, info, wordList, updateWordList, interactive, true); } -ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt) +ConversionStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt) { stopStaticRead = false; @@ -372,7 +372,7 @@ ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList // First check file with msgfmt to be sure, it is syntactically correct Msgfmt msgfmt; TQString output; - Msgfmt::tqStatus stat = msgfmt.checkSyntax( target , output ); + Msgfmt::Status stat = msgfmt.checkSyntax( target , output ); if(stat == Msgfmt::SyntaxError) { KIO::NetAccess::removeTempFile(target); @@ -395,11 +395,11 @@ ConversiontqStatus PoInfo::info(const TQString& url, PoInfo& info, TQStringList lexer->yylex(); // now parse the rest of the file - ConversiontqStatus success=OK; + ConversionStatus success=OK; while( lexer->lastToken != T_EOF && success==OK) { - if( interactive ) kapp->tqprocessEvents(10); + if( interactive ) kapp->processEvents(10); if( stopStaticRead ) { @@ -532,7 +532,7 @@ bool PoInfo::findInFile( const TQString& url, FindOptions options ) // first read header CatalogItem temp; - ConversiontqStatus status = fastRead( temp, lexer, true ); + ConversionStatus 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->tqprocessEvents(10); + kapp->processEvents(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 -ConversiontqStatus PoInfo::fastRead( CatalogItem& item, GettextFlexLexer *lexer, bool storeText) +ConversionStatus 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 58e0bc66..70ba652a 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 ConversiontqStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive, bool msgfmt); + static ConversionStatus 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 ConversiontqStatus info(const TQString& url,PoInfo& info, TQStringList &wordList, bool updateWordList, bool interactive = true); + static ConversionStatus 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 ConversiontqStatus fastRead( CatalogItem& item, GettextFlexLexer* lexer, bool storeText ); + static ConversionStatus fastRead( CatalogItem& item, GettextFlexLexer* lexer, bool storeText ); static bool _gettextPluralForm; }; |