Commit d5f82ba5 authored by Scott Wheeler's avatar Scott Wheeler

getFoo() is un-Qt-ish.

svn path=/trunk/kdemultimedia/juk/; revision=359729
parent f1d1eb0b
...@@ -352,7 +352,7 @@ void FileRenamerWidget::createTagRows() ...@@ -352,7 +352,7 @@ void FileRenamerWidget::createTagRows()
downMapper->connect(m_rows[i].downButton, SIGNAL(clicked()), SLOT(map())); downMapper->connect(m_rows[i].downButton, SIGNAL(clicked()), SLOT(map()));
downMapper->setMapping(m_rows[i].downButton, m_rows[i].category); downMapper->setMapping(m_rows[i].downButton, m_rows[i].category);
QString labelText = QString("<b>%1</b>").arg(TagRenamerOptions::getTagTypeText(m_rows[i].category)); QString labelText = QString("<b>%1</b>").arg(TagRenamerOptions::tagTypeText(m_rows[i].category));
QLabel *label = new QLabel(labelText, frame); QLabel *label = new QLabel(labelText, frame);
frame->setStretchFactor(label, 1); frame->setStretchFactor(label, 1);
label->setAlignment(AlignCenter); label->setAlignment(AlignCenter);
......
...@@ -44,7 +44,7 @@ FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent, ...@@ -44,7 +44,7 @@ FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent,
if(m_options.category() != Track) if(m_options.category() != Track)
m_trackGroup->hide(); m_trackGroup->hide();
QString tagText = m_options.getTagTypeText(); QString tagText = m_options.tagTypeText();
setCaption(caption().arg(tagText)); setCaption(caption().arg(tagText));
m_tagFormatGroup->setTitle(m_tagFormatGroup->title().arg(tagText)); m_tagFormatGroup->setTitle(m_tagFormatGroup->title().arg(tagText));
...@@ -68,7 +68,7 @@ FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent, ...@@ -68,7 +68,7 @@ FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent,
void FileRenamerTagOptions::slotBracketsChanged() void FileRenamerTagOptions::slotBracketsChanged()
{ {
QString tag = m_options.getTagTypeText(); QString tag = m_options.tagTypeText();
m_options.setPrefix(m_prefixText->text()); m_options.setPrefix(m_prefixText->text());
m_options.setSuffix(m_suffixText->text()); m_options.setSuffix(m_suffixText->text());
......
...@@ -61,7 +61,7 @@ TagRenamerOptions::TagRenamerOptions(TagType category) ...@@ -61,7 +61,7 @@ TagRenamerOptions::TagRenamerOptions(TagType category)
// Make sure we don't use translated strings for the config file keys. // Make sure we don't use translated strings for the config file keys.
const QString typeKey = getTagTypeText(category, false); const QString typeKey = tagTypeText(category, false);
KConfigGroup config(KGlobal::config(), "FileRenamer"); KConfigGroup config(KGlobal::config(), "FileRenamer");
setSuffix(config.readEntry(QString("%1Suffix").arg(typeKey))); setSuffix(config.readEntry(QString("%1Suffix").arg(typeKey)));
...@@ -82,7 +82,7 @@ TagRenamerOptions::TagRenamerOptions(TagType category) ...@@ -82,7 +82,7 @@ TagRenamerOptions::TagRenamerOptions(TagType category)
setDisabled(config.readBoolEntry(QString("%1Disabled").arg(typeKey), disabled)); setDisabled(config.readBoolEntry(QString("%1Disabled").arg(typeKey), disabled));
} }
QString TagRenamerOptions::getTagTypeText(TagType type, bool translate) QString TagRenamerOptions::tagTypeText(TagType type, bool translate)
{ {
// These must be declared in the same order that they are defined in // These must be declared in the same order that they are defined in
// the TagType enum in test.h. We can dynamically translate these strings, // the TagType enum in test.h. We can dynamically translate these strings,
...@@ -106,7 +106,7 @@ void TagRenamerOptions::saveConfig() const ...@@ -106,7 +106,7 @@ void TagRenamerOptions::saveConfig() const
{ {
// Make sure we don't use translated strings for the config file keys. // Make sure we don't use translated strings for the config file keys.
const QString typeKey = getTagTypeText(false); const QString typeKey = tagTypeText(false);
KConfigGroup config(KGlobal::config(), "FileRenamer"); KConfigGroup config(KGlobal::config(), "FileRenamer");
config.writeEntry(QString("%1Suffix").arg(typeKey), suffix()); config.writeEntry(QString("%1Suffix").arg(typeKey), suffix());
......
...@@ -58,18 +58,18 @@ public: ...@@ -58,18 +58,18 @@ public:
TagRenamerOptions &operator=(const TagRenamerOptions &other); TagRenamerOptions &operator=(const TagRenamerOptions &other);
/** /**
* Maps \p type to a textual representation of its name. E.g. Track => "Track" * Maps \p type to a textual representation of its name. E.g. Track => "Track"
* *
* @param type the category to retrieve a text representation of. * @param type the category to retrieve a text representation of.
* @param translate if true, the string is translated (if possible). * @param translate if true, the string is translated (if possible).
* @return text representation of category. * @return text representation of category.
*/ */
static QString getTagTypeText(TagType category, bool translate = true); static QString tagTypeText(TagType category, bool translate = true);
QString getTagTypeText(bool translate = true) const QString tagTypeText(bool translate = true) const
{ {
return getTagTypeText(category(), translate); return tagTypeText(category(), translate);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment