~ubuntu-branches/ubuntu/gutsy/muse/gutsy

« back to all changes in this revision

Viewing changes to debian/patches/10_lash_private_api_fix.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2007-07-11 20:11:14 UTC
  • Revision ID: james.westby@ubuntu.com-20070711201114-u5o8wy0m3uegsnwz
Tags: 0.8.1a-5
* Added patches:
  + [10_lash_private_api_fix] New.
    Don't use functions from LASH's internal API. Fixes build errors
    with recent liblash. Closes: #431327

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 10_lash_private_api_fix.dpatch by Daniel Kobras <kobras@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: Do not use private LASH function lash_get_fqn(), and replace with
 
6
## DP: Qt equivalent.
 
7
 
 
8
@DPATCH@
 
9
diff -urNad muse~/muse/app.cpp muse/muse/app.cpp
 
10
--- muse~/muse/app.cpp  2006-03-28 19:28:57.000000000 +0200
 
11
+++ muse/muse/app.cpp   2007-07-11 20:08:41.000000000 +0200
 
12
@@ -2717,13 +2717,14 @@
 
13
         case LASH_Save_File:
 
14
          {
 
15
           /* save file */
 
16
-          const char *name = lash_get_fqn (lash_event_get_string (event), "lash-project-muse.med");
 
17
-          int ok = save (name, false);
 
18
+         QFileInfo name(QDir(lash_event_get_string (event)),
 
19
+                        QString("lash-project-muse.med"));
 
20
+          int ok = save (name.filePath(), false);
 
21
           if (ok) {
 
22
-                project.setFile(name);
 
23
+                project.setFile(name.filePath());
 
24
                 setCaption(tr("MusE: Song: ") + project.baseName(true));
 
25
-                addProject(name);
 
26
-                museProject = QFileInfo(name).dirPath(true);
 
27
+                addProject(name.filePath());
 
28
+                museProject = name.dirPath(true);
 
29
                 }
 
30
           lash_send_event (lash_client, event);
 
31
          }
 
32
@@ -2732,7 +2733,9 @@
 
33
         case LASH_Restore_File: 
 
34
          {
 
35
           /* load file */
 
36
-          loadProjectFile (lash_get_fqn (lash_event_get_string (event), "lash-project-muse.med" ), false, true);
 
37
+         QFileInfo name(QDir(lash_event_get_string (event)),
 
38
+                        QString("lash-project-muse.med"));
 
39
+          loadProjectFile (name.filePath(), false, true);
 
40
           lash_send_event (lash_client, event);
 
41
          }
 
42
           break;