comparison widgets/SubdividingMenu.cpp @ 585:f4960f8ce798 debug-output

Convert many cerrs to DEBUGs
author Chris Cannam
date Mon, 16 May 2011 17:19:25 +0100
parents 1fe7951a61e8
children 4806715f7a19
comparison
equal deleted inserted replaced
584:1fe7951a61e8 585:f4960f8ce798
65 65
66 for (set<QString>::const_iterator j = entries.begin(); 66 for (set<QString>::const_iterator j = entries.begin();
67 j != entries.end(); 67 j != entries.end();
68 ++j) { 68 ++j) {
69 69
70 // std::cerr << "SubdividingMenu::setEntries: j -> " << j->toStdString() << std::endl; 70 // DEBUG << "SubdividingMenu::setEntries: j -> " << j->toStdString() << endl;
71 71
72 m_nameToChunkMenuMap[*j] = chunkMenu; 72 m_nameToChunkMenuMap[*j] = chunkMenu;
73 73
74 set<QString>::iterator k = j; 74 set<QString>::iterator k = j;
75 ++k; 75 ++k;
174 m_pendingEntries[name] = action; 174 m_pendingEntries[name] = action;
175 return; 175 return;
176 } 176 }
177 177
178 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { 178 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
179 // std::cerr << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << std::endl; 179 // DEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
180 QMenu::addAction(action); 180 QMenu::addAction(action);
181 return; 181 return;
182 } 182 }
183 183
184 // std::cerr << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << std::endl; 184 // DEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
185 m_nameToChunkMenuMap[name]->addAction(action); 185 m_nameToChunkMenuMap[name]->addAction(action);
186 } 186 }
187 187
188 QAction * 188 QAction *
189 SubdividingMenu::addAction(const QString &name) 189 SubdividingMenu::addAction(const QString &name)
193 m_pendingEntries[name] = action; 193 m_pendingEntries[name] = action;
194 return action; 194 return action;
195 } 195 }
196 196
197 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { 197 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
198 // std::cerr << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << std::endl; 198 // DEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
199 return QMenu::addAction(name); 199 return QMenu::addAction(name);
200 } 200 }
201 201
202 // std::cerr << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << std::endl; 202 // DEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
203 return m_nameToChunkMenuMap[name]->addAction(name); 203 return m_nameToChunkMenuMap[name]->addAction(name);
204 } 204 }
205 205
206 void 206 void
207 SubdividingMenu::addAction(const QString &name, QAction *action) 207 SubdividingMenu::addAction(const QString &name, QAction *action)
210 m_pendingEntries[name] = action; 210 m_pendingEntries[name] = action;
211 return; 211 return;
212 } 212 }
213 213
214 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { 214 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
215 // std::cerr << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << std::endl; 215 // DEBUG << "SubdividingMenu::addAction(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
216 QMenu::addAction(action); 216 QMenu::addAction(action);
217 return; 217 return;
218 } 218 }
219 219
220 // std::cerr << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << std::endl; 220 // DEBUG << "SubdividingMenu::addAction(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
221 m_nameToChunkMenuMap[name]->addAction(action); 221 m_nameToChunkMenuMap[name]->addAction(action);
222 } 222 }
223 223
224 void 224 void
225 SubdividingMenu::addMenu(QMenu *menu) 225 SubdividingMenu::addMenu(QMenu *menu)
230 m_pendingEntries[name] = menu; 230 m_pendingEntries[name] = menu;
231 return; 231 return;
232 } 232 }
233 233
234 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { 234 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
235 // std::cerr << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << std::endl; 235 // DEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
236 QMenu::addMenu(menu); 236 QMenu::addMenu(menu);
237 return; 237 return;
238 } 238 }
239 239
240 // std::cerr << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << std::endl; 240 // DEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
241 m_nameToChunkMenuMap[name]->addMenu(menu); 241 m_nameToChunkMenuMap[name]->addMenu(menu);
242 } 242 }
243 243
244 QMenu * 244 QMenu *
245 SubdividingMenu::addMenu(const QString &name) 245 SubdividingMenu::addMenu(const QString &name)
250 m_pendingEntries[name] = menu; 250 m_pendingEntries[name] = menu;
251 return menu; 251 return menu;
252 } 252 }
253 253
254 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { 254 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
255 // std::cerr << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << std::endl; 255 // DEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
256 return QMenu::addMenu(name); 256 return QMenu::addMenu(name);
257 } 257 }
258 258
259 // std::cerr << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << std::endl; 259 // DEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
260 return m_nameToChunkMenuMap[name]->addMenu(name); 260 return m_nameToChunkMenuMap[name]->addMenu(name);
261 } 261 }
262 262
263 void 263 void
264 SubdividingMenu::addMenu(const QString &name, QMenu *menu) 264 SubdividingMenu::addMenu(const QString &name, QMenu *menu)
267 m_pendingEntries[name] = menu; 267 m_pendingEntries[name] = menu;
268 return; 268 return;
269 } 269 }
270 270
271 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) { 271 if (m_nameToChunkMenuMap.find(name) == m_nameToChunkMenuMap.end()) {
272 // std::cerr << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << std::endl; 272 // DEBUG << "SubdividingMenu::addMenu(" << name << "): not found in name-to-chunk map, adding to main menu" << endl;
273 QMenu::addMenu(menu); 273 QMenu::addMenu(menu);
274 return; 274 return;
275 } 275 }
276 276
277 // std::cerr << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << std::endl; 277 // DEBUG << "SubdividingMenu::addMenu(" << name << "): found in name-to-chunk map for menu " << m_nameToChunkMenuMap[name]->title() << endl;
278 m_nameToChunkMenuMap[name]->addMenu(menu); 278 m_nameToChunkMenuMap[name]->addMenu(menu);
279 } 279 }
280 280