Naming coding standard fix

This commit is contained in:
Atlante45 2017-09-27 15:31:29 -07:00
parent 73483eef94
commit eb06c33187
4 changed files with 16 additions and 16 deletions

View file

@ -786,11 +786,11 @@ ScrollingWindow {
anchors.verticalCenter: parent.verticalCenter
function makeText() {
var pendingBakes = assetMappingsModel.bakesPendingCount;
if (selectedItems > 1 || pendingBakes === 0) {
var numPendingBakes = assetMappingsModel.numPendingBakes;
if (selectedItems > 1 || numPendingBakes === 0) {
return selectedItems + " items selected";
} else {
return pendingBakes + " bakes pending"
return numPendingBakes + " bakes pending"
}
}

View file

@ -785,11 +785,11 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
function makeText() {
var pendingBakes = assetMappingsModel.bakesPendingCount;
if (selectedItems > 1 || pendingBakes === 0) {
var numPendingBakes = assetMappingsModel.numPendingBakes;
if (selectedItems > 1 || numPendingBakes === 0) {
return selectedItems + " items selected";
} else {
return pendingBakes + " bakes pending"
return numPendingBakes + " bakes pending"
}
}

View file

@ -239,7 +239,7 @@ void AssetMappingModel::refresh() {
connect(request, &GetAllMappingsRequest::finished, this, [this](GetAllMappingsRequest* request) mutable {
if (request->getError() == MappingRequest::NoError) {
int bakesPendingCount = 0;
int numPendingBakes = 0;
auto mappings = request->getMappings();
auto existingPaths = _pathToItemMap.keys();
for (auto& mapping : mappings) {
@ -289,7 +289,7 @@ void AssetMappingModel::refresh() {
lastItem->setData(statusString, Qt::UserRole + 5);
lastItem->setData(mapping.second.bakingErrors, Qt::UserRole + 6);
if (mapping.second.status == Pending) {
++bakesPendingCount;
++numPendingBakes;
}
}
@ -339,9 +339,9 @@ void AssetMappingModel::refresh() {
}
}
if (bakesPendingCount != _bakesPendingCount) {
_bakesPendingCount = bakesPendingCount;
emit bakesPendingCountChanged(_bakesPendingCount);
if (numPendingBakes != _numPendingBakes) {
_numPendingBakes = numPendingBakes;
emit numPendingBakesChanged(_numPendingBakes);
}
} else {
emit errorGettingMappings(request->getErrorString());
@ -373,4 +373,4 @@ void AssetMappingModel::setupRoles() {
roleNames[Qt::DisplayRole] = "name";
roleNames[Qt::UserRole + 5] = "baked";
setItemRoleNames(roleNames);
}
}

View file

@ -26,7 +26,7 @@
class AssetMappingModel : public QStandardItemModel {
Q_OBJECT
Q_PROPERTY(bool autoRefreshEnabled READ isAutoRefreshEnabled WRITE setAutoRefreshEnabled)
Q_PROPERTY(int bakesPendingCount READ getBakesPendingCount NOTIFY bakesPendingCountChanged)
Q_PROPERTY(int numPendingBakes READ getNumPendingBakes NOTIFY numPendingBakesChanged)
public:
AssetMappingModel();
@ -39,13 +39,13 @@ public:
bool isKnownMapping(QString path) const { return _pathToItemMap.contains(path); }
bool isKnownFolder(QString path) const;
int getBakesPendingCount() const { return _bakesPendingCount; }
int getNumPendingBakes() const { return _numPendingBakes; }
public slots:
void clear();
signals:
void bakesPendingCountChanged(int newCount);
void numPendingBakesChanged(int newCount);
void errorGettingMappings(QString errorString);
void updated();
@ -54,7 +54,7 @@ private:
QHash<QString, QStandardItem*> _pathToItemMap;
QTimer _autoRefreshTimer;
int _bakesPendingCount{ 0 };
int _numPendingBakes{ 0 };
};
Q_DECLARE_METATYPE(AssetMappingModel*)