Skip to content
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

Killer feature update #14

Open
wants to merge 89 commits into
base: main
Choose a base branch
from
Open

Killer feature update #14

wants to merge 89 commits into from

Conversation

a-badin
Copy link
Collaborator

@a-badin a-badin commented Jun 8, 2023

No description provided.

Copy link
Collaborator Author

@a-badin a-badin left a comment

Choose a reason for hiding this comment

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

Клиент оцениваю на по 15 баллов


int result = init_app_settings();

int flag = 3;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

принимали бы тогда в enum тоже а не в int

break;
}
switch (flag) {
case (int)LoginWindow::States::to_log_window:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

static_cast


class UserManager {
private:
static std::shared_ptr<User> instance;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

есть реализация синглтона, которая называется сигнлотоном Майерса, static std::shared_ptr<User> instance; нужно положить в тело функции, тогда компилятор гарантирует, что если 2 потока одновременно вызовут getInstance не будет гонки на инициализации

static std::shared_ptr<QSettings> settings;
UserManager() {}
UserManager(const UserManager&);
UserManager& operator=( UserManager& );
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

const пропущен

#define REGISTRATIONWINDOW_H

#include <QDialog>
#include "../../controls/user_control/user_control.h"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

надо правильно настраивать include dir


try
{
cpr::Response response = cpr::Get(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

блокирующийся вызов - не очень хорошо

struct Channel : Base
{
unsigned int guild_id=0;
std::string name="";
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

классы не нужно инициализировать явно

std::string password="";
std::string email="";
std::string last_login="";
unsigned int guild_id=-1;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

для unsigned лучше явно взять std::numeric_limits::max()

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.

5 participants