From df312013ddbbd27829d992eadde57160bc8af0eb Mon Sep 17 00:00:00 2001 From: mlaurent Date: Mon, 1 Aug 2005 08:39:15 +0000 Subject: [PATCH] Warning-- Port git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeaccessibility@441954 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kttsd/filters/sbd/sbdconf.cpp | 14 +++--- kttsd/filters/sbd/sbdproc.cpp | 8 +++- kttsd/filters/sbd/sbdproc.h | 18 ++++---- .../filters/stringreplacer/stringreplacerconf.cpp | 53 ++++++++++++---------- .../filters/stringreplacer/stringreplacerproc.cpp | 14 +++--- kttsd/filters/stringreplacer/stringreplacerproc.h | 10 ++-- kttsd/filters/talkerchooser/talkerchooserconf.cpp | 4 +- kttsd/filters/talkerchooser/talkerchooserproc.cpp | 4 +- kttsd/filters/talkerchooser/talkerchooserproc.h | 4 +- kttsd/filters/xhtml2ssml/xhtml2ssml.cpp | 6 ++- .../filters/xmltransformer/xmltransformerconf.cpp | 2 + .../filters/xmltransformer/xmltransformerproc.cpp | 15 +++--- kttsd/filters/xmltransformer/xmltransformerproc.h | 6 ++- 13 files changed, 94 insertions(+), 64 deletions(-) diff --git a/kttsd/filters/sbd/sbdconf.cpp b/kttsd/filters/sbd/sbdconf.cpp index 7198ae05..224e7295 100644 --- a/kttsd/filters/sbd/sbdconf.cpp +++ b/kttsd/filters/sbd/sbdconf.cpp @@ -25,11 +25,13 @@ #include #include #include -#include +#include #include #include #include #include +//Added by qt3to4: +#include // KDE includes. #include @@ -233,12 +235,12 @@ void SbdConf::slotReButton_clicked() void SbdConf::slotLanguageBrowseButton_clicked() { // Create a QHBox to host KListView. - QHBox* hBox = new QHBox(m_widget, "SelectLanguage_hbox"); + Q3HBox* hBox = new Q3HBox(m_widget, "SelectLanguage_hbox"); // Create a KListView and fill with all known languages. KListView* langLView = new KListView(hBox, "SelectLanguage_lview"); langLView->addColumn(i18n("Language")); langLView->addColumn(i18n("Code")); - langLView->setSelectionMode(QListView::Extended); + langLView->setSelectionMode(Q3ListView::Extended); QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha(); QString locale; QString languageCode; @@ -246,7 +248,7 @@ void SbdConf::slotLanguageBrowseButton_clicked() QString charSet; QString language; // Blank line so user can select no language. - QListViewItem* item = new KListViewItem(langLView, "", ""); + Q3ListViewItem* item = new KListViewItem(langLView, "", ""); if (m_languageCodeList.isEmpty()) item->setSelected(true); const int allLocalesCount = allLocales.count(); for (int ndx=0; ndx < allLocalesCount; ++ndx) @@ -256,7 +258,7 @@ void SbdConf::slotLanguageBrowseButton_clicked() language = KGlobal::locale()->twoAlphaToLanguageName(languageCode); if (!countryCode.isEmpty()) language += " (" + KGlobal::locale()->twoAlphaToCountryName(countryCode)+")"; - QListViewItem* item = new KListViewItem(langLView, language, locale); + Q3ListViewItem* item = new KListViewItem(langLView, language, locale); if (m_languageCodeList.contains(locale)) item->setSelected(true); } // Sort by language. @@ -280,7 +282,7 @@ void SbdConf::slotLanguageBrowseButton_clicked() if (dlgResult == QDialog::Accepted) { m_languageCodeList.clear(); - QListViewItem* item = langLView->firstChild(); + Q3ListViewItem* item = langLView->firstChild(); while (item) { if (item->isSelected()) m_languageCodeList += item->text(1); diff --git a/kttsd/filters/sbd/sbdproc.cpp b/kttsd/filters/sbd/sbdproc.cpp index e249272d..ac104974 100644 --- a/kttsd/filters/sbd/sbdproc.cpp +++ b/kttsd/filters/sbd/sbdproc.cpp @@ -25,6 +25,10 @@ #include #include #include +//Added by qt3to4: +#include +#include +#include // KDE includes. #include @@ -638,7 +642,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){ * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ -/*virtual*/ QString SbdProc::convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId) +/*virtual*/ QString SbdProc::convert(const QString& inputText, TalkerCode* talkerCode, const Q3CString& appId) { if ( asyncConvert( inputText, talkerCode, appId) ) { @@ -663,7 +667,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){ * program must call @ref ackFinished to acknowledge the conversion. */ /*virtual*/ bool SbdProc::asyncConvert(const QString& inputText, TalkerCode* talkerCode, - const QCString& appId) + const Q3CString& appId) { m_sbdThread->setWasModified( false ); // If language doesn't match, return input unmolested. diff --git a/kttsd/filters/sbd/sbdproc.h b/kttsd/filters/sbd/sbdproc.h index b80ee865..7c3a19dd 100644 --- a/kttsd/filters/sbd/sbdproc.h +++ b/kttsd/filters/sbd/sbdproc.h @@ -49,8 +49,10 @@ #include #include #include -#include +#include #include +//Added by qt3to4: +#include // KTTS includes. #include "filterproc.h" @@ -215,11 +217,11 @@ class SbdThread: public QObject, public QThread QString parsePlainText( const QString& inputText, const QString& re ); // Context stacks. - QValueStack m_speakStack; - QValueStack m_voiceStack; - QValueStack m_prosodyStack; - QValueStack m_emphasisStack; - QValueStack m_psStack; + Q3ValueStack m_speakStack; + Q3ValueStack m_voiceStack; + Q3ValueStack m_prosodyStack; + Q3ValueStack m_emphasisStack; + Q3ValueStack m_psStack; // The text being processed. QString m_text; @@ -291,7 +293,7 @@ class SbdProc : virtual public KttsFilterProc * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ - virtual QString convert( const QString& inputText, TalkerCode* talkerCode, const QCString& appId ); + virtual QString convert( const QString& inputText, TalkerCode* talkerCode, const Q3CString& appId ); /** * Convert input. Runs asynchronously. @@ -307,7 +309,7 @@ class SbdProc : virtual public KttsFilterProc * program may then call @ref getOutput to retrieve converted text. Calling * program must call @ref ackFinished to acknowledge the conversion. */ - virtual bool asyncConvert( const QString& inputText, TalkerCode* talkerCode, const QCString& appId ); + virtual bool asyncConvert( const QString& inputText, TalkerCode* talkerCode, const Q3CString& appId ); /** * Waits for a previous call to asyncConvert to finish. diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.cpp b/kttsd/filters/stringreplacer/stringreplacerconf.cpp index e4735423..23399093 100644 --- a/kttsd/filters/stringreplacer/stringreplacerconf.cpp +++ b/kttsd/filters/stringreplacer/stringreplacerconf.cpp @@ -25,11 +25,14 @@ #include #include #include -#include +#include #include #include #include #include +//Added by qt3to4: +#include +#include // KDE includes. #include @@ -144,7 +147,7 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear) { // Open existing word list. QFile file( filename ); - if ( !file.open( IO_ReadOnly ) ) + if ( !file.open( QIODevice::ReadOnly ) ) { return i18n("Unable to open file.") + filename; } @@ -170,7 +173,7 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear) // or multiple elements. QString languageCodes; QDomNodeList languageList = doc.elementsByTagName( "language-code" ); - for ( uint ndx=0; ndx < languageList.count(); ++ndx ) + for ( int ndx=0; ndx < languageList.count(); ++ndx ) { QDomNode languageNode = languageList.item( ndx ); if (!languageCodes.isEmpty()) languageCodes += ","; @@ -188,7 +191,7 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear) if ( m_languageCodeList[ndx] == m_languageCodeList[ndx+1] ) m_languageCodeList.remove(m_languageCodeList.at(ndx+1)); } - for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx ) + for ( int ndx=0; ndx < m_languageCodeList.count(); ++ndx ) { if (!language.isEmpty()) language += ","; language += KGlobal::locale()->twoAlphaToLanguageName(m_languageCodeList[ndx]); @@ -200,7 +203,7 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear) // or multiple elements. QDomNodeList appIdList = doc.elementsByTagName( "appid" ); QString appIds; - for ( uint ndx=0; ndx < appIdList.count(); ++ndx ) + for ( int ndx=0; ndx < appIdList.count(); ++ndx ) { QDomNode appIdNode = appIdList.item( ndx ); if (!appIds.isEmpty()) appIds += ","; @@ -210,7 +213,7 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear) m_widget->appIdLineEdit->setText( appIds ); // Word list. - QListViewItem* item = 0; + Q3ListViewItem* item = 0; if ( !clear ) item = m_widget->substLView->lastChild(); QDomNodeList wordList = doc.elementsByTagName("word"); const int wordListCount = wordList.count(); @@ -276,7 +279,7 @@ QString StringReplacerConf::saveToFile(const QString& filename) // kdDebug() << "StringReplacerConf::saveToFile: saving to file " << wordsFilename << endl; QFile file( filename ); - if ( !file.open( IO_WriteOnly ) ) + if ( !file.open( QIODevice::WriteOnly ) ) return i18n("Unable to open file ") + filename; // QDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" ); @@ -292,7 +295,7 @@ QString StringReplacerConf::saveToFile(const QString& filename) name.appendChild( t ); // Language code. - for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx ) + for ( int ndx=0; ndx < m_languageCodeList.count(); ++ndx ) { QDomElement languageCode = doc.createElement( "language-code" ); root.appendChild( languageCode ); @@ -305,7 +308,7 @@ QString StringReplacerConf::saveToFile(const QString& filename) if ( !appId.isEmpty() ) { QStringList appIdList = QStringList::split(",", appId); - for ( uint ndx=0; ndx < appIdList.count(); ++ndx ) + for ( int ndx=0; ndx < appIdList.count(); ++ndx ) { QDomElement appIdElem = doc.createElement( "appid" ); root.appendChild( appIdElem ); @@ -315,8 +318,8 @@ QString StringReplacerConf::saveToFile(const QString& filename) } // Words. - QListView* lView = m_widget->substLView; - QListViewItem* item = lView->firstChild(); + Q3ListView* lView = m_widget->substLView; + Q3ListViewItem* item = lView->firstChild(); while (item) { QDomElement wordTag = doc.createElement( "word" ); @@ -417,12 +420,12 @@ QString StringReplacerConf::substitutionTypeToString(const int substitutionType) void StringReplacerConf::slotLanguageBrowseButton_clicked() { // Create a QHBox to host KListView. - QHBox* hBox = new QHBox(m_widget, "SelectLanguage_hbox"); + Q3HBox* hBox = new Q3HBox(m_widget, "SelectLanguage_hbox"); // Create a KListView and fill with all known languages. KListView* langLView = new KListView(hBox, "SelectLanguage_lview"); langLView->addColumn(i18n("Language")); langLView->addColumn(i18n("Code")); - langLView->setSelectionMode(QListView::Extended); + langLView->setSelectionMode(Q3ListView::Extended); QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha(); QString locale; QString languageCode; @@ -430,7 +433,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked() QString charSet; QString language; // Blank line so user can select no language. - QListViewItem* item = new KListViewItem(langLView, "", ""); + Q3ListViewItem* item = new KListViewItem(langLView, "", ""); if (m_languageCodeList.isEmpty()) item->setSelected(true); const int allLocalesCount = allLocales.count(); for (int ndx=0; ndx < allLocalesCount; ++ndx) @@ -464,7 +467,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked() if (dlgResult == QDialog::Accepted) { m_languageCodeList.clear(); - QListViewItem* item = langLView->firstChild(); + Q3ListViewItem* item = langLView->firstChild(); while (item) { if (item->isSelected()) m_languageCodeList += item->text(1); @@ -475,7 +478,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked() // TODO: Also delete KListView and QHBox? if (dlgResult != QDialog::Accepted) return; language = ""; - for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx) + for ( int ndx=0; ndx < m_languageCodeList.count(); ++ndx) { if (!language.isEmpty()) language += ","; language += KGlobal::locale()->twoAlphaToLanguageName(m_languageCodeList[ndx]); @@ -517,9 +520,9 @@ void StringReplacerConf::enableDisableButtons() void StringReplacerConf::slotUpButton_clicked() { - QListViewItem* item = m_widget->substLView->selectedItem(); + Q3ListViewItem* item = m_widget->substLView->selectedItem(); if (!item) return; - QListViewItem* prevItem = item->itemAbove(); + Q3ListViewItem* prevItem = item->itemAbove(); if (!prevItem) return; prevItem->moveItem(item); m_widget->substLView->setSelected(item, true); @@ -530,9 +533,9 @@ void StringReplacerConf::slotUpButton_clicked() void StringReplacerConf::slotDownButton_clicked() { - QListViewItem* item = m_widget->substLView->selectedItem(); + Q3ListViewItem* item = m_widget->substLView->selectedItem(); if (!item) return; - QListViewItem* nextItem = item->itemBelow(); + Q3ListViewItem* nextItem = item->itemBelow(); if (!nextItem) return; item->moveItem(nextItem); m_widget->substLView->setSelected(item, true); @@ -554,7 +557,7 @@ void StringReplacerConf::slotEditButton_clicked() // Displays the add/edit string replacement dialog. void StringReplacerConf::addOrEditSubstitution(bool isAdd) { - QListViewItem* item = 0; + Q3ListViewItem* item = 0; if (isAdd) item = m_widget->substLView->lastChild(); else @@ -563,7 +566,7 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd) if (!item) return; } // Create a QHBox to host widget. - QHBox* hBox = new QHBox(m_widget, "AddOrEditSubstitution_hbox" ); + Q3HBox* hBox = new Q3HBox(m_widget, "AddOrEditSubstitution_hbox" ); // Create widget. m_editWidget = new EditReplacementWidget( hBox, "AddOrEditSubstitution_widget" ); // Set controls if editing existing. @@ -640,7 +643,7 @@ void StringReplacerConf::slotMatchLineEdit_textChanged(const QString& text) void StringReplacerConf::slotRemoveButton_clicked() { - QListViewItem* item = m_widget->substLView->selectedItem(); + Q3ListViewItem* item = m_widget->substLView->selectedItem(); if (!item) return; delete item; enableDisableButtons(); @@ -666,8 +669,8 @@ void StringReplacerConf::slotMatchButton_clicked() { // kdeutils was installed, so the dialog was found. Fetch the editor interface. KRegExpEditorInterface *reEditor = - static_cast(editorDialog->qt_cast( "KRegExpEditorInterface" ) ); - Q_ASSERT( reEditor ); // This should not fail!// now use the editor. + static_cast(editorDialog->qt_cast( "KRegExpEditorInterface" ) ); + Q_ASSERT( reEditor ); // This should not fail!// now use the editor. reEditor->setRegExp( m_editWidget->matchLineEdit->text() ); int dlgResult = editorDialog->exec(); if ( dlgResult == QDialog::Accepted ) diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.cpp b/kttsd/filters/stringreplacer/stringreplacerproc.cpp index 9f46e3ef..5d7d3e0e 100644 --- a/kttsd/filters/stringreplacer/stringreplacerproc.cpp +++ b/kttsd/filters/stringreplacer/stringreplacerproc.cpp @@ -24,7 +24,9 @@ // Qt includes. #include #include -#include +#include +//Added by qt3to4: +#include // KDE includes. #include @@ -78,7 +80,7 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){ // Open existing word list. QFile file( wordsFilename ); - if ( !file.open( IO_ReadOnly ) ) + if ( !file.open( QIODevice::ReadOnly ) ) return false; QDomDocument doc( "" ); if ( !doc.setContent( &file ) ) { @@ -100,7 +102,7 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){ // or multiple elements. m_languageCodeList.clear(); QDomNodeList languageList = doc.elementsByTagName( "language-code" ); - for ( uint ndx=0; ndx < languageList.count(); ++ndx ) + for ( int ndx=0; ndx < languageList.count(); ++ndx ) { QDomNode languageNode = languageList.item( ndx ); m_languageCodeList += QStringList::split(',', languageNode.toElement().text(), false); @@ -111,7 +113,7 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){ // or multiple elements. m_appIdList.clear(); QDomNodeList appIdList = doc.elementsByTagName( "appid" ); - for ( uint ndx=0; ndx < appIdList.count(); ++ndx ) + for ( int ndx=0; ndx < appIdList.count(); ++ndx ) { QDomNode appIdNode = appIdList.item( ndx ); m_appIdList += QStringList::split(',', appIdNode.toElement().text(), false); @@ -167,7 +169,7 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){ * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ -/*virtual*/ QString StringReplacerProc::convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId) +/*virtual*/ QString StringReplacerProc::convert(const QString& inputText, TalkerCode* talkerCode, const Q3CString& appId) { m_wasModified = false; // If language doesn't match, return input unmolested. @@ -194,7 +196,7 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){ // << appId << " matches " << m_appIdList << endl; bool found = false; QString appIdStr = appId; - for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) + for ( int ndx=0; ndx < m_appIdList.count(); ++ndx ) { if ( appIdStr.contains(m_appIdList[ndx]) ) { diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.h b/kttsd/filters/stringreplacer/stringreplacerproc.h index 519f332a..66af42b7 100644 --- a/kttsd/filters/stringreplacer/stringreplacerproc.h +++ b/kttsd/filters/stringreplacer/stringreplacerproc.h @@ -28,9 +28,11 @@ // Qt includes. #include #include -#include +#include #include #include +//Added by qt3to4: +#include // KTTS includes. #include "filterproc.h" @@ -70,7 +72,7 @@ public: * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ - virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId); + virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const Q3CString& appId); /** * Did this filter do anything? If the filter returns the input as output @@ -85,9 +87,9 @@ private: QStringList m_appIdList; // List of regular expressions to match. - QValueList m_matchList; + Q3ValueList m_matchList; // List of substitutions to replace matches. - QValueList m_substList; + Q3ValueList m_substList; // True if this filter did anything to the text. bool m_wasModified; }; diff --git a/kttsd/filters/talkerchooser/talkerchooserconf.cpp b/kttsd/filters/talkerchooser/talkerchooserconf.cpp index 3edeb55b..bcd2a6bf 100644 --- a/kttsd/filters/talkerchooser/talkerchooserconf.cpp +++ b/kttsd/filters/talkerchooser/talkerchooserconf.cpp @@ -23,8 +23,10 @@ // Qt includes. #include -#include +#include #include +//Added by qt3to4: +#include // KDE includes. #include diff --git a/kttsd/filters/talkerchooser/talkerchooserproc.cpp b/kttsd/filters/talkerchooser/talkerchooserproc.cpp index a8f89c5d..837bc2a8 100644 --- a/kttsd/filters/talkerchooser/talkerchooserproc.cpp +++ b/kttsd/filters/talkerchooser/talkerchooserproc.cpp @@ -23,6 +23,8 @@ // Qt includes. #include +//Added by qt3to4: +#include // KDE includes. #include @@ -103,7 +105,7 @@ bool TalkerChooserProc::init(KConfig* config, const QString& configGroup){ * Also useful for hints about how to do the filtering. */ /*virtual*/ QString TalkerChooserProc::convert(const QString& inputText, TalkerCode* talkerCode, - const QCString& appId) + const Q3CString& appId) { if ( !m_re.isEmpty() ) { diff --git a/kttsd/filters/talkerchooser/talkerchooserproc.h b/kttsd/filters/talkerchooser/talkerchooserproc.h index 2c8b4498..69949b4c 100644 --- a/kttsd/filters/talkerchooser/talkerchooserproc.h +++ b/kttsd/filters/talkerchooser/talkerchooserproc.h @@ -27,6 +27,8 @@ // KTTS includes. #include "filterproc.h" #include "talkercode.h" +//Added by qt3to4: +#include class TalkerChooserProc : virtual public KttsFilterProc { @@ -75,7 +77,7 @@ public: * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ - virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId); + virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const Q3CString& appId); private: diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp index 7c77b9e1..02d26076 100644 --- a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp +++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp @@ -20,9 +20,11 @@ ***************************************************************************/ #include -#include +#include #include #include +//Added by qt3to4: +#include #include #include "xmlelement.h" @@ -33,7 +35,7 @@ bool XHTMLToSSMLParser::startDocument() { /// Read the file which maps xhtml tags -> ssml tags. Look at the file for more information. QFile file("tagmappingrc"); - if(!file.open(IO_ReadOnly)) { + if(!file.open(QIODevice::ReadOnly)) { std::cerr << "Could not read config file 'tagmappingrc'. Please check that it exists and is readable.\n"; // Kill further parsing return false; diff --git a/kttsd/filters/xmltransformer/xmltransformerconf.cpp b/kttsd/filters/xmltransformer/xmltransformerconf.cpp index 6902c855..85b62c20 100644 --- a/kttsd/filters/xmltransformer/xmltransformerconf.cpp +++ b/kttsd/filters/xmltransformer/xmltransformerconf.cpp @@ -24,6 +24,8 @@ // Qt includes. #include #include +//Added by qt3to4: +#include // KDE includes. #include diff --git a/kttsd/filters/xmltransformer/xmltransformerproc.cpp b/kttsd/filters/xmltransformer/xmltransformerproc.cpp index bfc968b1..5f0d5f04 100644 --- a/kttsd/filters/xmltransformer/xmltransformerproc.cpp +++ b/kttsd/filters/xmltransformer/xmltransformerproc.cpp @@ -24,6 +24,9 @@ // Qt includes. #include #include +//Added by qt3to4: +#include +#include // KDE includes. #include @@ -106,7 +109,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) * Also useful for hints about how to do the filtering. */ /*virtual*/ QString XmlTransformerProc::convert(const QString& inputText, TalkerCode* talkerCode, - const QCString& appId) + const Q3CString& appId) { // kdDebug() << "XmlTransformerProc::convert: Running." << endl; // If not properly configured, do nothing. @@ -140,7 +143,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) * program must call @ref ackFinished to acknowledge the conversion. */ /*virtual*/ bool XmlTransformerProc::asyncConvert(const QString& inputText, TalkerCode* /*talkerCode*/, - const QCString& appId) + const Q3CString& appId) { m_wasModified = false; @@ -158,7 +161,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) if ( !m_rootElementList.isEmpty() ) { // kdDebug() << "XmlTransformerProc::asyncConvert:: searching for root elements " << m_rootElementList << endl; - for ( uint ndx=0; ndx < m_rootElementList.count(); ++ndx ) + for ( int ndx=0; ndx < m_rootElementList.count(); ++ndx ) { if ( KttsUtils::hasRootElement( inputText, m_rootElementList[ndx] ) ) { @@ -174,7 +177,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) } if ( !found && !m_doctypeList.isEmpty() ) { - for ( uint ndx=0; ndx < m_doctypeList.count(); ++ndx ) + for ( int ndx=0; ndx < m_doctypeList.count(); ++ndx ) { if ( KttsUtils::hasDoctype( inputText, m_doctypeList[ndx] ) ) { @@ -196,7 +199,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup) // kdDebug() << "XmlTransformrProc::convert: converting " << inputText << " if appId " // << appId << " matches " << m_appIdList << endl; found = false; - for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) + for ( int ndx=0; ndx < m_appIdList.count(); ++ndx ) { if ( appIdStr.contains(m_appIdList[ndx]) ) { @@ -291,7 +294,7 @@ void XmlTransformerProc::processOutput() /// Read back the data that was written to /tmp/fileName.output. QFile readfile(m_outFilename); - if(!readfile.open(IO_ReadOnly)) { + if(!readfile.open(QIODevice::ReadOnly)) { /// uhh yeah... Issues writing to the output file. kdDebug() << "XmlTransformerProc::processOutput: Could not read file " << m_outFilename << endl; m_state = fsFinished; diff --git a/kttsd/filters/xmltransformer/xmltransformerproc.h b/kttsd/filters/xmltransformer/xmltransformerproc.h index d78f9bfb..5d68ee72 100644 --- a/kttsd/filters/xmltransformer/xmltransformerproc.h +++ b/kttsd/filters/xmltransformer/xmltransformerproc.h @@ -27,6 +27,8 @@ // Qt includes. #include #include +//Added by qt3to4: +#include // KTTS includes. #include "filterproc.h" @@ -80,7 +82,7 @@ public: * @param appId The DCOP appId of the application that queued the text. * Also useful for hints about how to do the filtering. */ - virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId); + virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const Q3CString& appId); /** * Convert input. Runs asynchronously. @@ -96,7 +98,7 @@ public: * program may then call @ref getOutput to retrieve converted text. Calling * program must call @ref ackFinished to acknowledge the conversion. */ - virtual bool asyncConvert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId); + virtual bool asyncConvert(const QString& inputText, TalkerCode* talkerCode, const Q3CString& appId); /** * Waits for a previous call to asyncConvert to finish. -- 2.11.4.GIT