-
-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor recent messages API #4763
Conversation
This exposes internal functions for testing
3205776
to
fcb41ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
|
||
using namespace recentmessages::detail; | ||
|
||
void load(const QString &channelName, std::weak_ptr<Channel> channelPtr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: the parameter 'channelPtr' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
void load(const QString &channelName, std::weak_ptr<Channel> channelPtr, | |
void load(const QString &channelName, const std::weak_ptr<Channel>& channelPtr, |
src/providers/recentmessages/Api.hpp:31:
- void load(const QString &channelName, std::weak_ptr<Channel> channelPtr,
+ void load(const QString &channelName, const std::weak_ptr<Channel>& channelPtr,
using namespace recentmessages::detail; | ||
|
||
void load(const QString &channelName, std::weak_ptr<Channel> channelPtr, | ||
ResultCallback onLoaded, ErrorCallback onError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: the parameter 'onLoaded' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
ResultCallback onLoaded, ErrorCallback onError) | |
const ResultCallback& onLoaded, ErrorCallback onError) |
src/providers/recentmessages/Api.hpp:32:
- ResultCallback onLoaded, ErrorCallback onError);
+ const ResultCallback& onLoaded, ErrorCallback onError);
using namespace recentmessages::detail; | ||
|
||
void load(const QString &channelName, std::weak_ptr<Channel> channelPtr, | ||
ResultCallback onLoaded, ErrorCallback onError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: the parameter 'onError' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
ResultCallback onLoaded, ErrorCallback onError) | |
ResultCallback onLoaded, const ErrorCallback& onError) |
src/providers/recentmessages/Api.hpp:32:
- ResultCallback onLoaded, ErrorCallback onError);
+ ResultCallback onLoaded, const ErrorCallback& onError);
This exposes internal functions for testing by splitting the implementation & internal API into separate files
This exposes internal functions for testing by splitting the implementation & internal API into separate files
Description
This exposes internal functions for testing by splitting the implementation & internal API into separate files