On Mon, Jan 09, 2006 at 07:56:39AM +0100, Guillaume Laurent wrote:
> On Monday 09 January 2006 03:27, Ross Vandegrift wrote:
> > I can make a patch when I get home tonight so you guys can see
> > precisely what it was that I needed to do.
> 
> Yes please :-).

Ok, the patch is included below.  I need this patch to compile with Qt
3.3.3 and g++ 3.3.4.

I think there's a possibility I'm missing something obvious, and this
patch is likely not the correct solution.  But it shows what's up.


? RGbuild
Index: gui/audiomanagerdialog.cpp
===================================================================
RCS file: /cvsroot/rosegarden/gui/audiomanagerdialog.cpp,v
retrieving revision 1.127
diff -u -r1.127 audiomanagerdialog.cpp
--- gui/audiomanagerdialog.cpp  9 Jan 2006 12:52:32 -0000       1.127
+++ gui/audiomanagerdialog.cpp  14 Jan 2006 04:38:28 -0000
@@ -1001,6 +1001,7 @@
 
     std::vector<QString> toDelete;
     std::map<QString, AudioFileId> nameMap;
+    std::string toqstr;
 
     for (std::vector<AudioFile*>::const_iterator
          aIt = m_doc->getAudioFileManager().begin();
@@ -1008,7 +1009,9 @@
     {
         if (audioFiles.find((*aIt)->getId()) == audioFiles.end()) {
             toDelete.push_back(strtoqstr((*aIt)->getFilename()));
-           nameMap[(*aIt)->getFilename()] = (*aIt)->getId();
+           toqstr = (*aIt)->getFilename();
+           QString qstr((const char*)toqstr.c_str());
+           nameMap[qstr] = (*aIt)->getId();
        }
     }
 
Index: gui/bankeditor.cpp
===================================================================
RCS file: /cvsroot/rosegarden/gui/bankeditor.cpp,v
retrieving revision 1.129
diff -u -r1.129 bankeditor.cpp
--- gui/bankeditor.cpp  3 Jan 2006 20:14:34 -0000       1.129
+++ gui/bankeditor.cpp  14 Jan 2006 04:38:30 -0000
@@ -488,9 +488,10 @@
 
                if (m_device->getKeyMappingForProgram(*it)) {
                    getEntryButton(i)->setPixmap(keyPixmap);
+                   std::string toqstr = 
m_device->getKeyMappingForProgram(*it)->getName();
+                   QString qstr((const char *)toqstr.c_str());
                    QToolTip::add( getEntryButton(i), 
-                       i18n("Key Mapping: %1").arg(        
-                       m_device->getKeyMappingForProgram(*it)->getName() ) );
+                       i18n("Key Mapping: %1").arg(qstr));
                }
 
                 break;
@@ -789,7 +790,8 @@
        if (QFile(file).exists()) {
            btn->setPixmap(QPixmap(file));
        }
-       QToolTip::add(btn, i18n("Key Mapping: %1").arg(newMapping));
+       QString qstr((const char *)newMapping.c_str());
+       QToolTip::add(btn, i18n("Key Mapping: %1").arg(qstr));
     }
     btn->setEnabled(haveKeyMappings);
 }
@@ -939,7 +941,8 @@
 {
     if (!m_device) return;
 
-    setTitle(m_mappingName);
+    QString qstr((const char *)m_mappingName.c_str());
+    setTitle(qstr);
 
     const Rosegarden::MidiKeyMapping *m = 
m_device->getKeyMappingByName(m_mappingName);
 
@@ -2261,8 +2264,8 @@
 
            for (Rosegarden::KeyMappingList::iterator i = kml.begin();
                 i != kml.end(); ++i) {
-               if (i->getName() == oldName) {
-                   i->setName(label);
+               if (i->getName() == (std::string) oldName) {
+                   i->setName((std::string)label);
                    break;
                }
            }
Index: gui/editcommands.cpp
===================================================================
RCS file: /cvsroot/rosegarden/gui/editcommands.cpp,v
retrieving revision 1.108
diff -u -r1.108 editcommands.cpp
--- gui/editcommands.cpp        3 Jan 2006 20:14:34 -0000       1.108
+++ gui/editcommands.cpp        14 Jan 2006 04:38:32 -0000
@@ -236,9 +236,10 @@
        if (newLabel.contains(i18n("(copied)"))) {
            m_sourceClipboard->newSegment(*i);
        } else {
+           std::string str = (const char *)i18n("%1 (copied)").arg
+               (strtoqstr((*i)->getLabel()));
            m_sourceClipboard->newSegment(*i)->
-               setLabel(i18n("%1 (copied)").arg
-                        (strtoqstr((*i)->getLabel())));
+               setLabel(str);
        }
     }
 }
Index: gui/rosegardengui.cpp
===================================================================
RCS file: /cvsroot/rosegarden/gui/rosegardengui.cpp,v
retrieving revision 1.853
diff -u -r1.853 rosegardengui.cpp
--- gui/rosegardengui.cpp       9 Jan 2006 16:42:00 -0000       1.853
+++ gui/rosegardengui.cpp       14 Jan 2006 04:38:37 -0000
@@ -5544,7 +5544,8 @@
        // and in principle it shouldn't fail
        return "";
     } else {
-       return aF->getFilename();
+       QString qstr((const char *) aF->getFilename().c_str());
+       return qstr;
     }
 }
 
@@ -5557,7 +5558,8 @@
        if (aF) {
            // createRecordingAudioFile doesn't actually write to the disk,
            // and in principle it shouldn't fail
-           qv.push_back(aF->getFilename());
+           QString qstr((const char *)aF->getFilename().c_str());
+           qv.push_back(qstr);
            m_doc->addRecordAudioSegment(recordInstruments[i],
                                         aF->getId());
        }
Index: sound/AlsaDriver.cpp
===================================================================
RCS file: /cvsroot/rosegarden/sound/AlsaDriver.cpp,v
retrieving revision 1.387
diff -u -r1.387 AlsaDriver.cpp
--- sound/AlsaDriver.cpp        13 Jan 2006 14:09:51 -0000      1.387
+++ sound/AlsaDriver.cpp        14 Jan 2006 04:38:42 -0000
@@ -1161,7 +1161,7 @@
 AlsaDriver::setConnectionToDevice(MappedDevice &device, QString connection,
                                  const ClientPortPair &pair)
 {
-    QString prevConnection = device.getConnection();
+    QString prevConnection = (const char *)device.getConnection().c_str();
     device.setConnection(connection.data());
     
     if (device.getDirection() == Rosegarden::MidiDevice::Play) {
@@ -1171,7 +1171,7 @@
        if (j != m_outputPorts.end()) {
 
            if (prevConnection != "") {
-               ClientPortPair prevPair = getPortByName(prevConnection);
+               ClientPortPair prevPair = 
getPortByName((std::string)prevConnection);
                if (prevPair.first >= 0 && prevPair.second >= 0) {
 
        std::cerr << "Disconnecting my port " << j->second << " from " << 
prevPair.first << ":" << prevPair.second << " on reconnection" << std::endl;
@@ -1185,7 +1185,7 @@
                        for (MappedDeviceList::iterator k = m_devices.begin();
                             k != m_devices.end(); ++k) {
                            if ((*k)->getId() != device.getId()) {
-                               if ((*k)->getConnection() == prevConnection) {
+                               if ((*k)->getConnection() == 
(std::string)prevConnection) {
                                    foundElsewhere = true;
                                    break;
                                }
@@ -1368,7 +1368,8 @@
                    for (unsigned int i = 0; i < m_devices.size(); ++i) {
                        
                        if (m_devices[i]->getId() == id) {
-                           setConnectionToDevice(*m_devices[i], port->m_name, 
m_devicePortMap[id]);
+                           QString qstr((const char *)port->m_name.c_str());
+                           setConnectionToDevice(*m_devices[i], qstr, 
m_devicePortMap[id]);
                            
                            // in this case we don't request a device resync,
                            // because this is only invoked at times such as
@@ -4422,7 +4423,8 @@
                for (MappedDeviceList::iterator j = m_devices.begin();
                     j != m_devices.end(); ++j) {
                    if ((*j)->getId() == id) {
-                       setConnectionToDevice(**j, portName);
+                       QString qstr((const char *)portName.c_str());
+                       setConnectionToDevice(**j, qstr);
                    }
                }
 
@@ -4443,7 +4445,8 @@
                        audit << "(Reusing record device " << (*j)->getId()
                                  << ")" << std::endl;
                        m_devicePortMap[(*j)->getId()] = portPair;
-                       setConnectionToDevice(**j, portName);
+                       QString qstr((const char *)portName.c_str());
+                       setConnectionToDevice(**j, qstr);
                        needRecordDevice = false;
                        madeChange = true;
                        break;
@@ -4462,7 +4465,8 @@
                        audit << "(Reusing play device " << (*j)->getId()
                                  << ")" << std::endl;
                        m_devicePortMap[(*j)->getId()] = portPair;
-                       setConnectionToDevice(**j, portName);
+                       QString qstr((const char *)portName.c_str());
+                       setConnectionToDevice(**j, qstr);
                        needPlayDevice = false;
                        madeChange = true;
                        break;
@@ -4566,7 +4570,8 @@
                    if ((*k)->m_client == firstOther.first &&
                        (*k)->m_port == firstOther.second) {
                        m_devicePortMap[(*i)->getId()] = firstOther;
-                       setConnectionToDevice(**i, (*k)->m_name, firstOther);
+                       QString qstr((const char *)(*k)->m_name.c_str());
+                       setConnectionToDevice(**i, qstr, firstOther);
                        madeChange = true;
                        break;
                    }
Index: sound/AudioFileManager.cpp
===================================================================
RCS file: /cvsroot/rosegarden/sound/AudioFileManager.cpp,v
retrieving revision 1.82
diff -u -r1.82 AudioFileManager.cpp
--- sound/AudioFileManager.cpp  13 Jan 2006 14:10:20 -0000      1.82
+++ sound/AudioFileManager.cpp  14 Jan 2006 04:38:42 -0000
@@ -385,7 +385,7 @@
 void
 AudioFileManager::testAudioPath() throw (BadAudioPathException)
 {
-    QFileInfo info(m_audioPath);
+    QFileInfo info((const char *)m_audioPath.c_str());
     if (!(info.exists() && info.isDir() && !info.isRelative() &&
          info.isWritable() && info.isReadable()))
        throw BadAudioPathException(m_audioPath.data());

-- 
Ross Vandegrift
[EMAIL PROTECTED]

"The good Christian should beware of mathematicians, and all those who
make empty prophecies. The danger already exists that the mathematicians
have made a covenant with the devil to darken the spirit and to confine
man in the bonds of Hell."
        --St. Augustine, De Genesi ad Litteram, Book II, xviii, 37


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to