Open
Conversation
… updated OnClick code
… addTracksFailed: возвращает список непринятых треков
…Successfully и возвращает списки принятых и непринятых файлов
…шибках при добавлении
… плеера о добавлении треков к слотам контроллера
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ревью
Audio::Audio(QString path) { this->path = path; ssize_t startIndexNameSong = path.lastIndexOf(QString::fromLocal8Bit("/"));использовать auto
QVector<Audio> Audio::fromAudioPaths(const QStringList &paths){ QVector<Audio> result; for(auto iter = paths.begin() ; iter != paths.end() ; ++iter){использовать
for(const auto path: paths)const QString& Audio::GetPath() const{Все эти методы должны быть inline
const QString& GetAlbumTitle() const; bool operator == (const Audio& other) const; private: QString path;Все переменке выглядят как const, но тогда LoadMetaData должен быть mutable (допустимо, если он вызывается только из конструктора)
QStringList tracksNames;с++11 уже умее т
for(:)public: MainController(){}; ~MainController(){};мне кажется, что они виртуальный. Но в любом случае лучше оставить автогерируемый
MainWindow::~MainWindow() { delete audioListModel;ЕМНП, то объекты будут удалены при удалении родителя.
Если хотите явного удаления, то используйте std:uniq_ptr
void MainWindow::setVolumeSlider() { if(!volumeSliderStatus){ volumeSlider = new QSlider(Qt::Horizontal, ui->volumeBox);добавление / удаление объекта выглядит странным. его лучше скрывать
explicit MainWindow(QWidget *parent = 0);nullptr (опять же C++11
public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); void setAudioListModel(QStringList tracks);может по const ссылке?
void setPlayingPosition(int position); void setSelectedAudioPosition(int position); void addTracks(const QVector<Audio>& newTracks);Надо выбрать один стиль для slots:
по значению
по указателю
Но на работу не влияет
class WorkingDirectory { public: WorkingDirectory(const QString& _path);explicit
QString GetSong(const unsigned int i);
азвание аргумента не понятно, const избыточен (возможно)