Skip to content

New signals slots syntax in library#2292

Merged
uklotzde merged 6 commits intomixxxdj:masterfrom
ferranlala:new-signals-slots-syntax-library
Sep 29, 2019
Merged

New signals slots syntax in library#2292
uklotzde merged 6 commits intomixxxdj:masterfrom
ferranlala:new-signals-slots-syntax-library

Conversation

@ferranlala
Copy link
Copy Markdown
Contributor

In this PR I update the code under 'src/library' to use the new signals and slots syntax. All changes are pretty straightforward and done with search and replace and some regex.

The things that deserve more careful review are disconnects and the two places where I used closures.

It's quite a big PR because I don't want to open a flood of PRs with these changes, but let me know if you prefer me to split it into smaller PRs.

Comment thread src/library/dlgtrackinfo.cpp Outdated
Comment thread src/library/dlgtrackinfo.cpp Outdated
Comment thread src/library/previewbuttondelegate.h Outdated
Comment thread src/library/analysisfeature.cpp Outdated
Comment thread src/library/autodj/autodjfeature.cpp Outdated
@ferranlala
Copy link
Copy Markdown
Contributor Author

@daschuer Comments addressed, thank you for the review.

@daschuer
Copy link
Copy Markdown
Member

You mean @uklotzde I guess ;-)

@ferranlala
Copy link
Copy Markdown
Contributor Author

Ooops, indeed :)

@uklotzde
Copy link
Copy Markdown
Contributor

You need to include util/compatibility.h for QOverload

@uklotzde
Copy link
Copy Markdown
Contributor

This PR might introduce many merge conflicts with existing PRs. Most of them should be fairly easy to resolve. But we need to start at some point with this migration.

Query to all: Any thoughts or objections? I don't mind to rebase or merge my pending changes.

@Holzhaus
Copy link
Copy Markdown
Member

I do not mind either.

@daschuer
Copy link
Copy Markdown
Member

I vote for merge, since it contains no changed logic.

@daschuer
Copy link
Copy Markdown
Member

@uklotzde merge?

Comment thread src/library/coverartdelegate.h Outdated
#ifndef COVERARTDELEGATE_H
#define COVERARTDELEGATE_H

#include <widget/wlibrarytableview.h>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong (system) include


QAbstractItemDelegate* BrowseTableModel::delegateForColumn(const int i, QObject* pParent) {
QTableView* pTableView = qobject_cast<QTableView*>(pParent);
WLibraryTableView* pTableView = qobject_cast<WLibraryTableView*>(pParent);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: This is a typical situation where redundant types can be avoided by using auto

m_pNetwork = new QNetworkAccessManager();
//connect(m_pNetwork, SIGNAL(finished(QNetworkReply*)),
// this, SLOT(finishedSlot(QNetworkReply*)));
//connect(m_pNetwork, finished,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's delete this dead comment

@uklotzde
Copy link
Copy Markdown
Contributor

@ferranpujolcamins: I'll resolve the merge conflicts and fix the final issues.

…gnals-slots-syntax-library

# Conflicts:
#	src/library/library.cpp
#	src/library/scanner/libraryscanner.cpp
@uklotzde
Copy link
Copy Markdown
Contributor

@ferranpujolcamins: Ready
ferranlala#11

@ferranlala
Copy link
Copy Markdown
Contributor Author

Thank you very much

@uklotzde
Copy link
Copy Markdown
Contributor

LGTM

@uklotzde uklotzde merged commit 9538823 into mixxxdj:master Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants