summaryrefslogtreecommitdiffstats
path: root/src/document
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-11-26 17:42:48 -0600
committerTimothy Pearson <[email protected]>2011-11-26 17:42:48 -0600
commit4b3c5dd929ea78ca3b6f656a63d70b10d2f43885 (patch)
tree995c0d3e35794c1bb1029d6b7eacdd80827807bd /src/document
parent1461610fb35bb0fcee490f274ea84b8ebfeb1566 (diff)
downloadrosegarden-4b3c5dd929ea78ca3b6f656a63d70b10d2f43885.tar.gz
rosegarden-4b3c5dd929ea78ca3b6f656a63d70b10d2f43885.zip
Fix FTBFS
Diffstat (limited to 'src/document')
-rw-r--r--src/document/MultiViewCommandHistory.cpp4
-rw-r--r--src/document/RoseXmlHandler.cpp160
-rw-r--r--src/document/RosegardenGUIDoc.cpp20
-rw-r--r--src/document/RosegardenGUIDoc.h8
-rw-r--r--src/document/io/LilyPondExporter.cpp2
5 files changed, 97 insertions, 97 deletions
diff --git a/src/document/MultiViewCommandHistory.cpp b/src/document/MultiViewCommandHistory.cpp
index 0cc94b2..a987f0f 100644
--- a/src/document/MultiViewCommandHistory.cpp
+++ b/src/document/MultiViewCommandHistory.cpp
@@ -307,7 +307,7 @@ MultiViewCommandHistory::updateButton(bool undo,
{
for (ViewSet::iterator i = m_views.begin(); i != m_views.end(); ++i) {
- KAction *action = (*i)->action(name);
+ KAction *action = (*i)->action(name.ascii());
if (!action)
continue;
TQString text;
@@ -340,7 +340,7 @@ MultiViewCommandHistory::updateMenu(bool undo,
{
for (ViewSet::iterator i = m_views.begin(); i != m_views.end(); ++i) {
- KAction *action = (*i)->action(name);
+ KAction *action = (*i)->action(name.ascii());
if (!action)
continue;
diff --git a/src/document/RoseXmlHandler.cpp b/src/document/RoseXmlHandler.cpp
index 99718f3..ea49839 100644
--- a/src/document/RoseXmlHandler.cpp
+++ b/src/document/RoseXmlHandler.cpp
@@ -120,7 +120,7 @@ bool ConfigurationXmlSubHandler::startElement(const TQString&, const TQString&,
// handle alternative encoding for properties with arbitrary names
m_propertyName = atts.value("name");
TQString value = atts.value("value");
- if (value) {
+ if (!value.isNull()) {
m_propertyType = "String";
m_configuration->set<String>(qstrtostr(m_propertyName),
qstrtostr(value));
@@ -433,7 +433,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// std::cerr << "\n\n\nRosegarden file version = \"" << version << "\"\n\n\n" << std::endl;
- if (smajor) {
+ if (!smajor.isNull()) {
int major = smajor.toInt();
int minor = sminor.toInt();
@@ -477,17 +477,17 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
//
TQString thruStr = atts.value("thrufilter");
- if (thruStr)
+ if (!thruStr.isNull())
getStudio().setMIDIThruFilter(thruStr.toInt());
TQString recordStr = atts.value("recordfilter");
- if (recordStr)
+ if (!recordStr.isNull())
getStudio().setMIDIRecordFilter(recordStr.toInt());
TQString inputStr = atts.value("audioinputpairs");
- if (inputStr) {
+ if (!inputStr.isNull()) {
int inputs = inputStr.toInt();
if (inputs < 1)
inputs = 1; // we simply don't permit no inputs
@@ -498,14 +498,14 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString mixerStr = atts.value("mixerdisplayoptions");
- if (mixerStr) {
+ if (!mixerStr.isNull()) {
unsigned int mixer = mixerStr.toUInt();
getStudio().setMixerDisplayOptions(mixer);
}
TQString metronomeStr = atts.value("metronomedevice");
- if (metronomeStr) {
+ if (!metronomeStr.isNull()) {
DeviceId metronome = metronomeStr.toUInt();
getStudio().setMetronomeDevice(metronome);
}
@@ -519,32 +519,32 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
timeT t = 0;
TQString timeStr = atts.value("time");
- if (timeStr)
+ if (!timeStr.isNull())
t = timeStr.toInt();
int num = 4;
TQString numStr = atts.value("numerator");
- if (numStr)
+ if (!numStr.isNull())
num = numStr.toInt();
int denom = 4;
TQString denomStr = atts.value("denominator");
- if (denomStr)
+ if (!denomStr.isNull())
denom = denomStr.toInt();
bool common = false;
TQString commonStr = atts.value("common");
- if (commonStr)
+ if (!commonStr.isNull())
common = (commonStr == "true");
bool hidden = false;
TQString hiddenStr = atts.value("hidden");
- if (hiddenStr)
+ if (!hiddenStr.isNull())
hidden = (hiddenStr == "true");
bool hiddenBars = false;
TQString hiddenBarsStr = atts.value("hiddenbars");
- if (hiddenBarsStr)
+ if (!hiddenBarsStr.isNull())
hiddenBars = (hiddenBarsStr == "true");
getComposition().addTimeSignature
@@ -554,21 +554,21 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
timeT t = 0;
TQString timeStr = atts.value("time");
- if (timeStr)
+ if (!timeStr.isNull())
t = timeStr.toInt();
tempoT tempo = Composition::getTempoForQpm(120.0);
TQString tempoStr = atts.value("tempo");
TQString targetStr = atts.value("target");
TQString bphStr = atts.value("bph");
- if (tempoStr) {
+ if (!tempoStr.isNull()) {
tempo = tempoStr.toInt();
- } else if (bphStr) {
+ } else if (!bphStr.isNull()) {
tempo = Composition::getTempoForQpm
(double(bphStr.toInt()) / 60.0);
}
- if (targetStr) {
+ if (!targetStr.isNull()) {
getComposition().addTempoAtTime(t, tempo, targetStr.toInt());
} else {
getComposition().addTempoAtTime(t, tempo);
@@ -587,12 +587,12 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// Get and set the record track
//
TQString recordStr = atts.value("recordtrack");
- if (recordStr) {
+ if (!recordStr.isNull()) {
getComposition().setTrackRecording(recordStr.toInt(), true);
}
TQString recordPlStr = atts.value("recordtracks");
- if (recordPlStr) {
+ if (!recordPlStr.isNull()) {
RG_DEBUG << "Record tracks: " << recordPlStr << endl;
TQStringList recordList = TQStringList::split(',', recordPlStr);
for (TQStringList::iterator i = recordList.begin();
@@ -606,7 +606,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
//
int position = 0;
TQString positionStr = atts.value("pointer");
- if (positionStr) {
+ if (!positionStr.isNull()) {
position = positionStr.toInt();
}
@@ -618,12 +618,12 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// older defaultTempo.
//
TQString tempoStr = atts.value("compositionDefaultTempo");
- if (tempoStr) {
+ if (!tempoStr.isNull()) {
tempoT tempo = tempoT(tempoStr.toInt());
getComposition().setCompositionDefaultTempo(tempo);
} else {
tempoStr = atts.value("defaultTempo");
- if (tempoStr) {
+ if (!tempoStr.isNull()) {
double tempo = qstrtodouble(tempoStr);
getComposition().setCompositionDefaultTempo
(Composition::getTempoForQpm(tempo));
@@ -639,7 +639,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString loopStartStr = atts.value("loopstart");
TQString loopEndStr = atts.value("loopend");
- if (loopStartStr && loopEndStr) {
+ if (!loopStartStr.isNull() && !loopEndStr.isNull()) {
int loopStart = loopStartStr.toInt();
int loopEnd = loopEndStr.toInt();
@@ -649,7 +649,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString selectedTrackStr = atts.value("selected");
- if (selectedTrackStr) {
+ if (!selectedTrackStr.isNull()) {
TrackId selectedTrack =
(TrackId)selectedTrackStr.toInt();
@@ -657,7 +657,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString soloTrackStr = atts.value("solo");
- if (soloTrackStr) {
+ if (!soloTrackStr.isNull()) {
if (soloTrackStr.toInt() == 1)
getComposition().setSolo(true);
else
@@ -666,7 +666,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString playMetStr = atts.value("playmetronome");
- if (playMetStr) {
+ if (!playMetStr.isNull()) {
if (playMetStr.toInt())
getComposition().setPlayMetronome(true);
else
@@ -674,7 +674,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString recMetStr = atts.value("recordmetronome");
- if (recMetStr) {
+ if (!recMetStr.isNull()) {
if (recMetStr.toInt())
getComposition().setRecordMetronome(true);
else
@@ -682,23 +682,23 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString nextTriggerIdStr = atts.value("nexttriggerid");
- if (nextTriggerIdStr) {
+ if (!nextTriggerIdStr.isNull()) {
getComposition().setNextTriggerSegmentId(nextTriggerIdStr.toInt());
}
TQString copyrightStr = atts.value("copyright");
- if (copyrightStr) {
+ if (!copyrightStr.isNull()) {
getComposition().setCopyrightNote(qstrtostr(copyrightStr));
}
TQString startMarkerStr = atts.value("startMarker");
TQString endMarkerStr = atts.value("endMarker");
- if (startMarkerStr) {
+ if (!startMarkerStr.isNull()) {
getComposition().setStartMarker(startMarkerStr.toInt());
}
- if (endMarkerStr) {
+ if (!endMarkerStr.isNull()) {
getComposition().setEndMarker(endMarkerStr.toInt());
}
@@ -716,17 +716,17 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
bool muted = false;
TQString trackNbStr = atts.value("id");
- if (trackNbStr) {
+ if (!trackNbStr.isNull()) {
id = trackNbStr.toInt();
}
TQString labelStr = atts.value("label");
- if (labelStr) {
+ if (!labelStr.isNull()) {
label = qstrtostr(labelStr);
}
TQString mutedStr = atts.value("muted");
- if (mutedStr) {
+ if (!mutedStr.isNull()) {
if (mutedStr == "true")
muted = true;
else
@@ -734,12 +734,12 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString positionStr = atts.value("position");
- if (positionStr) {
+ if (!positionStr.isNull()) {
position = positionStr.toInt();
}
TQString instrumentStr = atts.value("instrument");
- if (instrumentStr) {
+ if (!instrumentStr.isNull()) {
instrument = instrumentStr.toInt();
}
@@ -754,42 +754,42 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// here
TQString presetLabelStr = atts.value("defaultLabel");
- if (labelStr) {
+ if (!labelStr.isNull()) {
track->setPresetLabel(presetLabelStr.ascii());
}
TQString clefStr = atts.value("defaultClef");
- if (clefStr) {
+ if (!clefStr.isNull()) {
track->setClef(clefStr.toInt());
}
TQString transposeStr = atts.value("defaultTranspose");
- if (transposeStr) {
+ if (!transposeStr.isNull()) {
track->setTranspose(transposeStr.toInt());
}
TQString colorStr = atts.value("defaultColour");
- if (colorStr) {
+ if (!colorStr.isNull()) {
track->setColor(colorStr.toInt());
}
TQString highplayStr = atts.value("defaultHighestPlayable");
- if (highplayStr) {
+ if (!highplayStr.isNull()) {
track->setHighestPlayable(highplayStr.toInt());
}
TQString lowplayStr = atts.value("defaultLowestPlayable");
- if (lowplayStr) {
+ if (!lowplayStr.isNull()) {
track->setLowestPlayable(lowplayStr.toInt());
}
TQString staffSizeStr = atts.value("staffSize");
- if (staffSizeStr) {
+ if (!staffSizeStr.isNull()) {
track->setStaffSize(staffSizeStr.toInt());
}
TQString staffBracketStr = atts.value("staffBracket");
- if (staffBracketStr) {
+ if (!staffBracketStr.isNull()) {
track->setStaffBracket(staffBracketStr.toInt());
}
@@ -809,17 +809,17 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
int track = -1, startTime = 0;
unsigned int colourindex = 0;
TQString trackNbStr = atts.value("track");
- if (trackNbStr) {
+ if (!trackNbStr.isNull()) {
track = trackNbStr.toInt();
}
TQString startIdxStr = atts.value("start");
- if (startIdxStr) {
+ if (!startIdxStr.isNull()) {
startTime = startIdxStr.toInt();
}
TQString segmentType = (atts.value("type")).lower();
- if (segmentType) {
+ if (!segmentType.isNull()) {
if (segmentType == "audio") {
int audioFileId = atts.value("file").toInt();
@@ -854,7 +854,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString delayStr = atts.value("delay");
- if (delayStr) {
+ if (!delayStr.isNull()) {
RG_DEBUG << "Delay string is \"" << delayStr << "\"" << endl;
long delay = delayStr.toLong();
RG_DEBUG << "Delay is " << delay << endl;
@@ -864,8 +864,8 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString rtDelaynSec = atts.value("rtdelaynsec");
TQString rtDelayuSec = atts.value("rtdelayusec");
TQString rtDelaySec = atts.value("rtdelaysec");
- if (rtDelaySec && (rtDelaynSec || rtDelayuSec)) {
- if (rtDelaynSec) {
+ if (!rtDelaySec.isNull() && (!rtDelaynSec.isNull() || !rtDelayuSec.isNull())) {
+ if (!rtDelaynSec.isNull()) {
m_currentSegment->setRealTimeDelay
(RealTime(rtDelaySec.toInt(),
rtDelaynSec.toInt()));
@@ -877,31 +877,31 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString transposeStr = atts.value("transpose");
- if (transposeStr)
+ if (!transposeStr.isNull())
m_currentSegment->setTranspose(transposeStr.toInt());
// fill in the label
TQString labelStr = atts.value("label");
- if (labelStr)
+ if (!labelStr.isNull())
m_currentSegment->setLabel(qstrtostr(labelStr));
m_currentSegment->setTrack(track);
//m_currentSegment->setStartTime(startTime);
TQString colourIndStr = atts.value("colourindex");
- if (colourIndStr) {
+ if (!colourIndStr.isNull()) {
colourindex = colourIndStr.toInt();
}
m_currentSegment->setColourIndex(colourindex);
TQString snapGridSizeStr = atts.value("snapgridsize");
- if (snapGridSizeStr) {
+ if (!snapGridSizeStr.isNull()) {
m_currentSegment->setSnapGridSize(snapGridSizeStr.toInt());
}
TQString viewFeaturesStr = atts.value("viewfeatures");
- if (viewFeaturesStr) {
+ if (!viewFeaturesStr.isNull()) {
m_currentSegment->setViewFeatures(viewFeaturesStr.toInt());
}
@@ -913,21 +913,21 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString triggerRetuneStr = atts.value("triggerretune");
TQString triggerAdjustTimeStr = atts.value("triggeradjusttimes");
- if (triggerIdStr) {
+ if (!triggerIdStr.isNull()) {
int pitch = -1;
- if (triggerPitchStr)
+ if (!triggerPitchStr.isNull())
pitch = triggerPitchStr.toInt();
int velocity = -1;
- if (triggerVelocityStr)
+ if (!triggerVelocityStr.isNull())
velocity = triggerVelocityStr.toInt();
TriggerSegmentRec *rec =
getComposition().addTriggerSegment(m_currentSegment,
triggerIdStr.toInt(),
pitch, velocity);
if (rec) {
- if (triggerRetuneStr)
+ if (!triggerRetuneStr.isNull())
rec->setDefaultRetune(triggerRetuneStr.lower() == "true");
- if (triggerAdjustTimeStr)
+ if (!triggerAdjustTimeStr.isNull())
rec->setDefaultTimeAdjust(qstrtostr(triggerAdjustTimeStr));
}
m_currentSegment->setStartTimeDataMember(startTime);
@@ -937,7 +937,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString endMarkerStr = atts.value("endmarker");
- if (endMarkerStr) {
+ if (!endMarkerStr.isNull()) {
delete m_segmentEndMarkerTime;
m_segmentEndMarkerTime = new timeT(endMarkerStr.toInt());
}
@@ -1246,10 +1246,10 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
skipToNextPlayDevice();
if (m_device) {
- if (nameStr && nameStr != "") {
+ if (!nameStr.isNull() && nameStr != "") {
m_device->setName(qstrtostr(nameStr));
}
- } else if (nameStr && nameStr != "") {
+ } else if (!nameStr.isNull() && nameStr != "") {
addMIDIDevice(nameStr, m_createDevices); // also sets m_device
}
}
@@ -1366,7 +1366,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
m_lsb),
pc,
qstrtostr(nameStr),
- keyMappingStr ? qstrtostr(keyMappingStr) : "");
+ (!keyMappingStr.isNull()) ? qstrtostr(keyMappingStr) : "");
if (m_device->getType() == Device::Midi) {
// Insert the program
@@ -1412,7 +1412,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
if (m_keyMapping) {
TQString numStr = atts.value("number");
TQString namStr = atts.value("name");
- if (numStr && namStr) {
+ if (!numStr.isNull() && !namStr.isNull()) {
m_keyNameMap[numStr.toInt()] = qstrtostr(namStr);
}
}
@@ -1702,7 +1702,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
std::string program = "";
TQString progStr = atts.value("program");
- if (progStr) {
+ if (!progStr.isNull()) {
program = qstrtostr(progStr);
}
@@ -1715,8 +1715,8 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
AudioPlugin *plugin = 0;
AudioPluginManager *apm = getAudioPluginManager();
- if (!identifier) {
- if (atts.value("id")) {
+ if (identifier.isNull()) {
+ if (!(atts.value("id")).isNull()) {
unsigned long id = atts.value("id").toULong();
if (apm)
plugin = apm->getPluginByUniqueId(id);
@@ -1750,10 +1750,10 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// we shouldn't be halting import of the RG file just because
// we can't match a plugin
//
- if (identifier) {
+ if (!identifier.isNull()) {
RG_DEBUG << "WARNING: RoseXmlHandler: plugin " << identifier << " not found" << endl;
m_pluginsNotFound.insert(identifier);
- } else if (atts.value("id")) {
+ } else if (!(atts.value("id")).isNull()) {
RG_DEBUG << "WARNING: RoseXmlHandler: plugin uid " << atts.value("id") << " not found" << endl;
} else {
m_errorString = "No plugin identifier or uid specified";
@@ -1764,7 +1764,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
if (lcName == "synth") {
TQString identifier = atts.value("identifier");
- if (identifier) {
+ if (!identifier.isNull()) {
RG_DEBUG << "WARNING: RoseXmlHandler: no instrument for plugin " << identifier << endl;
m_pluginsNotFound.insert(identifier);
}
@@ -1823,19 +1823,19 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
MidiMetronome metronome(instrument);
- if (atts.value("barpitch"))
+ if (!(atts.value("barpitch")).isNull())
metronome.setBarPitch(atts.value("barpitch").toInt());
- if (atts.value("beatpitch"))
+ if (!(atts.value("beatpitch")).isNull())
metronome.setBeatPitch(atts.value("beatpitch").toInt());
- if (atts.value("subbeatpitch"))
+ if (!(atts.value("subbeatpitch")).isNull())
metronome.setSubBeatPitch(atts.value("subbeatpitch").toInt());
- if (atts.value("depth"))
+ if (!(atts.value("depth")).isNull())
metronome.setDepth(atts.value("depth").toInt());
- if (atts.value("barvelocity"))
+ if (!(atts.value("barvelocity")).isNull())
metronome.setBarVelocity(atts.value("barvelocity").toInt());
- if (atts.value("beatvelocity"))
+ if (!(atts.value("beatvelocity")).isNull())
metronome.setBeatVelocity(atts.value("beatvelocity").toInt());
- if (atts.value("subbeatvelocity"))
+ if (!(atts.value("subbeatvelocity")).isNull())
metronome.setSubBeatVelocity(atts.value("subbeatvelocity").toInt());
dynamic_cast<MidiDevice*>(m_device)->
@@ -1964,7 +1964,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
int channel = atts.value("channel").toInt();
TQString type = atts.value("type");
- if (type) {
+ if (!type.isNull()) {
if (type.lower() == "buss") {
if (m_instrument)
m_instrument->setAudioInputToBuss(value, channel);
@@ -2359,7 +2359,7 @@ RoseXmlHandler::setMIDIDeviceName(TQString name)
arg << (unsigned int)md->getId();
arg << name;
- std::cerr << "Renaming device " << md->getId() << " to " << name << std::endl;
+ std::cerr << "Renaming device " << md->getId() << " to " << name.ascii() << std::endl;
rgapp->sequencerSend("renameDevice(unsigned int, TQString)",
data);
diff --git a/src/document/RosegardenGUIDoc.cpp b/src/document/RosegardenGUIDoc.cpp
index 9f2bcd6..2e7a3ae 100644
--- a/src/document/RosegardenGUIDoc.cpp
+++ b/src/document/RosegardenGUIDoc.cpp
@@ -347,12 +347,12 @@ bool RosegardenGUIDoc::saveIfModified()
completed = saveDocument(getAbsFilePath(), errMsg);
if (!completed) {
- if (errMsg) {
+ if (!errMsg.isNull()) {
KMessageBox::error(0, i18n(TQString("Could not save document at %1\n(%2)")
- .tqarg(getAbsFilePath()).tqarg(errMsg)));
+ .tqarg(getAbsFilePath()).tqarg(errMsg).ascii()));
} else {
KMessageBox::error(0, i18n(TQString("Could not save document at %1")
- .tqarg(getAbsFilePath())));
+ .tqarg(getAbsFilePath()).ascii()));
}
}
}
@@ -461,7 +461,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved)
for (size_t i = 0; i < derivedOrphans.size(); ++i) {
TQFile file(derivedOrphans[i]);
if (!file.remove()) {
- std::cerr << "WARNING: Failed to remove orphaned derived audio file \"" << derivedOrphans[i] << std::endl;
+ std::cerr << "WARNING: Failed to remove orphaned derived audio file \"" << derivedOrphans[i].ascii() << std::endl;
}
TQFile peakFile(TQString("%1.pk").tqarg(derivedOrphans[i]));
peakFile.remove();
@@ -1152,7 +1152,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename,
int status = temp.status();
if (status != 0) {
- errMsg = i18n(TQString("Could not create temporary file in directory of '%1': %2").tqarg(filename).tqarg(strerror(status)));
+ errMsg = i18n(TQString("Could not create temporary file in directory of '%1': %2").tqarg(filename).tqarg(strerror(status)).ascii());
return false;
}
@@ -1164,7 +1164,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename,
if (!temp.close()) {
status = temp.status();
errMsg = i18n(TQString("Failure in temporary file handling for file '%1': %2")
- .tqarg(tempFileName).tqarg(strerror(status)));
+ .tqarg(tempFileName).tqarg(strerror(status)).ascii());
return false;
}
@@ -1177,7 +1177,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename,
TQDir dir(TQFileInfo(tempFileName).dir());
if (!dir.rename(tempFileName, filename)) {
- errMsg = i18n(TQString("Failed to rename temporary output file '%1' to desired output file '%2'").tqarg(tempFileName).tqarg(filename));
+ errMsg = i18n(TQString("Failed to rename temporary output file '%1' to desired output file '%2'").tqarg(tempFileName).tqarg(filename).ascii());
return false;
}
@@ -1198,7 +1198,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename,
if (!rc) {
// do some error report
- errMsg = i18n(TQString("Could not open file '%1' for writing").tqarg(filename));
+ errMsg = i18n(TQString("Could not open file '%1' for writing").tqarg(filename).ascii());
delete fileCompressedDevice;
return false; // couldn't open file
}
@@ -1315,7 +1315,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename,
// check that all went ok
//
if (fileCompressedDevice->status() != IO_Ok) {
- errMsg = i18n(TQString("Error while writing on '%1'").tqarg(filename));
+ errMsg = i18n(TQString("Error while writing on '%1'").tqarg(filename).ascii());
delete fileCompressedDevice;
return false;
}
@@ -1383,7 +1383,7 @@ void RosegardenGUIDoc::saveSegment(TQTextStream& outStream, Segment *segment,
.tqarg(segment->getTrack())
.tqarg(segment->getStartTime());
- if (extraAttributes)
+ if (!extraAttributes.isNull())
outStream << extraAttributes << " ";
outStream << "label=\"" <<
diff --git a/src/document/RosegardenGUIDoc.h b/src/document/RosegardenGUIDoc.h
index a7d972e..1218673 100644
--- a/src/document/RosegardenGUIDoc.h
+++ b/src/document/RosegardenGUIDoc.h
@@ -37,7 +37,7 @@
#include "gui/editors/segment/segmentcanvas/AudioPreviewThread.h"
#include <map>
#include "sound/AudioFileManager.h"
-// #include <tqlist.h> (fixes problem for Adam Dingle)
+#include <tqptrlist.h>
#include <tqobject.h>
#include <tqstring.h>
#include <tqstringlist.h>
@@ -439,7 +439,7 @@ public:
/**
* return the list of the views currently connected to the document
*/
- TQList<RosegardenGUIView>& getViewList() { return m_viewList; }
+ TQPtrList<RosegardenGUIView>& getViewList() { return m_viewList; }
bool isBeingDestroyed() { return m_beingDestroyed; }
@@ -617,12 +617,12 @@ protected:
/**
* the list of the views currently connected to the document
*/
- TQList<RosegardenGUIView> m_viewList;
+ TQPtrList<RosegardenGUIView> m_viewList;
/**
* the list of the edit views currently editing a part of this document
*/
- TQList<EditViewBase> m_editViewList;
+ TQPtrList<EditViewBase> m_editViewList;
/**
* the modified flag of the current document
diff --git a/src/document/io/LilyPondExporter.cpp b/src/document/io/LilyPondExporter.cpp
index f2d6008..3c18d41 100644
--- a/src/document/io/LilyPondExporter.cpp
+++ b/src/document/io/LilyPondExporter.cpp
@@ -409,7 +409,7 @@ LilyPondExporter::write()
std::ofstream str(qstrtostr(tmpName).c_str(), std::ios::out);
if (!str) {
- std::cerr << "LilyPondExporter::write() - can't write file " << tmpName << std::endl;
+ std::cerr << "LilyPondExporter::write() - can't write file " << tmpName.ascii() << std::endl;
return false;
}