- Timestamp:
- 04/22/10 17:10:46 (13 years ago)
- Branches:
- master, qt5
- Children:
- f299a08
- Parents:
- f7dc75a
- Location:
- src/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/mainwindow.cpp
rf7dc75a rc8c414f 109 109 110 110 useConference(Conference::activeConference()); 111 // optimization, see useConference() code 112 try { 113 initTabs(); 114 } catch (OrmException) { 115 clearTabs(); 116 } 111 117 112 118 #if 0 … … 254 260 try { 255 261 Conference::getById(Conference::activeConference()).update("active",0); 256 Conference::getById(id).update("active",1); 257 258 initTabs(); 262 Conference new_active = Conference::getById(id); 263 new_active.update("active",1); 264 265 // looks like it does not work at n900 266 setWindowTitle(new_active.title()); 267 268 // optimization. 269 // dont run initTabs() here 270 // it takes much CPU, making travelling between conferences in ConferenceEditor longer 271 // and is not seen in maemo WM anyway 272 // instead run it explicitly where needed 273 // dont forget to protect the calls by try-catch! 274 275 // just in case, clear conference selection instead 276 clearTabs(); 277 278 // end of optimization 279 // initTabs(); 259 280 } catch (OrmException& e) { 260 281 // cannon set an active conference … … 271 292 QDate startDate = active.start(); 272 293 QDate endDate = active.end(); 273 setWindowTitle(active.title());274 294 275 295 // 'dayNavigator' emits signal 'dateChanged' after setting valid START:END dates … … 283 303 } 284 304 285 void MainWindow:: unsetConference()305 void MainWindow::clearTabs() 286 306 { 287 307 dayTabContainer->clearModel(); … … 292 312 searchTabContainer->searchAgainClicked(); 293 313 nowTabContainer->clearModel(); 294 295 // TODO: remove 296 // conferenceHeader->hide(); 314 } 315 316 void MainWindow::unsetConference() 317 { 318 clearTabs(); 297 319 setWindowTitle(saved_title); 298 320 } … … 345 367 346 368 dialog.exec(); 369 370 // optimization, see useConference() code 371 try { 372 initTabs(); 373 } catch (OrmException) { 374 clearTabs(); 375 } 347 376 } 348 377 -
src/gui/mainwindow.h
rf7dc75a rc8c414f 60 60 void fillAndShowConferenceHeader(); 61 61 void initTabs(); 62 void clearTabs(); 62 63 void importData(const QByteArray &aData, const QString& url); 63 64
Note: See TracChangeset
for help on using the changeset viewer.