Commit ce54b479 authored by Jan Gerrit Marker's avatar Jan Gerrit Marker

juk: fix krazy issues

Fixes some issues krazy points out.

svn path=/trunk/KDE/kdemultimedia/juk/; revision=1246183
parent cab40a4a
......@@ -209,28 +209,28 @@
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="m_exampleTitle" >
<widget class="KLineEdit" name="m_exampleTitle" >
<property name="text" >
<string comment="example song title" >Title</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="m_exampleArtist" >
<widget class="KLineEdit" name="m_exampleArtist" >
<property name="text" >
<string>Artist</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="m_exampleAlbum" >
<widget class="KLineEdit" name="m_exampleAlbum" >
<property name="text" >
<string>Album</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="m_exampleGenre" >
<widget class="KLineEdit" name="m_exampleGenre" >
<property name="text" >
<string>Genre</string>
</property>
......
......@@ -153,7 +153,7 @@ void FileHandle::setFile(const QString &path)
}
if(!QFile::exists(path)) {
kError() << "trying to set non-existant file: " << path << endl;
kError() << "trying to set non-existent file: " << path << endl;
return;
}
......
......@@ -952,7 +952,7 @@ void FileRenamer::setFolderIcon(const KUrl &dst, const PlaylistItem *item)
// Split path, and go through each path element. If a path element has
// the album information, set its folder icon.
QStringList elements = dstURL.directory().split("/", QString::SkipEmptyParts);
QStringList elements = dstURL.directory().split('/', QString::SkipEmptyParts);
QString path;
for(QStringList::ConstIterator it = elements.constBegin(); it != elements.constEnd(); ++it) {
......
......@@ -232,7 +232,7 @@
</layout>
</item>
<item>
<widget class="QLineEdit" name="m_exampleText">
<widget class="KLineEdit" name="m_exampleText">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
......
......@@ -64,7 +64,7 @@
</spacer>
</item>
<item>
<widget class="QLineEdit" name="m_prefixText">
<widget class="KLineEdit" name="m_prefixText">
<property name="alignment">
<set>Qt::AlignRight</set>
</property>
......@@ -74,7 +74,7 @@
<widget class="QLabel" name="m_tagLabel"/>
</item>
<item>
<widget class="QLineEdit" name="m_suffixText">
<widget class="KLineEdit" name="m_suffixText">
<property name="alignment">
<set>Qt::AlignLeading</set>
</property>
......@@ -164,7 +164,7 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="m_emptyTagValue">
<widget class="KLineEdit" name="m_emptyTagValue">
<property name="enabled">
<bool>false</bool>
</property>
......
......@@ -46,7 +46,6 @@
#include "coverinfo.h"
#include "covermanager.h"
#include "tag.h"
#include "playlistitem.h"
#include "collectionlist.h"
static const int imageSize = 64;
......
......@@ -1078,7 +1078,7 @@ void Playlist::decode(const QMimeData *s, PlaylistItem *item)
KMimeType::Ptr mimeType = KMimeType::findByPath(file);
if(item && mimeType->name().startsWith("image/")) {
if(item && mimeType->name().startsWith(QLatin1String("image/"))) {
item->file().coverInfo()->setCover(QImage(file));
refreshAlbum(item->file().tag()->artist(),
item->file().tag()->album());
......
......@@ -287,7 +287,7 @@ public:
/**
* Subclasses of Playlist which add new columns will set this value to
* specify how many of those colums exist. This allows the Playlist
* specify how many of those columns exist. This allows the Playlist
* class to do some internal calculations on the number and positions
* of columns.
*/
......
......@@ -12,9 +12,10 @@
* (at your option) any later version. *
* *
***************************************************************************/
#include <QHash>
#include "stringshare.h"
#include <QHash>
const int SIZE = 5003;
StringShare::Data* StringShare::s_data = 0;
......
......@@ -196,7 +196,7 @@ void SvgHandler::paintCustomSlider( QPainter *p, QStyleOptionSlider *slider, qre
QPoint tl, br;
if ( inverse )
{
tl = knob.topRight() + QPoint( -5, 5 ); // 5px x padding to avoid a "gap" between it and the top and botton of the round knob.
tl = knob.topRight() + QPoint( -5, 5 ); // 5px x padding to avoid a "gap" between it and the top and bottom of the round knob.
br = slider->rect.topRight() + QPoint( -3, 5 + playedBarHeight - 1 );
QPixmap rightEnd = renderSvg( "progress_slider_played_right", playedBarHeight, playedBarHeight, "progress_slider_played_right" );
p->drawPixmap( br.x() - rightEnd.width() + 1, tl.y(), rightEnd, qMax(0, rightEnd.width() - (sizeOfLeftPlayed + 3)), 0, sizeOfLeftPlayed + 3, playedBarHeight );
......
......@@ -94,7 +94,7 @@ class SystemTray : public KStatusNotifierItem
Q_OBJECT
public:
SystemTray(PlayerManager *player, QWidget *parent = 0);
explicit SystemTray(PlayerManager *player, QWidget *parent = 0);
signals:
// Emitted when the fade process is complete.
......
......@@ -511,7 +511,7 @@ void TagEditor::setupLayout()
foreach(QCheckBox *enable, findChildren<QCheckBox *>(QRegExp("Enable"))) {
enable->hide();
QRegExp re("^" + enable->objectName().replace("Enable", "") + "(Box|Spin)$");
QRegExp re('^' + enable->objectName().replace("Enable", "") + "(Box|Spin)$");
QList<QWidget *> targets = findChildren<QWidget *>(re);
Q_ASSERT(!targets.isEmpty());
m_enableBoxes[targets.front()] = enable;
......
......@@ -77,10 +77,10 @@
</widget>
</item>
<item row="3" column="4">
<widget class="QLineEdit" name="lengthBox"/>
<widget class="KLineEdit" name="lengthBox"/>
</item>
<item row="3" column="8">
<widget class="QLineEdit" name="bitrateBox"/>
<widget class="KLineEdit" name="bitrateBox"/>
</item>
<item row="3" column="3">
<widget class="QLabel" name="lengthLabel">
......@@ -251,7 +251,7 @@
</customwidget>
<customwidget>
<class>KLineEdit</class>
<extends>QLineEdit</extends>
<extends>KLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
<customwidget>
......
......@@ -180,7 +180,11 @@ void TagGuesser::loadSchemes()
void TagGuesser::guess(const QString &absFileName)
{
m_title = m_artist = m_album = m_track = m_comment = QString();
m_title.clear();
m_artist.clear();
m_album.clear();
m_track.clear();
m_comment.clear();
FileNameScheme::List::ConstIterator it = m_schemes.constBegin();
FileNameScheme::List::ConstIterator end = m_schemes.constEnd();
......
......@@ -14,14 +14,15 @@
***************************************************************************/
#include <config-juk.h>
#include "trackpickerdialog.h"
#if HAVE_TUNEPIMP
#include <k3listview.h>
#include <klocale.h>
#include "trackpickerdialog.h"
#define NUMBER(x) (x == 0 ? QString::null : QString::number(x)) //krazy:exclude=nullstrassign for old broken gcc
class TrackPickerItem : public K3ListViewItem
......
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