Corner case handling. Copyright update
authorSakari Poussa <spoussa@gmail.com>
Tue, 10 Nov 2009 21:15:31 +0000 (23:15 +0200)
committerSakari Poussa <spoussa@gmail.com>
Tue, 10 Nov 2009 21:15:31 +0000 (23:15 +0200)
TODO
debian/copyright
src/main-window.cpp

diff --git a/TODO b/TODO
index a3f9cfe..d9cbae0 100644 (file)
--- 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
index d3596d9..b9b1f70 100644 (file)
@@ -1,22 +1,12 @@
-This package was debianized by unknown <gnuton@gnuton.org> on
+This package was debianized by Sakari Poussa <spoussa@gmail.com> on
 Wed, 13 Aug 2008 14:17:22 +0300.
 
 It was downloaded from <fill in http/ftp site>
 
-Upstream Author: <put author(s) name and email here>
+Upstream Author: Sakari Poussa spoussa(at)gmail.com
 
-Copyright: <put the year(s) of the copyright, and the names of the
-            copyright holder(s) here>
+Copyright: 2009 Sakari Poussa
 
-License:
+License: GPLv2
 
-<Put the license of the package here>
-
-
-The Debian packaging is (C) 2008, unknown <gnuton@gnuton.org> 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.
 
index d622f56..98351e2 100644 (file)
@@ -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);