Commit dde52a0e authored by Shubham Chaudhary's avatar Shubham Chaudhary

Krazy fixes from ebn

Changes:
* single quote chars
* casted floats to qBound
* KUrl instead of QUrl
* removed empty spaces
* added newline at eof

REVIEW: 114217
parent d969a0b4
......@@ -121,7 +121,7 @@ void LyricsWidget::receiveListReply(QNetworkReply* reply)
url.addQueryItem("prop", "revisions");
url.addQueryItem("rvprop", "content");
url.addQueryItem("format", "xml");
url.addQueryItem("titles", artist + ":" + title);
url.addQueryItem("titles", artist + ':' + title);
connect(m_networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(receiveLyricsReply(QNetworkReply*)));
m_networkAccessManager->get(QNetworkRequest(url));
}
......@@ -145,7 +145,7 @@ void LyricsWidget::receiveLyricsReply(QNetworkReply* reply)
}
lIndex += 15; // We skip the tag
content = content.mid(lIndex, rIndex - lIndex).trimmed();
content.replace("\n", "<br />");
content.replace('\n', "<br />");
//setText(content);
setHtml("<h1>" + m_title + "</h1>" +
content +
......
......@@ -206,7 +206,7 @@ QVariantMap MediaPlayer2Player::Metadata() const
metaData["mpris:length"] = qint64(playingFile.tag()->seconds() * 1000000);
metaData["xesam:url"] = QString::fromLatin1(
QUrl::fromLocalFile(playingFile.absFilePath()).toEncoded());
KUrl::fromLocalFile(playingFile.absFilePath()).toEncoded());
if(playingFile.coverInfo()->hasCover()) {
QString fallbackFileName = KStandardDirs::locateLocal("tmp",
......
......@@ -28,14 +28,14 @@ class ScrobbleConfigDlg : public KDialog
Q_OBJECT
public:
explicit ScrobbleConfigDlg(QWidget* parent = 0, Qt::WindowFlags f = 0);
private slots:
void testLogin();
void validLogin();
void invalidLogin();
void save();
void valuesChanged();
private:
KLineEdit *m_usernameEdit;
KLineEdit *m_passwordEdit;
......@@ -43,4 +43,4 @@ private:
QLabel *m_testFeedbackLabel;
};
#endif//SCROBBLESETTINGS_H
\ No newline at end of file
#endif//SCROBBLESETTINGS_H
......@@ -225,7 +225,7 @@ void Scrobbler::post(QMap<QString, QString> &params)
QByteArray data;
foreach(QString key, params.keys()) {
data += QUrl::toPercentEncoding(key) + "=" + QUrl::toPercentEncoding(params[key]) + "&";
data += QUrl::toPercentEncoding(key) + '=' + QUrl::toPercentEncoding(params[key]) + '&';
}
QNetworkRequest req(url);
......
......@@ -162,7 +162,7 @@ VolumePopupButton::wheelEvent( QWheelEvent * event )
{
event->accept();
PlayerManager *player = JuK::JuKInstance()->playerManager();
float volume = qBound( 0.0, player->volume() + float( event->delta() ) / 4000.0, 1.0 );
float volume = qBound( 0.0f, player->volume() + float( event->delta() ) / 4000.0f, 1.0f );
player->setVolume( volume );
volumeChanged( volume );
}
......
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