Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7626)

Issue 5492070: Clementine Vkontakte internet service

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by Black Jck
Modified:
9 years, 4 months ago
Reviewers:
davidsansome
Visibility:
Public.

Patch Set 1 #

Total comments: 20
Unified diffs Side-by-side diffs Delta from patch set Stats (+2174 lines, -47 lines) Patch
M data/data.qrc View 1 chunk +1 line, -0 lines 0 comments Download
A data/providers/vkontakte.png View 0 chunks +-1 lines, --1 lines 0 comments Download
M src/CMakeLists.txt View 5 chunks +11 lines, -0 lines 1 comment Download
A src/core/throttlednetworkmanager.h View 1 chunk +56 lines, -0 lines 2 comments Download
A src/core/throttlednetworkmanager.cpp View 1 chunk +65 lines, -0 lines 3 comments Download
M src/internet/digitallyimportedservicebase.h View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/digitallyimportedservicebase.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M src/internet/groovesharkservice.h View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/groovesharkservice.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M src/internet/icecastservice.h View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/icecastservice.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M src/internet/internetmodel.h View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/internetmodel.cpp View 3 chunks +5 lines, -2 lines 0 comments Download
M src/internet/internetservice.h View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/internetview.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/jamendoservice.h View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/jamendoservice.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M src/internet/lastfmservice.h View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/lastfmservice.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M src/internet/magnatuneservice.h View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/magnatuneservice.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M src/internet/savedradio.h View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/savedradio.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M src/internet/somafmservice.h View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/somafmservice.cpp View 1 chunk +2 lines, -1 line 0 comments Download
M src/internet/spotifyservice.h View 1 chunk +1 line, -1 line 0 comments Download
M src/internet/spotifyservice.cpp View 1 chunk +2 lines, -1 line 0 comments Download
A src/internet/vkontaktesearchplaylisttype.h View 1 chunk +43 lines, -0 lines 0 comments Download
A src/internet/vkontaktesearchplaylisttype.cpp View 1 chunk +46 lines, -0 lines 0 comments Download
A src/internet/vkontakteservice.h View 1 chunk +142 lines, -0 lines 1 comment Download
A src/internet/vkontakteservice.cpp View 1 chunk +600 lines, -0 lines 3 comments Download
A src/internet/vkontaktesettingspage.h View 1 chunk +78 lines, -0 lines 3 comments Download
A src/internet/vkontaktesettingspage.cpp View 1 chunk +278 lines, -0 lines 0 comments Download
A src/internet/vkontaktesettingspage.ui View 1 chunk +124 lines, -0 lines 0 comments Download
A src/internet/vkontakteworker.h View 1 chunk +136 lines, -0 lines 0 comments Download
A src/internet/vkontakteworker.cpp View 1 chunk +534 lines, -0 lines 7 comments Download
M src/translations/ca.po View 21 chunks +23 lines, -25 lines 0 comments Download
M src/ui/settingsdialog.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/ui/settingsdialog.cpp View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 1
davidsansome
12 years, 3 months ago (2012-01-07 17:24:46 UTC) #1
http://codereview.appspot.com/5492070/diff/1/src/CMakeLists.txt
File src/CMakeLists.txt (right):

http://codereview.appspot.com/5492070/diff/1/src/CMakeLists.txt#newcode351
src/CMakeLists.txt:351: core/throttlednetworkmanager.h
Can you move this line up so it's in alphabetical order?

http://codereview.appspot.com/5492070/diff/1/src/core/throttlednetworkmanager...
File src/core/throttlednetworkmanager.cpp (right):

http://codereview.appspot.com/5492070/diff/1/src/core/throttlednetworkmanager...
src/core/throttlednetworkmanager.cpp:23: mutex_ = new QMutex();
Create these in the constructor's initialisation list.  Also it looks like
mutex_ will leak, make it a normal member instead of a pointer so you don't have
to delete it.

http://codereview.appspot.com/5492070/diff/1/src/core/throttlednetworkmanager...
src/core/throttlednetworkmanager.cpp:40: locker.unlock();
You probably don't need to unlock this here.  In fact won't there be a race with
stopping/starting the timer again in ProcessQueue()?

http://codereview.appspot.com/5492070/diff/1/src/core/throttlednetworkmanager...
src/core/throttlednetworkmanager.cpp:41: emit TimeToProcessQueue();
Instead of having the overhead of signal emission here, just do
metaObject()->invokeMethod(this, "ProcessQueue", Qt::QueuedConnection);

http://codereview.appspot.com/5492070/diff/1/src/core/throttlednetworkmanager.h
File src/core/throttlednetworkmanager.h (right):

http://codereview.appspot.com/5492070/diff/1/src/core/throttlednetworkmanager...
src/core/throttlednetworkmanager.h:15: class NetworkReply: public QObject
Instead of having this wrapper, could you return the real QNetworkReply* from
throttledGet and moveToThread(thread()) on it?

http://codereview.appspot.com/5492070/diff/1/src/core/throttlednetworkmanager...
src/core/throttlednetworkmanager.h:36: class ThrottledNetworkManager : public
QNetworkAccessManager
Maybe inherit from NetworkAccessManager in network.h so the User-Agent and
caching gets set correctly.

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteservice.cpp
File src/internet/vkontakteservice.cpp (right):

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteservice.cp...
src/internet/vkontakteservice.cpp:67: qRegisterMetaType< QList<QStringList>
>("QList<QStringList>");
Maybe move this to main.cpp with the others.

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteservice.cp...
src/internet/vkontakteservice.cpp:191: foreach (QModelIndex i, selection) {
const QModelIndex& i

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteservice.cp...
src/internet/vkontakteservice.cpp:598: void VkontakteService::Log(QString error)
{
const QString&

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteservice.h
File src/internet/vkontakteservice.h (right):

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteservice.h#...
src/internet/vkontakteservice.h:35: typedef
BackgroundThreadImplementation<VkontakteApiWorker,VkontakteApiWorker>
BgApiWorker;
Put these typedefs in a namespace or a class.

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontaktesettingspa...
File src/internet/vkontaktesettingspage.h (right):

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontaktesettingspa...
src/internet/vkontaktesettingspage.h:40: void RequestCaptcha(QUrl url);
const QUrl&

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontaktesettingspa...
src/internet/vkontaktesettingspage.h:56: void LoginFinished(VkontakteAuthResult
result);
const VkontakteAuthResult&

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontaktesettingspa...
src/internet/vkontaktesettingspage.h:69: bool logged_in_;
Doesn't the VkontakteService have some of these members too?

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteworker.cpp
File src/internet/vkontakteworker.cpp (right):

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteworker.cpp...
src/internet/vkontakteworker.cpp:16: timer_ = new QTimer(this);
Do this in the initialisation list

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteworker.cpp...
src/internet/vkontakteworker.cpp:43: foreach (QUrl url, urls) {
const QUrl&

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteworker.cpp...
src/internet/vkontakteworker.cpp:66:
timer_->singleShot(1500,this,SLOT(ProcessAddQueue()));
I'd prefer these delays to be put in constants

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteworker.cpp...
src/internet/vkontakteworker.cpp:72: foreach (QUrl url, urls) {
const QUrl&

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteworker.cpp...
src/internet/vkontakteworker.cpp:72: foreach (QUrl url, urls) {
const QUrl&

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteworker.cpp...
src/internet/vkontakteworker.cpp:110: foreach (QUrl url, songs) {
const QUrl&

http://codereview.appspot.com/5492070/diff/1/src/internet/vkontakteworker.cpp...
src/internet/vkontakteworker.cpp:145:
songs_ids_to_move_.remove(songs_ids_to_move_.size()-1,1); //remove last comma
Instead of doing this, how about making songs_ids_to_move_ a QStringList, and
doing .join(",") on it here.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b