diff options
author | Robert Jonsson <spamatica@gmail.com> | 2011-04-21 21:21:22 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2011-04-21 21:21:22 +0000 |
commit | 9c6c457618565fda91eb27b8ac6929d720531386 (patch) | |
tree | c5103ee100f30c4a1660005a0f0ed8192fe56b5e | |
parent | 0b8e29363db66ddbd0dac925bb57b75310a93eba (diff) |
dnd plugins
-rw-r--r-- | muse2/ChangeLog | 3 | ||||
-rw-r--r-- | muse2/muse/mixer/rack.cpp | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 0a3f6c74..e90db090 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,6 @@ +21.04.2011: + - Fixed drag&drop plugin instantantiation (again), was using a string pointer to private data + now copies the data before use (rj) 19.04.2011: - Added undo/redo to master list editor for key editing, should implicitly mean that SC_KEY is emitted to detect song change (not tested) (rj) diff --git a/muse2/muse/mixer/rack.cpp b/muse2/muse/mixer/rack.cpp index afb8ae49..c2333e9d 100644 --- a/muse2/muse/mixer/rack.cpp +++ b/muse2/muse/mixer/rack.cpp @@ -417,6 +417,7 @@ void EffectRack::startDrag(int idx) xml.dump(xmlconf); QByteArray data(xmlconf.toLatin1().constData()); + //printf("sending %d [%s]\n", data.length(), xmlconf.toLatin1().constData()); QMimeData* md = new QMimeData(); md->setData("text/x-muse-plugin", data); @@ -482,9 +483,11 @@ void EffectRack::dropEvent(QDropEvent *event) if(event->mimeData()->hasFormat("text/x-muse-plugin")) { - QString outxml; - Xml xml(event->mimeData()->data("text/x-muse-plugin").data()); + char *tmpStr = new char[event->mimeData()->data("text/x-muse-plugin").size()]; + strcpy(tmpStr, event->mimeData()->data("text/x-muse-plugin").data()); + Xml xml(tmpStr); initPlugin(xml, idx); + delete tmpStr; } else if (event->mimeData()->hasUrls()) @@ -577,7 +580,9 @@ void EffectRack::initPlugin(Xml xml, int idx) if (tag == "plugin") { PluginI* plugi = new PluginI(); if (plugi->readConfiguration(xml, false)) { - printf("cannot instantiate plugin\n"); + //QString d; + //xml.dump(d); + //printf("cannot instantiate plugin [%s]\n", d.toLatin1().data()); delete plugi; } else { |