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