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 /muse2/muse | |
parent | 0b8e29363db66ddbd0dac925bb57b75310a93eba (diff) |
dnd plugins
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/mixer/rack.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
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 { |