[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.4/kdeedu/kwordquiz/src
From: Frederik Gladhorn <gladhorn () kde ! org>
Date: 2010-01-13 22:04:19
Message-ID: 1263420259.883928.11456.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1074343 by gladhorn:
backport r 1074340 - don't crash when file has < 2 identifiers
M +4 -0 kwordquiz.cpp
--- branches/KDE/4.4/kdeedu/kwordquiz/src/kwordquiz.cpp #1074342:1074343
@@ -585,6 +585,10 @@
if (!url.isEmpty() && KIO::NetAccess::exists(url, KIO::NetAccess::SourceSide, this)) {
int result = m_doc->open(url);
if (result == KEduVocDocument::NoError) {
+ while (m_doc->identifierCount() < 2) { //if we opened a TAB-less CSV, there
+ m_doc->appendIdentifier(); //may be 0 or 1 identifiers, we need at least 2
+ }
+
m_tableModel->reset();
m_dirWatch->addFile(url.path());
setCaption(m_doc->url().fileName(), false);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic