From 34f9fb402f8dfaeca523ef143f187880cabaa547 Mon Sep 17 00:00:00 2001 From: Sakari Poussa Date: Tue, 10 Nov 2009 23:15:31 +0200 Subject: [PATCH] Corner case handling. Copyright update --- TODO | 4 ++++ debian/copyright | 18 ++++-------------- src/main-window.cpp | 13 +++++++++---- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/TODO b/TODO index a3f9cfe..d9cbae0 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,10 @@ TOP Items +- Course edit does not store the changes TODO General: + +- If course is in the score but not in course, navogating away from + the score not possible. Editing the score core dumps. - Statistics view (BIG) - Delete score - Delete course diff --git a/debian/copyright b/debian/copyright index d3596d9..b9b1f70 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,22 +1,12 @@ -This package was debianized by unknown on +This package was debianized by Sakari Poussa on Wed, 13 Aug 2008 14:17:22 +0300. It was downloaded from -Upstream Author: +Upstream Author: Sakari Poussa spoussa(at)gmail.com -Copyright: +Copyright: 2009 Sakari Poussa -License: +License: GPLv2 - - - -The Debian packaging is (C) 2008, unknown and -is licensed under the GPL, see `/usr/share/common-licenses/GPL'. - - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. diff --git a/src/main-window.cpp b/src/main-window.cpp index d622f56..98351e2 100644 --- a/src/main-window.cpp +++ b/src/main-window.cpp @@ -58,10 +58,6 @@ void MainWindow::loadSettings(void) { bool external = false; -#ifndef Q_WS_HILDON - topDir = "."; -#endif - QDir mmc(mmcDir); if (mmc.exists()) external = true; @@ -69,12 +65,16 @@ void MainWindow::loadSettings(void) // TODO: make via user option, automatic will never work external = false; +#ifndef Q_WS_HILDON + dataDir = "./" + dataDirName; +#else if (external) { dataDir = mmcDir + "/" + appName + "/" + dataDirName; } else { dataDir = topDir + "/" + appName + "/" + dataDirName; } +#endif scoreFile = dataDir + "/" + scoreFileName; clubFile = dataDir + "/" + clubFileName; @@ -345,6 +345,11 @@ void MainWindow::editCourse() { Course *course = scoreTableModel->getCourse(); + if (!course) { + qWarning() << "No course on edit"; + return; + } + CourseDialog *courseDialog = new CourseDialog(this); courseDialog->init(course); -- 1.7.9.5