Commit 64081847 authored by Stephan Kulow's avatar Stephan Kulow

deprecated

svn path=/trunk/KDE/kdemultimedia/juk/; revision=536733
parent 4d301462
......@@ -21,7 +21,7 @@
#include <config.h>
#if HAVE_ARTS
#ifdef HAVE_ARTS
#include "player.h"
......
......@@ -274,7 +274,7 @@ void FileRenamerWidget::loadConfig()
checkedSeparators = config.readEntry("CheckedDirSeparators", QList<int>());
for(QList<int>::ConstIterator it = checkedSeparators.begin();
it != checkedSeparators.end(); ++it)
{
......@@ -947,7 +947,7 @@ void FileRenamer::setFolderIcon(const KUrl &dst, const PlaylistItem *item)
path.append("/" + (*it));
kDebug() << "Checking path: " << path << endl;
if((*it).find(item->file().tag()->album()) != -1 &&
if((*it).contains(item->file().tag()->album() ) &&
!QFile::exists(path + "/.directory"))
{
// Seems to be a match, let's set the folder icon for the current
......
......@@ -18,7 +18,7 @@
#include "config.h"
#if HAVE_GSTREAMER
#ifdef HAVE_GSTREAMER
#include <gst/gst.h>
#include <qstring.h>
......
......@@ -29,7 +29,7 @@
#include <config.h>
#if HAVE_TUNEPIMP
#ifdef HAVE_TUNEPIMP
#include <qstring.h>
#include <q3valuelist.h>
......
......@@ -66,18 +66,18 @@ static Player *createPlayer(int system = ArtsBackend)
p = new aKodePlayer;
break;
#endif
#if HAVE_ARTS
#ifdef HAVE_ARTS
case ArtsBackend:
p = new ArtsPlayer;
break;
#endif
#if HAVE_GSTREAMER
#ifdef HAVE_GSTREAMER
case GStreamerBackend:
p = new GStreamerPlayer;
break;
#endif
default:
#if HAVE_ARTS
#ifdef HAVE_ARTS
p = new ArtsPlayer;
#elif HAVE_GSTREAMER
p = new GStreamerPlayer;
......@@ -247,10 +247,10 @@ KSelectAction *PlayerManager::playerSelectAction() // static
new KSelectAction(i18n("&Output To"), ActionCollection::actions(), "outputSelect");
QStringList l;
#if HAVE_ARTS
#ifdef HAVE_ARTS
l.append(i18n("aRts"));
#endif
#if HAVE_GSTREAMER
#ifdef HAVE_GSTREAMER
l.append(i18n("GStreamer"));
#endif
#ifdef HAVE_AKODE
......
......@@ -509,7 +509,7 @@ void PlaylistCollection::createFolderPlaylist()
if(folder.isEmpty())
return;
QString name = uniquePlaylistName(folder.mid(folder.findRev('/') + 1));
QString name = uniquePlaylistName(folder.mid(folder.lastIndexOf('/') + 1));
name = playlistNameDialog(i18n("Create Folder Playlist"), name);
if(!name.isNull())
......
......@@ -275,10 +275,10 @@ void PlaylistItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int
if(!m_playingItems.contains(this))
return K3ListViewItem::paintCell(p, cg, column, width, align);
QColorGroup colorGroup = cg;
QPalette colorGroup = cg;
QColor base = colorGroup.base();
QColor selection = colorGroup.highlight();
QColor base = colorGroup.color( QPalette::Base );
QColor selection = colorGroup.color( QPalette::Highlight );
int r = (base.red() + selection.red()) / 2;
int b = (base.blue() + selection.blue()) / 2;
......
......@@ -197,7 +197,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const
for(ColumnList::Iterator it = m_columns.begin(); it != m_columns.end(); ++it) {
if(m_re) {
if(item->text(*it).find(m_queryRe) > -1)
if(item->text(*it).contains(m_queryRe))
return true;
else
break;
......@@ -205,7 +205,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const
switch(m_mode) {
case Contains:
if(item->text(*it).find(m_query, 0, m_caseSensitive) > -1)
if(item->text(*it).contains(m_query, m_caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive))
return true;
break;
case Exact:
......@@ -221,7 +221,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const
case ContainsWord:
{
QString s = item->text(*it);
int i = s.find(m_query, 0, m_caseSensitive);
int i = s.indexOf(m_query, 0, m_caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive );
if(i >= 0) {
......
......@@ -273,9 +273,11 @@ void SearchWidget::setupLayout()
clearSearchButton->setTextLabel(i18n("Clear Search"), true);
clearSearchButton->setIconSet(SmallIconSet("locationbar_erase"));
QLabel *label = new QLabel(i18n("Search:"), this, "kde toolbar widget");
QLabel *label = new QLabel(i18n("Search:"), this );
label->setObjectName( "kde toolbar widget" );
m_searchLine = new SearchLine(this, true, "kde toolbar widget");
m_searchLine = new SearchLine(this, true );
m_searchLine->setObjectName( "kde toolbar widget" );
label->setBuddy(m_searchLine);
......
......@@ -223,7 +223,7 @@ QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base
{
if(parent) {
QWidget *base = new QWidget(parent);
base->setBackgroundMode(parent->backgroundMode());
base->setBackgroundRole(parent->backgroundRole());
base->setName("kde toolbar widget");
KToolBar *toolBar = dynamic_cast<KToolBar *>(parent);
......
......@@ -245,8 +245,8 @@ void Tag::setup(TagLib::File *file)
m_lengthString = QString::number(minutes) + (seconds >= 10 ? ":" : ":0") + QString::number(seconds);
if(m_title.isEmpty()) {
int i = m_fileName.findRev('/');
int j = m_fileName.findRev('.');
int i = m_fileName.lastIndexOf('/');
int j = m_fileName.lastIndexOf('.');
m_title = i > 0 ? m_fileName.mid(i + 1, j - i - 1) : m_fileName;
}
......
......@@ -67,7 +67,7 @@ public:
virtual State validate(QString &s, int &) const
{
if(s.find('/') != -1)
if(s.contains('/'))
return Invalid;
return Acceptable;
}
......@@ -546,7 +546,9 @@ void TagEditor::setupLayout()
QLabel *fileNameIcon = new QLabel(this);
fileNameIcon->setPixmap(SmallIcon("sound"));
QWidget *fileNameLabel = addHidden(new QLabel(m_fileNameBox, i18n("&File name:"), this));
QLabel * tmp = new QLabel(i18n("&File name:"), this);
tmp->setBuddy( m_fileNameBox );
QWidget *fileNameLabel = addHidden(tmp);
fileNameLayout->addWidget(addHidden(fileNameIcon));
fileNameLayout->addWidget(fileNameLabel);
......@@ -739,8 +741,10 @@ void TagEditor::addItem(const QString &text, QWidget *item, QBoxLayout *layout,
if(!item || !layout)
return;
QLabel *label = new QLabel(item, text, this);
QLabel *iconLabel = new QLabel(item, 0, this);
QLabel *label = new QLabel(text, this);
label->setBuddy( item );
QLabel *iconLabel = new QLabel(0, this);
iconLabel->setBuddy( item );
if(!iconName.isNull())
iconLabel->setPixmap(SmallIcon(iconName));
......
......@@ -24,7 +24,7 @@ FileNameScheme::FileNameScheme(const QString &s)
m_commentField(-1)
{
int fieldNumber = 1;
int i = s.find('%');
int i = s.indexOf('%');
while (i > -1) {
switch (s[ i + 1 ].toLatin1()) {
case 't': m_titleField = fieldNumber++;
......@@ -40,7 +40,7 @@ FileNameScheme::FileNameScheme(const QString &s)
default:
break;
}
i = s.find('%', i + 1);
i = s.indexOf('%', i + 1);
}
m_regExp.setPattern(composeRegExp(s));
}
......@@ -51,7 +51,7 @@ bool FileNameScheme::matches(const QString &fileName) const
* does not work as a separator.
*/
QString stripped = fileName;
stripped.truncate(stripped.findRev('.'));
stripped.truncate(stripped.lastIndexOf('.'));
return m_regExp.exactMatch(stripped);
}
......@@ -205,10 +205,10 @@ QString TagGuesser::capitalizeWords(const QString &s)
result[ 0 ] = result[ 0 ].upper();
const QRegExp wordRegExp("\\s\\w");
int i = result.find( wordRegExp );
int i = result.indexOf( wordRegExp );
while ( i > -1 ) {
result[ i + 1 ] = result[ i + 1 ].upper();
i = result.find( wordRegExp, ++i );
i = result.indexOf( wordRegExp, ++i );
}
return result;
......
......@@ -84,7 +84,7 @@ void ViewMode::paintCell(PlaylistBox::Item *item,
painter->fillRect(border, border, width - border * 2, item->height() - border * 2 + 1,
colorGroup.brush(QPalette::Highlight));
painter->setPen(colorGroup.highlightedText());
painter->setPen(colorGroup.color( QPalette::HighlightedText));
}
else
painter->eraseRect(0, 0, width, item->height());
......@@ -199,7 +199,7 @@ QStringList ViewMode::lines(const PlaylistBox::Item *item,
fm.width(line.mid(0, textLength).stripWhiteSpace()) +
item->listView()->itemMargin() * 2 > width)
{
int i = line.findRev(QRegExp( "\\W"), textLength - 1);
int i = line.lastIndexOf(QRegExp( "\\W"), textLength - 1);
if(i > 0)
textLength = i;
else
......
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