Skip to content
Snippets Groups Projects

QDS-11912 Project list and run project button are enabled/disabled properly

Merged QDS-11912 Project list and run project button are enabled/disabled properly
Merged Burak Hançerli requested to merge QDS-11912/disable-ui-components-properly into master
3 files
+ 25
18
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 5
6
@@ -150,7 +150,6 @@ void Backend::setAutoScaleProject(const bool &enabled)
void Backend::setUserHash(const QString &userHash)
{
QSettings().setValue("user/hash", userHash);
updateUserProjectList();
}
bool Backend::updateInBackground()
@@ -511,17 +510,16 @@ void Backend::updateUserProjectList()
return;
}
if (projectList == m_projectListArray) {
if (projectList == m_projectList) {
qDebug("No new projects available");
return;
}
m_projectListArray = projectList;
m_projectList.clear();
m_projectList = projectList;
qDebug("List of available projects fetched:");
for (const auto &project : projectList) {
const QString projectName{project.toObject().value("appName").toString()};
qDebug() << "--" << projectName;
m_projectList << projectName;
}
emit projectListChanged();
@@ -534,7 +532,7 @@ void Backend::parseDesignViewerUrl(const QUrl &url)
// If it is a user hash, we register the user and fetch the project list
// If it is a project url, we submit the url to the text field
// sample url: https://<url>/<project_name>.qmlrc
// sample user hash: qtdesignviewer://17e8907b3b84029384hs8djshdu38476
// sample user hash: qtdesignviewer://19f8907b6t84029384hs8djshdu38476
if (urlData.isEmpty())
return;
else if (urlData.startsWith("https//")) {
@@ -545,6 +543,7 @@ void Backend::parseDesignViewerUrl(const QUrl &url)
} else if (urlData.startsWith("qtdesignviewer://")) {
qDebug() << "Registering user from QR code";
setUserHash(url.toString().remove("qtdesignviewer://"));
updateUserProjectList();
} else {
qWarning() << "Unknown QR code data: " << urlData;
}
Loading