Changeset View
Changeset View
Standalone View
Standalone View
src/practice/sessionmanagerbase.cpp
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 72 | if (Prefs::learningLanguage() >= m_doc->identifierCount() | |||
---|---|---|---|---|---|
73 | || Prefs::knownLanguage() >= m_doc->identifierCount()) | 73 | || Prefs::knownLanguage() >= m_doc->identifierCount()) | ||
74 | { | 74 | { | ||
75 | Prefs::setLearningLanguage(0); | 75 | Prefs::setLearningLanguage(0); | ||
76 | Prefs::setKnownLanguage(1); | 76 | Prefs::setKnownLanguage(1); | ||
77 | } | 77 | } | ||
78 | 78 | | |||
79 | m_learningLanguageIndex = Prefs::learningLanguage(); | 79 | m_learningLanguageIndex = Prefs::learningLanguage(); | ||
80 | m_knownLanguageIndex = Prefs::knownLanguage(); | 80 | m_knownLanguageIndex = Prefs::knownLanguage(); | ||
81 | qDebug() << "Practice: learning language:" << m_doc->identifier(m_learningLanguageIndex).name() | 81 | // qDebug() << "Practice: learning language:" << m_doc->identifier(m_learningLanguageIndex).name() | ||
82 | << " known language:" << m_doc->identifier(m_knownLanguageIndex).name(); | 82 | // << " known language:" << m_doc->identifier(m_knownLanguageIndex).name(); | ||
83 | 83 | | |||
84 | // Create the list of available entries for this training session. | 84 | // Create the list of available entries for this training session. | ||
85 | EntryFilter filter(m_doc, m_parent); | 85 | EntryFilter filter(m_doc, m_parent); | ||
86 | m_allTestEntries = filter.entries(); | 86 | m_allTestEntries = filter.entries(); | ||
87 | 87 | | |||
88 | qDebug() << "Entries: ----------------"; | 88 | // qDebug() << "Entries: ----------------"; | ||
89 | qDebug() << "Found " << m_allTestEntries.count() << " entries after filtering."; | 89 | // qDebug() << "Found " << m_allTestEntries.count() << " entries after filtering."; | ||
90 | foreach (TestEntry *entry, m_allTestEntries) { | 90 | // foreach (TestEntry *entry, m_allTestEntries) { | ||
91 | qDebug() << "Entry: " << entry->languageFrom() << entry->entry()->translation(entry->languageFrom())->text() | 91 | // qDebug() << "Entry: " << entry->languageFrom() << entry->entry()->translation(entry->languageFrom())->text() | ||
92 | << "to" << entry->languageTo() << entry->entry()->translation(entry->languageTo())->text(); | 92 | // << "to" << entry->languageTo() << entry->entry()->translation(entry->languageTo())->text(); | ||
93 | } | 93 | // } | ||
94 | 94 | | |||
95 | // Create the list actual entries in this training session. This | 95 | // Create the list actual entries in this training session. This | ||
96 | // is a pure virtual function and must be implemented by the | 96 | // is a pure virtual function and must be implemented by the | ||
97 | // concrete session managers. | 97 | // concrete session managers. | ||
98 | initializeTraining(); | 98 | initializeTraining(); | ||
99 | } | 99 | } | ||
100 | 100 | | |||
101 | QString SessionManagerBase::title() const | 101 | QString SessionManagerBase::title() const | ||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |