forked from qt-creator/qt-creator
GitLab plugin: Remove visibility public default value
The query currently used does not provide this value and showing public for everything is misleading to the users. Fixes: QTCREATORBUG-28882 Change-Id: Ie47a4fa24e4b1e90b8d1a53c5819742f2b5aca71 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -338,7 +338,7 @@ void GitLabDialog::handleProjects(const Projects &projects)
|
||||
// TODO use a real model / delegate..?
|
||||
listModel->setDataAccessor([](Project *data, int /*column*/, int role) -> QVariant {
|
||||
if (role == Qt::DisplayRole)
|
||||
return QString(data->displayName + " (" + data->visibility + ')');
|
||||
return data->displayName;
|
||||
if (role == Qt::UserRole)
|
||||
return QVariant::fromValue(*data);
|
||||
return QVariant();
|
||||
|
||||
@@ -144,7 +144,7 @@ static Project projectFromJson(const QJsonObject &jsonObj)
|
||||
project.displayName = jsonObj.value("name_with_namespace").toString();
|
||||
project.pathName = jsonObj.value("path_with_namespace").toString();
|
||||
project.id = jsonObj.value("id").toInt(-1);
|
||||
project.visibility = jsonObj.value("visibility").toString("public");
|
||||
project.visibility = jsonObj.value("visibility").toString();
|
||||
project.httpUrl = jsonObj.value("http_url_to_repo").toString();
|
||||
project.sshUrl = jsonObj.value("ssh_url_to_repo").toString();
|
||||
if (jsonObj.contains("forks_count"))
|
||||
|
||||
Reference in New Issue
Block a user