[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeaccessibility/kttsd/plugins/festivalint
From:       Gary Cramblitt <garycramblitt () comcast ! net>
Date:       2005-04-30 22:57:38
Message-ID: 20050430225738.837DD665 () office ! kde ! org
[Download RAW message or body]

CVS commit by cramblitt: 

Bug fix.  Existing selected voice not selected when editing Festival Talker \
configuration.


  M +7 -5      festivalintconf.cpp   1.37
  M +1 -1      festivalintconf.h   1.20
  M +2 -2      festivalintproc.cpp   1.38


--- kdeaccessibility/kttsd/plugins/festivalint/festivalintconf.cpp  #1.36:1.37
@@ -127,8 +127,9 @@ FestivalIntConf::~FestivalIntConf(){
 * -1 if not found.
 */
-int FestivalIntConf::voiceCodeToListIndex(const QString voiceCode)
+int FestivalIntConf::voiceCodeToListIndex(const QString& voiceCode) const
 {
-    for(uint index = 0 ; index < m_voiceList.count(); ++index){
-        // kdDebug() << "Testing: " << voiceSelected << " == " << \
m_voiceList[index].code << endl; +    const int voiceListCount = m_voiceList.count();
+    for(int index = 0; index < voiceListCount; ++index){
+        // kdDebug() << "Testing: " << voiceCode << " == " << \
m_voiceList[index].code << endl;  if(voiceCode == m_voiceList[index].code)
             return index;
@@ -410,5 +411,5 @@ void FestivalIntConf::scanVoices()
 
     // Clear existing list of supported voice codes.
-    m_supportedVoiceCodes.clear();
+    // m_supportedVoiceCodes.clear();
     m_widget->selectVoiceCombo->clear();
 
@@ -529,5 +530,5 @@ void FestivalIntConf::scanVoices()
         }
         m_widget->selectVoiceCombo->setEnabled(true);
-    }
+    } else kdDebug() << "FestivalIntConf::scanVoices: No voices found" << endl;
     setDefaultVoice(voiceCodeToListIndex(currentVoiceCode));
     // Emit configChanged if the enabled state of the selectVoiceCombo has changed.
@@ -538,4 +539,5 @@ void FestivalIntConf::scanVoices()
 void FestivalIntConf::slotQueryVoicesFinished(const QStringList &voiceCodes)
 {
+    // kdDebug() << "FestivalIntConf::slotQueryVoicesFinished: voiceCodes.count() = \
" << voiceCodes.count() << endl;  m_supportedVoiceCodes = voiceCodes;
     if (m_progressDlg) m_progressDlg->close();

--- kdeaccessibility/kttsd/plugins/festivalint/festivalintconf.h  #1.19:1.20
@@ -154,5 +154,5 @@ class FestivalIntConf : public PlugInCon
         * -1 if not found.
         */
-        int voiceCodeToListIndex(const QString voiceCode);
+        int voiceCodeToListIndex(const QString& voiceCode) const;
 
         /**

--- kdeaccessibility/kttsd/plugins/festivalint/festivalintproc.cpp  #1.37:1.38
@@ -184,5 +184,5 @@ void FestivalIntProc::startEngine(const 
         m_festProc->setEnvironment("LANG", languageCode + "." + codec->mimeName());
         m_festProc->setEnvironment("LC_CTYPE", languageCode + "." + \
                codec->mimeName());
-        kdDebug() << "FestivalIntProc::startEngine: setting LANG = LC_CTYPE = " << \
languageCode << "." << codec->mimeName() << endl; +        // kdDebug() << \
"FestivalIntProc::startEngine: setting LANG = LC_CTYPE = " << languageCode << "." << \
codec->mimeName() << endl;  connect(m_festProc, SIGNAL(processExited(KProcess*)),
                 this, SLOT(slotProcessExited(KProcess*)));
@@ -506,5 +506,5 @@ void FestivalIntProc::slotReceivedStdout
     bool emitQueryVoicesFinished = false;
     QStringList voiceCodesList;
-    if (m_waitingQueryVoices)
+    if (m_waitingQueryVoices && m_outputQueue.isEmpty())
     {
         // Look for opening ( and closing ).


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic