rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent fdd75d8077
commit 2620ed602b

@ -64,7 +64,7 @@ bool convertFile(const TQString &file)
xmlData = ins.read();
}
if (xmlData.tqfind("<format>", 0, false) >= 0) {
if (xmlData.find("<format>", 0, false) >= 0) {
kdDebug() << "file " << file << " already in new format" << endl;
// but add <?xml line at beginning if missing
@ -75,7 +75,7 @@ bool convertFile(const TQString &file)
xmlData = ins.read();
}
if (xmlData.tqfind("<?xml", 0, false) < 0) {
if (xmlData.find("<?xml", 0, false) < 0) {
xmlData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + xmlData;
}
@ -98,21 +98,21 @@ bool convertFile(const TQString &file)
station.setMinimal(true);
xmlData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + xmlData;
xmlData.tqreplace(stationlist, "<stationlist>\n\t\t<format>kradio-1.0</format>");
xmlData.tqreplace(qselect, "");
xmlData.tqreplace(docking, "");
xmlData.tqreplace(station, "<FrequencyRadioStation>\n"
xmlData.replace(stationlist, "<stationlist>\n\t\t<format>kradio-1.0</format>");
xmlData.replace(qselect, "");
xmlData.replace(docking, "");
xmlData.replace(station, "<FrequencyRadioStation>\n"
"\t\t\t<" stationIDElement "></" stationIDElement ">"
"\\1</FrequencyRadioStation>"
);
int p = 0;
int f = 0;
while ( (f = xmlData.tqfind("<" stationIDElement "></" stationIDElement ">", p) ) >= 0) {
while ( (f = xmlData.find("<" stationIDElement "></" stationIDElement ">", p) ) >= 0) {
xmlData.insert(f + 2 + TQString(stationIDElement).length(), createStationID());
}
xmlData.tqreplace(emptyLines, "\n");
xmlData.replace(emptyLines, "\n");
}
presetFile.close();

@ -104,7 +104,7 @@ AlsaSoundConfiguration::~AlsaSoundConfiguration ()
void AlsaSoundConfiguration::slotPlaybackCardSelected(const TQString &cardname)
{
if (!m_name2card.tqcontains(cardname))
if (!m_name2card.contains(cardname))
return;
listSoundDevices(m_comboPlaybackDevice, &m_playbackDeviceName2dev, &m_dev2playbackDeviceName, &m_playbackDevice2idx, m_name2card[cardname], SND_PCM_STREAM_PLAYBACK);
@ -113,7 +113,7 @@ void AlsaSoundConfiguration::slotPlaybackCardSelected(const TQString &cardname)
void AlsaSoundConfiguration::slotCaptureCardSelected(const TQString &cardname)
{
if (!m_name2card.tqcontains(cardname))
if (!m_name2card.contains(cardname))
return;
saveCaptureMixerSettings();
@ -146,7 +146,7 @@ void AlsaSoundConfiguration::slotCaptureCardSelected(const TQString &cardname)
int idx = 0;
for (TQValueListConstIterator<TQString> it = all_list.begin(); it != all_list.end(); ++it, ++idx) {
QAlsaMixerElement *e = new QAlsaMixerElement(m_groupMixerSubFrame, *it,
sw_list.tqcontains(*it), vol_list.tqcontains(*it));
sw_list.contains(*it), vol_list.contains(*it));
TQObject::connect(e, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty()));
m_groupMixerLayout->addWidget(e, idx > cols, idx % cols);
e->show();
@ -179,7 +179,7 @@ void AlsaSoundConfiguration::restoreCaptureMixerSettings()
TQString id = AlsaConfigMixerSetting::getIDString(card, name);
QAlsaMixerElement *e = *it;
if (m_MixerSettings.tqcontains(id)) {
if (m_MixerSettings.contains(id)) {
const AlsaConfigMixerSetting &s = m_MixerSettings[id];
e->setVolume(s.m_volume);
e->setOverride(s.m_use);

@ -248,8 +248,8 @@ bool AlsaSoundDevice::prepareCapture(SoundStreamID id, const TQString &channel)
bool AlsaSoundDevice::releasePlayback(SoundStreamID id)
{
if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
if (id.isValid() && m_PlaybackStreams.contains(id)) {
if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
stopPlayback(id);
}
m_PlaybackStreams.remove(id);
@ -260,7 +260,7 @@ bool AlsaSoundDevice::releasePlayback(SoundStreamID id)
bool AlsaSoundDevice::releaseCapture(SoundStreamID id)
{
if (id.isValid() && m_CaptureStreams.tqcontains(id)) {
if (id.isValid() && m_CaptureStreams.contains(id)) {
if (m_CaptureStreamID == id) {
stopCapture(id);
}
@ -284,7 +284,7 @@ bool AlsaSoundDevice::supportsCapture() const
bool AlsaSoundDevice::startPlayback(SoundStreamID id)
{
if (id.isValid() && m_PlaybackStreams.tqcontains(id) && m_EnablePlayback) {
if (id.isValid() && m_PlaybackStreams.contains(id) && m_EnablePlayback) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
@ -295,7 +295,7 @@ bool AlsaSoundDevice::startPlayback(SoundStreamID id)
ok = true;
}
} else {
if (!m_PassivePlaybackStreams.tqcontains(id))
if (!m_PassivePlaybackStreams.contains(id))
m_PassivePlaybackStreams.append(id);
ok = true;
}
@ -326,12 +326,12 @@ bool AlsaSoundDevice::pausePlayback(SoundStreamID /*id*/)
bool AlsaSoundDevice::stopPlayback(SoundStreamID id)
{
if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
if (id.isValid() && m_PlaybackStreams.contains(id)) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (!cfg.m_ActiveMode) {
if (m_PassivePlaybackStreams.tqcontains(id)) {
if (m_PassivePlaybackStreams.contains(id)) {
/* float tmp = 0;
writePlaybackMixerVolume(cfg.m_Channel, tmp, true);*/
m_PassivePlaybackStreams.remove(id);
@ -351,7 +351,7 @@ bool AlsaSoundDevice::stopPlayback(SoundStreamID id)
bool AlsaSoundDevice::isPlaybackRunning(SoundStreamID id, bool &b) const
{
if (id.isValid() && m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
if (id.isValid() && m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
b = true;
return true;
} else {
@ -364,7 +364,7 @@ bool AlsaSoundDevice::startCaptureWithFormat(SoundStreamID id,
SoundFormat &real_format,
bool force_format)
{
if (m_CaptureStreams.tqcontains(id) && m_EnableCapture) {
if (m_CaptureStreams.contains(id) && m_EnableCapture) {
if (m_CaptureStreamID != id) {
m_CapturePos = 0;
@ -454,7 +454,7 @@ bool AlsaSoundDevice::isCaptureRunning(SoundStreamID id, bool &b, SoundFormat &s
bool AlsaSoundDevice::noticeSoundStreamClosed(SoundStreamID id)
{
bool found = false;
if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
stopPlayback(id);
found = true;
}
@ -471,13 +471,13 @@ bool AlsaSoundDevice::noticeSoundStreamClosed(SoundStreamID id)
bool AlsaSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStreamID newID)
{
bool found = false;
if (m_PlaybackStreams.tqcontains(oldID)) {
if (m_PlaybackStreams.contains(oldID)) {
m_PlaybackStreams.insert(newID, m_PlaybackStreams[oldID]);
if (newID != oldID)
m_PlaybackStreams.remove(oldID);
found = true;
}
if (m_CaptureStreams.tqcontains(oldID)) {
if (m_CaptureStreams.contains(oldID)) {
m_CaptureStreams.insert(newID, m_CaptureStreams[oldID]);
if (newID != oldID)
m_CaptureStreams.remove(oldID);
@ -488,7 +488,7 @@ bool AlsaSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStre
m_PlaybackStreamID = newID;
if (m_CaptureStreamID == oldID)
m_CaptureStreamID = newID;
if (m_PassivePlaybackStreams.tqcontains(oldID)) {
if (m_PassivePlaybackStreams.contains(oldID)) {
m_PassivePlaybackStreams.remove(oldID);
m_PassivePlaybackStreams.append(newID);
}
@ -1088,7 +1088,7 @@ const TQStringList &AlsaSoundDevice::getCaptureChannels() const
bool AlsaSoundDevice::setPlaybackVolume(SoundStreamID id, float volume)
{
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (rint(100*volume) != rint(100*cfg.m_Volume)) {
@ -1120,7 +1120,7 @@ bool AlsaSoundDevice::setCaptureVolume(SoundStreamID id, float volume)
bool AlsaSoundDevice::getPlaybackVolume(SoundStreamID id, float &volume) const
{
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
const SoundStreamConfig &cfg = m_PlaybackStreams[id];
volume = cfg.m_Volume;
return true;
@ -1144,7 +1144,7 @@ void AlsaSoundDevice::checkMixerVolume(SoundStreamID id)
{
if (id.isValid()) {
if (m_hPlaybackMixer && m_PassivePlaybackStreams.tqcontains(id) || m_PlaybackStreamID == id) {
if (m_hPlaybackMixer && m_PassivePlaybackStreams.contains(id) || m_PlaybackStreamID == id) {
snd_mixer_handle_events(m_hPlaybackMixer);
SoundStreamConfig &cfg = m_PlaybackStreams[id];
@ -1164,7 +1164,7 @@ void AlsaSoundDevice::checkMixerVolume(SoundStreamID id)
snd_mixer_handle_events(m_hCaptureMixer);
SoundStreamConfig &cfg = m_CaptureStreams[id];
if (m_CaptureChannels2ID.tqcontains(cfg.m_Channel)) {
if (m_CaptureChannels2ID.contains(cfg.m_Channel)) {
float v = readCaptureMixerVolume(cfg.m_Channel);
if (rint(100*cfg.m_Volume) != rint(100*v)) {
cfg.m_Volume = v;
@ -1181,7 +1181,7 @@ float AlsaSoundDevice::readPlaybackMixerVolume(const TQString &channel, bool &mu
if (!m_hPlaybackMixer)
return 0; // without error
if (m_PlaybackChannels2ID.tqcontains(channel) && m_hPlaybackMixer) {
if (m_PlaybackChannels2ID.contains(channel) && m_hPlaybackMixer) {
AlsaMixerElement sid = m_PlaybackChannels2ID[channel];
snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hPlaybackMixer, sid);
if (elem) {
@ -1215,7 +1215,7 @@ float AlsaSoundDevice::readCaptureMixerVolume(const TQString &channel) const
if (!m_hCaptureMixer)
return 0; // without error
if (m_CaptureChannels2ID.tqcontains(channel) && m_hCaptureMixer) {
if (m_CaptureChannels2ID.contains(channel) && m_hCaptureMixer) {
AlsaMixerElement sid = m_CaptureChannels2ID[channel];
snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hCaptureMixer, sid);
if (elem) {
@ -1248,7 +1248,7 @@ bool AlsaSoundDevice::writePlaybackMixerVolume (const TQString &channel, float &
if (!m_hPlaybackMixer)
return false;
if (m_PlaybackChannels2ID.tqcontains(channel) && m_hPlaybackMixer) {
if (m_PlaybackChannels2ID.contains(channel) && m_hPlaybackMixer) {
AlsaMixerElement sid = m_PlaybackChannels2ID[channel];
snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hPlaybackMixer, sid);
if (elem) {
@ -1284,7 +1284,7 @@ bool AlsaSoundDevice::writeCaptureMixerVolume (const TQString &channel, float &v
if (!m_hCaptureMixer)
return false;
if (m_CaptureChannels2ID.tqcontains(channel) && m_hCaptureMixer) {
if (m_CaptureChannels2ID.contains(channel) && m_hCaptureMixer) {
AlsaMixerElement sid = m_CaptureChannels2ID[channel];
snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hCaptureMixer, sid);
if (elem) {
@ -1314,7 +1314,7 @@ bool AlsaSoundDevice::writeCaptureMixerSwitch (const TQString &channel, bool cap
if (!m_hCaptureMixer)
return false;
if (m_CaptureChannelsSwitch2ID.tqcontains(channel) && m_hCaptureMixer) {
if (m_CaptureChannelsSwitch2ID.contains(channel) && m_hCaptureMixer) {
AlsaMixerElement sid = m_CaptureChannelsSwitch2ID[channel];
snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hCaptureMixer, sid);
if (elem) {
@ -1337,7 +1337,7 @@ void AlsaSoundDevice::selectCaptureChannel (const TQString &channel)
writeCaptureMixerSwitch(channel, true);
const TQString ADC = "ADC";
if (m_CaptureChannels2ID.tqcontains(ADC)) {
if (m_CaptureChannels2ID.contains(ADC)) {
float v = readCaptureMixerVolume(ADC);
if (rint(v*100) == 0) {
float tmp_vol = 1.0;
@ -1345,7 +1345,7 @@ void AlsaSoundDevice::selectCaptureChannel (const TQString &channel)
}
}
const TQString Digital = "Digital";
if (m_CaptureChannels2ID.tqcontains(Digital)) {
if (m_CaptureChannels2ID.contains(Digital)) {
float v = readCaptureMixerVolume(Digital);
if (rint(v*100) == 0) {
float tmp_vol = 1.0;
@ -1353,12 +1353,12 @@ void AlsaSoundDevice::selectCaptureChannel (const TQString &channel)
}
}
const TQString WAVE = "Wave";
if (m_CaptureChannels2ID.tqcontains(WAVE)) {
if (m_CaptureChannels2ID.contains(WAVE)) {
float x = 0;
writeCaptureMixerVolume(WAVE, x);
}
const TQString Capture = "Capture";
if (m_CaptureChannelsSwitch2ID.tqcontains(Capture)) {
if (m_CaptureChannelsSwitch2ID.contains(Capture)) {
writeCaptureMixerSwitch(Capture, true);
}
@ -1366,9 +1366,9 @@ void AlsaSoundDevice::selectCaptureChannel (const TQString &channel)
const AlsaConfigMixerSetting &s = *it;
if (s.m_card == m_CaptureCard && s.m_use) {
float vol = s.m_volume;
if (m_CaptureChannels2ID.tqcontains(s.m_name))
if (m_CaptureChannels2ID.contains(s.m_name))
writeCaptureMixerVolume(s.m_name, vol);
if (m_CaptureChannelsSwitch2ID.tqcontains(s.m_name))
if (m_CaptureChannelsSwitch2ID.contains(s.m_name))
writeCaptureMixerSwitch(s.m_name, s.m_active);
}
}
@ -1451,7 +1451,7 @@ TQString AlsaSoundDevice::getSoundStreamClientDescription() const
bool AlsaSoundDevice::mute (SoundStreamID id, bool mute)
{
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (mute != cfg.m_Muted) {
if (writePlaybackMixerVolume(cfg.m_Channel, cfg.m_Volume, cfg.m_Muted = mute)) {
@ -1465,7 +1465,7 @@ bool AlsaSoundDevice::mute (SoundStreamID id, bool mute)
bool AlsaSoundDevice::unmute (SoundStreamID id, bool unmute)
{
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
bool mute = !unmute;
if (mute != cfg.m_Muted) {
@ -1480,7 +1480,7 @@ bool AlsaSoundDevice::unmute (SoundStreamID id, bool unmute)
bool AlsaSoundDevice::isMuted(SoundStreamID id, bool &m) const
{
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
const SoundStreamConfig &cfg = m_PlaybackStreams[id];
m = cfg.m_Muted;
return true;

@ -277,7 +277,7 @@ void RadioDocking::buildStationList()
++k;
TQString shortcut = k < 10 ? "&"+TQString().setNum(k) : k == 10 ? "1&0" : TQString().setNum(k);
TQString name = rs.longName().tqreplace("&", "&&");
TQString name = rs.longName().replace("&", "&&");
TQString item = shortcut + " " + name;
int id = m_menu->insertItem(item);
@ -484,7 +484,7 @@ void RadioDocking::ShowHideWidgetPlugins()
for (TQMapIterator<WidgetPluginBase*, int> it = m_widgetPluginIDs.begin(); it != m_widgetPluginIDs.end(); ++it) {
WidgetPluginBase *p = it.key();
TQString name = p ? p->name() : TQString();
if (p && tmpCache.tqcontains(name) && tmpCache[name]) {
if (p && tmpCache.contains(name) && tmpCache[name]) {
p->showOnOrgDesktop();
}
}
@ -511,7 +511,7 @@ void RadioDocking::slotMenuItemActivated(int id)
void RadioDocking::noticeWidgetPluginShown(WidgetPluginBase *b, bool shown)
{
if (!m_manager || !b || !m_widgetPluginIDs.tqcontains(b))
if (!m_manager || !b || !m_widgetPluginIDs.contains(b))
return;
m_manager->updateWidgetPluginMenuItem(b, m_pluginMenu, m_widgetPluginIDs, shown);
@ -533,7 +533,7 @@ bool RadioDocking::startRecordingWithFormat(
const SoundFormat &/*proposed_format*/,
SoundFormat &/*real_format*/)
{
if (!id.isValid() || id != queryCurrentSoundStreamID() || m_StreamID2MenuID.tqcontains(id))
if (!id.isValid() || id != queryCurrentSoundStreamID() || m_StreamID2MenuID.contains(id))
return false;
TQString descr;
@ -555,7 +555,7 @@ bool RadioDocking::startRecordingWithFormat(
bool RadioDocking::stopRecording (SoundStreamID id)
{
if (!id.isValid() || !m_StreamID2MenuID.tqcontains(id))
if (!id.isValid() || !m_StreamID2MenuID.contains(id))
return false;
int menu_id = m_StreamID2MenuID[id];
@ -584,7 +584,7 @@ void RadioDocking::slotRecordingMenu(int i)
sendPowerOn();
sendStartRecording(id);
}
} else if (m_MenuID2StreamID.tqcontains(i)) {
} else if (m_MenuID2StreamID.contains(i)) {
sendStopRecording(m_MenuID2StreamID[i]);
}
}
@ -628,7 +628,7 @@ void RadioDocking::buildRecordingMenu()
bool RadioDocking::noticeSoundStreamChanged(SoundStreamID id)
{
if (m_StreamID2MenuID.tqcontains(id)) {
if (m_StreamID2MenuID.contains(id)) {
TQString descr;
querySoundStreamDescription(id, descr);
m_recordingMenu->changeItem(m_StreamID2MenuID[id],
@ -665,7 +665,7 @@ void RadioDocking::dropEvent(TQDropEvent* event)
if ( StationDragObject::decode(event, list) ) {
TQStringList l = getStationSelection();
for (TQValueListConstIterator<TQString> it = list.begin(); it != list.end(); ++it)
if (!l.tqcontains(*it))
if (!l.contains(*it))
l.append(*it);
setStationSelection(l);
}

@ -100,7 +100,7 @@ ErrorLog::ErrorLog(const TQString &name)
TQFrame *debug = addPage(i18n("Debugging"), i18n("Debugging"),
KGlobal::instance()->iconLoader()->loadIcon(
"tqfind", KIcon::NoGroup, KIcon::SizeMedium
"find", KIcon::NoGroup, KIcon::SizeMedium
)
);

@ -414,7 +414,7 @@ void QuickBar::dropEvent(TQDropEvent* event)
if ( StationDragObject::decode(event, list) ) {
TQStringList l = getStationSelection();
for (TQValueListConstIterator<TQString> it = list.begin(); it != list.end(); ++it)
if (!l.tqcontains(*it))
if (!l.contains(*it))
l.append(*it);
setStationSelection(l);
}

@ -254,7 +254,7 @@ bool RadioView::removeElement (TQObject *_e)
return false;
ElementCfgListIterator it;
while ((it = elementConfigPages.tqfind(e)) != elementConfigPages.end()) {
while ((it = elementConfigPages.find(e)) != elementConfigPages.end()) {
delete (*it).cfg;
// it must not used behind, the element will be deleted automatically
// by slotElementConfigPageDeleted
@ -432,7 +432,7 @@ bool RadioView::startRecordingWithFormat(
const SoundFormat &/*proposed_format*/,
SoundFormat &/*real_format*/)
{
if (!id.isValid() || id != queryCurrentSoundStreamID() || m_StreamID2MenuID.tqcontains(id))
if (!id.isValid() || id != queryCurrentSoundStreamID() || m_StreamID2MenuID.contains(id))
return false;
TQString descr;
@ -454,7 +454,7 @@ bool RadioView::startRecordingWithFormat(
bool RadioView::stopRecording (SoundStreamID id)
{
if (!id.isValid() || !m_StreamID2MenuID.tqcontains(id))
if (!id.isValid() || !m_StreamID2MenuID.contains(id))
return false;
int menu_id = m_StreamID2MenuID[id];
@ -472,7 +472,7 @@ bool RadioView::stopRecording (SoundStreamID id)
bool RadioView::noticeSoundStreamChanged(SoundStreamID id)
{
if (m_StreamID2MenuID.tqcontains(id)) {
if (m_StreamID2MenuID.contains(id)) {
TQString descr;
querySoundStreamDescription(id, descr);
m_RecordingMenu->changeItem(m_StreamID2MenuID[id],
@ -632,7 +632,7 @@ void RadioView::noticeWidgetPluginShown(WidgetPluginBase *p, bool shown)
btnConfigure->blockSignals(false);
}
if (m_Plugins2MenuID.tqcontains(p)) {
if (m_Plugins2MenuID.contains(p)) {
m_manager->updateWidgetPluginMenuItem(p, m_PluginMenu, m_Plugins2MenuID, shown);
}
}
@ -682,7 +682,7 @@ void RadioView::slotRecord()
SoundFormat sf;
queryIsRecordingRunning(id, r, sf);
if (!r && b /*!m_StreamID2MenuID.tqcontains(id)*/) {
if (!r && b /*!m_StreamID2MenuID.contains(id)*/) {
if (!queryIsPowerOn())
sendPowerOn();
sendStartRecording(id);
@ -704,7 +704,7 @@ void RadioView::slotRecordingMenu(int i)
sendPowerOn();
sendStartRecording(id);
}
} else if (m_MenuID2StreamID.tqcontains(i)) {
} else if (m_MenuID2StreamID.contains(i)) {
sendStopRecording(m_MenuID2StreamID[i]);
}
}
@ -749,7 +749,7 @@ void RadioView::slotConfigPageDeleted(TQObject *o)
void RadioView::slotElementConfigPageDeleted(TQObject *o)
{
ElementCfgListIterator it;
while ((it = elementConfigPages.tqfind(o)) != elementConfigPages.end()) {
while ((it = elementConfigPages.find(o)) != elementConfigPages.end()) {
elementConfigPages.remove(it);
}
}

@ -123,7 +123,7 @@ void LIRCConfiguration::slotCancel()
const TQMap<LIRC_Actions, TQString> &actions = m_LIRC->getActions();
const TQMap<LIRC_Actions, TQString> &alt_actions = m_LIRC->getAlternativeActions();
for (unsigned i = 0; m_order.tqcontains(i) && i < m_order.count(); ++i) {
for (unsigned i = 0; m_order.contains(i) && i < m_order.count(); ++i) {
LIRC_Actions action = m_order[i];
addKey(m_descriptions[action], actions[action], alt_actions[action]);
}

@ -202,7 +202,7 @@ AboutPageInfo OSSSoundDevice::createAboutPage()
bool OSSSoundDevice::preparePlayback(SoundStreamID id, const TQString &channel, bool active_mode, bool start_immediately)
{
if (id.isValid() && m_revPlaybackChannels.tqcontains(channel)) {
if (id.isValid() && m_revPlaybackChannels.contains(channel)) {
m_PlaybackStreams.insert(id, SoundStreamConfig(m_revPlaybackChannels[channel], active_mode));
if (start_immediately)
startPlayback(id);
@ -215,7 +215,7 @@ bool OSSSoundDevice::preparePlayback(SoundStreamID id, const TQString &channel,
bool OSSSoundDevice::prepareCapture(SoundStreamID id, const TQString &channel)
{
if (id.isValid() && m_revCaptureChannels.tqcontains(channel)) {
if (id.isValid() && m_revCaptureChannels.contains(channel)) {
m_CaptureStreams.insert(id, SoundStreamConfig(m_revCaptureChannels[channel]));
return true;
// FIXME: what to do if stream is already playing?
@ -225,8 +225,8 @@ bool OSSSoundDevice::prepareCapture(SoundStreamID id, const TQString &channel)
bool OSSSoundDevice::releasePlayback(SoundStreamID id)
{
if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
if (id.isValid() && m_PlaybackStreams.contains(id)) {
if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
stopPlayback(id);
}
m_PlaybackStreams.remove(id);
@ -237,7 +237,7 @@ bool OSSSoundDevice::releasePlayback(SoundStreamID id)
bool OSSSoundDevice::releaseCapture(SoundStreamID id)
{
if (id.isValid() && m_CaptureStreams.tqcontains(id)) {
if (id.isValid() && m_CaptureStreams.contains(id)) {
if (m_CaptureStreamID == id) {
stopCapture(id);
}
@ -261,7 +261,7 @@ bool OSSSoundDevice::supportsCapture() const
bool OSSSoundDevice::startPlayback(SoundStreamID id)
{
if (id.isValid() && m_PlaybackStreams.tqcontains(id) && m_EnablePlayback) {
if (id.isValid() && m_PlaybackStreams.contains(id) && m_EnablePlayback) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
@ -272,7 +272,7 @@ bool OSSSoundDevice::startPlayback(SoundStreamID id)
ok = true;
}
} else {
if (!m_PassivePlaybackStreams.tqcontains(id))
if (!m_PassivePlaybackStreams.contains(id))
m_PassivePlaybackStreams.append(id);
ok = true;
}
@ -300,12 +300,12 @@ bool OSSSoundDevice::pausePlayback(SoundStreamID /*id*/)
bool OSSSoundDevice::stopPlayback(SoundStreamID id)
{
if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
if (id.isValid() && m_PlaybackStreams.contains(id)) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (!cfg.m_ActiveMode) {
if (m_PassivePlaybackStreams.tqcontains(id)) {
if (m_PassivePlaybackStreams.contains(id)) {
// writeMixerVolume(cfg.m_Channel, 0);
m_PassivePlaybackStreams.remove(id);
}
@ -324,7 +324,7 @@ bool OSSSoundDevice::stopPlayback(SoundStreamID id)
bool OSSSoundDevice::isPlaybackRunning(SoundStreamID id, bool &b) const
{
if (id.isValid() && m_PlaybackStreams.tqcontains(id)) {
if (id.isValid() && m_PlaybackStreams.contains(id)) {
b = true;
return true;
} else {
@ -337,7 +337,7 @@ bool OSSSoundDevice::startCaptureWithFormat(SoundStreamID id,
SoundFormat &real_format,
bool force_format)
{
if (m_CaptureStreams.tqcontains(id) && m_EnableCapture) {
if (m_CaptureStreams.contains(id) && m_EnableCapture) {
if (m_CaptureStreamID != id) {
m_CapturePos = 0;
@ -402,7 +402,7 @@ bool OSSSoundDevice::isCaptureRunning(SoundStreamID id, bool &b, SoundFormat &sf
bool OSSSoundDevice::noticeSoundStreamClosed(SoundStreamID id)
{
bool found = false;
if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) {
if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) {
stopPlayback(id);
found = true;
}
@ -419,13 +419,13 @@ bool OSSSoundDevice::noticeSoundStreamClosed(SoundStreamID id)
bool OSSSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStreamID newID)
{
bool found = false;
if (m_PlaybackStreams.tqcontains(oldID)) {
if (m_PlaybackStreams.contains(oldID)) {
m_PlaybackStreams.insert(newID, m_PlaybackStreams[oldID]);
if (newID != oldID)
m_PlaybackStreams.remove(oldID);
found = true;
}
if (m_CaptureStreams.tqcontains(oldID)) {
if (m_CaptureStreams.contains(oldID)) {
m_CaptureStreams.insert(newID, m_CaptureStreams[oldID]);
if (newID != oldID)
m_CaptureStreams.remove(oldID);
@ -436,7 +436,7 @@ bool OSSSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStrea
m_PlaybackStreamID = newID;
if (m_CaptureStreamID == oldID)
m_CaptureStreamID = newID;
if (m_PassivePlaybackStreams.tqcontains(oldID)) {
if (m_PassivePlaybackStreams.contains(oldID)) {
m_PassivePlaybackStreams.remove(oldID);
m_PassivePlaybackStreams.append(newID);
}
@ -790,7 +790,7 @@ const TQStringList &OSSSoundDevice::getCaptureChannels() const
bool OSSSoundDevice::setPlaybackVolume(SoundStreamID id, float volume)
{
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
if (rint(100*volume) != rint(100*cfg.m_Volume)) {
@ -820,7 +820,7 @@ bool OSSSoundDevice::setCaptureVolume(SoundStreamID id, float volume)
bool OSSSoundDevice::getPlaybackVolume(SoundStreamID id, float &volume) const
{
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) {
if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) {
const SoundStreamConfig &cfg = m_PlaybackStreams[id];
volume = cfg.m_Volume;
return true;
@ -844,7 +844,7 @@ void OSSSoundDevice::checkMixerVolume(SoundStreamID id)
{
if (m_Mixer_fd >= 0 && id.isValid()) {
if (m_PassivePlaybackStreams.tqcontains(id) || m_PlaybackStreamID == id) {
if (m_PassivePlaybackStreams.contains(id) || m_PlaybackStreamID == id) {
SoundStreamConfig &cfg = m_PlaybackStreams[id];
float v = readMixerVolume(cfg.m_Channel);

@ -179,7 +179,7 @@
<string>&amp;Search Stations</string>
</property>
<property name="iconSet">
<iconset>"tqfind"</iconset>
<iconset>"find"</iconset>
</property>
</widget>
<widget class="TQPushButton">

@ -230,7 +230,7 @@ void RadioConfiguration::slotStationSelectionChanged(int idx)
stackStationEdit->setDisabled(!s);
if (s) {
RadioStationConfig *c = stationEditors.tqfind(s->getClassName());
RadioStationConfig *c = stationEditors.find(s->getClassName());
if (!c) {
c = s->createEditor();
if (c) {
@ -490,22 +490,22 @@ void RadioConfiguration::slotLastChangeNow()
static TQString &urlEscapes(TQString &s)
{
s.tqreplace(TQRegExp("%"), "%25");
s.tqreplace(TQRegExp("\t"), "%09");
s.tqreplace(TQRegExp("\n"), "%0A");
s.tqreplace(TQRegExp("\n"), "%0D");
s.tqreplace(TQRegExp(" "), "%20");
s.tqreplace(TQRegExp("\\!"), "%21");
s.tqreplace(TQRegExp("\""), "%22");
s.tqreplace(TQRegExp("#"), "%23");
s.tqreplace(TQRegExp("\\$"), "%24");
s.tqreplace(TQRegExp("\\&"), "%26");
s.tqreplace(TQRegExp("'"), "%27");
s.tqreplace(TQRegExp(","), "%2C");
s.tqreplace(TQRegExp(":"), "%3A");
s.tqreplace(TQRegExp(";"), "%3B");
s.tqreplace(TQRegExp("="), "%3D");
s.tqreplace(TQRegExp("\\?"), "%3F");
s.replace(TQRegExp("%"), "%25");
s.replace(TQRegExp("\t"), "%09");
s.replace(TQRegExp("\n"), "%0A");
s.replace(TQRegExp("\n"), "%0D");
s.replace(TQRegExp(" "), "%20");
s.replace(TQRegExp("\\!"), "%21");
s.replace(TQRegExp("\""), "%22");
s.replace(TQRegExp("#"), "%23");
s.replace(TQRegExp("\\$"), "%24");
s.replace(TQRegExp("\\&"), "%26");
s.replace(TQRegExp("'"), "%27");
s.replace(TQRegExp(","), "%2C");
s.replace(TQRegExp(":"), "%3A");
s.replace(TQRegExp(";"), "%3B");
s.replace(TQRegExp("="), "%3D");
s.replace(TQRegExp("\\?"), "%3F");
return s;
}

@ -217,7 +217,7 @@ bool Radio::setPresetFile(const TQString &presetFile)
int Radio::getStationIdx(const RadioStation &rs) const
{
RawStationList &sl = const_cast<RawStationList&>(m_stationList.all());
return sl.tqfind(&rs);
return sl.find(&rs);
}
int Radio::getCurrentStationIdx() const
@ -245,7 +245,7 @@ bool Radio::setActiveDevice(IRadioDevice *rd, bool keepPower)
// check if new station is in "connections"
// special case: rd == NULL: power off active device, new active device = NULL
if (!rd || IRadioDeviceClient::iConnections.tqcontainsRef(rd)) { // new device is ok
if (!rd || IRadioDeviceClient::iConnections.containsRef(rd)) { // new device is ok
// save old power state and power off old device
bool oldPowerOn = false;
@ -433,13 +433,13 @@ void Radio::noticeDisconnectI(IRadioDeviceClient::cmplInterface *rd, bool pointe
if (rd == m_activeDevice) {
// search a new active device
if (IRadioDeviceClient::iConnections.tqfindRef(rd) >= 0) {
if (IRadioDeviceClient::iConnections.findRef(rd) >= 0) {
IRadioDevice *new_rd = NULL;
new_rd = IRadioDeviceClient::iConnections.next(); // choose next device as active device if next exists
if (!new_rd) {
IRadioDeviceClient::iConnections.tqfindRef(rd);
IRadioDeviceClient::iConnections.findRef(rd);
new_rd = IRadioDeviceClient::iConnections.prev(); // otherwise try prev then, may be NULL (no connections)
}
setActiveDevice(new_rd);

@ -249,7 +249,7 @@ bool RecordingMonitor::noticeSoundStreamCreated(SoundStreamID id)
bool RecordingMonitor::noticeSoundStreamClosed(SoundStreamID id)
{
if (m_SoundStreamID2idx.tqcontains(id)) {
if (m_SoundStreamID2idx.contains(id)) {
int idx = m_SoundStreamID2idx[id];
m_idx2SoundStreamID.clear();
m_SoundStreamID2idx.remove(id);
@ -270,7 +270,7 @@ bool RecordingMonitor::noticeSoundStreamClosed(SoundStreamID id)
bool RecordingMonitor::noticeSoundStreamChanged(SoundStreamID id)
{
if (m_SoundStreamID2idx.tqcontains(id)) {
if (m_SoundStreamID2idx.contains(id)) {
int idx = m_SoundStreamID2idx[id];
TQString tmp = TQString();
querySoundStreamDescription(id, tmp);
@ -356,7 +356,7 @@ void RecordingMonitor::slotStreamSelected(int idx)
sendStopCapture(old_id);
}
SoundStreamID id = m_idx2SoundStreamID.tqcontains(idx) ? m_idx2SoundStreamID[idx] : SoundStreamID::InvalidID;
SoundStreamID id = m_idx2SoundStreamID.contains(idx) ? m_idx2SoundStreamID[idx] : SoundStreamID::InvalidID;
if (id.isValid()) {
m_defaultStreamDescription = m_comboSoundStreamSelector->text(idx);

@ -310,7 +310,7 @@ bool Recording::setRecordingConfig(const RecordingConfig &c)
// ISoundStreamClient
bool Recording::startPlayback(SoundStreamID id)
{
if (m_PreRecordingBuffers.tqcontains(id))
if (m_PreRecordingBuffers.contains(id))
delete m_PreRecordingBuffers[id];
m_PreRecordingBuffers[id] = NULL;
if (m_config.m_PreRecordingEnable) {
@ -323,7 +323,7 @@ bool Recording::startPlayback(SoundStreamID id)
bool Recording::stopPlayback(SoundStreamID id)
{
if (m_PreRecordingBuffers.tqcontains(id)) {
if (m_PreRecordingBuffers.contains(id)) {
if (m_PreRecordingBuffers[id])
delete m_PreRecordingBuffers[id];
m_PreRecordingBuffers.remove(id);
@ -377,10 +377,10 @@ bool Recording::startRecordingWithFormat(SoundStreamID id, const SoundFormat &sf
bool Recording::stopRecording(SoundStreamID id)
{
if (m_EncodingThreads.tqcontains(id)) {
if (m_EncodingThreads.contains(id)) {
sendStopCapture(id);
if (m_config.m_PreRecordingEnable) {
if (!m_PreRecordingBuffers.tqcontains(id)) {
if (!m_PreRecordingBuffers.contains(id)) {
if (m_PreRecordingBuffers[id] != NULL) {
delete m_PreRecordingBuffers[id];
}
@ -406,7 +406,7 @@ bool Recording::noticeSoundStreamData(SoundStreamID id,
const SoundMetaData &md
)
{
if (m_PreRecordingBuffers.tqcontains(id) && m_PreRecordingBuffers[id] != NULL) {
if (m_PreRecordingBuffers.contains(id) && m_PreRecordingBuffers[id] != NULL) {
FileRingBuffer &fbuf = *m_PreRecordingBuffers[id];
if (fbuf.getFreeSize() < size) {
@ -427,7 +427,7 @@ bool Recording::noticeSoundStreamData(SoundStreamID id,
// fbuf.addData((char*)tmp, sizeof(tmp));
// //END DEBUG
if (m_EncodingThreads.tqcontains(id)) {
if (m_EncodingThreads.contains(id)) {
//logDebug("recording packet: " + TQString::number(size));
@ -464,7 +464,7 @@ bool Recording::noticeSoundStreamData(SoundStreamID id,
return true;
}
else if (m_EncodingThreads.tqcontains(id)) {
else if (m_EncodingThreads.contains(id)) {
//logDebug("recording packet: " + TQString::number(size));
@ -503,7 +503,7 @@ bool Recording::noticeSoundStreamData(SoundStreamID id,
bool Recording::startEncoder(SoundStreamID ssid, const RecordingConfig &cfg)
{
if (m_EncodingThreads.tqcontains(ssid))
if (m_EncodingThreads.contains(ssid))
return false;
SoundStreamID encID = createNewSoundStream(ssid, false);
@ -527,7 +527,7 @@ bool Recording::startEncoder(SoundStreamID ssid, const RecordingConfig &cfg)
const RadioStation *rs = NULL;
querySoundStreamRadioStation(ssid, rs);
TQString station = rs ? rs->name() + "-" : "";
station.tqreplace(TQRegExp("[/*?]"), "_");
station.replace(TQRegExp("[/*?]"), "_");
TQDate date = TQDate::tqcurrentDate();
TQTime time = TQTime::currentTime();
@ -579,7 +579,7 @@ bool Recording::startEncoder(SoundStreamID ssid, const RecordingConfig &cfg)
void Recording::stopEncoder(SoundStreamID id)
{
if (m_EncodingThreads.tqcontains(id)) {
if (m_EncodingThreads.contains(id)) {
RecordingEncoding *thread = m_EncodingThreads[id];
@ -627,7 +627,7 @@ bool Recording::event(TQEvent *_e)
SoundStreamEvent *e = static_cast<SoundStreamEvent*>(_e);
SoundStreamID id = e->getSoundStreamID();
if (m_EncodingThreads.tqcontains(id)) {
if (m_EncodingThreads.contains(id)) {
RecordingEncoding *thread = m_EncodingThreads[id];
@ -663,7 +663,7 @@ bool Recording::event(TQEvent *_e)
bool Recording::getSoundStreamDescription(SoundStreamID id, TQString &descr) const
{
if (m_EncodedStreams2RawStreams.tqcontains(id)) {
if (m_EncodedStreams2RawStreams.contains(id)) {
if (querySoundStreamDescription(m_EncodedStreams2RawStreams[id], descr)) {
descr = name() + " - " + descr;
return true;
@ -675,7 +675,7 @@ bool Recording::getSoundStreamDescription(SoundStreamID id, TQString &descr) con
bool Recording::getSoundStreamRadioStation(SoundStreamID id, const RadioStation *&rs) const
{
if (m_EncodedStreams2RawStreams.tqcontains(id)) {
if (m_EncodedStreams2RawStreams.contains(id)) {
if (querySoundStreamRadioStation(m_EncodedStreams2RawStreams[id], rs)) {
return true;
}
@ -698,7 +698,7 @@ bool Recording::enumerateSoundStreams(TQMap<TQString, SoundStreamID> &list) cons
bool Recording::noticeSoundStreamChanged(SoundStreamID id)
{
if (m_RawStreams2EncodedStreams.tqcontains(id)) {
if (m_RawStreams2EncodedStreams.contains(id)) {
notifySoundStreamChanged(m_RawStreams2EncodedStreams[id]);
return true;
}
@ -708,7 +708,7 @@ bool Recording::noticeSoundStreamChanged(SoundStreamID id)
bool Recording::isRecordingRunning(SoundStreamID id, bool &b, SoundFormat &sf) const
{
if (m_EncodingThreads.tqcontains(id)) {
if (m_EncodingThreads.contains(id)) {
b = m_EncodingThreads[id]->running();
sf = getSoundFormat();
return true;
@ -719,13 +719,13 @@ bool Recording::isRecordingRunning(SoundStreamID id, bool &b, SoundFormat &sf) c
bool Recording::noticeSoundStreamClosed(SoundStreamID id)
{
if (m_PreRecordingBuffers.tqcontains(id)) {
if (m_PreRecordingBuffers.contains(id)) {
if (m_PreRecordingBuffers[id])
delete m_PreRecordingBuffers[id];
m_PreRecordingBuffers.remove(id);
}
if (m_EncodingThreads.tqcontains(id)) {
if (m_EncodingThreads.contains(id)) {
sendStopRecording(id);
return true;
}

@ -184,7 +184,7 @@ AboutPageInfo StreamingDevice::createAboutPage()
bool StreamingDevice::preparePlayback(SoundStreamID id, const TQString &channel, bool /*active_mode*/, bool start_immediately)
{
if (id.isValid() && m_PlaybackChannels.tqfind(channel)) {
if (id.isValid() && m_PlaybackChannels.find(channel)) {
m_AllPlaybackStreams.insert(id, channel);
if (start_immediately)
startPlayback(id);
@ -197,7 +197,7 @@ bool StreamingDevice::preparePlayback(SoundStreamID id, const TQString &channel,
bool StreamingDevice::prepareCapture(SoundStreamID id, const TQString &channel)
{
logDebug("StreamingDevice::prepareCapture");
if (id.isValid() && m_CaptureChannels.tqfind(channel)) {
if (id.isValid() && m_CaptureChannels.find(channel)) {
m_AllCaptureStreams.insert(id, channel);
return true;
}
@ -206,9 +206,9 @@ bool StreamingDevice::prepareCapture(SoundStreamID id, const TQString &channel)
bool StreamingDevice::releasePlayback(SoundStreamID id)
{
if (id.isValid() && m_AllPlaybackStreams.tqcontains(id)) {
if (id.isValid() && m_AllPlaybackStreams.contains(id)) {
stopPlayback(id);
if (!m_EnabledPlaybackStreams.tqcontains(id))
if (!m_EnabledPlaybackStreams.contains(id))
m_AllPlaybackStreams.remove(id);
return true;
}
@ -218,9 +218,9 @@ bool StreamingDevice::releasePlayback(SoundStreamID id)
bool StreamingDevice::releaseCapture(SoundStreamID id)
{
logDebug("StreamingDevice::releaseCapture");
if (id.isValid() && m_AllCaptureStreams.tqcontains(id)) {
if (id.isValid() && m_AllCaptureStreams.contains(id)) {
stopCapture(id);
if (!m_EnabledCaptureStreams.tqcontains(id))
if (!m_EnabledCaptureStreams.contains(id))
m_AllCaptureStreams.remove(id);
return true;
}
@ -241,9 +241,9 @@ bool StreamingDevice::supportsCapture() const
bool StreamingDevice::startPlayback(SoundStreamID id)
{
if (id.isValid() && m_AllPlaybackStreams.tqcontains(id)) {
if (id.isValid() && m_AllPlaybackStreams.contains(id)) {
m_EnabledPlaybackStreams.insert(id, m_AllPlaybackStreams[id]);
StreamingJob &x = *m_PlaybackChannels.tqfind(m_AllPlaybackStreams[id]);
StreamingJob &x = *m_PlaybackChannels.find(m_AllPlaybackStreams[id]);
x.startPlayback();
return true;
} else {
@ -261,8 +261,8 @@ bool StreamingDevice::pausePlayback(SoundStreamID /*id*/)
bool StreamingDevice::stopPlayback(SoundStreamID id)
{
if (id.isValid() && m_EnabledPlaybackStreams.tqcontains(id)) {
StreamingJob &x = *m_PlaybackChannels.tqfind(m_AllPlaybackStreams[id]);
if (id.isValid() && m_EnabledPlaybackStreams.contains(id)) {
StreamingJob &x = *m_PlaybackChannels.find(m_AllPlaybackStreams[id]);
if (x.stopPlayback()) {
m_EnabledPlaybackStreams.remove(id);
}
@ -275,7 +275,7 @@ bool StreamingDevice::stopPlayback(SoundStreamID id)
bool StreamingDevice::isPlaybackRunning(SoundStreamID id, bool &b) const
{
if (id.isValid() && m_EnabledPlaybackStreams.tqcontains(id)) {
if (id.isValid() && m_EnabledPlaybackStreams.contains(id)) {
b = true;
return true;
} else {
@ -289,9 +289,9 @@ bool StreamingDevice::startCaptureWithFormat(SoundStreamID id,
bool force_format)
{
logDebug("StreamingDevice::startCaptureWithFormat");
if (id.isValid() && m_AllCaptureStreams.tqcontains(id)) {
if (id.isValid() && m_AllCaptureStreams.contains(id)) {
m_EnabledCaptureStreams.insert(id, m_AllCaptureStreams[id]);
StreamingJob &x = *m_CaptureChannels.tqfind(m_AllCaptureStreams[id]);
StreamingJob &x = *m_CaptureChannels.find(m_AllCaptureStreams[id]);
x.startCapture(proposed_format, real_format, force_format);
return true;
} else {
@ -302,8 +302,8 @@ bool StreamingDevice::startCaptureWithFormat(SoundStreamID id,
bool StreamingDevice::stopCapture(SoundStreamID id)
{
if (id.isValid() && m_EnabledCaptureStreams.tqcontains(id)) {
StreamingJob &x = *m_CaptureChannels.tqfind(m_AllCaptureStreams[id]);
if (id.isValid() && m_EnabledCaptureStreams.contains(id)) {
StreamingJob &x = *m_CaptureChannels.find(m_AllCaptureStreams[id]);
if (x.stopCapture()) {
m_EnabledCaptureStreams.remove(id);
}
@ -316,8 +316,8 @@ bool StreamingDevice::stopCapture(SoundStreamID id)
bool StreamingDevice::isCaptureRunning(SoundStreamID id, bool &b, SoundFormat &sf) const
{
if (id.isValid() && m_EnabledCaptureStreams.tqcontains(id)) {
StreamingJob &x = *m_CaptureChannels.tqfind(m_AllCaptureStreams[id]);
if (id.isValid() && m_EnabledCaptureStreams.contains(id)) {
StreamingJob &x = *m_CaptureChannels.find(m_AllCaptureStreams[id]);
sf = x.getSoundFormat();
b = true;
return true;
@ -339,22 +339,22 @@ bool StreamingDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStre
{
bool found = false;
if (newID != oldID) {
if (m_AllPlaybackStreams.tqcontains(oldID)) {
if (m_AllPlaybackStreams.contains(oldID)) {
m_AllPlaybackStreams.insert(newID, m_AllPlaybackStreams[oldID]);
m_AllPlaybackStreams.remove(oldID);
found = true;
}
if (m_EnabledPlaybackStreams.tqcontains(oldID)) {
if (m_EnabledPlaybackStreams.contains(oldID)) {
m_EnabledPlaybackStreams.insert(newID, m_EnabledPlaybackStreams[oldID]);
m_EnabledPlaybackStreams.remove(oldID);
found = true;
}
if (m_AllCaptureStreams.tqcontains(oldID)) {
if (m_AllCaptureStreams.contains(oldID)) {
m_AllCaptureStreams.insert(newID, m_AllCaptureStreams[oldID]);
m_AllCaptureStreams.remove(oldID);
found = true;
}
if (m_EnabledCaptureStreams.tqcontains(oldID)) {
if (m_EnabledCaptureStreams.contains(oldID)) {
m_EnabledCaptureStreams.insert(newID, m_EnabledCaptureStreams[oldID]);
m_EnabledCaptureStreams.remove(oldID);
found = true;
@ -370,8 +370,8 @@ bool StreamingDevice::noticeSoundStreamData(SoundStreamID id,
const SoundMetaData &/*md*/
)
{
if (id.isValid() && m_EnabledPlaybackStreams.tqcontains(id)) {
StreamingJob &x = *m_CaptureChannels.tqfind(m_AllCaptureStreams[id]);
if (id.isValid() && m_EnabledPlaybackStreams.contains(id)) {
StreamingJob &x = *m_CaptureChannels.find(m_AllCaptureStreams[id]);
x.playData(data, size, consumed_size);
return true;
}
@ -382,9 +382,9 @@ bool StreamingDevice::noticeSoundStreamData(SoundStreamID id,
bool StreamingDevice::noticeReadyForPlaybackData(SoundStreamID id, size_t free_size)
{
if (!id.isValid() || !m_AllCaptureStreams.tqcontains(id))
if (!id.isValid() || !m_AllCaptureStreams.contains(id))
return false;
StreamingJob &x = *m_CaptureChannels.tqfind(m_AllCaptureStreams[id]);
StreamingJob &x = *m_CaptureChannels.find(m_AllCaptureStreams[id]);
while (x.hasRecordedData() && free_size > 0) {
const char *buffer = NULL;
@ -440,7 +440,7 @@ void StreamingDevice::logStreamWarning(const KURL &url, const TQString &s)
bool StreamingDevice::getPlaybackStreamOptions(const TQString &channel, TQString &url, SoundFormat &sf, size_t &buffer_size) const
{
if (m_PlaybackChannels.tqfind(channel)) {
if (m_PlaybackChannels.find(channel)) {
const StreamingJob *j = m_PlaybackChannels[channel];
url = j->getURL();
sf = j->getSoundFormat();
@ -453,7 +453,7 @@ bool StreamingDevice::getPlaybackStreamOptions(const TQString &channel, TQString
bool StreamingDevice::getCaptureStreamOptions(const TQString &channel, TQString &url, SoundFormat &sf, size_t &buffer_size) const
{
if (m_CaptureChannels.tqfind(channel)) {
if (m_CaptureChannels.find(channel)) {
const StreamingJob *j = m_CaptureChannels[channel];
url = j->getURL();
sf = j->getSoundFormat();

@ -88,7 +88,7 @@ void TimeShifterConfiguration::noticeConnectedSoundClient(ISoundStreamClient::th
{
if (i && pointer_valid && i->supportsPlayback() && m_Shifter) {
const TQString &org_mid = m_Shifter->getPlaybackMixer();
bool org_present = m_PlaybackMixerHelper.tqcontains(org_mid);
bool org_present = m_PlaybackMixerHelper.contains(org_mid);
const TQString &mid = org_present ? m_PlaybackMixerHelper.getCurrentItem() : org_mid;
const TQString &org_ch = m_Shifter->getPlaybackMixerChannel();
const TQString &ch = org_present ? m_PlaybackChannelHelper.getCurrentText() : org_ch;
@ -119,7 +119,7 @@ bool TimeShifterConfiguration::setPlaybackMixer(const TQString &_mixer_id, const
ISoundStreamClient *mixer = getSoundStreamClientWithID(mixer_id);
if (mixer) {
m_PlaybackChannelHelper.setData(mixer->getPlaybackChannels());
m_PlaybackChannelHelper.setCurrentText(m_PlaybackChannelHelper.tqcontains(Channel) ? Channel : m_Shifter->getPlaybackMixerChannel());
m_PlaybackChannelHelper.setCurrentText(m_PlaybackChannelHelper.contains(Channel) ? Channel : m_Shifter->getPlaybackMixerChannel());
}
labelPlaybackMixerChannel->setEnabled(mixer != NULL);
comboPlaybackMixerChannel->setEnabled(mixer != NULL);

@ -131,7 +131,7 @@ void V4LRadioConfiguration::noticeConnectedSoundClient(ISoundStreamClient::thisI
{
if (i && pointer_valid && i->supportsPlayback()) {
const TQString &org_mid = queryPlaybackMixerID();
bool org_present = m_PlaybackMixerHelper.tqcontains(org_mid);
bool org_present = m_PlaybackMixerHelper.contains(org_mid);
const TQString &mid = org_present ? m_PlaybackMixerHelper.getCurrentItem() : org_mid;
const TQString &org_ch = queryPlaybackMixerChannel();
const TQString &ch = org_present ? m_PlaybackChannelHelper.getCurrentText() : org_ch;
@ -139,7 +139,7 @@ void V4LRadioConfiguration::noticeConnectedSoundClient(ISoundStreamClient::thisI
}
if (i && pointer_valid && i->supportsCapture()) {
const TQString &org_mid = queryCaptureMixerID();
bool org_present = m_CaptureMixerHelper.tqcontains(org_mid);
bool org_present = m_CaptureMixerHelper.contains(org_mid);
const TQString &mid = org_present ? m_CaptureMixerHelper.getCurrentItem() : org_mid;
const TQString &org_ch = queryCaptureMixerChannel();
const TQString &ch = org_present ? m_CaptureChannelHelper.getCurrentText() : org_ch;
@ -185,7 +185,7 @@ bool V4LRadioConfiguration::noticePlaybackMixerChanged(const TQString &_mixer_id
ISoundStreamClient *mixer = getSoundStreamClientWithID(mixer_id);
if (mixer) {
m_PlaybackChannelHelper.setData(mixer->getPlaybackChannels());
m_PlaybackChannelHelper.setCurrentText(m_PlaybackChannelHelper.tqcontains(Channel) ? Channel : queryPlaybackMixerChannel());
m_PlaybackChannelHelper.setCurrentText(m_PlaybackChannelHelper.contains(Channel) ? Channel : queryPlaybackMixerChannel());
}
labelPlaybackMixerChannel->setEnabled(mixer != NULL);
comboPlaybackMixerChannel->setEnabled(mixer != NULL);
@ -208,7 +208,7 @@ bool V4LRadioConfiguration::noticeCaptureMixerChanged(const TQString &_mixer_id,
ISoundStreamClient *mixer = getSoundStreamClientWithID(mixer_id);
if (mixer) {
m_CaptureChannelHelper.setData(mixer->getCaptureChannels());
m_CaptureChannelHelper.setCurrentText(m_CaptureChannelHelper.tqcontains(Channel) ? Channel : queryCaptureMixerChannel());
m_CaptureChannelHelper.setCurrentText(m_CaptureChannelHelper.contains(Channel) ? Channel : queryCaptureMixerChannel());
}
labelCaptureMixerChannel->setEnabled(mixer != NULL);
comboCaptureMixerChannel->setEnabled(mixer != NULL);

@ -49,7 +49,7 @@ void Profiler::startProfile(const TQString &descr)
{
stopInternalCounter();
if (m_ProfileData.tqcontains(descr)) {
if (m_ProfileData.contains(descr)) {
profile_data &d = m_ProfileData[descr];
d.startCounter = m_internalCounter;
} else {
@ -64,7 +64,7 @@ void Profiler::stopProfile (const TQString &descr)
{
stopInternalCounter();
if (!descr.isNull() && m_ProfileData.tqcontains(descr)) {
if (!descr.isNull() && m_ProfileData.contains(descr)) {
profile_data &d = m_ProfileData[descr];
long long diff = m_internalCounter - d.startCounter;
d.accumulatedCounter += diff;

@ -30,10 +30,10 @@ public:
void setData(const TQValueList<TQString> &data);
TQString getCurrentText() const { return m_List->currentText(); }
void setCurrentText(const TQString &s) { m_List->setCurrentItem(m_revData.tqcontains(s) ? m_revData[s] : 0); }
void setCurrentText(const TQString &s) { m_List->setCurrentItem(m_revData.contains(s) ? m_revData[s] : 0); }
int count() const { return m_revData.count(); }
bool tqcontains(const TQString &id) const { return m_revData.tqcontains(id); }
bool contains(const TQString &id) const { return m_revData.contains(id); }
protected:
TLIST *m_List;
@ -79,7 +79,7 @@ public:
int count() const { return m_Index2ID.count(); }
bool tqcontains(const TID &id) const { return m_ID2Index.tqcontains(id); }
bool contains(const TID &id) const { return m_ID2Index.contains(id); }
protected:
SORT_KEY m_skey;
@ -158,7 +158,7 @@ void GUIListHelper<TLIST, TID>::setData (const TQMap<TID, TQString> &data)
template <class TLIST, class TID>
void GUIListHelper<TLIST, TID>::setCurrentItem(const TID &id) const
{
if (m_ID2Index.tqcontains(id))
if (m_ID2Index.contains(id))
m_List->setCurrentItem(m_ID2Index[id]);
else
m_List->setCurrentItem(0);

@ -373,7 +373,7 @@ public:
thisIF *initThisInterfacePointer();
thisIF *getThisInterfacePointer() const { return me; }
bool isThisInterfacePointerValid() const { return me_valid; }
bool hasConnectionTo(cmplInterface *other) const { return iConnections.tqcontainsRef(other); }
bool hasConnectionTo(cmplInterface *other) const { return iConnections.containsRef(other); }
void appendConnectionTo(cmplInterface *other) { iConnections.append(other); }
void removeConnectionTo(cmplInterface *other) { iConnections.removeRef(other); }
@ -576,7 +576,7 @@ bool InterfaceBase<thisIF, cmplIF>::connectI (Interface *__i)
cmplIF *i = _i->initThisInterfacePointer();
if (i && me) {
bool i_connected = iConnections.tqcontainsRef(i);
bool i_connected = iConnections.containsRef(i);
bool me_connected = i->hasConnectionTo(me);
if (i_connected || me_connected) {
@ -673,7 +673,7 @@ void InterfaceBase<thisIF, cmplIF>::disconnectAllI()
template <class thisIF, class cmplIF>
bool InterfaceBase<thisIF, cmplIF>::addListener(const cmplInterface *i, TQPtrList<cmplInterface> &list)
{
if (iConnections.tqcontainsRef(i) && !list.tqcontains(i)) {
if (iConnections.containsRef(i) && !list.contains(i)) {
list.append(i);
m_FineListeners[i].append(&list);
return true;
@ -687,7 +687,7 @@ template <class thisIF, class cmplIF>
void InterfaceBase<thisIF, cmplIF>::removeListener(const cmplInterface *i, TQPtrList<cmplInterface> &list)
{
list.remove(i);
if (m_FineListeners.tqcontains(i))
if (m_FineListeners.contains(i))
m_FineListeners[i].remove(&list);
}
@ -695,7 +695,7 @@ void InterfaceBase<thisIF, cmplIF>::removeListener(const cmplInterface *i, TQPtr
template <class thisIF, class cmplIF>
void InterfaceBase<thisIF, cmplIF>::removeListener(const cmplInterface *i)
{
if (m_FineListeners.tqcontains(i)) {
if (m_FineListeners.contains(i)) {
TQPtrList<TQPtrList<cmplInterface> > &list = m_FineListeners[i];
TQPtrListIterator<TQPtrList<cmplInterface> > it(list);
for (; it.current(); ++it) {

@ -72,7 +72,7 @@ public:
void inSort (const RadioStation *item);
void prepend (const RadioStation *item);
void append (const RadioStation *item);
bool tqreplace (uint index, const RadioStation *item);
bool replace (uint index, const RadioStation *item);
// simplify stationIDSearch
@ -123,7 +123,7 @@ public:
StationListMetaData & metaData() { return m_metaData; }
StationListMetaData const & metaData() const { return m_metaData; }
// we do not need a special matchingStation/tqfind/... method because
// we do not need a special matchingStation/find/... method because
// it is already implemented in RawStationList
/**

@ -283,7 +283,7 @@ KLibrary *KRadioApp::LoadLibrary (const TQString &library)
void KRadioApp::UnloadLibrary (const TQString &library)
{
if (!m_PluginLibraries.tqcontains(library))
if (!m_PluginLibraries.contains(library))
return;
PluginLibraryInfo info = m_PluginLibraries[library];
@ -314,7 +314,7 @@ PluginBase *KRadioApp::CreatePlugin (PluginManager *manager, const TQString &cla
BlockProfiler create_profiler("KRadioApp::CreatePlugin - create");
PluginBase *retval = NULL;
if (m_PluginInfos.tqcontains(class_name)) {
if (m_PluginInfos.contains(class_name)) {
retval = m_PluginInfos[class_name].CreateInstance(object_name);
if (!retval) {
kdDebug() << TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)

@ -80,7 +80,7 @@ void PluginManagerConfiguration::noticePluginsChanged()
for (PluginIterator it(plugins); it.current(); ++it) {
TQString class_name = it.current()->pluginClassName();
if (classes.tqcontains(class_name)) {
if (classes.contains(class_name)) {
TQString obj_name = it.current()->name();
listPluginInstances->insertItem(new KListViewItem(listPluginInstances, class_name, obj_name, classes[class_name].description));
}

@ -116,7 +116,7 @@ void PluginManager::addWidgetPluginMenuItems(TQMenuData *menu, TQMap<WidgetPlugi
void PluginManager::updateWidgetPluginMenuItem(WidgetPluginBase *b, TQMenuData *menu, TQMap<WidgetPluginBase *,int> &map, bool shown) const
{
if (!b || !map.tqcontains(b))
if (!b || !map.contains(b))
return;
const TQString &name = b->description();
@ -211,7 +211,7 @@ void PluginManager::insertPlugin(PluginBase *p)
void PluginManager::deletePlugin(PluginBase *p)
{
if (p && m_plugins.tqcontains(p)) {
if (p && m_plugins.contains(p)) {
removePlugin(p);
delete p;
}
@ -220,7 +220,7 @@ void PluginManager::deletePlugin(PluginBase *p)
void PluginManager::removePlugin(PluginBase *p)
{
if (p && m_plugins.tqcontains(p)) {
if (p && m_plugins.contains(p)) {
for (PluginIterator it(m_plugins); it.current(); ++it) {
if (it.current() != p) {
@ -236,12 +236,12 @@ void PluginManager::removePlugin(PluginBase *p)
// remove config page from config dialog, only chance is to delete it
// plugin will be notified automatically (mechanism implemented by
// PluginBase)
while (TQFrame *f = m_configPageFrames.tqfind(p)) {
while (TQFrame *f = m_configPageFrames.find(p)) {
m_configPageFrames.remove(p);
m_configPages.remove(p);
delete f;
}
while (TQFrame *f = m_aboutPageFrames.tqfind(p)) {
while (TQFrame *f = m_aboutPageFrames.find(p)) {
m_aboutPageFrames.remove(p);
m_aboutPages.remove(p);
delete f;
@ -265,7 +265,7 @@ void PluginManager::removePlugin(PluginBase *p)
void PluginManager::addConfigurationPage (PluginBase *forWhom,
const ConfigPageInfo &info)
{
if (!forWhom || !m_plugins.tqcontainsRef(forWhom) || !info.page)
if (!forWhom || !m_plugins.containsRef(forWhom) || !info.page)
return;
TQFrame *f = addConfigurationPage(info);
@ -362,7 +362,7 @@ void PluginManager::addAboutPage (PluginBase *forWhom,
if (!m_aboutDialog)
createAboutDialog(i18n(m_aboutDialogTitle.ascii()));
if ( !forWhom || !m_plugins.tqcontainsRef(forWhom)
if ( !forWhom || !m_plugins.containsRef(forWhom)
|| !m_aboutDialog || !info.page)
return;
@ -419,7 +419,7 @@ void PluginManager::saveState (KConfig *c) const
TQString class_name = it.current()->pluginClassName();
TQString object_name = it.current()->name();
if (class_name.length() && object_name.length() &&
m_Application->getPluginClasses().tqcontains(class_name))
m_Application->getPluginClasses().contains(class_name))
{
++n;
c->writeEntry("plugin_class_" + TQString::number(n), class_name);

@ -128,7 +128,7 @@ void RadioStation::generateNewStationID()
RadioStation const *RadioStation::getStationClass(const TQString &classname)
{
if (stationClassRegistry)
return stationClassRegistry->tqfind(classname);
return stationClassRegistry->find(classname);
else
return NULL;
}

@ -104,7 +104,7 @@ bool RawStationList::insert (const RadioStation * item )
if (!item) return false;
int idx = idxWithID(item->stationID());
if (idx >= 0) {
return tqreplace(idx, item);
return replace(idx, item);
} else {
append(item);
return true;
@ -145,11 +145,11 @@ void RawStationList::append ( const RadioStation * item )
}
bool RawStationList::tqreplace ( uint index, const RadioStation * item )
bool RawStationList::replace ( uint index, const RadioStation * item )
{
bool r = true;
RadioStation *rs = &stationWithID(item->stationID());
r = BaseClass::tqreplace(index, item);
r = BaseClass::replace(index, item);
if (rs != item) {
BaseClass::removeRef(rs);
}
@ -379,7 +379,7 @@ bool StationList::readXML (const KURL &url, const IErrorLogClient &logger, bool
presetFile.reset();
// preset file written with kradio <= 0.2.x
if (tmp.tqfind("<format>") < 0) {
if (tmp.find("<format>") < 0) {
logger.logInfo(i18n("Old Preset File Format detected"));
TQTextStream ins(&presetFile);
ins.setEncoding(TQTextStream::Locale);

@ -68,14 +68,14 @@ bool StationSelector::noticeStationSelectionChanged(const TQStringList &sl)
m_stationIDsAvailable.clear();
for (unsigned int i = 0; i < m_stationIDsAll.count(); ++i) {
if (sl.tqcontains(m_stationIDsAll[i])) {
if (sl.contains(m_stationIDsAll[i])) {
m_stationIDsSelected.append(m_stationIDsAll[i]);
} else {
m_stationIDsAvailable.append(m_stationIDsAll[i]);
}
}
for (unsigned int i = 0; i < sl.count(); ++i) {
if (!m_stationIDsAll.tqcontains(sl[i]))
if (!m_stationIDsAll.contains(sl[i]))
m_stationIDsNotDisplayed.append(sl[i]);
}
updateListViews();
@ -103,7 +103,7 @@ bool StationSelector::noticeStationsChanged(const StationList &sl)
const TQString &id = i.current()->stationID();
m_stationIDsAll.append(id);
if (m_stationIDsNotDisplayed.tqcontains(id)) {
if (m_stationIDsNotDisplayed.contains(id)) {
m_stationIDsNotDisplayed.remove(id);
m_stationIDsSelected.append(id);
} else {
@ -171,7 +171,7 @@ void StationSelector::slotMoveToRight(const TQStringList &list)
while (item) {
TQListViewItem *next_item = item->nextSibling();
if (list.tqcontains(m_stationIDsAvailable[idx_from])) {
if (list.contains(m_stationIDsAvailable[idx_from])) {
moveItem (listAvailable, m_stationIDsAvailable,
item, idx_from,
@ -194,7 +194,7 @@ void StationSelector::slotMoveToLeft(const TQStringList &list)
while (item) {
TQListViewItem *next_item = item->nextSibling();
if (list.tqcontains(m_stationIDsSelected[idx_from])) {
if (list.contains(m_stationIDsSelected[idx_from])) {
moveItem (listSelected, m_stationIDsSelected,
item, idx_from,

@ -26,11 +26,11 @@
TQString XMLEscape (const TQString &s)
{
TQString c = s;
c.tqreplace(TQRegExp("&"), "&amp;");
c.tqreplace(TQRegExp("<"), "&lt;");
c.tqreplace(TQRegExp(">"), "&gt;");
c.tqreplace(TQRegExp("\""), "&quot;");
c.tqreplace(TQRegExp("'"), "&apos;");
c.replace(TQRegExp("&"), "&amp;");
c.replace(TQRegExp("<"), "&lt;");
c.replace(TQRegExp(">"), "&gt;");
c.replace(TQRegExp("\""), "&quot;");
c.replace(TQRegExp("'"), "&apos;");
return c;
}

Loading…
Cancel
Save