~bfiller/gallery-app/silo-17-fixes

« back to all changes in this revision

Viewing changes to src/gallery-application.cpp

Wait until the media monitor has completed its consistency checks before connecting to the content hub. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
    if (m_cmdLineParser->pickModeEnabled())
105
105
        setDefaultUiMode(GalleryApplication::PickContentMode);
106
106
 
 
107
    QObject::connect(m_galleryManager, SIGNAL(consistencyCheckFinished()),
 
108
                     this, SLOT(consistencyCheckFinished()));
 
109
 
107
110
    QObject::connect(m_contentCommunicator, SIGNAL(photoRequested()),
108
111
                     this, SLOT(switchToPickMode()));
109
112
 
240
243
        qDebug() << "GalleryManager initialized" << m_timer->elapsed() << "ms";
241
244
 
242
245
    emit mediaLoaded();
 
246
 
243
247
    if (m_cmdLineParser->startupTimer()) {
244
248
        qDebug() << "MainView loaded" << m_timer->elapsed() << "ms";
245
249
        qDebug() << "Startup took" << m_timer->elapsed() << "ms";
361
365
 
362
366
    m_timer->restart();
363
367
}
 
368
 
 
369
/*!
 
370
 * \brief GalleryApplication::consistencyCheckFinished triggered when the media
 
371
 * monitor finishes its consistency check
 
372
 */
 
373
void GalleryApplication::consistencyCheckFinished()
 
374
{
 
375
    // Register content hub integration after media monitor has finished
 
376
    // its consistency check, as new images may be added by the import handler
 
377
    // during start-up.
 
378
    m_contentCommunicator->registerWithHub();
 
379
}