summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-26 17:42:48 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-26 17:42:48 -0600
commit4b3c5dd929ea78ca3b6f656a63d70b10d2f43885 (patch)
tree995c0d3e35794c1bb1029d6b7eacdd80827807bd /src/gui
parent1461610fb35bb0fcee490f274ea84b8ebfeb1566 (diff)
downloadrosegarden-4b3c5dd929ea78ca3b6f656a63d70b10d2f43885.tar.gz
rosegarden-4b3c5dd929ea78ca3b6f656a63d70b10d2f43885.zip
Fix FTBFS
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/application/RosegardenGUIApp.cpp32
-rw-r--r--src/gui/application/RosegardenGUIView.cpp6
-rw-r--r--src/gui/application/StartupTester.cpp2
-rw-r--r--src/gui/application/main.cpp8
-rw-r--r--src/gui/configuration/AudioConfigurationPage.cpp2
-rw-r--r--src/gui/configuration/NotationConfigurationPage.cpp14
-rw-r--r--src/gui/dialogs/AudioManagerDialog.cpp8
-rw-r--r--src/gui/dialogs/AudioPluginDialog.cpp2
-rw-r--r--src/gui/dialogs/ConfigureDialog.cpp8
-rw-r--r--src/gui/dialogs/ConfigureDialogBase.cpp2
-rw-r--r--src/gui/dialogs/DocumentConfigureDialog.cpp6
-rw-r--r--src/gui/dialogs/EventEditDialog.cpp30
-rw-r--r--src/gui/dialogs/IdentifyTextCodecDialog.cpp2
-rw-r--r--src/gui/dialogs/KeySignatureDialog.cpp2
-rw-r--r--src/gui/dialogs/TimeSignatureDialog.cpp2
-rw-r--r--src/gui/dialogs/TransportDialog.cpp6
-rw-r--r--src/gui/editors/guitar/NoteSymbols.h2
-rw-r--r--src/gui/editors/matrix/MatrixCanvasView.cpp2
-rw-r--r--src/gui/editors/matrix/MatrixSelector.cpp4
-rw-r--r--src/gui/editors/matrix/MatrixView.cpp2
-rw-r--r--src/gui/editors/notation/NotationCanvasView.cpp4
-rw-r--r--src/gui/editors/notation/NotationElement.cpp2
-rw-r--r--src/gui/editors/notation/NotationSelector.cpp2
-rw-r--r--src/gui/editors/notation/NotationStaff.cpp2
-rw-r--r--src/gui/editors/notation/NotationVLayout.cpp2
-rw-r--r--src/gui/editors/notation/NotationView.cpp68
-rw-r--r--src/gui/editors/notation/NoteFontFactory.cpp2
-rw-r--r--src/gui/editors/notation/NoteFontMap.cpp92
-rw-r--r--src/gui/editors/notation/NoteInserter.cpp8
-rw-r--r--src/gui/editors/notation/NotePixmapFactory.cpp4
-rw-r--r--src/gui/editors/notation/NoteStyleFactory.cpp2
-rw-r--r--src/gui/editors/notation/NoteStyleFileReader.cpp18
-rw-r--r--src/gui/editors/notation/RestInserter.cpp6
-rw-r--r--src/gui/editors/segment/PlayList.cpp2
-rw-r--r--src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h2
-rw-r--r--src/gui/general/ClefIndex.cpp4
-rw-r--r--src/gui/general/EditView.cpp6
-rw-r--r--src/gui/general/EditViewBase.cpp2
-rw-r--r--src/gui/general/PresetGroup.cpp16
-rw-r--r--src/gui/kdeext/QCanvasSimpleSprite.cpp8
-rw-r--r--src/gui/seqmanager/ControlBlockMmapper.cpp4
-rw-r--r--src/gui/seqmanager/SegmentMmapper.cpp4
-rw-r--r--src/gui/seqmanager/SequenceManager.cpp6
-rw-r--r--src/gui/studio/AudioMixerWindow.cpp6
-rw-r--r--src/gui/studio/AudioPluginOSCGUI.cpp18
-rw-r--r--src/gui/studio/AudioPluginOSCGUIManager.cpp2
-rw-r--r--src/gui/studio/DeviceEditorDialog.cpp2
-rw-r--r--src/gui/studio/NameSetEditor.cpp4
-rw-r--r--src/gui/widgets/HSpinBox.cpp2
-rw-r--r--src/gui/widgets/QuantizeParameters.cpp16
50 files changed, 231 insertions, 227 deletions
diff --git a/src/gui/application/RosegardenGUIApp.cpp b/src/gui/application/RosegardenGUIApp.cpp
index 7bfdfb1..268affe 100644
--- a/src/gui/application/RosegardenGUIApp.cpp
+++ b/src/gui/application/RosegardenGUIApp.cpp
@@ -2008,12 +2008,12 @@ void RosegardenGUIApp::saveGlobalProperties(KConfig *cfg)
TQString errMsg;
bool res = m_doc->saveDocument(tempname, errMsg);
if (!res) {
- if (errMsg)
+ if (!errMsg.isNull())
KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2")
- .tqarg(tempname).tqarg(errMsg)));
+ .tqarg(tempname).tqarg(errMsg).ascii()));
else
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);
if (!res) {
- if (errMsg)
+ if (!errMsg.isNull())
KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2")
- .tqarg(docFilePath).tqarg(errMsg)));
+ .tqarg(docFilePath).tqarg(errMsg).ascii()));
else
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
// KFileDialog::getSaveFileName
- KFileDialog saveFileDialog(":ROSEGARDEN", descriptiveExtension,this, label, true);
+ KFileDialog saveFileDialog(TQString(":ROSEGARDEN"), descriptiveExtension, TQT_TQWIDGET(this), label.ascii(), true);
saveFileDialog.setOperationMode(KFileDialog::Saving);
if (m_doc) {
TQString saveFileName = m_doc->getAbsFilePath();
@@ -2319,7 +2319,7 @@ RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension,
//
if (!extension.isEmpty()) {
static TQRegExp rgFile("\\..{1,4}$");
- if (rgFile.match(name) == -1) {
+ if (rgFile.search(name) == -1) {
name += extension;
}
}
@@ -2374,12 +2374,12 @@ bool RosegardenGUIApp::slotFileSaveAs()
TQString errMsg;
bool res = m_doc->saveDocument(newName, errMsg);
if (!res) {
- if (errMsg)
+ if (!errMsg.isNull())
KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2")
- .tqarg(newName).tqarg(errMsg)));
+ .tqarg(newName).tqarg(errMsg).ascii()));
else
KMessageBox::error(this, i18n(TQString("Could not save document at %1")
- .tqarg(newName)));
+ .tqarg(newName).ascii()));
} else {
@@ -7566,7 +7566,7 @@ RosegardenGUIApp::slotTutorial()
{
TQString exe = KStandardDirs::findExe( "x-www-browser" );
- if( exe )
+ if( !exe.isNull() )
{
KProcess *proc = new KProcess;
*proc << "x-www-browser";
@@ -7588,7 +7588,7 @@ RosegardenGUIApp::slotBugGuidelines()
{
TQString exe = KStandardDirs::findExe( "x-www-browser" );
- if( exe )
+ if( !exe.isNull() )
{
KProcess *proc = new KProcess;
*proc << "x-www-browser";
@@ -7751,12 +7751,12 @@ RosegardenGUIApp::slotSaveDefaultStudio()
TQString errMsg;
bool res = m_doc->saveDocument(autoloadFile, errMsg);
if (!res) {
- if (errMsg)
+ if (!errMsg.isNull())
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
KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1")
- .tqarg(autoloadFile)));
+ .tqarg(autoloadFile).ascii()));
}
}
diff --git a/src/gui/application/RosegardenGUIView.cpp b/src/gui/application/RosegardenGUIView.cpp
index 83784f2..702e6db 100644
--- a/src/gui/application/RosegardenGUIView.cpp
+++ b/src/gui/application/RosegardenGUIView.cpp
@@ -844,7 +844,7 @@ void RosegardenGUIView::slotEditSegmentAudio(Segment *segment)
if (splitCommand.size() == 0) {
std::cerr << "RosegardenGUIView::slotEditSegmentAudio() - "
- << "external editor \"" << application.data()
+ << "external editor \"" << application.ascii()
<< "\" not found" << std::endl;
KMessageBox::sorry(this,
@@ -856,7 +856,7 @@ void RosegardenGUIView::slotEditSegmentAudio(Segment *segment)
TQFileInfo *appInfo = new TQFileInfo(splitCommand[0]);
if (appInfo->exists() == false || appInfo->isExecutable() == false) {
std::cerr << "RosegardenGUIView::slotEditSegmentAudio() - "
- << "can't execute \"" << splitCommand[0] << "\""
+ << "can't execute \"" << splitCommand[0].ascii() << "\""
<< std::endl;
return;
}
@@ -1516,7 +1516,7 @@ RosegardenGUIView::slotDroppedNewAudio(TQString audioDesc)
s >> trackId;
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();
AudioFileManager &aFM = getDocument()->getAudioFileManager();
diff --git a/src/gui/application/StartupTester.cpp b/src/gui/application/StartupTester.cpp
index 0c3eb90..7a7850b 100644
--- a/src/gui/application/StartupTester.cpp
+++ b/src/gui/application/StartupTester.cpp
@@ -235,7 +235,7 @@ StartupTester::slotHttpDone(bool error)
TQString latestVersion = lines[0];
std::cerr << "Comparing current version \"" << VERSION
- << "\" with latest version \"" << latestVersion << "\""
+ << "\" with latest version \"" << latestVersion.ascii() << "\""
<< std::endl;
if (isVersionNewerThan(latestVersion, VERSION)) {
emit newerVersionAvailable(latestVersion);
diff --git a/src/gui/application/main.cpp b/src/gui/application/main.cpp
index 51230e8..8d771d2 100644
--- a/src/gui/application/main.cpp
+++ b/src/gui/application/main.cpp
@@ -350,20 +350,20 @@ void testInstalledVersion()
TQString versionLocation = locate("appdata", "version.txt");
TQString installedVersion;
- if (versionLocation) {
+ if (!versionLocation.isNull()) {
TQFile versionFile(versionLocation);
if (versionFile.open(IO_ReadOnly)) {
TQTextStream text(&versionFile);
TQString s = text.readLine().stripWhiteSpace();
versionFile.close();
- if (s) {
+ if (!s.isNull()) {
if (s == VERSION) return;
installedVersion = s;
}
}
}
- if (installedVersion) {
+ if (!installedVersion.isNull()) {
KMessageBox::detailedError
(0,
@@ -724,7 +724,7 @@ int main(int argc, char *argv[])
TQLabel *image = new TQLabel(hb);
image->tqsetAlignment(TQt::AlignTop);
TQString iconFile = locate("appdata", "pixmaps/misc/welcome-icon.png");
- if (iconFile) {
+ if (!iconFile.isNull()) {
image->setPixmap(TQPixmap(iconFile));
}
TQLabel *label = new TQLabel(hb);
diff --git a/src/gui/configuration/AudioConfigurationPage.cpp b/src/gui/configuration/AudioConfigurationPage.cpp
index e7d6128..90403b7 100644
--- a/src/gui/configuration/AudioConfigurationPage.cpp
+++ b/src/gui/configuration/AudioConfigurationPage.cpp
@@ -119,7 +119,7 @@ AudioConfigurationPage::AudioConfigurationPage(
TQString defaultAudioEditor = getBestAvailableAudioEditor();
- std::cerr << "defaultAudioEditor = " << defaultAudioEditor << std::endl;
+ std::cerr << "defaultAudioEditor = " << defaultAudioEditor.ascii() << std::endl;
TQString externalAudioEditor = m_cfg->readEntry("externalaudioeditor",
defaultAudioEditor);
diff --git a/src/gui/configuration/NotationConfigurationPage.cpp b/src/gui/configuration/NotationConfigurationPage.cpp
index e132a25..4296773 100644
--- a/src/gui/configuration/NotationConfigurationPage.cpp
+++ b/src/gui/configuration/NotationConfigurationPage.cpp
@@ -592,7 +592,7 @@ NotationConfigurationPage::slotViewButtonPressed()
(void)viewer->exec(); // no return value
}
} catch (Exception f) {
- KMessageBox::error(0, i18n(strtoqstr(f.getMessage())));
+ KMessageBox::error(0, i18n(strtoqstr(f.getMessage()).ascii()));
}
#endif
}
@@ -656,21 +656,21 @@ NotationConfigurationPage::slotFontComboChanged(int index)
NoteFont *noteFont = NoteFontFactory::getFont
(fontStr, NoteFontFactory::getDefaultSize(fontStr));
const NoteFontMap &map(noteFont->getNoteFontMap());
- m_fontOriginLabel->setText(i18n(strtoqstr(map.getOrigin())));
- m_fontCopyrightLabel->setText(i18n(strtoqstr(map.getCopyright())));
- m_fontMappedByLabel->setText(i18n(strtoqstr(map.getMappedBy())));
+ m_fontOriginLabel->setText(i18n(strtoqstr(map.getOrigin()).ascii()));
+ m_fontCopyrightLabel->setText(i18n(strtoqstr(map.getCopyright()).ascii()));
+ m_fontMappedByLabel->setText(i18n(strtoqstr(map.getMappedBy()).ascii()));
if (map.isSmooth()) {
m_fontTypeLabel->setText(
- i18n("%1 (smooth)").tqarg(i18n(strtoqstr(map.getType()))));
+ i18n("%1 (smooth)").tqarg(i18n(strtoqstr(map.getType()).ascii())));
} else {
m_fontTypeLabel->setText(
- i18n("%1 (jaggy)").tqarg(i18n(strtoqstr(map.getType()))));
+ i18n("%1 (jaggy)").tqarg(i18n(strtoqstr(map.getType()).ascii())));
}
if (m_viewButton) {
m_viewButton->setEnabled(map.getSystemFontNames().count() > 0);
}
} catch (Exception f) {
- KMessageBox::error(0, i18n(strtoqstr(f.getMessage())));
+ KMessageBox::error(0, i18n(strtoqstr(f.getMessage()).ascii()));
}
}
diff --git a/src/gui/dialogs/AudioManagerDialog.cpp b/src/gui/dialogs/AudioManagerDialog.cpp
index b2a2142..0c38cc2 100644
--- a/src/gui/dialogs/AudioManagerDialog.cpp
+++ b/src/gui/dialogs/AudioManagerDialog.cpp
@@ -882,7 +882,7 @@ AudioManagerDialog::slotDeleteUnused()
}
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]);
if (!file.remove()) {
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]]);
emit deleteAudioFile(nameMap[names[i]]);
} 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]));
@@ -1150,7 +1150,7 @@ AudioManagerDialog::slotDropped(TQDropEvent *event, TQListViewItem*)
// see if we can decode a URI.. if not, just ignore it
if (TQUriDrag::decode(event, uri)) {
// 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 "
<< url << endl;
@@ -1222,7 +1222,7 @@ AudioManagerDialog::slotDistributeOnMidiSegment()
//Composition &comp = m_doc->getComposition();
- TQList<RosegardenGUIView>& viewList = m_doc->getViewList();
+ TQPtrList<RosegardenGUIView>& viewList = m_doc->getViewList();
RosegardenGUIView *w = 0;
SegmentSelection selection;
diff --git a/src/gui/dialogs/AudioPluginDialog.cpp b/src/gui/dialogs/AudioPluginDialog.cpp
index e3a32a2..97b4e7f 100644
--- a/src/gui/dialogs/AudioPluginDialog.cpp
+++ b/src/gui/dialogs/AudioPluginDialog.cpp
@@ -281,7 +281,7 @@ AudioPluginDialog::populatePluginList()
if (needCategory) {
TQString cat = "";
- if ((*i)->getCategory())
+ if (!((*i)->getCategory()).isNull())
cat = (*i)->getCategory();
if (cat != category)
continue;
diff --git a/src/gui/dialogs/ConfigureDialog.cpp b/src/gui/dialogs/ConfigureDialog.cpp
index 9d07860..c8e7341 100644
--- a/src/gui/dialogs/ConfigureDialog.cpp
+++ b/src/gui/dialogs/ConfigureDialog.cpp
@@ -73,7 +73,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
//
pageWidget = addPage(GeneralConfigurationPage::iconLabel(),
GeneralConfigurationPage::title(),
- loadIcon(GeneralConfigurationPage::iconName()));
+ loadIcon(GeneralConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new GeneralConfigurationPage(doc, cfg, pageWidget);
vlay->addWidget(page);
@@ -87,7 +87,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
pageWidget = addPage(MIDIConfigurationPage::iconLabel(),
MIDIConfigurationPage::title(),
- loadIcon(MIDIConfigurationPage::iconName()));
+ loadIcon(MIDIConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new MIDIConfigurationPage(doc, cfg, pageWidget);
vlay->addWidget(page);
@@ -96,7 +96,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
pageWidget = addPage(AudioConfigurationPage::iconLabel(),
AudioConfigurationPage::title(),
- loadIcon(AudioConfigurationPage::iconName()));
+ loadIcon(AudioConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new AudioConfigurationPage(doc, cfg, pageWidget);
vlay->addWidget(page);
@@ -106,7 +106,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
// Notation Page
pageWidget = addPage(NotationConfigurationPage::iconLabel(),
NotationConfigurationPage::title(),
- loadIcon(NotationConfigurationPage::iconName()));
+ loadIcon(NotationConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new NotationConfigurationPage(cfg, pageWidget);
vlay->addWidget(page);
diff --git a/src/gui/dialogs/ConfigureDialogBase.cpp b/src/gui/dialogs/ConfigureDialogBase.cpp
index 017e6a6..3102922 100644
--- a/src/gui/dialogs/ConfigureDialogBase.cpp
+++ b/src/gui/dialogs/ConfigureDialogBase.cpp
@@ -38,7 +38,7 @@ namespace Rosegarden
ConfigureDialogBase::ConfigureDialogBase(TQWidget *parent,
TQString label,
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
{
setWFlags(WDestructiveClose);
diff --git a/src/gui/dialogs/DocumentConfigureDialog.cpp b/src/gui/dialogs/DocumentConfigureDialog.cpp
index ff855d7..06165e1 100644
--- a/src/gui/dialogs/DocumentConfigureDialog.cpp
+++ b/src/gui/dialogs/DocumentConfigureDialog.cpp
@@ -71,7 +71,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc,
//
pageWidget = addPage(DocumentMetaConfigurationPage::iconLabel(),
DocumentMetaConfigurationPage::title(),
- loadIcon(DocumentMetaConfigurationPage::iconName()));
+ loadIcon(DocumentMetaConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new DocumentMetaConfigurationPage(doc, pageWidget);
vlay->addWidget(page);
@@ -82,7 +82,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc,
//
pageWidget = addPage(AudioPropertiesPage::iconLabel(),
AudioPropertiesPage::title(),
- loadIcon(AudioPropertiesPage::iconName()));
+ loadIcon(AudioPropertiesPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new AudioPropertiesPage(doc, pageWidget);
vlay->addWidget(page);
@@ -92,7 +92,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc,
// Colour Page
pageWidget = addPage(ColourConfigurationPage::iconLabel(),
ColourConfigurationPage::title(),
- loadIcon(ColourConfigurationPage::iconName()));
+ loadIcon(ColourConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new ColourConfigurationPage(doc, pageWidget);
diff --git a/src/gui/dialogs/EventEditDialog.cpp b/src/gui/dialogs/EventEditDialog.cpp
index 0502fce..6bd4752 100644
--- a/src/gui/dialogs/EventEditDialog.cpp
+++ b/src/gui/dialogs/EventEditDialog.cpp
@@ -179,10 +179,10 @@ EventEditDialog::EventEditDialog(TQWidget *parent,
for (Event::PropertyNames::iterator i = p.begin();
i != p.end(); ++i) {
- new TQLabel(strtoqstr(*i), m_nonPersistentGrid, strtoqstr(*i));
- new TQLabel(strtoqstr(event.getPropertyTypeAsString(*i)), m_nonPersistentGrid, strtoqstr(*i));
- new TQLabel(strtoqstr(event.getAsString(*i)), m_nonPersistentGrid, strtoqstr(*i));
- TQPushButton *button = new TQPushButton("P", m_nonPersistentGrid, strtoqstr(*i));
+ new TQLabel(strtoqstr(*i), m_nonPersistentGrid, strtoqstr(*i).ascii());
+ new TQLabel(strtoqstr(event.getPropertyTypeAsString(*i)), m_nonPersistentGrid, strtoqstr(*i).ascii());
+ new TQLabel(strtoqstr(event.getAsString(*i)), m_nonPersistentGrid, strtoqstr(*i).ascii());
+ TQPushButton *button = new TQPushButton("P", m_nonPersistentGrid, strtoqstr(*i).ascii());
button->setFixedSize(TQSize(24, 24));
TQToolTip::add
(button, i18n("Make persistent"));
@@ -195,10 +195,10 @@ EventEditDialog::EventEditDialog(TQWidget *parent,
void
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 = new TQLabel(strtoqstr(m_originalEvent.getPropertyTypeAsString(name)),
- m_persistentGrid, strtoqstr(name));
+ m_persistentGrid, strtoqstr(name).ascii());
label->show();
PropertyType type(m_originalEvent.getPropertyType(name));
@@ -213,7 +213,7 @@ EventEditDialog::addPersistentProperty(const PropertyName &name)
max = 127;
}
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));
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotIntPropertyChanged(int)));
@@ -228,7 +228,7 @@ case UInt: {
max = 65535;
}
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));
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotIntPropertyChanged(int)));
@@ -244,7 +244,7 @@ case UInt: {
//
TQSpinBox *spinBox = new TQSpinBox
(INT_MIN, INT_MAX, 1,
- hbox, strtoqstr(name) + "%sec");
+ hbox, TQString(strtoqstr(name) + "%sec").ascii());
spinBox->setValue(realTime.sec);
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
@@ -254,7 +254,7 @@ case UInt: {
//
spinBox = new TQSpinBox
(INT_MIN, INT_MAX, 1,
- hbox, strtoqstr(name) + "%nsec");
+ hbox, TQString(strtoqstr(name) + "%nsec").ascii());
spinBox->setValue(realTime.nsec);
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
@@ -265,7 +265,7 @@ case UInt: {
case Bool: {
TQCheckBox *checkBox = new TQCheckBox
- ("", m_persistentGrid, strtoqstr(name));
+ ("", m_persistentGrid, strtoqstr(name).ascii());
checkBox->setChecked(m_originalEvent.get<Bool>(name));
TQObject::connect(checkBox, TQT_SIGNAL(activated()),
this, TQT_SLOT(slotBoolPropertyChanged()));
@@ -277,7 +277,7 @@ case UInt: {
TQLineEdit *lineEdit = new TQLineEdit
(strtoqstr(m_originalEvent.get<String>(name)),
m_persistentGrid,
- strtoqstr(name));
+ strtoqstr(name).ascii());
TQObject::connect(lineEdit, TQT_SIGNAL(textChanged(const TQString &)),
this, TQT_SLOT(slotStringPropertyChanged(const TQString &)));
lineEdit->show();
@@ -286,7 +286,7 @@ case UInt: {
}
TQPushButton *button = new TQPushButton("X", m_persistentGrid,
- strtoqstr(name));
+ strtoqstr(name).ascii());
button->setFixedSize(TQSize(24, 24));
TQToolTip::add
(button, i18n("Delete this property"));
@@ -438,7 +438,7 @@ EventEditDialog::slotPropertyDeleted()
return ;
m_modified = true;
- TQObjectList *list = m_persistentGrid->queryList(0, propertyName, false);
+ TQObjectList *list = m_persistentGrid->queryList(0, propertyName.ascii(), false);
TQObjectListIt i(*list);
TQObject *obj;
while ((obj = i.current()) != 0) {
@@ -470,7 +470,7 @@ EventEditDialog::slotPropertyMadePersistent()
i18n("Make &Persistent")) != KMessageBox::Continue)
return ;
- TQObjectList *list = m_nonPersistentGrid->queryList(0, propertyName, false);
+ TQObjectList *list = m_nonPersistentGrid->queryList(0, propertyName.ascii(), false);
TQObjectListIt i(*list);
TQObject *obj;
while ((obj = i.current()) != 0) {
diff --git a/src/gui/dialogs/IdentifyTextCodecDialog.cpp b/src/gui/dialogs/IdentifyTextCodecDialog.cpp
index 0a0dbd1..a3d905d 100644
--- a/src/gui/dialogs/IdentifyTextCodecDialog.cpp
+++ b/src/gui/dialogs/IdentifyTextCodecDialog.cpp
@@ -160,7 +160,7 @@ IdentifyTextCodecDialog::slotCodecSelected(int i)
// std::cerr << "codecs: ";
// for (int j = 0; j < m_codecs.size(); ++j) std::cerr << m_codecs[j] << " ";
// std::cerr << std::endl;
- TQTextCodec *codec = TQTextCodec::codecForName(strtoqstr(name));
+ TQTextCodec *codec = TQTextCodec::codecForName(strtoqstr(name).ascii());
if (!codec) return;
m_codec = qstrtostr(codec->name());
std::cerr << "Applying codec " << m_codec << std::endl;
diff --git a/src/gui/dialogs/KeySignatureDialog.cpp b/src/gui/dialogs/KeySignatureDialog.cpp
index 79f190c..a5e829d 100644
--- a/src/gui/dialogs/KeySignatureDialog.cpp
+++ b/src/gui/dialogs/KeySignatureDialog.cpp
@@ -89,7 +89,7 @@ KeySignatureDialog::KeySignatureDialog(TQWidget *parent,
nameBox = new TQHBox(keyFrame);
TQLabel *explanatoryLabel = 0;
- if (explanatoryText) {
+ if (!explanatoryText.isNull()) {
explanatoryLabel = new TQLabel(explanatoryText, keyFrame);
}
diff --git a/src/gui/dialogs/TimeSignatureDialog.cpp b/src/gui/dialogs/TimeSignatureDialog.cpp
index eae6501..7aae2aa 100644
--- a/src/gui/dialogs/TimeSignatureDialog.cpp
+++ b/src/gui/dialogs/TimeSignatureDialog.cpp
@@ -84,7 +84,7 @@ TimeSignatureDialog::TimeSignatureDialog(TQWidget *parent,
TQHBox *denomBox = new TQHBox(groupBox);
TQLabel *explanatoryLabel = 0;
- if (explanatoryText) {
+ if (!explanatoryText.isNull()) {
explanatoryLabel = new TQLabel(explanatoryText, groupBox);
}
diff --git a/src/gui/dialogs/TransportDialog.cpp b/src/gui/dialogs/TransportDialog.cpp
index d4c94a9..68c42a7 100644
--- a/src/gui/dialogs/TransportDialog.cpp
+++ b/src/gui/dialogs/TransportDialog.cpp
@@ -347,7 +347,7 @@ TransportDialog::loadPixmaps()
fileName = TQString("%1/transport/led-%2.xpm").tqarg(pixmapDir).tqarg(i);
if (!m_lcdList[i].load(fileName)) {
std::cerr << "TransportDialog - failed to load pixmap \""
- << fileName << "\"" << std::endl;
+ << fileName.ascii() << "\"" << std::endl;
}
}
@@ -959,7 +959,7 @@ TransportDialog::setMidiInLabel(const MappedEvent *mE)
void
TransportDialog::slotClearMidiInLabel()
{
- m_transport->InDisplay->setText(i18n(TQString("NO EVENTS")));
+ m_transport->InDisplay->setText(i18n(TQString("NO EVENTS").ascii()));
// also, just to be sure:
slotResetBackground();
@@ -1019,7 +1019,7 @@ TransportDialog::setMidiOutLabel(const MappedEvent *mE)
void
TransportDialog::slotClearMidiOutLabel()
{
- m_transport->OutDisplay->setText(i18n(TQString("NO EVENTS")));
+ m_transport->OutDisplay->setText(i18n(TQString("NO EVENTS").ascii()));
}
void
diff --git a/src/gui/editors/guitar/NoteSymbols.h b/src/gui/editors/guitar/NoteSymbols.h
index 9222a9a..fa52a45 100644
--- a/src/gui/editors/guitar/NoteSymbols.h
+++ b/src/gui/editors/guitar/NoteSymbols.h
@@ -27,6 +27,8 @@
#ifndef _RG_SYMBOLS_H_
#define _RG_SYMBOLS_H_
+#include <utility>
+
#include <tqbrush.h>
#include <tqpainter.h>
diff --git a/src/gui/editors/matrix/MatrixCanvasView.cpp b/src/gui/editors/matrix/MatrixCanvasView.cpp
index 9c56805..a6d71c8 100644
--- a/src/gui/editors/matrix/MatrixCanvasView.cpp
+++ b/src/gui/editors/matrix/MatrixCanvasView.cpp
@@ -106,7 +106,7 @@ void MatrixCanvasView::contentsMousePressEvent(TQMouseEvent* e)
QCanvasMatrixRectangle *mRect = 0;
- if (item->active()) {
+ if (item->isActive()) {
activeItem = item;
break;
}
diff --git a/src/gui/editors/matrix/MatrixSelector.cpp b/src/gui/editors/matrix/MatrixSelector.cpp
index 8d0f586..50a1692 100644
--- a/src/gui/editors/matrix/MatrixSelector.cpp
+++ b/src/gui/editors/matrix/MatrixSelector.cpp
@@ -520,7 +520,7 @@ void MatrixSelector::setViewCurrentSelection()
EventSelection* MatrixSelector::getSelection()
{
- if (!m_selectionRect->visible()) return 0;
+ if (!m_selectionRect->isVisible()) return 0;
Segment& originalSegment = m_currentStaff->getSegment();
EventSelection* selection = new EventSelection(originalSegment);
@@ -571,7 +571,7 @@ void MatrixSelector::setContextHelpFor(TQPoint p, bool ctrlPressed)
TQCanvasItem *item = *it;
QCanvasMatrixRectangle *mRect = 0;
- if (item->active()) {
+ if (item->isActive()) {
break;
}
diff --git a/src/gui/editors/matrix/MatrixView.cpp b/src/gui/editors/matrix/MatrixView.cpp
index 568f70f..195da46 100644
--- a/src/gui/editors/matrix/MatrixView.cpp
+++ b/src/gui/editors/matrix/MatrixView.cpp
@@ -907,7 +907,7 @@ void MatrixView::setupActions()
if (d == (crotchetDuration * 3) / 2) actionName = "snap_3";
new KAction(i18n("Snap to %1").tqarg(label), pixmap, cut, TQT_TQOBJECT(this),
TQT_SLOT(slotSetSnapFromAction()), actionCollection(),
- actionName);
+ actionName.ascii());
}
}
diff --git a/src/gui/editors/notation/NotationCanvasView.cpp b/src/gui/editors/notation/NotationCanvasView.cpp
index a80d04d..7e7f4c9 100644
--- a/src/gui/editors/notation/NotationCanvasView.cpp
+++ b/src/gui/editors/notation/NotationCanvasView.cpp
@@ -186,7 +186,7 @@ void NotationCanvasView::contentsMousePressEvent(TQMouseEvent *e)
for (it = itemList.begin(); it != itemList.end(); ++it) {
- if ((*it)->active()) {
+ if ((*it)->isActive()) {
emit activeItemPressed(e, *it);
return ;
}
@@ -284,7 +284,7 @@ NotationCanvasView::processActiveItems(TQMouseEvent* e,
for (it = itemList.begin(); it != itemList.end(); ++it) {
TQCanvasItem *item = *it;
- if (item->active() && !pressedItem) {
+ if (item->isActive() && !pressedItem) {
NOTATION_DEBUG << "mousepress : got active item\n";
pressedItem = item;
}
diff --git a/src/gui/editors/notation/NotationElement.cpp b/src/gui/editors/notation/NotationElement.cpp
index c23ebd6..5fa715f 100644
--- a/src/gui/editors/notation/NotationElement.cpp
+++ b/src/gui/editors/notation/NotationElement.cpp
@@ -184,7 +184,7 @@ NotationElement::reposition(double canvasX, double canvasY)
bool
NotationElement::isSelected()
{
- return m_canvasItem ? m_canvasItem->selected() : false;
+ return m_canvasItem ? m_canvasItem->isSelected() : false;
}
void
diff --git a/src/gui/editors/notation/NotationSelector.cpp b/src/gui/editors/notation/NotationSelector.cpp
index 6c6b04f..26114fe 100644
--- a/src/gui/editors/notation/NotationSelector.cpp
+++ b/src/gui/editors/notation/NotationSelector.cpp
@@ -824,7 +824,7 @@ EventSelection* NotationSelector::getSelection()
// If selection rect is not visible or too small,
// return 0
//
- if (!m_selectionRect->visible()) return 0;
+ if (!m_selectionRect->isVisible()) return 0;
// NOTATION_DEBUG << "Selection x,y: " << m_selectionRect->x() << ","
// << m_selectionRect->y() << "; w,h: " << m_selectionRect->width() << "," << m_selectionRect->height() << endl;
diff --git a/src/gui/editors/notation/NotationStaff.cpp b/src/gui/editors/notation/NotationStaff.cpp
index 729eddb..83575c6 100644
--- a/src/gui/editors/notation/NotationStaff.cpp
+++ b/src/gui/editors/notation/NotationStaff.cpp
@@ -935,7 +935,7 @@ NotationStaff::renderSingleElement(ViewElementList::iterator &vli,
static bool warned = false;
if (!warned) {
- KMessageBox::error(0, i18n(strtoqstr(u.getMessage())));
+ KMessageBox::error(0, i18n(strtoqstr(u.getMessage()).ascii()));
warned = true;
}
}
diff --git a/src/gui/editors/notation/NotationVLayout.cpp b/src/gui/editors/notation/NotationVLayout.cpp
index 55f4d76..af6a2fe 100644
--- a/src/gui/editors/notation/NotationVLayout.cpp
+++ b/src/gui/editors/notation/NotationVLayout.cpp
@@ -236,7 +236,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT)
if (!(*chord[j])->event()->get
<Int>
(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);
}
h.push_back(height);
diff --git a/src/gui/editors/notation/NotationView.cpp b/src/gui/editors/notation/NotationView.cpp
index 0a471d5..bd553ee 100644
--- a/src/gui/editors/notation/NotationView.cpp
+++ b/src/gui/editors/notation/NotationView.cpp
@@ -1527,7 +1527,7 @@ void NotationView::setupActions()
KToggleAction *fontAction =
new KToggleAction
(fontTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeFontFromAction()),
- actionCollection(), "note_font_" + fontTQName);
+ actionCollection(), TQString("note_font_" + fontTQName).ascii());
fontAction->setChecked(*i == m_fontName);
fontActionMenu->insert(fontAction);
@@ -1559,7 +1559,7 @@ void NotationView::setupActions()
new KToggleAction
(TQString("%1%").tqarg(*i), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotChangeSpacingFromAction()),
- actionCollection(), TQString("spacing_%1").tqarg(*i));
+ actionCollection(), TQString("spacing_%1").tqarg(*i).ascii());
spacingAction->setExclusiveGroup("spacing");
spacingAction->setChecked(*i == defaultSpacing);
@@ -1585,7 +1585,7 @@ void NotationView::setupActions()
new KToggleAction
(name, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotChangeProportionFromAction()),
- actionCollection(), TQString("proportion_%1").tqarg(*i));
+ actionCollection(), TQString("proportion_%1").tqarg(*i).ascii());
proportionAction->setExclusiveGroup("proportion");
proportionAction->setChecked(*i == defaultProportion);
@@ -1608,7 +1608,7 @@ void NotationView::setupActions()
KAction *styleAction =
new KAction
(styleTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetStyleFromAction()),
- actionCollection(), "style_" + styleTQName);
+ actionCollection(), TQString("style_" + styleTQName).ascii());
styleActionMenu->insert(styleAction);
}
@@ -1622,17 +1622,17 @@ void NotationView::setupActions()
new KAction
(i18n("Insert Rest"), Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotInsertRest()),
- actionCollection(), TQString("insert_rest"));
+ actionCollection(), TQString("insert_rest").ascii());
new KAction
(i18n("Switch from Note to Rest"), Key_T, TQT_TQOBJECT(this),
TQT_SLOT(slotSwitchFromNoteToRest()),
- actionCollection(), TQString("switch_from_note_to_rest"));
+ actionCollection(), TQString("switch_from_note_to_rest").ascii());
new KAction
(i18n("Switch from Rest to Note"), Key_Y, TQT_TQOBJECT(this),
TQT_SLOT(slotSwitchFromRestToNote()),
- actionCollection(), TQString("switch_from_rest_to_note"));
+ actionCollection(), TQString("switch_from_rest_to_note").ascii());
// setup Notes menu & toolbar
@@ -1646,14 +1646,14 @@ void NotationView::setupActions()
icon = TQIconSet
(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
- (noteActionData.pixmapName)));
+ (noteActionData.pixmapName.ascii())));
noteAction = new KRadioAction(noteActionData.title,
icon,
noteActionData.keycode,
TQT_TQOBJECT(this),
TQT_SLOT(slotNoteAction()),
actionCollection(),
- noteActionData.actionName);
+ noteActionData.actionName.ascii());
noteAction->setExclusiveGroup("notes");
if (noteActionData.noteType == Note::Crotchet &&
@@ -1671,7 +1671,7 @@ void NotationView::setupActions()
icon = TQIconSet
(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
- (data.pixmapName)));
+ (data.pixmapName.ascii())));
KAction *action = new KAction(data.title,
icon,
@@ -1679,7 +1679,7 @@ void NotationView::setupActions()
TQT_TQOBJECT(this),
TQT_SLOT(slotNoteChangeAction()),
actionCollection(),
- data.actionName);
+ data.actionName.ascii());
}
//
@@ -1700,10 +1700,10 @@ void NotationView::setupActions()
i < sizeof(actionsAccidental) / sizeof(actionsAccidental[0]); ++i) {
icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
- (actionsAccidental[i][3])));
+ (actionsAccidental[i][3].ascii())));
noteAction = new KRadioAction(actionsAccidental[i][0], icon, 0, TQT_TQOBJECT(this),
- actionsAccidental[i][1],
- actionCollection(), actionsAccidental[i][2]);
+ actionsAccidental[i][1].ascii(),
+ actionCollection(), actionsAccidental[i][2].ascii());
noteAction->setExclusiveGroup("accidentals");
}
@@ -2194,7 +2194,7 @@ void NotationView::setupActions()
TQT_TQOBJECT(this),
TQT_SLOT(slotAddMark()),
actionCollection(),
- markActionData.actionName);
+ markActionData.actionName.ascii());
}
icon = TQIconSet
@@ -2263,7 +2263,7 @@ void NotationView::setupActions()
for (int i = 0; i <= 5; ++i) {
new KAction(slashTitles[i], 0, TQT_TQOBJECT(this),
TQT_SLOT(slotAddSlashes()), actionCollection(),
- TQString("slashes_%1").tqarg(i));
+ TQString("slashes_%1").tqarg(i).ascii());
}
new KAction(ClefInsertionCommand::getGlobalName(), 0, TQT_TQOBJECT(this),
@@ -2315,11 +2315,11 @@ void NotationView::setupActions()
for (unsigned int i = 0;
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,
- TQT_TQOBJECT(this), actionsToolbars[i][1],
- actionCollection(), actionsToolbars[i][2]);
+ TQT_TQOBJECT(this), actionsToolbars[i][1].ascii(),
+ actionCollection(), actionsToolbars[i][2].ascii());
}
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) {
KAction *action =
actionCollection()->action
- (TQString("note_font_size_%1").tqarg(sizes[i]));
+ (TQString("note_font_size_%1").tqarg(sizes[i]).ascii());
m_fontSizeActionMenu->remove
(action);
@@ -2563,14 +2563,14 @@ NotationView::setupFontSizeMenu(std::string oldFontName)
TQString actionName = TQString("note_font_size_%1").tqarg(sizes[i]);
KToggleAction *sizeAction = dynamic_cast<KToggleAction *>
- (actionCollection()->action(actionName));
+ (actionCollection()->action(actionName.ascii()));
if (!sizeAction) {
sizeAction =
new KToggleAction(i18n("1 pixel", "%n pixels", sizes[i]),
0, TQT_TQOBJECT(this),
TQT_SLOT(slotChangeFontSizeFromAction()),
- actionCollection(), actionName);
+ actionCollection(), actionName.ascii());
}
sizeAction->setChecked(sizes[i] == m_fontSize);
@@ -3091,7 +3091,7 @@ void NotationView::setCurrentSelectedNote(const char *pixmapName,
void NotationView::setCurrentSelectedNote(const NoteActionData &noteAction)
{
- setCurrentSelectedNote(noteAction.pixmapName,
+ setCurrentSelectedNote(noteAction.pixmapName.ascii(),
noteAction.rest,
noteAction.noteType,
noteAction.dots);
@@ -3969,7 +3969,7 @@ void NotationView::slotNoteAction()
void NotationView::slotLastNoteAction()
{
- KAction *action = actionCollection()->action(m_lastNoteAction);
+ KAction *action = actionCollection()->action(m_lastNoteAction.ascii());
if (!action)
action = actionCollection()->action("crotchet");
@@ -3977,7 +3977,7 @@ void NotationView::slotLastNoteAction()
action->activate();
} else {
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);
KToggleAction *action = dynamic_cast<KToggleAction *>
- (actionCollection()->action(TQString("spacing_%1").tqarg(spacing)));
+ (actionCollection()->action(TQString("spacing_%1").tqarg(spacing).ascii()));
if (action)
action->setChecked(true);
else {
@@ -4390,7 +4390,7 @@ NotationView::slotChangeProportion(int proportion)
// m_proportionSlider->setSize(proportion);
KToggleAction *action = dynamic_cast<KToggleAction *>
- (actionCollection()->action(TQString("proportion_%1").tqarg(proportion)));
+ (actionCollection()->action(TQString("proportion_%1").tqarg(proportion).ascii()));
if (action)
action->setChecked(true);
else {
@@ -4544,7 +4544,7 @@ NotationView::slotChangeFont(std::string newName, int newSize)
if (thisOne)
m_fontCombo->setCurrentItem(i);
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;
if (action)
action->setChecked(thisOne);
@@ -4869,7 +4869,7 @@ void NotationView::slotEditGeneralPaste()
KMessageBox::detailedError
(this,
i18n("Couldn't paste at this point."),
- i18n(RESTRICTED_PASTE_FAILED_DESCRIPTION));
+ i18n(RESTRICTED_PASTE_FAILED_DESCRIPTION.ascii()));
} else {
addCommandToHistory(command);
setCurrentSelection(new EventSelection
@@ -5146,7 +5146,7 @@ void NotationView::slotToggleTransportToolBar()
void NotationView::toggleNamedToolBar(const TQString& toolBarName, bool* force)
{
- KToolBar *namedToolBar = toolBar(toolBarName);
+ KToolBar *namedToolBar = toolBar(toolBarName.ascii());
if (!namedToolBar) {
NOTATION_DEBUG << "NotationView::toggleNamedToolBar() : toolBar "
@@ -5661,11 +5661,11 @@ void NotationView::slotSwitchFromRestToNote()
actionName = actionName.replace("-", "_");
KRadioAction *action = dynamic_cast<KRadioAction *>
- (actionCollection()->action(actionName));
+ (actionCollection()->action(actionName.ascii()));
if (!action) {
std::cerr << "WARNING: Failed to find note action \""
- << actionName << "\"" << std::endl;
+ << actionName.ascii() << "\"" << std::endl;
} else {
action->activate();
}
@@ -5696,11 +5696,11 @@ void NotationView::slotSwitchFromNoteToRest()
actionName = actionName.replace("-", "_");
KRadioAction *action = dynamic_cast<KRadioAction *>
- (actionCollection()->action(actionName));
+ (actionCollection()->action(actionName.ascii()));
if (!action) {
std::cerr << "WARNING: Failed to find rest action \""
- << actionName << "\"" << std::endl;
+ << actionName.ascii() << "\"" << std::endl;
} else {
action->activate();
}
diff --git a/src/gui/editors/notation/NoteFontFactory.cpp b/src/gui/editors/notation/NoteFontFactory.cpp
index 80e0772..ec0a18f 100644
--- a/src/gui/editors/notation/NoteFontFactory.cpp
+++ b/src/gui/editors/notation/NoteFontFactory.cpp
@@ -78,7 +78,7 @@ NoteFontFactory::getFontNames(bool forceRescan)
TQDir dir(mappingDir);
if (!dir.exists()) {
std::cerr << "NoteFontFactory::getFontNames: mapping directory \""
- << mappingDir << "\" not found" << std::endl;
+ << mappingDir.ascii() << "\" not found" << std::endl;
return m_fontNames;
}
diff --git a/src/gui/editors/notation/NoteFontMap.cpp b/src/gui/editors/notation/NoteFontMap.cpp
index 9036f20..47fc9f5 100644
--- a/src/gui/editors/notation/NoteFontMap.cpp
+++ b/src/gui/editors/notation/NoteFontMap.cpp
@@ -147,7 +147,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s;
s = attributes.value("name");
- if (s) {
+ if (!s.isNull()) {
m_name = qstrtostr(s);
m_srcDirectory = m_name;
}
@@ -157,28 +157,28 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s;
s = attributes.value("origin");
- if (s)
+ if (!s.isNull())
m_origin = qstrtostr(s);
s = attributes.value("copyright");
- if (s)
+ if (!s.isNull())
m_copyright = qstrtostr(s);
s = attributes.value("mapped-by");
- if (s)
+ if (!s.isNull())
m_mappedBy = qstrtostr(s);
s = attributes.value("type");
- if (s)
+ if (!s.isNull())
m_type = qstrtostr(s);
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;
}
s = attributes.value("smooth");
- if (s)
+ if (!s.isNull())
m_smooth = (s.lower() == "true");
} else if (lcName == "font-sizes") {
@@ -195,46 +195,46 @@ NoteFontMap::startElement(const TQString &, const TQString &,
SizeData &sizeData = m_sizes[noteHeight];
s = attributes.value("staff-line-thickness");
- if (s)
+ if (!s.isNull())
sizeData.setStaffLineThickness(s.toInt());
s = attributes.value("leger-line-thickness");
- if (s)
+ if (!s.isNull())
sizeData.setLegerLineThickness(s.toInt());
s = attributes.value("stem-thickness");
- if (s)
+ if (!s.isNull())
sizeData.setStemThickness(s.toInt());
s = attributes.value("beam-thickness");
- if (s)
+ if (!s.isNull())
sizeData.setBeamThickness(s.toInt());
s = attributes.value("stem-length");
- if (s)
+ if (!s.isNull())
sizeData.setStemLength(s.toInt());
s = attributes.value("flag-spacing");
- if (s)
+ if (!s.isNull())
sizeData.setFlagSpacing(s.toInt());
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;
}
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;
}
int fontId = 0;
s = attributes.value("font-id");
- if (s)
+ if (!s.isNull())
fontId = s.toInt();
s = attributes.value("font-height");
- if (s)
+ if (!s.isNull())
sizeData.setFontHeight(fontId, s.toInt());
} else if (lcName == "font-scale") {
@@ -250,7 +250,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s;
s = attributes.value("font-height");
- if (s)
+ if (!s.isNull())
fontHeight = qstrtodouble(s);
else {
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");
- if (s)
+ if (!s.isNull())
staffLineThickness = qstrtodouble(s);
s = attributes.value("leger-line-thickness");
- if (s)
+ if (!s.isNull())
legerLineThickness = qstrtodouble(s);
s = attributes.value("stem-thickness");
- if (s)
+ if (!s.isNull())
stemThickness = qstrtodouble(s);
s = attributes.value("beam-thickness");
- if (s)
+ if (!s.isNull())
beamThickness = qstrtodouble(s);
s = attributes.value("stem-length");
- if (s)
+ if (!s.isNull())
stemLength = qstrtodouble(s);
s = attributes.value("flag-spacing");
- if (s)
+ if (!s.isNull())
flagSpacing = qstrtodouble(s);
int fontId = 0;
s = attributes.value("font-id");
- if (s)
+ if (!s.isNull())
fontId = s.toInt();
//!!! need to be able to calculate max size -- checkFont needs
@@ -389,7 +389,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
int icode = -1;
bool ok = false;
- if (code) {
+ if (!code.isNull()) {
icode = code.stripWhiteSpace().toInt(&ok);
if (!ok || icode < 0) {
m_errorString =
@@ -402,7 +402,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
int iglyph = -1;
ok = false;
- if (glyph) {
+ if (!glyph.isNull()) {
iglyph = glyph.stripWhiteSpace().toInt(&ok);
if (!ok || iglyph < 0) {
m_errorString =
@@ -417,15 +417,15 @@ NoteFontMap::startElement(const TQString &, const TQString &,
m_errorString = "symbol must have either src, code, or glyph attribute";
return false;
}
- if (src)
+ if (!src.isNull())
symbolData.setSrc(qstrtostr(src));
TQString inversionSrc = attributes.value("inversion-src");
- if (inversionSrc)
+ if (!inversionSrc.isNull())
symbolData.setInversionSrc(qstrtostr(inversionSrc));
TQString inversionCode = attributes.value("inversion-code");
- if (inversionCode) {
+ if (!inversionCode.isNull()) {
icode = inversionCode.stripWhiteSpace().toInt(&ok);
if (!ok || icode < 0) {
m_errorString =
@@ -437,7 +437,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
}
TQString inversionGlyph = attributes.value("inversion-glyph");
- if (inversionGlyph) {
+ if (!inversionGlyph.isNull()) {
iglyph = inversionGlyph.stripWhiteSpace().toInt(&ok);
if (!ok || iglyph < 0) {
m_errorString =
@@ -449,7 +449,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
}
TQString fontId = attributes.value("font-id");
- if (fontId) {
+ if (!fontId.isNull()) {
int n = fontId.stripWhiteSpace().toInt(&ok);
if (!ok || n < 0) {
m_errorString =
@@ -482,7 +482,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s = attributes.value("x");
double x = -1.0;
- if (s)
+ if (!s.isNull())
x = qstrtodouble(s);
s = attributes.value("y");
@@ -509,12 +509,12 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s = attributes.value("x");
int x = 0;
- if (s)
+ if (!s.isNull())
x = s.toInt();
s = attributes.value("y");
int y = 0;
- if (s)
+ if (!s.isNull())
y = s.toInt();
HotspotDataMap::iterator i = m_hotspots.find(m_hotspotCharName);
@@ -541,7 +541,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
s = attributes.value("x");
int x = 0;
- if (s)
+ if (!s.isNull())
x = s.toInt();
s = attributes.value("y");
@@ -566,7 +566,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString id = attributes.value("font-id");
int n = -1;
bool ok = false;
- if (id) {
+ if (!id.isNull()) {
n = id.stripWhiteSpace().toInt(&ok);
if (!ok) {
m_errorString =
@@ -582,8 +582,8 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString name = attributes.value("name");
TQString names = attributes.value("names");
- if (name) {
- if (names) {
+ if (!name.isNull()) {
+ if (!names.isNull()) {
m_errorString = "font-requirement may have name or names attribute, but not both";
return false;
}
@@ -595,11 +595,11 @@ NoteFontMap::startElement(const TQString &, const TQString &,
m_systemFontNames[n] = name;
delete font;
} 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;
}
- } else if (names) {
+ } else if (!names.isNull()) {
bool have = false;
TQStringList list = TQStringList::split(",", names, false);
@@ -615,7 +615,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
}
if (!have) {
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;
}
@@ -627,7 +627,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s = attributes.value("strategy").lower();
SystemFont::Strategy strategy = SystemFont::PreferGlyphs;
- if (s) {
+ if (!s.isNull()) {
if (s == "prefer-glyphs")
strategy = SystemFont::PreferGlyphs;
else if (s == "prefer-codes")
@@ -637,7 +637,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
else if (s == "only-codes")
strategy = SystemFont::OnlyCodes;
else {
- std::cerr << "Warning: Unknown strategy value " << s
+ std::cerr << "Warning: Unknown strategy value " << s.ascii()
<< " (known values are prefer-glyphs, prefer-codes,"
<< " only-glyphs, only-codes)" << std::endl;
}
@@ -725,11 +725,11 @@ NoteFontMap::checkFile(int size, std::string &src) const
if (!pixmapFileLowerInfo.isReadable()) {
if (pixmapFileMixedName != pixmapFileLowerName) {
std::cerr << "Warning: Unable to open pixmap file "
- << pixmapFileMixedName << " or " << pixmapFileLowerName
+ << pixmapFileMixedName.ascii() << " or " << pixmapFileLowerName.ascii()
<< std::endl;
} else {
std::cerr << "Warning: Unable to open pixmap file "
- << pixmapFileMixedName << std::endl;
+ << pixmapFileMixedName.ascii() << std::endl;
}
return false;
} else {
diff --git a/src/gui/editors/notation/NoteInserter.cpp b/src/gui/editors/notation/NoteInserter.cpp
index 2939f89..5b192cc 100644
--- a/src/gui/editors/notation/NoteInserter.cpp
+++ b/src/gui/editors/notation/NoteInserter.cpp
@@ -662,9 +662,9 @@ void NoteInserter::slotToggleDot()
Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note));
actionName.replace(TQRegExp("-"), "_");
- KAction *action = m_parentView->actionCollection()->action(actionName);
+ KAction *action = m_parentView->actionCollection()->action(actionName.ascii());
if (!action) {
- std::cerr << "WARNING: No such action as " << actionName << std::endl;
+ std::cerr << "WARNING: No such action as " << actionName.ascii() << std::endl;
} else {
action->activate();
}
@@ -690,9 +690,9 @@ void NoteInserter::slotRestsSelected()
Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note, true));
actionName.replace(TQRegExp("-"), "_");
- KAction *action = m_parentView->actionCollection()->action(actionName);
+ KAction *action = m_parentView->actionCollection()->action(actionName.ascii());
if (!action) {
- std::cerr << "WARNING: No such action as " << actionName << std::endl;
+ std::cerr << "WARNING: No such action as " << actionName.ascii() << std::endl;
} else {
action->activate();
}
diff --git a/src/gui/editors/notation/NotePixmapFactory.cpp b/src/gui/editors/notation/NotePixmapFactory.cpp
index ac9064a..2ff4969 100644
--- a/src/gui/editors/notation/NotePixmapFactory.cpp
+++ b/src/gui/editors/notation/NotePixmapFactory.cpp
@@ -193,7 +193,7 @@ NotePixmapFactory::init(std::string fontName, int size)
m_style = NoteStyleFactory::getStyle(NoteStyleFactory::DefaultStyle);
} catch (NoteStyleFactory::StyleUnavailable u) {
KStartupLogo::hideIfStillThere();
- KMessageBox::error(0, i18n(strtoqstr(u.getMessage())));
+ KMessageBox::error(0, i18n(strtoqstr(u.getMessage()).ascii()));
throw;
}
@@ -1969,7 +1969,7 @@ NotePixmapFactory::makeNoteMenuPixmap(timeT duration,
if (triplet)
noteName = "3-" + noteName;
noteName = "menu-" + noteName;
- return makeToolbarPixmap(noteName);
+ return makeToolbarPixmap(noteName.ascii());
}
TQCanvasPixmap *
diff --git a/src/gui/editors/notation/NoteStyleFactory.cpp b/src/gui/editors/notation/NoteStyleFactory.cpp
index d394e8b..d5e0815 100644
--- a/src/gui/editors/notation/NoteStyleFactory.cpp
+++ b/src/gui/editors/notation/NoteStyleFactory.cpp
@@ -52,7 +52,7 @@ NoteStyleFactory::getAvailableStyleNames()
TQString styleDir = KGlobal::dirs()->findResource("appdata", "styles/");
TQDir dir(styleDir);
if (!dir.exists()) {
- std::cerr << "NoteStyle::getAvailableStyleNames: directory \"" << styleDir
+ std::cerr << "NoteStyle::getAvailableStyleNames: directory \"" << styleDir.ascii()
<< "\" not found" << std::endl;
return names;
}
diff --git a/src/gui/editors/notation/NoteStyleFileReader.cpp b/src/gui/editors/notation/NoteStyleFileReader.cpp
index b7e04ef..b8619c9 100644
--- a/src/gui/editors/notation/NoteStyleFileReader.cpp
+++ b/src/gui/editors/notation/NoteStyleFileReader.cpp
@@ -81,7 +81,7 @@ NoteStyleFileReader::startElement(const TQString &, const TQString &,
if (lcName == "rosegarden-note-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") {
@@ -126,13 +126,13 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
bool haveShape = false;
s = attributes.value("tqshape");
- if (s) {
+ if (!s.isNull()) {
m_style->setShape(type, qstrtostr(s.lower()));
haveShape = true;
}
s = attributes.value("charname");
- if (s) {
+ if (!s.isNull()) {
if (haveShape) {
m_errorString = i18n("global and note elements may have tqshape "
"or charname attribute, but not both");
@@ -143,16 +143,16 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
}
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");
- if (s) m_style->setStem(type, s.lower() == "true");
+ if (!s.isNull()) m_style->setStem(type, s.lower() == "true");
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");
- if (s) m_style->setSlashCount(type, s.toInt());
+ if (!s.isNull()) m_style->setSlashCount(type, s.toInt());
NoteStyle::HFixPoint hfix;
NoteStyle::VFixPoint vfix;
@@ -161,7 +161,7 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
bool haveVFix = false;
s = attributes.value("hfixpoint");
- if (s) {
+ if (!s.isNull()) {
s = s.lower();
haveHFix = true;
if (s == "normal") hfix = NoteStyle::Normal;
@@ -171,7 +171,7 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
}
s = attributes.value("vfixpoint");
- if (s) {
+ if (!s.isNull()) {
s = s.lower();
haveVFix = true;
if (s == "near") vfix = NoteStyle::Near;
diff --git a/src/gui/editors/notation/RestInserter.cpp b/src/gui/editors/notation/RestInserter.cpp
index 9889253..d55dd3e 100644
--- a/src/gui/editors/notation/RestInserter.cpp
+++ b/src/gui/editors/notation/RestInserter.cpp
@@ -128,9 +128,9 @@ void RestInserter::slotToggleDot()
Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note, true));
actionName.replace(TQRegExp("-"), "_");
- KAction *action = m_parentView->actionCollection()->action(actionName);
+ KAction *action = m_parentView->actionCollection()->action(actionName.ascii());
if (!action) {
- std::cerr << "WARNING: No such action as " << actionName << std::endl;
+ std::cerr << "WARNING: No such action as " << actionName.ascii() << std::endl;
} else {
action->activate();
}
@@ -141,7 +141,7 @@ void RestInserter::slotNotesSelected()
Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note));
actionName.replace(TQRegExp(" "), "_");
- m_parentView->actionCollection()->action(actionName)->activate();
+ m_parentView->actionCollection()->action(actionName.ascii())->activate();
}
const TQString RestInserter::ToolName = "restinserter";
diff --git a/src/gui/editors/segment/PlayList.cpp b/src/gui/editors/segment/PlayList.cpp
index da56edc..95d9cfc 100644
--- a/src/gui/editors/segment/PlayList.cpp
+++ b/src/gui/editors/segment/PlayList.cpp
@@ -143,7 +143,7 @@ PlayList::slotDropped(TQDropEvent *event, TQListViewItem* after)
// okay, we have a URI.. process it
// 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")
new PlayListViewItem(m_listView, after, KURL(url));
diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h
index f7ef967..697259b 100644
--- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h
+++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h
@@ -26,6 +26,8 @@
#ifndef _RG_AUDIOPREVIEWUPDATER_H_
#define _RG_AUDIOPREVIEWUPDATER_H_
+#include <stdint.h>
+
#include <tqobject.h>
#include <tqrect.h>
#include <vector>
diff --git a/src/gui/general/ClefIndex.cpp b/src/gui/general/ClefIndex.cpp
index 376b6cb..b02f01a 100644
--- a/src/gui/general/ClefIndex.cpp
+++ b/src/gui/general/ClefIndex.cpp
@@ -55,7 +55,7 @@ const Rosegarden::Clef clefIndexToClef(int index)
const int clefNameToClefIndex(TQString s)
{
int m_elClef = 0;
- if (s) {
+ if (!s.isNull()) {
if (s == "treble")
m_elClef = TrebleClef;
else if (s == "bass")
@@ -97,4 +97,4 @@ const int clefNameToClefIndex(TQString s)
return m_elClef;
}
-} \ No newline at end of file
+}
diff --git a/src/gui/general/EditView.cpp b/src/gui/general/EditView.cpp
index 2fc60b7..f1f5dbf 100644
--- a/src/gui/general/EditView.cpp
+++ b/src/gui/general/EditView.cpp
@@ -1117,7 +1117,7 @@ EditView::createInsertPitchActionMenu()
(flat.tqarg(notePitchNames[i]),
CTRL + SHIFT + notePitchKeys[octave][i],
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);
}
@@ -1127,7 +1127,7 @@ EditView::createInsertPitchActionMenu()
(notePitchNames[i],
notePitchKeys[octave][i],
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);
@@ -1140,7 +1140,7 @@ EditView::createInsertPitchActionMenu()
(sharp.tqarg(notePitchNames[i]),
SHIFT + notePitchKeys[octave][i],
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);
}
diff --git a/src/gui/general/EditViewBase.cpp b/src/gui/general/EditViewBase.cpp
index 2cb3518..dda2c76 100644
--- a/src/gui/general/EditViewBase.cpp
+++ b/src/gui/general/EditViewBase.cpp
@@ -704,7 +704,7 @@ MultiViewCommandHistory* EditViewBase::getCommandHistory()
KToggleAction* EditViewBase::getToggleAction(const TQString& actionName)
{
- return dynamic_cast<KToggleAction*>(actionCollection()->action(actionName));
+ return dynamic_cast<KToggleAction*>(actionCollection()->action(actionName.ascii()));
}
}
diff --git a/src/gui/general/PresetGroup.cpp b/src/gui/general/PresetGroup.cpp
index 729671d..cb8efca 100644
--- a/src/gui/general/PresetGroup.cpp
+++ b/src/gui/general/PresetGroup.cpp
@@ -129,7 +129,7 @@ PresetGroup::startElement(const TQString &, const TQString &,
if (lcName == "category") {
TQString s = attributes.value("name");
- if (s) {
+ if (!s.isNull()) {
m_elCategoryName = s;
// increment the current category number
m_lastCategory = m_currentCategory;
@@ -151,7 +151,7 @@ PresetGroup::startElement(const TQString &, const TQString &,
} else if (lcName == "instrument") {
TQString s = attributes.value("name");
- if (s) {
+ if (!s.isNull()) {
m_elInstrumentName = s;
m_name = true;
@@ -162,13 +162,13 @@ PresetGroup::startElement(const TQString &, const TQString &,
} else if (lcName == "clef") {
TQString s = attributes.value("type");
- if (s) {
+ if (!s.isNull()) {
m_elClef = clefNameToClefIndex(s);
m_clef = true;
}
} else if (lcName == "transpose") {
TQString s = attributes.value("value");
- if (s) {
+ if (!s.isNull()) {
m_elTranspose = s.toInt();
m_transpose = true;
}
@@ -178,13 +178,13 @@ PresetGroup::startElement(const TQString &, const TQString &,
if (s == "amateur") {
s = attributes.value("low");
- if (s) {
+ if (!s.isNull()) {
m_elLowAm = s.toInt();
m_amateur = true;
}
s = attributes.value("high");
- if (s && m_amateur) {
+ if (!s.isNull() && m_amateur) {
m_elHighAm = s.toInt();
} else {
return false;
@@ -192,13 +192,13 @@ PresetGroup::startElement(const TQString &, const TQString &,
} else if (s == "professional") {
s = attributes.value("low");
- if (s) {
+ if (!s.isNull()) {
m_pro = true;
m_elLowPro = s.toInt();
}
s = attributes.value("high");
- if (s && m_pro) {
+ if (!s.isNull() && m_pro) {
m_elHighPro = s.toInt();
} else {
return false;
diff --git a/src/gui/kdeext/QCanvasSimpleSprite.cpp b/src/gui/kdeext/QCanvasSimpleSprite.cpp
index f2aeb23..17cb5cb 100644
--- a/src/gui/kdeext/QCanvasSimpleSprite.cpp
+++ b/src/gui/kdeext/QCanvasSimpleSprite.cpp
@@ -82,13 +82,13 @@ QCanvasSimpleSprite::~QCanvasSimpleSprite()
TQCanvasPixmapArray*
QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap)
{
- TQList<TQPixmap> pixlist;
+ TQPtrList<TQPixmap> pixlist;
pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its
// own copies of the pixmaps, so we
// can delete the one we're passed
pixlist.append(pixmap);
- TQList<TQPoint> spotlist;
+ TQPtrList<TQPoint> spotlist;
spotlist.setAutoDelete(true);
spotlist.append(new TQPoint(0, 0));
@@ -98,13 +98,13 @@ QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap)
TQCanvasPixmapArray*
QCanvasSimpleSprite::makePixmapArray(TQCanvasPixmap *pixmap)
{
- TQList<TQPixmap> pixlist;
+ TQPtrList<TQPixmap> pixlist;
pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its
// own copies of the pixmaps, so we
// can delete the one we're passed
pixlist.append(pixmap);
- TQList<TQPoint> spotlist;
+ TQPtrList<TQPoint> spotlist;
spotlist.setAutoDelete(true);
spotlist.append(new TQPoint(pixmap->offsetX(), pixmap->offsetY()));
diff --git a/src/gui/seqmanager/ControlBlockMmapper.cpp b/src/gui/seqmanager/ControlBlockMmapper.cpp
index 46c632b..cfe24be 100644
--- a/src/gui/seqmanager/ControlBlockMmapper.cpp
+++ b/src/gui/seqmanager/ControlBlockMmapper.cpp
@@ -204,14 +204,14 @@ void ControlBlockMmapper::setFileSize(size_t size)
// (seek() to wanted size, then write a byte)
//
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;
throw Exception("lseek failed");
}
if (::write(m_fd, "\0", 1) != 1) {
std::cerr << "WARNING: ControlBlockMmapper : Couldn't write byte in "
- << m_fileName << std::endl;
+ << m_fileName.ascii() << std::endl;
throw Exception("write failed");
}
diff --git a/src/gui/seqmanager/SegmentMmapper.cpp b/src/gui/seqmanager/SegmentMmapper.cpp
index 23f4c6b..9cb8ef0 100644
--- a/src/gui/seqmanager/SegmentMmapper.cpp
+++ b/src/gui/seqmanager/SegmentMmapper.cpp
@@ -186,13 +186,13 @@ void SegmentMmapper::setFileSize(size_t size)
//
if (::lseek(m_fd, size - 1, SEEK_SET) == -1) {
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");
}
if (::write(m_fd, "\0", 1) != 1) {
std::cerr << "WARNING: SegmentMmapper : Couldn't write byte in "
- << m_fileName << std::endl;
+ << m_fileName.ascii() << std::endl;
throw Exception("write failed");
}
diff --git a/src/gui/seqmanager/SequenceManager.cpp b/src/gui/seqmanager/SequenceManager.cpp
index df7a3d8..02a37d9 100644
--- a/src/gui/seqmanager/SequenceManager.cpp
+++ b/src/gui/seqmanager/SequenceManager.cpp
@@ -1124,7 +1124,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC,
// the error you can't hear
KMessageBox::information(0, message);
} else {
- std::cerr << message << std::endl;
+ std::cerr << message.ascii() << std::endl;
}
#endif
@@ -1421,7 +1421,7 @@ void
SequenceManager::sendAudioLevel(MappedEvent *mE)
{
RosegardenGUIView *v;
- TQList<RosegardenGUIView>& viewList = m_doc->getViewList();
+ TQPtrList<RosegardenGUIView>& viewList = m_doc->getViewList();
for (v = viewList.first(); v != 0; v = viewList.next()) {
v->showVisuals(mE);
@@ -1482,7 +1482,7 @@ void
SequenceManager::sendMIDIRecordingDevice(const TQString recordDeviceStr)
{
- if (recordDeviceStr) {
+ if (!recordDeviceStr.isNull()) {
int recordDevice = recordDeviceStr.toInt();
if (recordDevice >= 0) {
diff --git a/src/gui/studio/AudioMixerWindow.cpp b/src/gui/studio/AudioMixerWindow.cpp
index 56734dd..6dced2b 100644
--- a/src/gui/studio/AudioMixerWindow.cpp
+++ b/src/gui/studio/AudioMixerWindow.cpp
@@ -184,7 +184,7 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent,
new KRadioAction(i18n("1 Input", "%n Inputs", i),
0, TQT_TQOBJECT(this),
TQT_SLOT(slotSetInputCountFromAction()), actionCollection(),
- TQString("inputs_%1").tqarg(i));
+ TQString("inputs_%1").tqarg(i).ascii());
action->setExclusiveGroup("inputs");
if (i == int(m_studio->getRecordIns().size()))
action->setChecked(true);
@@ -194,7 +194,7 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent,
(i18n("No Submasters"),
0, TQT_TQOBJECT(this),
TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(),
- TQString("submasters_0"));
+ TQString("submasters_0").ascii());
action->setExclusiveGroup("submasters");
action->setChecked(true);
@@ -203,7 +203,7 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent,
(i18n("1 Submaster", "%n Submasters", i),
0, TQT_TQOBJECT(this),
TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(),
- TQString("submasters_%1").tqarg(i));
+ TQString("submasters_%1").tqarg(i).ascii());
action->setExclusiveGroup("submasters");
if (i == int(m_studio->getBusses().size()) - 1)
action->setChecked(true);
diff --git a/src/gui/studio/AudioPluginOSCGUI.cpp b/src/gui/studio/AudioPluginOSCGUI.cpp
index 3fd2ffb..857a454 100644
--- a/src/gui/studio/AudioPluginOSCGUI.cpp
+++ b/src/gui/studio/AudioPluginOSCGUI.cpp
@@ -164,13 +164,13 @@ AudioPluginOSCGUI::setGUIUrl(TQString url)
if (m_address)
lo_address_free(m_address);
- char *host = lo_url_get_hostname(url);
- char *port = lo_url_get_port(url);
+ char *host = lo_url_get_hostname(url.ascii());
+ char *port = lo_url_get_port(url.ascii());
m_address = lo_address_new(host, port);
free(host);
free(port);
- m_basePath = lo_url_get_path(url);
+ m_basePath = lo_url_get_path(url.ascii());
}
void
@@ -181,7 +181,7 @@ AudioPluginOSCGUI::show()
if (!m_address)
return ;
TQString path = m_basePath + "/show";
- lo_send(m_address, path, "");
+ lo_send(m_address, path.ascii(), "");
}
void
@@ -190,7 +190,7 @@ AudioPluginOSCGUI::hide()
if (!m_address)
return ;
TQString path = m_basePath + "/hide";
- lo_send(m_address, path, "");
+ lo_send(m_address, path.ascii(), "");
}
void
@@ -199,7 +199,7 @@ AudioPluginOSCGUI::quit()
if (!m_address)
return ;
TQString path = m_basePath + "/quit";
- lo_send(m_address, path, "");
+ lo_send(m_address, path.ascii(), "");
}
void
@@ -208,7 +208,7 @@ AudioPluginOSCGUI::sendProgram(int bank, int program)
if (!m_address)
return ;
TQString path = m_basePath + "/program";
- lo_send(m_address, path, "ii", bank, program);
+ lo_send(m_address, path.ascii(), "ii", bank, program);
}
void
@@ -217,7 +217,7 @@ AudioPluginOSCGUI::sendPortValue(int port, float value)
if (!m_address)
return ;
TQString path = m_basePath + "/control";
- lo_send(m_address, path, "if", port, value);
+ lo_send(m_address, path.ascii(), "if", port, value);
}
void
@@ -226,7 +226,7 @@ AudioPluginOSCGUI::sendConfiguration(TQString key, TQString value)
if (!m_address)
return ;
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());
}
}
diff --git a/src/gui/studio/AudioPluginOSCGUIManager.cpp b/src/gui/studio/AudioPluginOSCGUIManager.cpp
index 6662a53..01ade9c 100644
--- a/src/gui/studio/AudioPluginOSCGUIManager.cpp
+++ b/src/gui/studio/AudioPluginOSCGUIManager.cpp
@@ -146,7 +146,7 @@ AudioPluginOSCGUIManager::hasGUI(InstrumentId instrument, int position)
try {
TQString filePath = AudioPluginOSCGUI::getGUIFilePath
(strtoqstr(pluginInstance->getIdentifier()));
- return (filePath && filePath != "");
+ return (!filePath.isNull() && filePath != "");
} catch (Exception e) { // that's OK
return false;
}
diff --git a/src/gui/studio/DeviceEditorDialog.cpp b/src/gui/studio/DeviceEditorDialog.cpp
index 11283d6..79f0fbc 100644
--- a/src/gui/studio/DeviceEditorDialog.cpp
+++ b/src/gui/studio/DeviceEditorDialog.cpp
@@ -343,7 +343,7 @@ DeviceEditorDialog::getDeviceIdAt(int row) // -1 for new device w/o an id yet
TQString number = re.cap(1);
int id = -1;
- if (number && number != "")
+ if (!number.isNull() && number != "")
{
id = number.toInt() - 1; // displayed device numbers are 1-based
}
diff --git a/src/gui/studio/NameSetEditor.cpp b/src/gui/studio/NameSetEditor.cpp
index a4e9b97..d7917bf 100644
--- a/src/gui/studio/NameSetEditor.cpp
+++ b/src/gui/studio/NameSetEditor.cpp
@@ -118,7 +118,7 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor,
if (showEntryButtons) {
- TQPushButton *button = new TQPushButton("", numBox, numberText);
+ TQPushButton *button = new TQPushButton("", numBox, numberText.ascii());
button->setMaximumWidth(40);
button->setMaximumHeight(20);
button->setFlat(true);
@@ -127,7 +127,7 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor,
m_entryButtons.push_back(button);
}
- KLineEdit* lineEdit = new KLineEdit(numBox, numberText);
+ KLineEdit* lineEdit = new KLineEdit(numBox, numberText.ascii());
lineEdit->setMinimumWidth(110);
lineEdit->setCompletionMode(KGlobalSettings::CompletionAuto);
lineEdit->setCompletionObject(&m_completion);
diff --git a/src/gui/widgets/HSpinBox.cpp b/src/gui/widgets/HSpinBox.cpp
index e49cf1b..85f4c69 100644
--- a/src/gui/widgets/HSpinBox.cpp
+++ b/src/gui/widgets/HSpinBox.cpp
@@ -42,7 +42,7 @@ TQString HSpinBox::mapValueToText(int j)
int HSpinBox::mapTextToValue( bool* ok )
{
*ok = true;
- float f = atof(text());
+ float f = atof(text().ascii());
return int(f * m_scaleFactor);
}
diff --git a/src/gui/widgets/QuantizeParameters.cpp b/src/gui/widgets/QuantizeParameters.cpp
index 132aaef..a85e3b6 100644
--- a/src/gui/widgets/QuantizeParameters.cpp
+++ b/src/gui/widgets/QuantizeParameters.cpp
@@ -64,12 +64,12 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
(BasicQuantizer::getStandardQuantizations())
{
m_mainLayout = new TQGridLayout(this,
- preamble ? 3 : 4, 2,
- preamble ? 10 : 0,
- preamble ? 5 : 4);
+ (!preamble.isNull()) ? 3 : 4, 2,
+ (!preamble.isNull()) ? 10 : 0,
+ (!preamble.isNull()) ? 5 : 4);
int zero = 0;
- if (preamble) {
+ if (!preamble.isNull()) {
TQLabel *label = new TQLabel(preamble, this);
label->tqsetAlignment(TQt::WordBreak);
m_mainLayout->addMultiCellWidget(label, 0, 0, 0, 1);
@@ -168,7 +168,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
m_postProcessingBox = new TQGroupBox
(1, Qt::Horizontal, i18n("After quantization"), this);
- if (preamble) {
+ if (!preamble.isNull()) {
m_mainLayout->addMultiCellWidget(m_postProcessingBox,
zero, zero + 1,
1, 1);
@@ -217,7 +217,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
int defaultSwing = 0;
int defaultIterate = 100;
- if (m_configCategory) {
+ if (!m_configCategory.isNull()) {
KConfig *config = kapp->config();
config->setGroup(m_configCategory);
defaultType =
@@ -267,7 +267,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
advanced = false;
}
- if (preamble || advanced) {
+ if (!preamble.isNull() || advanced) {
m_postProcessingBox->show();
} else {
m_postProcessingBox->hide();
@@ -412,7 +412,7 @@ QuantizeParameters::getQuantizer() const
quantizer = nq;
}
- if (m_configCategory) {
+ if (!m_configCategory.isNull()) {
KConfig *config = kapp->config();
config->setGroup(m_configCategory);
config->writeEntry("quantizetype", type);