pull/1/head
Timothy Pearson 13 years ago
parent 1461610fb3
commit 4b3c5dd929

@ -105,12 +105,41 @@ IF(WANT_SOUND)
#MESSAGE("LRDF_INC_DIR: ${LRDF_INC_DIR}") #MESSAGE("LRDF_INC_DIR: ${LRDF_INC_DIR}")
ENDIF(LRDF_FOUND) ENDIF(LRDF_FOUND)
FIND_PACKAGE(LADSPA QUIET) ##################################################################
# - Try to find LADSPA header
# Once done this will define:
#
# LADSPA_FOUND - system has LADSPA
# LADSPA_INCLUDE_DIR - LADSPA header path
IF(LADSPA_INCLUDE_DIR)
SET(LADSPA_FIND_QUIETLY TRUE)
ENDIF(LADSPA_INCLUDE_DIR)
FIND_PATH(LADSPA_INCLUDE_DIR "ladspa.h"
/usr/include
/usr/local/include
)
IF(LADSPA_INCLUDE_DIR)
SET(LADSPA_FOUND TRUE)
ELSE(LADSPA_INCLUDE_DIR)
SET(LADSPA_FOUND FALSE)
SET(LADSPA_INCLUDE_DIR "")
ENDIF(LADSPA_INCLUDE_DIR)
IF(LADSPA_FOUND)
IF(NOT LADSPA_FIND_QUIETLY)
MESSAGE(STATUS "Found LADSPA: ${LADSPA_INCLUDE_DIR}")
ENDIF(NOT LADSPA_FIND_QUIETLY)
ELSE(LADSPA_FOUND)
IF(LADSPA_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find LADSPA")
ENDIF(LADSPA_FIND_REQUIRED)
ENDIF(LADSPA_FOUND)
MARK_AS_ADVANCED(LADSPA_INCLUDE_DIR)
##################################################################
IF(LADSPA_FOUND) IF(LADSPA_FOUND)
SET(HAVE_LADSPA TRUE) SET(HAVE_LADSPA TRUE)
ADD_DEFINITIONS(-DHAVE_LADSPA) ADD_DEFINITIONS(-DHAVE_LADSPA)
SET(LADSPA_INC_DIR ${LADSPA_INCLUDE_DIR}) SET(LADSPA_INC_DIR ${LADSPA_INCLUDE_DIR})
MESSAGE(STATUS "Found LADSPA (${LADSPA_INC_DIR})")
ENDIF(LADSPA_FOUND) ENDIF(LADSPA_FOUND)
ENDIF(WANT_SOUND) ENDIF(WANT_SOUND)

@ -15,6 +15,7 @@ include_directories(
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/src ${CMAKE_BINARY_DIR}/src
${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/base
${ALSA_INC_DIR} ${ALSA_INC_DIR}
${JACK_INC_DIR} ${JACK_INC_DIR}
${XFT_INC_DIR} ${XFT_INC_DIR}
@ -36,6 +37,7 @@ link_directories(
${LRDF_LIB_DIR} ${LRDF_LIB_DIR}
${LIRC_LIB_DIR} ${LIRC_LIB_DIR}
${FFTW3F_LIB_DIR} ${FFTW3F_LIB_DIR}
${CMAKE_BINARY_DIR}/src
) )
##### include cmake file lists ################## ##### include cmake file lists ##################

@ -44,7 +44,7 @@ class ClearTriggersCommand : public BasicSelectionCommand
public: public:
ClearTriggersCommand(EventSelection &selection, ClearTriggersCommand(EventSelection &selection,
TQString name = 0) : TQString name = 0) :
BasicSelectionCommand(name ? name : getGlobalName(), selection, true), BasicSelectionCommand(!name.isNull() ? name : getGlobalName(), selection, true),
m_selection(&selection) m_selection(&selection)
{ } { }

@ -132,7 +132,7 @@ EventQuantizeCommand::modifySegment()
bool makeviable = false; bool makeviable = false;
bool decounterpoint = false; bool decounterpoint = false;
if (m_configGroup) { if (!m_configGroup.isNull()) {
//!!! need way to decide whether to do these even if no config group (i.e. through args to the command) //!!! need way to decide whether to do these even if no config group (i.e. through args to the command)
KConfig *config = kapp->config(); KConfig *config = kapp->config();
config->setGroup(m_configGroup); config->setGroup(m_configGroup);

@ -51,7 +51,7 @@ public:
std::string timeAdjust, std::string timeAdjust,
Mark mark, Mark mark,
TQString name = 0) : TQString name = 0) :
BasicSelectionCommand(name ? name : getGlobalName(), selection, true), BasicSelectionCommand(!name.isNull() ? name : getGlobalName(), selection, true),
m_selection(&selection), m_selection(&selection),
m_triggerSegmentId(triggerSegmentId), m_triggerSegmentId(triggerSegmentId),
m_notesOnly(notesOnly), m_notesOnly(notesOnly),

@ -307,7 +307,7 @@ MultiViewCommandHistory::updateButton(bool undo,
{ {
for (ViewSet::iterator i = m_views.begin(); i != m_views.end(); ++i) { 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) if (!action)
continue; continue;
TQString text; TQString text;
@ -340,7 +340,7 @@ MultiViewCommandHistory::updateMenu(bool undo,
{ {
for (ViewSet::iterator i = m_views.begin(); i != m_views.end(); ++i) { 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) if (!action)
continue; continue;

@ -120,7 +120,7 @@ bool ConfigurationXmlSubHandler::startElement(const TQString&, const TQString&,
// handle alternative encoding for properties with arbitrary names // handle alternative encoding for properties with arbitrary names
m_propertyName = atts.value("name"); m_propertyName = atts.value("name");
TQString value = atts.value("value"); TQString value = atts.value("value");
if (value) { if (!value.isNull()) {
m_propertyType = "String"; m_propertyType = "String";
m_configuration->set<String>(qstrtostr(m_propertyName), m_configuration->set<String>(qstrtostr(m_propertyName),
qstrtostr(value)); qstrtostr(value));
@ -433,7 +433,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// std::cerr << "\n\n\nRosegarden file version = \"" << version << "\"\n\n\n" << std::endl; // std::cerr << "\n\n\nRosegarden file version = \"" << version << "\"\n\n\n" << std::endl;
if (smajor) { if (!smajor.isNull()) {
int major = smajor.toInt(); int major = smajor.toInt();
int minor = sminor.toInt(); int minor = sminor.toInt();
@ -477,17 +477,17 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// //
TQString thruStr = atts.value("thrufilter"); TQString thruStr = atts.value("thrufilter");
if (thruStr) if (!thruStr.isNull())
getStudio().setMIDIThruFilter(thruStr.toInt()); getStudio().setMIDIThruFilter(thruStr.toInt());
TQString recordStr = atts.value("recordfilter"); TQString recordStr = atts.value("recordfilter");
if (recordStr) if (!recordStr.isNull())
getStudio().setMIDIRecordFilter(recordStr.toInt()); getStudio().setMIDIRecordFilter(recordStr.toInt());
TQString inputStr = atts.value("audioinputpairs"); TQString inputStr = atts.value("audioinputpairs");
if (inputStr) { if (!inputStr.isNull()) {
int inputs = inputStr.toInt(); int inputs = inputStr.toInt();
if (inputs < 1) if (inputs < 1)
inputs = 1; // we simply don't permit no inputs inputs = 1; // we simply don't permit no inputs
@ -498,14 +498,14 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString mixerStr = atts.value("mixerdisplayoptions"); TQString mixerStr = atts.value("mixerdisplayoptions");
if (mixerStr) { if (!mixerStr.isNull()) {
unsigned int mixer = mixerStr.toUInt(); unsigned int mixer = mixerStr.toUInt();
getStudio().setMixerDisplayOptions(mixer); getStudio().setMixerDisplayOptions(mixer);
} }
TQString metronomeStr = atts.value("metronomedevice"); TQString metronomeStr = atts.value("metronomedevice");
if (metronomeStr) { if (!metronomeStr.isNull()) {
DeviceId metronome = metronomeStr.toUInt(); DeviceId metronome = metronomeStr.toUInt();
getStudio().setMetronomeDevice(metronome); getStudio().setMetronomeDevice(metronome);
} }
@ -519,32 +519,32 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
timeT t = 0; timeT t = 0;
TQString timeStr = atts.value("time"); TQString timeStr = atts.value("time");
if (timeStr) if (!timeStr.isNull())
t = timeStr.toInt(); t = timeStr.toInt();
int num = 4; int num = 4;
TQString numStr = atts.value("numerator"); TQString numStr = atts.value("numerator");
if (numStr) if (!numStr.isNull())
num = numStr.toInt(); num = numStr.toInt();
int denom = 4; int denom = 4;
TQString denomStr = atts.value("denominator"); TQString denomStr = atts.value("denominator");
if (denomStr) if (!denomStr.isNull())
denom = denomStr.toInt(); denom = denomStr.toInt();
bool common = false; bool common = false;
TQString commonStr = atts.value("common"); TQString commonStr = atts.value("common");
if (commonStr) if (!commonStr.isNull())
common = (commonStr == "true"); common = (commonStr == "true");
bool hidden = false; bool hidden = false;
TQString hiddenStr = atts.value("hidden"); TQString hiddenStr = atts.value("hidden");
if (hiddenStr) if (!hiddenStr.isNull())
hidden = (hiddenStr == "true"); hidden = (hiddenStr == "true");
bool hiddenBars = false; bool hiddenBars = false;
TQString hiddenBarsStr = atts.value("hiddenbars"); TQString hiddenBarsStr = atts.value("hiddenbars");
if (hiddenBarsStr) if (!hiddenBarsStr.isNull())
hiddenBars = (hiddenBarsStr == "true"); hiddenBars = (hiddenBarsStr == "true");
getComposition().addTimeSignature getComposition().addTimeSignature
@ -554,21 +554,21 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
timeT t = 0; timeT t = 0;
TQString timeStr = atts.value("time"); TQString timeStr = atts.value("time");
if (timeStr) if (!timeStr.isNull())
t = timeStr.toInt(); t = timeStr.toInt();
tempoT tempo = Composition::getTempoForQpm(120.0); tempoT tempo = Composition::getTempoForQpm(120.0);
TQString tempoStr = atts.value("tempo"); TQString tempoStr = atts.value("tempo");
TQString targetStr = atts.value("target"); TQString targetStr = atts.value("target");
TQString bphStr = atts.value("bph"); TQString bphStr = atts.value("bph");
if (tempoStr) { if (!tempoStr.isNull()) {
tempo = tempoStr.toInt(); tempo = tempoStr.toInt();
} else if (bphStr) { } else if (!bphStr.isNull()) {
tempo = Composition::getTempoForQpm tempo = Composition::getTempoForQpm
(double(bphStr.toInt()) / 60.0); (double(bphStr.toInt()) / 60.0);
} }
if (targetStr) { if (!targetStr.isNull()) {
getComposition().addTempoAtTime(t, tempo, targetStr.toInt()); getComposition().addTempoAtTime(t, tempo, targetStr.toInt());
} else { } else {
getComposition().addTempoAtTime(t, tempo); getComposition().addTempoAtTime(t, tempo);
@ -587,12 +587,12 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// Get and set the record track // Get and set the record track
// //
TQString recordStr = atts.value("recordtrack"); TQString recordStr = atts.value("recordtrack");
if (recordStr) { if (!recordStr.isNull()) {
getComposition().setTrackRecording(recordStr.toInt(), true); getComposition().setTrackRecording(recordStr.toInt(), true);
} }
TQString recordPlStr = atts.value("recordtracks"); TQString recordPlStr = atts.value("recordtracks");
if (recordPlStr) { if (!recordPlStr.isNull()) {
RG_DEBUG << "Record tracks: " << recordPlStr << endl; RG_DEBUG << "Record tracks: " << recordPlStr << endl;
TQStringList recordList = TQStringList::split(',', recordPlStr); TQStringList recordList = TQStringList::split(',', recordPlStr);
for (TQStringList::iterator i = recordList.begin(); for (TQStringList::iterator i = recordList.begin();
@ -606,7 +606,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// //
int position = 0; int position = 0;
TQString positionStr = atts.value("pointer"); TQString positionStr = atts.value("pointer");
if (positionStr) { if (!positionStr.isNull()) {
position = positionStr.toInt(); position = positionStr.toInt();
} }
@ -618,12 +618,12 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// older defaultTempo. // older defaultTempo.
// //
TQString tempoStr = atts.value("compositionDefaultTempo"); TQString tempoStr = atts.value("compositionDefaultTempo");
if (tempoStr) { if (!tempoStr.isNull()) {
tempoT tempo = tempoT(tempoStr.toInt()); tempoT tempo = tempoT(tempoStr.toInt());
getComposition().setCompositionDefaultTempo(tempo); getComposition().setCompositionDefaultTempo(tempo);
} else { } else {
tempoStr = atts.value("defaultTempo"); tempoStr = atts.value("defaultTempo");
if (tempoStr) { if (!tempoStr.isNull()) {
double tempo = qstrtodouble(tempoStr); double tempo = qstrtodouble(tempoStr);
getComposition().setCompositionDefaultTempo getComposition().setCompositionDefaultTempo
(Composition::getTempoForQpm(tempo)); (Composition::getTempoForQpm(tempo));
@ -639,7 +639,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString loopStartStr = atts.value("loopstart"); TQString loopStartStr = atts.value("loopstart");
TQString loopEndStr = atts.value("loopend"); TQString loopEndStr = atts.value("loopend");
if (loopStartStr && loopEndStr) { if (!loopStartStr.isNull() && !loopEndStr.isNull()) {
int loopStart = loopStartStr.toInt(); int loopStart = loopStartStr.toInt();
int loopEnd = loopEndStr.toInt(); int loopEnd = loopEndStr.toInt();
@ -649,7 +649,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString selectedTrackStr = atts.value("selected"); TQString selectedTrackStr = atts.value("selected");
if (selectedTrackStr) { if (!selectedTrackStr.isNull()) {
TrackId selectedTrack = TrackId selectedTrack =
(TrackId)selectedTrackStr.toInt(); (TrackId)selectedTrackStr.toInt();
@ -657,7 +657,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
} }
TQString soloTrackStr = atts.value("solo"); TQString soloTrackStr = atts.value("solo");
if (soloTrackStr) { if (!soloTrackStr.isNull()) {
if (soloTrackStr.toInt() == 1) if (soloTrackStr.toInt() == 1)
getComposition().setSolo(true); getComposition().setSolo(true);
else else
@ -666,7 +666,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString playMetStr = atts.value("playmetronome"); TQString playMetStr = atts.value("playmetronome");
if (playMetStr) { if (!playMetStr.isNull()) {
if (playMetStr.toInt()) if (playMetStr.toInt())
getComposition().setPlayMetronome(true); getComposition().setPlayMetronome(true);
else else
@ -674,7 +674,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
} }
TQString recMetStr = atts.value("recordmetronome"); TQString recMetStr = atts.value("recordmetronome");
if (recMetStr) { if (!recMetStr.isNull()) {
if (recMetStr.toInt()) if (recMetStr.toInt())
getComposition().setRecordMetronome(true); getComposition().setRecordMetronome(true);
else else
@ -682,23 +682,23 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
} }
TQString nextTriggerIdStr = atts.value("nexttriggerid"); TQString nextTriggerIdStr = atts.value("nexttriggerid");
if (nextTriggerIdStr) { if (!nextTriggerIdStr.isNull()) {
getComposition().setNextTriggerSegmentId(nextTriggerIdStr.toInt()); getComposition().setNextTriggerSegmentId(nextTriggerIdStr.toInt());
} }
TQString copyrightStr = atts.value("copyright"); TQString copyrightStr = atts.value("copyright");
if (copyrightStr) { if (!copyrightStr.isNull()) {
getComposition().setCopyrightNote(qstrtostr(copyrightStr)); getComposition().setCopyrightNote(qstrtostr(copyrightStr));
} }
TQString startMarkerStr = atts.value("startMarker"); TQString startMarkerStr = atts.value("startMarker");
TQString endMarkerStr = atts.value("endMarker"); TQString endMarkerStr = atts.value("endMarker");
if (startMarkerStr) { if (!startMarkerStr.isNull()) {
getComposition().setStartMarker(startMarkerStr.toInt()); getComposition().setStartMarker(startMarkerStr.toInt());
} }
if (endMarkerStr) { if (!endMarkerStr.isNull()) {
getComposition().setEndMarker(endMarkerStr.toInt()); getComposition().setEndMarker(endMarkerStr.toInt());
} }
@ -716,17 +716,17 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
bool muted = false; bool muted = false;
TQString trackNbStr = atts.value("id"); TQString trackNbStr = atts.value("id");
if (trackNbStr) { if (!trackNbStr.isNull()) {
id = trackNbStr.toInt(); id = trackNbStr.toInt();
} }
TQString labelStr = atts.value("label"); TQString labelStr = atts.value("label");
if (labelStr) { if (!labelStr.isNull()) {
label = qstrtostr(labelStr); label = qstrtostr(labelStr);
} }
TQString mutedStr = atts.value("muted"); TQString mutedStr = atts.value("muted");
if (mutedStr) { if (!mutedStr.isNull()) {
if (mutedStr == "true") if (mutedStr == "true")
muted = true; muted = true;
else else
@ -734,12 +734,12 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
} }
TQString positionStr = atts.value("position"); TQString positionStr = atts.value("position");
if (positionStr) { if (!positionStr.isNull()) {
position = positionStr.toInt(); position = positionStr.toInt();
} }
TQString instrumentStr = atts.value("instrument"); TQString instrumentStr = atts.value("instrument");
if (instrumentStr) { if (!instrumentStr.isNull()) {
instrument = instrumentStr.toInt(); instrument = instrumentStr.toInt();
} }
@ -754,42 +754,42 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// here // here
TQString presetLabelStr = atts.value("defaultLabel"); TQString presetLabelStr = atts.value("defaultLabel");
if (labelStr) { if (!labelStr.isNull()) {
track->setPresetLabel(presetLabelStr.ascii()); track->setPresetLabel(presetLabelStr.ascii());
} }
TQString clefStr = atts.value("defaultClef"); TQString clefStr = atts.value("defaultClef");
if (clefStr) { if (!clefStr.isNull()) {
track->setClef(clefStr.toInt()); track->setClef(clefStr.toInt());
} }
TQString transposeStr = atts.value("defaultTranspose"); TQString transposeStr = atts.value("defaultTranspose");
if (transposeStr) { if (!transposeStr.isNull()) {
track->setTranspose(transposeStr.toInt()); track->setTranspose(transposeStr.toInt());
} }
TQString colorStr = atts.value("defaultColour"); TQString colorStr = atts.value("defaultColour");
if (colorStr) { if (!colorStr.isNull()) {
track->setColor(colorStr.toInt()); track->setColor(colorStr.toInt());
} }
TQString highplayStr = atts.value("defaultHighestPlayable"); TQString highplayStr = atts.value("defaultHighestPlayable");
if (highplayStr) { if (!highplayStr.isNull()) {
track->setHighestPlayable(highplayStr.toInt()); track->setHighestPlayable(highplayStr.toInt());
} }
TQString lowplayStr = atts.value("defaultLowestPlayable"); TQString lowplayStr = atts.value("defaultLowestPlayable");
if (lowplayStr) { if (!lowplayStr.isNull()) {
track->setLowestPlayable(lowplayStr.toInt()); track->setLowestPlayable(lowplayStr.toInt());
} }
TQString staffSizeStr = atts.value("staffSize"); TQString staffSizeStr = atts.value("staffSize");
if (staffSizeStr) { if (!staffSizeStr.isNull()) {
track->setStaffSize(staffSizeStr.toInt()); track->setStaffSize(staffSizeStr.toInt());
} }
TQString staffBracketStr = atts.value("staffBracket"); TQString staffBracketStr = atts.value("staffBracket");
if (staffBracketStr) { if (!staffBracketStr.isNull()) {
track->setStaffBracket(staffBracketStr.toInt()); track->setStaffBracket(staffBracketStr.toInt());
} }
@ -809,17 +809,17 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
int track = -1, startTime = 0; int track = -1, startTime = 0;
unsigned int colourindex = 0; unsigned int colourindex = 0;
TQString trackNbStr = atts.value("track"); TQString trackNbStr = atts.value("track");
if (trackNbStr) { if (!trackNbStr.isNull()) {
track = trackNbStr.toInt(); track = trackNbStr.toInt();
} }
TQString startIdxStr = atts.value("start"); TQString startIdxStr = atts.value("start");
if (startIdxStr) { if (!startIdxStr.isNull()) {
startTime = startIdxStr.toInt(); startTime = startIdxStr.toInt();
} }
TQString segmentType = (atts.value("type")).lower(); TQString segmentType = (atts.value("type")).lower();
if (segmentType) { if (!segmentType.isNull()) {
if (segmentType == "audio") { if (segmentType == "audio") {
int audioFileId = atts.value("file").toInt(); int audioFileId = atts.value("file").toInt();
@ -854,7 +854,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
} }
TQString delayStr = atts.value("delay"); TQString delayStr = atts.value("delay");
if (delayStr) { if (!delayStr.isNull()) {
RG_DEBUG << "Delay string is \"" << delayStr << "\"" << endl; RG_DEBUG << "Delay string is \"" << delayStr << "\"" << endl;
long delay = delayStr.toLong(); long delay = delayStr.toLong();
RG_DEBUG << "Delay is " << delay << endl; RG_DEBUG << "Delay is " << delay << endl;
@ -864,8 +864,8 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString rtDelaynSec = atts.value("rtdelaynsec"); TQString rtDelaynSec = atts.value("rtdelaynsec");
TQString rtDelayuSec = atts.value("rtdelayusec"); TQString rtDelayuSec = atts.value("rtdelayusec");
TQString rtDelaySec = atts.value("rtdelaysec"); TQString rtDelaySec = atts.value("rtdelaysec");
if (rtDelaySec && (rtDelaynSec || rtDelayuSec)) { if (!rtDelaySec.isNull() && (!rtDelaynSec.isNull() || !rtDelayuSec.isNull())) {
if (rtDelaynSec) { if (!rtDelaynSec.isNull()) {
m_currentSegment->setRealTimeDelay m_currentSegment->setRealTimeDelay
(RealTime(rtDelaySec.toInt(), (RealTime(rtDelaySec.toInt(),
rtDelaynSec.toInt())); rtDelaynSec.toInt()));
@ -877,31 +877,31 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
} }
TQString transposeStr = atts.value("transpose"); TQString transposeStr = atts.value("transpose");
if (transposeStr) if (!transposeStr.isNull())
m_currentSegment->setTranspose(transposeStr.toInt()); m_currentSegment->setTranspose(transposeStr.toInt());
// fill in the label // fill in the label
TQString labelStr = atts.value("label"); TQString labelStr = atts.value("label");
if (labelStr) if (!labelStr.isNull())
m_currentSegment->setLabel(qstrtostr(labelStr)); m_currentSegment->setLabel(qstrtostr(labelStr));
m_currentSegment->setTrack(track); m_currentSegment->setTrack(track);
//m_currentSegment->setStartTime(startTime); //m_currentSegment->setStartTime(startTime);
TQString colourIndStr = atts.value("colourindex"); TQString colourIndStr = atts.value("colourindex");
if (colourIndStr) { if (!colourIndStr.isNull()) {
colourindex = colourIndStr.toInt(); colourindex = colourIndStr.toInt();
} }
m_currentSegment->setColourIndex(colourindex); m_currentSegment->setColourIndex(colourindex);
TQString snapGridSizeStr = atts.value("snapgridsize"); TQString snapGridSizeStr = atts.value("snapgridsize");
if (snapGridSizeStr) { if (!snapGridSizeStr.isNull()) {
m_currentSegment->setSnapGridSize(snapGridSizeStr.toInt()); m_currentSegment->setSnapGridSize(snapGridSizeStr.toInt());
} }
TQString viewFeaturesStr = atts.value("viewfeatures"); TQString viewFeaturesStr = atts.value("viewfeatures");
if (viewFeaturesStr) { if (!viewFeaturesStr.isNull()) {
m_currentSegment->setViewFeatures(viewFeaturesStr.toInt()); m_currentSegment->setViewFeatures(viewFeaturesStr.toInt());
} }
@ -913,21 +913,21 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString triggerRetuneStr = atts.value("triggerretune"); TQString triggerRetuneStr = atts.value("triggerretune");
TQString triggerAdjustTimeStr = atts.value("triggeradjusttimes"); TQString triggerAdjustTimeStr = atts.value("triggeradjusttimes");
if (triggerIdStr) { if (!triggerIdStr.isNull()) {
int pitch = -1; int pitch = -1;
if (triggerPitchStr) if (!triggerPitchStr.isNull())
pitch = triggerPitchStr.toInt(); pitch = triggerPitchStr.toInt();
int velocity = -1; int velocity = -1;
if (triggerVelocityStr) if (!triggerVelocityStr.isNull())
velocity = triggerVelocityStr.toInt(); velocity = triggerVelocityStr.toInt();
TriggerSegmentRec *rec = TriggerSegmentRec *rec =
getComposition().addTriggerSegment(m_currentSegment, getComposition().addTriggerSegment(m_currentSegment,
triggerIdStr.toInt(), triggerIdStr.toInt(),
pitch, velocity); pitch, velocity);
if (rec) { if (rec) {
if (triggerRetuneStr) if (!triggerRetuneStr.isNull())
rec->setDefaultRetune(triggerRetuneStr.lower() == "true"); rec->setDefaultRetune(triggerRetuneStr.lower() == "true");
if (triggerAdjustTimeStr) if (!triggerAdjustTimeStr.isNull())
rec->setDefaultTimeAdjust(qstrtostr(triggerAdjustTimeStr)); rec->setDefaultTimeAdjust(qstrtostr(triggerAdjustTimeStr));
} }
m_currentSegment->setStartTimeDataMember(startTime); m_currentSegment->setStartTimeDataMember(startTime);
@ -937,7 +937,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
} }
TQString endMarkerStr = atts.value("endmarker"); TQString endMarkerStr = atts.value("endmarker");
if (endMarkerStr) { if (!endMarkerStr.isNull()) {
delete m_segmentEndMarkerTime; delete m_segmentEndMarkerTime;
m_segmentEndMarkerTime = new timeT(endMarkerStr.toInt()); m_segmentEndMarkerTime = new timeT(endMarkerStr.toInt());
} }
@ -1246,10 +1246,10 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
skipToNextPlayDevice(); skipToNextPlayDevice();
if (m_device) { if (m_device) {
if (nameStr && nameStr != "") { if (!nameStr.isNull() && nameStr != "") {
m_device->setName(qstrtostr(nameStr)); m_device->setName(qstrtostr(nameStr));
} }
} else if (nameStr && nameStr != "") { } else if (!nameStr.isNull() && nameStr != "") {
addMIDIDevice(nameStr, m_createDevices); // also sets m_device addMIDIDevice(nameStr, m_createDevices); // also sets m_device
} }
} }
@ -1366,7 +1366,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
m_lsb), m_lsb),
pc, pc,
qstrtostr(nameStr), qstrtostr(nameStr),
keyMappingStr ? qstrtostr(keyMappingStr) : ""); (!keyMappingStr.isNull()) ? qstrtostr(keyMappingStr) : "");
if (m_device->getType() == Device::Midi) { if (m_device->getType() == Device::Midi) {
// Insert the program // Insert the program
@ -1412,7 +1412,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
if (m_keyMapping) { if (m_keyMapping) {
TQString numStr = atts.value("number"); TQString numStr = atts.value("number");
TQString namStr = atts.value("name"); TQString namStr = atts.value("name");
if (numStr && namStr) { if (!numStr.isNull() && !namStr.isNull()) {
m_keyNameMap[numStr.toInt()] = qstrtostr(namStr); m_keyNameMap[numStr.toInt()] = qstrtostr(namStr);
} }
} }
@ -1702,7 +1702,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
std::string program = ""; std::string program = "";
TQString progStr = atts.value("program"); TQString progStr = atts.value("program");
if (progStr) { if (!progStr.isNull()) {
program = qstrtostr(progStr); program = qstrtostr(progStr);
} }
@ -1715,8 +1715,8 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
AudioPlugin *plugin = 0; AudioPlugin *plugin = 0;
AudioPluginManager *apm = getAudioPluginManager(); AudioPluginManager *apm = getAudioPluginManager();
if (!identifier) { if (identifier.isNull()) {
if (atts.value("id")) { if (!(atts.value("id")).isNull()) {
unsigned long id = atts.value("id").toULong(); unsigned long id = atts.value("id").toULong();
if (apm) if (apm)
plugin = apm->getPluginByUniqueId(id); 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 shouldn't be halting import of the RG file just because
// we can't match a plugin // we can't match a plugin
// //
if (identifier) { if (!identifier.isNull()) {
RG_DEBUG << "WARNING: RoseXmlHandler: plugin " << identifier << " not found" << endl; RG_DEBUG << "WARNING: RoseXmlHandler: plugin " << identifier << " not found" << endl;
m_pluginsNotFound.insert(identifier); 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; RG_DEBUG << "WARNING: RoseXmlHandler: plugin uid " << atts.value("id") << " not found" << endl;
} else { } else {
m_errorString = "No plugin identifier or uid specified"; m_errorString = "No plugin identifier or uid specified";
@ -1764,7 +1764,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
if (lcName == "synth") { if (lcName == "synth") {
TQString identifier = atts.value("identifier"); TQString identifier = atts.value("identifier");
if (identifier) { if (!identifier.isNull()) {
RG_DEBUG << "WARNING: RoseXmlHandler: no instrument for plugin " << identifier << endl; RG_DEBUG << "WARNING: RoseXmlHandler: no instrument for plugin " << identifier << endl;
m_pluginsNotFound.insert(identifier); m_pluginsNotFound.insert(identifier);
} }
@ -1823,19 +1823,19 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
MidiMetronome metronome(instrument); MidiMetronome metronome(instrument);
if (atts.value("barpitch")) if (!(atts.value("barpitch")).isNull())
metronome.setBarPitch(atts.value("barpitch").toInt()); metronome.setBarPitch(atts.value("barpitch").toInt());
if (atts.value("beatpitch")) if (!(atts.value("beatpitch")).isNull())
metronome.setBeatPitch(atts.value("beatpitch").toInt()); metronome.setBeatPitch(atts.value("beatpitch").toInt());
if (atts.value("subbeatpitch")) if (!(atts.value("subbeatpitch")).isNull())
metronome.setSubBeatPitch(atts.value("subbeatpitch").toInt()); metronome.setSubBeatPitch(atts.value("subbeatpitch").toInt());
if (atts.value("depth")) if (!(atts.value("depth")).isNull())
metronome.setDepth(atts.value("depth").toInt()); metronome.setDepth(atts.value("depth").toInt());
if (atts.value("barvelocity")) if (!(atts.value("barvelocity")).isNull())
metronome.setBarVelocity(atts.value("barvelocity").toInt()); metronome.setBarVelocity(atts.value("barvelocity").toInt());
if (atts.value("beatvelocity")) if (!(atts.value("beatvelocity")).isNull())
metronome.setBeatVelocity(atts.value("beatvelocity").toInt()); metronome.setBeatVelocity(atts.value("beatvelocity").toInt());
if (atts.value("subbeatvelocity")) if (!(atts.value("subbeatvelocity")).isNull())
metronome.setSubBeatVelocity(atts.value("subbeatvelocity").toInt()); metronome.setSubBeatVelocity(atts.value("subbeatvelocity").toInt());
dynamic_cast<MidiDevice*>(m_device)-> dynamic_cast<MidiDevice*>(m_device)->
@ -1964,7 +1964,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
int channel = atts.value("channel").toInt(); int channel = atts.value("channel").toInt();
TQString type = atts.value("type"); TQString type = atts.value("type");
if (type) { if (!type.isNull()) {
if (type.lower() == "buss") { if (type.lower() == "buss") {
if (m_instrument) if (m_instrument)
m_instrument->setAudioInputToBuss(value, channel); m_instrument->setAudioInputToBuss(value, channel);
@ -2359,7 +2359,7 @@ RoseXmlHandler::setMIDIDeviceName(TQString name)
arg << (unsigned int)md->getId(); arg << (unsigned int)md->getId();
arg << name; 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)", rgapp->sequencerSend("renameDevice(unsigned int, TQString)",
data); data);

@ -347,12 +347,12 @@ bool RosegardenGUIDoc::saveIfModified()
completed = saveDocument(getAbsFilePath(), errMsg); completed = saveDocument(getAbsFilePath(), errMsg);
if (!completed) { if (!completed) {
if (errMsg) { if (!errMsg.isNull()) {
KMessageBox::error(0, i18n(TQString("Could not save document at %1\n(%2)") KMessageBox::error(0, i18n(TQString("Could not save document at %1\n(%2)")
.tqarg(getAbsFilePath()).tqarg(errMsg))); .tqarg(getAbsFilePath()).tqarg(errMsg).ascii()));
} else { } else {
KMessageBox::error(0, i18n(TQString("Could not save document at %1") 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) { for (size_t i = 0; i < derivedOrphans.size(); ++i) {
TQFile file(derivedOrphans[i]); TQFile file(derivedOrphans[i]);
if (!file.remove()) { 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])); TQFile peakFile(TQString("%1.pk").tqarg(derivedOrphans[i]));
peakFile.remove(); peakFile.remove();
@ -1152,7 +1152,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename,
int status = temp.status(); int status = temp.status();
if (status != 0) { 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; return false;
} }
@ -1164,7 +1164,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename,
if (!temp.close()) { if (!temp.close()) {
status = temp.status(); status = temp.status();
errMsg = i18n(TQString("Failure in temporary file handling for file '%1': %2") 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; return false;
} }
@ -1177,7 +1177,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename,
TQDir dir(TQFileInfo(tempFileName).dir()); TQDir dir(TQFileInfo(tempFileName).dir());
if (!dir.rename(tempFileName, filename)) { 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; return false;
} }
@ -1198,7 +1198,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename,
if (!rc) { if (!rc) {
// do some error report // 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; delete fileCompressedDevice;
return false; // couldn't open file return false; // couldn't open file
} }
@ -1315,7 +1315,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename,
// check that all went ok // check that all went ok
// //
if (fileCompressedDevice->status() != IO_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; delete fileCompressedDevice;
return false; return false;
} }
@ -1383,7 +1383,7 @@ void RosegardenGUIDoc::saveSegment(TQTextStream& outStream, Segment *segment,
.tqarg(segment->getTrack()) .tqarg(segment->getTrack())
.tqarg(segment->getStartTime()); .tqarg(segment->getStartTime());
if (extraAttributes) if (!extraAttributes.isNull())
outStream << extraAttributes << " "; outStream << extraAttributes << " ";
outStream << "label=\"" << outStream << "label=\"" <<

@ -37,7 +37,7 @@
#include "gui/editors/segment/segmentcanvas/AudioPreviewThread.h" #include "gui/editors/segment/segmentcanvas/AudioPreviewThread.h"
#include <map> #include <map>
#include "sound/AudioFileManager.h" #include "sound/AudioFileManager.h"
// #include <tqlist.h> (fixes problem for Adam Dingle) #include <tqptrlist.h>
#include <tqobject.h> #include <tqobject.h>
#include <tqstring.h> #include <tqstring.h>
#include <tqstringlist.h> #include <tqstringlist.h>
@ -439,7 +439,7 @@ public:
/** /**
* return the list of the views currently connected to the document * 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; } bool isBeingDestroyed() { return m_beingDestroyed; }
@ -617,12 +617,12 @@ protected:
/** /**
* the list of the views currently connected to the document * 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 * 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 * the modified flag of the current document

@ -409,7 +409,7 @@ LilyPondExporter::write()
std::ofstream str(qstrtostr(tmpName).c_str(), std::ios::out); std::ofstream str(qstrtostr(tmpName).c_str(), std::ios::out);
if (!str) { 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; return false;
} }

@ -2008,12 +2008,12 @@ void RosegardenGUIApp::saveGlobalProperties(KConfig *cfg)
TQString errMsg; TQString errMsg;
bool res = m_doc->saveDocument(tempname, errMsg); bool res = m_doc->saveDocument(tempname, errMsg);
if (!res) { if (!res) {
if (errMsg) if (!errMsg.isNull())
KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2")
.tqarg(tempname).tqarg(errMsg))); .tqarg(tempname).tqarg(errMsg).ascii()));
else else
KMessageBox::error(this, i18n(TQString("Could not save document at %1") KMessageBox::error(this, i18n(TQString("Could not save document at %1")
.tqarg(tempname))); .tqarg(tempname).ascii()));
} }
} }
} }
@ -2271,12 +2271,12 @@ void RosegardenGUIApp::slotFileSave()
bool res = m_doc->saveDocument(docFilePath, errMsg); bool res = m_doc->saveDocument(docFilePath, errMsg);
if (!res) { if (!res) {
if (errMsg) if (!errMsg.isNull())
KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2")
.tqarg(docFilePath).tqarg(errMsg))); .tqarg(docFilePath).tqarg(errMsg).ascii()));
else else
KMessageBox::error(this, i18n(TQString("Could not save document at %1") KMessageBox::error(this, i18n(TQString("Could not save document at %1")
.tqarg(docFilePath))); .tqarg(docFilePath).ascii()));
} }
} }
} }
@ -2294,7 +2294,7 @@ RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension,
// It's too bad there isn't this functionality within // It's too bad there isn't this functionality within
// KFileDialog::getSaveFileName // KFileDialog::getSaveFileName
KFileDialog saveFileDialog(":ROSEGARDEN", descriptiveExtension,this, label, true); KFileDialog saveFileDialog(TQString(":ROSEGARDEN"), descriptiveExtension, TQT_TQWIDGET(this), label.ascii(), true);
saveFileDialog.setOperationMode(KFileDialog::Saving); saveFileDialog.setOperationMode(KFileDialog::Saving);
if (m_doc) { if (m_doc) {
TQString saveFileName = m_doc->getAbsFilePath(); TQString saveFileName = m_doc->getAbsFilePath();
@ -2319,7 +2319,7 @@ RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension,
// //
if (!extension.isEmpty()) { if (!extension.isEmpty()) {
static TQRegExp rgFile("\\..{1,4}$"); static TQRegExp rgFile("\\..{1,4}$");
if (rgFile.match(name) == -1) { if (rgFile.search(name) == -1) {
name += extension; name += extension;
} }
} }
@ -2374,12 +2374,12 @@ bool RosegardenGUIApp::slotFileSaveAs()
TQString errMsg; TQString errMsg;
bool res = m_doc->saveDocument(newName, errMsg); bool res = m_doc->saveDocument(newName, errMsg);
if (!res) { if (!res) {
if (errMsg) if (!errMsg.isNull())
KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2")
.tqarg(newName).tqarg(errMsg))); .tqarg(newName).tqarg(errMsg).ascii()));
else else
KMessageBox::error(this, i18n(TQString("Could not save document at %1") KMessageBox::error(this, i18n(TQString("Could not save document at %1")
.tqarg(newName))); .tqarg(newName).ascii()));
} else { } else {
@ -7566,7 +7566,7 @@ RosegardenGUIApp::slotTutorial()
{ {
TQString exe = KStandardDirs::findExe( "x-www-browser" ); TQString exe = KStandardDirs::findExe( "x-www-browser" );
if( exe ) if( !exe.isNull() )
{ {
KProcess *proc = new KProcess; KProcess *proc = new KProcess;
*proc << "x-www-browser"; *proc << "x-www-browser";
@ -7588,7 +7588,7 @@ RosegardenGUIApp::slotBugGuidelines()
{ {
TQString exe = KStandardDirs::findExe( "x-www-browser" ); TQString exe = KStandardDirs::findExe( "x-www-browser" );
if( exe ) if( !exe.isNull() )
{ {
KProcess *proc = new KProcess; KProcess *proc = new KProcess;
*proc << "x-www-browser"; *proc << "x-www-browser";
@ -7751,12 +7751,12 @@ RosegardenGUIApp::slotSaveDefaultStudio()
TQString errMsg; TQString errMsg;
bool res = m_doc->saveDocument(autoloadFile, errMsg); bool res = m_doc->saveDocument(autoloadFile, errMsg);
if (!res) { if (!res) {
if (errMsg) if (!errMsg.isNull())
KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1\nError was : %2") KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1\nError was : %2")
.tqarg(autoloadFile).tqarg(errMsg))); .tqarg(autoloadFile).tqarg(errMsg).ascii()));
else else
KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1") KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1")
.tqarg(autoloadFile))); .tqarg(autoloadFile).ascii()));
} }
} }

@ -844,7 +844,7 @@ void RosegardenGUIView::slotEditSegmentAudio(Segment *segment)
if (splitCommand.size() == 0) { if (splitCommand.size() == 0) {
std::cerr << "RosegardenGUIView::slotEditSegmentAudio() - " std::cerr << "RosegardenGUIView::slotEditSegmentAudio() - "
<< "external editor \"" << application.data() << "external editor \"" << application.ascii()
<< "\" not found" << std::endl; << "\" not found" << std::endl;
KMessageBox::sorry(this, KMessageBox::sorry(this,
@ -856,7 +856,7 @@ void RosegardenGUIView::slotEditSegmentAudio(Segment *segment)
TQFileInfo *appInfo = new TQFileInfo(splitCommand[0]); TQFileInfo *appInfo = new TQFileInfo(splitCommand[0]);
if (appInfo->exists() == false || appInfo->isExecutable() == false) { if (appInfo->exists() == false || appInfo->isExecutable() == false) {
std::cerr << "RosegardenGUIView::slotEditSegmentAudio() - " std::cerr << "RosegardenGUIView::slotEditSegmentAudio() - "
<< "can't execute \"" << splitCommand[0] << "\"" << "can't execute \"" << splitCommand[0].ascii() << "\""
<< std::endl; << std::endl;
return; return;
} }
@ -1516,7 +1516,7 @@ RosegardenGUIView::slotDroppedNewAudio(TQString audioDesc)
s >> trackId; s >> trackId;
s >> time; s >> time;
std::cerr << "RosegardenGUIView::slotDroppedNewAudio: url " << url << ", trackId " << trackId << ", time " << time << std::endl; std::cerr << "RosegardenGUIView::slotDroppedNewAudio: url " << url.ascii() << ", trackId " << trackId << ", time " << time << std::endl;
RosegardenGUIApp *app = RosegardenGUIApp::self(); RosegardenGUIApp *app = RosegardenGUIApp::self();
AudioFileManager &aFM = getDocument()->getAudioFileManager(); AudioFileManager &aFM = getDocument()->getAudioFileManager();

@ -235,7 +235,7 @@ StartupTester::slotHttpDone(bool error)
TQString latestVersion = lines[0]; TQString latestVersion = lines[0];
std::cerr << "Comparing current version \"" << VERSION std::cerr << "Comparing current version \"" << VERSION
<< "\" with latest version \"" << latestVersion << "\"" << "\" with latest version \"" << latestVersion.ascii() << "\""
<< std::endl; << std::endl;
if (isVersionNewerThan(latestVersion, VERSION)) { if (isVersionNewerThan(latestVersion, VERSION)) {
emit newerVersionAvailable(latestVersion); emit newerVersionAvailable(latestVersion);

@ -350,20 +350,20 @@ void testInstalledVersion()
TQString versionLocation = locate("appdata", "version.txt"); TQString versionLocation = locate("appdata", "version.txt");
TQString installedVersion; TQString installedVersion;
if (versionLocation) { if (!versionLocation.isNull()) {
TQFile versionFile(versionLocation); TQFile versionFile(versionLocation);
if (versionFile.open(IO_ReadOnly)) { if (versionFile.open(IO_ReadOnly)) {
TQTextStream text(&versionFile); TQTextStream text(&versionFile);
TQString s = text.readLine().stripWhiteSpace(); TQString s = text.readLine().stripWhiteSpace();
versionFile.close(); versionFile.close();
if (s) { if (!s.isNull()) {
if (s == VERSION) return; if (s == VERSION) return;
installedVersion = s; installedVersion = s;
} }
} }
} }
if (installedVersion) { if (!installedVersion.isNull()) {
KMessageBox::detailedError KMessageBox::detailedError
(0, (0,
@ -724,7 +724,7 @@ int main(int argc, char *argv[])
TQLabel *image = new TQLabel(hb); TQLabel *image = new TQLabel(hb);
image->tqsetAlignment(TQt::AlignTop); image->tqsetAlignment(TQt::AlignTop);
TQString iconFile = locate("appdata", "pixmaps/misc/welcome-icon.png"); TQString iconFile = locate("appdata", "pixmaps/misc/welcome-icon.png");
if (iconFile) { if (!iconFile.isNull()) {
image->setPixmap(TQPixmap(iconFile)); image->setPixmap(TQPixmap(iconFile));
} }
TQLabel *label = new TQLabel(hb); TQLabel *label = new TQLabel(hb);

@ -119,7 +119,7 @@ AudioConfigurationPage::AudioConfigurationPage(
TQString defaultAudioEditor = getBestAvailableAudioEditor(); TQString defaultAudioEditor = getBestAvailableAudioEditor();
std::cerr << "defaultAudioEditor = " << defaultAudioEditor << std::endl; std::cerr << "defaultAudioEditor = " << defaultAudioEditor.ascii() << std::endl;
TQString externalAudioEditor = m_cfg->readEntry("externalaudioeditor", TQString externalAudioEditor = m_cfg->readEntry("externalaudioeditor",
defaultAudioEditor); defaultAudioEditor);

@ -592,7 +592,7 @@ NotationConfigurationPage::slotViewButtonPressed()
(void)viewer->exec(); // no return value (void)viewer->exec(); // no return value
} }
} catch (Exception f) { } catch (Exception f) {
KMessageBox::error(0, i18n(strtoqstr(f.getMessage()))); KMessageBox::error(0, i18n(strtoqstr(f.getMessage()).ascii()));
} }
#endif #endif
} }
@ -656,21 +656,21 @@ NotationConfigurationPage::slotFontComboChanged(int index)
NoteFont *noteFont = NoteFontFactory::getFont NoteFont *noteFont = NoteFontFactory::getFont
(fontStr, NoteFontFactory::getDefaultSize(fontStr)); (fontStr, NoteFontFactory::getDefaultSize(fontStr));
const NoteFontMap &map(noteFont->getNoteFontMap()); const NoteFontMap &map(noteFont->getNoteFontMap());
m_fontOriginLabel->setText(i18n(strtoqstr(map.getOrigin()))); m_fontOriginLabel->setText(i18n(strtoqstr(map.getOrigin()).ascii()));
m_fontCopyrightLabel->setText(i18n(strtoqstr(map.getCopyright()))); m_fontCopyrightLabel->setText(i18n(strtoqstr(map.getCopyright()).ascii()));
m_fontMappedByLabel->setText(i18n(strtoqstr(map.getMappedBy()))); m_fontMappedByLabel->setText(i18n(strtoqstr(map.getMappedBy()).ascii()));
if (map.isSmooth()) { if (map.isSmooth()) {
m_fontTypeLabel->setText( m_fontTypeLabel->setText(
i18n("%1 (smooth)").tqarg(i18n(strtoqstr(map.getType())))); i18n("%1 (smooth)").tqarg(i18n(strtoqstr(map.getType()).ascii())));
} else { } else {
m_fontTypeLabel->setText( m_fontTypeLabel->setText(
i18n("%1 (jaggy)").tqarg(i18n(strtoqstr(map.getType())))); i18n("%1 (jaggy)").tqarg(i18n(strtoqstr(map.getType()).ascii())));
} }
if (m_viewButton) { if (m_viewButton) {
m_viewButton->setEnabled(map.getSystemFontNames().count() > 0); m_viewButton->setEnabled(map.getSystemFontNames().count() > 0);
} }
} catch (Exception f) { } catch (Exception f) {
KMessageBox::error(0, i18n(strtoqstr(f.getMessage()))); KMessageBox::error(0, i18n(strtoqstr(f.getMessage()).ascii()));
} }
} }

@ -882,7 +882,7 @@ AudioManagerDialog::slotDeleteUnused()
} }
for (int i = 0; i < names.size(); ++i) { for (int i = 0; i < names.size(); ++i) {
std::cerr << i << ": " << names[i] << std::endl; std::cerr << i << ": " << names[i].ascii() << std::endl;
TQFile file(names[i]); TQFile file(names[i]);
if (!file.remove()) { if (!file.remove()) {
KMessageBox::error(this, i18n("File %1 could not be deleted.").tqarg(names[i])); KMessageBox::error(this, i18n("File %1 could not be deleted.").tqarg(names[i]));
@ -891,7 +891,7 @@ AudioManagerDialog::slotDeleteUnused()
m_doc->getAudioFileManager().removeFile(nameMap[names[i]]); m_doc->getAudioFileManager().removeFile(nameMap[names[i]]);
emit deleteAudioFile(nameMap[names[i]]); emit deleteAudioFile(nameMap[names[i]]);
} else { } else {
std::cerr << "WARNING: Audio file name " << names[i] << " not in name map" << std::endl; std::cerr << "WARNING: Audio file name " << names[i].ascii() << " not in name map" << std::endl;
} }
TQFile peakFile(TQString("%1.pk").tqarg(names[i])); TQFile peakFile(TQString("%1.pk").tqarg(names[i]));
@ -1150,7 +1150,7 @@ AudioManagerDialog::slotDropped(TQDropEvent *event, TQListViewItem*)
// see if we can decode a URI.. if not, just ignore it // see if we can decode a URI.. if not, just ignore it
if (TQUriDrag::decode(event, uri)) { if (TQUriDrag::decode(event, uri)) {
// okay, we have a URI.. process it // okay, we have a URI.. process it
for (TQString url = uri.first(); url; url = uri.next()) { for (TQString url = uri.first(); !url.isNull(); url = uri.next()) {
RG_DEBUG << "AudioManagerDialog::dropEvent() : got " RG_DEBUG << "AudioManagerDialog::dropEvent() : got "
<< url << endl; << url << endl;
@ -1222,7 +1222,7 @@ AudioManagerDialog::slotDistributeOnMidiSegment()
//Composition &comp = m_doc->getComposition(); //Composition &comp = m_doc->getComposition();
TQList<RosegardenGUIView>& viewList = m_doc->getViewList(); TQPtrList<RosegardenGUIView>& viewList = m_doc->getViewList();
RosegardenGUIView *w = 0; RosegardenGUIView *w = 0;
SegmentSelection selection; SegmentSelection selection;

@ -281,7 +281,7 @@ AudioPluginDialog::populatePluginList()
if (needCategory) { if (needCategory) {
TQString cat = ""; TQString cat = "";
if ((*i)->getCategory()) if (!((*i)->getCategory()).isNull())
cat = (*i)->getCategory(); cat = (*i)->getCategory();
if (cat != category) if (cat != category)
continue; continue;

@ -73,7 +73,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
// //
pageWidget = addPage(GeneralConfigurationPage::iconLabel(), pageWidget = addPage(GeneralConfigurationPage::iconLabel(),
GeneralConfigurationPage::title(), GeneralConfigurationPage::title(),
loadIcon(GeneralConfigurationPage::iconName())); loadIcon(GeneralConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new GeneralConfigurationPage(doc, cfg, pageWidget); page = new GeneralConfigurationPage(doc, cfg, pageWidget);
vlay->addWidget(page); vlay->addWidget(page);
@ -87,7 +87,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
pageWidget = addPage(MIDIConfigurationPage::iconLabel(), pageWidget = addPage(MIDIConfigurationPage::iconLabel(),
MIDIConfigurationPage::title(), MIDIConfigurationPage::title(),
loadIcon(MIDIConfigurationPage::iconName())); loadIcon(MIDIConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new MIDIConfigurationPage(doc, cfg, pageWidget); page = new MIDIConfigurationPage(doc, cfg, pageWidget);
vlay->addWidget(page); vlay->addWidget(page);
@ -96,7 +96,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
pageWidget = addPage(AudioConfigurationPage::iconLabel(), pageWidget = addPage(AudioConfigurationPage::iconLabel(),
AudioConfigurationPage::title(), AudioConfigurationPage::title(),
loadIcon(AudioConfigurationPage::iconName())); loadIcon(AudioConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new AudioConfigurationPage(doc, cfg, pageWidget); page = new AudioConfigurationPage(doc, cfg, pageWidget);
vlay->addWidget(page); vlay->addWidget(page);
@ -106,7 +106,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
// Notation Page // Notation Page
pageWidget = addPage(NotationConfigurationPage::iconLabel(), pageWidget = addPage(NotationConfigurationPage::iconLabel(),
NotationConfigurationPage::title(), NotationConfigurationPage::title(),
loadIcon(NotationConfigurationPage::iconName())); loadIcon(NotationConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new NotationConfigurationPage(cfg, pageWidget); page = new NotationConfigurationPage(cfg, pageWidget);
vlay->addWidget(page); vlay->addWidget(page);

@ -38,7 +38,7 @@ namespace Rosegarden
ConfigureDialogBase::ConfigureDialogBase(TQWidget *parent, ConfigureDialogBase::ConfigureDialogBase(TQWidget *parent,
TQString label, TQString label,
const char *name): const char *name):
KDialogBase(IconList, label ? label : i18n("Configure"), Help | Apply | Ok | Cancel, KDialogBase(IconList, (!label.isNull()) ? label : i18n("Configure"), Help | Apply | Ok | Cancel,
Ok, parent, name, true) // modal Ok, parent, name, true) // modal
{ {
setWFlags(WDestructiveClose); setWFlags(WDestructiveClose);

@ -71,7 +71,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc,
// //
pageWidget = addPage(DocumentMetaConfigurationPage::iconLabel(), pageWidget = addPage(DocumentMetaConfigurationPage::iconLabel(),
DocumentMetaConfigurationPage::title(), DocumentMetaConfigurationPage::title(),
loadIcon(DocumentMetaConfigurationPage::iconName())); loadIcon(DocumentMetaConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new DocumentMetaConfigurationPage(doc, pageWidget); page = new DocumentMetaConfigurationPage(doc, pageWidget);
vlay->addWidget(page); vlay->addWidget(page);
@ -82,7 +82,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc,
// //
pageWidget = addPage(AudioPropertiesPage::iconLabel(), pageWidget = addPage(AudioPropertiesPage::iconLabel(),
AudioPropertiesPage::title(), AudioPropertiesPage::title(),
loadIcon(AudioPropertiesPage::iconName())); loadIcon(AudioPropertiesPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new AudioPropertiesPage(doc, pageWidget); page = new AudioPropertiesPage(doc, pageWidget);
vlay->addWidget(page); vlay->addWidget(page);
@ -92,7 +92,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc,
// Colour Page // Colour Page
pageWidget = addPage(ColourConfigurationPage::iconLabel(), pageWidget = addPage(ColourConfigurationPage::iconLabel(),
ColourConfigurationPage::title(), ColourConfigurationPage::title(),
loadIcon(ColourConfigurationPage::iconName())); loadIcon(ColourConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint()); vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new ColourConfigurationPage(doc, pageWidget); page = new ColourConfigurationPage(doc, pageWidget);

@ -179,10 +179,10 @@ EventEditDialog::EventEditDialog(TQWidget *parent,
for (Event::PropertyNames::iterator i = p.begin(); for (Event::PropertyNames::iterator i = p.begin();
i != p.end(); ++i) { i != p.end(); ++i) {
new TQLabel(strtoqstr(*i), m_nonPersistentGrid, strtoqstr(*i)); new TQLabel(strtoqstr(*i), m_nonPersistentGrid, strtoqstr(*i).ascii());
new TQLabel(strtoqstr(event.getPropertyTypeAsString(*i)), m_nonPersistentGrid, strtoqstr(*i)); new TQLabel(strtoqstr(event.getPropertyTypeAsString(*i)), m_nonPersistentGrid, strtoqstr(*i).ascii());
new TQLabel(strtoqstr(event.getAsString(*i)), m_nonPersistentGrid, strtoqstr(*i)); new TQLabel(strtoqstr(event.getAsString(*i)), m_nonPersistentGrid, strtoqstr(*i).ascii());
TQPushButton *button = new TQPushButton("P", m_nonPersistentGrid, strtoqstr(*i)); TQPushButton *button = new TQPushButton("P", m_nonPersistentGrid, strtoqstr(*i).ascii());
button->setFixedSize(TQSize(24, 24)); button->setFixedSize(TQSize(24, 24));
TQToolTip::add TQToolTip::add
(button, i18n("Make persistent")); (button, i18n("Make persistent"));
@ -195,10 +195,10 @@ EventEditDialog::EventEditDialog(TQWidget *parent,
void void
EventEditDialog::addPersistentProperty(const PropertyName &name) EventEditDialog::addPersistentProperty(const PropertyName &name)
{ {
TQLabel *label = new TQLabel(strtoqstr(name), m_persistentGrid, strtoqstr(name)); TQLabel *label = new TQLabel(strtoqstr(name), m_persistentGrid, strtoqstr(name).ascii());
label->show(); label->show();
label = new TQLabel(strtoqstr(m_originalEvent.getPropertyTypeAsString(name)), label = new TQLabel(strtoqstr(m_originalEvent.getPropertyTypeAsString(name)),
m_persistentGrid, strtoqstr(name)); m_persistentGrid, strtoqstr(name).ascii());
label->show(); label->show();
PropertyType type(m_originalEvent.getPropertyType(name)); PropertyType type(m_originalEvent.getPropertyType(name));
@ -213,7 +213,7 @@ EventEditDialog::addPersistentProperty(const PropertyName &name)
max = 127; max = 127;
} }
TQSpinBox *spinBox = new TQSpinBox TQSpinBox *spinBox = new TQSpinBox
(min, max, 1, m_persistentGrid, strtoqstr(name)); (min, max, 1, m_persistentGrid, strtoqstr(name).ascii());
spinBox->setValue(m_originalEvent.get<Int>(name)); spinBox->setValue(m_originalEvent.get<Int>(name));
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)), TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotIntPropertyChanged(int))); this, TQT_SLOT(slotIntPropertyChanged(int)));
@ -228,7 +228,7 @@ case UInt: {
max = 65535; max = 65535;
} }
TQSpinBox *spinBox = new TQSpinBox TQSpinBox *spinBox = new TQSpinBox
(min, max, 1, m_persistentGrid, strtoqstr(name)); (min, max, 1, m_persistentGrid, strtoqstr(name).ascii());
spinBox->setValue(m_originalEvent.get<UInt>(name)); spinBox->setValue(m_originalEvent.get<UInt>(name));
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)), TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotIntPropertyChanged(int))); this, TQT_SLOT(slotIntPropertyChanged(int)));
@ -244,7 +244,7 @@ case UInt: {
// //
TQSpinBox *spinBox = new TQSpinBox TQSpinBox *spinBox = new TQSpinBox
(INT_MIN, INT_MAX, 1, (INT_MIN, INT_MAX, 1,
hbox, strtoqstr(name) + "%sec"); hbox, TQString(strtoqstr(name) + "%sec").ascii());
spinBox->setValue(realTime.sec); spinBox->setValue(realTime.sec);
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)), TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
@ -254,7 +254,7 @@ case UInt: {
// //
spinBox = new TQSpinBox spinBox = new TQSpinBox
(INT_MIN, INT_MAX, 1, (INT_MIN, INT_MAX, 1,
hbox, strtoqstr(name) + "%nsec"); hbox, TQString(strtoqstr(name) + "%nsec").ascii());
spinBox->setValue(realTime.nsec); spinBox->setValue(realTime.nsec);
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)), TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
@ -265,7 +265,7 @@ case UInt: {
case Bool: { case Bool: {
TQCheckBox *checkBox = new TQCheckBox TQCheckBox *checkBox = new TQCheckBox
("", m_persistentGrid, strtoqstr(name)); ("", m_persistentGrid, strtoqstr(name).ascii());
checkBox->setChecked(m_originalEvent.get<Bool>(name)); checkBox->setChecked(m_originalEvent.get<Bool>(name));
TQObject::connect(checkBox, TQT_SIGNAL(activated()), TQObject::connect(checkBox, TQT_SIGNAL(activated()),
this, TQT_SLOT(slotBoolPropertyChanged())); this, TQT_SLOT(slotBoolPropertyChanged()));
@ -277,7 +277,7 @@ case UInt: {
TQLineEdit *lineEdit = new TQLineEdit TQLineEdit *lineEdit = new TQLineEdit
(strtoqstr(m_originalEvent.get<String>(name)), (strtoqstr(m_originalEvent.get<String>(name)),
m_persistentGrid, m_persistentGrid,
strtoqstr(name)); strtoqstr(name).ascii());
TQObject::connect(lineEdit, TQT_SIGNAL(textChanged(const TQString &)), TQObject::connect(lineEdit, TQT_SIGNAL(textChanged(const TQString &)),
this, TQT_SLOT(slotStringPropertyChanged(const TQString &))); this, TQT_SLOT(slotStringPropertyChanged(const TQString &)));
lineEdit->show(); lineEdit->show();
@ -286,7 +286,7 @@ case UInt: {
} }
TQPushButton *button = new TQPushButton("X", m_persistentGrid, TQPushButton *button = new TQPushButton("X", m_persistentGrid,
strtoqstr(name)); strtoqstr(name).ascii());
button->setFixedSize(TQSize(24, 24)); button->setFixedSize(TQSize(24, 24));
TQToolTip::add TQToolTip::add
(button, i18n("Delete this property")); (button, i18n("Delete this property"));
@ -438,7 +438,7 @@ EventEditDialog::slotPropertyDeleted()
return ; return ;
m_modified = true; m_modified = true;
TQObjectList *list = m_persistentGrid->queryList(0, propertyName, false); TQObjectList *list = m_persistentGrid->queryList(0, propertyName.ascii(), false);
TQObjectListIt i(*list); TQObjectListIt i(*list);
TQObject *obj; TQObject *obj;
while ((obj = i.current()) != 0) { while ((obj = i.current()) != 0) {
@ -470,7 +470,7 @@ EventEditDialog::slotPropertyMadePersistent()
i18n("Make &Persistent")) != KMessageBox::Continue) i18n("Make &Persistent")) != KMessageBox::Continue)
return ; return ;
TQObjectList *list = m_nonPersistentGrid->queryList(0, propertyName, false); TQObjectList *list = m_nonPersistentGrid->queryList(0, propertyName.ascii(), false);
TQObjectListIt i(*list); TQObjectListIt i(*list);
TQObject *obj; TQObject *obj;
while ((obj = i.current()) != 0) { while ((obj = i.current()) != 0) {

@ -160,7 +160,7 @@ IdentifyTextCodecDialog::slotCodecSelected(int i)
// std::cerr << "codecs: "; // std::cerr << "codecs: ";
// for (int j = 0; j < m_codecs.size(); ++j) std::cerr << m_codecs[j] << " "; // for (int j = 0; j < m_codecs.size(); ++j) std::cerr << m_codecs[j] << " ";
// std::cerr << std::endl; // std::cerr << std::endl;
TQTextCodec *codec = TQTextCodec::codecForName(strtoqstr(name)); TQTextCodec *codec = TQTextCodec::codecForName(strtoqstr(name).ascii());
if (!codec) return; if (!codec) return;
m_codec = qstrtostr(codec->name()); m_codec = qstrtostr(codec->name());
std::cerr << "Applying codec " << m_codec << std::endl; std::cerr << "Applying codec " << m_codec << std::endl;

@ -89,7 +89,7 @@ KeySignatureDialog::KeySignatureDialog(TQWidget *parent,
nameBox = new TQHBox(keyFrame); nameBox = new TQHBox(keyFrame);
TQLabel *explanatoryLabel = 0; TQLabel *explanatoryLabel = 0;
if (explanatoryText) { if (!explanatoryText.isNull()) {
explanatoryLabel = new TQLabel(explanatoryText, keyFrame); explanatoryLabel = new TQLabel(explanatoryText, keyFrame);
} }

@ -84,7 +84,7 @@ TimeSignatureDialog::TimeSignatureDialog(TQWidget *parent,
TQHBox *denomBox = new TQHBox(groupBox); TQHBox *denomBox = new TQHBox(groupBox);
TQLabel *explanatoryLabel = 0; TQLabel *explanatoryLabel = 0;
if (explanatoryText) { if (!explanatoryText.isNull()) {
explanatoryLabel = new TQLabel(explanatoryText, groupBox); explanatoryLabel = new TQLabel(explanatoryText, groupBox);
} }

@ -347,7 +347,7 @@ TransportDialog::loadPixmaps()
fileName = TQString("%1/transport/led-%2.xpm").tqarg(pixmapDir).tqarg(i); fileName = TQString("%1/transport/led-%2.xpm").tqarg(pixmapDir).tqarg(i);
if (!m_lcdList[i].load(fileName)) { if (!m_lcdList[i].load(fileName)) {
std::cerr << "TransportDialog - failed to load pixmap \"" std::cerr << "TransportDialog - failed to load pixmap \""
<< fileName << "\"" << std::endl; << fileName.ascii() << "\"" << std::endl;
} }
} }
@ -959,7 +959,7 @@ TransportDialog::setMidiInLabel(const MappedEvent *mE)
void void
TransportDialog::slotClearMidiInLabel() TransportDialog::slotClearMidiInLabel()
{ {
m_transport->InDisplay->setText(i18n(TQString("NO EVENTS"))); m_transport->InDisplay->setText(i18n(TQString("NO EVENTS").ascii()));
// also, just to be sure: // also, just to be sure:
slotResetBackground(); slotResetBackground();
@ -1019,7 +1019,7 @@ TransportDialog::setMidiOutLabel(const MappedEvent *mE)
void void
TransportDialog::slotClearMidiOutLabel() TransportDialog::slotClearMidiOutLabel()
{ {
m_transport->OutDisplay->setText(i18n(TQString("NO EVENTS"))); m_transport->OutDisplay->setText(i18n(TQString("NO EVENTS").ascii()));
} }
void void

@ -27,6 +27,8 @@
#ifndef _RG_SYMBOLS_H_ #ifndef _RG_SYMBOLS_H_
#define _RG_SYMBOLS_H_ #define _RG_SYMBOLS_H_
#include <utility>
#include <tqbrush.h> #include <tqbrush.h>
#include <tqpainter.h> #include <tqpainter.h>

@ -106,7 +106,7 @@ void MatrixCanvasView::contentsMousePressEvent(TQMouseEvent* e)
QCanvasMatrixRectangle *mRect = 0; QCanvasMatrixRectangle *mRect = 0;
if (item->active()) { if (item->isActive()) {
activeItem = item; activeItem = item;
break; break;
} }

@ -520,7 +520,7 @@ void MatrixSelector::setViewCurrentSelection()
EventSelection* MatrixSelector::getSelection() EventSelection* MatrixSelector::getSelection()
{ {
if (!m_selectionRect->visible()) return 0; if (!m_selectionRect->isVisible()) return 0;
Segment& originalSegment = m_currentStaff->getSegment(); Segment& originalSegment = m_currentStaff->getSegment();
EventSelection* selection = new EventSelection(originalSegment); EventSelection* selection = new EventSelection(originalSegment);
@ -571,7 +571,7 @@ void MatrixSelector::setContextHelpFor(TQPoint p, bool ctrlPressed)
TQCanvasItem *item = *it; TQCanvasItem *item = *it;
QCanvasMatrixRectangle *mRect = 0; QCanvasMatrixRectangle *mRect = 0;
if (item->active()) { if (item->isActive()) {
break; break;
} }

@ -907,7 +907,7 @@ void MatrixView::setupActions()
if (d == (crotchetDuration * 3) / 2) actionName = "snap_3"; if (d == (crotchetDuration * 3) / 2) actionName = "snap_3";
new KAction(i18n("Snap to %1").tqarg(label), pixmap, cut, TQT_TQOBJECT(this), new KAction(i18n("Snap to %1").tqarg(label), pixmap, cut, TQT_TQOBJECT(this),
TQT_SLOT(slotSetSnapFromAction()), actionCollection(), TQT_SLOT(slotSetSnapFromAction()), actionCollection(),
actionName); actionName.ascii());
} }
} }

@ -186,7 +186,7 @@ void NotationCanvasView::contentsMousePressEvent(TQMouseEvent *e)
for (it = itemList.begin(); it != itemList.end(); ++it) { for (it = itemList.begin(); it != itemList.end(); ++it) {
if ((*it)->active()) { if ((*it)->isActive()) {
emit activeItemPressed(e, *it); emit activeItemPressed(e, *it);
return ; return ;
} }
@ -284,7 +284,7 @@ NotationCanvasView::processActiveItems(TQMouseEvent* e,
for (it = itemList.begin(); it != itemList.end(); ++it) { for (it = itemList.begin(); it != itemList.end(); ++it) {
TQCanvasItem *item = *it; TQCanvasItem *item = *it;
if (item->active() && !pressedItem) { if (item->isActive() && !pressedItem) {
NOTATION_DEBUG << "mousepress : got active item\n"; NOTATION_DEBUG << "mousepress : got active item\n";
pressedItem = item; pressedItem = item;
} }

@ -184,7 +184,7 @@ NotationElement::reposition(double canvasX, double canvasY)
bool bool
NotationElement::isSelected() NotationElement::isSelected()
{ {
return m_canvasItem ? m_canvasItem->selected() : false; return m_canvasItem ? m_canvasItem->isSelected() : false;
} }
void void

@ -824,7 +824,7 @@ EventSelection* NotationSelector::getSelection()
// If selection rect is not visible or too small, // If selection rect is not visible or too small,
// return 0 // return 0
// //
if (!m_selectionRect->visible()) return 0; if (!m_selectionRect->isVisible()) return 0;
// NOTATION_DEBUG << "Selection x,y: " << m_selectionRect->x() << "," // NOTATION_DEBUG << "Selection x,y: " << m_selectionRect->x() << ","
// << m_selectionRect->y() << "; w,h: " << m_selectionRect->width() << "," << m_selectionRect->height() << endl; // << m_selectionRect->y() << "; w,h: " << m_selectionRect->width() << "," << m_selectionRect->height() << endl;

@ -935,7 +935,7 @@ NotationStaff::renderSingleElement(ViewElementList::iterator &vli,
static bool warned = false; static bool warned = false;
if (!warned) { if (!warned) {
KMessageBox::error(0, i18n(strtoqstr(u.getMessage()))); KMessageBox::error(0, i18n(strtoqstr(u.getMessage()).ascii()));
warned = true; warned = true;
} }
} }

@ -236,7 +236,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT)
if (!(*chord[j])->event()->get if (!(*chord[j])->event()->get
<Int> <Int>
(m_properties.HEIGHT_ON_STAFF, height)) { (m_properties.HEIGHT_ON_STAFF, height)) {
std::cerr << TQString("ERROR: Event in chord at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").tqarg((*chord[j])->getViewAbsoluteTime()) << std::endl; std::cerr << TQString("ERROR: Event in chord at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").tqarg((*chord[j])->getViewAbsoluteTime()).ascii() << std::endl;
(*chord[j])->event()->dump(std::cerr); (*chord[j])->event()->dump(std::cerr);
} }
h.push_back(height); h.push_back(height);

@ -1527,7 +1527,7 @@ void NotationView::setupActions()
KToggleAction *fontAction = KToggleAction *fontAction =
new KToggleAction new KToggleAction
(fontTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeFontFromAction()), (fontTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeFontFromAction()),
actionCollection(), "note_font_" + fontTQName); actionCollection(), TQString("note_font_" + fontTQName).ascii());
fontAction->setChecked(*i == m_fontName); fontAction->setChecked(*i == m_fontName);
fontActionMenu->insert(fontAction); fontActionMenu->insert(fontAction);
@ -1559,7 +1559,7 @@ void NotationView::setupActions()
new KToggleAction new KToggleAction
(TQString("%1%").tqarg(*i), 0, TQT_TQOBJECT(this), (TQString("%1%").tqarg(*i), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotChangeSpacingFromAction()), TQT_SLOT(slotChangeSpacingFromAction()),
actionCollection(), TQString("spacing_%1").tqarg(*i)); actionCollection(), TQString("spacing_%1").tqarg(*i).ascii());
spacingAction->setExclusiveGroup("spacing"); spacingAction->setExclusiveGroup("spacing");
spacingAction->setChecked(*i == defaultSpacing); spacingAction->setChecked(*i == defaultSpacing);
@ -1585,7 +1585,7 @@ void NotationView::setupActions()
new KToggleAction new KToggleAction
(name, 0, TQT_TQOBJECT(this), (name, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotChangeProportionFromAction()), TQT_SLOT(slotChangeProportionFromAction()),
actionCollection(), TQString("proportion_%1").tqarg(*i)); actionCollection(), TQString("proportion_%1").tqarg(*i).ascii());
proportionAction->setExclusiveGroup("proportion"); proportionAction->setExclusiveGroup("proportion");
proportionAction->setChecked(*i == defaultProportion); proportionAction->setChecked(*i == defaultProportion);
@ -1608,7 +1608,7 @@ void NotationView::setupActions()
KAction *styleAction = KAction *styleAction =
new KAction new KAction
(styleTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetStyleFromAction()), (styleTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetStyleFromAction()),
actionCollection(), "style_" + styleTQName); actionCollection(), TQString("style_" + styleTQName).ascii());
styleActionMenu->insert(styleAction); styleActionMenu->insert(styleAction);
} }
@ -1622,17 +1622,17 @@ void NotationView::setupActions()
new KAction new KAction
(i18n("Insert Rest"), Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotInsertRest()), (i18n("Insert Rest"), Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotInsertRest()),
actionCollection(), TQString("insert_rest")); actionCollection(), TQString("insert_rest").ascii());
new KAction new KAction
(i18n("Switch from Note to Rest"), Key_T, TQT_TQOBJECT(this), (i18n("Switch from Note to Rest"), Key_T, TQT_TQOBJECT(this),
TQT_SLOT(slotSwitchFromNoteToRest()), TQT_SLOT(slotSwitchFromNoteToRest()),
actionCollection(), TQString("switch_from_note_to_rest")); actionCollection(), TQString("switch_from_note_to_rest").ascii());
new KAction new KAction
(i18n("Switch from Rest to Note"), Key_Y, TQT_TQOBJECT(this), (i18n("Switch from Rest to Note"), Key_Y, TQT_TQOBJECT(this),
TQT_SLOT(slotSwitchFromRestToNote()), TQT_SLOT(slotSwitchFromRestToNote()),
actionCollection(), TQString("switch_from_rest_to_note")); actionCollection(), TQString("switch_from_rest_to_note").ascii());
// setup Notes menu & toolbar // setup Notes menu & toolbar
@ -1646,14 +1646,14 @@ void NotationView::setupActions()
icon = TQIconSet icon = TQIconSet
(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
(noteActionData.pixmapName))); (noteActionData.pixmapName.ascii())));
noteAction = new KRadioAction(noteActionData.title, noteAction = new KRadioAction(noteActionData.title,
icon, icon,
noteActionData.keycode, noteActionData.keycode,
TQT_TQOBJECT(this), TQT_TQOBJECT(this),
TQT_SLOT(slotNoteAction()), TQT_SLOT(slotNoteAction()),
actionCollection(), actionCollection(),
noteActionData.actionName); noteActionData.actionName.ascii());
noteAction->setExclusiveGroup("notes"); noteAction->setExclusiveGroup("notes");
if (noteActionData.noteType == Note::Crotchet && if (noteActionData.noteType == Note::Crotchet &&
@ -1671,7 +1671,7 @@ void NotationView::setupActions()
icon = TQIconSet icon = TQIconSet
(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
(data.pixmapName))); (data.pixmapName.ascii())));
KAction *action = new KAction(data.title, KAction *action = new KAction(data.title,
icon, icon,
@ -1679,7 +1679,7 @@ void NotationView::setupActions()
TQT_TQOBJECT(this), TQT_TQOBJECT(this),
TQT_SLOT(slotNoteChangeAction()), TQT_SLOT(slotNoteChangeAction()),
actionCollection(), actionCollection(),
data.actionName); data.actionName.ascii());
} }
// //
@ -1700,10 +1700,10 @@ void NotationView::setupActions()
i < sizeof(actionsAccidental) / sizeof(actionsAccidental[0]); ++i) { i < sizeof(actionsAccidental) / sizeof(actionsAccidental[0]); ++i) {
icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
(actionsAccidental[i][3]))); (actionsAccidental[i][3].ascii())));
noteAction = new KRadioAction(actionsAccidental[i][0], icon, 0, TQT_TQOBJECT(this), noteAction = new KRadioAction(actionsAccidental[i][0], icon, 0, TQT_TQOBJECT(this),
actionsAccidental[i][1], actionsAccidental[i][1].ascii(),
actionCollection(), actionsAccidental[i][2]); actionCollection(), actionsAccidental[i][2].ascii());
noteAction->setExclusiveGroup("accidentals"); noteAction->setExclusiveGroup("accidentals");
} }
@ -2194,7 +2194,7 @@ void NotationView::setupActions()
TQT_TQOBJECT(this), TQT_TQOBJECT(this),
TQT_SLOT(slotAddMark()), TQT_SLOT(slotAddMark()),
actionCollection(), actionCollection(),
markActionData.actionName); markActionData.actionName.ascii());
} }
icon = TQIconSet icon = TQIconSet
@ -2263,7 +2263,7 @@ void NotationView::setupActions()
for (int i = 0; i <= 5; ++i) { for (int i = 0; i <= 5; ++i) {
new KAction(slashTitles[i], 0, TQT_TQOBJECT(this), new KAction(slashTitles[i], 0, TQT_TQOBJECT(this),
TQT_SLOT(slotAddSlashes()), actionCollection(), TQT_SLOT(slotAddSlashes()), actionCollection(),
TQString("slashes_%1").tqarg(i)); TQString("slashes_%1").tqarg(i).ascii());
} }
new KAction(ClefInsertionCommand::getGlobalName(), 0, TQT_TQOBJECT(this), new KAction(ClefInsertionCommand::getGlobalName(), 0, TQT_TQOBJECT(this),
@ -2315,11 +2315,11 @@ void NotationView::setupActions()
for (unsigned int i = 0; for (unsigned int i = 0;
i < sizeof(actionsToolbars) / sizeof(actionsToolbars[0]); ++i) { i < sizeof(actionsToolbars) / sizeof(actionsToolbars[0]); ++i) {
icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3]))); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3].ascii())));
new KToggleAction(actionsToolbars[i][0], icon, 0, new KToggleAction(actionsToolbars[i][0], icon, 0,
TQT_TQOBJECT(this), actionsToolbars[i][1], TQT_TQOBJECT(this), actionsToolbars[i][1].ascii(),
actionCollection(), actionsToolbars[i][2]); actionCollection(), actionsToolbars[i][2].ascii());
} }
new KAction(i18n("Cursor &Back"), 0, Key_Left, TQT_TQOBJECT(this), new KAction(i18n("Cursor &Back"), 0, Key_Left, TQT_TQOBJECT(this),
@ -2546,7 +2546,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName)
for (unsigned int i = 0; i < sizes.size(); ++i) { for (unsigned int i = 0; i < sizes.size(); ++i) {
KAction *action = KAction *action =
actionCollection()->action actionCollection()->action
(TQString("note_font_size_%1").tqarg(sizes[i])); (TQString("note_font_size_%1").tqarg(sizes[i]).ascii());
m_fontSizeActionMenu->remove m_fontSizeActionMenu->remove
(action); (action);
@ -2563,14 +2563,14 @@ NotationView::setupFontSizeMenu(std::string oldFontName)
TQString actionName = TQString("note_font_size_%1").tqarg(sizes[i]); TQString actionName = TQString("note_font_size_%1").tqarg(sizes[i]);
KToggleAction *sizeAction = dynamic_cast<KToggleAction *> KToggleAction *sizeAction = dynamic_cast<KToggleAction *>
(actionCollection()->action(actionName)); (actionCollection()->action(actionName.ascii()));
if (!sizeAction) { if (!sizeAction) {
sizeAction = sizeAction =
new KToggleAction(i18n("1 pixel", "%n pixels", sizes[i]), new KToggleAction(i18n("1 pixel", "%n pixels", sizes[i]),
0, TQT_TQOBJECT(this), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotChangeFontSizeFromAction()), TQT_SLOT(slotChangeFontSizeFromAction()),
actionCollection(), actionName); actionCollection(), actionName.ascii());
} }
sizeAction->setChecked(sizes[i] == m_fontSize); sizeAction->setChecked(sizes[i] == m_fontSize);
@ -3091,7 +3091,7 @@ void NotationView::setCurrentSelectedNote(const char *pixmapName,
void NotationView::setCurrentSelectedNote(const NoteActionData &noteAction) void NotationView::setCurrentSelectedNote(const NoteActionData &noteAction)
{ {
setCurrentSelectedNote(noteAction.pixmapName, setCurrentSelectedNote(noteAction.pixmapName.ascii(),
noteAction.rest, noteAction.rest,
noteAction.noteType, noteAction.noteType,
noteAction.dots); noteAction.dots);
@ -3969,7 +3969,7 @@ void NotationView::slotNoteAction()
void NotationView::slotLastNoteAction() void NotationView::slotLastNoteAction()
{ {
KAction *action = actionCollection()->action(m_lastNoteAction); KAction *action = actionCollection()->action(m_lastNoteAction.ascii());
if (!action) if (!action)
action = actionCollection()->action("crotchet"); action = actionCollection()->action("crotchet");
@ -3977,7 +3977,7 @@ void NotationView::slotLastNoteAction()
action->activate(); action->activate();
} else { } else {
std::cerr << "NotationView::slotNoteAction() : couldn't find action named '" std::cerr << "NotationView::slotNoteAction() : couldn't find action named '"
<< m_lastNoteAction << "' or 'crotchet'\n"; << m_lastNoteAction.ascii() << "' or 'crotchet'\n";
} }
} }
@ -4332,7 +4332,7 @@ NotationView::slotChangeSpacing(int spacing)
// m_spacingSlider->setSize(spacing); // m_spacingSlider->setSize(spacing);
KToggleAction *action = dynamic_cast<KToggleAction *> KToggleAction *action = dynamic_cast<KToggleAction *>
(actionCollection()->action(TQString("spacing_%1").tqarg(spacing))); (actionCollection()->action(TQString("spacing_%1").tqarg(spacing).ascii()));
if (action) if (action)
action->setChecked(true); action->setChecked(true);
else { else {
@ -4390,7 +4390,7 @@ NotationView::slotChangeProportion(int proportion)
// m_proportionSlider->setSize(proportion); // m_proportionSlider->setSize(proportion);
KToggleAction *action = dynamic_cast<KToggleAction *> KToggleAction *action = dynamic_cast<KToggleAction *>
(actionCollection()->action(TQString("proportion_%1").tqarg(proportion))); (actionCollection()->action(TQString("proportion_%1").tqarg(proportion).ascii()));
if (action) if (action)
action->setChecked(true); action->setChecked(true);
else { else {
@ -4544,7 +4544,7 @@ NotationView::slotChangeFont(std::string newName, int newSize)
if (thisOne) if (thisOne)
m_fontCombo->setCurrentItem(i); m_fontCombo->setCurrentItem(i);
KToggleAction *action = dynamic_cast<KToggleAction *> KToggleAction *action = dynamic_cast<KToggleAction *>
(actionCollection()->action("note_font_" + strtoqstr(f[i]))); (actionCollection()->action(TQString("note_font_" + strtoqstr(f[i])).ascii()));
NOTATION_DEBUG << "inspecting " << f[i] << (action ? ", have action" : ", no action") << endl; NOTATION_DEBUG << "inspecting " << f[i] << (action ? ", have action" : ", no action") << endl;
if (action) if (action)
action->setChecked(thisOne); action->setChecked(thisOne);
@ -4869,7 +4869,7 @@ void NotationView::slotEditGeneralPaste()
KMessageBox::detailedError KMessageBox::detailedError
(this, (this,
i18n("Couldn't paste at this point."), i18n("Couldn't paste at this point."),
i18n(RESTRICTED_PASTE_FAILED_DESCRIPTION)); i18n(RESTRICTED_PASTE_FAILED_DESCRIPTION.ascii()));
} else { } else {
addCommandToHistory(command); addCommandToHistory(command);
setCurrentSelection(new EventSelection setCurrentSelection(new EventSelection
@ -5146,7 +5146,7 @@ void NotationView::slotToggleTransportToolBar()
void NotationView::toggleNamedToolBar(const TQString& toolBarName, bool* force) void NotationView::toggleNamedToolBar(const TQString& toolBarName, bool* force)
{ {
KToolBar *namedToolBar = toolBar(toolBarName); KToolBar *namedToolBar = toolBar(toolBarName.ascii());
if (!namedToolBar) { if (!namedToolBar) {
NOTATION_DEBUG << "NotationView::toggleNamedToolBar() : toolBar " NOTATION_DEBUG << "NotationView::toggleNamedToolBar() : toolBar "
@ -5661,11 +5661,11 @@ void NotationView::slotSwitchFromRestToNote()
actionName = actionName.replace("-", "_"); actionName = actionName.replace("-", "_");
KRadioAction *action = dynamic_cast<KRadioAction *> KRadioAction *action = dynamic_cast<KRadioAction *>
(actionCollection()->action(actionName)); (actionCollection()->action(actionName.ascii()));
if (!action) { if (!action) {
std::cerr << "WARNING: Failed to find note action \"" std::cerr << "WARNING: Failed to find note action \""
<< actionName << "\"" << std::endl; << actionName.ascii() << "\"" << std::endl;
} else { } else {
action->activate(); action->activate();
} }
@ -5696,11 +5696,11 @@ void NotationView::slotSwitchFromNoteToRest()
actionName = actionName.replace("-", "_"); actionName = actionName.replace("-", "_");
KRadioAction *action = dynamic_cast<KRadioAction *> KRadioAction *action = dynamic_cast<KRadioAction *>
(actionCollection()->action(actionName)); (actionCollection()->action(actionName.ascii()));
if (!action) { if (!action) {
std::cerr << "WARNING: Failed to find rest action \"" std::cerr << "WARNING: Failed to find rest action \""
<< actionName << "\"" << std::endl; << actionName.ascii() << "\"" << std::endl;
} else { } else {
action->activate(); action->activate();
} }

@ -78,7 +78,7 @@ NoteFontFactory::getFontNames(bool forceRescan)
TQDir dir(mappingDir); TQDir dir(mappingDir);
if (!dir.exists()) { if (!dir.exists()) {
std::cerr << "NoteFontFactory::getFontNames: mapping directory \"" std::cerr << "NoteFontFactory::getFontNames: mapping directory \""
<< mappingDir << "\" not found" << std::endl; << mappingDir.ascii() << "\" not found" << std::endl;
return m_fontNames; return m_fontNames;
} }

@ -147,7 +147,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s; TQString s;
s = attributes.value("name"); s = attributes.value("name");
if (s) { if (!s.isNull()) {
m_name = qstrtostr(s); m_name = qstrtostr(s);
m_srcDirectory = m_name; m_srcDirectory = m_name;
} }
@ -157,28 +157,28 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s; TQString s;
s = attributes.value("origin"); s = attributes.value("origin");
if (s) if (!s.isNull())
m_origin = qstrtostr(s); m_origin = qstrtostr(s);
s = attributes.value("copyright"); s = attributes.value("copyright");
if (s) if (!s.isNull())
m_copyright = qstrtostr(s); m_copyright = qstrtostr(s);
s = attributes.value("mapped-by"); s = attributes.value("mapped-by");
if (s) if (!s.isNull())
m_mappedBy = qstrtostr(s); m_mappedBy = qstrtostr(s);
s = attributes.value("type"); s = attributes.value("type");
if (s) if (!s.isNull())
m_type = qstrtostr(s); m_type = qstrtostr(s);
s = attributes.value("autocrop"); s = attributes.value("autocrop");
if (s) { if (!s.isNull()) {
std::cerr << "Warning: autocrop attribute in note font mapping file is no longer supported\n(all fonts are now always autocropped)" << std::endl; std::cerr << "Warning: autocrop attribute in note font mapping file is no longer supported\n(all fonts are now always autocropped)" << std::endl;
} }
s = attributes.value("smooth"); s = attributes.value("smooth");
if (s) if (!s.isNull())
m_smooth = (s.lower() == "true"); m_smooth = (s.lower() == "true");
} else if (lcName == "font-sizes") { } else if (lcName == "font-sizes") {
@ -195,46 +195,46 @@ NoteFontMap::startElement(const TQString &, const TQString &,
SizeData &sizeData = m_sizes[noteHeight]; SizeData &sizeData = m_sizes[noteHeight];
s = attributes.value("staff-line-thickness"); s = attributes.value("staff-line-thickness");
if (s) if (!s.isNull())
sizeData.setStaffLineThickness(s.toInt()); sizeData.setStaffLineThickness(s.toInt());
s = attributes.value("leger-line-thickness"); s = attributes.value("leger-line-thickness");
if (s) if (!s.isNull())
sizeData.setLegerLineThickness(s.toInt()); sizeData.setLegerLineThickness(s.toInt());
s = attributes.value("stem-thickness"); s = attributes.value("stem-thickness");
if (s) if (!s.isNull())
sizeData.setStemThickness(s.toInt()); sizeData.setStemThickness(s.toInt());
s = attributes.value("beam-thickness"); s = attributes.value("beam-thickness");
if (s) if (!s.isNull())
sizeData.setBeamThickness(s.toInt()); sizeData.setBeamThickness(s.toInt());
s = attributes.value("stem-length"); s = attributes.value("stem-length");
if (s) if (!s.isNull())
sizeData.setStemLength(s.toInt()); sizeData.setStemLength(s.toInt());
s = attributes.value("flag-spacing"); s = attributes.value("flag-spacing");
if (s) if (!s.isNull())
sizeData.setFlagSpacing(s.toInt()); sizeData.setFlagSpacing(s.toInt());
s = attributes.value("border-x"); s = attributes.value("border-x");
if (s) { if (!s.isNull()) {
std::cerr << "Warning: border-x attribute in note font mapping file is no longer supported\n(use hotspot-x for note head or flag)" << std::endl; std::cerr << "Warning: border-x attribute in note font mapping file is no longer supported\n(use hotspot-x for note head or flag)" << std::endl;
} }
s = attributes.value("border-y"); s = attributes.value("border-y");
if (s) { if (!s.isNull()) {
std::cerr << "Warning: border-y attribute in note font mapping file is no longer supported" << std::endl; std::cerr << "Warning: border-y attribute in note font mapping file is no longer supported" << std::endl;
} }
int fontId = 0; int fontId = 0;
s = attributes.value("font-id"); s = attributes.value("font-id");
if (s) if (!s.isNull())
fontId = s.toInt(); fontId = s.toInt();
s = attributes.value("font-height"); s = attributes.value("font-height");
if (s) if (!s.isNull())
sizeData.setFontHeight(fontId, s.toInt()); sizeData.setFontHeight(fontId, s.toInt());
} else if (lcName == "font-scale") { } else if (lcName == "font-scale") {
@ -250,7 +250,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s; TQString s;
s = attributes.value("font-height"); s = attributes.value("font-height");
if (s) if (!s.isNull())
fontHeight = qstrtodouble(s); fontHeight = qstrtodouble(s);
else { else {
m_errorString = "font-height is a required attribute of font-scale"; m_errorString = "font-height is a required attribute of font-scale";
@ -258,32 +258,32 @@ NoteFontMap::startElement(const TQString &, const TQString &,
} }
s = attributes.value("staff-line-thickness"); s = attributes.value("staff-line-thickness");
if (s) if (!s.isNull())
staffLineThickness = qstrtodouble(s); staffLineThickness = qstrtodouble(s);
s = attributes.value("leger-line-thickness"); s = attributes.value("leger-line-thickness");
if (s) if (!s.isNull())
legerLineThickness = qstrtodouble(s); legerLineThickness = qstrtodouble(s);
s = attributes.value("stem-thickness"); s = attributes.value("stem-thickness");
if (s) if (!s.isNull())
stemThickness = qstrtodouble(s); stemThickness = qstrtodouble(s);
s = attributes.value("beam-thickness"); s = attributes.value("beam-thickness");
if (s) if (!s.isNull())
beamThickness = qstrtodouble(s); beamThickness = qstrtodouble(s);
s = attributes.value("stem-length"); s = attributes.value("stem-length");
if (s) if (!s.isNull())
stemLength = qstrtodouble(s); stemLength = qstrtodouble(s);
s = attributes.value("flag-spacing"); s = attributes.value("flag-spacing");
if (s) if (!s.isNull())
flagSpacing = qstrtodouble(s); flagSpacing = qstrtodouble(s);
int fontId = 0; int fontId = 0;
s = attributes.value("font-id"); s = attributes.value("font-id");
if (s) if (!s.isNull())
fontId = s.toInt(); fontId = s.toInt();
//!!! need to be able to calculate max size -- checkFont needs //!!! need to be able to calculate max size -- checkFont needs
@ -389,7 +389,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
int icode = -1; int icode = -1;
bool ok = false; bool ok = false;
if (code) { if (!code.isNull()) {
icode = code.stripWhiteSpace().toInt(&ok); icode = code.stripWhiteSpace().toInt(&ok);
if (!ok || icode < 0) { if (!ok || icode < 0) {
m_errorString = m_errorString =
@ -402,7 +402,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
int iglyph = -1; int iglyph = -1;
ok = false; ok = false;
if (glyph) { if (!glyph.isNull()) {
iglyph = glyph.stripWhiteSpace().toInt(&ok); iglyph = glyph.stripWhiteSpace().toInt(&ok);
if (!ok || iglyph < 0) { if (!ok || iglyph < 0) {
m_errorString = m_errorString =
@ -417,15 +417,15 @@ NoteFontMap::startElement(const TQString &, const TQString &,
m_errorString = "symbol must have either src, code, or glyph attribute"; m_errorString = "symbol must have either src, code, or glyph attribute";
return false; return false;
} }
if (src) if (!src.isNull())
symbolData.setSrc(qstrtostr(src)); symbolData.setSrc(qstrtostr(src));
TQString inversionSrc = attributes.value("inversion-src"); TQString inversionSrc = attributes.value("inversion-src");
if (inversionSrc) if (!inversionSrc.isNull())
symbolData.setInversionSrc(qstrtostr(inversionSrc)); symbolData.setInversionSrc(qstrtostr(inversionSrc));
TQString inversionCode = attributes.value("inversion-code"); TQString inversionCode = attributes.value("inversion-code");
if (inversionCode) { if (!inversionCode.isNull()) {
icode = inversionCode.stripWhiteSpace().toInt(&ok); icode = inversionCode.stripWhiteSpace().toInt(&ok);
if (!ok || icode < 0) { if (!ok || icode < 0) {
m_errorString = m_errorString =
@ -437,7 +437,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
} }
TQString inversionGlyph = attributes.value("inversion-glyph"); TQString inversionGlyph = attributes.value("inversion-glyph");
if (inversionGlyph) { if (!inversionGlyph.isNull()) {
iglyph = inversionGlyph.stripWhiteSpace().toInt(&ok); iglyph = inversionGlyph.stripWhiteSpace().toInt(&ok);
if (!ok || iglyph < 0) { if (!ok || iglyph < 0) {
m_errorString = m_errorString =
@ -449,7 +449,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
} }
TQString fontId = attributes.value("font-id"); TQString fontId = attributes.value("font-id");
if (fontId) { if (!fontId.isNull()) {
int n = fontId.stripWhiteSpace().toInt(&ok); int n = fontId.stripWhiteSpace().toInt(&ok);
if (!ok || n < 0) { if (!ok || n < 0) {
m_errorString = m_errorString =
@ -482,7 +482,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s = attributes.value("x"); TQString s = attributes.value("x");
double x = -1.0; double x = -1.0;
if (s) if (!s.isNull())
x = qstrtodouble(s); x = qstrtodouble(s);
s = attributes.value("y"); s = attributes.value("y");
@ -509,12 +509,12 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s = attributes.value("x"); TQString s = attributes.value("x");
int x = 0; int x = 0;
if (s) if (!s.isNull())
x = s.toInt(); x = s.toInt();
s = attributes.value("y"); s = attributes.value("y");
int y = 0; int y = 0;
if (s) if (!s.isNull())
y = s.toInt(); y = s.toInt();
HotspotDataMap::iterator i = m_hotspots.find(m_hotspotCharName); HotspotDataMap::iterator i = m_hotspots.find(m_hotspotCharName);
@ -541,7 +541,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
s = attributes.value("x"); s = attributes.value("x");
int x = 0; int x = 0;
if (s) if (!s.isNull())
x = s.toInt(); x = s.toInt();
s = attributes.value("y"); s = attributes.value("y");
@ -566,7 +566,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString id = attributes.value("font-id"); TQString id = attributes.value("font-id");
int n = -1; int n = -1;
bool ok = false; bool ok = false;
if (id) { if (!id.isNull()) {
n = id.stripWhiteSpace().toInt(&ok); n = id.stripWhiteSpace().toInt(&ok);
if (!ok) { if (!ok) {
m_errorString = m_errorString =
@ -582,8 +582,8 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString name = attributes.value("name"); TQString name = attributes.value("name");
TQString names = attributes.value("names"); TQString names = attributes.value("names");
if (name) { if (!name.isNull()) {
if (names) { if (!names.isNull()) {
m_errorString = "font-requirement may have name or names attribute, but not both"; m_errorString = "font-requirement may have name or names attribute, but not both";
return false; return false;
} }
@ -595,11 +595,11 @@ NoteFontMap::startElement(const TQString &, const TQString &,
m_systemFontNames[n] = name; m_systemFontNames[n] = name;
delete font; delete font;
} else { } else {
std::cerr << TQString("Warning: Unable to load font \"%1\"").tqarg(name) << std::endl; std::cerr << TQString("Warning: Unable to load font \"%1\"").tqarg(name).ascii() << std::endl;
m_ok = false; m_ok = false;
} }
} else if (names) { } else if (!names.isNull()) {
bool have = false; bool have = false;
TQStringList list = TQStringList::split(",", names, false); TQStringList list = TQStringList::split(",", names, false);
@ -615,7 +615,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
} }
if (!have) { if (!have) {
std::cerr << TQString("Warning: Unable to load any of the fonts in \"%1\""). std::cerr << TQString("Warning: Unable to load any of the fonts in \"%1\"").
tqarg(names) << std::endl; tqarg(names).ascii() << std::endl;
m_ok = false; m_ok = false;
} }
@ -627,7 +627,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s = attributes.value("strategy").lower(); TQString s = attributes.value("strategy").lower();
SystemFont::Strategy strategy = SystemFont::PreferGlyphs; SystemFont::Strategy strategy = SystemFont::PreferGlyphs;
if (s) { if (!s.isNull()) {
if (s == "prefer-glyphs") if (s == "prefer-glyphs")
strategy = SystemFont::PreferGlyphs; strategy = SystemFont::PreferGlyphs;
else if (s == "prefer-codes") else if (s == "prefer-codes")
@ -637,7 +637,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
else if (s == "only-codes") else if (s == "only-codes")
strategy = SystemFont::OnlyCodes; strategy = SystemFont::OnlyCodes;
else { else {
std::cerr << "Warning: Unknown strategy value " << s std::cerr << "Warning: Unknown strategy value " << s.ascii()
<< " (known values are prefer-glyphs, prefer-codes," << " (known values are prefer-glyphs, prefer-codes,"
<< " only-glyphs, only-codes)" << std::endl; << " only-glyphs, only-codes)" << std::endl;
} }
@ -725,11 +725,11 @@ NoteFontMap::checkFile(int size, std::string &src) const
if (!pixmapFileLowerInfo.isReadable()) { if (!pixmapFileLowerInfo.isReadable()) {
if (pixmapFileMixedName != pixmapFileLowerName) { if (pixmapFileMixedName != pixmapFileLowerName) {
std::cerr << "Warning: Unable to open pixmap file " std::cerr << "Warning: Unable to open pixmap file "
<< pixmapFileMixedName << " or " << pixmapFileLowerName << pixmapFileMixedName.ascii() << " or " << pixmapFileLowerName.ascii()
<< std::endl; << std::endl;
} else { } else {
std::cerr << "Warning: Unable to open pixmap file " std::cerr << "Warning: Unable to open pixmap file "
<< pixmapFileMixedName << std::endl; << pixmapFileMixedName.ascii() << std::endl;
} }
return false; return false;
} else { } else {

@ -662,9 +662,9 @@ void NoteInserter::slotToggleDot()
Note note(m_noteType, m_noteDots); Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note)); TQString actionName(NotationStrings::getReferenceName(note));
actionName.replace(TQRegExp("-"), "_"); actionName.replace(TQRegExp("-"), "_");
KAction *action = m_parentView->actionCollection()->action(actionName); KAction *action = m_parentView->actionCollection()->action(actionName.ascii());
if (!action) { if (!action) {
std::cerr << "WARNING: No such action as " << actionName << std::endl; std::cerr << "WARNING: No such action as " << actionName.ascii() << std::endl;
} else { } else {
action->activate(); action->activate();
} }
@ -690,9 +690,9 @@ void NoteInserter::slotRestsSelected()
Note note(m_noteType, m_noteDots); Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note, true)); TQString actionName(NotationStrings::getReferenceName(note, true));
actionName.replace(TQRegExp("-"), "_"); actionName.replace(TQRegExp("-"), "_");
KAction *action = m_parentView->actionCollection()->action(actionName); KAction *action = m_parentView->actionCollection()->action(actionName.ascii());
if (!action) { if (!action) {
std::cerr << "WARNING: No such action as " << actionName << std::endl; std::cerr << "WARNING: No such action as " << actionName.ascii() << std::endl;
} else { } else {
action->activate(); action->activate();
} }

@ -193,7 +193,7 @@ NotePixmapFactory::init(std::string fontName, int size)
m_style = NoteStyleFactory::getStyle(NoteStyleFactory::DefaultStyle); m_style = NoteStyleFactory::getStyle(NoteStyleFactory::DefaultStyle);
} catch (NoteStyleFactory::StyleUnavailable u) { } catch (NoteStyleFactory::StyleUnavailable u) {
KStartupLogo::hideIfStillThere(); KStartupLogo::hideIfStillThere();
KMessageBox::error(0, i18n(strtoqstr(u.getMessage()))); KMessageBox::error(0, i18n(strtoqstr(u.getMessage()).ascii()));
throw; throw;
} }
@ -1969,7 +1969,7 @@ NotePixmapFactory::makeNoteMenuPixmap(timeT duration,
if (triplet) if (triplet)
noteName = "3-" + noteName; noteName = "3-" + noteName;
noteName = "menu-" + noteName; noteName = "menu-" + noteName;
return makeToolbarPixmap(noteName); return makeToolbarPixmap(noteName.ascii());
} }
TQCanvasPixmap * TQCanvasPixmap *

@ -52,7 +52,7 @@ NoteStyleFactory::getAvailableStyleNames()
TQString styleDir = KGlobal::dirs()->findResource("appdata", "styles/"); TQString styleDir = KGlobal::dirs()->findResource("appdata", "styles/");
TQDir dir(styleDir); TQDir dir(styleDir);
if (!dir.exists()) { if (!dir.exists()) {
std::cerr << "NoteStyle::getAvailableStyleNames: directory \"" << styleDir std::cerr << "NoteStyle::getAvailableStyleNames: directory \"" << styleDir.ascii()
<< "\" not found" << std::endl; << "\" not found" << std::endl;
return names; return names;
} }

@ -81,7 +81,7 @@ NoteStyleFileReader::startElement(const TQString &, const TQString &,
if (lcName == "rosegarden-note-style") { if (lcName == "rosegarden-note-style") {
TQString s = attributes.value("base-style"); TQString s = attributes.value("base-style");
if (s) m_style->setBaseStyle(qstrtostr(s)); if (!s.isNull()) m_style->setBaseStyle(qstrtostr(s));
} else if (lcName == "note") { } else if (lcName == "note") {
@ -126,13 +126,13 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
bool haveShape = false; bool haveShape = false;
s = attributes.value("tqshape"); s = attributes.value("tqshape");
if (s) { if (!s.isNull()) {
m_style->setShape(type, qstrtostr(s.lower())); m_style->setShape(type, qstrtostr(s.lower()));
haveShape = true; haveShape = true;
} }
s = attributes.value("charname"); s = attributes.value("charname");
if (s) { if (!s.isNull()) {
if (haveShape) { if (haveShape) {
m_errorString = i18n("global and note elements may have tqshape " m_errorString = i18n("global and note elements may have tqshape "
"or charname attribute, but not both"); "or charname attribute, but not both");
@ -143,16 +143,16 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
} }
s = attributes.value("filled"); s = attributes.value("filled");
if (s) m_style->setFilled(type, s.lower() == "true"); if (!s.isNull()) m_style->setFilled(type, s.lower() == "true");
s = attributes.value("stem"); s = attributes.value("stem");
if (s) m_style->setStem(type, s.lower() == "true"); if (!s.isNull()) m_style->setStem(type, s.lower() == "true");
s = attributes.value("flags"); s = attributes.value("flags");
if (s) m_style->setFlagCount(type, s.toInt()); if (!s.isNull()) m_style->setFlagCount(type, s.toInt());
s = attributes.value("slashes"); s = attributes.value("slashes");
if (s) m_style->setSlashCount(type, s.toInt()); if (!s.isNull()) m_style->setSlashCount(type, s.toInt());
NoteStyle::HFixPoint hfix; NoteStyle::HFixPoint hfix;
NoteStyle::VFixPoint vfix; NoteStyle::VFixPoint vfix;
@ -161,7 +161,7 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
bool haveVFix = false; bool haveVFix = false;
s = attributes.value("hfixpoint"); s = attributes.value("hfixpoint");
if (s) { if (!s.isNull()) {
s = s.lower(); s = s.lower();
haveHFix = true; haveHFix = true;
if (s == "normal") hfix = NoteStyle::Normal; if (s == "normal") hfix = NoteStyle::Normal;
@ -171,7 +171,7 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
} }
s = attributes.value("vfixpoint"); s = attributes.value("vfixpoint");
if (s) { if (!s.isNull()) {
s = s.lower(); s = s.lower();
haveVFix = true; haveVFix = true;
if (s == "near") vfix = NoteStyle::Near; if (s == "near") vfix = NoteStyle::Near;

@ -128,9 +128,9 @@ void RestInserter::slotToggleDot()
Note note(m_noteType, m_noteDots); Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note, true)); TQString actionName(NotationStrings::getReferenceName(note, true));
actionName.replace(TQRegExp("-"), "_"); actionName.replace(TQRegExp("-"), "_");
KAction *action = m_parentView->actionCollection()->action(actionName); KAction *action = m_parentView->actionCollection()->action(actionName.ascii());
if (!action) { if (!action) {
std::cerr << "WARNING: No such action as " << actionName << std::endl; std::cerr << "WARNING: No such action as " << actionName.ascii() << std::endl;
} else { } else {
action->activate(); action->activate();
} }
@ -141,7 +141,7 @@ void RestInserter::slotNotesSelected()
Note note(m_noteType, m_noteDots); Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note)); TQString actionName(NotationStrings::getReferenceName(note));
actionName.replace(TQRegExp(" "), "_"); actionName.replace(TQRegExp(" "), "_");
m_parentView->actionCollection()->action(actionName)->activate(); m_parentView->actionCollection()->action(actionName.ascii())->activate();
} }
const TQString RestInserter::ToolName = "restinserter"; const TQString RestInserter::ToolName = "restinserter";

@ -143,7 +143,7 @@ PlayList::slotDropped(TQDropEvent *event, TQListViewItem* after)
// okay, we have a URI.. process it // okay, we have a URI.. process it
// weed out non-rg files // weed out non-rg files
// //
for (TQString url = uri.first(); url; url = uri.next()) { for (TQString url = uri.first(); !url.isNull(); url = uri.next()) {
if (url.right(3).lower() == ".rg") if (url.right(3).lower() == ".rg")
new PlayListViewItem(m_listView, after, KURL(url)); new PlayListViewItem(m_listView, after, KURL(url));

@ -26,6 +26,8 @@
#ifndef _RG_AUDIOPREVIEWUPDATER_H_ #ifndef _RG_AUDIOPREVIEWUPDATER_H_
#define _RG_AUDIOPREVIEWUPDATER_H_ #define _RG_AUDIOPREVIEWUPDATER_H_
#include <stdint.h>
#include <tqobject.h> #include <tqobject.h>
#include <tqrect.h> #include <tqrect.h>
#include <vector> #include <vector>

@ -55,7 +55,7 @@ const Rosegarden::Clef clefIndexToClef(int index)
const int clefNameToClefIndex(TQString s) const int clefNameToClefIndex(TQString s)
{ {
int m_elClef = 0; int m_elClef = 0;
if (s) { if (!s.isNull()) {
if (s == "treble") if (s == "treble")
m_elClef = TrebleClef; m_elClef = TrebleClef;
else if (s == "bass") else if (s == "bass")
@ -97,4 +97,4 @@ const int clefNameToClefIndex(TQString s)
return m_elClef; return m_elClef;
} }
} }

@ -1117,7 +1117,7 @@ EditView::createInsertPitchActionMenu()
(flat.tqarg(notePitchNames[i]), (flat.tqarg(notePitchNames[i]),
CTRL + SHIFT + notePitchKeys[octave][i], CTRL + SHIFT + notePitchKeys[octave][i],
TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(),
TQString("insert_%1_flat%2").tqarg(i).tqarg(octaveSuffix)); TQString("insert_%1_flat%2").tqarg(i).tqarg(octaveSuffix).ascii());
menu->insert(insertPitchAction); menu->insert(insertPitchAction);
} }
@ -1127,7 +1127,7 @@ EditView::createInsertPitchActionMenu()
(notePitchNames[i], (notePitchNames[i],
notePitchKeys[octave][i], notePitchKeys[octave][i],
TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(),
TQString("insert_%1%2").tqarg(i).tqarg(octaveSuffix)); TQString("insert_%1%2").tqarg(i).tqarg(octaveSuffix).ascii());
menu->insert(insertPitchAction); menu->insert(insertPitchAction);
@ -1140,7 +1140,7 @@ EditView::createInsertPitchActionMenu()
(sharp.tqarg(notePitchNames[i]), (sharp.tqarg(notePitchNames[i]),
SHIFT + notePitchKeys[octave][i], SHIFT + notePitchKeys[octave][i],
TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(),
TQString("insert_%1_sharp%2").tqarg(i).tqarg(octaveSuffix)); TQString("insert_%1_sharp%2").tqarg(i).tqarg(octaveSuffix).ascii());
menu->insert(insertPitchAction); menu->insert(insertPitchAction);
} }

@ -704,7 +704,7 @@ MultiViewCommandHistory* EditViewBase::getCommandHistory()
KToggleAction* EditViewBase::getToggleAction(const TQString& actionName) KToggleAction* EditViewBase::getToggleAction(const TQString& actionName)
{ {
return dynamic_cast<KToggleAction*>(actionCollection()->action(actionName)); return dynamic_cast<KToggleAction*>(actionCollection()->action(actionName.ascii()));
} }
} }

@ -129,7 +129,7 @@ PresetGroup::startElement(const TQString &, const TQString &,
if (lcName == "category") { if (lcName == "category") {
TQString s = attributes.value("name"); TQString s = attributes.value("name");
if (s) { if (!s.isNull()) {
m_elCategoryName = s; m_elCategoryName = s;
// increment the current category number // increment the current category number
m_lastCategory = m_currentCategory; m_lastCategory = m_currentCategory;
@ -151,7 +151,7 @@ PresetGroup::startElement(const TQString &, const TQString &,
} else if (lcName == "instrument") { } else if (lcName == "instrument") {
TQString s = attributes.value("name"); TQString s = attributes.value("name");
if (s) { if (!s.isNull()) {
m_elInstrumentName = s; m_elInstrumentName = s;
m_name = true; m_name = true;
@ -162,13 +162,13 @@ PresetGroup::startElement(const TQString &, const TQString &,
} else if (lcName == "clef") { } else if (lcName == "clef") {
TQString s = attributes.value("type"); TQString s = attributes.value("type");
if (s) { if (!s.isNull()) {
m_elClef = clefNameToClefIndex(s); m_elClef = clefNameToClefIndex(s);
m_clef = true; m_clef = true;
} }
} else if (lcName == "transpose") { } else if (lcName == "transpose") {
TQString s = attributes.value("value"); TQString s = attributes.value("value");
if (s) { if (!s.isNull()) {
m_elTranspose = s.toInt(); m_elTranspose = s.toInt();
m_transpose = true; m_transpose = true;
} }
@ -178,13 +178,13 @@ PresetGroup::startElement(const TQString &, const TQString &,
if (s == "amateur") { if (s == "amateur") {
s = attributes.value("low"); s = attributes.value("low");
if (s) { if (!s.isNull()) {
m_elLowAm = s.toInt(); m_elLowAm = s.toInt();
m_amateur = true; m_amateur = true;
} }
s = attributes.value("high"); s = attributes.value("high");
if (s && m_amateur) { if (!s.isNull() && m_amateur) {
m_elHighAm = s.toInt(); m_elHighAm = s.toInt();
} else { } else {
return false; return false;
@ -192,13 +192,13 @@ PresetGroup::startElement(const TQString &, const TQString &,
} else if (s == "professional") { } else if (s == "professional") {
s = attributes.value("low"); s = attributes.value("low");
if (s) { if (!s.isNull()) {
m_pro = true; m_pro = true;
m_elLowPro = s.toInt(); m_elLowPro = s.toInt();
} }
s = attributes.value("high"); s = attributes.value("high");
if (s && m_pro) { if (!s.isNull() && m_pro) {
m_elHighPro = s.toInt(); m_elHighPro = s.toInt();
} else { } else {
return false; return false;

@ -82,13 +82,13 @@ QCanvasSimpleSprite::~QCanvasSimpleSprite()
TQCanvasPixmapArray* TQCanvasPixmapArray*
QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap) QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap)
{ {
TQList<TQPixmap> pixlist; TQPtrList<TQPixmap> pixlist;
pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its
// own copies of the pixmaps, so we // own copies of the pixmaps, so we
// can delete the one we're passed // can delete the one we're passed
pixlist.append(pixmap); pixlist.append(pixmap);
TQList<TQPoint> spotlist; TQPtrList<TQPoint> spotlist;
spotlist.setAutoDelete(true); spotlist.setAutoDelete(true);
spotlist.append(new TQPoint(0, 0)); spotlist.append(new TQPoint(0, 0));
@ -98,13 +98,13 @@ QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap)
TQCanvasPixmapArray* TQCanvasPixmapArray*
QCanvasSimpleSprite::makePixmapArray(TQCanvasPixmap *pixmap) QCanvasSimpleSprite::makePixmapArray(TQCanvasPixmap *pixmap)
{ {
TQList<TQPixmap> pixlist; TQPtrList<TQPixmap> pixlist;
pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its
// own copies of the pixmaps, so we // own copies of the pixmaps, so we
// can delete the one we're passed // can delete the one we're passed
pixlist.append(pixmap); pixlist.append(pixmap);
TQList<TQPoint> spotlist; TQPtrList<TQPoint> spotlist;
spotlist.setAutoDelete(true); spotlist.setAutoDelete(true);
spotlist.append(new TQPoint(pixmap->offsetX(), pixmap->offsetY())); spotlist.append(new TQPoint(pixmap->offsetX(), pixmap->offsetY()));

@ -204,14 +204,14 @@ void ControlBlockMmapper::setFileSize(size_t size)
// (seek() to wanted size, then write a byte) // (seek() to wanted size, then write a byte)
// //
if (::lseek(m_fd, size - 1, SEEK_SET) == -1) { if (::lseek(m_fd, size - 1, SEEK_SET) == -1) {
std::cerr << "WARNING: ControlBlockMmapper : Couldn't lseek in " << m_fileName std::cerr << "WARNING: ControlBlockMmapper : Couldn't lseek in " << m_fileName.ascii()
<< " to " << size << std::endl; << " to " << size << std::endl;
throw Exception("lseek failed"); throw Exception("lseek failed");
} }
if (::write(m_fd, "\0", 1) != 1) { if (::write(m_fd, "\0", 1) != 1) {
std::cerr << "WARNING: ControlBlockMmapper : Couldn't write byte in " std::cerr << "WARNING: ControlBlockMmapper : Couldn't write byte in "
<< m_fileName << std::endl; << m_fileName.ascii() << std::endl;
throw Exception("write failed"); throw Exception("write failed");
} }

@ -186,13 +186,13 @@ void SegmentMmapper::setFileSize(size_t size)
// //
if (::lseek(m_fd, size - 1, SEEK_SET) == -1) { if (::lseek(m_fd, size - 1, SEEK_SET) == -1) {
std::cerr << "WARNING: SegmentMmapper : Couldn't lseek in " std::cerr << "WARNING: SegmentMmapper : Couldn't lseek in "
<< m_fileName << " to " << size << std::endl; << m_fileName.ascii() << " to " << size << std::endl;
throw Exception("lseek failed"); throw Exception("lseek failed");
} }
if (::write(m_fd, "\0", 1) != 1) { if (::write(m_fd, "\0", 1) != 1) {
std::cerr << "WARNING: SegmentMmapper : Couldn't write byte in " std::cerr << "WARNING: SegmentMmapper : Couldn't write byte in "
<< m_fileName << std::endl; << m_fileName.ascii() << std::endl;
throw Exception("write failed"); throw Exception("write failed");
} }

@ -1124,7 +1124,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC,
// the error you can't hear // the error you can't hear
KMessageBox::information(0, message); KMessageBox::information(0, message);
} else { } else {
std::cerr << message << std::endl; std::cerr << message.ascii() << std::endl;
} }
#endif #endif
@ -1421,7 +1421,7 @@ void
SequenceManager::sendAudioLevel(MappedEvent *mE) SequenceManager::sendAudioLevel(MappedEvent *mE)
{ {
RosegardenGUIView *v; RosegardenGUIView *v;
TQList<RosegardenGUIView>& viewList = m_doc->getViewList(); TQPtrList<RosegardenGUIView>& viewList = m_doc->getViewList();
for (v = viewList.first(); v != 0; v = viewList.next()) { for (v = viewList.first(); v != 0; v = viewList.next()) {
v->showVisuals(mE); v->showVisuals(mE);
@ -1482,7 +1482,7 @@ void
SequenceManager::sendMIDIRecordingDevice(const TQString recordDeviceStr) SequenceManager::sendMIDIRecordingDevice(const TQString recordDeviceStr)
{ {
if (recordDeviceStr) { if (!recordDeviceStr.isNull()) {
int recordDevice = recordDeviceStr.toInt(); int recordDevice = recordDeviceStr.toInt();
if (recordDevice >= 0) { if (recordDevice >= 0) {

@ -184,7 +184,7 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent,
new KRadioAction(i18n("1 Input", "%n Inputs", i), new KRadioAction(i18n("1 Input", "%n Inputs", i),
0, TQT_TQOBJECT(this), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotSetInputCountFromAction()), actionCollection(), TQT_SLOT(slotSetInputCountFromAction()), actionCollection(),
TQString("inputs_%1").tqarg(i)); TQString("inputs_%1").tqarg(i).ascii());
action->setExclusiveGroup("inputs"); action->setExclusiveGroup("inputs");
if (i == int(m_studio->getRecordIns().size())) if (i == int(m_studio->getRecordIns().size()))
action->setChecked(true); action->setChecked(true);
@ -194,7 +194,7 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent,
(i18n("No Submasters"), (i18n("No Submasters"),
0, TQT_TQOBJECT(this), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(), TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(),
TQString("submasters_0")); TQString("submasters_0").ascii());
action->setExclusiveGroup("submasters"); action->setExclusiveGroup("submasters");
action->setChecked(true); action->setChecked(true);
@ -203,7 +203,7 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent,
(i18n("1 Submaster", "%n Submasters", i), (i18n("1 Submaster", "%n Submasters", i),
0, TQT_TQOBJECT(this), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(), TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(),
TQString("submasters_%1").tqarg(i)); TQString("submasters_%1").tqarg(i).ascii());
action->setExclusiveGroup("submasters"); action->setExclusiveGroup("submasters");
if (i == int(m_studio->getBusses().size()) - 1) if (i == int(m_studio->getBusses().size()) - 1)
action->setChecked(true); action->setChecked(true);

@ -164,13 +164,13 @@ AudioPluginOSCGUI::setGUIUrl(TQString url)
if (m_address) if (m_address)
lo_address_free(m_address); lo_address_free(m_address);
char *host = lo_url_get_hostname(url); char *host = lo_url_get_hostname(url.ascii());
char *port = lo_url_get_port(url); char *port = lo_url_get_port(url.ascii());
m_address = lo_address_new(host, port); m_address = lo_address_new(host, port);
free(host); free(host);
free(port); free(port);
m_basePath = lo_url_get_path(url); m_basePath = lo_url_get_path(url.ascii());
} }
void void
@ -181,7 +181,7 @@ AudioPluginOSCGUI::show()
if (!m_address) if (!m_address)
return ; return ;
TQString path = m_basePath + "/show"; TQString path = m_basePath + "/show";
lo_send(m_address, path, ""); lo_send(m_address, path.ascii(), "");
} }
void void
@ -190,7 +190,7 @@ AudioPluginOSCGUI::hide()
if (!m_address) if (!m_address)
return ; return ;
TQString path = m_basePath + "/hide"; TQString path = m_basePath + "/hide";
lo_send(m_address, path, ""); lo_send(m_address, path.ascii(), "");
} }
void void
@ -199,7 +199,7 @@ AudioPluginOSCGUI::quit()
if (!m_address) if (!m_address)
return ; return ;
TQString path = m_basePath + "/quit"; TQString path = m_basePath + "/quit";
lo_send(m_address, path, ""); lo_send(m_address, path.ascii(), "");
} }
void void
@ -208,7 +208,7 @@ AudioPluginOSCGUI::sendProgram(int bank, int program)
if (!m_address) if (!m_address)
return ; return ;
TQString path = m_basePath + "/program"; TQString path = m_basePath + "/program";
lo_send(m_address, path, "ii", bank, program); lo_send(m_address, path.ascii(), "ii", bank, program);
} }
void void
@ -217,7 +217,7 @@ AudioPluginOSCGUI::sendPortValue(int port, float value)
if (!m_address) if (!m_address)
return ; return ;
TQString path = m_basePath + "/control"; TQString path = m_basePath + "/control";
lo_send(m_address, path, "if", port, value); lo_send(m_address, path.ascii(), "if", port, value);
} }
void void
@ -226,7 +226,7 @@ AudioPluginOSCGUI::sendConfiguration(TQString key, TQString value)
if (!m_address) if (!m_address)
return ; return ;
TQString path = m_basePath + "/configure"; TQString path = m_basePath + "/configure";
lo_send(m_address, path, "ss", key.data(), value.data()); lo_send(m_address, path.ascii(), "ss", key.ascii(), value.ascii());
} }
} }

@ -146,7 +146,7 @@ AudioPluginOSCGUIManager::hasGUI(InstrumentId instrument, int position)
try { try {
TQString filePath = AudioPluginOSCGUI::getGUIFilePath TQString filePath = AudioPluginOSCGUI::getGUIFilePath
(strtoqstr(pluginInstance->getIdentifier())); (strtoqstr(pluginInstance->getIdentifier()));
return (filePath && filePath != ""); return (!filePath.isNull() && filePath != "");
} catch (Exception e) { // that's OK } catch (Exception e) { // that's OK
return false; return false;
} }

@ -343,7 +343,7 @@ DeviceEditorDialog::getDeviceIdAt(int row) // -1 for new device w/o an id yet
TQString number = re.cap(1); TQString number = re.cap(1);
int id = -1; int id = -1;
if (number && number != "") if (!number.isNull() && number != "")
{ {
id = number.toInt() - 1; // displayed device numbers are 1-based id = number.toInt() - 1; // displayed device numbers are 1-based
} }

@ -118,7 +118,7 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor,
if (showEntryButtons) { if (showEntryButtons) {
TQPushButton *button = new TQPushButton("", numBox, numberText); TQPushButton *button = new TQPushButton("", numBox, numberText.ascii());
button->setMaximumWidth(40); button->setMaximumWidth(40);
button->setMaximumHeight(20); button->setMaximumHeight(20);
button->setFlat(true); button->setFlat(true);
@ -127,7 +127,7 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor,
m_entryButtons.push_back(button); m_entryButtons.push_back(button);
} }
KLineEdit* lineEdit = new KLineEdit(numBox, numberText); KLineEdit* lineEdit = new KLineEdit(numBox, numberText.ascii());
lineEdit->setMinimumWidth(110); lineEdit->setMinimumWidth(110);
lineEdit->setCompletionMode(KGlobalSettings::CompletionAuto); lineEdit->setCompletionMode(KGlobalSettings::CompletionAuto);
lineEdit->setCompletionObject(&m_completion); lineEdit->setCompletionObject(&m_completion);

@ -42,7 +42,7 @@ TQString HSpinBox::mapValueToText(int j)
int HSpinBox::mapTextToValue( bool* ok ) int HSpinBox::mapTextToValue( bool* ok )
{ {
*ok = true; *ok = true;
float f = atof(text()); float f = atof(text().ascii());
return int(f * m_scaleFactor); return int(f * m_scaleFactor);
} }

@ -64,12 +64,12 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
(BasicQuantizer::getStandardQuantizations()) (BasicQuantizer::getStandardQuantizations())
{ {
m_mainLayout = new TQGridLayout(this, m_mainLayout = new TQGridLayout(this,
preamble ? 3 : 4, 2, (!preamble.isNull()) ? 3 : 4, 2,
preamble ? 10 : 0, (!preamble.isNull()) ? 10 : 0,
preamble ? 5 : 4); (!preamble.isNull()) ? 5 : 4);
int zero = 0; int zero = 0;
if (preamble) { if (!preamble.isNull()) {
TQLabel *label = new TQLabel(preamble, this); TQLabel *label = new TQLabel(preamble, this);
label->tqsetAlignment(TQt::WordBreak); label->tqsetAlignment(TQt::WordBreak);
m_mainLayout->addMultiCellWidget(label, 0, 0, 0, 1); m_mainLayout->addMultiCellWidget(label, 0, 0, 0, 1);
@ -168,7 +168,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
m_postProcessingBox = new TQGroupBox m_postProcessingBox = new TQGroupBox
(1, Qt::Horizontal, i18n("After quantization"), this); (1, Qt::Horizontal, i18n("After quantization"), this);
if (preamble) { if (!preamble.isNull()) {
m_mainLayout->addMultiCellWidget(m_postProcessingBox, m_mainLayout->addMultiCellWidget(m_postProcessingBox,
zero, zero + 1, zero, zero + 1,
1, 1); 1, 1);
@ -217,7 +217,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
int defaultSwing = 0; int defaultSwing = 0;
int defaultIterate = 100; int defaultIterate = 100;
if (m_configCategory) { if (!m_configCategory.isNull()) {
KConfig *config = kapp->config(); KConfig *config = kapp->config();
config->setGroup(m_configCategory); config->setGroup(m_configCategory);
defaultType = defaultType =
@ -267,7 +267,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
advanced = false; advanced = false;
} }
if (preamble || advanced) { if (!preamble.isNull() || advanced) {
m_postProcessingBox->show(); m_postProcessingBox->show();
} else { } else {
m_postProcessingBox->hide(); m_postProcessingBox->hide();
@ -412,7 +412,7 @@ QuantizeParameters::getQuantizer() const
quantizer = nq; quantizer = nq;
} }
if (m_configCategory) { if (!m_configCategory.isNull()) {
KConfig *config = kapp->config(); KConfig *config = kapp->config();
config->setGroup(m_configCategory); config->setGroup(m_configCategory);
config->writeEntry("quantizetype", type); config->writeEntry("quantizetype", type);

@ -454,7 +454,7 @@ AudioFileManager::getFileInPath(const std::string &file)
return searchFile.latin1(); return searchFile.latin1();
std::cout << "AudioFileManager::getFileInPath - " std::cout << "AudioFileManager::getFileInPath - "
<< "searchInfo = " << searchFile << std::endl; << "searchInfo = " << searchFile.ascii() << std::endl;
return ""; return "";
} }
@ -655,7 +655,7 @@ AudioFileManager::importURL(const KURL &url, int sampleRate)
{ {
if (url.isLocalFile()) return importFile(url.path().ascii(), sampleRate); if (url.isLocalFile()) return importFile(url.path().ascii(), sampleRate);
std::cerr << "AudioFileManager::importURL("<< url.prettyURL() << ", " << sampleRate << ")" << std::endl; std::cerr << "AudioFileManager::importURL("<< url.prettyURL().ascii() << ", " << sampleRate << ")" << std::endl;
emit setOperationName(i18n("Downloading file %1").tqarg(url.prettyURL())); emit setOperationName(i18n("Downloading file %1").tqarg(url.prettyURL()));

@ -913,7 +913,7 @@ AudioInstrumentMixer::setPlugin(InstrumentId id, int position, TQString identifi
{ {
// Not RT safe // Not RT safe
std::cerr << "AudioInstrumentMixer::setPlugin(" << id << ", " << position << ", " << identifier << ")" << std::endl; std::cerr << "AudioInstrumentMixer::setPlugin(" << id << ", " << position << ", " << identifier.ascii() << ")" << std::endl;
int channels = 2; int channels = 2;
if (m_bufferMap.find(id) != m_bufferMap.end()) { if (m_bufferMap.find(id) != m_bufferMap.end()) {
@ -938,7 +938,7 @@ AudioInstrumentMixer::setPlugin(InstrumentId id, int position, TQString identifi
} }
} else { } else {
std::cerr << "AudioInstrumentMixer::setPlugin: No factory for identifier " std::cerr << "AudioInstrumentMixer::setPlugin: No factory for identifier "
<< identifier << std::endl; << identifier.ascii() << std::endl;
} }
RunnablePluginInstance *oldInstance = 0; RunnablePluginInstance *oldInstance = 0;

@ -193,7 +193,7 @@ DSSIPluginFactory::getDSSIDescriptor(TQString identifier)
if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
loadLibrary(soname); loadLibrary(soname);
if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: loadLibrary failed for " << soname << std::endl; std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: loadLibrary failed for " << soname.ascii() << std::endl;
return 0; return 0;
} }
} }
@ -204,7 +204,7 @@ DSSIPluginFactory::getDSSIDescriptor(TQString identifier)
dlsym(libraryHandle, "dssi_descriptor"); dlsym(libraryHandle, "dssi_descriptor");
if (!fn) { if (!fn) {
std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No descriptor function in library " << soname << std::endl; std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No descriptor function in library " << soname.ascii() << std::endl;
return 0; return 0;
} }
@ -217,7 +217,7 @@ DSSIPluginFactory::getDSSIDescriptor(TQString identifier)
++index; ++index;
} }
std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No such plugin as " << label << " in library " << soname << std::endl; std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No such plugin as " << label.ascii() << " in library " << soname.ascii() << std::endl;
return 0; return 0;
} }
@ -300,7 +300,7 @@ DSSIPluginFactory::discoverPlugins(TQString soName)
if (!libraryHandle) { if (!libraryHandle) {
std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: couldn't dlopen " std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: couldn't dlopen "
<< soName << " - " << dlerror() << std::endl; << soName.ascii() << " - " << dlerror() << std::endl;
return ; return ;
} }
@ -308,7 +308,7 @@ DSSIPluginFactory::discoverPlugins(TQString soName)
dlsym(libraryHandle, "dssi_descriptor"); dlsym(libraryHandle, "dssi_descriptor");
if (!fn) { if (!fn) {
std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No descriptor function in " << soName << std::endl; std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No descriptor function in " << soName.ascii() << std::endl;
return ; return ;
} }
@ -319,7 +319,7 @@ DSSIPluginFactory::discoverPlugins(TQString soName)
const LADSPA_Descriptor * ladspaDescriptor = descriptor->LADSPA_Plugin; const LADSPA_Descriptor * ladspaDescriptor = descriptor->LADSPA_Plugin;
if (!ladspaDescriptor) { if (!ladspaDescriptor) {
std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soName << std::endl; std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soName.ascii() << std::endl;
++index; ++index;
continue; continue;
} }

@ -622,7 +622,7 @@ DSSIPluginInstance::activate()
} }
} }
if (m_program) { if (!m_program.isNull()) {
#ifdef DEBUG_DSSI #ifdef DEBUG_DSSI
std::cerr << "DSSIPluginInstance::activate: restoring program " << m_program << std::endl; std::cerr << "DSSIPluginInstance::activate: restoring program " << m_program << std::endl;
#endif #endif

@ -73,7 +73,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list)
const LADSPA_Descriptor *descriptor = getLADSPADescriptor(*i); const LADSPA_Descriptor *descriptor = getLADSPADescriptor(*i);
if (!descriptor) { if (!descriptor) {
std::cerr << "WARNING: LADSPAPluginFactory::enumeratePlugins: couldn't get descriptor for identifier " << *i << std::endl; std::cerr << "WARNING: LADSPAPluginFactory::enumeratePlugins: couldn't get descriptor for identifier " << (*i).ascii() << std::endl;
continue; continue;
} }
@ -475,7 +475,7 @@ LADSPAPluginFactory::getLADSPADescriptor(TQString identifier)
if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
loadLibrary(soname); loadLibrary(soname);
if (m_libraryHandles.find(soname) == m_libraryHandles.end()) { if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: loadLibrary failed for " << soname << std::endl; std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: loadLibrary failed for " << soname.ascii() << std::endl;
return 0; return 0;
} }
} }
@ -486,7 +486,7 @@ LADSPAPluginFactory::getLADSPADescriptor(TQString identifier)
dlsym(libraryHandle, "ladspa_descriptor"); dlsym(libraryHandle, "ladspa_descriptor");
if (!fn) { if (!fn) {
std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No descriptor function in library " << soname << std::endl; std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No descriptor function in library " << soname.ascii() << std::endl;
return 0; return 0;
} }
@ -499,7 +499,7 @@ LADSPAPluginFactory::getLADSPADescriptor(TQString identifier)
++index; ++index;
} }
std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No such plugin as " << label << " in library " << soname << std::endl; std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No such plugin as " << label.ascii() << " in library " << soname.ascii() << std::endl;
return 0; return 0;
} }
@ -623,7 +623,7 @@ LADSPAPluginFactory::discoverPlugins()
<< "discovering plugins; path is "; << "discovering plugins; path is ";
for (std::vector<TQString>::iterator i = pathList.begin(); for (std::vector<TQString>::iterator i = pathList.begin();
i != pathList.end(); ++i) { i != pathList.end(); ++i) {
std::cerr << "[" << *i << "] "; std::cerr << "[" << (*i).ascii() << "] ";
} }
std::cerr << std::endl; std::cerr << std::endl;
@ -684,7 +684,7 @@ LADSPAPluginFactory::discoverPlugins(TQString soName)
if (!libraryHandle) { if (!libraryHandle) {
std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: couldn't dlopen " std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: couldn't dlopen "
<< soName << " - " << dlerror() << std::endl; << soName.ascii() << " - " << dlerror() << std::endl;
return ; return ;
} }
@ -692,7 +692,7 @@ LADSPAPluginFactory::discoverPlugins(TQString soName)
dlsym(libraryHandle, "ladspa_descriptor"); dlsym(libraryHandle, "ladspa_descriptor");
if (!fn) { if (!fn) {
std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: No descriptor function in " << soName << std::endl; std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: No descriptor function in " << soName.ascii() << std::endl;
return ; return ;
} }

@ -1410,7 +1410,7 @@ MappedPluginSlot::setProperty(const MappedObjectProperty &property,
// populate myself and my ports // populate myself and my ports
PluginFactory *factory = PluginFactory::instanceFor(m_identifier); PluginFactory *factory = PluginFactory::instanceFor(m_identifier);
if (!factory) { if (!factory) {
std::cerr << "WARNING: MappedPluginSlot::setProperty(identifier): No plugin factory for identifier " << m_identifier << "!" << std::endl; std::cerr << "WARNING: MappedPluginSlot::setProperty(identifier): No plugin factory for identifier " << m_identifier.ascii() << "!" << std::endl;
m_identifier = ""; m_identifier = "";
return ; return ;
} }
@ -1489,7 +1489,7 @@ MappedPluginSlot::setPropertyList(const MappedObjectProperty &property,
studio->getSoundDriver()->configurePlugin(m_instrument, studio->getSoundDriver()->configurePlugin(m_instrument,
m_position, m_position,
key, value); key, value);
if (rv && rv != "") { if (!rv.isNull() && rv != "") {
throw(rv); throw(rv);
} }
} }

@ -51,7 +51,7 @@ PluginFactory::instance(TQString pluginType)
if (pluginType == "ladspa") { if (pluginType == "ladspa") {
#ifdef HAVE_LADSPA #ifdef HAVE_LADSPA
if (!_ladspaInstance) { if (!_ladspaInstance) {
std::cerr << "PluginFactory::instance(" << pluginType std::cerr << "PluginFactory::instance(" << pluginType.ascii()
<< "): creating new LADSPAPluginFactory" << std::endl; << "): creating new LADSPAPluginFactory" << std::endl;
_ladspaInstance = new LADSPAPluginFactory(); _ladspaInstance = new LADSPAPluginFactory();
_ladspaInstance->discoverPlugins(); _ladspaInstance->discoverPlugins();
@ -65,7 +65,7 @@ PluginFactory::instance(TQString pluginType)
} else if (pluginType == "dssi") { } else if (pluginType == "dssi") {
#ifdef HAVE_DSSI #ifdef HAVE_DSSI
if (!_dssiInstance) { if (!_dssiInstance) {
std::cerr << "PluginFactory::instance(" << pluginType std::cerr << "PluginFactory::instance(" << pluginType.ascii()
<< "): creating new DSSIPluginFactory" << std::endl; << "): creating new DSSIPluginFactory" << std::endl;
_dssiInstance = new DSSIPluginFactory(); _dssiInstance = new DSSIPluginFactory();
_dssiInstance->discoverPlugins(); _dssiInstance->discoverPlugins();

Loading…
Cancel
Save