summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/talkfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/talkfile.cpp')
-rw-r--r--rbutil/rbutilqt/talkfile.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/rbutil/rbutilqt/talkfile.cpp b/rbutil/rbutilqt/talkfile.cpp
index 5b8bb3f175..2096c8150b 100644
--- a/rbutil/rbutilqt/talkfile.cpp
+++ b/rbutil/rbutilqt/talkfile.cpp
@@ -41,7 +41,7 @@ bool TalkFileCreator::initEncoder()
41bool TalkFileCreator::initTTS() 41bool TalkFileCreator::initTTS()
42{ 42{
43 QFileInfo tts(m_TTSexec); 43 QFileInfo tts(m_TTSexec);
44 44
45 if(tts.exists()) 45 if(tts.exists())
46 { 46 {
47 return true; 47 return true;
@@ -68,14 +68,14 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
68 return false; 68 return false;
69 } 69 }
70 QApplication::processEvents(); 70 QApplication::processEvents();
71 71
72 connect(logger,SIGNAL(aborted()),this,SLOT(abort())); 72 connect(logger,SIGNAL(aborted()),this,SLOT(abort()));
73 m_logger->setProgressMax(0); 73 m_logger->setProgressMax(0);
74 QDirIterator it(m_dir,QDirIterator::Subdirectories); 74 QDirIterator it(m_dir,QDirIterator::Subdirectories);
75 QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0); 75 QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0);
76 installlog.beginGroup("talkfiles"); 76 installlog.beginGroup("talkfiles");
77 // iterate over all entrys 77 // iterate over all entrys
78 while (it.hasNext()) 78 while (it.hasNext())
79 { 79 {
80 if(m_abort) 80 if(m_abort)
81 { 81 {
@@ -88,7 +88,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
88 QString toSpeak; 88 QString toSpeak;
89 QString filename; 89 QString filename;
90 QString wavfilename; 90 QString wavfilename;
91 91
92 if(fileInf.fileName() == "." || fileInf.fileName() == ".." || fileInf.suffix() == "talk") 92 if(fileInf.fileName() == "." || fileInf.fileName() == ".." || fileInf.suffix() == "talk")
93 { 93 {
94 it.next(); 94 it.next();
@@ -108,10 +108,10 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
108 filename = fileInf.absoluteFilePath() + ".talk"; 108 filename = fileInf.absoluteFilePath() + ".talk";
109 } 109 }
110 wavfilename = filename + ".wav"; 110 wavfilename = filename + ".wav";
111 111
112 QFileInfo filenameInf(filename); 112 QFileInfo filenameInf(filename);
113 QFileInfo wavfilenameInf(wavfilename); 113 QFileInfo wavfilenameInf(wavfilename);
114 114
115 if(!filenameInf.exists() || m_overwriteTalk) 115 if(!filenameInf.exists() || m_overwriteTalk)
116 { 116 {
117 if(!wavfilenameInf.exists() || m_overwriteWav) 117 if(!wavfilenameInf.exists() || m_overwriteWav)
@@ -132,7 +132,7 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
132 return false; 132 return false;
133 } 133 }
134 } 134 }
135 135
136 QString now = QDate::currentDate().toString("yyyyMMdd"); 136 QString now = QDate::currentDate().toString("yyyyMMdd");
137 if(m_removeWav) 137 if(m_removeWav)
138 { 138 {
@@ -142,18 +142,18 @@ bool TalkFileCreator::createTalkFiles(ProgressloggerInterface* logger)
142 } 142 }
143 else 143 else
144 installlog.setValue(wavfilename.remove(m_mountpoint),now); 144 installlog.setValue(wavfilename.remove(m_mountpoint),now);
145 145
146 installlog.setValue(filename.remove(m_mountpoint),now); 146 installlog.setValue(filename.remove(m_mountpoint),now);
147 it.next(); 147 it.next();
148 } 148 }
149 149
150 installlog.endGroup(); 150 installlog.endGroup();
151 m_logger->addItem("Finished creating Talkfiles",LOGOK); 151 m_logger->addItem("Finished creating Talkfiles",LOGOK);
152 m_logger->setProgressMax(1); 152 m_logger->setProgressMax(1);
153 m_logger->setProgressValue(1); 153 m_logger->setProgressValue(1);
154 m_logger->abort(); 154 m_logger->abort();
155 155
156 return true; 156 return true;
157 157
158} 158}
159 159